jackdaniel changed the topic of #commonlisp to: Common Lisp, the #1=(programmable . #1#) programming language | Wiki: <https://www.cliki.net> | IRC Logs: <https://irclog.tymoon.eu/libera/%23commonlisp> | Cookbook: <https://lispcookbook.github.io/cl-cookbook> | Pastebin: <https://plaster.tymoon.eu/> | News: ELS'22 this Monday (2022-03-21), see https://european-lisp-symposium.org
kaskal has joined #commonlisp
kaskal- has quit [Ping timeout: 255 seconds]
igemnace has joined #commonlisp
ttree has quit [Ping timeout: 276 seconds]
mon_aaraj has quit [Ping timeout: 246 seconds]
mon_aaraj has joined #commonlisp
mrcom has quit [Remote host closed the connection]
mrcom has joined #commonlisp
mrcom has quit [Remote host closed the connection]
mrcom has joined #commonlisp
ttree has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 248 seconds]
Lord_of_Life has joined #commonlisp
causal has joined #commonlisp
Oladon has joined #commonlisp
dre has joined #commonlisp
Guest74 has joined #commonlisp
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
waleee has quit [Ping timeout: 258 seconds]
mon_aaraj has quit [Ping timeout: 248 seconds]
mon_aaraj has joined #commonlisp
xaltsc has quit [Quit: WeeChat 3.5]
simendsj` has joined #commonlisp
simendsjo has quit [Ping timeout: 272 seconds]
orestarod has quit [Ping timeout: 248 seconds]
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
aartaka has joined #commonlisp
Oladon has quit [Quit: Leaving.]
dre has quit [Ping timeout: 244 seconds]
dBc has joined #commonlisp
even4void has quit [Ping timeout: 248 seconds]
ldb has joined #commonlisp
even4void has joined #commonlisp
yewscion has joined #commonlisp
<beach> Good morning everyone!
Bike has quit [Quit: Lost terminal]
<ldb> morning
akoana has quit [Ping timeout: 256 seconds]
akoana has joined #commonlisp
akoana has quit [Quit: leaving]
rotateq has joined #commonlisp
<mfiano> Morning
<mfiano> My first Common Lisp (command-line) application (only wrote libraries before) is nearing completion, but I have been taking time to learn LaTeX (it's been about 20 years since I touched it, and have forgotten nearly everything) so I can write good offline documentation for my program.
yewscion has quit [Ping timeout: 272 seconds]
<aeth> I guess it depends on if you still have your old files from 20 years ago
<aeth> ime, LaTeX is all about starting from a working document
<aeth> probably because the "makefile"-like thing is in the header of the file instead of in a separate file and that's always the part that's hardest for any language
<mfiano> The engine going forward is going to be lualatex it seems.
<mfiano> Such a shame. But not like I'm going to embed Lua
leeb has joined #commonlisp
<ldb> mfiano: do you know Donald Knuth's CWEB?
<mfiano> I'm not a fan of literate programming.
<ldb> I do like the concept of program refinement, that is, starting with a skeleton and adding deatails
tyson2 has quit [Remote host closed the connection]
ldb has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.1)]
leeb has quit [Ping timeout: 244 seconds]
leeb has joined #commonlisp
shka has joined #commonlisp
ttree has quit [Ping timeout: 240 seconds]
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
<Josh_2> Good mornin'
yw61 has joined #commonlisp
<Josh_2> I really should fix the fact that auth-source-search fails to get my irc password :sob:
shka has quit [Ping timeout: 240 seconds]
lisp123 has joined #commonlisp
<lisp123> capitalise constants?
<lisp123> or just use +..+
<Josh_2> Constants are wrapped in +...+
<lisp123> Cool ok
azimut has quit [Ping timeout: 240 seconds]
Posterdati has quit [Read error: Connection reset by peer]
<pjb> mfiano: I have a com.informatimago.common-lisp.cesarum.utility:nsubseq
Josh_2 has quit [Quit: ERC (IRC client for Emacs 27.1)]
<rotateq> lisp123: And capitalism constants would be wrapped into $foo$.
<lisp123> rotateq: Haha - that's a good one
<pjb> mfiano: also, you may consider ldiff, which lets you represent lists as difference lists. It's a technique used eg. in prolog to represent circular lists. But it can serve here I think.
<pjb> (let ((data (list 1 2 3 4 5 6))) (let ((list data) (tail (last data 2))) (values list tail (ldiff list tail)))) #| --> (1 2 3 4 5 6) ; (5 6) ; (1 2 3 4) |#
<pjb> mfiano: so as you can see, ldiff extracts the current sublist value, but you didn't actually mutate the original list or tail.
Josh_2 has joined #commonlisp
simendsj` has quit [Ping timeout: 240 seconds]
Josh_2 has quit [Client Quit]
rainthree has joined #commonlisp
Josh_2 has joined #commonlisp
Josh_2 has quit [Client Quit]
Posterdati has joined #commonlisp
Josh_2 has joined #commonlisp
Josh_2 has quit [Client Quit]
Josh_2 has joined #commonlisp
<Josh_2> Fixed :sunglasses:
energizer_ is now known as energizer
ttree has joined #commonlisp
dBc has quit [Quit: leaving]
rodicm has joined #commonlisp
treflip has joined #commonlisp
jmdaemon has quit [Ping timeout: 246 seconds]
lisp123 has quit [Remote host closed the connection]
<contrapunctus> How safe is it to use `(eq (class-name (class-of object)) 'my-class)` to filter instances of STANDARD-CLASS?
<beach> Oh, this is somewhat involved...
<beach> As it turns out, (class-name (find-class <some-name>)) does not necessarily evaluate to <some-name>.
<beach> It is USUALLY true, but not always.
<contrapunctus> Is there another way to filter a list of objects?
<beach> WOW, HOLD ON A SEC...
<Alfr> contrapunctus, maybe (eq (class-of ..) (find-class ..)) ?
<beach> What "list" are we talking about here?
<contrapunctus> a proper list, acceptable to `listp`
<beach> Oh, so TYPEP won't do?
<beach> If not, I would go for Alfr's solution.
rainthree3 has joined #commonlisp
<contrapunctus> typep worked, thanks :)
<beach> Great1
<beach> !
bilegeek has quit [Quit: Leaving]
rainthree has quit [Ping timeout: 248 seconds]
leeb has quit [Quit: WeeChat 3.4.1]
hayley has joined #commonlisp
mon_aaraj has quit [Ping timeout: 256 seconds]
lisp123 has joined #commonlisp
OlCe has quit [Read error: Connection reset by peer]
mon_aaraj has joined #commonlisp
lisp123 has quit [Ping timeout: 256 seconds]
lisp123 has joined #commonlisp
random-nick has joined #commonlisp
yw61 has quit [Quit: Client closed]
rainthree3 has quit [Ping timeout: 256 seconds]
OlCe has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
<pjb> contrapunctus: if you want to find instances of standard-class then use (typep x 'standard-class)
<pjb> contrapunctus: if you want to find instances of my-class then use (typep x 'my-class)
<pjb> contrapunctus: note that instances of subclasses are also instances of the class!!!
lisp123 has joined #commonlisp
McParen has joined #commonlisp
karlosz has joined #commonlisp
ttree has quit [Ping timeout: 256 seconds]
Dynom has joined #commonlisp
treflip has quit [Quit: Quit]
cosimone has joined #commonlisp
cage has joined #commonlisp
mon_aaraj has quit [Ping timeout: 256 seconds]
karlosz has quit [Ping timeout: 244 seconds]
mon_aaraj has joined #commonlisp
karlosz has joined #commonlisp
kpoeck has joined #commonlisp
karlosz has quit [Quit: karlosz]
orestarod has joined #commonlisp
lisp123 has left #commonlisp [Leaving...]
tyson2 has joined #commonlisp
lisp123 has joined #commonlisp
McParen has left #commonlisp [#commonlisp]
lisp123 has quit [Remote host closed the connection]
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
lisp123 has joined #commonlisp
kaskal- has joined #commonlisp
kaskal has quit [Ping timeout: 256 seconds]
lisp123 has quit [Ping timeout: 255 seconds]
mon_aaraj has quit [Ping timeout: 244 seconds]
mon_aaraj has joined #commonlisp
lisp123 has joined #commonlisp
<utis_> is lquery the tool to use for parsing xml that may not be well-formed? the documentation is pretty terse; how is one to isolate based on attributes? say i have "<foo bar="baz" . . ." i've tried ($ *doc* "foo" (attr "bar" "baz") (text)) but that still selects all the foos.
lisp123 has quit [Quit: Leaving...]
rainthree has joined #commonlisp
rainthree3 has joined #commonlisp
kpoeck has quit [Quit: Client closed]
rainthree has quit [Ping timeout: 255 seconds]
rodicm has quit [Ping timeout: 246 seconds]
rainthree3 has quit [Ping timeout: 255 seconds]
Brucio-61 has quit [Read error: Connection reset by peer]
scymtym has quit [Read error: Connection reset by peer]
scymtym has joined #commonlisp
Brucio-61 has joined #commonlisp
rodicm has joined #commonlisp
xaltsc has joined #commonlisp
kpoeck has joined #commonlisp
waleee has joined #commonlisp
Dynom has quit [Quit: WeeChat 3.5]
waleee has quit [Ping timeout: 244 seconds]
igemnace has quit [Remote host closed the connection]
tyson2 has quit [Remote host closed the connection]
rogersm has quit [Quit: Leaving...]
waleee has joined #commonlisp
rainthree has joined #commonlisp
kpoeck has quit [Ping timeout: 252 seconds]
kpoeck has joined #commonlisp
rainthree3 has joined #commonlisp
rainthree has quit [Ping timeout: 260 seconds]
cosimone has quit [Remote host closed the connection]
n1to has joined #commonlisp
rodicm has quit [Ping timeout: 248 seconds]
yagamisato has quit [K-Lined]
azimut has joined #commonlisp
aartaka has quit [Ping timeout: 255 seconds]
aartaka has joined #commonlisp
tyson2 has joined #commonlisp
<Guest74> is there a way to return only n decimal places from math functions?
<beach> Common Lisp does not represent floats as decimals.
<rotateq> Guest74: You mean for their printed representation?
<beach> The only way you can obtain decimal digits is by printing the float in base 10.
<beach> Guest74: FORMAT contains requests for such things.
waleee has quit [Ping timeout: 250 seconds]
<Guest74> rotateq: no, formats got that covered.
<rotateq> Okay.
<Shinmera> utis_: ($ *doc* "foo[bar=baz]"). It's just CSS selectors, as the documentation says.
<beach> Guest74: Does that make sense to you?
<Guest74> I guess I can multiply by 100 round and then divide again.
<beach> But that might lose precision.
<Guest74> yes, that's kind of the point.
<beach> No, I mean, you won't get the value 2.34 if you divide 234 by 100.
<beach> Not all decimal numbers have exact representations as binary floating-point numbers.
rodicm has joined #commonlisp
aartaka has quit [Ping timeout: 246 seconds]
<utis_> Shinmera: ah! i suppose that's more salient when one knows what a css selector is. thanks!
<beach> Guest74: So I guess the answer to my last question was "no", and maybe still is?
<White_Flame> specifically, you'll want to keep the integer number of hundredths (eg, don't divide again after rounding), or a string representation.
<beach> That, or just remember that your numbers are 100x what they represent.
<White_Flame> right, that's the integer number of hundredths
<beach> Like for applications using money.
<beach> Ah, OK, I see what you mean now.
<White_Flame> though even if you divide by 100, you'll still need to use FORMAT to truncate any FP rounding errors, so that number isn't "self-contained" in terms of its intended representation
<White_Flame> s/trunctate/round/
<White_Flame> though still possible to use as a plain fp value of approximately the intended value
<beach> Sure, if that is acceptable.
<White_Flame> I think some languages have decimal based floats, but not CL (natively)
<beach> You just have to be careful so that you don't assume things like (= (/ 234 100) 2.34) to be true.
aartaka has joined #commonlisp
<beach> For money, I think floats should probably be avoided entirely.
<beach> The 100 made me think this might be the intended application.
<White_Flame> yep, and as you say, most financial applications keep track of pennies, or even 100ths of pennies
mon_aaraj has quit [Ping timeout: 256 seconds]
<White_Flame> (2 or 4 decimal digit fixed point)
<beach> I didn't know about 4. Thanks for that information.
<Guest74> Just trying to achieve the same mathematical results as some libraries.
<White_Flame> a lot of stock & currency stuff is standardized to 4-digit "pips"
<beach> Guest74: Wow, what libraries use decimal floats?
<White_Flame> *currency exchange
<beach> Guest74: What language would such a library be written in?
<Guest74> graphics stuff.
<beach> White_Flame: I see. Interesting.
<beach> Guest74: Decimal floats? Truly? Are you sure?
<Guest74> some stuff people like was based on hardware or specific software, or even bugs in libraries.
mon_aaraj has joined #commonlisp
<beach> Using decimal floats for graphics would be very slow.
<beach> ... in most languages, I mean.
<beach> Maybe not COBOL or PL/I.
<White_Flame> Guest74: what other systems do you mean specifically?
dBc has joined #commonlisp
pfd has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
rodicm has quit [Remote host closed the connection]
rodicm has joined #commonlisp
<White_Flame> (iirc, .swf had a resolution of 1/20th of a pixel, for some strange reason)
<pl> beach: even in those. There's a reason why some hw has IEEE decimal128 in FPU
<beach> Indeed.
<Guest74> White_Flame: well right now it's just about typography and type scales.
<rotateq> I see often going from symbolic to numeric too fast as maybe loosing important information for later.
<beach> Guest74: So you don't have any such library in mind? Then why are you thinking of decimal floats?
<Guest74> but some formulas for colour, especially old ones, are specified to have a certain amount of precision.
<Guest74> beach: why do you keep saying decimal floats?
<beach> Exact decimal values? That sounds very surprising.
<beach> Guest74: Because that's what you have been asking for from the start.
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
<beach> Guest74: You wanted mathematical function to return results with a number of DECIMAL places.
<Guest74> I wasn't aware that's what I asked at all.
<beach> "is there a way to return only n decimal places from math functions?"
<beach> And then you suggested a "solution" by multiplying by 100, rounding, and then dividing by 100.
<beach> So, if decimal floats is not what you want, what is it?
rodicm has quit [Remote host closed the connection]
<White_Flame> if you're doing typography, is the floating point error going to be meaningful enough to really worry about it?
rodicm has joined #commonlisp
<Guest74> it's more about UX
<beach> Can you elaborate on that?
<Guest74> experiencing what they're used to in other programs.
<White_Flame> so this is just about the string represention on screen then
<beach> OK, good luck then.
<beach> White_Flame: If it were, FORMAT would be the thing, but that was eliminated early on.
<Guest74> White_Flame: The string representation wont be the same if the calculation isn't the same.
<White_Flame> I don't get it
<White_Flame> a string representation limited to 2 decimal digits of course will not be exactly equivalent to some internally computed float value... is that a problem?
rodicm has quit [Remote host closed the connection]
rodicm has joined #commonlisp
<White_Flame> I get the impression that the actual core question hasn't been asked yet
rodicm has quit [Remote host closed the connection]
rodicm has joined #commonlisp
<Guest74> my visual formatted string does not match the visual results of other tools. Like I said, it's about UX, at least in this case.  Dealing with colour difference formulas the errors were getting quite large using.
ec has joined #commonlisp
<White_Flame> "results" as in the strings displayed by other tools?
<White_Flame> like you print 23.87999994, and the ohter prints 23.88?
<Guest74> Now, as to why some standards body decided that all calucations were to 4 decimal places, or why people design their formulas a certain way I don't know, I'm just trying to match the results.
<Guest74> oh god, 2.34 2.33
bilegeek has joined #commonlisp
Guest74 has quit [Quit: Connection closed]
rodicm has quit [Remote host closed the connection]
rodicm has joined #commonlisp
<White_Flame> ok, if the standards mandate the type of arithmetic to be computed to 4 decimal digits, then you either need decimal floats or x1000 fixed-point values, with the rounding they mandate
rodicm has quit [Read error: Connection reset by peer]
rodicm has joined #commonlisp
<White_Flame> I seriously doubt you'll get any visual differences in the rendering, but you'll be off by sub-1000ths if you just use floats
ldb has joined #commonlisp
pfd has quit [Quit: Client closed]
<Nilby> Guest74: the postscript i worked on actually used fixed precision in 32 bits for most things
rodicm has quit [Ping timeout: 258 seconds]
rodicm_ has joined #commonlisp
dBc has quit [Quit: leaving]
rodicm_ has quit [Remote host closed the connection]
rodicm_ has joined #commonlisp
<White_Flame> Nilby: was that mandated by the spec?
<Nilby> White_Flame: yes, some fixed point was mandated, but also when you compare renderers it becomes obvious that's whats done. old printers didn't necessarily have floating point hardware
rodicm_ has quit [Ping timeout: 248 seconds]
rodicm has joined #commonlisp
rodicm has quit [Remote host closed the connection]
rodicm has joined #commonlisp
rodicm_ has joined #commonlisp
rodicm has quit [Ping timeout: 255 seconds]
rodicm_ has quit [Ping timeout: 272 seconds]
rodicm has joined #commonlisp
rodicm has quit [Remote host closed the connection]
rodicm has joined #commonlisp
rodicm_ has joined #commonlisp
rodicm has quit [Ping timeout: 258 seconds]
notzmv has quit [Ping timeout: 248 seconds]
causal has quit [Quit: WeeChat 3.5]
<ldb> I thought (defvar *foo*) is the same as (defvar *foo* nil)
<ldb> turns out I'm wrong, even emacs lisp would report unbound variable error for (defvar *foo*)
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
<White_Flame> defparameter doesn't default to NIL either, but requires you to list the value.
rodicm_ has quit [Remote host closed the connection]
rodicm has joined #commonlisp
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
ldb has quit [Ping timeout: 246 seconds]
rodicm has quit [Ping timeout: 246 seconds]
prokhor_ has joined #commonlisp
rodicm has joined #commonlisp
kpoeck has quit [Quit: Client closed]
rodicm has quit [Read error: Connection reset by peer]
rodicm has joined #commonlisp
rodicm_ has joined #commonlisp
rodicm has quit [Ping timeout: 244 seconds]
treflip has joined #commonlisp
waleee has joined #commonlisp
rodicm has joined #commonlisp
morganw has joined #commonlisp
rodicm_ has quit [Ping timeout: 244 seconds]
rodicm_ has joined #commonlisp
rodicm__ has joined #commonlisp
rodicm has quit [Ping timeout: 248 seconds]
rodicm_ has quit [Ping timeout: 255 seconds]
<pjb> Guest8247: round et al. take a second argument! (* (round pi 0.001) 0.001) #| --> 3.1420002 |# so you don't need to do the divide yourself.
karlosz has joined #commonlisp
ttree has joined #commonlisp
rodicm__ has quit [Ping timeout: 256 seconds]
rodicm has joined #commonlisp
rodicm_ has joined #commonlisp
rodicm has quit [Ping timeout: 256 seconds]
karlosz has quit [Ping timeout: 256 seconds]
rodicm_ has quit [Remote host closed the connection]
rodicm has joined #commonlisp
ldb has joined #commonlisp
epolanski has joined #commonlisp
rodicm has quit [Ping timeout: 240 seconds]
ldb has quit [Ping timeout: 248 seconds]
rodicm has joined #commonlisp
rodicm has quit [Ping timeout: 248 seconds]
rodicm has joined #commonlisp
rodicm has quit [Ping timeout: 246 seconds]
rodicm_ has joined #commonlisp
rodicm has joined #commonlisp
rodicm has quit [Read error: Connection reset by peer]
rodicm has joined #commonlisp
rodicm_ has quit [Ping timeout: 244 seconds]
rodicm has quit [Ping timeout: 246 seconds]
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
ldb has joined #commonlisp
morganw has quit [Read error: Connection reset by peer]
subpsunym has quit [Quit: leaving]
karlosz has joined #commonlisp
morganw has joined #commonlisp
Guest74 has joined #commonlisp
karlosz has quit [Ping timeout: 240 seconds]
treflip has quit [Quit: bye!]
pranavats has left #commonlisp [Error from remote client]
notzmv has joined #commonlisp
karlosz has joined #commonlisp
rodicm has joined #commonlisp
tyson2 has joined #commonlisp
mon_aaraj has quit [Ping timeout: 276 seconds]
mon_aaraj has joined #commonlisp
thuna` has joined #commonlisp
rainthree3 has quit [Ping timeout: 260 seconds]
kg7ski has quit [Quit: ZNC 1.8.2 - https://znc.in]
akoana has joined #commonlisp
kg7ski has joined #commonlisp
mon_aaraj has quit [Ping timeout: 276 seconds]
mon_aaraj has joined #commonlisp
mon_aaraj has quit [Ping timeout: 248 seconds]
mon_aaraj has joined #commonlisp
epolanski has quit [Quit: Connection closed for inactivity]
tyson2 has quit [Remote host closed the connection]
ttree has quit [Ping timeout: 276 seconds]
attila_lendvai has joined #commonlisp
tyson2 has joined #commonlisp
rodicm has quit [Quit: Leaving]
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
ldb has quit [Remote host closed the connection]
subpsunym has joined #commonlisp
ttree has joined #commonlisp
ttree has quit [Remote host closed the connection]
mon_aaraj has quit [Ping timeout: 246 seconds]
mon_aaraj has joined #commonlisp
pranavats has joined #commonlisp
ec has quit [Remote host closed the connection]
ec has joined #commonlisp
bilegeek has quit [Remote host closed the connection]
bilegeek has joined #commonlisp
bilegeek has quit [Remote host closed the connection]
bilegeek has joined #commonlisp
karlosz_ has joined #commonlisp
karlosz has quit [Ping timeout: 255 seconds]
karlosz_ is now known as karlosz
morganw has quit [Remote host closed the connection]
karlosz has quit [Ping timeout: 248 seconds]
karlosz has joined #commonlisp
bilegeek has quit [Remote host closed the connection]
bilegeek has joined #commonlisp
Guest86 has joined #commonlisp
livoreno has joined #commonlisp
Guest86 has left #commonlisp [#commonlisp]
cage has quit [Remote host closed the connection]
attila_lendvai has quit [Ping timeout: 258 seconds]
lisp123 has joined #commonlisp
prokhor__ has joined #commonlisp
prokhor_ has quit [Remote host closed the connection]
bilegeek has quit [Remote host closed the connection]
bilegeek has joined #commonlisp
random-nick has quit [Ping timeout: 248 seconds]
tyson2 has quit [Remote host closed the connection]
bilegeek has quit [Remote host closed the connection]
bilegeek has joined #commonlisp
thuna` has quit [Quit: out]
jolby has quit [Quit: Client closed]
lisp123 has quit [Remote host closed the connection]
karlosz has quit [Ping timeout: 276 seconds]
karlosz has joined #commonlisp
jolby has joined #commonlisp
bilegeek has quit [Remote host closed the connection]
bilegeek has joined #commonlisp
lisp123 has joined #commonlisp
n1to has quit [Ping timeout: 240 seconds]
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
dre has joined #commonlisp
jjohn has joined #commonlisp
bilegeek has quit [Remote host closed the connection]
jjohn has quit [Client Quit]
bilegeek has joined #commonlisp
Guest87 has joined #commonlisp