p_l changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | ASDF 3.3.4
torbo has joined #lisp
Unigurd has left #lisp ["ERC (IRC client for Emacs 25.2.2)"]
prince1 has joined #lisp
ebzzry has joined #lisp
ebzzry has quit [Remote host closed the connection]
ebzzry has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
|Pirx_off has left #lisp [#lisp]
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
Kundry_Wag has joined #lisp
lucasb has quit [Quit: Connection closed for inactivity]
iAmDecim has quit [Ping timeout: 256 seconds]
ebzzry has quit [Read error: Connection reset by peer]
Inline has quit [Ping timeout: 246 seconds]
igemnace has quit [Quit: WeeChat 2.7.1]
bitmapper has quit [Ping timeout: 265 seconds]
amerigo has quit [Quit: Connection closed for inactivity]
theBlack1ragon has left #lisp [#lisp]
theBlackDragon has joined #lisp
markong has quit [Ping timeout: 250 seconds]
aeth has quit [Ping timeout: 265 seconds]
aeth has joined #lisp
igemnace has joined #lisp
zaquest has quit [Ping timeout: 256 seconds]
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
ebzzry has joined #lisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
lonjil has quit [Remote host closed the connection]
ebzzry has quit [Read error: Connection reset by peer]
lonjil has joined #lisp
lonjil has quit [Remote host closed the connection]
ebzzry has joined #lisp
ebzzry has quit [Read error: Connection reset by peer]
lonjil has joined #lisp
space_otter has joined #lisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
gko has joined #lisp
Bourne has quit [Ping timeout: 256 seconds]
orivej has quit [Quit: No Ping reply in 180 seconds.]
Tordek has quit [Ping timeout: 264 seconds]
orivej has joined #lisp
Oladon has joined #lisp
amerlyq has joined #lisp
Tordek has joined #lisp
lxbarbosa has joined #lisp
vert2 has quit [Ping timeout: 240 seconds]
vert2 has joined #lisp
Tordek has quit [Ping timeout: 264 seconds]
Tordek has joined #lisp
Tordek has quit [Ping timeout: 256 seconds]
Tordek has joined #lisp
ebzzry has joined #lisp
vert2 has quit [Ping timeout: 256 seconds]
vert2 has joined #lisp
Tordek has quit [Ping timeout: 256 seconds]
ebzzry has quit [Remote host closed the connection]
Tordek has joined #lisp
ebzzry has joined #lisp
<beach> Good morning everyone!
bmansurov has joined #lisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
ebzzry has quit [Read error: Connection reset by peer]
efm_ has joined #lisp
efm_ has quit [Client Quit]
shinzo has joined #lisp
terpri_ has quit [Remote host closed the connection]
terpri_ has joined #lisp
ebzzry has joined #lisp
ebzzry_ has joined #lisp
ebzzry has quit [Remote host closed the connection]
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
prince1 has quit [Ping timeout: 256 seconds]
shinzo has left #lisp [#lisp]
v88m has joined #lisp
ArthurStrong has quit [Quit: leaving]
Lycurgus has joined #lisp
ebzzry_ has quit [Read error: Connection reset by peer]
lxbarbos` has joined #lisp
hiredman_ has left #lisp [#lisp]
hiredman has joined #lisp
lxbarbosa has quit [Ping timeout: 272 seconds]
ebzzry_ has joined #lisp
orivej_ has joined #lisp
ebzzry_ has quit [Remote host closed the connection]
orivej has quit [Read error: Connection reset by peer]
ebzzry_ has joined #lisp
pilne has quit [Quit: Hello, 911? Yeah, it's caught in the window this time.]
vivit has quit [Ping timeout: 264 seconds]
orivej_ has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
vivit has joined #lisp
vivit has quit [Changing host]
vivit has joined #lisp
<beach> vivit: Yes, I am sorry. You are right. The Common Lisp HyperSpec uses the term "accessible".
elderK has quit [Quit: WeeChat 1.9]
<beach> vivit: I am not sure you got a good answer, but the initform is executed before the instance is created, and accessing the slot either with SLOT-VALUE or a slot reader requires access to the instance. That's why you can't refer to a slot in the initform.
Bike has quit [Quit: Lost terminal]
space_otter has quit [Remote host closed the connection]
space_otter has joined #lisp
gravicappa has joined #lisp
narimiran has joined #lisp
sz0 has quit [Quit: Connection closed for inactivity]
iAmDecim has joined #lisp
Kundry_Wag has joined #lisp
Oladon has quit [Quit: Leaving.]
akoana has joined #lisp
Kundry_Wag has quit [Ping timeout: 256 seconds]
iAmDecim has quit [Ping timeout: 265 seconds]
dddddd has quit [Ping timeout: 265 seconds]
Kundry_Wag has joined #lisp
Lycurgus has quit [Remote host closed the connection]
Kundry_Wag has quit [Ping timeout: 240 seconds]
oxum has quit [Quit: Leaving...]
akoana has quit [Ping timeout: 256 seconds]
sauvin has joined #lisp
jonatack__ has joined #lisp
akoana has joined #lisp
jonatack_ has quit [Ping timeout: 256 seconds]
vlatkoB has joined #lisp
amerigo has joined #lisp
akoana has left #lisp ["Leaving"]
torbo has quit [Remote host closed the connection]
GeissT has quit [Ping timeout: 264 seconds]
tephra has joined #lisp
jprajzne has quit [Quit: jprajzne]
dilated_dinosaur has joined #lisp
random-nick has joined #lisp
GeissT has joined #lisp
lxbarbos` has quit [Ping timeout: 250 seconds]
jprajzne has joined #lisp
sz0 has joined #lisp
Kundry_Wag has joined #lisp
sonologico__ has quit [Quit: Leaving]
Kundry_Wag has quit [Ping timeout: 265 seconds]
PuercoPope has quit [Ping timeout: 250 seconds]
Cymew has joined #lisp
ggole has joined #lisp
no-defun-allowed has quit [Quit: killed]
LdBeth has quit [Quit: killed]
Gnuxie[m] has quit [Quit: killed]
infra_red[m] has quit [Quit: killed]
katco has quit [Quit: killed]
unl0ckd has quit [Quit: killed]
amnesic[m] has quit [Quit: killed]
Jachy has quit [Quit: killed]
liambrown has quit [Quit: killed]
zaquest has joined #lisp
zaquest has quit [Quit: Leaving]
zaquest has joined #lisp
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
hhdave has joined #lisp
catalinbostan has quit [Quit: Textual IRC Client: www.textualapp.com]
Codaraxis has quit [Read error: Connection reset by peer]
ebzzry_ has quit [Read error: Connection reset by peer]
Codaraxis has joined #lisp
dale has quit [Quit: My computer has gone to sleep]
iAmDecim has joined #lisp
spainisnotequal has joined #lisp
iAmDecim has quit [Ping timeout: 256 seconds]
iAmDecim has joined #lisp
spainisnotequal has quit [Ping timeout: 240 seconds]
Tomsze has joined #lisp
notzmv has quit [Ping timeout: 258 seconds]
Tomsze has quit [Client Quit]
notzmv has joined #lisp
ski has quit [Read error: Connection reset by peer]
vivit has quit [Ping timeout: 258 seconds]
ebzzry_ has joined #lisp
infra_red[m] has joined #lisp
Jachy has joined #lisp
liambrown has joined #lisp
unl0ckd has joined #lisp
LdBeth has joined #lisp
amnesic[m] has joined #lisp
Gnuxie[m] has joined #lisp
no-defun-allowed has joined #lisp
katco has joined #lisp
sz0 has quit []
sz0 has joined #lisp
dreamcompiler has quit [Read error: Connection reset by peer]
dreamcompiler has joined #lisp
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
ebzzry_ has quit [Remote host closed the connection]
ebzzry_ has joined #lisp
amerlyq has quit [Remote host closed the connection]
space_otter has quit [Remote host closed the connection]
ebzzry has joined #lisp
ebzzry_ has quit [Remote host closed the connection]
Lord_of_Life has quit [Ping timeout: 250 seconds]
Lord_of_Life has joined #lisp
Ven`` has joined #lisp
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
jayspeer has joined #lisp
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
dirty_rebooter[m has joined #lisp
ArthurStrong has joined #lisp
cosimone has joined #lisp
dirty_rebooter[m has left #lisp [#lisp]
karlosz has quit [Quit: karlosz]
karlosz has joined #lisp
karlosz has quit [Remote host closed the connection]
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
KDr24 has joined #lisp
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
KDr23 has quit [Ping timeout: 265 seconds]
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
ebzzry has quit [Read error: Connection reset by peer]
jello_pudding has quit [Ping timeout: 240 seconds]
dddddd has joined #lisp
markong has joined #lisp
ljavorsk has joined #lisp
jayspeer has quit [Quit: see you guys! I'm going back to work which means vpn - and freenode does not like connections from aws]
markoong has joined #lisp
ebzzry has joined #lisp
rippa has joined #lisp
markong has quit [Ping timeout: 260 seconds]
ym has joined #lisp
jello_pudding has joined #lisp
vanjulio has joined #lisp
markong has joined #lisp
vanjulio has quit [Remote host closed the connection]
ArthurStrong has quit [Quit: leaving]
vanjulio has joined #lisp
markoong has quit [Ping timeout: 265 seconds]
Bourne has joined #lisp
vanjulio has quit [Remote host closed the connection]
vanjulio has joined #lisp
vanjulio has quit [Remote host closed the connection]
cosimone_ has joined #lisp
markoong has joined #lisp
davepdotorg has joined #lisp
shka_ has joined #lisp
shka_ has quit [Client Quit]
markong has quit [Ping timeout: 264 seconds]
ljavorsk has quit [Read error: Connection reset by peer]
Kundry_Wag has joined #lisp
ebzzry has quit [Remote host closed the connection]
ljavorsk has joined #lisp
ljavorsk_ has joined #lisp
Kundry_Wag has quit [Ping timeout: 264 seconds]
ljavorsk has quit [Ping timeout: 256 seconds]
ebzzry has joined #lisp
Bourne` has joined #lisp
Bourne has quit [Ping timeout: 256 seconds]
Bourne` has quit [Remote host closed the connection]
ljavorsk_ has quit [Ping timeout: 256 seconds]
cosimone_ has quit [Quit: Quit.]
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
Inline has joined #lisp
shka_ has joined #lisp
<lonjil> anyone here ever read any of the books by Nils M. Holm? He has a few lisp books and I was thinking of maybe buying some of them, because the topics seem interesting.
<ecraven> I've read some, I found them interesting
<ecraven> hm.. I think I just mistook nils holm for doug hoyt
ebzzry has quit [Remote host closed the connection]
<jcowan> He's the Scheme 9 from Empty Space implementer
<ecraven> ah, right, tx3.org.. I looked at the books a few weeks ago, I thought lisp system implementation looked interesting
<jcowan> The tree-walker implementation was very very pretty, a textbook example of how to write such a thing in a low-level language. I haven't looked at the code for the bytecode version, though
<lonjil> Yeah, that's the main one I was thinking of buying.
<jcowan> At least he doesn't make you play Adventure to get to the source code any more.
cosimone has quit [Remote host closed the connection]
<no-defun-allowed> Or to save you some time, https://irclog.tymoon.eu/freenode/%23lisp?around=1560226867 is a participant's first impressions of the book.
<lonjil> ty
cosimone has joined #lisp
<no-defun-allowed> Then https://irclog.tymoon.eu/freenode/%23lisp?around=1574749037 was written some time after.
v0|d has joined #lisp
<no-defun-allowed> "it is basically just the commented code of one particular implementation" would be a good summary of all that.
markong has joined #lisp
markoong has quit [Ping timeout: 256 seconds]
<jcowan> But one specifically written with intelligibility rather than speed or space in mind.
Bike has joined #lisp
ebzzry has joined #lisp
bitmapper has joined #lisp
<phoe> I am working on a tutorial for the Lisp condition system
<phoe> ...and it slowly becomes less and less of an article and more and more of a book
<Bike> got any exotic trix?
<Bike> lifehacks? i only started doing anything complicated for clasp's compiler...
<splittist> pheo: I'll buy it (:
<splittist> phoe, even
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
efm has joined #lisp
prince1 has joined #lisp
cosimone has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
achillesp has joined #lisp
prince1 has quit [Ping timeout: 256 seconds]
<Xach> i use conditions for the quicklisp client progress bar
<jcowan> Nice!
<Xach> the idea was that a frontend could handle it sooner and display a nicer one if they liked.
<Xach> (nobody has done that yet)
<Xach> could have been done with callbacks or something else, i wanted to do it with conditions and it works fine.
<lonjil> nice
<phoe> Bike: not really, it's a very basic tutorial
<phoe> I start with a dynavar tutorial since it's required, and only then implement a hook system with dynavars
<phoe> and then reimplement the hook system via conditions
<phoe> I'm kinda comfortable with sharing it now since it's kinda-60%-complete at the moment, https://gist.github.com/phoe/5659f8e5d8ff85e99565de17e39e4449
Ven`` has joined #lisp
<phoe> I'll be happy to fix any bugs you happen to find along the way
<phoe> splittist: tempting
Bourne has joined #lisp
<eeeeeta> what's the difference between a VECTOR and a SIMPLE-ARRAY? I thought they were the same...
<eeeeeta> ; Evaluation aborted on #<TYPE-ERROR expected-type: (SIMPLE-ARRAY (UNSIGNED-BYTE 8))
<eeeeeta> datum: #<(VECTOR (UNSIGNED-BYTE 8) 128) {100574862F}>>.
<beach> eeeeeta: A SIMPLE-ARRAY can have several dimensions.
<beach> eeeeeta: A VECTOR only 1.
<eeeeeta> beach, so why is a VECTOR not a SIMPLE-ARRAY?
<phoe> eeeeeta: not all vectors are simple-arrays
<phoe> e.g. vectors will fill pointers aren't simple-arrays
<beach> eeeeeta: Furthermore a VECTOR can be non-simple ARRAY.
heisig has joined #lisp
<eeeeeta> but I didn't make this one with a fill pointer!
<phoe> "The type of an array that is not displaced to another array, has no fill pointer, and is not expressly adjustable is a subtype of type simple-array."
<eeeeeta> it was literally made with:
<eeeeeta> (out (make-array len
<eeeeeta> :initial-element 0
<eeeeeta> :element-type '(unsigned-byte 8))))
<beach> phoe: That is not necessarily true.
<phoe> beach: oh?
<phoe> eeeeeta: (typep (make-array 10 :initial-element 0 :element-type '(unsigned-byte 8)) 'simple-array) ;=> T
<phoe> (type-of (make-array 10 :initial-element 0 :element-type '(unsigned-byte 8))) ;=> (SIMPLE-ARRAY (UNSIGNED-BYTE 8) (10))
<beach> phoe: You are turning the implication arrow incorrectly.
<eeeeeta> oh wait I'm an idiot
<eeeeeta> it might actually be a vector
<phoe> beach: one second, which implication arrow
<eeeeeta> yeah, it's the output of FLEXI-STREAMS:GET-OUTPUT-STREAM-SEQUENCE
<eeeeeta> which probably isn't a simple array
<eeeeeta> time for a COERCE
<Bike> the implication is that an array with no fill pointer is a simple array, not that simple arrays don't have fill pointers
<phoe> OK - got it now, thanks
<beach> phoe: "The type of an array that is not displaced to another array, has no fill pointer, and is not expressly adjustable is a subtype of type simple-array."
<eeeeeta> ah crap
<eeeeeta> I apparently can't convert a vector to a SIMPLE-ARRAY with COERCE
<Bike> simple-array is too vague. try (simple-array * (*))
<eeeeeta> I did (simple-array (unsigned-byte 8))
<phoe> (coerce (vector 1 2 3) 'simple-array) ;=> #(1 2 3)
<eeeeeta> '(simple-array (unsigned-byte 8)))))
<eeeeeta> (coerce (flexi-streams:get-output-stream-sequence stream)
<eeeeeta> gives me
<eeeeeta> datum: #<(VECTOR (UNSIGNED-BYTE 8) 128) {10027F555F}>>.
<eeeeeta> ; Evaluation aborted on #<SIMPLE-TYPE-ERROR expected-type: (SIMPLE-ARRAY (UNSIGNED-BYTE 8))
<eeeeeta> wait no
<eeeeeta> sorry, wrong error
<eeeeeta> wait, no, that was the error
<Bike> you should specify that you want a vector.
<Bike> like (simple-array (unsigned-byte 8) (*))
<_death> better yet, you should patch flexi-streams
<heisig> I have my first Petalisp user on Windows. Now he has the problem that "character: Return" is an unknown format directive.
<eeeeeta> Bike, it worked, thank you! what's the extra (*) for?
<Xach> heisig: ouch
<Bike> it indicates that the array has exactly one dimension, i.e. is an array.
<Bike> er
<Bike> is a vector
<Bike> being smart this morning
<heisig> Does anyone know a good fix for that problem. Is that known?
<heisig> The problem is due to multiline format strings that end in "~"
<eeeeeta> ah right, thanks :)
<phoe> heisig: aaah, are you hit by CRLF?
<heisig> phoe: Exactly.
<phoe> poke the implementation
<phoe> tilde newline should work even on CRLF systems
<phoe> ......if you are on Windows, that is? sigh
<Xach> sbcl!
<heisig> Yes, my student is using SBCL on Windows.
achillesp has quit [Remote host closed the connection]
davepdotorg has quit [Remote host closed the connection]
davepdotorg has joined #lisp
<phoe> minimal reproducible test case it is, then, and #sbcl
<MichaelRaskin> And I guess in the short term the student will just run a line-end conversion on the source files
xkapastel has joined #lisp
<Shinmera> heisig: configure the editor to force LF, and configure git to stop its crlf conversion nonsense
<Shinmera> SBCL will not do anything about this
<phoe> that is also a very good option
<_death> better just to patch sbcl.. good exercise for a student
SGASAU` has joined #lisp
<Shinmera> Such a patch is non-trivial and from past conversations about CRLF stuff I do not believe it would be easily accepted either.
<Shinmera> Better to just save the headache altogether with this and all other projects by nuking CRLF from orbit.
<_death> do any other implementations implement a Tilde Return extension?
<Shinmera> The issue is with CRLF not being seen as #\Newline.
cartwright has quit [Ping timeout: 240 seconds]
<Bike> "et's get used to the fact that dynamic variables have a dynamic_ name infix" seems like a prefix, phoe
acolarh has quit [Ping timeout: 260 seconds]
SGASAU has quit [Remote host closed the connection]
gxt has quit [Ping timeout: 240 seconds]
<jcowan> phoe: "When a lexical scope ends, the variables defined in it are discarded." is incorrect because closures. I suggest "A lexical variable can't be seen outside its scope".
<Xach> i found cltl2's description of scopes helpful in this regard.
<phoe> jcowan: fixed, thanks
<jcowan> It's true in C, of course, because no closures.
efm has quit [Quit: Konversation terminated!]
jonatack__ has quit [Quit: jonatack__]
jonatack has joined #lisp
<jcowan> "A situation is the evaluation of an expression in a specific context." I know that comes from the ANS, but IMO it is unfortunate. _Situation_ is not really a technical term: it bears its usual meaning of a state of affairs or. a set of circumstances.
Kundry_Wag has quit [Ping timeout: 240 seconds]
<phoe> lemme change it
<phoe> the original ANS quote is unchanged, but the para below becomes:
<phoe> "In this context, a *situation* is not really a technical term: it bears its usual meaning of a state of affairs or a set of circumstances. To reword the above statement slightly in our context: *handlers* contain the actual code for hooks. The action of invoking the hooks is called *signaling*. *Conditions* are the objects that may trigger some of the hooks when they are signaled, allowing handlers to access
<phoe> arbitrary *data* that is a part of the given condition that was signaled."
<phoe> does it sound better?
cartwright has joined #lisp
ljavorsk has joined #lisp
gxt has joined #lisp
efm_ has joined #lisp
Lycurgus has joined #lisp
hhdave_ has joined #lisp
hhdave has quit [Ping timeout: 256 seconds]
hhdave_ is now known as hhdave
<scymtym> heisig: i started a patchset for SBCL which adds end-of-line encodings to external formats but other things got in the way of finishing it. luis started helping at some later point but we still couldn't finish it yet
acolarh has joined #lisp
<heisig> scymtym: That would be great! But it is also not too urgent. For now, my student is using the Windows Subsystem for Linux to run the Linux version of everything.
<heisig> The problem with the line endings got even weirder, because I couldn't even reproduce it on my Windows 7 machine.
<heisig> So I cannot even submit a bug report.
<phoe> hope he uses WSL2; I remember that SBCL had various assorted EWONTFIX failures under WSL1
<scymtym> heisig: understood. i have seen problems with SIGNAL when using SBCL on WSL
<Shinmera> heisig: it's probably git converting the line endings on his machine.
felideon_ has quit [Remote host closed the connection]
<heisig> Shinmera: Aah, that could be the case. He was using some weird git GUI.
felideon has joined #lisp
<Shinmera> it's a feature that I think is enabled on git for windows by default for whatever reason. I've gotten bug reports from that behaviour too.
<heisig> Ouch!
<Shinmera> Yeah, love it when software mangles my files for no reason.
amerlyq has joined #lisp
<heisig> Shinmera: That sounds like it could have been the problem. I will check with him.
<heisig> Thanks everyone for the help!
asdfjkl has joined #lisp
ljavorsk has quit [Ping timeout: 256 seconds]
amerlyq has quit [Client Quit]
amerlyq has joined #lisp
<phoe> jcowan: anything more?
<phoe> I've fixed your remarks so far
amerlyq has quit [Quit: amerlyq]
amerlyq has joined #lisp
amerlyq has quit [Client Quit]
amerlyq has joined #lisp
iAmDecim has quit [Ping timeout: 265 seconds]
ebzzry has quit [Read error: Connection reset by peer]
prince1 has joined #lisp
efm_ has quit [Quit: Konversation terminated!]
Kundry_Wag has joined #lisp
prince1 has quit [Ping timeout: 256 seconds]
amerlyq has quit [Quit: amerlyq]
amerlyq has joined #lisp
<phoe> beach: if you have the time, I would also like your review on https://gist.github.com/phoe/5659f8e5d8ff85e99565de17e39e4449. You can skip the first chapter completely.
<phoe> It's not yet complete, but I'll write the last parts tomorrow or something.
Kundry_Wag has quit [Ping timeout: 256 seconds]
<pjb> phoe: note that catch/throw take any lisp object. Therefore you could implement a condition system allowing any lisp object to be thrown.
<pjb> phoe: but as you can see, the problem is that you need to know the object that will be thrown, before you throw it, to be able to catch it.
<pjb> phoe: also, since catch uses eq, you cannot catch numbers, which may be un-eq to themselves.
<pjb> or characters.
<beach> phoe: Sure, I'll have a look.
<phoe> pjb: yes, that's what I inferred from what Bike said too.
<phoe> pjb: wait a second, I can catch numbers just fine
<pjb> phoe: nope, you can't.
davepdotorg has quit [Remote host closed the connection]
<phoe> I think you mixed up catch tags with the values that are actually thrown/caught
<phoe> catch tags are checked via EQ
sulami has joined #lisp
<pjb> (catch (+ most-positive-fixnum 1) (throw (+ most-positive-fixnum 1) 0)) #| ERROR: Can't throw to tag 1152921504606846976 |#
<phoe> but AFAIK I can throw any Lisp datum
davepdotorg has joined #lisp
<phoe> oh yes, you meant tags
<phoe> yes, that is correct, tags need to be EQ-comparable
whiteline has quit [Remote host closed the connection]
<Bike> most condition implementations use return-from rather than throw, i think.
<phoe> yes, they use tagbody/go
<pjb> Yes, if you base it on types or classes instead of the object themselves. Also dynamic/lexical.
whiteline has joined #lisp
<phoe> I used throw/catch because it's less messy to show; I don't need to define macros that wrap tagbody/go into nice and clean syntax.
<Bike> fair enough
<phoe> sure, it's a much bigger footgun than tagbody/go, but also one that is simpler to implement in actual code
<phoe> I don't want to write a tagbody/go-wraping macro only to then need to explain that macro
<phoe> that'd defeat the purpose of my tutorial
<Bike> i like that csv one, too. especially since it has handlers that don't handle, which is a subtle point, and handlers that affect the condition
<Bike> might also wanna cover resignaling
<Bike> in clasp i have to do something similar - handle arbitrary conditions from macroexpanders by signaling a new condition that has source information attached
davepdotorg has quit [Ping timeout: 256 seconds]
whiteline_ has joined #lisp
whiteline has quit [Read error: Connection reset by peer]
<phoe> yes, the CSV one takes a different approach from me - it's shorter and more concrete
<phoe> that's why I've linked it there, too
peterhil has quit [Read error: Connection reset by peer]
asdfjkl has quit [Ping timeout: 250 seconds]
<phoe> beach: thanks.
peterhil has joined #lisp
<beach> phoe: I'll do it incrementally.
<phoe> beach: no problem. If possible, please write down the notes in some text document first.
Lycurgus has quit [Remote host closed the connection]
<beach> Hmm, OK.
<phoe> I'll be on and off today, so sending them via IRC might not be the best idea.
<beach> I see, yes.
Kundry_Wag has joined #lisp
sarna has joined #lisp
<phoe> FYI: If anyone'd else like to read it, I'm all up for hearing comments.
whiteline_ has quit [Quit: Leaving]
iAmDecim has joined #lisp
pilne has joined #lisp
heisig has quit [Quit: Leaving]
Kundry_Wag has quit [Remote host closed the connection]
whiteline has joined #lisp
Kundry_Wag has joined #lisp
Cymew has quit [Ping timeout: 264 seconds]
cosimone has joined #lisp
orivej has quit [Ping timeout: 256 seconds]
spainisnotequal has joined #lisp
iAmDecim has quit [Ping timeout: 256 seconds]
sjl has quit [Quit: WeeChat 2.2-dev]
efm has joined #lisp
mseddon has joined #lisp
efm has quit [Ping timeout: 240 seconds]
Bourne has quit [Remote host closed the connection]
choegusung has joined #lisp
dreamcompiler has quit [Quit: dreamcompiler]
davepdotorg has joined #lisp
orivej has joined #lisp
<jcowan> phoe: probably, but in mtg
<phoe> mtg?
whiteline has quit [Quit: Leaving]
<_death> maybe "meeting"
<phoe> Oooh - I see
<phoe> no rush
whiteline has joined #lisp
ym has quit [Ping timeout: 256 seconds]
Bourne has joined #lisp
spainisnotequal has quit [Remote host closed the connection]
shka_ has quit [Ping timeout: 256 seconds]
jprajzne has quit [Quit: Leaving.]
iAmDecim has joined #lisp
ym has joined #lisp
Bourne has quit [Read error: Connection reset by peer]
iAmDecim has quit [Ping timeout: 256 seconds]
Bourne has joined #lisp
* phoe initially thought about Magic: the Gathering
sulami has quit [Remote host closed the connection]
sulami has joined #lisp
<_death> monday/tuesday/grumbleday
<phoe> monday, incfmonday, incfincfmonday
shinohai has quit [Ping timeout: 264 seconds]
sulami has quit [Ping timeout: 264 seconds]
wsinatra has joined #lisp
<MichaelRaskin> phoe: not sure how the side-effects stack here! Shouldn't you just use 1+ ?
<phoe> correct
gko has quit [Ping timeout: 256 seconds]
TwoNotes has joined #lisp
sulami has joined #lisp
shinohai has joined #lisp
sulami has quit [Ping timeout: 240 seconds]
iAmDecim has joined #lisp
CrazyEddy has quit [Ping timeout: 265 seconds]
heisig has joined #lisp
shinohai has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #lisp
prince1 has joined #lisp
xaotuk has joined #lisp
FreeBirdLjj has quit [Ping timeout: 272 seconds]
prince1 has quit [Ping timeout: 264 seconds]
iAmDecim has quit [Ping timeout: 258 seconds]
sulami has joined #lisp
orivej_ has joined #lisp
orivej has quit [Read error: Connection reset by peer]
Inline has quit [Ping timeout: 246 seconds]
sulami has quit [Ping timeout: 264 seconds]
shinohai has joined #lisp
iAmDecim has joined #lisp
asdfjkl has joined #lisp
EvW has joined #lisp
sjl has joined #lisp
heisig has quit [Ping timeout: 258 seconds]
karstensrage_ has left #lisp [#lisp]
hhdave has quit [Ping timeout: 258 seconds]
sjl_ has joined #lisp
sulami has joined #lisp
hhdave has joined #lisp
karlosz has joined #lisp
hhdave has quit [Ping timeout: 258 seconds]
slyrus has joined #lisp
sulami has quit [Ping timeout: 250 seconds]
CrazyEddy has joined #lisp
heisig has joined #lisp
rumbler31 has quit [Read error: Connection reset by peer]
rumbler3_ has joined #lisp
hiroaki has quit [Ping timeout: 240 seconds]
sulami has joined #lisp
jprajzne has joined #lisp
choegusung has left #lisp [#lisp]
Bourne has quit [Ping timeout: 240 seconds]
heisig has quit [Quit: Leaving]
jonatack_ has joined #lisp
<eeeeeta> is there some kind of CL Gray Stream that literally just counts the number of bytes written to it and throws away the data?
Ven`` has quit [Quit: Textual IRC Client: www.textualapp.com]
jonatack has quit [Ping timeout: 265 seconds]
hiroaki has joined #lisp
<Xach> eeeeeta: not premade that i know of.
<phoe> eeeeeta: you can write one rather trivially
<phoe> I have a joke^Wtotally serious gray stream project at https://github.com/phoe/quicklisp-quackload/blob/master/quicklisp-quackload.lisp that you can modify
<Xach> quackload
<phoe> you can add a (counter :accessor counter :initform 0) to the stream and modify STREAM-WRITE-CHAR to (incf (counter stream))
<phoe> then, just fetch the value of (counter stream) when you're done quackin^Wwriting to the stream
<phoe> Xach: quack
<phoe> also you might want to edit stream-write-char to stream-write-byte
<phoe> if you want byte stream, that is
iAmDecim has quit [Ping timeout: 260 seconds]
pilne_ has joined #lisp
pilne has quit [Ping timeout: 240 seconds]
<Xach> _death: do you have a .deb i can use for libhspell.so?
<Xach> a dockerfile to generate one would be fine too
<phoe> ;; rant: why the hell does hspell on debian only provide an .a file and not a .so file
iAmDecim has joined #lisp
<_death> Xach: I don't use debian (except on my server) so not familiar with how to make .deb files.. I can provide you with the x86_64 binary I use
<Xach> i don't use debian except on my server too
<_death> did you have trouble generating a shared object?
<Xach> _death: hmm, a build shell script would be handy too. i had one but lost it. just something that builds the .so would be fine.
<Xach> _death: yes, you have to patch something or other to make it work and i lost the recipe.
<Xach> i want to keep hspell but it is a minor pain and i want to push it off on its only user :)
<_death> if I'm the only user then it's ok to remove from quicklisp
karlosz has quit [Quit: karlosz]
<Xach> I don't have any way to tell
<_death> what are the download stats?
<Xach> Oh, I guess I could check those
<Xach> I haven't been looking closely at those in a year or two
<Xach> _death: when you set up a new computer and want to use hspell, do you copy your binary or get it some other way?
sauvin has quit [Read error: Connection reset by peer]
<_death> well, I compiled hspell back then in 2018 when I set up the debian server (and before, but that was an archlinux server)
<Xach> ah, so the solution is "don't set up new computers"?
<_death> I just tried downloading the latest release and ./configure --enable-shared ; make
<Xach> hmm
<Xach> is there a make install?
<_death> but it has some perl issue, and I really dislike mucking about with perl ;)
<jackdaniel> solution is just a hack away
<jackdaniel> I'm sure that a character ‰ will be involved
<_death> also, I just updated my system so maybe it's a transient issue
<phoe> jackdaniel: the issue with "solution is just a hack away" is the possibility of infinite recursion
<phoe> both when trying to evaluate "hack" and when trying to evaluate "solution"
* jackdaniel stares blankly at phoe
* phoe stares blankly at jackdaniel
asdfjkl has quit [Remote host closed the connection]
<Xach> _death: same perl issue here. boo
<_death> ok, solved that by changing require "PrefixBits.pl" to require "./PrefixBits.pl" in pmerge and genprefixes.pl
<_death> then it built an .so
prince1 has joined #lisp
<Xach> could that be done via environment?
<_death> web search suggests export PERL5LIB=. may work
<_death> seems it does
sonologico has joined #lisp
prince1 has quit [Ping timeout: 258 seconds]
xaotuk has quit [Ping timeout: 264 seconds]
cosimone has quit [Quit: Terminated!]
<Xach> ok. i will try to use this to make a durable deb
<LdBeth> good morning
<_death> Xach: I will add instructions to the readme
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
jprajzne has quit [Client Quit]
jprajzne has joined #lisp
<jcowan> I do not understand the ANS definition of define-modify-macro. It seems to be warning against implementing it in such a way that forms in the reference as well as in the function call must be evaluated only once.
<jcowan> But setf says that what the place reference does with its subforms is totally up to it; they might not even be evaluated.
<Bike> define-modify-macro uses an actual function call, and the arguments there are of course evaluated
sulami has quit [Ping timeout: 240 seconds]
<Bike> hmm let me check actually
<Bike> ah. right right okay. so the problem is reference (i.e. the variable in the "except for the issue" definition). it's saying any subforms of reference have to be evaluated only once.
<Bike> if the exact code there was used, they'd be evaluated twice - once as the function call, and once whatever the setf expansion does
<Bike> once IN the function call, i mean
mseddon has quit [Read error: Connection reset by peer]
<Bike> For example, if you define new-incf with the "except for" definition, and then do (new-incf (car (print x))), it will print x twice
<Bike> define-modify-macro avoids this by taking the setf expansion of reference and using the reader form ot get the argument to the function, rather than using the form directly.
<Bike> make sense?
ggole has quit [Quit: Leaving]
sulami has joined #lisp
refpga has joined #lisp
karlosz has joined #lisp
v88m has quit [Remote host closed the connection]
orivej_ has quit [Quit: No Ping reply in 180 seconds.]
v88m has joined #lisp
orivej has joined #lisp
crumbler has joined #lisp
nicktick1 has joined #lisp
nicktick has quit [Ping timeout: 256 seconds]
v88m has quit [Ping timeout: 260 seconds]
vlatkoB has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
terpri_ has quit [Remote host closed the connection]
terpri_ has joined #lisp
ukari has quit [Ping timeout: 264 seconds]
terpri_ has quit [Read error: Connection reset by peer]
dale_ has joined #lisp
dale_ is now known as dale
elderK has joined #lisp
<elderK> Moin all
Josh_2 has joined #lisp
<phoe> evening
cosimone has joined #lisp
efm has joined #lisp
<Josh_2> phoe: ello
Inline has joined #lisp
v88m has joined #lisp
madage has quit [Ping timeout: 240 seconds]
vivit has joined #lisp
vivit has joined #lisp
vivit has quit [Changing host]
crumbler has quit [Quit: Leaving]
sulami has quit [Ping timeout: 264 seconds]
Josh_2 has quit [Quit: ERC (IRC client for Emacs 26.3)]
<phoe> Josup
<phoe> ...wait, you are no longer here
<phoe> that's why my Tab button didn't complete your nick
wixxyi has joined #lisp
madage has joined #lisp
FennecCode has joined #lisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
narimiran has quit [Ping timeout: 256 seconds]
prince1 has joined #lisp
Kevslinger has joined #lisp
prince1 has quit [Ping timeout: 250 seconds]
frgo has joined #lisp
sulami has joined #lisp
sulami has quit [Ping timeout: 265 seconds]
akflcar has joined #lisp
wixxyi has quit [Ping timeout: 265 seconds]
markong has quit [Ping timeout: 256 seconds]
markoong has joined #lisp
markong has joined #lisp
jonatack_ has quit [Read error: Connection reset by peer]
hhdave has joined #lisp
jonatack has joined #lisp
markoong has quit [Ping timeout: 265 seconds]
refpga` has joined #lisp
sulami has joined #lisp
refpga has quit [Ping timeout: 265 seconds]
elderK has quit [Quit: WeeChat 2.7.1]
gravicappa has quit [Ping timeout: 265 seconds]
sulami has quit [Ping timeout: 256 seconds]
elderK has joined #lisp
mark___ has joined #lisp
mark___ has quit [Client Quit]
t58 has joined #lisp
markoong has joined #lisp
Lord_of_Life_ has joined #lisp
Lord_of_Life has quit [Ping timeout: 258 seconds]
Lord_of_Life_ is now known as Lord_of_Life
markong has quit [Ping timeout: 264 seconds]
terpri has joined #lisp
TwoNotes has quit [Quit: Leaving]
efm has quit [Ping timeout: 256 seconds]
Inline has quit [Remote host closed the connection]
Inline has joined #lisp
Inline has quit [Max SendQ exceeded]
efm has joined #lisp
Inline has joined #lisp
Inline has quit [Remote host closed the connection]
sjl_ has quit [Ping timeout: 260 seconds]
elderK has quit [Quit: WeeChat 2.7.1]
sulami has joined #lisp
lavaflow has quit [Ping timeout: 240 seconds]
lavaflow has joined #lisp
markong has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<fiddlerwoaroof_> I was just browsing clhs today and found the end of 11.1.2.3.2 interesting
<fiddlerwoaroof_> clhs 11.1.2.3.2
<specbot> Notes about The KEYWORD Package: http://www.lispworks.com/reference/HyperSpec/Body/11_abcb.htm
<fiddlerwoaroof_> "it is generally not wise for a program to use a keyword[1] as a property indicator, since if there were ever another program that did the same thing, each would clobber the other's data."
<fiddlerwoaroof_> I generally always use keyword/value pairs in plists but, this suggestion reminds me a lot of Clojure's recommendation to use namespaced keywords in maps rather than unqualified keywords
sulami has quit [Ping timeout: 260 seconds]
markoong has quit [Ping timeout: 264 seconds]
<sjl> "namespaced keywords" wouldn't that just be... symbols?
hjudt has quit [Ping timeout: 264 seconds]
hjudt has joined #lisp
shangul has quit [Remote host closed the connection]
<fiddlerwoaroof_> Not in Clojure
<fiddlerwoaroof_> :foo/bar vs. :foo
<fiddlerwoaroof_> I've always found Clojure's decision to make keywords and symbols different types odd
<sjl> huh, yeah, that's odd
<Xach> fiddlerwoaroof_: symbol plists vs plists
<sjl> I guess it means you can still have the keywords-look-themselves-up-in-collections-when-funcalled behavior
<Xach> fiddlerwoaroof_: very different beasts!
shangul has joined #lisp
<phoe> symbol plists are global and therefore it's easy to clobber stuff there
<fiddlerwoaroof_> Xach: when you click through the glossary links, this advice applies to both :)
<Xach> fiddlerwoaroof_: good thing to add to the errata, then
<fiddlerwoaroof_> Also, the reason for Clojure's recommendation is that when you pass the map to functions in different libraries, the libraries can be more certain that the key they want to work with has the meaning the library assigned to it.
<Xach> as there is no issue with keyword keys in plists that matches the issue with symbol plists.
<fiddlerwoaroof_> Which is true here too: if my product catalog uses :name for a product name and my contact list uses :NAME for a persons name, they can conflict if I'm passing the same plist to each. If they use PRODUCT:NAME and CONTACT:NAME, they won't
<fiddlerwoaroof_> Alternatively, just use CLOS :)
ukari has joined #lisp
<Xach> fiddlerwoaroof_: aha, but it is common practice to use keyword initargs!
<Xach> i have not really seen non-keyword initargs in practice but i take a weird comfort in knowing maybe they COULD be used
danielboston26 has joined #lisp
<dlowe> a highly theoretical adapation would be to have :foo be a special keyword object in the current package
<Bike> i used non-keyword initargs in clasp for some standard classes, so as to not conflict with user code
<Bike> it's pretty easy to work with, at least
<fiddlerwoaroof_> I've been slowly becoming more and more in favor of adding namespaces to things everywhere I can
<dlowe> it might be cleaner than having a special keyword package
prince1 has joined #lisp
pilne_ has quit [Quit: Me fail English? That's unpossible.]
pilne has joined #lisp
<aeth> fiddlerwoaroof_: Imo, I would generally avoid using plists for this sort of thing unless you're working at compile time, in which case you're going to either (1) generate a MAKE-FOO or MAKE-INSTANCE 'FOO with your syntactic plist tail or (2) actually create the object as long as it has a MAKE-LOAD-FORM...
<aeth> (yes, you can actually create the object in the macro in that case, at least afaik)
prince1 has quit [Ping timeout: 240 seconds]
<aeth> Of course, "generally avoid" can become complicated if e.g. you're parsing JSON into plists, but in that case, the lack of JSON namespacing is the real issue...
<fiddlerwoaroof_> Yeah, I usually use alists for maps until I decide I need a hash-table
<fiddlerwoaroof_> But, in general, I think it's preferable to namespace the keys of your alist/plist/hash-table rather than use keywords
<aeth> fiddlerwoaroof_: hash tables are kind of duck typed... if it has a :NAME then it should be a valid name for the API... and if that's not good enough, then reify it into an object that ensures pre-/post-conditions
<aeth> IME what's far more problematic is when it expects a key and there is none... really easy to get an accidental NIL, even though GETHASH does technically let you specify a default value
<phoe> always m-v-b your gethashes
<phoe> if you don't check the secondary value then you willingly bring it upon yourself
<aeth> alternatively, abstract that into a gethash* which errors when the secondary value is NIL
<aeth> And I personally wrote trivial macros for error-when and error-unless because those patterns were so common... That makes a gethash* even more trivial
<phoe> hah, #'phoe-toolbox:gethash-or-die
<aeth> that, but with less Perl :-p
sulami has joined #lisp
<no-defun-allowed> gethash-or-keel-over
<phoe> gethash-or-call-the-doomguy
<no-defun-allowed> (gethash :thing (make-hash-table)) ; ⇒ keboom, keboom
akflcar has quit [Ping timeout: 250 seconds]
msk has joined #lisp
frgo has quit [Read error: Connection reset by peer]
frgo has joined #lisp
sulami has quit [Ping timeout: 265 seconds]
<aeth> phoe: Looking up the source for that... Personally, I prefer to put my errors in an error-when or error-less before the return value, rather than as an alternate branch in an IF.
<aeth> In that particular case, it doesn't really matter (although for readability sake, the error coming first might make sense), but in general, it avoids a PROGN
<aeth> It also makes the main body indented one level less
<aeth> s/error-less/error-unless/
csmionpdx82 has joined #lisp
csmionpdx82 has left #lisp [#lisp]
markoong has joined #lisp
random-nick has quit [Ping timeout: 265 seconds]
markong has quit [Ping timeout: 256 seconds]
choegusung has joined #lisp
choegusung has quit [Client Quit]
<phoe> aeth: correct, it doesn't really matter for the end control flow.
Kundry_W_ has joined #lisp
<fiddlerwoaroof_> I generally just design my code so that NIL from gethash is semantically equivelant to "missing value"
<fiddlerwoaroof_> I find that I very seldom care about the difference between "missing key" and "nil"
Kundry_Wag has quit [Ping timeout: 256 seconds]
cosimone has quit [Ping timeout: 240 seconds]
mgr_ has joined #lisp
<aeth> idk, I personally find that if I'm not careful about my NILs, I'll have a random NIL show up as an error 20 function calls away from where the NIL appeared.
<aeth> A NIL won't be an error until it ends up in something like a (+ nil 42) and who knows where it came from? Fail early.
<phoe> ahh, the legendary billion dollar mistake
<fiddlerwoaroof_> Yeah, I'm pretty careful about not letting unintended nils escape a function
<fiddlerwoaroof_> But, that's generally something like (or result default-value) right before returning
<aeth> phoe: except it's just false with a funny name, not a true null
<jcowan> Is it actually stated in the ANS that what goes into a container (list, vector, struct, class slot, etc.) has to be ql to what comes out?
<jcowan> s/ql/eql
<pjb> aeth: (prog1 nil (push 'here (getf (symbol-plist 'nil) :where-from)))
<phoe> jcowan: what do you mean, "comes out"?
<pjb> (getf (symbol-plist 'nil) :where-from) #| --> (here) |#
<Bike> as in is (let ((a (make-compound)) (x ...)) (setf (ref a ...) x) (eql x (ref a ...))) true.
<phoe> if you write datum X into a place, and then you read that place, then unless some weird MOP magic happens, the value should be EQL to the original; there's simply no need to return non-EQL, and therefore different objects
<jcowan> e.g. (lambda (x y) (rplaca x y) (eql y (car x)) guaranteed to return true?
<Bike> phoe: sure there is. hypothetically you could have packed structs.
<Bike> packed struct arrays, i mean.
<phoe> I say that's an edge case though compared to usual language usage
v88m has quit [Ping timeout: 265 seconds]
<Bike> i don't know what you mean.
<jcowan> But what I am asking is not whether this is true, but whether the ANS explicitly or implicitly requires it.
<phoe> Bike: I think I need sleep
<phoe> that's a more complex issue than I originally thought two minutes ago
<Bike> jcowan: i don't believe it's explicitly stated.
<pjb> (defmacro nil-from (expression where) (let ((v (gensym))) `(let ((,v (multiple-values-list ,expression))) (when (some (function nullp) ,v) (push ',where (getf (symbol-plist 'nil)))) (values-list ,v))))
<Bike> e.g. the description of arrays is "An array contains a set of objects called elements that can be referenced individually according to a rectilinear coordinate system", but "contains" is just plain english.
<fiddlerwoaroof_> It seems to me that defaulting :TEST to 'eql in functions indicates that that's expected, though?
<Bike> i mean, yeah, if an implementation actually didn't do this it would be bad
<pjb> (let ((a (nil-from (make-compound) (let a))) (x ...)) (setf (ref a ...) (nil-from x x)) (nil-from (eql x (ref a ...)) silly-test))
<Bike> but i don't believe the standard describes the idea of a compound object, or what it means for an object to contain other objects
<pjb> and just flush (getf (symbol-plist 'nil) :where-from) from time to time…
<jcowan> Okay, I assumed that was the case (it is a CL QOI thing rather than a spec thing)
<Bike> QOI?
<pjb> Bike: symbol-plist, defstruct, defclass, make-array etc.
<jcowan> sorry: quality of implementation
<Bike> quality of... implementation?
<pjb> Bike: the standard only talks about compound objects!
<pjb> Bike: now, try to find one object that is not compound! (there are some).
<Bike> i think it's just not defined since there's no formal semantic and it's assumed the reader knows what an array is
<Bike> in the same way arithmetic isn't defined, etc
<jcowan> I think the reformulation in terms of places is the best one
<jcowan> a cons has two places, a vector has as many places as it has elements, etc.
<jcowan> (consequently #() has no places)
<Bike> i thought of that a bit when i was sketching out a memory model for clasp, but i think "place" is too broad in some ways and too specific in others
<pjb> jcowan: note that clisp has a compilation-time-of-clisp option to have 3-slots in cons cells.
<jcowan> For doubly linked lists, I suppose.
<pjb> jcowan: or had; perhaps it has been removed recently, despite what a lot of people believe, clisp IS maintained.
<Bike> since places can be anything, but some things that are place-like aren't places, like the dimensions of an array
<pjb> In a way, dimensions of an array are places that you can mutate with adjust-array. Granted, adjust-array can return a non-eq object…
<jcowan> I agree: something is a place if you can change it, even if there is no define-setf-* for it
<jcowan> Yet.
<pjb> (let ((i (make-array 0))) (setf i (adjust-array i (1+ (array-dimension i 0)))) (array-dimension i 0)) #| --> 1 |#
<jcowan> rank is not a place, though in some languages it is
<pjb> Note: (let ((i 0)) (declare (type i (integer 0))) (decf i)) #| --> -1 |#
<pjb> while: (let ((i (make-array 0))) (setf i (adjust-array i (- (array-dimension i 0) 1))) (array-dimension i 0)) #| ERROR: The value (-1) is not of the expected type unsigned-byte. |#
<Bike> well i mean, for example, subseq is a place; but there's no expectation that using (setf subseq) instead of rplaca in your earlier example would result in a true return value
<pjb> LOL
<Bike> ldb is also a place, and that fits in weirdly
<jcowan> Ah. Excellent point
* jcowan loves to be refuted
<Bike> since setf can do arbitrary code, the concept is a little too broad, i'm thinking
<jcowan> And that brings me back to my earlier point: is it guaranteed that (setf (car (cons 1 2)) (cons 1 2) conses only once, and if so, how?
<Bike> er, no, that's not guaranteed. in fact i think it's guaranteed to cons twice.
<Bike> is this about the define-modify-macro thing or no
<pjb> jcowan: it is guaranteed it conses twice.
<pjb> and it returns the second one.
<LdBeth> it could be optimized to (cons (cons 1 2) 2)
<jcowan> But the reference to a place can do anything, including not evaluating its arguments.
sulami has joined #lisp
<jcowan> This is the core of the d-m-m problem
<LdBeth> but still requires twice
<Bike> i mean, in general yes, but (setf car) is defined to evaluate its argument
<jcowan> (for car, read some unknown function)
<pjb> (let (k) (eq (setf (car (setf k (cons 1 2))) (cons 1 2)) k)) #| --> nil |#
<jcowan> that has a define-setf-*
<pjb> (let (k) (values (setf (car (setf k (cons 1 2))) (cons 1 2)) k)) #| --> (1 . 2) ; ((1 . 2) . 2) |#
<Bike> okay, hang on here, back up a bit. you're not using define-modify-macro in this example at all, are you? define-modify-macro does not define a setf expander.
<jcowan> No, it assumes that whatever place reference you pass to it has one
<Bike> Sure.
<Bike> or, well, the expansion assumes that, i guess.
<jcowan> The d-m-m spec says that a d-m-m expands to
<jcowan> (defmacro name (reference . lambda-list)
<jcowan> documentation
<jcowan> (function ,reference ,arg1 ,arg2 ...)))
<jcowan> `(setf ,reference
<White_Flame> jcowan: in (setf (car (cons ...))) val), the car defines the place, but the cons will always be evaluated first as a parameter
<Bike> except for multiple evaluation, yes.
<White_Flame> (won't it?)
<Bike> yes.
<jcowan> And what is meant by multiple evaluation? There is a hyperlink, but I don't understand the connection
<Bike> If you give me a minute I'll write out an explicit example for you
<jcowan> link to 5.1.1.1
<Bike> clhs 5.1.1.1
<specbot> Evaluation of Subforms to Places: http://www.lispworks.com/reference/HyperSpec/Body/05_aaa.htm
v88m has joined #lisp
<fiddlerwoaroof_> I don't understand 2, is it supposed to mean that the expansion of d-m-m should wrap the expansion with code to prevent re-evaluation of the arguments?
<jcowan> Exactly.
<Bike> If you give me a minute I will write out an example for you.
* jcowan composes his soul in patience
sulami has quit [Ping timeout: 256 seconds]
markong has joined #lisp
markoong has quit [Ping timeout: 265 seconds]
GeissT has quit [Ping timeout: 265 seconds]
iAmDecim has quit [Ping timeout: 240 seconds]
iAmDecim has joined #lisp
vhost- has quit [Quit: WeeChat 2.7.1]
vivit has quit [Ping timeout: 265 seconds]
<Bike> sorry, trying to be thorough here
vhost- has joined #lisp
GeissT has joined #lisp
epony has quit [Quit: reconf]
<fiddlerwoaroof_> Is there a nice library for interacting with Elasticsearch?
epony has joined #lisp
markoong has joined #lisp
<Bike> http://ix.io/2gqV jcowan, fiddlerwoaroof_
markong has quit [Ping timeout: 265 seconds]