<dansa>
It seems mrg32k3a is the PRNG used in Racket. Is that the output I get when I invoke (random)? Can someone point me to the source code of random?
ZombieChicken has quit [Ping timeout: 256 seconds]
<dansa>
What function can I use to write an integer in binary (using little-endian, my local endianness)?
ng0 has quit [Remote host closed the connection]
ng0 has joined #racket
mzan has left #racket [#racket]
dmiles has quit [Ping timeout: 268 seconds]
jao has joined #racket
joebobjoe has joined #racket
juanfra has quit [Remote host closed the connection]
acarrico has joined #racket
dmiles has joined #racket
lockywolf has joined #racket
iyzsong has joined #racket
dansa has quit [Ping timeout: 250 seconds]
hjek has joined #racket
hjek has quit [Client Quit]
maximjaffe has joined #racket
orivej has quit [Ping timeout: 245 seconds]
acarrico has quit [Ping timeout: 245 seconds]
orivej has joined #racket
lockywolf_ has joined #racket
lockywolf has quit [Ping timeout: 246 seconds]
lockywolf_ has quit [Ping timeout: 250 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #racket
iyzsong has quit [Ping timeout: 252 seconds]
jao has quit [Ping timeout: 244 seconds]
ng0 has quit [Remote host closed the connection]
Sgeo_ has quit [Ping timeout: 244 seconds]
badkins has joined #racket
joebobjoe has quit [Ping timeout: 240 seconds]
orivej has quit [Ping timeout: 240 seconds]
ubLIX has quit [Quit: ubLIX]
vraid has quit [Quit: Leaving]
badkins has quit [Ping timeout: 240 seconds]
orivej has joined #racket
badkins has joined #racket
dbmikus__ has joined #racket
hjek has joined #racket
mzan has joined #racket
acarrico has joined #racket
orivej has quit [Ping timeout: 260 seconds]
orivej has joined #racket
YuGiOhJCJ has joined #racket
pera has joined #racket
joebobjoe has joined #racket
maximjaffe has quit [Ping timeout: 260 seconds]
badkins has quit [Ping timeout: 246 seconds]
juanfra has joined #racket
joebobjoe has quit [Ping timeout: 240 seconds]
pera has quit [Ping timeout: 268 seconds]
jao has joined #racket
badkins has joined #racket
ng0 has joined #racket
badkins has quit [Ping timeout: 246 seconds]
audriu has joined #racket
pera_ has joined #racket
pierpal has quit [Quit: Poof]
pierpal has joined #racket
joebobjoe has joined #racket
maximjaffe has joined #racket
joebobjoe has quit [Ping timeout: 268 seconds]
badkins has joined #racket
ubLIX has joined #racket
pera_ has quit [Ping timeout: 240 seconds]
vraid has joined #racket
acarrico has quit [Ping timeout: 244 seconds]
sleepnap has joined #racket
ym has quit [Remote host closed the connection]
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
pierpal has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 252 seconds]
sauvin has quit [Read error: Connection reset by peer]
<hjek>
yea, looks like it's the same in most cases
<joebobjoe>
if I run a file with a #! /usr/bin/env racket at the top, (find-system-path 'exec-file) will be racket but (find-system-path 'run-file) will be the file's name
<joebobjoe>
the docs don't explain this case, correct? or is it just me missing something
<joebobjoe>
also, terrible grammar: "this may be different from result for 'exec-file"
<hjek>
they don't explain it very clearly, just that they may be different
<joebobjoe>
how do I ask for clarifications in the official reference like this?
greghendershott has quit [Ping timeout: 250 seconds]
greghendershott has joined #racket
<hjek>
On github it says: "Contribute to Racket by submitting a pull request, joining the development mailing list, or visiting the IRC channel."
<hjek>
so perhaps someone on this channel knows better :-)
<joebobjoe>
I also don't get the point of -N
<joebobjoe>
why on earth would you want to set a custom name for 'run-file
<joebobjoe>
it apparently can be something completely arbitrary
<hjek>
if you have a better phrasing in mind, i think it would be a good idea to open an issue describing how the current phrasing is confusing
<hjek>
i mean, racket is often branded as being fine for kids, too, so i'm sure they'd appreciate you letting them know. but i just use the language and lurk here and haven't ever participated in development of it, so i don't really know how it works.
<lexi-lambda>
joebobjoe: The docs explain why -N exists: “In particular a ‘launcher’ script created by make-racket-launcher sets this path to the script’s path.”
<lexi-lambda>
Windows doesn’t have shebangs, so maybe there is no way to make such a launcher script work on Windows otherwise.
<joebobjoe>
is the racket command line program a "launcher"? is it responsible for setting 'run-file when I do racket <myfile.rkt>?
<lexi-lambda>
No, `racket` is not a launcher, but the `drracket` and `raco` executables are.
<joebobjoe>
lexi-lambda, the docs do not explain with -N exists
<joebobjoe>
it says there are two cases where 'run-name are different
<joebobjoe>
one of them was -N the other was make-racket-launcher
<lexi-lambda>
By all means, PRs are welcome if you think the documentation can be made clearer or more explicit.
<joebobjoe>
I don't want to make a pr if I don't understand it myself
<lexi-lambda>
Some libraries, such as racket/cmdline, use 'run-name to report errors.
<lexi-lambda>
If you write a program using racket/cmdline and provide invalid options, the error message will be formatted to include the program’s name at the front.
<lexi-lambda>
Given that all Racket scripts are actually executed by the `racket` executable, it wouldn’t be very helpful if this was always “racket”. You’d prefer executing a script named “foo.rkt” to say “foo.rkt:” at the front of an error message instead of “racket:”.
<lexi-lambda>
Racket allows you to control this with -N, so that if you have a launcher script that invokes `racket` on a particular script, you can arrange for 'run-name to be the name the user expects instead of the name “racket”.
<joebobjoe>
lexi-lambda, you mean, the name of the current script, rather than the name of the script you called within your program
<lexi-lambda>
Right.
<joebobjoe>
because the befault 'run-file would be foo.rkt
<lexi-lambda>
No, if you write `racket foo.rkt`, 'run-name is `racket`.
<joebobjoe>
the name is not "racket" by default
<lexi-lambda>
It is `racket` by default.
<joebobjoe>
I just tried it. running racket hello... (find-system-path 'run-file) is "hello"
<joebobjoe>
#<path:hello>
<lexi-lambda>
Actually, you’re right—it looks like the `racket` executable arranges for `racket foo.rkt` to implicitly set `'run-file` to `foo.rkt`. However, this does not happen if you have a command that is even slightly different, like `racket -t foo.rkt`, which will use `racket` for `'run-file`.
<joebobjoe>
curious, thank you
<joebobjoe>
does racket not come with a man entry?
<lexi-lambda>
It does on my machine, though the man entry is not very descriptive and pretty much just says “look at `racket --help`”.