phoe 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/>
AeroNotix has joined #commonlisp
ebrasca has quit [Remote host closed the connection]
flip214 has quit [Read error: Connection reset by peer]
flip214 has joined #commonlisp
<AeroNotix> hey I'm trying to wrap a C library using cffi/the groveller
<AeroNotix> one part I've not used before is the wrapper functionality
<AeroNotix> in the docs:
<AeroNotix> `The internal package is created by Lisp code output from the C program written by CFFI-Grovel; if your specification file is exampleint.lisp, the exampleint.cffi.lisp file will contain the CFFI definitions needed by the rest of your project. See Groveller Syntax.`
<AeroNotix> I can't see .cffi.lisp file being generated, but my package loads correctly, just the functions in the grovel wrapper aren't available
kathe has quit [Quit: Leaving]
<AeroNotix> my specification file is in grovel-wrapper.lisp, I can see it being compiled into a .c file when loading the system - but the equivalent lisp file is not created.
random-nick has quit [Ping timeout: 256 seconds]
<AeroNotix> digging through /tmp I think I found the file it might actually be referring to, but it's not suffixed with .lisp
pillton has joined #commonlisp
tyson2 has joined #commonlisp
karlosz has joined #commonlisp
mayureshkathe has joined #commonlisp
kevingal has quit [Remote host closed the connection]
s-liao has joined #commonlisp
Oladon has quit [Quit: Leaving.]
logand` has joined #commonlisp
cjb has quit [Ping timeout: 260 seconds]
logand has quit [Ping timeout: 256 seconds]
xsperry has quit [Remote host closed the connection]
Oladon has joined #commonlisp
mayureshkathe has left #commonlisp [#commonlisp]
masinter has quit [Quit: ~ Trillian - www.trillian.im ~]
karlosz has quit [Quit: karlosz]
karlosz has joined #commonlisp
karlosz has quit [Remote host closed the connection]
razetime has joined #commonlisp
razetime has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
razetime has joined #commonlisp
Oladon has quit [Quit: Leaving.]
ebrasca has joined #commonlisp
monaaraj has quit [Ping timeout: 256 seconds]
monaaraj has joined #commonlisp
jealousmonk has quit [Quit: ERC 5.4.1 (IRC client for GNU Emacs 27.1)]
wyrd has quit [Ping timeout: 276 seconds]
<beach> Good morning everyone!
<beach> minion: memo for masinter: The code for SICL LOOP is here: https://github.com/robert-strandh/SICL/tree/master/Code/Loop or I can answer specific questions if you have any. Either here or in #sicl.
<minion> Remembered. I'll tell masinter when he/she/it next speaks.
<AeroNotix> beach: can you link your OS pdf please
<AeroNotix> i can't remember the url
<AeroNotix> no, I might have the wrong person
<beach> Oh, OS, sorry.
<AeroNotix> saved, any way
<beach> You mean the CLOSOS document?
<AeroNotix> maybe?
<AeroNotix> yes this
<AeroNotix> thank you
<beach> Pleasure.
wyrd has joined #commonlisp
waleee has quit [Ping timeout: 250 seconds]
AeroNotix has quit [Quit: WeeChat 3.4]
semz_ has joined #commonlisp
taiju has joined #commonlisp
semz has quit [Ping timeout: 250 seconds]
akoana has quit [Quit: leaving]
masinter has joined #commonlisp
razetime has quit [Remote host closed the connection]
occ has joined #commonlisp
igemnace has quit [Ping timeout: 250 seconds]
Bike has quit [Quit: sleep]
xsperry has joined #commonlisp
szkl has quit [Quit: Connection closed for inactivity]
<qhong> is there a binary tree library that doesn't absolutely suck?
<qhong> cl-containers take 30k cycle to do a single insert on a small tree
<beach> Strong words.
wacki has joined #commonlisp
occ has quit [Ping timeout: 256 seconds]
monaaraj has quit [Ping timeout: 256 seconds]
mon_aaraj has joined #commonlisp
occ has joined #commonlisp
s-liao has quit [Ping timeout: 256 seconds]
s-liao has joined #commonlisp
aartaka has joined #commonlisp
<beach> qhong: You use very strong language in the README to named-closures as well. What is a "function symbol"?
<beach> qhong: There is no such thing in the Common Lisp standard.
<qhong> beach: A symbol intended to be used as a function
<beach> You mean a symbol as a function designator? To be used in FUNCALL?
<qhong> yes
<beach> qhong: And how is that not a closure?
<beach> "Comparing to function symbols, closures are nearly unusable..."
<qhong> You can definite store a closure into its function cell, but that's not the typical use case. I'm talking about the closure you get by writing a LAMBDA form with free variables
<moon-child> (let ((x 0)) (defun f ...))
<qhong> moon-child: now you can only have one "instance" of this closure
<qhong>
<beach> qhong: Still, the concept of a "function symbol", especially as being separate from a closure, seems very strange.
<qhong> beach: what is a better term? I thought it's rather unambiguous given the context, but this might be my confirmation bias
<qhong> beach: global function definition?
<beach> Nope, see the example by moon-child.
s-liao has quit [Ping timeout: 256 seconds]
<qhong> I'm now inclined to say "first-order function"
<qhong> but it's probably even more obscure
<beach> Plus, you can assign an anonymous function that does not close over anything to a lexical or special variable. Then it is not a "function symbol" and not a closure.
<moon-child> qhong: I would interpret 'first-order function' as a function which takes and returns non-functions, not one which is not a closure
<beach> And, again, your language is very strong. In SICL, I occasionally use closures precisely because they can not be introspected or altered. So that's in no way "broken".
<moon-child> yes, closures are (afaik) the only true abstraction boundary
<moon-child> modulo first-class global environments :)
<beach> Heh.
<beach> qhong: Do you take remarks about your grammar in that README?
<beach> qhong: I don't have time to give any right now, but I might some time later.
<qhong> beach: which part? you mean "broken" or "function symbol" or both?
<beach> qhong: There are tons of minor English grammar problems in your README.
<beach> I was wondering if you like those to be corrected.
<qhong> beach: oh sure
<qhong> I don't insist on strong language either. Maybe I should rant somewhere else rather than README
<beach> And I suggest you moderate your language. Rather than "closures are broken", perhaps something like "there are some use cases where it is desirable to have the ability to modify the static closed-over environment of a closure".
<qhong> beach: I still don't like preventing introspection/mutation "by force"
Oddity has joined #commonlisp
<qhong> If someday some user just want to introspect/mutate it they can be very frustrated
<qhong> like I can't change microcode of my CPU from lisp repl, wtf
sloanr has quit [Ping timeout: 256 seconds]
<jmercouris> I agree, I don’t believe closures are broken, they work as intended
<jmercouris> Their design may not be amenable in the way you like, but luckily you can write your library and use it
<jmercouris> I would present it as a new utility rather than pitting it against closures
<jmercouris> This will likely make it easier for people to accept
<qhong> maybe this: closure is a useful low-level construct, but almost always have better alternative when using from "user-level"
<qhong> e.g. an object system (say CLOS) can be implemented using closures, but using CLOS is almost always more appropriate than using closure+message passing style directly
<moon-child> I do not think it would be inappropriate to have, say, private slots
<moon-child> (and indeed, you can _almost_ get them, viz (defclass x () ((#1=#:x))) (defun f (x) (frob (slot-value x '#1#))))
<qhong> moon-child: I think it can be appropriate to have a slot that don't expose accessor function to discourage *programs* from mutating it, but I think it's always appropriate to make it invisible from inspector, or *prevent* any program from mutating it
<moon-child> what do you mean by 'inspector'? A good debugger should show you the environment of a closure, sure
<qhong> (replace-string "always appropriate" "always inappropriate")
<qhong> moon-child: it doesn't always tell you the name of variables
<moon-child> hence the qualification 'good'
<qhong> sure, I agree good debugger is good
<qhong> and it should also be able to be invoked programmatically
<qhong> so a program can always get around the encapsulation easily, if deemed fit
<moon-child> I disagree
<qhong> I don't think in any case one should prefer "prevent" over "discourage"
<moon-child> one does not prevent; hence your library
<qhong> I still can't programmatically modify closures created outside my library
<qhong> (easily)
<moon-child> sure, yes. I suppose it depends on what you mean to discourage. I think it should be possible to express strong abstraction boundaries, and a few minutes ago, I think you agreed
<qhong> I agree you should be able to express. Anyone should also be able to decide to ignore your expression if they want to
<moon-child> then it is not a strong abstraction boundary
<beach> qhong: Also, in the term "function symbol", you seem to exclude function names of the form (SETF <symbol>).
<qhong> beach: yes that's an issue...
<qhong> moon-child: if your strong abstraction boundary means this, then I disagree
tyson2 has quit [Remote host closed the connection]
<beach> qhong: For a Lisp OS, it is essential to limit direct access to certain aspects of the environment.
<qhong> beach: what about discourage?
<moon-child> I think it is meaningful to distinguish 'strong' and 'weak' abstractions; the difference being that the latter can be broken, and the former can not. What do you mean by your words, humpty dumpty? :)
<beach> qhong: Not good enough in the presence of malware.
<qhong> beach: what about a program can break it only if it holds some certain capability passed/written explicitly by the user?
<qhong> in that way, if the user want a program to break the limit, it can be done easily
<beach> That's the idea, yes.
<moon-child> qhong: another issue is: making closure environments first-class may inhibit certain optimizations
<beach> I was about to say that.
<qhong> moon-child: I'm aware of that. Basically every nice feature I want (which almost always happen to be: bind xyz later!) add hell lot difficulty to optimization
<qhong> I think the ultimate solution will be to generalize the dependency maintanence protocol to every objects, rather than just metaobjects
occ has quit [Ping timeout: 240 seconds]
<qhong> so that the compiler can always assume something don't happen, but if it happen, affected compiled code can be fixed
<qhong> (this will also helps compiling F-expr)
occ has joined #commonlisp
iamFIREc1 has joined #commonlisp
artchad has joined #commonlisp
spiaggia has joined #commonlisp
mrcom has quit [Quit: This computer has gone to sleep]
wyrd has quit [Ping timeout: 276 seconds]
mrcom has joined #commonlisp
amb007 has quit [Ping timeout: 256 seconds]
amb007 has joined #commonlisp
wyrd has joined #commonlisp
Cymew has joined #commonlisp
Jing has joined #commonlisp
mrcom has quit [Quit: This computer has gone to sleep]
mrcom has joined #commonlisp
razetime has joined #commonlisp
occ has quit [Read error: Connection reset by peer]
razetime has quit [Client Quit]
razetime has joined #commonlisp
Everything has joined #commonlisp
rain3 has joined #commonlisp
attila_lendvai has joined #commonlisp
occ has joined #commonlisp
rain3 has quit [Ping timeout: 260 seconds]
ogamita has joined #commonlisp
rain3 has joined #commonlisp
szkl has joined #commonlisp
masinter has quit [Ping timeout: 240 seconds]
karlosz has joined #commonlisp
pve has joined #commonlisp
amb007 has quit [Ping timeout: 256 seconds]
amb007 has joined #commonlisp
spiaggia has quit [Quit: ERC (IRC client for Emacs 26.3)]
MajorBiscuit has joined #commonlisp
frgo has quit [Ping timeout: 250 seconds]
cosimone has joined #commonlisp
aartaka has quit [Ping timeout: 256 seconds]
treflip has joined #commonlisp
shka has joined #commonlisp
occ has quit [Ping timeout: 256 seconds]
MajorBiscuit has quit [Ping timeout: 245 seconds]
MajorBiscuit has joined #commonlisp
OlCe has joined #commonlisp
Dynom has joined #commonlisp
mgl has joined #commonlisp
santiagopim has quit [Remote host closed the connection]
occ has joined #commonlisp
s-liao has joined #commonlisp
razetime has quit [Remote host closed the connection]
santiagopim has joined #commonlisp
frgo has joined #commonlisp
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
aartaka has joined #commonlisp
s-liao has quit [Quit: Client closed]
karlosz has quit [Quit: karlosz]
occ has quit [Ping timeout: 250 seconds]
s-liao has joined #commonlisp
karlosz has joined #commonlisp
Guest4411 has joined #commonlisp
kevingal has joined #commonlisp
<phoe> is there a utility somewhere that acts like COPY-LIST but only N first conses are copied?
<jdz> phoe: SUBSEQ?
<beach> phoe: I guess you want to share the tail, yes?
kevingal_ has joined #commonlisp
<phoe> beach: yes
<beach> It feels like a standard function ought to be able to do that, but I can't think of any.
<phoe> I can do it easily by copying a SUBSEQ and then setting the last CDR, but it is kinda inefficient to traverse the list twice
karlosz has quit [Quit: karlosz]
<beach> Yeah.
<jdz> For LDIFF you also need a cell, not a number, so the copied part would have to be traversed twice.
<moon-child> (loop for i upto n for x on list if (< i n) collect (car x) else nconc x)
<jdz> phoe: But if that's not an issue then NTHCDR + LDIFF should dot.
<jdz> *do
xsperry has quit [Read error: Connection reset by peer]
<jdz> Never mind, my brain is offline today.
mon_aaraj has quit [Remote host closed the connection]
<phoe> I guess moon-child's loop is going to be the solution for today
mon_aaraj has joined #commonlisp
s-liao has quit [Quit: Client closed]
taiju has quit [Ping timeout: 240 seconds]
rogersm has joined #commonlisp
s-liao has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
f-a has joined #commonlisp
pranavats has joined #commonlisp
ante_ has joined #commonlisp
VincentVega has joined #commonlisp
s-liao has quit [Ping timeout: 256 seconds]
<gin> I see (sort items #'(lambda (a b) (...))) type of code often. Is #' really necessary here? is there any best practice or coding convention for this?
<beach> It is not necessary.
<gin> Is (sort items (lambda (a b) (...))) preferrable?
<moon-child> I would not use it
s-liao has joined #commonlisp
<gin> thanks moon-child beach
<beach> Sure.
<moon-child> (I think it may have been necessary in some proto-lisps?)
<jackdaniel> gin: the operator lambda is a macro that expands to (function (lambda …))
<jackdaniel> so it is implicit if you don't put #' in there
<gin> thanks jackdaniel
<jackdaniel> you may thank islisp for that - common lisp added this macro (if I recall correctly) for compatibility
<jackdaniel> islisp is loosely speaking a subset of common lisp
attila_lendvai has quit [Ping timeout: 256 seconds]
f-a has left #commonlisp [#commonlisp]
<mfiano> It's more to type in the best of scenarios, and can cause harm in the worst.
<jackdaniel> yes, I recalled correctly, it is mentioned here: https://nhplace.com/kent/Papers/cl-untold-story.html
<jackdaniel> the primary difference between #'(lambda …) and (lambda …) are visible when you quote them; consider (quote (lambda …)) and (quote (function (lambda …)))
<jackdaniel> or, perhaps, /the only difference/ :)
<mfiano> Also consider that some parts of the standard require you _not_ to use #'
<jackdaniel> right
<mfiano> I can think of at least one place off the top of my head that calls for a lambda _expression_.
<jackdaniel> they probably expand to a form where the argument is put in the operator position
<jackdaniel> or add (function …) on their own
<jackdaniel> I think that something in condition handling requires that
<mfiano> Right, the :report
<jackdaniel> also there are macros defined by the programmer (i.e in a library) and they may expect one or the another
<jackdaniel> that shows that two namespaces are cool until they are not ;)
<mfiano> Yes. lambda may not even be cl:lambda
<jackdaniel> well, it isn't applicable only to lambda, I gather that :report would complain if you'd fed it with #'foo too (instead of foo)
<mfiano> Yes
<mfiano> report-name::= string | symbol | lambda expression
Lord_of_Life has quit [Ping timeout: 256 seconds]
<jackdaniel> also I remember I had some problem with load-time-values depending on whether I had (function (lambda …)) or not, but I don't remember details
<jackdaniel> i.e whether the code was quoted or not
Lord_of_Life has joined #commonlisp
<jackdaniel> s/quoted/macroexpanded/
<mfiano> I would guess that would occur if you C-c C-c'd and a new identity was installed for that function.
<jackdaniel> maybe
<mfiano> Anyway, like I said, worst case you hurt yourself, best case you type more. I can think of no reason you would ever want #'(lambda ...)
<jackdaniel> one reason is readability - functions in argument position are usually denoted with the operator function
frgo has quit [Ping timeout: 256 seconds]
<moon-child> what if someone else passes you a function and then you pass it on?
<jackdaniel> nothing?
s-liao has quit [Ping timeout: 256 seconds]
<moon-child> well, then you would not use function
<jackdaniel> I can see what you are trying to tell, but I don't find it relevant
s-liao has joined #commonlisp
<mfiano> On the flip side, I find it ugly and hard to read when people do not refer to a function object in code like: (map 'list 'identity "foo")
<mfiano> Unless maybe if you're in the lexical scope of a local function and you want to make the distinction between the global environment, but i would probably choose better names at that point.
OlCe has quit [Ping timeout: 256 seconds]
<moon-child> if I happened to shadow, I would rather use a symbol as a function designator than rename. I don't know how likely I would be to shadow, though
<mfiano> I may or may not. It would probably depend on both costs
<mfiano> shadowing vs the expense of looking up the function object at runtime
<mfiano> Like, if it's in a tight loop or something
amb007 has quit [Ping timeout: 245 seconds]
amb007 has joined #commonlisp
<phoe> if it's in a tight loop then grab the function object once, outside the loop, and bind it to a lexivar
<mfiano> If you can without passing that through many frames, or using a runtime special variable.
<mfiano> I suppose you could grab it once around the flet/labels though.
<mfiano> I never thought too much about this. Just goes to show how flexible Lisp is.
ogamita has quit [Ping timeout: 256 seconds]
dec0d3r has joined #commonlisp
razetime has joined #commonlisp
mon_aaraj has quit [Ping timeout: 240 seconds]
mon_aaraj has joined #commonlisp
mon_aaraj has quit [Ping timeout: 256 seconds]
mon_aaraj has joined #commonlisp
s-liao has quit [Quit: Client closed]
<phoe> array question: I am working on a sequence function and I would like to generate specialized versions of my code depending on the types of the arrays that are passed in
<phoe> I have two input arrays, and they can come in various combinations of types: two simple-base-strings, simple-base-string + string, simple-base-string + simple-vector, ...
<phoe> I am following SBCL compiler notes when it comes to type ambiguity
mon_aaraj has quit [Ping timeout: 256 seconds]
pranavats has left #commonlisp [Error from remote client]
mon_aaraj has joined #commonlisp
<jackdaniel> (macrolet ((xxx..)) (typecase a (array (xxx)) (array* (xxx))))
pranavats has joined #commonlisp
<phoe> jackdaniel: I tried doing this to make a simple 5x5 matrix for (simple-base-string simple-string simple-bit-vector simple-vector (simple-array * (*))) - until I ran into an issue where SBCL notices, rightfully so, that element types BIT and CHARACTER are not compatible
<phoe> so I need to be smarter
<phoe> in particular, it isn't possible to REPLACE from a bit vector to a string and vice versa
OlCe has joined #commonlisp
random-nick has joined #commonlisp
OlCe has quit [Ping timeout: 256 seconds]
<mfiano> It isn't possible to REPLACE from a non-sequence anyway, which a 5x5 matrix is not
s-liao has joined #commonlisp
Everything has left #commonlisp [#commonlisp]
ogamita has joined #commonlisp
<phoe> mfiano: I meant a 5x5 matrix of *types*
mgl has quit [Quit: Client closed]
* mfiano facepalms
<phoe> so 25 function variants in the end
<phoe> some of which are highlighted as illegal at compilation time
<mfiano> I've been doing matrix math all week. Please excuse me
<phoe> no problem
taiju has joined #commonlisp
igemnace has joined #commonlisp
<jackdaniel> just list valid combinations
<phoe> yes, and I kinda wish I didn't need to go through all the valid combinations manually
* phoe writes an utility for doing that automatically
<jackdaniel> or since sbcl notices that then simply muffle the warning - dead code will be removed
<mfiano> gross
<jackdaniel> agonizing over small code snippets is higher on my gross top 10 list
aeth has quit [Ping timeout: 256 seconds]
aeth has joined #commonlisp
mgl has joined #commonlisp
mon_aaraj has quit [Ping timeout: 256 seconds]
wyrd has quit [Ping timeout: 276 seconds]
mon_aaraj has joined #commonlisp
<mfiano> Whenever I read something a question with "LSP", I read it as "LISP" and I'm thinking in terms of the superior SLIME/SLY...and then I catch myself before answering the question.
<mfiano> s/something//
kevingal has quit [Remote host closed the connection]
kevingal_ has quit [Remote host closed the connection]
<mfiano> Worst acronym ever for my brain
<phoe> wait until you hear about (RFC 6830
<mfiano> I already did. It was annoying
<mfiano> Yet clearly a joke
jeosol has quit [Quit: Client closed]
<Xach> A joke in what sense?
xsperry has joined #commonlisp
santiagopim has quit [Remote host closed the connection]
<mfiano> In that it is a draft and references CONS and EMACS drafts.
<mfiano> I dunno, maybe I misinterpreted it.
OlCe has joined #commonlisp
OlCe has quit [Ping timeout: 256 seconds]
cuz has joined #commonlisp
santiagopim has joined #commonlisp
tyson2 has joined #commonlisp
Bike has joined #commonlisp
s-liao has quit [Quit: Client closed]
mgl has quit [Quit: Client closed]
s-liao has joined #commonlisp
kevingal has joined #commonlisp
mon_aaraj has quit [Ping timeout: 240 seconds]
mon_aaraj has joined #commonlisp
kevingal has quit [Ping timeout: 256 seconds]
kevingal has joined #commonlisp
mon_aaraj has quit [Ping timeout: 256 seconds]
mon_aaraj has joined #commonlisp
iamFIREc1 has quit [Ping timeout: 256 seconds]
mgl has joined #commonlisp
semz_ is now known as semz
VincentV` has joined #commonlisp
VincentVega has quit [Ping timeout: 250 seconds]
aeth has quit [Ping timeout: 256 seconds]
aeth has joined #commonlisp
occ has joined #commonlisp
cuz` has joined #commonlisp
cuz has quit [Read error: Connection reset by peer]
s-liao has quit [Quit: Client closed]
cuz`` has joined #commonlisp
cuz` has quit [Ping timeout: 240 seconds]
frgo has joined #commonlisp
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
Guest4411 has quit [Quit: Client closed]
yewscion has joined #commonlisp
iamFIREc1 has joined #commonlisp
morganw has joined #commonlisp
OlCe has joined #commonlisp
dec0d3r has quit [Quit: Leaving]
yewscion has quit [Ping timeout: 256 seconds]
Guest4425 has joined #commonlisp
dlowe[x] has joined #commonlisp
OlCe has quit [Ping timeout: 260 seconds]
jeosol has joined #commonlisp
waleee has joined #commonlisp
AeroNotix has joined #commonlisp
dlowe[x] has quit [Remote host closed the connection]
dlowe[x] has joined #commonlisp
dlowe[x] has quit [Changing host]
dlowe[x] has joined #commonlisp
cuz``` has joined #commonlisp
cuz`` has quit [Read error: Connection reset by peer]
cuz```` has joined #commonlisp
cuz``` has quit [Ping timeout: 240 seconds]
xaltsc has joined #commonlisp
cuz```` has quit [Ping timeout: 256 seconds]
lisp123 has joined #commonlisp
<lisp123> beach: There?
<beach> Sort of.
<beach> I am on the phone.
<beach> Can you wait?
<lisp123> Ah yes of course
<beach> I mean, you can type questions and stuff, I just won't have time to answer right away.
<lisp123> Yup
<lisp123> Wrote this macro, similar to what you guys do with (let ((client *client*)) ...)
<lisp123> I need to debug & fix any issues, but curious to get thoughts on anything to do better / different
<lisp123> First link is an example, second link is the draft macro that I'm fixing up
<beach> (a b c) is not a valid form in the first link.
<lisp123> ah yes, I need to add a quote there
<beach> I don't think so, no.
<beach> Don't you want (list a b c)?
* beach is distracted so could be wrong.
<lisp123> yes I want that, so need to fix it so that it comes through. Although ,@ may also work, haven't really tested it yet
<Bike> presumably you use APPLY in case there's a &rest argument
<lisp123> Yes
<Bike> if you have (translate-orindary-lambda-list-to-apply-args '(a b c)) => (a b c nil), splicing should work
<Bike> and with '(a b &rest c) you would need (a b c)
<lisp123> Although I'm very bad with APPLY, so will take me a bit to figure out exactly how to do it
<lisp123> and with '(a b &rest c) you would need (a b c) -> I think that's where I got to in the end
<lisp123> (from our discussions yesterday :))
perrierjouet has quit [Quit: WeeChat 3.4]
<Bike> doesn't work so well with &optional, though
<lisp123> Here's the current version of that function
<Bike> you'd need like (a b &optional c) => (a b (if c-p (list c) nil))
VincentV` has quit [Ping timeout: 240 seconds]
<lisp123> True, to do it correctly, should adjust for c-p (assuming that means if optional argument c supplied)
<lisp123> For now I was just passing through the default values, but if its possible to fix, I'll try and do that (will think now how to do it)
<Bike> that is what i meant, yes
<beach> It looks like my help is no longer wanted.
<beach> ... which is great! :)
<lisp123> if you guys like the idea, you can improve and then use it :)
cuz```` has joined #commonlisp
taiju has quit [Ping timeout: 250 seconds]
<lisp123> you'd need like (a b &optional c) => (a b (if c-p (list c) nil)) -> The issue here may be that if the default value is nil, then passing nil if c-p is false means the receiving function cannot distinguish whether a call was made
<lisp123> ?
<lisp123> whether an optional argument was supplied*
<lisp123> sorry i wrote in a confusing way
<lisp123> what I meant was the receiving function may not know whether an optional argument was supplied or not
<lisp123> unless the call itself was adjusted not to include the optional
<lisp123> which means this function can't be written perfectly ever
Guest4425 has quit [Ping timeout: 256 seconds]
<lisp123> One alternative is to explicitly pass through c-p, but then the lambda-list of the generic function gets polluted / confusing
<beach> I have no idea what the idea was. Maybe I need to go back and look.
frgo has quit [Remote host closed the connection]
<beach> Can't figure it out from the conversation. So what is the idea that we might like?
<lisp123> Its just to simply writing interfaces - instead of writing two functions (defun move-character () (let ((client *client*)) (move-character-with-client client))
frgo has joined #commonlisp
<beach> Ah, OK.
<lisp123> and (defmethod move-character-with-client ((client (eql 'clim)) ...)
<lisp123> I bundle the defgeneric & defun into a macro
<beach> Got it.
<lisp123> and leave the methods to be written
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
sloanr has joined #commonlisp
attila_lendvai has joined #commonlisp
yewscion has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
Cymew has quit [Ping timeout: 256 seconds]
lisp123 has joined #commonlisp
OlCe has joined #commonlisp
perrierjouet has joined #commonlisp
snits has quit [Ping timeout: 240 seconds]
perrierjouet has quit [Client Quit]
masinter has joined #commonlisp
snits has joined #commonlisp
Catie has joined #commonlisp
yewscion has quit [Ping timeout: 260 seconds]
sloanr has quit [Remote host closed the connection]
sloanr has joined #commonlisp
perrierjouet has joined #commonlisp
jealousmonk has joined #commonlisp
jeosol has quit [Ping timeout: 256 seconds]
sloanr has quit [Remote host closed the connection]
cosimone has quit [Remote host closed the connection]
lisp123 has quit [Remote host closed the connection]
ebrasca has quit [Remote host closed the connection]
cosimone has joined #commonlisp
cage has joined #commonlisp
cuz```` has quit [Remote host closed the connection]
cuz```` has joined #commonlisp
razetime has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
ante_ has quit [Ping timeout: 256 seconds]
MajorBiscuit has quit [Quit: WeeChat 3.4]
<dieggsy> i've just found out about quicklisp bundles: https://www.quicklisp.org/beta/bundles.html - is there any way to update a specific package in a bundle?
<jackdaniel> you may put an altered version of the specific *system* (not a package) in local-projects
<dieggsy> oh, I guess quicklisp doesn't do per-system updates in general anyway
<dieggsy> ack yeah sorry my bad i meant system above
<White_Flame> a dist is a collection of all packages at one point in time where they pass some form of tests in loading all their dependencies from within the dist
<White_Flame> s/packages/systems/ :-P (I blame you ;) )
lisp123 has joined #commonlisp
<White_Flame> and so bundles snapshot from within the current dist
perrierjouet has quit [Quit: WeeChat 3.4]
<dieggsy> White_Flame: ah, i see. so in general if you wanted a new version of something, you'd either update everything or go the manual approach with local-projects
<White_Flame> right
<White_Flame> you can have multiple dists, and choose which one is "current", but I would only select that at the start of an image, not after things are already loaded
perrierjouet has joined #commonlisp
<dieggsy> i'm guessing it's probably actually safer to update everything together? hmm
<White_Flame> yep, that's the intent
<White_Flame> there will be some degenerate cases with that, though, if your code requires old-a and new-b, where new-b relies on new-a
<White_Flame> but it's incentive to keep current
<White_Flame> we're not yet at our final form of system packaging
<dieggsy> atm we have a project where we do dependency management entirely manually and we've not updated any of our CL libraries in like. idk, a decade. i'm looking at quicklisp bundles as a way of keeping up to date while still keeping the library sources in the project source tree
<White_Flame> sure, we've done that, copying src directories from quicklisp into our project subdir to snapshot manually
<White_Flame> for repeatable builds
<dieggsy> something something if it ain't broke, but the way it is now also just makes it a pain to manage these deps (plus we've all sorts of duplicate library sources and stuff, not ideal)
<White_Flame> yep, disruptive janitorial work will always be inevitable for long-lived projects
OlCe has quit [Ping timeout: 256 seconds]
<dieggsy> White_Flame: i wish everyone thought that way :)
<dieggsy> i mean it would seem like an unavoidable fact to a degree
<dieggsy> but i guess people's willingness to do such work varies greatly
<White_Flame> I love the saying "At some point, it's no longer technical debt, it's debtnical tech"
<dieggsy> hah
<contrapunctus> White_Flame: "You know you are drunk when there are traces of blood in your alcoholstream."
treflip has quit [Quit: good night]
pillton has quit [Ping timeout: 260 seconds]
perrierjouet has quit [Quit: WeeChat 3.4]
mon_aaraj has quit [Ping timeout: 250 seconds]
karlosz has joined #commonlisp
mon_aaraj has joined #commonlisp
perrierjouet has joined #commonlisp
ec has joined #commonlisp
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #commonlisp
frgo has quit [Remote host closed the connection]
amb007 has quit [Read error: Connection reset by peer]
frgo has joined #commonlisp
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
amb007 has joined #commonlisp
perrierjouet has quit [Quit: WeeChat 3.4]
OlCe has joined #commonlisp
Jing has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
perrierjouet has joined #commonlisp
<phoe> Bike: regarding portable code walking, you mentioned that there are some tricks that can be done with CLtL2's ENCLOSE
<phoe> could you elaborate on this a little bit?
<Bike> i wouldn't characterize it as a trick. but basically, when you're walking and hit a macrolet, to walk the body you have to make the actual macro functions available, meaning you have to evaluate some code to get a function
<phoe> yes
<phoe> I can first PARSE-MACRO to get a lambda expression
perrierjouet has quit [Client Quit]
<Bike> yeah, but then how do you get a function out of that. if you use eval or compile, it's in a null lexical environment
cuz```` has quit [Ping timeout: 256 seconds]
<Bike> so e.g. in (macrolet (...) (macrolet (...) ...)), if one of the inner macro functions used one of the outer ones you'd be out of luck
<phoe> so I can ENCLOSE this lambda form in the original environment, right?
<Bike> rught
<Bike> right
<phoe> like, I grab the original &environment object, ENCLOSE the lambda expression in it, and boom, I have a working macroexpander function
<Bike> yeah.
<phoe> then I can AUGMENT-ENVIRONMENT that env object to get a new environment object
<phoe> and now that I have a new environment object, what do I do? do I keep on walking the body of SYMBOL-MACROLET?
<Bike> i mean, if you're a code walker, yeah
<phoe> OK
<Bike> otherwise i don't see how you could walk macrolet
<phoe> I see that agnostic-lizard doesn't use ENCLOSE whatsoever
<phoe> ...neither does hu.dwim.walker
<phoe> ......neither does iterate?
mon_aaraj has quit [Ping timeout: 250 seconds]
<Bike> yeah, and this conversation started the other day because iterate doesn't walk macrolet, didn't it?
<phoe> yes
<phoe> does any code walker that is in use actually use this technique?
<Bike> i don't know how widely supported ENCLOSE even is
<phoe> cl-cont doesn't use it either
<phoe> well, let me check
mon_aaraj has joined #commonlisp
<phoe> SBCL, CCL, LW seem to have it
cosimone has quit [Read error: Connection reset by peer]
<phoe> ECL, CLISP, ACL, ABCL seem to not have it
<phoe> ACL has something else though - excl:compile-lambda-expr-in-env
<phoe> which seems equivalent
<phoe> Clasp seems to have it too
<phoe> so that's 5/8 implementations
simendsjo has joined #commonlisp
dlowe[x] has quit [Remote host closed the connection]
<phoe> so, not bad
perrierjouet has joined #commonlisp
<phoe> NotThatRPG: how does that sound?
<jackdaniel> there is no portable way to change initargs passed to effective-slot-definition-class, is there?
<zagura> /53
<Bike> don't think so
<jackdaniel> thanks
Guest4411 has joined #commonlisp
<phoe> jackdaniel: it seems that there is, but only if you use c2mop everywhere
cosimone has joined #commonlisp
<phoe> plus a custom library that seems to depend only on c2mop
<phoe> ...and a custom mixin class
<phoe> so, welp, not really portable
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #commonlisp
<jackdaniel> and what c2mop brings to the table?
<jackdaniel> I can't find anything there mitigating this particular issue
karlosz has quit [Quit: karlosz]
<phoe> looks like there's the ability to write a custom method on compute-effective-slot-definition that calls the next method to get the ESD
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #commonlisp
<phoe> and once you have the ESD, I assume you can reinitialize-instance it with some initargs
<phoe> which *should* be equivalent
<phoe> but don't trust me on that
<jackdaniel> it is not, because you may decide on the slot based on initargs in effective-slot-definition-class
<jackdaniel> s/on the slot/on the slot class/
<phoe> OK - then the best thing I can think of is a method on c-e-s-d that binds a dynavar and uses it as a side channel for passing information to e-s-d-c
patrice has joined #commonlisp
<jackdaniel> I don't understand how that helps with overwriting a default value (of say, :allocation initarg)
<jackdaniel> but well, that's not all that important
<jackdaniel> I was just wondering whether I miss something obvious
<phoe> my line of thought is this: if you have a custom metaclass, you can define custom methods on c-e-s-d and e-s-d-c, both of which do call-next-method
cosimone has quit [Read error: Connection reset by peer]
<jackdaniel> I know that I can define them but I don't see how this helps with the problem at hand
cosimone has joined #commonlisp
rain3 has quit [Ping timeout: 240 seconds]
<phoe> since you have a custom method on e-s-d-c, you have control over what arguments are passed into the main method, so you can e.g. pass a different :allocation to the main method
<phoe> since you have a custom method on c-e-s-d, you can bind a dynamic variable to pass information to e-s-d-c that e.g. conveys the value for :allocation that should be passed there
notzmv has quit [Ping timeout: 250 seconds]
<jackdaniel> no, because e-s-d-c takes initargs and the user might have specified :allocation :instance explicitly, then I don't want to overwrite it
<NotThatRPG> @phoe: Need to catch up to the discussion. Reading now...
<jackdaniel> and since I don't have an access to the "original" initargs, only full list with defaults supplied, I can't overwrite the default value
<phoe> jackdaniel: ...well, you can bind another dynavar where you have access to the list of original initargs, so you have access to them in c-e-s-d and e-s-d-c
<jackdaniel> I don't understand what you are saying
<jackdaniel> but as I said, not that important, so I'll just add a separate initarg
ante_ has joined #commonlisp
<phoe> OK
<phoe> I'll try to make a prototype of my idea
scymtym has quit [Ping timeout: 256 seconds]
Brucio-61 has quit [Ping timeout: 256 seconds]
<NotThatRPG> phoe: None of these capabilities are ANSI CL, are they?
<NotThatRPG> I see them in CLtL2, but not in the hyperspec.
<phoe> NotThatRPG: correct
<phoe> it would mean that this sort of codewalking is only possible on implementations with enough environment support
<phoe> or, alternatively, that ECL and ABCL have some catching-up to do, and that CLISP needs to get environments implemented at all
<attila_lendvai> phoe, your use-case of nested macrolets work in hu.dwim.walker... but the point is to implement it simpler than parsing macro lambda lists and other complexities?
<phoe> attila_lendvai: yes
cuz```` has joined #commonlisp
<NotThatRPG> There's a lot of discussion of the removal here: http://www.lispworks.com/documentation/HyperSpec/Issues/iss342_w.htm
<phoe> attila_lendvai: the point is to let the implementation do the heavy work of local macroexpanders into the lexical environment object
<phoe> s/of local/of adding/
<attila_lendvai> phoe, thanks for the clarification! my CL-macro-env-fu got kinda rusty... i quickly added a test/macros/macrolet/nested to hu.dwim.walker, though.
<jackdaniel> there is also trucler at al that is meant to provide better protocol for this deprecated functionality
notzmv has joined #commonlisp
<NotThatRPG> attila_lendvai: I should look at your walker's support for macrolet.
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #commonlisp
dac has joined #commonlisp
* attila_lendvai wishes he had enough steam to finish hu.dwim.iterate to the point that it can be a drop-in replacement for iterate
weechat has joined #commonlisp
marcoxa has joined #commonlisp
<marcoxa> Hi there...
<phoe> hey
<marcoxa> Getting bogged down on my Mac with SBCL.
yottabyte has quit [*.net *.split]
char[m] has quit [*.net *.split]
akater[m] has quit [*.net *.split]
Spawns has quit [*.net *.split]
jmercouris has quit [*.net *.split]
antoszka has quit [*.net *.split]
lieven has quit [*.net *.split]
copec has quit [*.net *.split]
bollu has quit [*.net *.split]
gabc has quit [*.net *.split]
dcx has quit [*.net *.split]
even4void has quit [*.net *.split]
zups has quit [*.net *.split]
lonjil has quit [*.net *.split]
simendsjo has quit [Remote host closed the connection]
tyson2 has quit [Remote host closed the connection]
copec has joined #commonlisp
char[m] has joined #commonlisp
antoszka has joined #commonlisp
jmercouris has joined #commonlisp
akater[m] has joined #commonlisp
yottabyte has joined #commonlisp
lieven has joined #commonlisp
gabc has joined #commonlisp
lonjil has joined #commonlisp
even4void has joined #commonlisp
zups has joined #commonlisp
bollu has joined #commonlisp
<phoe> jackdaniel: my dynamic variable approach didn't work but I got this as a quick hack, https://plaster.tymoon.eu/view/2933#2933
<phoe> see how only foo2 has :ALLOCATION :CLASS
* phoe tries to fix it a bit more
<phoe> okay, should work now
Gnuxie has quit [Ping timeout: 245 seconds]
prov[m] has quit [Ping timeout: 245 seconds]
Duuqnd has quit [Ping timeout: 250 seconds]
linjian has quit [Ping timeout: 250 seconds]
luis` has quit [Ping timeout: 250 seconds]
zbrown[m] has quit [Ping timeout: 250 seconds]
seragold[m] has quit [Ping timeout: 240 seconds]
yitzi has quit [Ping timeout: 240 seconds]
sp has quit [Ping timeout: 240 seconds]
katco has quit [Ping timeout: 250 seconds]
nworb has quit [Ping timeout: 250 seconds]
Mrtn[m] has quit [Ping timeout: 250 seconds]
miique has quit [Ping timeout: 250 seconds]
edmrk[m] has quit [Ping timeout: 250 seconds]
<phoe> it's a huge hack, but the goal of "can I check in e-s-d-c whether the user provided :allocation :class themself?" is there
saltrocklamp[m] has quit [Ping timeout: 240 seconds]
loke[m] has quit [Ping timeout: 240 seconds]
kakuhen has quit [Ping timeout: 240 seconds]
Arcsech has quit [Ping timeout: 252 seconds]
Spawns_Carpet[m] has quit [Ping timeout: 252 seconds]
opalvaults[m] has quit [Ping timeout: 250 seconds]
dieggsy has quit [Ping timeout: 250 seconds]
char[m] has quit [Ping timeout: 260 seconds]
akater[m] has quit [Ping timeout: 260 seconds]
ebrasca has joined #commonlisp
<jackdaniel> perhaps I wasn't clear enough - I want to decide on the effective-slot-definition-class result based on the allocation initarg
<jackdaniel> i.e on :allocation :trash I want to return (find-class 'trash-slot-definition)
nature has joined #commonlisp
<phoe> OK
CodeBitCookie[m] has quit [Ping timeout: 240 seconds]
<jackdaniel> and I want to change the default of the initarg allocation, so this code doesn't solve this
<jackdaniel> also, it is about default's, i.e that when user doesn't add :allocation :foo in the slot definition, I want it to default to something else than :instance
<jackdaniel> this code is overly complex even for the purpose of checking whether the allocation class was supplied by the user, it is enough to read the slot-value slot-definition-allocation to learn what user provided
<jackdaniel> (if anything)
<jackdaniel> or you can read the initarg in initargs directly in effective-slot-definition-class
<phoe> OK; I thought the issue was more general than that
simendsjo has joined #commonlisp
yewscion has joined #commonlisp
<jackdaniel> effective-slot-definition-class is called with default initargs filled, so for no-initarg-slot initargs will have :allocation :instance
<jackdaniel> notice that in your own snippet there is no result no-initarg-slot-definition
<phoe> yes, that's one issue that I'm still working on
Gnuxie has joined #commonlisp
<jackdaniel> that's the issue I was asking about
<jackdaniel> if you look for an easy solution just use sb-pcl::compute-slot-definition-initargs or whatever it is called
<phoe> so, direct slot definitions already seem to have :ALLOCATION installed, hence compute-effective-slot-definition already cannot recognize whether the default was provided
artchad has quit [Read error: Connection reset by peer]
Duuqnd has joined #commonlisp
<jackdaniel> I don't know what does it mean "installed", usually it is compute-effective-slot-definition method who conses the definition initarts based on direct slots
simendsjo has quit [Ping timeout: 240 seconds]
<jackdaniel> initargs*
Oladon has joined #commonlisp
attila_lendvai has quit [Read error: Connection reset by peer]
aartaka has quit [Ping timeout: 256 seconds]
aartaka has joined #commonlisp
attila_lendvai has joined #commonlisp
marcoxa has quit [Ping timeout: 256 seconds]
<Guest4411> Hi, Does someone know if LQUERY has similar :CONTAINS selector as JQUERY has? Here's example of jquery's selector: https://api.jquery.com/contains-selector/
<phoe> jackdaniel: that's the issue, the direct slots already have :ALLOCATION filled in
<phoe> at least on SBCL
yitzi has joined #commonlisp
<phoe> but you should be able to get the DSD initargs and remember them, and use that knowledge in E-S-D-C - see https://plaster.tymoon.eu/view/2936#2936
kakuhen has joined #commonlisp
luis` has joined #commonlisp
<phoe> it's an E-S-D-C method that can access the direct slot definitions that C-E-S-D operates on
<phoe> that's what I meant by a dynamic variable as a side channel
<Bike> could you have a custom direct slot definition class to provide a different :allocation default?
<phoe> I think so, yes
<Bike> and i think the allocation default is specified
<Bike> mop direct-slot-definition
<Bike> "The :allocation argument is a symbol. An error is signaled otherwise. The :allocation argument defaults to the symbol :instance." yeah ok.
<phoe> Bike: which page is that?
<phoe> oh, okay
<phoe> found it
<Bike> "Initialization of slot definition metaobjects"
<phoe> OK - then a placeholder value for allocation can be provided by the custom DSD that E-S-D-C can then notice and replace with something meaningful
ec has quit [Quit: ec]
<phoe> should be much cleaner than my dynamic variable hackery
seragold[m] has joined #commonlisp
prov[m] has joined #commonlisp
scymtym has joined #commonlisp
aeth has quit [Ping timeout: 256 seconds]
<jackdaniel> right, subclassing standard-direct-slot-definition and providing default-initarg makes sense, thanks
* phoe learned something today
aeth has joined #commonlisp
<phoe> Bike: is ENCLOSE in scope of Trucler-Native? I can't see any mention of it in the library
<phoe> I assume because ENCLOSE seems to not be used much
<Bike> i don't think so. trucler is basically about accessing parts of the environment. enclose is an evaluator.
simendsjo has joined #commonlisp
<phoe> a peculiar evaluator that requires access to a lexical environment object
<phoe> hence my question
waleee has quit [Ping timeout: 240 seconds]
<Bike> my understanding would be more that you could use trucler accessors to get the information needed to implement enclose
<phoe> OK, that works too
gaqwas has joined #commonlisp
cosimone has quit [Ping timeout: 245 seconds]
saltrocklamp[m] has joined #commonlisp
gaqwas has quit [Remote host closed the connection]
CodeBitCookie[m] has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 27.1]
tyson2 has joined #commonlisp
waleee has joined #commonlisp
cosimone has joined #commonlisp
perrierjouet has quit [Quit: WeeChat 3.4]
perrierjouet has joined #commonlisp
attila_lendvai has quit [Read error: Connection reset by peer]
<phoe> has Michael Raskin been around recently?
edmrk[m] has joined #commonlisp
Mrtn[m] has joined #commonlisp
attila_lendvai has joined #commonlisp
Arcsech has joined #commonlisp
char[m] has joined #commonlisp
loke[m] has joined #commonlisp
* Shinmera hopes his ELS submission gets accepted
cosimone has quit [Remote host closed the connection]
<Shinmera> Anyone else here going to the in-person ELS?
fitzsim` has joined #commonlisp
fitzsim has quit [Ping timeout: 250 seconds]
lisp123 has quit [Remote host closed the connection]
cosimone has joined #commonlisp
fitzsim` is now known as fitzsim
<dbotton> I am considering
<dbotton> where are the exact details of it?
<Shinmera> The website has all the infos
<Shinmera> Registration isn't open yet.
<dbotton> Found it, is on my b-day 3/22
mfiano has quit [Quit: WeeChat 3.3]
mfiano has joined #commonlisp
simendsjo has quit [Ping timeout: 245 seconds]
Brucio-61 has joined #commonlisp
weechat is now known as Spawns_Carpeting
perrierjouet has quit [Quit: WeeChat 3.4]
perrierjouet has joined #commonlisp
yewscion has quit [Ping timeout: 250 seconds]
<phoe> attila_lendvai: the case that seems to not be caught by hu.dwim.walker is (macrolet ((foo ...)) (walk-form (macrolet ((bar ...)) ...))) where WALK-FORM invokes the code walker
attila_lendvai has quit [Read error: Connection reset by peer]
<phoe> I see that hu.dwim.walker:parse-macro-definition calls EVAL on a NAMED-LAMBDA, which means that the macro body of BAR is compiled in a null lexenv, which effectively prevents BAR from referring to the local macro FOO
<phoe> which is the case solved by ENCLOSE
shka has quit [Ping timeout: 256 seconds]
katco has joined #commonlisp
attila_lendvai has joined #commonlisp
ante_ has quit [Ping timeout: 256 seconds]
cosimone has quit [Remote host closed the connection]
<phoe> or is that the case?
Spawns_Carpet[m] has joined #commonlisp
* phoe re-reads
sp has joined #commonlisp
cosimone has joined #commonlisp
cjb has joined #commonlisp
<phoe> maybe it's not, because the final MACROEXPAND-ALL is called with the original lexenv, which already includes the expander for FOO
<phoe> then I am still misunderstanding this affair
semz has quit [Quit: Leaving]
cuz```` has quit [Read error: Connection reset by peer]
<Bike> should just be if you try to codewalk (macrolet (...) (macrolet (...) ...))
<Bike> the environment the code walker is called in shouldn't matter, code walking should be as insensitive to that as eval is
<phoe> if this test passes, and I assume it does, then it means that hu.dwim.walker is capable of getting this right without ENCLOSE
Oladon has quit [Quit: Leaving.]
<phoe> and, yes, it passes
<phoe> what's the trick!?
<Bike> calls macroexpand-all, looks like
<Bike> boy is that complicated.
<phoe> macroexpand-all is defined to be (unwalk-form (walk-form ...))
dieggsy has joined #commonlisp
<phoe> with an environment object
miique has joined #commonlisp
ebrasca has quit [Remote host closed the connection]
yewscion has joined #commonlisp
<Bike> what's happening here, i guess, is that a lexenv is constructed, and then used to macroexpand-all the body of the macroexpander, thus ensuring outer macros are expanded before the implementation EVAL sees anything.
<phoe> yes, I can see the functions for augmenting a lexenv
<phoe> so this, basically, manually macroexpands absolutely every-fricking-thing before proceeding with actual walking
nature has quit [Ping timeout: 240 seconds]
cosimone has quit [Quit: ERC (IRC client for Emacs 27.1)]
<phoe> which sidesteps the need for an ENCLOSE
<phoe> and for PARSE-MACRO as well (by reimplementing it)
<Bike> it kind of is ENCLOSE.
<phoe> yes
<phoe> sweet gods, a portable ENCLOSE written in itself
Guest4411 has quit [Ping timeout: 256 seconds]
attila_lendvai has quit [Read error: Connection reset by peer]
<Bike> i mean, it makes sense. if you have a code walker an evaluator isn't far off.
<phoe> yes
mfiano has quit [Quit: WeeChat 3.4]
attila_lendvai has joined #commonlisp
<phoe> except this time you don't need to have an evaluator, you simply need to make sure that the macrolet bodies are possible to compile in a null lexenv
<phoe> and you achieve that by macroexpand-all-ing their bodies in the current lexenv
mfiano has joined #commonlisp
<phoe> and then augmenting the environment with the freshly compiled macroexpanders
<AeroNotix> https://github.com/ghollisjr/cl-sdl2/blob/b49e55f0d0907305ae2c7a6845941480d8b83736/grovel.lisp#L19 I have the same form in my grovel file but I am getting an error, `Unknown Grovel syntax: CFFI-GROVEL::CTYPE`
<phoe> ...and macroexpand-all-ing the macrolet body, in turn
miique has quit [Read error: Connection reset by peer]
katco has quit [Read error: Connection reset by peer]
dieggsy has quit [Read error: Connection reset by peer]
luis` has quit [Read error: Connection reset by peer]
prov[m] has quit [Read error: Connection reset by peer]
kakuhen has quit [Read error: Connection reset by peer]
Spawns_Carpet[m] has quit [Read error: Connection reset by peer]
sp has quit [Write error: Connection reset by peer]
Arcsech has quit [Remote host closed the connection]
Duuqnd has quit [Read error: Connection reset by peer]
loke[m] has quit [Read error: Connection reset by peer]
Mrtn[m] has quit [Read error: Connection reset by peer]
seragold[m] has quit [Write error: Connection reset by peer]
saltrocklamp[m] has quit [Write error: Connection reset by peer]
edmrk[m] has quit [Read error: Connection reset by peer]
char[m] has quit [Read error: Connection reset by peer]
yitzi has quit [Write error: Connection reset by peer]
Gnuxie has quit [Write error: Connection reset by peer]
CodeBitCookie[m] has quit [Write error: Connection reset by peer]
IPmonger has joined #commonlisp
<phoe> which, in turn, means that ENCLOSE, required for a full code walker, can be defined in terms of AUGMENT-ENVIRONMENT plus either EVAL or COMPILE plus (optionally) PARSE-MACRO plus a code walker
IPmonger has quit [Remote host closed the connection]
* phoe is mind-blown
Dynom has quit [Quit: WeeChat 3.4]
anticomputer has quit [Remote host closed the connection]
katco has joined #commonlisp
anticomputer has joined #commonlisp
<phoe> so all that's *really* needed is an implementation-defined AUGMENT-ENVIRONMENT plus a quasi-portable PARSE-MACRO
luis` has joined #commonlisp
edmrk[m] has joined #commonlisp
dieggsy has joined #commonlisp
Mrtn[m] has joined #commonlisp
akater[m] has joined #commonlisp
Gnuxie has joined #commonlisp
yitzi has joined #commonlisp
nworb has joined #commonlisp
saltrocklamp[m] has joined #commonlisp
sp has joined #commonlisp
kakuhen has joined #commonlisp
Duuqnd has joined #commonlisp
CodeBitCookie[m] has joined #commonlisp
Arcsech has joined #commonlisp
loke[m] has joined #commonlisp
char[m] has joined #commonlisp
seragold[m] has joined #commonlisp
Spawns_Carpet[m] has joined #commonlisp
zbrown[m] has joined #commonlisp
<Bike> phoe: the advantage of having this stuff available in the language is that the implemetnation necessarily has all of it, so exposing it reduces duplicate work
semz has joined #commonlisp
<Bike> (i have written parse-macro before and it is kind of a pain in the ass)
prov[m] has joined #commonlisp
opalvaults[m] has joined #commonlisp
linjian has joined #commonlisp
miique has joined #commonlisp
<phoe> Bike: yes, naturally
<phoe> I'm just looking for patching holes in implementations which don't expose some of this
waleee has quit [Ping timeout: 250 seconds]
lisp123 has joined #commonlisp
waleee has joined #commonlisp
lisp123 has quit [Ping timeout: 250 seconds]
kevingal_ has joined #commonlisp
<phoe> I think I remember it
<Bike> uh, maybe. i kinda blocked out the memory.
<phoe> ...no doubt
<Bike> oh, yeah, it was me or at least i rewrote it. thanks blame.
<Bike> "Handle destructuring &whole parameters", gotta get all those commonly used features
Oddity has quit [Ping timeout: 256 seconds]
alvaro121_ has joined #commonlisp
pve has quit [Quit: leaving]
alvaro121 has quit [Ping timeout: 256 seconds]
gaqwas has joined #commonlisp
dec0d3r has joined #commonlisp
wacki has quit [Quit: Leaving.]
waleee has quit [Ping timeout: 250 seconds]
waleee has joined #commonlisp
perrierjouet has quit [Quit: WeeChat 3.4]
<opcode> i have an application i want to deploy to a server, and I would like to have a REPL running in it that I can connect to/detach from, a la that JPL satellite debugging story. Is the canonical way to achieve this to embded a slynk/swank server?
<Bike> you should be able to just load swank and start a server
waleee has quit [Ping timeout: 240 seconds]
<opcode> that's what I meant, I think. I was asking if swank is, uh, the most common way to do that, or if there's some other lib out there that all the leet haxors are using these days
waleee has joined #commonlisp
<Xach> opcode: starting in screen/tmux is not uncommon
<Xach> and then you can start swank/slynk servers as well
<opcode> ok thanks
aeth has quit [Ping timeout: 256 seconds]
sheb_ has joined #commonlisp
aeth has joined #commonlisp
sheb has quit [Ping timeout: 256 seconds]
perrierjouet has joined #commonlisp
waleee has quit [Ping timeout: 240 seconds]
frgo has quit []
waleee has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
occ has quit [Ping timeout: 250 seconds]
azimut has joined #commonlisp
azimut_ has quit [Ping timeout: 276 seconds]
<Bike> uiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii]'
<Bike> excuse me
yewscion has quit [Ping timeout: 260 seconds]
<phoe> is this what happens when someone replies to a clasp issue from five years ago
<Bike> it's what happens when my cat decides he needs dinner early
wyrd has joined #commonlisp
random-nick has quit [Ping timeout: 256 seconds]
ogamita has quit [Ping timeout: 240 seconds]
<AeroNotix> opcode: ideally you shouldn't be starting stuff in screen/tmux
<AeroNotix> unless you like jank
<AeroNotix> opcode: it's best to make long-running servers start using the system's/distro init system
<AeroNotix> e.g. systemd
<Xach> AeroNotix: what is the connection between screen/tmux and jank?
<AeroNotix> Xach: because it is generally a poor manager of long-running services.
<Xach> AeroNotix: how so?
<AeroNotix> tmux/screen aren't inherently _for_ doing that, it's just you can do that with them
<mfiano> Umm
<AeroNotix> there's nothing in screen/tmux that restart things, centralize logging, allow you to manage that service once you've started it within screen/tmux
<Xach> Ok. Thanks for your perspective.
<AeroNotix> by all means, do it, but there are far superior ways to do it
aartaka has quit [Ping timeout: 240 seconds]
<AeroNotix> writing a systemd unit is literally less work
<AeroNotix> and you get a tonne of QOL and management features to boot
<mfiano> Too many subjective adjectives for me.
<AeroNotix> cool
<AeroNotix> keep doing it, if you're doing it
<AeroNotix> but if you suggested doing something like that in a professional setting, you'd be laughed out the room
<opcode> AeroNotix: I'd much prefer to leverage systemd, but I also want to be able to connect to the running instance without porting my entire emacs config to the server
<AeroNotix> opcode: you can still do that...
<opcode> Yes
<AeroNotix> emacs can connect to remote swank servers
<mfiano> Luckily, FreeBSD doesn't have such monolithic software built from a corporate agenda
<AeroNotix> and there's no link between systemd/swank, swank is started in your code. Nothing about _how_ it's started
<AeroNotix> mfiano: oh true colours shown. ;)
<AeroNotix> mfiano: it's a shame the systemd portion is what you focused on
aartaka has joined #commonlisp
random-nick has joined #commonlisp
<mfiano> I focused on the suggestion. Excuse me for dragging this discussion further off-topic.
<AeroNotix> the suggestion is to avoid using tmux/screen for long-running services, an example of how _not_ to do that is to use systemd
<AeroNotix> but by all means replace systemd with your init system of choice
<moon-child> mfiano: did you see the freebsd port of launchd?
mgl has quit [Ping timeout: 256 seconds]
<mfiano> moon-child: No, that I even know what 'launchd' is though.
<mfiano> not that*
<AeroNotix> Apple's thing
<AeroNotix> for service management
<moon-child> apple init d, served as a model for systemd
<moon-child> (just as apple's coreaudio served as a model for pulseaudio)
<mfiano> That would explain why I wasn't aware.
<AeroNotix> Hey there's some activity on SWIG to reintroduce the cffi output
<AeroNotix> I've been hacking on some pieces which always annoyed me
<AeroNotix> here's my fork based on someone elses
<AeroNotix> the tl;dr is that it'll spit out the missing pieces that you would otherwise need to manually create a grovel file for
<AeroNotix> there's still more to be done but hope is that this could be upstreamed in swig and it could be a one and done mechanism to use foreign code
waleee has quit [Ping timeout: 250 seconds]
<AeroNotix> I know there's shitloads of attempts to do this, but they all fizzle out due to the single-maintainer problem many CL things have
<AeroNotix> having it in swig itself, might help
waleee has joined #commonlisp
<opcode> >and there's no link between systemd/swank, swank is started in your code. Nothing about _how_ it's started
<AeroNotix> yeah
<opcode> Yep understood.
gaqwas has quit [Ping timeout: 250 seconds]
<opcode> I was asking mostly about swank because I'm a newcomer to lisp but not to linux
<AeroNotix> you start the swank server when your application starts
<AeroNotix> in emacs you connect to that remote swank server
<AeroNotix> then everything works as a local swank connection
ec has joined #commonlisp
<AeroNotix> all you need is (swank:create-server) in your application code somewhere
<AeroNotix> M-x slime-connect and provide it the host:port of the remote
taiju has joined #commonlisp
<opcode> Thanks. Is there any significant reason to choose swank vs slynk?
<AeroNotix> From me personally, no. I wasn't even aware of slynk until it was mentioned
<opcode> K
<Xach> I used slime for many years, but I like a lot of little features of sly and I've switched completely in the last year.
lisp123 has joined #commonlisp
<AeroNotix> is there a document describing the pros/cons?
<Xach> I don't know.
<AeroNotix> trying to find something on google.
lisp123 has quit [Ping timeout: 250 seconds]