Commit Graph

14 Commits

Author SHA1 Message Date
Devyn Cairns
0d70dbddd5
Add fibonacci benchmark, for fairly low-level eval performance (#892)
This is a benchmark that I created while testing IR. It's meant to
basically do only very simple operations but be running 100% Nushell
code most of the time, without any heavy lifting being done by commands,
and without any closure calls or anything like that. It seemed useful to
keep around so I'm adding it to `nu_scripts`.
2024-07-11 06:03:36 -05:00
Antoine Stevan
ed9165fda1
fix removed commands (#645)
related to
- https://github.com/nushell/nushell/pull/10567
- https://github.com/nushell/nushell/pull/10668
- https://github.com/nushell/nushell/pull/10568

this PR removes mentions to removed commands from
https://github.com/nushell/nushell/pull/10567,
https://github.com/nushell/nushell/pull/10668 and
https://github.com/nushell/nushell/pull/10568.

the main change has been introduced with
```nushell
sd 'random integer' 'random int' **/*.nu
```

running `rg "$nothing|random integer|to xml .* --pretty"` gives
- before
```
modules/random-list/random-list.nu
85:# Generate a random integer list.
95:        random integer $range

modules/fun/wordle.nu
11:  let word = ($words | get (random integer 0..($words | length)) | get column1)

benchmarks/random-bytes.nu
5:        | each { random integer }

sourced/misc/password_generator/ReadMe.md
84:Obviously you can just use the `random chars` or `random integers` commands but I like to have words I can read in my passwords, and I think those generated by this script have sufficient entropy.

sourced/misc/password_generator/nupass.nu
43:  let random_numbers = (1..$words | par-each { |i| (random integer 0..99) } --threads $threads)
71:    return (0..($words - 1) | each { |it| (random integer 0..99 | into string) + ($random_words | get $it) } | reduce { |it
, acc| $acc + $it })
92:    | get (random integer 1..($numlines))
99:        let rint = (random integer 1..4)
119:    | get (random integer 0..($symbolcharslen - 1))
```
- after
```
modules/random-list/random-list.nu
85:# Generate a random integer list.

sourced/misc/password_generator/ReadMe.md
84:Obviously you can just use the `random chars` or `random integers` commands but I like to have words I can read in my passwords, and I think those generated by this script have sufficient entropy.
```
2023-10-19 19:35:23 +02:00
Stefan Holderbach
6947014306
Replace use of $nothing with null (#621)
`$nothing` will be deprecated in nu 0.86

This accompanies
- https://github.com/nushell/nushell/pull/10478
2023-09-26 18:52:49 +02:00
Antoine Stevan
0dd97178ad
add the random-bytes benchmark (#595)
* add the `random-bytes` benchmark

* add report
2023-09-08 12:24:01 -05:00
Antoine Stevan
be47e43db6
rename date format to format date (#571) 2023-08-04 09:08:10 -05:00
JT
4a1eba5823
Update some benchmarks. Re-port the gradient benchmark (#558) 2023-07-22 03:16:27 +12:00
Darren Schroeder
1330bdd865
update sg.nu to print again (#456) 2023-04-21 14:24:17 -05:00
Darren Schroeder
ebdab3dea3
fix some quoting bugs that the lsp found (#441) 2023-04-07 15:08:02 -05:00
Darren Schroeder
b7a45fbcca
replace occurences of str collect with str join (#436) 2023-04-03 08:47:25 -05:00
Darren Schroeder
4f2263447f
update script syntax to match the latest nushell (#429) 2023-03-31 07:39:20 -05:00
Darren Schroeder
00b0039653
updated some scripts to support the latest changes in 0.77.1 (#416) 2023-03-16 18:00:25 -05:00
Darren Schroeder
0985500ec9
update scripts that use benchmark to timeit command (#397) 2023-03-02 16:05:27 -06:00
JT
6f9d6250d4
Switch to 'and' and 'or' (#322)
* Switch to 'and' and 'or'

* oops
2022-12-08 12:52:10 +13:00
Darren Schroeder
0ea59f4eaa
add turtle benchmark and reorganize (#259) 2022-06-28 07:37:25 -05:00