mm007emko has quit [Read error: Connection reset by peer]
mm007emko has joined #commonlisp
danse-nr3 has joined #commonlisp
Lycurgus has joined #commonlisp
danse-nr3 has quit [Remote host closed the connection]
danse-nr3 has joined #commonlisp
tibfulv has quit [Read error: Connection reset by peer]
samebchase has quit [Quit: Ping timeout (120 seconds)]
samebchase has joined #commonlisp
tibfulv has joined #commonlisp
pillton has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.2)]
mesaoptimizer has quit [Quit: nyaa~]
Cymew has joined #commonlisp
alcor has joined #commonlisp
lagash has quit [Ping timeout: 260 seconds]
mesaoptimizer has joined #commonlisp
dino_tutter has joined #commonlisp
rendar has joined #commonlisp
piglet has quit [Quit: Konversation terminated!]
markb1 has quit [Ping timeout: 260 seconds]
mgl has joined #commonlisp
markb1 has joined #commonlisp
markb1 has quit [Max SendQ exceeded]
igemnace has quit [Read error: Connection reset by peer]
donleo has joined #commonlisp
alcor has quit [Quit: upgrading erc]
alcor has joined #commonlisp
mesaoptimizer is now known as mesaoptimizer2
markb1 has joined #commonlisp
piglet has joined #commonlisp
igemnace has joined #commonlisp
Guest52 has quit [Ping timeout: 250 seconds]
Guest52 has joined #commonlisp
danse-nr3 has quit [Ping timeout: 264 seconds]
<younder>
Hygenic macros can be viewed as a weakness rather than a strength. Both On Lisp and Let over Lambda shows how violation of these rules leads to a stronger abstraction system. But it is very demanding on it's implememntors. Most people would get it wrong. Thus it is probaly a bad pracice to encurage.
danse-nr3 has joined #commonlisp
<younder>
Just my two bits.
zetef has joined #commonlisp
<younder>
If we were all as smart as Graham, say, maybe it would be a good idea. But if we are not it can read to crappy code with unpredictable behavior.
pfdietz has quit [Quit: Client closed]
<younder>
We have, what, 6000 libraries..
zetef has quit [Remote host closed the connection]
mesaoptimizer has joined #commonlisp
<younder>
Personally I am more of Steel than a Moon. Argument for it, don't throw a book at it. ;)
mesaoptimizer has quit [Quit: Using Circe, the loveliest of all IRC clients]
piglet has quit [Quit: Konversation terminated!]
danse-nr3 has quit [Read error: Connection reset by peer]
danse-nr3 has joined #commonlisp
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 255 seconds]
Lord_of_Life_ is now known as Lord_of_Life
King_julian has quit [Ping timeout: 252 seconds]
random-nick has joined #commonlisp
lagash has joined #commonlisp
zetef has joined #commonlisp
skeemer has joined #commonlisp
zetef has quit [Remote host closed the connection]
pfdietz has joined #commonlisp
yitzi has joined #commonlisp
piglet has joined #commonlisp
attila_lendvai has joined #commonlisp
a51 has quit [Quit: WeeChat 4.2.1]
tyson2 has joined #commonlisp
decweb has joined #commonlisp
King_julian has joined #commonlisp
ebrasca has joined #commonlisp
dra has joined #commonlisp
vyrsh has joined #commonlisp
reb` has quit [Ping timeout: 252 seconds]
piglet has quit [Ping timeout: 255 seconds]
wacki has quit [Ping timeout: 260 seconds]
Guest52 has quit [Ping timeout: 250 seconds]
wacki has joined #commonlisp
xantoz has joined #commonlisp
kevingal has joined #commonlisp
nij- has joined #commonlisp
fitzsim has quit [Ping timeout: 264 seconds]
fitzsim has joined #commonlisp
danse-nr3 has quit [Ping timeout: 264 seconds]
nij- has quit [Ping timeout: 246 seconds]
nij- has joined #commonlisp
josrr has joined #commonlisp
nij- has quit [Ping timeout: 272 seconds]
ebrasca has quit [Remote host closed the connection]
reb has joined #commonlisp
gko` has quit [Remote host closed the connection]
danse-nr3 has joined #commonlisp
ronald_ has quit [Ping timeout: 260 seconds]
ronald has joined #commonlisp
giro has quit [Quit: irc]
attila_lendvai has quit [Ping timeout: 255 seconds]
dra has quit [Ping timeout: 264 seconds]
varjag has quit [Quit: ERC (IRC client for Emacs 27.1)]
yitzi has quit [Remote host closed the connection]
<beach>
awlygj: Places are not first-class objects in Common Lisp.
<beach>
awlygj: So you can't pass them as arguments to functions, return them from functions, not assign them as values to variables.
<beach>
awlygj: You also need to format your code to correspond to conventions.
<beach>
awlygj: A closing parenthesis is never preceded by whitespace, including newline.
<beach>
awlygj: Top-level comments have three semicolons. Non-top-level comments that are by themselves on a line have two semicolons.
<beach>
awlygj: And the bodies of your DEFUN forms have too much indentation.
<beach>
awlygj: May I recommend you join #clschool. That channel is dedicated to simple questions like this. This channel is not really meant for simple questions like that, though they are tolerated, especially if it is otherwise quiet.
istewart has joined #commonlisp
rtypo has joined #commonlisp
<awlygj>
beach: ok. I joined #clschool. new format paste.debian.net/1311955 :)
X-Scale has quit [Ping timeout: 250 seconds]
dra has joined #commonlisp
vyrsh has joined #commonlisp
puchacz has joined #commonlisp
X-Scale has joined #commonlisp
Lycurgus has quit [Quit: leaving]
X-Scale has quit [Ping timeout: 250 seconds]
gorignak has joined #commonlisp
dra has quit [Ping timeout: 256 seconds]
istewart has quit [Quit: Konversation terminated!]
nerap has joined #commonlisp
Pixel_Outlaw has joined #commonlisp
tyson2 has quit [Read error: Connection reset by peer]
a51 has joined #commonlisp
Cymew has quit [Ping timeout: 260 seconds]
danse-nr3 has quit [Remote host closed the connection]
danse-nr3 has joined #commonlisp
waleee has joined #commonlisp
flip214_ has quit [Quit: leaving]
yitzi has joined #commonlisp
josrr has quit [Remote host closed the connection]
<nerap>
Hi, does someone of you know how to use https with ningle?
ec has quit [Remote host closed the connection]
ec has joined #commonlisp
vyrsh has quit [Ping timeout: 264 seconds]
alcor has quit [Quit: rebooting]
<reb>
I've never used ningle so I don't know offhand. To answer this question I would track down the project's ASDF dependencies to see if there's any evidence of https support code, things like encryption libraries, etc.
tyson2 has joined #commonlisp
zetef has joined #commonlisp
vyrsh has joined #commonlisp
occ has quit [Ping timeout: 272 seconds]
danse-nr3 has quit [Read error: Connection reset by peer]
mgl has quit [Ping timeout: 268 seconds]
jon_atack has quit [Ping timeout: 264 seconds]
vyrsh has quit [Ping timeout: 272 seconds]
<nerap>
It seems like I need to look inside of Lack.
occ has joined #commonlisp
mgl has joined #commonlisp
X-Scale has joined #commonlisp
waleee has quit [Ping timeout: 268 seconds]
zetef has quit [Remote host closed the connection]
<ixelp>
ELS 2024, Vienna - European Lisp Symposium
tibfulv_ has joined #commonlisp
inline__ has joined #commonlisp
Inline has quit [Killed (lithium.libera.chat (Nickname regained by services))]
inline__ is now known as Inline
arpunk_ has joined #commonlisp
paulapatience_ has joined #commonlisp
morganw_ has joined #commonlisp
brettgilio_ has joined #commonlisp
alethkit_ has joined #commonlisp
jladd- has joined #commonlisp
svm has joined #commonlisp
Schnouki_ has joined #commonlisp
srhm_ has joined #commonlisp
jmbr_ has joined #commonlisp
okflo_ has joined #commonlisp
bheesham_ has joined #commonlisp
mgl has quit [Ping timeout: 255 seconds]
phadthai_ has joined #commonlisp
aeth_ has joined #commonlisp
flip214 has joined #commonlisp
icebarf_ has joined #commonlisp
mmk2410_ has joined #commonlisp
tibfulv has quit [*.net *.split]
jladd has quit [*.net *.split]
icebarf has quit [*.net *.split]
phadthai has quit [*.net *.split]
msv has quit [*.net *.split]
mmk2410 has quit [*.net *.split]
alethkit has quit [*.net *.split]
bheesham has quit [*.net *.split]
srhm has quit [*.net *.split]
jmbr has quit [*.net *.split]
brettgilio has quit [*.net *.split]
paulapatience has quit [*.net *.split]
Schnouki has quit [*.net *.split]
morganw has quit [*.net *.split]
arpunk has quit [*.net *.split]
okflo has quit [*.net *.split]
aeth has quit [*.net *.split]
Schnouki_ is now known as Schnouki
okflo_ is now known as okflo
jmbr_ is now known as jmbr
srhm_ is now known as srhm
bheesham_ is now known as bheesham
morganw_ is now known as morganw
paulapatience_ is now known as paulapatience
alethkit_ is now known as alethkit
brettgilio_ is now known as brettgilio
icebarf_ is now known as icebarf
gorignak has quit [Quit: quit]
mgl has joined #commonlisp
dwhelan1890 has joined #commonlisp
awlygj has quit [Quit: leaving]
dwhelan1890 has quit [Remote host closed the connection]
mm007emko has quit [Ping timeout: 240 seconds]
mm007emko has joined #commonlisp
josrr has joined #commonlisp
dwhelan1890 has joined #commonlisp
dwhelan1890 has quit [Remote host closed the connection]
dwhelan1890 has joined #commonlisp
dwhelan1890 has quit [Client Quit]
dwhelan1890 has joined #commonlisp
dwhelan1890 has quit [Remote host closed the connection]
amb007 has quit [Ping timeout: 272 seconds]
amb007 has joined #commonlisp
mivanchev has quit [Remote host closed the connection]
waleee has joined #commonlisp
mm007emko has quit [Read error: Connection reset by peer]
mm007emko has joined #commonlisp
yitzi has quit [Ping timeout: 256 seconds]
yitzi has joined #commonlisp
kevingal has quit [Ping timeout: 252 seconds]
Inline has quit [Ping timeout: 256 seconds]
mgl has quit [Ping timeout: 252 seconds]
vyrsh has quit [Quit: Konversation terminated!]
igemnace has quit [Quit: WeeChat 4.2.1]
<paulapatience>
Nothing wrong with the ignores
ronald has quit [Ping timeout: 264 seconds]
ronald has joined #commonlisp
notzmv has quit [Ping timeout: 255 seconds]
simendsjo has joined #commonlisp
<simendsjo>
I'm testing try-finally in parenscript, but the example just renders as a regular function call, and not the try/catch/finally as in the documentation: https://parenscript.common-lisp.dev/reference.html#try. Any idea what's going on?
<ixelp>
Parenscript Reference Manual
dra has joined #commonlisp
<josrr>
simendsjo: I don't see any problem (parenscript:ps (ps:try t (:catch (err) err) (:finally t)))
cage has joined #commonlisp
<simendsjo>
Oh, I used `try` and not `ps:try` :/ Thanks!
nerap has quit [Ping timeout: 246 seconds]
younder has quit [Ping timeout: 260 seconds]
<josrr>
It seems the Parenscript documentation assumes your package is using the PARENSCRIPT package.
shangul has quit [Changing host]
shangul has joined #commonlisp
shangul is now known as Farooq
davep has joined #commonlisp
kevingal has joined #commonlisp
mgl has joined #commonlisp
eddof13 has joined #commonlisp
eddof13 has quit [Client Quit]
zxcvz has joined #commonlisp
zxcvz has quit [Client Quit]
mgl has quit [Ping timeout: 255 seconds]
<Kingsy>
is it possible to have (round 1 2) output a double? looks like it throwing out an int
eddof13 has joined #commonlisp
<paulapatience>
Kingsy: fround
<Kingsy>
ah I was just using coerce and just casting to 'double-float
<Kingsy>
yeah thts much nicer. thanks
<Kingsy>
paulapatience: hmm is it possible to round to x decimal places with fround?
<Kingsy>
everything is coming out as a whole number but a double
<paulapatience>
Not without multiplying and dividing appropriately
<Kingsy>
sorr what do you mean? how would I round 2.225 to 2.23 in common lisp?
<Kingsy>
kinda just some basic maths
eddof13 has quit [Quit: eddof13]
eddof13 has joined #commonlisp
<paulapatience>
Round 100*2.225 to nearest decimal, then divide by 100
<Kingsy>
:o seriously?
<Kingsy>
honestly thats a bit mental.. :D never seen a language that doesnt have some functions to help with basic rounding
puchacz has quit [Quit: Client closed]
<paulapatience>
ANSI CL will be missing many functions you are used to and have many functions you are not
<ixelp>
CLHS: Function FLOOR, FFLOOR, CEILING, FCEILING...
<reb>
It may not be quite what Kingsy wants, since fround rounds to even.
<sjl>
> if the mathematical quotient is exactly halfway between two integers, (that is, it has the form integer+1/2), then the quotient has been rounded to the even (divisible by two) integer
<reb>
Yes, but 2.225 is not halfway between 2.22 and 2.23 ... it's slightly lower.
<Kingsy>
I don't really understand what the 1/100 and 100 are doing here.. hahah terrible maths.
<Kingsy>
what is 1/100 ??! a fraction orsomething?
<reb>
Yes, Common Lisp has a rational number data type.
<paulapatience>
It's the same thing I did, but turning the multiplication into a division of the divisor
<Kingsy>
yeah I don't understand that maths. :D :D
<paulapatience>
But again, if your intention is just printing the value appropriately rounded, use format with ~F
<reb>
,(* 100 2.225)
<ixelp>
(* 100 2.225) => 222.49998
Inline has joined #commonlisp
<reb>
2.225 does not have an exact representation
mesaoptimizer2 is now known as mesaoptimizer
<Kingsy>
no I know. but lets say I didnt know the value. it could be 2.25687, then you cant do this right? because you'll always be left over with more decimals. you'll still need to round it off which will go up or down because of fround
<Kingsy>
I don't see how * 100 or / 100 is doing anything helpful
cage has quit [Quit: rcirc on GNU Emacs 29.2]
<reb>
Kingsy: I think you need to explain *exactly* what you want. Are your values money?
<Kingsy>
reb: no they are temperatures.
<reb>
... and what's the purpose of rounding them?
<Kingsy>
so they don't need to be EXACT. but I wanted to kep them accurate to 2 decimal places after computing their average using a mean
<reb>
Why not just keep all the digits? Are you displaying a result for a human to read?
<Kingsy>
I am feeding them into a graphing lib down the line which seems to be fast with less points. also yes, nicer for a human to read.
<Kingsy>
but I suppose its turned into more of a general question as to how to round properly
<Kingsy>
format will likely be absolutely fine in my case.
keinbock has joined #commonlisp
<paulapatience>
It will work even if there are a million digits after the decimal point.
<paulapatience>
Try it out
<Kingsy>
ohhh beause of the round after the muliple.
<Kingsy>
anway I'll use format.
pve has quit [Quit: leaving]
<Kingsy>
oh I cant. the struct I have expects a double.
<sjl>
Huh, TIL format's ~F doesn't have to use banker's rounding, it's implementation specific
<sjl>
,(format nil "~,2F" 2.225r0)
<ixelp>
ERROR: Unbound variable: 2.225R0
<sjl>
Huh, guess the bot doesn't use (recentish) SBCL?
<sjl>
,(format nil "~,2F" 2225/1000)
<ixelp>
=> "2.22"
<sjl>
could legally produce 2.22 or 2.23
<sjl>
good to know
Guest52 has joined #commonlisp
eddof13 has quit [Quit: eddof13]
palter has joined #commonlisp
eddof13 has joined #commonlisp
<Mondenkind>
i wanna mandated correct rounding and ieee-754 for all float ops
<Kingsy>
how in the world isnt there just a set of macros in CL that just does a expt 10 by what you pass in then divide it by 100? usage (dec-round number 2) ?
fitzsim has quit [Read error: Connection reset by peer]
mariari has quit [Ping timeout: 268 seconds]
X-Scale has quit [Quit: Client closed]
<Kingsy>
can anyone think of a reason to not do that?!
fitzsim has joined #commonlisp
eddof13 has quit [Quit: eddof13]
Inline has quit [Ping timeout: 246 seconds]
Inline has joined #commonlisp
mariari has joined #commonlisp
tyson2 has quit [Read error: Connection reset by peer]
<Kingsy>
yeah that works nicely. still surprised I had to do that. some info one why this macro doesnt lready exist would be cool. seems like a no brainer
b00p has joined #commonlisp
<bjorkintosh>
Kingsy, they can't do everything for you, that's why the great language was created in the first place!
shka has quit [Ping timeout: 264 seconds]
thuna` has joined #commonlisp
phadthai_ is now known as phadthai
iNomad has quit [Quit: leaving]
kevingal has quit [Ping timeout: 268 seconds]
kevingal_ has joined #commonlisp
<Kingsy>
does anyone know of a json encoding library that allows passing in custom structs? seems that "jonathan" doesnt like it.
<paulapatience>
Kingsy: shasht, maybe jzon
wacki has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
kevingal_ has quit [Ping timeout: 264 seconds]
kevingal has joined #commonlisp
<Kingsy>
thanks
b00p has quit [Quit: b00p]
<Kingsy>
woah. paulapatience more rounding issues, so I have 1.44d0 shasht is printing it as -> 1.4399999999999996 <- what in the world....
aeth_ is now known as aeth
yitzi has quit [Remote host closed the connection]
<paulapatience>
1.44d0 cannot be represented exactly as a float
<gilberth>
Yes, but (/= 1.4399999999999996d0 1.44d0)
<ixelp>
GitHub - yitzchak/shasht: Common Lisp JSON reading and writing for the Kzinti.
<Kingsy>
you can reproduce with (shasht:write-json '(1 2.12d0 3))
<gilberth>
Usually double precision floating point numbers are assumed with JSON, so I would expect that when you ask for 1.44d0 to be printed you get that printed and not some other number.
<gilberth>
This is the culprit: (format nil "~,,,,,,'eE" value)
<Mondenkind>
gilberth: sbcl floating point reading is broken
<Mondenkind>
i never bothered to track it down. but it doesn't always round properly
<gilberth>
Mondenkind: Here that JSON writer is broken.
<gilberth>
1.4399999999999996 when read as double float is not the same bitpattern as 1.44d0
<Mondenkind>
just saying to be generally untrusting of the results you see
<gilberth>
We talk about the printer. They all use the same don't they? Besides I found no CL that has a working ~E.
<aeth>
wow, that's a new one for "there are so many JSON libraries and every JSON library gets something wrong"
rgherdt_ has joined #commonlisp
<aeth>
time to cons it to the list, I guess
<gilberth>
So I'd suggest something (with-standard-io-syntax (let ((*read-default-float-format* (type-of x))) (prin1 x stream)) Perhaps wrappend in (let ((x (if (floatp x) x (coerce x 'double-float))) ...)
<Kingsy>
woah this is kinda over my head :D not being doign common lisp long
<gilberth>
That would print your floats just fine. Using E as the exponent marker.
<Kingsy>
yeah I don't understand. maybe I just try some other libraries or something
<ixelp>
shasht/src/write.lisp at master · yitzchak/shasht · GitHub
<gilberth>
Or better yet. alwyas coerce to double. Will be safer even, when we assume that JSON uses double floats.
<Kingsy>
gilberth: well, I cant override it, I get -> https://bpa.st/TOLA <- I removed the value because its a huge object.
<ixelp>
View paste TOLA
<gilberth>
Like (defun render-float (value output-stream) (with-standard-io-syntax (let ((*read-default-float-format* 'double-float)) prin1 (coerce value 'double-float) output-stream)))) ;can't get simpler.
<Kingsy>
ok this is way way over my head. I am obviously using this in the wrong place. I'll just use something else. I am otally lost.
<gilberth>
Kingy: Is .. really that value, that indeed is no real. Where does this happen and why?
<Kingsy>
gilberth: no I just removed it because it was a huge object over hundreds of lines. its actually a struct
donleo has quit [Ping timeout: 255 seconds]
<gilberth>
Yes, and why was that passed to something wanting a REAL? You should look at where that happens. I bet it's completely unrelated.
<Kingsy>
I likely overrided the wrong function because I don't understand.
<Kingsy>
but yep ok
tyson2 has joined #commonlisp
dino_tutter has quit [Ping timeout: 255 seconds]
<Kingsy>
LOL. jonathan doesnt work either. different issue -> https://bpa.st/LWKA <- got to say this is frustrating
<ixelp>
View paste LWKA
rgherdt_ has quit [Quit: Leaving]
<gilberth>
Kingsy: Wrong package? And are you even supposed to have a new method for %TO-JSON? Is that symbol exported? Meant to be messed with? Are you holding it correctly?
<Kingsy>
gilberth: I ditched shasht and tried jonathan instead
<ixelp>
shasht/src/write.lisp at master · yitzchak/shasht · GitHub
<gilberth>
For that print-json-value method that you see there.
<Kingsy>
gilberth: you mean rather than it beign delcared as (defun render-float (value output-stream) <- it should be (defmethod print-json-value ((value number) output-stream) <- containing the body in your pastebin? nothing else is needed?!
<gilberth>
Just take the body of my function and make that the body of that method above. If this continues, I suggest we leave for #clschool Your troubles are of more basic struggle with CL.
<gilberth>
Yes.
<gilberth>
Or file a bug report with SBCL ;-)
<Kingsy>
alright. let me have a go
<Kingsy>
gilberth: we can go to clschool, but I am fairly sure I am doing what you are asking -> https://bpa.st/HMFQ
<ixelp>
View paste HMFQ
<gilberth>
Join me at #clschool this is getting off-topic.