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/>
mgl_ has quit [Ping timeout: 268 seconds]
AetherWind has joined #commonlisp
awlygj has quit [Ping timeout: 252 seconds]
shawnw has quit [Ping timeout: 264 seconds]
awlygj has joined #commonlisp
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 255 seconds]
awlygj has quit [Quit: Lost terminal]
shawnw has joined #commonlisp
CrashTestDummy2 has joined #commonlisp
CrashTestDummy has quit [Ping timeout: 264 seconds]
random-nick has quit [Ping timeout: 264 seconds]
CrashTestDummy has joined #commonlisp
CrashTestDummy2 has quit [Ping timeout: 252 seconds]
random-nick has joined #commonlisp
chomwitt has quit [Ping timeout: 268 seconds]
mon_key_phn has joined #commonlisp
<mon_key_phn> shawnw: re string-trim string designator Thx. makes sense now
<mon_key_phn> char: Calling Nil a symbol in this context is confusing. i get it, bit could easily have gone differently had an X3 corner cases it....
<mon_key_phn> cases / cased
<mon_key_phn> char: my present use case is string-trim in an inner loop, seems stupid/silly to have to: (null putative-string) just to test for NIL
<mon_key_phn> or more realistically (and (not (null putative-str)) (stringp putative-str) (string-trim '(#\ ) putative-str))
X-Scale has quit [Ping timeout: 250 seconds]
dcb has quit [Quit: MSN Messenger ZNC 1.8.2+deb2build5 - https://znc.in]
dcb has joined #commonlisp
random-nick has quit [Ping timeout: 268 seconds]
emaczen has quit [Ping timeout: 264 seconds]
kevingal has quit [Ping timeout: 256 seconds]
waleee has quit [Ping timeout: 268 seconds]
dcb has quit [Quit: MSN Messenger ZNC 1.8.2+deb2build5 - https://znc.in]
char has joined #commonlisp
<char> mon_key_phn: if stringp returns true, then its argument is not nil since nil is not a string.
<mon_key_phn> char: Obvious and thing is obvious
<mon_key_phn> obvious thing is obvious
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 264 seconds]
Inline has quit [Remote host closed the connection]
Inline has joined #commonlisp
rainthree has joined #commonlisp
wbooze has quit [Remote host closed the connection]
dcb has joined #commonlisp
dcb has quit [Client Quit]
char has quit [Ping timeout: 264 seconds]
dcb has joined #commonlisp
dcb has left #commonlisp [#commonlisp]
dcb has joined #commonlisp
josrr has quit [Remote host closed the connection]
amb007 has joined #commonlisp
ryanbw has quit [Ping timeout: 268 seconds]
ryanbw has joined #commonlisp
mon_key_phn has quit [Quit: Connection closed for inactivity]
shka has joined #commonlisp
jon_atack has joined #commonlisp
jonatack has quit [Ping timeout: 252 seconds]
chomwitt has joined #commonlisp
AetherWind has quit [Quit: leaving]
chomwitt has quit [Ping timeout: 260 seconds]
jonatack has joined #commonlisp
jon_atack has quit [Ping timeout: 268 seconds]
wacki has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
Pixel_Outlaw has quit [Quit: Leaving]
cmack` has joined #commonlisp
cmack has quit [Ping timeout: 240 seconds]
rainthree3 has joined #commonlisp
X-Scale has joined #commonlisp
subhuman has quit [Ping timeout: 268 seconds]
pve has joined #commonlisp
subhuman has joined #commonlisp
<subhuman> how can i condense this macro even more? https://0x0.st/XAp8.txt
<subhuman> i.e make it smaller
<beach> For one thing, you can eliminate MULTIPLE-VALUE-BIND with a single variable.
rainthree3 has quit [Quit: Leaving]
<subhuman> beach: Thanks
<subhuman> It's like this now (eql (sb-cltl2:variable-information var) :SPECIAL)
<beach> Right.
<subhuman> But I'm more curious on alternative ways of transforming the LET body
synchromesh has quit [Read error: Connection reset by peer]
synchromesh has joined #commonlisp
<beach> Do you mean the LET bindings rather than the body?
<beach> You seem to apply no transformations to the body.
<subhuman> This is another implementation I wrote using loop https://0x0.st/XApZ.txt
calamarium has quit [Read error: Connection reset by peer]
<subhuman> Yeah bindings
<beach> Right, I would go for the LOOP solution rather than invoking an external library.
akoana has joined #commonlisp
<subhuman> I kinda don't want to use the LOOP implementation thouigh
<subhuman> though**
<subhuman> Is there another way?
<subhuman> the SMALLEST possible
<beach> Why do you not want to use the LOOP implementation?
<beach> Also, what is the idea behind not wanting to bind special variables?
<subhuman> beach: Another native solution I wrote https://0x0.st/XApc.txt
<subhuman> Is there a native function in CL that's parallel to remove-if* in qlet-2?
<akoana> somehow strange in sbcl 2.2.9 repl: just entering (defun f1 () (expt 4 (expt 4 4))) works, but entering (defun f2 () (expt 4 (expt 4 (expt 4 4)))) never returns. On the other hand clisp shows its prompt immediately after having entered the second defun. (SBCL uses also almost 100% CPU)
<akoana> is this behavior just a bug and does not happen in later SBCL versions?
<subhuman> beach: I think I'll look at the map* primitives and see if I can make something decent out of them
<beach> subhuman: Plus, your names are misleading. It is not just because a variable is special that it is bound, and it is not just because a variable is lexical that it is unbound.
<beach> subhuman: You never answered my question about LOOP.
<subhuman> beach: I know
<subhuman> I just want to know if a variable is special
<beach> But that's not what your names suggest.
<subhuman> beach: Because they're lacking their appropriate context
<subhuman> The macro isn't in it's appropriate context
<subhuman> OH u mean the vars in multiple-value-bind
<subhuman> yeah whatever
<subhuman> I totally recognize that but I just wrote it like that out of convenience
<subhuman> I'll definitely change them
<beach> akoana: It might be that it is trying to compute the result at compile time, since the values are known, and it might be too much for the compiler to deal with.
<akoana> beach: thanks, that sounds plausible
<subhuman> beach: I don't want to use LOOP right now
<subhuman> I'll play around with the map* primitives
jon_atack has joined #commonlisp
<beach> I can't say I understand why you want to avoid LOOP, but that's your choice.
<beach> akoana: If you do (defun f2 (x) (expt 4 (expt 4 (expt 4 x)))) instead, it returns immediately, which supports my hypothesis.
jonatack has quit [Ping timeout: 264 seconds]
<akoana> beach: indeed, just before a monent i tried something similar :), thank you!
<beach> Sure.
<beach> subhuman: You also didn't tell me why you want to assign to the special variables rather than binding them.
<subhuman> beach: Do you not reckon I can get the same macroexpansion with the map* primitives?
<subhuman> My first intuition whenever I want to do transformations akin to this is to use map* primitives
<subhuman> That's why I'm temporarily abstaining from LOOP, may I say
<beach> subhuman: I don't know. I find the mapping functions useful when the function to be mapped already exists, but less readable than LOOP when a new anonymous function must be supplied.
nybble has quit [Ping timeout: 246 seconds]
donleo has joined #commonlisp
<subhuman> My logic is that if I can reasonably do the same with map* primitives then using LOOP is kinda too much for my tastes
<beach> *sigh*
<subhuman> Maybe I'll change in that regard along the line though
jrx has joined #commonlisp
<beach> subhuman: This is not a good way to reason about code.
<beach> subhuman: And again, you didn't tell us why you want to assign to the special variables rather than binding them.
<beach> ... so we still don't know the reason for the macro.
<beach> subhuman: The very name of the macro is misleading because it suggests that bindings are in effect for the code in the body, but in fact, the macro has side effects outside of the scope of the body.
<subhuman> That's what I want
<subhuman> I just named it like that out of convenience
<subhuman> I'll try to find the original problem that I had and you can take a look at it
<beach> I am not expressing myself very well...
dino_tutter has joined #commonlisp
<subhuman> I understand you
<beach> subhuman: You submit code for us to read, but you don't tell us the reason for its existence. Then the name of the macro is misleading and the names of your variables are misleading. Finally, you say you want the shortest solution, but we have to take into account some tastes of yours that you didn't initially mention.
<subhuman> This is why I wrote the macro: https://0x0.st/XT9c.txt
<subhuman> The original problem most likely requires a paradigm shift more than anything else but at the same time I believe all this is an exercise of what I can do with CL
<subhuman> I'm not a programmer by trade, more of a hobbyist
<beach> subhuman: I am sorry, but I am not going to read the code in that last paste in order to guess your reason for writing the macro.
Colleen has quit [Quit: Colleen]
Colleen has joined #commonlisp
<subhuman> You asked why so I provided
<subhuman> It's cool though
<beach> I was expecting an explanation rather than code using libraries I don't know. But it's fine.
<subhuman> I'll explain it now
<beach> subhuman: Oh, and your macro doesn't work. Try (let ((x 10)) (declare (special x)) (sb-cltl2:variable-information 'x))
<beach> You are not taking into account the environment.
valorzard has quit [Quit: Client closed]
<subhuman> beach: I've never touched environments and it's not my imperative to do so right now, I'd love to in the future though
<beach> But if you don't, you won't know whether a variable is special or not.
<subhuman> The reason I used `sb-cltl2:variable-information' is to check if a symbol was either a defvar or defparameter
<subhuman> If you know another way that's more suitable for my use-case then please do tell
wbooze has joined #commonlisp
rainthree has quit [Read error: Connection reset by peer]
attila_lendvai has joined #commonlisp
subhuman has quit [Ping timeout: 260 seconds]
<beach> In case someone is interested in implementing non-trivial floating-point mathematics functions in Common Lisp, we have an embryonic library for it, but most of the work is still to be done: https://github.com/s-expressionists/Buoy
<ixelp> GitHub - s-expressionists/Buoy: Embryonic floating-point library for Common Lisp
<beach> As the README says, the recommendation is to base the code on the core-math library.
<beach> A library like this could be very useful in that it would provide correctly rounded math functions for new and existing Common Lisp implementations.
X-Scale has quit [Quit: Client closed]
kevingal has joined #commonlisp
coat has left #commonlisp [#commonlisp]
coat has joined #commonlisp
coat has left #commonlisp [#commonlisp]
coat has joined #commonlisp
wacki has quit [Ping timeout: 264 seconds]
msv has quit [Remote host closed the connection]
wacki has joined #commonlisp
X-Scale has joined #commonlisp
mwnaylor has quit [Ping timeout: 268 seconds]
jonatack has joined #commonlisp
jon_atack has quit [Ping timeout: 256 seconds]
jonatack has quit [Ping timeout: 264 seconds]
jonatack has joined #commonlisp
STEEW is now known as steew
mgl_ has joined #commonlisp
Inline has quit [Remote host closed the connection]
Inline has joined #commonlisp
wbooze has quit [Remote host closed the connection]
mgl_ has quit [Ping timeout: 264 seconds]
wbooze has joined #commonlisp
dino_tutter has quit [Ping timeout: 268 seconds]
X-Scale has quit [Quit: Client closed]
random-nick has joined #commonlisp
waleee has joined #commonlisp
cmack` is now known as cmack
akoana has quit [Quit: leaving]
jon_atack has joined #commonlisp
jonatack has quit [Ping timeout: 264 seconds]
skeemer has quit [Ping timeout: 256 seconds]
Psybur has joined #commonlisp
synchromesh has quit [Read error: Connection reset by peer]
synchromesh has joined #commonlisp
mgl_ has joined #commonlisp
yitzi has joined #commonlisp
josrr has joined #commonlisp
<jackdaniel> what does it mean for the math function to be correctly rounded?
yitzi has quit [Remote host closed the connection]
<wbooze> yeh
<wbooze> there's c99 logic for rounding towards -inf or the others....
<beach> I expressed that wrong. It means that the result of applying them is the closest floating-point value that can be represented, to the real value.
<jackdaniel> I've gathered that much, but there are ambiguities to what does it mean to be closest to the real value; i.e specifying that float zeros are signed or not has an impact on that
<beach> According to the core-math people, this is not the case for many existing libraries.
<wbooze> yes, it's not
<jackdaniel> Marco Antoniotti proposed writing such specification for Common Lisp
<jackdaniel> at one of prior ELS
<ixelp> GitHub - marcoxa/CDR-LIA-SPEC: The main meeting point to discuss the CL-LIA specification.
josrr has quit [Remote host closed the connection]
rtypo has joined #commonlisp
dawids has joined #commonlisp
josrr has joined #commonlisp
zxcvz has joined #commonlisp
Psybur has quit [Read error: Connection reset by peer]
Psybur has joined #commonlisp
jon_atack has quit [Ping timeout: 268 seconds]
mgl_ has quit [Ping timeout: 252 seconds]
danse-nr3 has joined #commonlisp
rainthree has joined #commonlisp
kevingal has quit [Ping timeout: 264 seconds]
kevingal has joined #commonlisp
mgl_ has joined #commonlisp
susam has left #commonlisp [#commonlisp]
susam has joined #commonlisp
runxiyu is now known as Guest5141
Guest5141 has quit [Killed (zinc.libera.chat (Nickname regained by services))]
runxiyu_ has joined #commonlisp
runxiyu_ has quit [Remote host closed the connection]
runxiyu_ has joined #commonlisp
Psybur has quit [Ping timeout: 246 seconds]
Psybur has joined #commonlisp
chomwitt has joined #commonlisp
yitzi has joined #commonlisp
Psybur has quit [Ping timeout: 252 seconds]
Psybur has joined #commonlisp
skeemer has joined #commonlisp
mon_key_phn has joined #commonlisp
Psybur has quit [Ping timeout: 246 seconds]
Psybur has joined #commonlisp
dawids has quit [Remote host closed the connection]
Psybur has quit [Ping timeout: 268 seconds]
danse-nr3 has quit [Ping timeout: 264 seconds]
akovalenko has quit [Quit: ZNC 1.9.0 - https://znc.in]
cosimone has joined #commonlisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #commonlisp
akovalenko has joined #commonlisp
mgl_ has quit [Ping timeout: 255 seconds]
NotThatRPG has joined #commonlisp
pranav has quit [Remote host closed the connection]
lucasta has joined #commonlisp
gdsg has joined #commonlisp
danse-nr3 has joined #commonlisp
edgar-rft_ has joined #commonlisp
danse-nr3 has quit [Read error: Connection reset by peer]
danse-nr3 has joined #commonlisp
lucasta has quit [Remote host closed the connection]
edgar-rft has quit [Ping timeout: 268 seconds]
kevingal_ has joined #commonlisp
pranav has joined #commonlisp
cage has joined #commonlisp
jonatack has joined #commonlisp
synchromesh has quit [Read error: Connection reset by peer]
synchromesh has joined #commonlisp
X-Scale has joined #commonlisp
zxcvz has quit [Quit: zxcvz]
nybble has joined #commonlisp
pve has quit [Quit: leaving]
jrx has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.3)]
danse-nr3 has quit [Remote host closed the connection]
rainthree has quit [Quit: Leaving]
char has joined #commonlisp
kevingal_ has quit [Ping timeout: 264 seconds]
kevingal has quit [Ping timeout: 264 seconds]
ym has joined #commonlisp
Pixel_Outlaw has joined #commonlisp
pfdietz has joined #commonlisp
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 272 seconds]
Lord_of_Life_ is now known as Lord_of_Life
yitzi_ has joined #commonlisp
yitzi has quit [Ping timeout: 272 seconds]
Fuglesteg has joined #commonlisp
yitzi_ has quit [Remote host closed the connection]
yitzi has joined #commonlisp
Fuglesteg has quit [Changing host]
Fuglesteg has joined #commonlisp
Fuglesteg has quit [Quit: Client closed]
Fuglesteg has joined #commonlisp
valorzard has joined #commonlisp
X-Scale has quit [Ping timeout: 250 seconds]
mon_key_phn has quit [Quit: Connection closed for inactivity]
Inline has quit [Remote host closed the connection]
Inline has joined #commonlisp
wbooze has quit [Remote host closed the connection]
wbooze has joined #commonlisp
valorzard has quit [Quit: Client closed]
mgl_ has joined #commonlisp
valorzard has joined #commonlisp
mgl_ has quit [Ping timeout: 268 seconds]
ym has quit [Ping timeout: 268 seconds]
emaczen has joined #commonlisp
yitzi has quit [Remote host closed the connection]
mgl_ has joined #commonlisp
mgl_ has quit [Ping timeout: 252 seconds]
jonatack has quit [Ping timeout: 268 seconds]
varjag has joined #commonlisp
char has quit [Ping timeout: 264 seconds]
ocra8 has quit [Ping timeout: 252 seconds]
ocra8 has joined #commonlisp
valorzard has quit [Ping timeout: 250 seconds]
coat has left #commonlisp [#commonlisp]
calamarium has joined #commonlisp
synchromesh has quit [Read error: Connection reset by peer]
synchromesh has joined #commonlisp
kevingal has joined #commonlisp
kevingal_ has joined #commonlisp
rtypo has quit [Quit: WeeChat 4.3.2]
rtypo has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 29.3]
gorignak has quit [Quit: quit]
mwnaylor has joined #commonlisp
cosimone has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.2)]
wacki has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
dino_tutter has joined #commonlisp
shka has quit [Quit: Konversation terminated!]
mgl_ has joined #commonlisp
attila_lendvai has quit [Ping timeout: 246 seconds]
ocra8_ has joined #commonlisp
ocra8_ has quit [Max SendQ exceeded]
ocra8 has quit [Ping timeout: 264 seconds]
ocra8 has joined #commonlisp
ocra8 has quit [Max SendQ exceeded]
mgl_ has quit [Ping timeout: 255 seconds]
tfeb has joined #commonlisp
tfeb has quit [Quit: died]
Alfr has quit [Ping timeout: 268 seconds]
jweeks has joined #commonlisp
char has joined #commonlisp
char has left #commonlisp [#commonlisp]
char has joined #commonlisp
varjag has quit [Ping timeout: 268 seconds]
istewart has joined #commonlisp
valorzard has joined #commonlisp
reb has quit [Ping timeout: 268 seconds]
Bubblegumdrop has quit [Ping timeout: 240 seconds]
Bubblegumdrop has joined #commonlisp
dino_tutter has quit [Ping timeout: 240 seconds]
donleo has quit [Ping timeout: 264 seconds]
thuna` has quit [Remote host closed the connection]
Noisytoot has quit [Quit: ZNC 1.8.2 - https://znc.in]
Noisytoot has joined #commonlisp
thuna` has joined #commonlisp
flip214 has quit [Read error: Connection reset by peer]
flip214 has joined #commonlisp
samedi has joined #commonlisp
jonatack has joined #commonlisp
pyooque has joined #commonlisp
puke is now known as Guest79
Guest79 has quit [Killed (copper.libera.chat (Nickname regained by services))]
pyooque is now known as puke
puke has quit [Max SendQ exceeded]
puke has joined #commonlisp
igemnace has quit [Ping timeout: 252 seconds]
igemnace has joined #commonlisp
King_julian has joined #commonlisp
chomwitt has quit [Ping timeout: 256 seconds]
coat has joined #commonlisp
Alfr has joined #commonlisp