<jcowan>
Another question: how do I get access to (rnrs bytevectors)?
<samth>
rudybot: (require rnrs/bytevectors)
<rudybot>
samth: error: eval:1:9: cannot open module file <NEWLINE> module path: rnrs/bytevectors <NEWLINE> path: /mnt2/racket-6.9/share/pkgs/r6rs-lib/rnrs/bytevectors.rkt <NEWLINE> system error: No such file or directory; errno=2
<samth>
rudybot: (require rnrs/bytevectors-6)
<rudybot>
samth: Done.
<samth>
jcowan: ^
<jcowan>
Ah, I missed the -6
<jcowan>
Last question (I hope): How do I persuade the REPL to output bytevectors in transportable format, that is, as #vu8(...)?
<jcowan>
or what procedure can I call to do this for me?
phillbush has quit [Quit: Leaving]
selimcan has quit [Ping timeout: 240 seconds]
rj has joined #racket
countvajhula has quit [Ping timeout: 260 seconds]
rj has quit [Ping timeout: 265 seconds]
rj has joined #racket
countvajhula has joined #racket
<aeth>
rudybot: init racket/base
<rudybot>
aeth: your racket/base sandbox is ready
<aeth>
rudybot: (real->single-flonum +inf.0)
<rudybot>
aeth: ; Value: +inf.f
<aeth>
weird syntactic choice.
<jcowan>
Yes, a number with no digits anywhere.
<jcowan>
rudybot: +inf.0f0
<rudybot>
jcowan: error: +inf.0f0: undefined; <NEWLINE> cannot reference an identifier before its definition <NEWLINE> in module: 'program
<jcowan>
that's what I would have sorta expected
<jcowan>
rudybot: 1+2i+3j+4k
<rudybot>
jcowan: error: 1+2i+3j+4k: undefined; <NEWLINE> cannot reference an identifier before its definition <NEWLINE> in module: 'program
<jcowan>
I wish Scheme had a formal definition of potential numbers like CL's. "These things aren't numbers, but they might be in some later version, so they aren't allowed as identifiers."
<aeth>
jcowan: I use +inf.0f0
<jcowan>
Fair enough. Do you support any other distinct float sizes?
<aeth>
jcowan: and I'll probably reserve, but not implement, quaternion syntax.
<aeth>
I support CL's float sizes, but use the host CL's precision rounding (whatever the actual term is) rules. So +inf.0s0 probably becomes +inf.0f0 and +inf.0l0 probably becomes +inf.0d0
<aeth>
In theory +inf.0f0 could become +inf.0d0, too.
<aeth>
+inf.0d0 is just +inf.0, of course.
rj has quit [Ping timeout: 260 seconds]
<aeth>
The only flaw with CL's float syntax is that there's plenty of room at the top for more than just long float. long-float could be 80 bit, 128 bit, 256 bit, arbitrary-precision, etc.
<aeth>
I guess the way to go would be to add explicit quadruple precision (e.g. 1q0) and octuple precision (e.g. 1o0) and that will probably last for the next few centuries since no one is bothering with octuple precision yet.
rj has joined #racket
oaguy1 has quit [Ping timeout: 260 seconds]
countvajhula has quit [Ping timeout: 240 seconds]
lilyhughes-robin has joined #racket
lilyhughes-robin is now known as oaguy1
TCZ has quit [Quit: Leaving]
countvajhula has joined #racket
ricky_clarkson has joined #racket
<jcowan>
In CLISP, L format is arbitrary-precision. I think the main use of S format nowadays is for unboxed floats.
<aeth>
jcowan: s was mostly for having unboxed floats in the era of 32-bit implementations (where a real single-precision float would be boxed), but there are several 16-bit floating point formats that are in use now, mostly for machine learning
<jcowan>
Yes, that's what I meant.
<aeth>
I don't think any implementation has really caught up with this yet, though. Probably because almost all ML is done in Python
<jcowan>
But with nanboxing, we can now get binary64 unboxed floats by squeezing everything else into signaling-NaN space.
TCZ has joined #racket
<jcowan>
There is also a WP article about 8-bit IEEE-compatible floats, all of whose values are integers: you can get up to 122880 (though you can trade, say, 3 bits of range for 3 bits of fraction). See https://en.wikipedia.org/wiki/Minifloat#All_values_as_integers
oaguy1 has quit [Ping timeout: 256 seconds]
rj has quit [Quit: WeeChat 2.5]
aaaaaa has quit [Quit: leaving]
orivej has quit [Ping timeout: 256 seconds]
MetaHertz has quit [Ping timeout: 240 seconds]
rudybot has quit [Remote host closed the connection]