<easye>
ANSI CL has no serialization of "not a number" representations, right?
<beach>
Does it even have the concept at all?
<ck_>
I don't think so, no
<easye>
I don't think so.
<easye>
Alright. Then this is something leaking from ABCL's using the JVM float tower underneath.
<easye>
Thanks for the clarification.
<aeth>
if you can get a NaN on an implementation, something like this is usually how you get it: (float-features:with-float-traps-masked t (/ zero zero)) ; where zero is 0s0 or 0f0 or 0d0 or 0l0 depending on which one you want
<easye>
aeth: chekc.
<aeth>
this won't work in every implementation that float-features supports
<easye>
Right.
* easye
reads up on float features again.
<ck_>
beach: by the way, does SICL have a fload reader already?
<beach>
SICL uses Eclector, but as I recall, Eclector doesn't have a float reader.
<aeth>
easye: and it doesn't look like float-features would support that for ABCL because it will keep :overflow and :underflow
aartaka has joined #lisp
<aeth>
easye: you might still be able to get it with bits-single-float/bits-double-float/etc., though. This assumes you know an IEEE NaN's bits and it's using IEEE
Balooga has quit [Read error: Connection reset by peer]
<aeth>
it still might error, though...
Balooga has joined #lisp
jw4 has quit [Quit: tot siens]
jw4 has joined #lisp
Bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
Bhartrihari has joined #lisp
<easye>
aeth: I think I will just patch ABCL's compiler to refuse to compile to a fasl containing a representation of a
<easye>
"Nan" to be in line with SBCL/CCL here.
<easye>
If someone wants to use the serialization of NaN for soemthing, they should use Shinmera's FLOAT-FEATURES.
<aeth>
the only problem is that FLOAT-FEATURES has an official way to get infinities but not NaNs
<easye>
Ah.
<aeth>
The two ways (with-float-traps-masked and bits-whatever-float) are hacks that won't work everywhere, although they can't really work everywhere.
shifty has quit [Ping timeout: 240 seconds]
shifty has joined #lisp
<easye>
I've asked the reporter of the bug for more feedback on if they actually wanted to "do" something with such a serialization, so we'll see if there is a deeper purpose other than nicely capturing a bug in ABCL's compiler.
<aeth>
oh, you're the main ABCL developer
* easye
is guilty.
<aeth>
so if float-features can't produce a NaN in ABCL like it can in SBCL and iirc CCL, you could fix that
<aeth>
if producing a NaN is something you want
<easye>
right.
<aeth>
I've only ever needed that for implementing the +nan.0 and -nan.0 literals in Scheme, on top of CL
<aeth>
not much else use for a NaN
<easye>
I don't see much use, but then again, I ain't deep in some program that needs to be careful with floats.
<aeth>
well, there are other times you might need to read a NaN, like various data formats that allow you to encode NaN
Bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
Bhartrihari has joined #lisp
<easye>
The bug reporter (reb) is at GOOG working on protobufs from what I understand, so that might be part of the motivation here.
<aeth>
I mean, if you read NaN from a data format, the first thing you want to do is drop it... but you might not want to drop it while reading it, since that's kind of combining different parts of your program in one place
* easye
nods.
<aeth>
Okay, I just tested CCL. My (/ zero zero) way to get a NaN (and then I use (- nan) to flip it if I want a "negative" NaN if it's "positive") works in both CCL and SBCL.
<aeth>
It's inherently unportable, but if it fails, it'll just fail, probably at the 0/0 part, in which case those implementations just can't use that syntax for now.
<ck_>
I recall Java having some interesting choices about type promotion. Does casting NaN into an integer still yield 0?
<aeth>
SBCL seems to error with e.g. ROUND on a NaN even if it's with-float-traps-masked. That's unfortunate. Something amusing like 0 is more entertaining.
<easye>
ck_: RE: casting NaN into an integer still yield 0? Just tested: yes, with openjdk11.
<easye>
That makes no sense at all. Must be some sort of legacy behavior from the initial implementation.
<ck_>
easye: thanks for checking. I believe the specification had something along the lines of "casting a floating-point number downwards may never throw an exception"
<easye>
In the source code for java.lang.Double.NaN there is this comment: "equivalent to the value returned by Double.longBitsToDouble(0x7ff8000000000000L)"
nullman has joined #lisp
<ck_>
yeah they speak of normalizing all possible representations of NaN in the specification as well, I'm trying to find what I seem to remember
frost-lab has quit [Quit: Ping timeout (120 seconds)]
<ck_>
Paragraph 4.2 says "Any value of a floating-point type may be cast to or from any numeric type.", that may have been it
aartaka has quit [Read error: Connection reset by peer]
galex-713_ has quit [Ping timeout: 268 seconds]
<easye>
ck_: Not sure I found your direct reference, but it seems like the cast of a NaN to integer zero is indeed a codified decision.
hendursa1 has joined #lisp
hendursaga has quit [Ping timeout: 240 seconds]
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
galex-713 has joined #lisp
galex-713 has quit [Read error: Connection reset by peer]
galex-713 has joined #lisp
liberliver has joined #lisp
Nilby has joined #lisp
madage has quit [Remote host closed the connection]
madage has joined #lisp
hnOsmium0001 has quit [Quit: Connection closed for inactivity]
notzmv has joined #lisp
liberliver has quit [Ping timeout: 264 seconds]
jlarocco has joined #lisp
kaftejiman has joined #lisp
jlarocco has quit [Ping timeout: 260 seconds]
Bhartrihari has left #lisp ["Disconnected: closed"]
Bhartrihari has joined #lisp
pve has joined #lisp
krid has quit [Ping timeout: 268 seconds]
treflip has joined #lisp
imode has quit [Ping timeout: 240 seconds]
NicolasO has joined #lisp
_whitelogger has joined #lisp
Alloc has quit [Ping timeout: 240 seconds]
Alloc has joined #lisp
Alloc has quit [Ping timeout: 258 seconds]
Alloc has joined #lisp
liberliver has joined #lisp
jonatack has quit [Quit: jonatack]
NicolasO has quit [Ping timeout: 240 seconds]
treflip has quit [Remote host closed the connection]
heisig has joined #lisp
jonatack has joined #lisp
mmohammadi9812 has quit [Ping timeout: 272 seconds]
jonatack has quit [Ping timeout: 260 seconds]
jonatack has joined #lisp
mmohammadi9812 has joined #lisp
treflip has joined #lisp
aartaka has joined #lisp
random-nick has joined #lisp
dbotton has joined #lisp
dbotton_ has quit [Ping timeout: 264 seconds]
krjst has quit [Quit: bye]
krjst has joined #lisp
krjst has quit [Client Quit]
krjst has joined #lisp
krjst has quit [Client Quit]
krjst has joined #lisp
rippa has joined #lisp
aartaka_d has joined #lisp
aartaka has quit [Ping timeout: 256 seconds]
liberliver has quit [Quit: liberliver]
jw4 has quit [Read error: Connection reset by peer]
gaqwas has joined #lisp
jw4 has joined #lisp
aartaka has joined #lisp
aartaka_d has quit [Ping timeout: 264 seconds]
jlarocco has joined #lisp
Nilby has quit [Read error: Connection reset by peer]
Fare has quit [Ping timeout: 260 seconds]
aartaka has quit [Ping timeout: 272 seconds]
jlarocco has quit [Ping timeout: 264 seconds]
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
uniminin has joined #lisp
miasuji has joined #lisp
treflip has quit [Quit: WeeChat 2.6]
miasuji has quit [Ping timeout: 260 seconds]
oxum has joined #lisp
terpri has joined #lisp
terpri_ has quit [Ping timeout: 264 seconds]
renzhi has joined #lisp
uniminin has quit [Quit: Leaving]
Inline has joined #lisp
Lord_of_Life_ is now known as Lord_of_Life
EvW has joined #lisp
hendursa1 has quit [Quit: hendursa1]
hendursaga has joined #lisp
nullman has quit [Ping timeout: 265 seconds]
rpg has joined #lisp
oxum has quit [Remote host closed the connection]
oxum has joined #lisp
dbotton has quit [Quit: -a- Connection Timed Out]
dbotton has joined #lisp
aartaka has joined #lisp
oxum has quit [Ping timeout: 240 seconds]
jlarocco has joined #lisp
dbotton_ has joined #lisp
dbotton has quit [Ping timeout: 260 seconds]
jlarocco has quit [Ping timeout: 268 seconds]
oxum has joined #lisp
leo_song has quit [Ping timeout: 240 seconds]
orivej has quit [Ping timeout: 272 seconds]
scymtym has quit [Ping timeout: 240 seconds]
nullman has joined #lisp
frost-lab has quit [Quit: Connection closed]
EvW has quit [Ping timeout: 240 seconds]
nullman has quit [Ping timeout: 260 seconds]
Alloc has quit [Ping timeout: 240 seconds]
Alloc has joined #lisp
enrio has joined #lisp
Alloc has quit [Remote host closed the connection]
Alloc has joined #lisp
EvW has joined #lisp
aartaka_d has joined #lisp
scymtym has joined #lisp
aartaka has quit [Ping timeout: 272 seconds]
dbotton has joined #lisp
dbotton_ has quit [Read error: Connection reset by peer]
aartaka_d has quit [Ping timeout: 268 seconds]
Fare has joined #lisp
amk has joined #lisp
shifty has quit [Ping timeout: 272 seconds]
amk has quit [Remote host closed the connection]
amk has joined #lisp
amk has quit [Changing host]
amk has joined #lisp
oxum has quit [Remote host closed the connection]
Alloc has quit [Ping timeout: 268 seconds]
Alloc has joined #lisp
enrioog has joined #lisp
enrio has quit [Ping timeout: 260 seconds]
Josh_2 has joined #lisp
toorevitimirp has quit [Remote host closed the connection]
perrier-jouet has quit [Quit: WeeChat 2.9]
troydm has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
kaftejiman has quit [Remote host closed the connection]
cosimone has joined #lisp
kiroul has joined #lisp
amk has quit [Remote host closed the connection]
Alloc has quit [Ping timeout: 258 seconds]
ex_nihilo has quit [Quit: Leaving]
amk has joined #lisp
Alloc has joined #lisp
EvW has quit [Ping timeout: 268 seconds]
treflip has joined #lisp
Bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
Bhartrihari has joined #lisp
dra has joined #lisp
cosimone has quit [Quit: cosimone]
troydm has joined #lisp
jlarocco has joined #lisp
enrio has joined #lisp
enrioog has quit [Ping timeout: 264 seconds]
jlarocco has quit [Ping timeout: 264 seconds]
orivej has joined #lisp
ech has quit [Ping timeout: 240 seconds]
enrio has quit [Quit: Leaving]
bitmapper has quit [Quit: Connection closed for inactivity]
troydm has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
heisig has quit [Quit: Leaving]
troydm has joined #lisp
mrchampion has quit [Read error: Connection reset by peer]
mrchampion has joined #lisp
treflip has quit [Quit: WeeChat 2.6]
tiwEllien has joined #lisp
space_otter has joined #lisp
aartaka has joined #lisp
ex_nihilo has joined #lisp
nitrix-or-treat is now known as nitrix
renzhi has quit [Quit: WeeChat 2.3]
oxum has joined #lisp
mmohammadi9812 has quit [Quit: Quit]
Gerula has quit [Ping timeout: 268 seconds]
Gerula has joined #lisp
galex-713 has quit [Ping timeout: 264 seconds]
Fare has quit [Ping timeout: 260 seconds]
galex-713 has joined #lisp
ech has joined #lisp
Fare has joined #lisp
EvW has joined #lisp
thmprover has joined #lisp
pj__ has joined #lisp
gbr___ has joined #lisp
<gbr___>
hello, is this channel still active?
<Josh_2>
yes
<pj__>
yes
<gbr___>
sweet!
<Josh_2>
underscore gang
<gbr___>
haha indeed
mmohammadi9812 has joined #lisp
<pj__>
hey
gbr___ has quit [Quit: leaving]
pj__ has quit [Quit: leaving]
<phoe>
constantly active
gbr___ has joined #lisp
<phoe>
like, not 100% of the time, but there's hundreds to thousands of posts daily - you can see the channel logs for activity - see the channel topic for logs
<Josh_2>
hundreds of thousands aye
<phoe>
well maybe not that much
<Josh_2>
gbr___: this community is small but quite active, and friendly
gbr___ has quit [Quit: leaving]
gaqwas has quit [Remote host closed the connection]
jlarocco has joined #lisp
imode has joined #lisp
dra has quit [Remote host closed the connection]
gbr___ has joined #lisp
bitmapper has joined #lisp
jlarocco has quit [Ping timeout: 260 seconds]
pj_ has joined #lisp
pj__ has joined #lisp
pj_ has quit [Ping timeout: 240 seconds]
<pj__>
Is lisp still used?
<Josh_2>
What kind of question is that?
<phoe>
yes, it is
<gbr___>
of course it is
<pj__>
Nice
oxum has quit [Remote host closed the connection]
Fare has quit [Ping timeout: 260 seconds]
<gbr___>
I am introducing pj to the world of irc and getting him back to the roots, it would be nice if he meets some real devs around here
<Josh_2>
some real devs?
<gbr___>
well you will understand what I mean if you see the quality devs in his area
<phoe>
am I a real dev if I wrote some non-trivial amount of Lisp code in the last year
<Josh_2>
obviously not phoe /s
Gerula has quit [Ping timeout: 272 seconds]
<gbr___>
well are you a real dev if you don't even know how to code without using a well know framework and use stackoverflow 10 times per second?
<Josh_2>
ah
<Josh_2>
javascript
<gbr___>
hahaha
<gbr___>
oh well
<gbr___>
btw I am wondering, how many here heard of fravia?
<Josh_2>
thats more of a #lispcafe topic :P
<gbr___>
indeed
<_death>
fravia's dead
<gbr___>
is he?
<gbr___>
kidding
jlarocco has joined #lisp
<gbr___>
well at least you heard of him
gbr___ has quit [Quit: leaving]
oxum has joined #lisp
jlarocco has quit [Ping timeout: 264 seconds]
gbr___ has joined #lisp
<pj__>
#lispcafe
gbr___ has quit [Client Quit]
gbr___ has joined #lisp
Fare has joined #lisp
hendursaga has quit [Ping timeout: 240 seconds]
hnOsmium0001 has joined #lisp
oxum has quit [Ping timeout: 264 seconds]
<phoe>
yes, this is #lispcafe material
jlarocco has joined #lisp
<markasoftware>
Say I have a fairly deep system of classes (class one instantiates class 2, which instantiates several class 3s, which instantiates several class 4s, maybe close to a dozen levels). I want people using the library to be able to easily replace one of the inner classes with their own, without changing all the classes above it. Is there any good pattern for this?
<phoe>
by "replace", what do you mean? that they should be able to provide their own class names? keyword arguments?
<flip214>
markasoftware: replace or extend?
<markasoftware>
I cannot simply store class names in class 1 because class 1 only directly knows about class 2
pj__ has quit [Ping timeout: 272 seconds]
<markasoftware>
Extend I guess
<flip214>
if it's just about "extend", you can always do CHANGE-CLASS afterwards and eg. change a class instance to a subclass
<flip214>
so people could inherit from your "default" classes, you just need a protocol to say "change the instance on level 3 to my class X"
pj_ has joined #lisp
<flip214>
or you have a special with the class names, and people can override that locally
jlarocco has quit [Ping timeout: 260 seconds]
hendursaga has joined #lisp
mokulus has joined #lisp
<markasoftware>
huh, i've never heard of change-class before!
<markasoftware>
I don't really need to change existing instances though
<phoe>
the simplest way would be to (defvar *level-2-class* 'standard-level-2-class) and have people rebind that
<phoe>
same for all others
<markasoftware>
I guess that would work
<markasoftware>
It would be cool if all the methods written on class 7 took classes 1-6 as arguments, so it could specialize on them
<markasoftware>
so by changing the parent class, you could modify the behavior of all the children classes
<Josh_2>
well you can do that with generics
<markasoftware>
but then all the methods of class 7 need to take 7 arguments minimum which is a pita
<flip214>
markasoftware: that sounds a bit uncommon, can you explain a bit more what you're doing?
<Josh_2>
why not just send them as a list?
<flip214>
Josh_2: because DEFMETHOD specialization
<flip214>
markasoftware: why do all lower methods need to know about upper classes?
<flip214>
are there really 7 instances or 7 parent classes?
<markasoftware>
i'm just writing a web application. There's something like server->stores several sections->stores several pages->stores several page parts (eg, header, footer, etc)
<flip214>
if there are 7 instances with HAS-A relationships, storing the parent instance in the child class and dispatching via a slot with per-class storage might be easier?
<markasoftware>
i want to make it easy to change the render-header method, for example.
<flip214>
but why do they need to know about the parent classes?
<markasoftware>
well if you put in a custom `header` class, you wouldn't
<markasoftware>
but another way is just to keep the same class then specialize on the top-level server class, so that way you can change the behavior of render-header without changing the `header` class if tha tmakes any sense
<flip214>
is that about "rendering" like HTML vs. JSON vs. XML output or so?
<markasoftware>
yeah
<flip214>
well, then you need _one_ output object, or just different output stream types - JSON-STREAM, HTML-STREAM, XML-STREAM
<flip214>
and all the rendering methods can specialize on that
<markasoftware>
sorry that's not quite what I meant. IT's always html
<markasoftware>
just if somebody wants to add an extra item to the header for example
<flip214>
well, then they could use their own class that derives from your class and have a :AFTER method
<markasoftware>
yeah
aartaka has quit [Ping timeout: 260 seconds]
<markasoftware>
the problem is how do they tell my server where to use their class in a large hierarchy
<flip214>
via specials, or a factory function
* flip214
ducks
<markasoftware>
well that's two recommendations for special variables now
<markasoftware>
I guess i'll look into that more seriously
<markasoftware>
thanks for listening to me describe my mediocre setup
<Alfr>
markasoftware, there was also the suggestion to pass in a list of class-names, I think.
emacsomancer has quit [Read error: Connection reset by peer]
<Alfr>
markasoftware, that be more explicit and thereby make it easier to test/find bugs.
oxum has joined #lisp
<pve>
markasoftware: could you have a set-header-instance function specialized on the root object?
alexshendi has joined #lisp
oxum has quit [Ping timeout: 240 seconds]
Jeanne-Kamikaze has joined #lisp
emacsomancer has joined #lisp
cosimone has joined #lisp
jlarocco has joined #lisp
<pj_>
what is lisp used for?
<phoe>
pj_: everything, it's a general purpose programming language
<Josh_2>
It's a very good one at that :P
akoana has joined #lisp
aartaka has joined #lisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
Codaraxis has joined #lisp
Codaraxis_ has quit [Ping timeout: 246 seconds]
pj_ has quit [Ping timeout: 260 seconds]
wooden has joined #lisp
wooden has quit [Changing host]
wooden has joined #lisp
renzhi has joined #lisp
<gbr___>
is anyone here freelancing with lisp?
<Inline>
depends i suppose
dbotton_ has joined #lisp
mikaelj has joined #lisp
dbotton has quit [Ping timeout: 264 seconds]
__jrjsmrtn__ has joined #lisp
emys has joined #lisp
edgar-rft has joined #lisp
<Josh_2>
I wish
dbotton has joined #lisp
dbotton_ has quit [Ping timeout: 264 seconds]
mmohammadi9812 has quit [Read error: Connection reset by peer]
mmohammadi9812 has joined #lisp
leo_song has joined #lisp
jlarocco has quit [Ping timeout: 264 seconds]
ggole has quit [Quit: Leaving]
perrier-jouet has joined #lisp
oats has joined #lisp
oats has left #lisp ["until later, my friends."]
mokulus has quit [Ping timeout: 246 seconds]
mokulus_ has joined #lisp
aartaka_d has joined #lisp
rumbler31 has quit [Ping timeout: 264 seconds]
aartaka has quit [Ping timeout: 246 seconds]
devon has joined #lisp
shka_ has quit [Ping timeout: 260 seconds]
emys has quit [Ping timeout: 268 seconds]
madage has quit [Remote host closed the connection]