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
sstc has joined #lisp
smazga has joined #lisp
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chipolux_ has quit [Ping timeout: 256 seconds]
chipolux_ has joined #lisp
ahungry has joined #lisp
Krystof has quit [Ping timeout: 260 seconds]
_whitelogger has joined #lisp
dddddd has quit [Remote host closed the connection]
karayan has joined #lisp
PuercoPop has quit [Remote host closed the connection]
PuercoPope has joined #lisp
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
mono has joined #lisp
monokrom has quit [Ping timeout: 240 seconds]
Oladon has joined #lisp
buffergn0me has quit [Quit: ERC (IRC client for Emacs 26.2)]
elflng has quit [Ping timeout: 258 seconds]
ralt has quit [Quit: Connection closed for inactivity]
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
sstc has quit [Quit: WeeChat 2.8]
elflng has joined #lisp
rozenglass1 has quit [Quit: WeeChat 2.3]
turona has quit [Ping timeout: 272 seconds]
turona has joined #lisp
elflng has quit [Client Quit]
rozenglass has joined #lisp
elflng has joined #lisp
elflng has quit [Client Quit]
elflng has joined #lisp
elflng has quit [Client Quit]
elflng has joined #lisp
elflng has quit [Client Quit]
elflng has joined #lisp
arpunk has quit [Remote host closed the connection]
Bike has quit [Quit: Lost terminal]
kark has quit [Ping timeout: 265 seconds]
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
shangul has quit [Ping timeout: 260 seconds]
shifty has joined #lisp
toorevitimirp has joined #lisp
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
toorevitimirp has quit [Remote host closed the connection]
<beach> Good morning everyone!
kpoeck has joined #lisp
ahungry has quit [Remote host closed the connection]
shifty has quit [Ping timeout: 260 seconds]
Oladon has quit [Quit: Leaving.]
ayuce has quit [Remote host closed the connection]
wxie has quit [Ping timeout: 272 seconds]
orivej has joined #lisp
amerlyq has joined #lisp
kpoeck has quit [Remote host closed the connection]
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
Oladon has joined #lisp
<markasoftware> I want to pass the value of a variable as an argument to a function, if that variable is non-nil
<markasoftware> otherwise i want to omit the argument so that the function can use its default value for it. (it is &optional).
jprajzne has quit [Quit: jprajzne]
<markasoftware> Do I just make my own macro to handle this? Or is there some convenient way I am overlooking?
jprajzne has joined #lisp
malm has quit [Quit: Bye bye]
heisig has joined #lisp
shka_ has joined #lisp
<akoana> markasoftware: maybe use something like this: (defun f (&optional (p 'default supplied-p)) (if (and supplied-p (null p)) 'default p))
<akoana> so both (f nil) and (f) give 'DEFAULT
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
<beach> (defun ff (&optional x &aux (x (if (null x) 234 x))) ...)
Kundry_Wag has joined #lisp
<akoana> ah, nice
<beach> I guess &aux is on my mind because I used it in my paper on representing method combinations.
jprajzne has quit [Client Quit]
rgherdt has joined #lisp
jprajzne has joined #lisp
Kundry_Wag has quit [Ping timeout: 265 seconds]
rgherdt has quit [Client Quit]
heisig has quit [Ping timeout: 260 seconds]
shifty has joined #lisp
malm has joined #lisp
HDurer has joined #lisp
rgherdt has joined #lisp
sauvin has joined #lisp
shifty has quit [Ping timeout: 260 seconds]
shifty has joined #lisp
heisig has joined #lisp
narimiran has joined #lisp
pjb has quit [Ping timeout: 272 seconds]
gravicappa has joined #lisp
jprajzne has quit [Quit: jprajzne]
Oladon has quit [Quit: Leaving.]
jprajzne has joined #lisp
shifty has quit [Ping timeout: 260 seconds]
shifty has joined #lisp
anticrisis has quit [Quit: Leaving]
* beach guesses that markasoftware did not like the proposed solution.
Cymew has joined #lisp
<solrize> 0branch.com? that sounds forthy
jprajzne has quit [Client Quit]
jprajzne has joined #lisp
jonatack has quit [Quit: jonatack]
wxie has joined #lisp
patlv has quit [Quit: patlv]
doesthiswork has joined #lisp
rgherdt has quit [Remote host closed the connection]
shifty has quit [Ping timeout: 246 seconds]
shifty has joined #lisp
Inoperable has quit [Quit: All your buffer are belong to us!]
jonatack has joined #lisp
nullheroes has quit [Quit: WeeChat 2.8]
pjb has joined #lisp
CrazyEddy has joined #lisp
<akoana> beach: your solution with &aux is superior - I like it :)
<beach> Thanks!
dalz has joined #lisp
shifty has quit [Ping timeout: 240 seconds]
Bourne has joined #lisp
shifty has joined #lisp
abhixec has quit [Ping timeout: 258 seconds]
shifty has quit [Ping timeout: 265 seconds]
shifty has joined #lisp
quazimodo has quit [Ping timeout: 260 seconds]
quazimodo has joined #lisp
shifty has quit [Ping timeout: 246 seconds]
shifty has joined #lisp
Inoperable has joined #lisp
quazimodo has quit [Ping timeout: 256 seconds]
pjb has quit [Ping timeout: 252 seconds]
quazimodo has joined #lisp
shifty has quit [Ping timeout: 264 seconds]
CrazyEddy has quit [Ping timeout: 264 seconds]
jprajzne has quit [Quit: jprajzne]
shifty has joined #lisp
random-nick has joined #lisp
<p_l> beach: we need more examples of using &aux in the world :)
ayuce has joined #lisp
<Shinmera> p_l: I used &aux in a custom macro to denote special bindings that should be emitted. https://shinmera.github.io/for/#bindings
<beach> p_l: Yes, maybe so. I would certainly not want to see it disappear in this famous updated standard that so many people seem to want.
terpri has quit [Remote host closed the connection]
kpoeck has joined #lisp
jprajzne has joined #lisp
CrazyEddy has joined #lisp
shifty has quit [Ping timeout: 272 seconds]
shifty has joined #lisp
<phoe> what is the difference between &aux and a function-toplevel let*? is there any?
<beach> I don't think there is a difference. But in my paper on method combinations, I analyze the lambda list. It would be much harder to analyze the body of the function.
<Shinmera> That's exactly what I do in FOR, too.
<beach> I see.
<heisig> phoe: Since &aux fits into the lambda list, it can sometimes shorten your code by one line. And it means that you have a central place to put your declarations (after the lambda list).
<Shinmera> The &aux are used to emit bindings that surround the entire loop block, whereas the body is emitted within the iteration loop.
<Shinmera> *loop iteration block
<kpoeck> 3.4.1.5 Specifiers for aux variables .... &aux variable processing is analogous to let* processing.
<Colleen> kpoeck: karlosz said 9 hours, 44 minutes ago: https://github.com/robert-strandh/SICL/pull/153 fixes the maxima issue, it compile instantly now
<Colleen> kpoeck: karlosz said 9 hours, 9 minutes ago: that means you don't need to comment do-inlining out. if you do, everything will be kinda slow.
<heisig> And of course &aux is important in cases where you have no body - like struct constructors.
shifty has quit [Ping timeout: 246 seconds]
akoana has left #lisp ["Leaving"]
remix2000 has joined #lisp
remix2000 has quit [Client Quit]
<phoe> &aux is important in cases where you have nobody
* phoe plays The Lonesome Lisper
frodef has joined #lisp
kiboneu has quit [Remote host closed the connection]
pve has joined #lisp
ralt has joined #lisp
RedMallet has joined #lisp
sdumi has quit [Ping timeout: 256 seconds]
sdumi has joined #lisp
ozzloy_ is now known as ozzloy
remix2000 has joined #lisp
ozzloy has quit [Changing host]
ozzloy has joined #lisp
JohnMS_WORK has joined #lisp
Krystof has joined #lisp
rixard_ has joined #lisp
shangul has joined #lisp
rixard has quit [Ping timeout: 256 seconds]
remix2000 has quit [Quit: remix2000]
scymtym has quit [Ping timeout: 258 seconds]
wxie1 has joined #lisp
wxie has quit [Ping timeout: 260 seconds]
wxie1 is now known as wxie
rgherdt has joined #lisp
dale has quit [Quit: My computer has gone to sleep]
wxie has quit [Ping timeout: 272 seconds]
McParen has joined #lisp
Cymew has quit [Ping timeout: 264 seconds]
doesthiswork has quit [Ping timeout: 256 seconds]
rogersm has joined #lisp
rogersm_ has joined #lisp
gravicappa has quit [Ping timeout: 260 seconds]
rogersm has quit [Ping timeout: 246 seconds]
smazga has quit [Ping timeout: 272 seconds]
davsebam1e has joined #lisp
cosimone has joined #lisp
davsebamse has quit [Ping timeout: 258 seconds]
orivej has quit [Ping timeout: 240 seconds]
pjb has joined #lisp
ljavorsk has joined #lisp
frgo_ has joined #lisp
varjag has joined #lisp
frgo has quit [Ping timeout: 244 seconds]
shangul has quit [Ping timeout: 264 seconds]
terpri has joined #lisp
smazga has joined #lisp
refpga has joined #lisp
yankM has quit [Ping timeout: 240 seconds]
doomlist3 has joined #lisp
<doomlist3> ((defvar x (list :a 2 :c 3 :g 4))
<doomlist3> (getf x :a)
<doomlist3> what's wrong malformed property list: (2 3 4).
<doomlist3> i am frustrated by gigamonkeys.com
<phadthai> 2 should be the result, maybe something mistyped... there's an extra opening paren before your defvar
<pve> use defparameter instead
<phadthai> and yes it's important to understand the distinction between defvar and defparameter
<phadthai> if it was already defined with defvar and '(2 3 4) then you could get that result
jeosol has quit [Ping timeout: 245 seconds]
<doomlist3> (defvar x (list :a 2 :c 3 :g 4))
<doomlist3> (getf x :a)
<doomlist3> I still get malformed list error
<doomlist3> fuk
toorevitimirp has joined #lisp
<doomlist3> although defparameter seems to work
<doomlist3> defvar and with '(1 2 3) instead of (list 1 2 3) too works
<doomlist3> CL is too subtle
<phadthai> "defvar it is evaluated only if name is not already bound"
<doomlist3> clhs defparameter
<phadthai> the distinction allows to use live images and reload code in them
pjb has quit [Ping timeout: 272 seconds]
rogersm has joined #lisp
<doomlist3> is that difference explained in gigamonkeys.com later so that i can skip it now
nydel has quit [Quit: WeeChat 2.3]
nydel has joined #lisp
nydel has quit [Changing host]
nydel has joined #lisp
rogersm has quit [Ping timeout: 265 seconds]
<no-defun-allowed> doomlist3: Check your parens (and the structure suggested by your indentation).
<no-defun-allowed> clhs dolist
<no-defun-allowed> doomlist3: Compare what you have with the syntax provided for DOLIST.
troydm has quit [Ping timeout: 272 seconds]
toorevitimirp has quit [Remote host closed the connection]
toorevitimirp has joined #lisp
kiboneu has joined #lisp
<beach> That is a very strange style warning though.
Kundry_Wag has joined #lisp
orivej has joined #lisp
<beach> I mean CD is used in the RESULT-FORM.
<jackdaniel> beach: I can imagine an expansion, where cd is separately bound in the end clause
<no-defun-allowed> SBCL puts (let ((<var> '())) ...) around its <result-form>
<jackdaniel> of course the style warning should not happen then
<beach> I can imagine such an expansion as well, but then it is not helpful to give that kind of style warning.
<jackdaniel> (benefit would be better type inference result if the list has all number i.e)
<jackdaniel> yes, I agree
Krystof has quit [Ping timeout: 264 seconds]
<jackdaniel> doomlist3: to answer your explicit problem: you want (dolist (cd '(1 2 3)) (format t "hu ~a~%" cd))
<doomlist3> jackdaniel: i figured out thx for being so helpful
<jackdaniel> dolist has two arguments: one is the binding and return-result clause, and the second is its body
toorevitimirp has quit [Read error: Connection reset by peer]
<beach> doomlist3: You should have seen the problem immediately from the indentation.
Kundry_Wag has quit [Ping timeout: 256 seconds]
<beach> doomlist3: If your code had been correct, with the FORMAT form in the body of the DOLIST, it would have been indented two positions compared to the (DOLIST, not 12.
toorevitimirp has joined #lisp
Lord_of_Life_ has joined #lisp
Lycurgus has joined #lisp
Lord_of_Life has quit [Ping timeout: 256 seconds]
Lord_of_Life_ is now known as Lord_of_Life
<beach> doomlist3: Did you get that?
troydm has joined #lisp
orivej has quit [Ping timeout: 272 seconds]
<doomlist3> of course
sdumi has quit [Ping timeout: 256 seconds]
Cymew has joined #lisp
orivej has joined #lisp
sdumi has joined #lisp
refpga has quit [Ping timeout: 265 seconds]
sdumi has quit [Read error: Connection reset by peer]
sdumi has joined #lisp
dddddd has joined #lisp
Lycurgus has quit [Quit: Exeunt]
sunwukong has joined #lisp
karlosz has quit [Quit: karlosz]
toorevitimirp has quit [Remote host closed the connection]
milanj has joined #lisp
toorevitimirp has joined #lisp
toorevitimirp has quit [Remote host closed the connection]
toorevitimirp has joined #lisp
papachan has quit [Quit: WeeChat 2.7.1]
rogersm_ has quit [Quit: Leaving...]
papachan has joined #lisp
RedMallet has quit [Quit: WeeChat 2.6]
milanj has quit [Quit: This computer has gone to sleep]
duuqnd has joined #lisp
KateUpton has joined #lisp
KateUpton has quit [Client Quit]
doomlist3 has quit [Ping timeout: 240 seconds]
Krystof has joined #lisp
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
Kundry_Wag has joined #lisp
jprajzne has quit [Client Quit]
jprajzne has joined #lisp
pjb has joined #lisp
Kundry_Wag has quit [Ping timeout: 256 seconds]
rogersm has joined #lisp
Trpger has joined #lisp
<Trpger> hi
<jackdaniel> hey
<Trpger> ÓÐÈËÄÜ¿´µ½ÎÒ˵»°Âð
* Trpger adsf
rogersm has quit [Ping timeout: 256 seconds]
<jackdaniel> do you have a problem with a cat on the apl-tailored keyboard?
Trpger has left #lisp [#lisp]
<jackdaniel> apparently yes
sdumi has quit [Read error: Connection reset by peer]
Bike has joined #lisp
sdumi has joined #lisp
igemnace has quit [Ping timeout: 272 seconds]
<selwyn> maybe it has an ogonek
<jackdaniel> ogonek is on the bottom, like in "ą"
<jackdaniel> µ doesn't count of course
jeosol has joined #lisp
<MichaelRaskin> μ counts if it is μ̨!
papachan has quit [Quit: WeeChat 2.7.1]
milanj has joined #lisp
Inoperable has quit [Quit: All your buffer are belong to us!]
scymtym has joined #lisp
<jackdaniel> If my grandmother had wheels, she would've been a bike. :-)
papachan has joined #lisp
gravicappa has joined #lisp
<phoe> Bike: please comment
igemnace has joined #lisp
<Bike> Atomic theory says all matter is made up of tiny little balls science calls "atoms". When you ride a bike, your and the bike's atoms get jostled around, so when you do it long enough you swap atoms.
<Bike> This is why people who ride bikes a lot eventually become more like bicycles with bell like voices
<phoe> < Bike> Rrrring ringgg, rrringgg, ring ring rinnnggggg rrinnnnng
<phoe> I don't understand
pjb has quit [Ping timeout: 272 seconds]
dddddd has quit [Ping timeout: 260 seconds]
dddddd has joined #lisp
shangul has joined #lisp
sdumi has quit [Ping timeout: 264 seconds]
X-Scale` has joined #lisp
X-Scale has quit [Ping timeout: 272 seconds]
X-Scale` is now known as X-Scale
sunwukong has quit [Quit: Leaving]
entel has joined #lisp
JohnMS_WORK has quit [Read error: Connection reset by peer]
JohnMS_WORK has joined #lisp
<flip214> ah, the great hunter8 heist
<jmercouris> so, given the foreign library directories being printed
<jmercouris> why is it loading libraries from the wrong location?
<jmercouris> why is libfixposix being loaded in the correct location, but libcrypto not?
<phoe> I can't see a difference there
<jmercouris> Yes,
<jmercouris> sorry
<phoe> all three lists of pathnames seem the same
liberliver1 has joined #lisp
<jmercouris> I didn't have the flag in the DYLD_PRINT_LIBRARIES=1 that I posted
gko has joined #lisp
<jmercouris> as you can see it is loading shared libraries from /opt/local/lib which IS NOT in the library load paths
<jmercouris> sorry, the CFFI foreign library directories
igemnace has quit [Ping timeout: 260 seconds]
liberliver has quit [Ping timeout: 258 seconds]
liberliver1 is now known as liberliver
<phoe> huh! no idea
<jmercouris> :'(
<jmercouris> all it does is: cffi:load-foreign-library
<jmercouris> I can pass a search path
rogersm has joined #lisp
<jmercouris> maybe I should do that
igemnace has joined #lisp
rogersm has quit [Ping timeout: 256 seconds]
shangul has quit [Ping timeout: 272 seconds]
<jmercouris> that may be the key
<jmercouris> is there a way to get the path that CFFI thinks a library is located in?
<phoe> it might not be CFFI at that point
<phoe> I mean, it might already be the OS that is doing this
<jmercouris> instead of calling cffi:load-foreign-library
<jmercouris> ah, because of dlopen
<MichaelRaskin> I would check is the library is loaded even before your code runs
<jmercouris> it is loaded before my code runs
<jmercouris> my code is only "hello world"
<jmercouris> this is just trying to handle loading of foreign libraries
<MichaelRaskin> OK, before the CFFI load path is set
<jmercouris> I can confirm it is happening before it is set
<jmercouris> if you see the printout
<MichaelRaskin> Well, CFFI does not reload already-loaded libraries as far as I remember
<jmercouris> you are correct
<jmercouris> this is handled by deploy by maybe-reload-library
<jmercouris> I'm in SBCL so they are not already loaded I believe
<MetaYan> jmercouris: What's in your cffi:*foreign-library-directories* ?
<jmercouris> I do not understand why is it searching for love in all the wrong places
refpga has joined #lisp
<jmercouris> MetaYan: https://pastebin.com/VuH42DSf
<jmercouris> and yet we see /opt/local/lib!!!
<jmercouris> WHERE IS IT GETTING THAT FROM? I even modified darwin frameworks path
<MichaelRaskin> set | grep /opt/local
<jmercouris> MichaelRaskin: can you elaborate?
shka_ has quit [Ping timeout: 272 seconds]
<jmercouris> run that in a terminal? where?
shka_ has joined #lisp
<MichaelRaskin> (also, possibly, check /etc/ld* fpr /opt/local)
<MichaelRaskin> Yes, as a terminal command — check if there is an environment variable with such contents
<jmercouris> there is no /etc/ld, i'm on macOS
<jmercouris> there are environment variables with such contents yes
<jmercouris> my path contains it for example
<MichaelRaskin> Well, there is never /etc/ld even on Linux
<jmercouris> echo $PATH -> /Users/jmercouris/User:/opt/local/sbin:/opt/local/bin:/opt/local/Library/Frameworks/Python.framework/Versions/Current/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin:/Library/Apple/usr/bin:/Applications/Wireshark.app/Contents/MacOS
<jmercouris> for example
<MetaYan> jmercouris: That paste doesn't show cffi:*foreign-library-directories* . You see, on my macOS I have (CFFI::DARWIN-FALLBACK-LIBRARY-PATH), which adds /opt/local/lib
sdumi has joined #lisp
<jmercouris> ah there is a DARWIN-FALLBACK-LIBRARY-PATH!
cosimone_ has joined #lisp
<jmercouris> MetaYan: yes it does, CFFI: Foreign Library directories (/Users/jmercouris/Source/Lisp/xyz/bin/xyz.app/Contents/MacOS/../Resources/
<jmercouris> /Users/jmercouris/Source/Lisp/xyz/bin/xyz.app/Contents/MacOS/)
<jmercouris> it should not be touching that though unless *foreign-library-directories* is not set, which it is
<MetaYan> I mean the actual contents of cffi:*foreign-library-directories*
cosimone has quit [Ping timeout: 264 seconds]
<jmercouris> MetaYan: https://pastebin.com/Sac021HB
<jmercouris> oh, that's what you mean
<jmercouris> I can only print in this case
karswell has joined #lisp
<jackdaniel> since we discuss cffi pats not really related to common lisp, any idea why after enabling terminal raw mode, if the very first input is i.e C-c it is delivered as a signal?
<jackdaniel> parts*
duuqnd has quit [Remote host closed the connection]
duuqnd has joined #lisp
<MetaYan> And the output of (print cffi:*foreign-library-directories*) doesn't give something like https://termbin.com/3g28 ?
<jmercouris> let me try that
<jmercouris> I think it is expanded
<jmercouris> yeah, it is expanded: (#P"/Users/jmercouris/Source/Lisp/xyz/bin/xyz.app/Contents/MacOS/../Resources/" #P"/Users/jmercouris/Source/Lisp/xyz/bin/xyz.app/Contents/MacOS/")
<jmercouris> but that's all there is in there
<jmercouris> here are the fallback dirs though
<jmercouris> (/Users/jmercouris/lib/ /opt/local/lib/ /usr/local/lib/ /usr/lib/)
<jmercouris> it is probably hitting the fallback dirs, and the question is therefore why?
Kundry_Wag has joined #lisp
<jmercouris> im going to take a break and be back later
doesthiswork has joined #lisp
random-nick has quit [Quit: quit]
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
cosimone_ is now known as cosimone
frodef` has joined #lisp
frodef has quit [Ping timeout: 260 seconds]
jprajzne has quit [Client Quit]
jprajzne has joined #lisp
duuqnd has quit [Remote host closed the connection]
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
duuqnd has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
pjb has joined #lisp
rogersm has joined #lisp
frodef` has quit [Ping timeout: 265 seconds]
flazh has quit [Ping timeout: 264 seconds]
JohnMS_WORK has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
rogersm has quit [Ping timeout: 272 seconds]
random-nick has joined #lisp
Kundry_W_ has joined #lisp
Kundry_Wag has quit [Read error: Connection reset by peer]
shidima has joined #lisp
* beach hesitates to tell jmercouris about the very simple technique for avoiding all those FFI problems.
orivej has quit [Ping timeout: 264 seconds]
X-Scale` has joined #lisp
<_death> the WIIL technique
* phoe hesitates to tell beach about the very simple technique of failing to create a web browser following today's HTML5/CSS/JC standards
X-Scale has quit [Ping timeout: 256 seconds]
X-Scale` is now known as X-Scale
* beach hesitates to tell phoe that there are other projects than web browsers that need to be worked on.
<jackdaniel> I'm not hestitating to say, that tracking OSX linking problems (even with cffi) is not very ontopic on this channel
<beach> True.
<phoe> right
<jackdaniel> I've tried to signal it with a joke about terminal in raw mode and interrupts, but I think I've failed communication-wise
doomlist3 has joined #lisp
ski has quit [Ping timeout: 258 seconds]
ski has joined #lisp
kpoeck has quit [Remote host closed the connection]
orivej has joined #lisp
heisig has quit [Quit: Leaving]
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
rippa has joined #lisp
SGASAU` has joined #lisp
kpoeck has joined #lisp
SGASAU has quit [Ping timeout: 246 seconds]
jprajzne has quit [Client Quit]
jprajzne has joined #lisp
luis has quit [Quit: The Lounge - https://thelounge.chat]
luis has joined #lisp
X-Scale` has joined #lisp
X-Scale has quit [Ping timeout: 246 seconds]
X-Scale` is now known as X-Scale
<doomlist3> (push 4.4 '(1)) illegal function call does push only accept variables
<jmercouris> yes
<jmercouris> just imagine the location must be setfable
<beach> doomlist3: (push <value> <place>) is roughly the same as (setf <place> (cons <value> <place>))
<beach> doomlist3: And you can't do (setf '(1) ...)
<pjb> doomlist3: and beware with (let ((x '(1))) (push 4.4 x) x) #| --> (4.4 1) |# because only the first cons is mutable! The last cons is (1) which must be considered immutable since you quoted it!
<Bike> you can do (cons 4.4 '(1)) and get (4.4 1) if you want
<pjb> doomlist3: to initialize a mutable list, use list, make-list, etc.
<pjb> so it would be better to use (list 4.4 1) #| --> (4.4 1) |# to get a fully mutbale list!
<pjb> (let ((x (list 1))) (push 4.4 x) x) #| --> (4.4 1) |# fully mutable list.
shka_ has quit [Ping timeout: 240 seconds]
shka_ has joined #lisp
toorevitimirp has quit [Remote host closed the connection]
toorevitimirp has joined #lisp
jw4 has quit [Read error: Connection reset by peer]
milanj has quit [Quit: This computer has gone to sleep]
<beach> doomlist3: Your problems are so basic that you should probably move your questions to #clschool.
duuqnd has quit [Quit: Leaving]
jw4 has joined #lisp
samlamamma has joined #lisp
toorevitimirp has quit [Remote host closed the connection]
arbv has quit [Ping timeout: 272 seconds]
toorevitimirp has joined #lisp
rogersm has joined #lisp
liberliver has quit [Ping timeout: 264 seconds]
liberliver has joined #lisp
arbv has joined #lisp
toorevitimirp has quit [Remote host closed the connection]
rogersm has quit [Ping timeout: 258 seconds]
toorevitimirp has joined #lisp
wsinatra has joined #lisp
whiteline_ has quit [Read error: Connection reset by peer]
toorevitimirp has quit [Remote host closed the connection]
whiteline has joined #lisp
refpga has quit [Ping timeout: 265 seconds]
toorevitimirp has joined #lisp
refpga has joined #lisp
<beach> doomlist3: Also, it would be good if you would at least acknowledge that you saw the advice that was given to you, and even better if you would tell us whether you understood it or not.
<doomlist3> yes
toorevitimirp has quit [Remote host closed the connection]
toorevitimirp has joined #lisp
<jmercouris> what is a CFFI framework vs a shared library?
<jmercouris> doomlist3: are you trapped in a slow motion timewarp?
<doomlist3> no
<jmercouris> ah, so you are just a jerk then, OK
<doomlist3> jmercouris: what do you mean i am in slow motion... i answered immediately
<jackdaniel> jmercouris: please do not be rude
<doomlist3> jmercouris: ok your question-- idk anything about that
<doomlist3> cffi vs ... never used it
refpga has quit [Ping timeout: 260 seconds]
<jmercouris> jackdaniel: 1
<jmercouris> jackdaniel: yes
doomlist3 has left #lisp ["gone fishing"]
narimiran has quit [Ping timeout: 246 seconds]
refpga has joined #lisp
<jmercouris> I bet a good tool to detect typos could be used when you cant do real code analysis
<jackdaniel> I'm sure that the macro uiop/package:define-package code-walks its arguments and fixes all uoip typos
<jmercouris> just find things with VERY CLOSE levenshtein distance
<jmercouris> and show them and you can quickly glance and see if they are logical
<_death> the dmwi feature
<jackdaniel> :-)
<samlamamma> _death:Do Me what I?
<jmercouris> do what I mean
<jmercouris> get it?
<samlamamma> Oh right, close levenshtein distance haha
<samlamamma> Should've read the rest of it first.
<samlamamma> This is why stack semantics for chat is bad!
<luis> Speaking of CFFI, mid-30s-luis is quite disappointed at some of early-20s-luis's design decisions and particularly angry at late-20s-luis's integration of foreign-structs-by-value...
<jmercouris> luis: can you explain why load-foreign library is ignoring a path?
<jackdaniel> dam youngsters ;
<jackdaniel> ;)
<luis> cffi:*default-foreign-encoding* was a bad idea. What was he thinking?
<jmercouris> I've written: (cffi:load-foreign-library (library-name library) :search-path "/Users/jmercouris/Source/Lisp/xyz/bin/xyz.app/Contents/MacOS/../Resources/")
<jmercouris> and YET
<jmercouris> dyld: loaded: <9C53D76D-70B1-346A-992A-E5E4D60225EA> /opt/local/lib/libssl.dylib
<jmercouris> how can it be?
<jmercouris> luis: I assume you are luis oliveiro from the source?
<jmercouris> s/oliveiro/oliveira?
<luis> not, that one is early-20s-luis. I'm mid-30s-luis. Pay attention.
<jmercouris> I see
<jmercouris> can you perhaps look into your crystal ball into the path and explain to me why that is happening?
<jmercouris> or a place where I can start investigating?
<luis> jmercouris: ISTR search-path is only used as a fallback if dlopen() fails to find your library the first time around
bitmapper has joined #lisp
<luis> jmercouris: but younger-fe[nl]ix is the one to blame for adding that feature and not documenting it in the manual!
<luis> fe[nl]ix: shame!
<bitmapper> the ccl ide really doesn't want me to add dark mode support
<jackdaniel> luis: pay attention, it's not fe[nl]ix but younger-fe[nl]ix who should be put at shame! ;-)
<luis> :D
<jmercouris> luis: any way to force the behavior?
<luis> jmercouris: pass the absolute path to load-foreign-library?
<jmercouris> I'll give that a try, thank you
<jackdaniel> speaking of: fe[nl]ix is there any chance for marging mailbox support to bordeaux-threads?
<jackdaniel> merging*
gko has quit [Ping timeout: 240 seconds]
gko has joined #lisp
toorevitimirp has quit [Remote host closed the connection]
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
rpg has joined #lisp
milanj has joined #lisp
dddddd has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
yankM has joined #lisp
<jmercouris> luis: that works, thanks
<jmercouris> luis: I'm just wondering why it doesn't look in the foreign library directories and instead tries these random paths
<jmercouris> well, they aren't random, but they are not in the cffi foreign library directories
<jmercouris> I wish there was at least an option to only look in the foreign-library search paths because the reason I have had this strugge is because libssl HAPPENS to be supplid on Darwin, but my Lisp is using a different version
<jmercouris> s/strugge/struggle
flazh has joined #lisp
<xristos> jmercouris: looking at the code usually provides definitive answers to these sort of questions
rogersm has joined #lisp
kpoeck has quit [Ping timeout: 245 seconds]
<jackdaniel> why bother, there are literally 427 of volunteers to help on #lisp
<Archenoth> Glad to be on board
abhixec has joined #lisp
efm has quit [Ping timeout: 256 seconds]
SGASAU` has quit [Remote host closed the connection]
narimiran has joined #lisp
<fe[nl]ix> jackdaniel: I'll go over it this weekend
<jackdaniel> fe[nl]ix: alright, thank you
<pjb> jackdaniel: the trick is that those 427 volunteers do indeed look at the code to get the definitive answers!
dale_ has joined #lisp
gko has quit [Remote host closed the connection]
dale_ is now known as dale
* jackdaniel makes a shocked face and leaves to make some tea (in a shocked manner of walking)
Kaisyu has quit [Quit: Connection closed for inactivity]
<fe[nl]ix> jmercouris: luis was right. the point of the search path is to have a list of often used directories, as a fallback
<fe[nl]ix> if you already know the exact location of the library, just construct an absolute pathname and load that
<jmercouris> the code says WHAT
<jmercouris> I asked WHY
<jmercouris> and if you didn't have a habit of trying to make people look stupid and making snarky comments, you would see that
<jmercouris> and I addressed the author, not the channel in general
<jmercouris> I really don't think jackdaniel should be a moderator to this channel
<jmercouris> he is not impartial and is abrasive
<LdBeth> good morning
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rogersm_ has joined #lisp
jonatack has quit [Ping timeout: 260 seconds]
<phoe> jmercouris: I assume that this would be to solve a problem that is the inverse of yours: CFFI being unable to find libraries on Darwin even if they were located in directories available by default
<jackdaniel> I don't remember when I have last used moderator privigiles, but it is a fact that I'm sometimes tempted to kick and ban you, and some of the reasons are even valid :) that said I'm not overly attached to the '@' sign.
theseb has joined #lisp
<phoe> while you want to avoid loading libraries from /opt/ as a software deployer, some other people might want to load libraries from /opt/ as software developers
<phoe> that's how I understand the "Darwin fallback" term in that source code
<phoe> "if you can't find it in the list of CFFI dirs, fall back to the default list; if you can find it there, good, and if you can't find it there, signal an error"
<fe[nl]ix> jmercouris: because especially on OSX, there are package managers like MacPorts, Brew, etc... which can install libraries in locations that are not in the default search path of libc
<jmercouris> phoe: well, they are located in that directory by default, but of course the system supplied libraries are frequently out of date
<fe[nl]ix> so dlopen() won't see them by default
<jmercouris> fe[nl]ix: I am asking why we can't prioritize the paths in foreign-library-directories and THEN try others
<fe[nl]ix> because it's not the right way to do things
<jmercouris> why that choice? why offer the user the ability to set it when it will ignore it?
<fe[nl]ix> system-wide should be the default
<jmercouris> ah, well in that case :-D
<jmercouris> man, I should have consulted the source code
jonatack has joined #lisp
rogersm_ has quit [Ping timeout: 258 seconds]
<jmercouris> I would have totally seen that
<fe[nl]ix> and if you already know the exact location, building an absolute path is one make-pathname away
<jmercouris> it causes many problems when making app bundles, I will just say that
<theseb> OMG i took a peak at Let Over Lambda....that seems like it is going to be an amazing read...I love the author's passion.....Don't be ashamed of macros...rather, turn them up to an 11 and let you "freak flag" fly!
<jmercouris> I understand now the idea behind specify absolute path, but it is a little bit problematic in the case of an app bundle
<phoe> theseb: Let Over Lambda is a wonderful exercise in mind-bending macros that you will likely never use in actual application code
<xristos> jmercouris: nobody is obligated to spend his personal time and educate you for free, but your manners imply otherwise
<jmercouris> xristos: sure thing pal
<fe[nl]ix> jmercouris: how is it problematic ?
<jmercouris> xristos: I'll reply RTFM next time someone asks me a question on my channel too, I'm sure that will win me many friends
gravicappa has quit [Ping timeout: 260 seconds]
<jmercouris> fe[nl]ix: for example, I've set foreign library directories to be a relative dir within my app bundle, it will behave as expected for libs not found on a typical system, however when I get to a lib that IS on a typical system it will try to use that one, which may be differenet
<phoe> I enjoyed the read, but I never really came back to the book afterwards; it was certainly a good read to see what the Lisp macro system is capable of, but it has little "replayability value" to me since the author's style does not really align with the contemporary Lisp style that I know
<jmercouris> different than the one I compiled with
<jmercouris> fe[nl]ix: so the result is I cannot rely on foreign library directories and must always calculate an absolute path to every shared library within my app bundle to avoid potentially using the wrong system library
<phoe> jmercouris: you seem to be trying to solve the problem of deploying applications and ensuring that the libraries that you bundle are going to be loaded
<jmercouris> that is exactly the problem
<jmercouris> and SOME were loaded from the bundle but not others
<phoe> I remember Shinmera cursing multiple times when he was working on Portacle due to a similar problem
<jmercouris> yes, I am also using Nicolas' software, which I've modified
<phoe> it wasn't CFFI but emacs loading up stuff that it wasn't bundled with, but the idea is the same
<jmercouris> anyways, it has been a frustrating experience
<jmercouris> and the last thing I want to hear is a comment about "read the source code" as if I haven't been
heisig has joined #lisp
<LdBeth> I would rather let the user fix up libraries
McParen has left #lisp [#lisp]
<LdBeth> Otherwise you might use App bundles that should handle dynamic libraries properly
<LdBeth> If it’s a product that you gonna to distribute
<fe[nl]ix> jmercouris: LD_LIBRARY_PATH should be able to do what you want
Lycurgus has joined #lisp
<jmercouris> fe[nl]ix: not sure I can set that in an app bundle, but thanks for the tips
<phoe> Bike: that typo in UIOP was fixed
<phoe> thanks for noticing it and giving a heads-up
liberliver has quit [Ping timeout: 246 seconds]
<fe[nl]ix> you write a wrapper shell script that sets up the environment and calls your binary
<samlamamma> jmercouris:You probably already know this, but can't you just bundle your shared libraries as a pre-determined relative path to your application?
<phoe> samlamamma: I think he's already doing it
shidima has quit [Ping timeout: 265 seconds]
<phoe> and the issue is that the /opt/ ones are prioritized anyway, and these are the ones that get loaded
<samlamamma> Aha, ouch.
<fe[nl]ix> jmercouris: see https://www.manpagez.com/man/3/dlopen/, section "Searching"
sdumi has quit [Ping timeout: 240 seconds]
<phoe> I bet that if macOS bundling worked in this exact way, we wouldn't see any of that frustration or sparks that start flying off the channel
sdumi has joined #lisp
<phoe> let's assume good faith of everyone involved in the discussion and continue
<phoe> and then, later and in retrospective, possibly turn this into a blogpost of sorts
<phoe> there's going to be people deploying Lisp apps for macOS with foreign dependencies in the future; they might stumble upon a similar issue
sdumi has quit [Read error: Connection reset by peer]
sdumi has joined #lisp
<luis> fe[nl]ix: what do you think about augmenting CFFI's :string type to accept a special variable name that can be looked up at runtime so that each library can control their own encoding? E.g., (defcfun foo (:string :encoding mylibrary:*foreign-encoding*) ...)
<fe[nl]ix> why at runtime and not at compile-time ?
<fe[nl]ix> this is potentially slow because it defeats all compiler-macro optimizations in babel
<luis> My motivation is some FFI for accessing a database that sometimes wants one encoding sometimes others, depending on the environment.
<LdBeth> Configuring by rebuilding
<luis> Babel doesn't have any compiler macros.
<fe[nl]ix> inlining ?
jw4 has quit [Quit: tot siens]
jw4 has joined #lisp
<fe[nl]ix> sure, it can be done
<luis> You have to look up the encoder/decoder by name. Note that by default, :string will go through *default-foreign-encoding*
<fe[nl]ix> is this for Oracle ?
FreeBirdLjj has quit [Remote host closed the connection]
<luis> Bingo.
<fe[nl]ix> lol
Fare has joined #lisp
<fe[nl]ix> how do you decide the encoding ? only when connecting to the DB ?
<fe[nl]ix> anyway, I'm ok with it, I don't see a much better way
<fe[nl]ix> go to go
<luis> This is probably not Oracle's fault. You can write whatever bytes you want in the database. Some clients use one encoding, other clients use a different one... Clients have control over these settings like it's the 1990s ¯\_(ツ)_/¯
terpri has quit [Remote host closed the connection]
kpoeck has joined #lisp
<fe[nl]ix> wow
<fe[nl]ix> I feel your pain
remix2000 has joined #lisp
<luis> No pain. I stay away from the database.
<phoe> blessings of the elder gods upon you who needs to interface with that bullsh#<error printing vowel>t
corpix_ has joined #lisp
corpix has quit [Ping timeout: 240 seconds]
rogersm has quit [Quit: Leaving...]
scymtym has quit [Ping timeout: 244 seconds]
refpga has quit [Read error: Connection reset by peer]
refpga has joined #lisp
luis has quit [Quit: The Lounge - https://thelounge.chat]
jprajzne has quit [Quit: jprajzne]
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
luis has joined #lisp
akoana has joined #lisp
rpg has joined #lisp
mikecheck has joined #lisp
rogersm has joined #lisp
rogersm has quit [Ping timeout: 256 seconds]
fourier has joined #lisp
kpoeck has quit [Ping timeout: 245 seconds]
<Bike> can anyone think of a situation in which the transform (if (not [test]) [then] [else]) => (if [test] [else] [then]) is not valid?
samlamamma has quit [Ping timeout: 244 seconds]
<phoe> hmmmm. if [test] returns no values then the missing value is coerced into NIL, which still works correctly after that transformation
<phoe> if control is transferred out of the test, neither option is evaluated, same thing after the transformation
<phoe> seems bulletproof to me
ahungry has joined #lisp
<Bike> same... wonder what i'm seeing then
<phoe> what are you seeing
madand has quit [Quit: ZNC 1.7.5 - https://znc.in]
* Lycurgus assumes concurrency isn't at issue
madand has joined #lisp
funnel has quit [Ping timeout: 260 seconds]
funnel has joined #lisp
Lycurgus has quit [Quit: Exeunt]
<Bike> well, i'm seeing it not be equivalent, basically. and no obvious example of a [test] it's not working for, of course.
<Bike> does concurrency matter? doesn't seem like it ought to.
<phoe> Bike: hold on for a second
<phoe> if you see it not be equivalent, then you need to have some example to back it up
<phoe> otherwise, if there's no such example, then it is equivalent
<Bike> i mean there is such an example (or something else is going wrong), i just don't know what it is because the error isn't anything obvious.
<phoe> I kind of wouldn't expect that transform to be at fault here though
<Bike> it's the only difference.
<phoe> or rather, the idea behind that transform
<Bike> me neither, i'm asking as a sanity check
<phoe> OK
theseb has quit [Quit: Leaving]
refpga has quit [Ping timeout: 256 seconds]
theseb has joined #lisp
rogersm has joined #lisp
karlosz has joined #lisp
scymtym has joined #lisp
<jackdaniel> Bike: maybe (if [test] foo) is transformed to (if (not [test]) foo) due to i.e calling reverse on "rest" args?
<Bike> no, that should be handled. not a bad idea though, it's probably something dumb on my part like that
PuercoPope has left #lisp ["Killed buffer"]
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
madmonkey has joined #lisp
kpoeck has joined #lisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
<yottabyte> if I want to use Drakma to make a request and work with a json response, what's the best way to do that? for example, if I make the request (drakma:http-request "http://ip.jsontest.com/") which returns a simple json response, it's received as an octet stream. is the best way to use some library to turn this into a map? how would I do that? I tried using yason like the Drakma guide did, but I got an SSL exception
<yottabyte> the http-request itself is successful, though
dalz has quit [Remote host closed the connection]
refpga has joined #lisp
<phoe> yottabyte: SSL exception? what sort of?
<phoe> SSL has nothing to do with JSON
<yottabyte> An I/O error occurred: undocumented reason (return code: 5). SSL error queue is empty. [Condition of type CL+SSL::SSL-ERROR-SYSCALL]
<yottabyte> I did the following: https://pastebin.com/1sDFaX7i
<phoe> a workaround is to go from https:// to http://
<yottabyte> That's just straight from the Drakma page though. I'm willing to use anything
<phoe> I wonder why CL+SSL would generate such issues though
<yottabyte> oh that worked!
<pve> Is it allowed to subclass standard-method and add an instance of the subclass to an instance of standard-generic-function? When I try it, the method goes in, but upon inspection of the generic function, it shows the method to be of type standard-method instead of the subclass.
rogersm has quit [Quit: Leaving...]
<phoe> pve: could you post a code example?
rogersm has joined #lisp
<pve> sure, just a sec
<yottabyte> so phoe: that returns a list, but it doesn't appear to be a plist, how do I work with it? should I really look to make a map out of it instead of a plist?
<phoe> yottabyte: look up yasom's manual for that
<phoe> every JSON library returns its own thing, really
<phoe> and has its own internal format of dealing with things
<yottabyte> should I use yason or cl-json?
<_death> whatever you do, don't use cl-json
<Bike> pve: the answer is yes, though, so probably there's some other issue
<yottabyte> ha, thanks
rpg has joined #lisp
* dlowe looks at all his projects that use cl-json
rogersm has quit [Ping timeout: 272 seconds]
<pve> phoe: something like this:
<pve> Bike: ^
rogersm has joined #lisp
<phoe> pve: DEFCLASS DELEGATOR-METHOD
<phoe> I also need it
amerlyq has quit [Quit: amerlyq]
<Bike> and you're just using generic-function-methods to get the method list?
<Bike> i can't imagine an implementation changing class of a method
<pve> phoe: added the defclass
<pve> i'm inspecting the gf in slime's inspector
<Bike> could you check (generic-function-methods gf)?
<pve> i just did, but it also reports all standard-method
<pve> hmm
<_death> yottabyte: actually yason has the same defect as cl-json.. sigh, just use something with a sane default such as com.gigamonkeys.json
<Bike> what implementation are you on?
<pve> sbcl
<Bike> Do you have a custom method on add-method?
<yottabyte> _death: what defect is that?
<Bike> and the generic function class is just standard-generic-function, you said...
<pve> Bike: no.. do I need one?
<Bike> you shouldn't.
<_death> (eql (yason:parse "false") (yason:parse "null")) ==> true
sauvin has quit [Read error: Connection reset by peer]
<pve> yes, standard-generic-function
<pve> oh sorry, I'm getting called away, brb
fourier has quit [Ping timeout: 260 seconds]
<pve> so the method subclass is the only thing I added..
<Bike> and you're checking generic-function-methods immediately after the add-method call?
<Bike> or is there intervening code?
<Bike> oh, and you should give your method qualifiers
<Bike> til sbcl has an initform nil on the qualifiers slot
<pve> hm I think I discovered a mistake now
<pve> ok, I think I know what's going on.. will explain shortly
_heisig has joined #lisp
<phoe> pve: cannot reproduce
milanj has quit [Quit: This computer has gone to sleep]
ljavorsk has quit [Ping timeout: 256 seconds]
heisig has quit [Ping timeout: 264 seconds]
<pjb> Bike: assuming it's a 3 argument IF, and assuming [then] and [else] don't have read-time side-effects, yes.
<pjb> Bike: (if (not nil) #.(incf *foo*) #.(progn (incf *foo*) *bar*)) wouldn't work…
<pjb> Bike: or (if (not nil) #.(incf *foo*) #.(bar *foo*)) wouldn't work…
RukiSama_ has joined #lisp
rogersm has quit [Quit: Leaving...]
RukiSama has quit [Ping timeout: 260 seconds]
terpri has joined #lisp
shka_ has quit [Ping timeout: 240 seconds]
dddddd has joined #lisp
ayuce has quit [Read error: Connection reset by peer]
orivej has quit [Ping timeout: 258 seconds]
<phoe> oh my goodness
Jesin has quit [Quit: Leaving]
orivej has joined #lisp
<phoe> we can use that for parsing dpANS3!
rogersm has joined #lisp
mikecheck has quit [Remote host closed the connection]
karswell has quit [Remote host closed the connection]
Jesin has joined #lisp
karswell has joined #lisp
rogersm has quit [Ping timeout: 256 seconds]
<phoe> (in-package :user)
<phoe> woo boy
<dlowe> I wrote a latex parser for dpANS3 and it was super hard to get right
<phoe> dlowe: oh! could you link it?
jeosol has quit [Remote host closed the connection]
kpoeck has quit [Remote host closed the connection]
<dlowe> I never made it work well enough that I wanted to publish it
<phoe> dlowe: I could try fixing it up
<dlowe> and then I had a kid
rogersm has joined #lisp
<dlowe> I was never convinced I was on the right track at all
<phoe> it's time for me to pull the ultraspec out of the freezer
<dlowe> What I was really after was a canonical s-exp form of the spec
<phoe> sounds similar to what I'm after
<dlowe> that could be used for whatever instead of the original
holycow has joined #lisp
<dlowe> I thought you made a by-hand wiki
<phoe> I did
<phoe> and then I stopped and actually thought about what I'm doing
<phoe> and it turns out I should have reversed the two steps
<dlowe> I can't say you were wrong to try it.
<phoe> I can't say it either
<phoe> now I know what the next step should look like
<dlowe> Having another html spec form would have been really great
<phoe> once we have sexprs, we can generate all the HTML we want though
<dlowe> nod, that was the theory
<phoe> and I fscked the theory up by the handiwork wiki
<pve> Bike: ok I can see the method subclass getting added to the gf now, the weirdness was caused by a little thinko. Won't bore you with the details..
<phoe> time to take a step backwards
<pve> thank you for your help, Bike, phoe
Cymew has quit [Ping timeout: 265 seconds]
karswell has quit [Read error: Connection reset by peer]
<phoe> <3
Krystof has quit [Ping timeout: 260 seconds]
rogersm has quit []
rogersm has joined #lisp
_heisig is now known as heisig
z147 has joined #lisp
heisig has quit [Quit: Leaving]
roelj has joined #lisp
<ralt> so, hm
<ralt> I am struggling to understand what cffi-toolchain point is
<ralt> what is it trying to do?
roelj has quit [Remote host closed the connection]
<ralt> I feel like I understood it to be one thing, but it looks like it can't do half of it, so I'm not sure it is supposed to be doing. IOW I'd like to know which problem it's solving, and guess its limitations from there.
<ralt> Fare: you might be able to help me there?
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rogersm has quit [Remote host closed the connection]
psilotorp has joined #lisp
<ralt> as I understand it, it is building an object file for every cffi-(grovel|wrapper)-file, bundling them all into a static library, then linking that static library with sbcl.o (or w/e is relevant to your implementation) to build an image.
gravicappa has joined #lisp
<ralt> so it does not handle foreign shared libraries at all, right?
<ralt> e.g. it doesn't help at all for iolib which relies on libfixposix, right?
<ralt> ok, looks like libfixposix is in major distros now at least
<jackdaniel> it is a useful library
<aeth> Yes, but on the other hand it's not a widely used library yet, so even though it's probably offered by your distro, it's also unlikely to be installed. (e.g. I don't have it installed, I just checked)
<Shinmera> portable deployment on linux is impossible so you're better off just cutting your losses and focusing on more useful work.
<dlowe> honestly more things should use libfixposix instead of re-implementing the wheel themselves
<phoe> Would it make sense to add numbers to CLHS dictionaries? Like, System Class LIST would become 14.2.1, System Class NULL - 14.2.2, etc..
<aeth> Portable deployment on Linux is possible in a dozen different ways. The three most popular are Flatpak, Snap, and AppImage. You can also use something remarkably heavyweight like Nix. Games usually use the Steam runtime.
<aeth> I suppose the real issue is that there's no consolidation in portable deployment on Linux. There's just... a dozen different ways.
<Bike> phoe: i think that's how it is in the actual standard?
<phoe> clhs 14.2.1
<specbot> Couldn't find anything for 14.2.1.
<Shinmera> aeth: those are all only portable to an extent.
<Shinmera> aeth: like all solutions.
<phoe> Bike: nope, AFAIK that doesn't apply for symbol dictionaries.
<phoe> clhs 14.2
<aeth> Shinmera: I mean, I could probably make a Linux distro that can't run any of those, but it's probably also a Linux distro that desktop users aren't going to be using.
<Shinmera> linux makes pretty much nil guarantees about what the system will look like and you're just fucked.
<Bike> phoe: i mean the ansi document, rather than the hyperspec
<Shinmera> so just cut your losses and do more useful work instead of wasting it on below 1% users.
<phoe> Bike: actually let me read
samlamamma has joined #lisp
<aeth> Shinmera: Literally any of the methods I listed, except maybe Nix, will cover > 95% of Linux desktop users. Just because you can't cover 100% doesn't mean you should give up.
<phoe> I can't see numeration there
<Shinmera> aeth: Choosing them is also a form of cutting your losses.
<aeth> Shinmera: This isn't even taking into account writing your code entirely in a portable language, like Java or, say, Common Lisp
<Shinmera> my point is that this obsession with creating a 'portable application' is a waste of time beyond those 95% of users.
<aeth> Just use Flatpak. Gnome bundles it so most people probably have it installed without even realizing that they have it installed.
<aeth> (And nearly every distro will support Gnome even if it's not a Gnome-defaulting distro)
<ralt> I'm actually okay with having to declare a bunch of dependencies in my packages
<ralt> I guess my main issue is one of misunderstanding -- "static-program-op" doesn't really make you think "shared binary with some embedded libraries, and not even all of them"
<ralt> Not being able to statically build libsqlite is ok. Looks like that's what all distros are forcing.
<ralt> when https://common-lisp.net/project/cffi/manual/html_node/Static-Linking.html says "To dump a statically linked executable standalone application", it really brings a lot of confusion :)
<ralt> I think I'll come up with a PR to fix the docs.
<phoe> (defmethod child ((document document) (position integer)) ...)
<phoe> (defmethod child ((position integer) (document document)) ...)
<phoe> I did not expect this level of wizardry in the code I'm reviving right now
<fe[nl]ix> ralt: I will give you the latest SBCL compiled with libfixposix statically linked
<fe[nl]ix> only Linux/x86_64, is that good enough ?
<fe[nl]ix> I need to automate this
<ralt> libfixposix was just an example :)
<fe[nl]ix> my plan is to automate it and distribute SBCL with libfixposix and openssl statically linked
<fe[nl]ix> that should cover a lot of people's needs
<ralt> if you could get a static sbcl binary that doesn't end up with thousands of memory corrupted errors, that'd be nice
<ralt> I could add more static libraries on top of it, dump images, and distribute static binaries
<fe[nl]ix> I have the first already
<fe[nl]ix> turning that into a DIY linkking kit is more difficult
Mawile has joined #lisp
<fe[nl]ix> what libreries do you need ?
<phoe> fe[nl]ix: I really like the sound of that
<fe[nl]ix> for the moment I can do this manually and stay on top of openssl security patches
<fe[nl]ix> but ideally I'd like an automated system that does that
<fe[nl]ix> phoe: ok, this weekend
<fe[nl]ix> dlowe: I should probably write some documentation and a nice website for libfixposix
<fe[nl]ix> and advertise it a little
Archenoth has quit [Ping timeout: 272 seconds]
smazga has quit [Quit: leaving]
<phoe> okay, TeX parser forked
<phoe> I'll make it compile tomorrow
* phoe gets his scheduled garbage collection
<Fare> fe[nl]ix, instead of libfixposix, I want a libkill-9posix
<Fare> but oh well, I suppose a libfixposix will do in the meantime.
<phoe> Fare: you and no-defun-allowed need to talk more often about kill-9ing posix and unix stuffs in general
<phoe> you two seem to have a lot in common on the matter
<ralt> ok, the main issue I seem to have at the moment is that (1) if I keep static-program-op as is, it still tries to load the foreign libraries that were statically embedded, but if (2) I unload all saved libraries before dumping the image, the binary doesn't know how to load it after restoring
<ralt> that sounds like a solvable problem
<Fare> ralt, maybe you can propose a better name for static-program-op. Or at least, better documentation.
<ralt> yup, I said so above already
<Fare> ralt, you can use the hooks of UIOP to do the unloading and reloading.
Necktwi_ has joined #lisp
<jackdaniel> static-ish-image-op
refpga has quit [Remote host closed the connection]
<Fare> I remember doing that unloading and reloading at ITA before UIOP existed to provide such portable hooks.
refpga has joined #lisp
<Fare> actually, UIOP embodies a lot of the lessons learnt the hard way at ITA.
<ralt> UIOP provides something similar to sbcl's *init-hooks*/*exit-hooks*?
<Fare> yes
<ralt> great, thanks
<Fare> see uiop/image.lisp
Necktwi has quit [Ping timeout: 256 seconds]
<Fare> except it's portable.
<ralt> my immediate question is: where should this code live?
<Fare> BUT, you need to explicitly call the UIOP functions (or hook them into SBCL's).
<ralt> with cffi-toolchain I have the nice advantage that I can just put :static-program-op in my .asd and everything is magic
<Fare> ralt: ASDF does call the appropriate UIOP hooks, at least by default
<Fare> (for ECL's sake, I kept a mode where it doesn't even use UIOP)
<ralt> essentially I just need to do a (loop for library in (cffi:list-foreign-libraries) unless (eq (cffi:foreign-library-type library) :system) do (cffi:close-foreign-library library))
<Fare> jackdaniel, any chance to merge ECL's fork of ASDF back into the mainline?
<jackdaniel> Fare: this fork are only some backported fixes, nothing to merge back
<Fare> ralt: #:*image-restore-hook* #:*image-prelude* #:*image-entry-point* #:*image-postlude* #:*image-dump-hook*
<ralt> I actually used *image-entry-point* the other day, should've noticed those ones as well
<Fare> jackdaniel, any reason not to "just" adopt ASDF 3.3.5 or whatever comes next with all the fixes?
<jackdaniel> there is plenty of reasons, the most pressing one is that last time I've checked "new" asdf plenty of things didn't work, most notably bundles
<Fare> if anything doesn't work about bundles, that's definitely a but. I remember spending a LOT of time making sure bundles would keep working on ECL and MKCL as well as on the other image-based Lisps.
<jackdaniel> another is that ASDF seems to grow without upper bound
<jackdaniel> so freezing just before 3.2 puts a cap on it. if someone wants to upgrade their asdf, then they load it as any other library
<Fare> jackdaniel, it's the purpose creep of ASDF, well described and explained in my ASDF3 paper. It has stopped when I left the helm.
<ralt> > First, finalize the image, by evaluating the POSTLUDE as per EVAL-INPUT, then calling each of the functions in DUMP-HOOK, in reverse order of registration by REGISTER-DUMP-HOOK.
<Fare> yup, ASDF3's ability to self-upgrade means that you can focus on stability, and people who need more features can "just" install a new ASDF in a registered path.
<ralt> I spent a good 30s grepping for register-dump-hook :)
<jackdaniel> to be honest if I had to upgrade asdf, I'd simply not load the old one
<jackdaniel> I don't trust the upgradability-creep
<Fare> jackdaniel, not everyone can afford to "not load the old one".
<jackdaniel> in that case I pity them!
<Fare> upgradability was a cost to pay, but it was paid for long ago. That part of ASDF just works, nowadays.
orivej has quit [Ping timeout: 260 seconds]
<Fare> Fare, imagine the world before ASDF2, where you couldn't upgrade, but you couldn't not upgrade either. No Lisp scripting was possible without being your own system administrator.
<Fare> Therefore, a lot of extra shell / perl / python / sed scripting... ugh.
<Fare> These days, between ASDF, cl-launch, quicklisp, etc., scripting in Lisp is quite easy (though CL has a higher barrier to entry than most languages).
narimiran has quit [Ping timeout: 272 seconds]
<jackdaniel> I'm sure there is a verbose explanation of each decision you took, I don't have plans to argue with them; I simply don't like huge chunks of the end effect
<jackdaniel> and of course I use ASDF daily, so it is certainly useful software to me
karayan has quit [Remote host closed the connection]
<jackdaniel> either way, thanks to a great feature of upgradability, there is no pressing need to update asdf version bundled with ecl
<ralt> Fare: sorry, it looks like I cannot login on gitlab.common-lisp.net, so I couldn't open an issue explaning that UIOP:DUMP-IMAGE's docstring is mentioning an apparently dead function (REGISTER-DUMP-HOOK)
karayan has joined #lisp
gravicappa has quit [Remote host closed the connection]
<Fare> send email to admin@common-lisp.net to create an account or get your password reset.
<Fare> ralt: it should be register-image-dump-hook, I suppose.
<ralt> thanks
<Fare> jackdaniel, yup, as long as it's stable and bug fixes get ported between the branches, your fork is most welcome and not a hindrance in any way (except for that lingering doubt about whether indeed all the bug fixes were ported).
<jackdaniel> I'm more concerned about backporting bugs than bugfixes
<Fare> jackdaniel, I remember my explanation: "it was not feature creep, it was mission creep"
orivej has joined #lisp
<Fare> jackdaniel, there certainly have been plenty of bugs in the 3.3 series. It looks much more stable now, though.
<ralt> alright, this seems to work, and I'm pretty happy with it https://gitlab.com/ralt/ballish/-/blob/master/ballish.asd#L33-43
<ralt> cc luis what do you think? ^
pve has quit [Quit: leaving]
Kundry_Wag has joined #lisp
Kundry_W_ has quit [Ping timeout: 272 seconds]
<ralt> Fare: any thoughts on the link? does that look like the correct way to go? IOW does it fit your understanding of static-program-op as well?
ahungry has quit [Remote host closed the connection]
jfrancis has joined #lisp
jfrancis has quit [Remote host closed the connection]
<Fare> ralt: you're doing it for all systems. Don't you want to do it just for one system? (say with an eql specializer)?
jfrancis_ has quit [Read error: Connection reset by peer]
jfrancis has joined #lisp
rpg has joined #lisp
<Fare> ralt, also, a system should be able to specify a :entry-point instead of setting it like that.
<Fare> rpg, ralt found a bug in UIOP docstring, s/REGISTER-DUMP-HOOK/REGISTER-IMAGE-DUMP-HOOK/
<ralt> Fare: that would make a lot of sense :) what about the idea behind closing those foreign libraries in a static-program-op?
kmeow has quit [Ping timeout: 244 seconds]
<ralt> the :entry-point thing is because calling (call-next-method) was failing, I assume because it's a :before, and cffi-toolchain is setting it that way in a :before. It's really my lack of Lisp knowledge, there.
kmeow has joined #lisp
<Fare> ralt, it sounds to me like it makes sense, as long as you devise a sensible mechanism to reopen in a new properly initialized environment.
<ralt> no need to reopen given that it's embedded, do I?
<Fare> if you don't have a universal such mechanism, it can't become the default for cffi-toolchain.
<Fare> not such about the "no need to reopen".
<rpg> ralt, Fare : just got on -- LM look and see what's up.
<ralt> Fare: it doesn't seem to be needed in my admittedly limited testing
<Fare> ralt: looks like you're the new cffi-toolchain maintainer.
<ralt> 🎉
<rpg> Fare, ralt -- This is in line 341, correct? Will fix and push.
<luis> ralt: It's definitely weird that static-program-op leaves these libraries open when dumping.
Lord_of_Life_ has joined #lisp
<rpg> done....
<ralt> rpg: slime-edit-definition is leading me to the giant asdf.lisp file, can't help with the line number, sorry
<luis> ralt: perhaps in Fare's original use case they were never opened in the first place?
<rpg> ralt: It's the docstring to DUMP-IMAGE, right? That's what I fixed.
<ralt> rpg: correct, thanks!
<Fare> ralt: there is a recipe on how to do better in the asdf/README.md -- (map () 'load (asdf:input-files :monolithic-concatenate-source-op "asdf/defsystem"))
z147 has quit [Quit: z147]
Lord_of_Life has quit [Ping timeout: 258 seconds]
Lord_of_Life_ is now known as Lord_of_Life
<ralt> Fare: sorry, better what?
<Fare> better debugging of ASDF, with line numbers.
<ralt> ah, debugging asdf
<Fare> at least, the line of the closest (with-upgradability)
<ralt> gotcha, thanks
* luis curses with-upgradability
<ralt> luis: not sure how that's possible given that dump-image means LOADing
<Fare> luis: There were ways around it. I could use `DEFUN*` and `DEFMETHOD*` and `DEFTYPE*` etc. at each statement instead of the wrapping.
<ralt> Fare: much nicer.
<Fare> luis: at this point, talk with rpg.
* luis eyes rpg
<rpg> luis -- I think this may be somewhat a problem with SLIME rather than anything else. I don't think it's WITH-UPGRADEABILITY specifically, since that's effectively just EVAL-WHEN.
<Fare> it's eval-when, but also declaring every function notinline and other shenanigans to ensure functions can be upgraded.
* rpg curses slime for never merging...
<luis> rpg: interestingly, M-. works for defclass and defmethod but not defun.
<Fare> a few of the with-upgradability shenanigans with :supersede might have been made obsolete by how ASDF3 preemptively upgrades ASDF early on then restarts if upgraded, vs ASDF2 that was trying to heroically upgrade itself mid-build (and failing in the hard cases).
<ralt> luis: should I open a PR with essentially this small loop closing foreign-libraries, but leaving the system ones?
<rpg> luis: Does M-. work the same in all lisp implementations? If not, are you specifically talking about SBCL?
<Fare> in particular, we don't try to update-instance-for-redefined-class anymore.
<luis> rpg: I'm specifically talking about SBCL. I /think/ it's SBCL's SB-INTROSPECT:FIND-DEFINITION-SOURCES-BY-NAME that's returning wrong results for defun* and defgeneric*
<Fare> luis: not for defun* and defgeneric*, but for the specific content of an expanded eval-when.
<rpg> luis: To debug slime, I have to figure out how to restore my configuration on top of master, including my waiting-for-more-than-six-years pull request :-P
<fe[nl]ix> Fade: the whole upgradeability is a wrong approach
<Fare> rpg: only 6 years? That's nothing, my PR...
<Fare> fe[nl]ix, yet it's necessary.
<fe[nl]ix> it's a software distribution problem, not upgrade
<Fare> fe[nl]ix, problem being, ASDF is driving the software distribution.
<luis> rpg: I think you're trying to tell me something :D
<fe[nl]ix> you don't need it if you have a way of loading the latest ASDF first thingg in the .rc file
<fe[nl]ix> it's a CL implementation distribution problem
<rpg> luis: You scratch my back, I scratch yours! #184...
Bourne has quit [Read error: Connection reset by peer]
<Fare> fe[nl]ix, "the" .rc file? Good luck convincing 15 different vendors to agree on "the" rc file.
<luis> ralt: it seems reasonable, but you're the cffi-toolchain maintainer!
<fe[nl]ix> Fare: no, simply showing users how to load asdf in the .rc
<rpg> luis: Looking at sbcl.lisp, hoping that I can recall how source code is found.
<fe[nl]ix> and possibly together with an implementation manager like cim or roswell
<luis> rpg: what about the "I do not believe that this is a final version" bit?
<Fare> ralt, cffi-toolchain was supposed to run on SBCL, ECL, MKCL, CLISP -- and could support more with work. Be sure to keep all targets working...
<ralt> :(
<rpg> luis: I don't know -- to be honest. I have been applying this patch on top of slime and running with it ever since.
<rpg> I wonder if I meant to make it easier to switch back and forth? Right now one just gets to specify if one prefers the original slime behavior or the ELI behavior (merging history instead of replacing).
<ralt> Fare: do you have a trick to run all of those? I know about roswell but am not particularly fan of fukamachi's work.
Lycurgus has joined #lisp
<rpg> luis: WRT finding definitions, I'm not sure how SLIME + SBCL does this. Allegro had 2 halves to it -- the compiler recorded only the source file, I believe, and then there was a way of declaring definition forms that ELI would use to search the corresponding file buffer to find the input definition. I believe SBCL stores file position as well as just the filename. Does slime just jump to the file position? That would account for why it gets
<rpg> increasingly worse at this as my interactive development session persists.
luja has joined #lisp
luja has quit [Quit: Leaving]
<Fare> ralt, roswell is not my style (I wrote cl-launch instead), but basically, you could use what comes with you debian or homebrew or nixpkgs distribution, to start with.
<Fare> Then in fare-scripts, I wrote my own scripts to rebuild each of the implementations I care for from source, in the cases where I need recent modifications to the implementation (which was the case a lot when I was writing ASDF3 and discovering plenty of implementation bugs)
<ralt> I'm surprised that MKCL is part of your implementations -- the little information I gathered from mailing lists and such showed little to no usage
<Fare> (or writing cffi-toolchain and depending on Google-originated patches that hadn't made it to upstream SBCL yet)
<luis> rpg: let's switch places. You rebase #184 and I'll debug find-definition :)
rgherdt has quit [Ping timeout: 256 seconds]
<Fare> ralt, it has at least one user. It also provided an alternative to ECL in the "linking, not dumping" style, so my code would remain properly abstracted.
<Fare> these days, CLASP is also in this style, IIUC.
<ralt> fair enough
<rpg> luis: Cool. Tell you what, though -- if we can work out why it is that WITH-UPGRADEABILITY is confusing SBCL, I'm happy to work with you to help fix it. Do you think it's as simple as SBCL looking up to find the enclosing top level form when it decides what the definition's file position is?
<ralt> I most likely won't test mkcl if it's not in fedora repos though :)
<Fare> rpg, my understanding of the WITH-UPGRADABILITY issue is that SBCL doesn't remember position information for individual forms (like CCL) but only for toplevel forms, so you'd need to break the with-upgradability into individual forms to have a different toplevel form per function.
<Fare> At which point, you'd use defun*, etc., directly, except hoisting the eval-when in them, if still needed.
<Fare> the ASDF3 upgrade strategy, as opposed to ASDF2, might remove the need for some eval-when's -- or not.
<Fare> and/or you could further specialize the way ASDF upgrades itself from source, so that it does NOT call perform on each file (which breaks without the eval-when) but specially emulates their behavior without the CLOS infrastructure, specially, just when bootstrapping ASDF.
<Fare> I don't see any great clean way to do that, and you'll have to be careful not to break the bundle operations.
<luis> Fare: sbcl does keep position for inner forms. It's something else.
<Fare> OK. well the inner-forms are themselves expanded. When expanding, does SBCL propagate to the post-expansion forms the information from the pre-expansion forms?
v88m has quit [Ping timeout: 264 seconds]
wsinatra has quit [Quit: WeeChat 2.8]
wsinatra has joined #lisp
<luis> that works too.
<rpg> Fare: I think that ACL ELI's way of doing this was better -- record the source file and then parse it at search time (with the ability to specify defining forms for things like your DEFUN*). Recording textual position is super-brittle if one interactively compiles forms (as, being someone who learned to program on a Symbolics, is something I do *all the time*).
<rpg> Recording source file position is great for C, but for a non-batch-compiled language... meh
theseb has quit [Quit: Leaving]
<rpg> luis: BTW, the other long-deferred PR is one that fixes compilation from strings on Allegro.
<pjb> rpg: true. However, lisp projects still contain a lot of static and rarely changing code. So this can still be useful 90% of the time even with lisp.
<luis> rpg: slime's find-definition doesn't rely on position alone, so it deals perfectly well with chaging source files
<luis> rpg: on SBCL that is. It works less well with ACL.
<rpg> luis: Does it? I find that for example, my compiler warnings start to wander around the file after a number of C-c c
<rpg> compilations
<luis> rpg: that's because you're using ACL and a 6-year-old SLIME :) I've fixed that in the meantime
<rpg> I think my patch for ACL addresses this by spoofing file names (from the buffer file) when compiling interactively.
<rpg> I don't think my SLIME is actually 6 years old -- just my PR. I have rebased it a few times since then.
<ralt> luis: I'm terrible at English https://github.com/cffi/cffi/pull/158
<luis> rpg: I've fixed a bunch of bugs with ACL warning positioning somewhere in the past 2-3 years
<rpg> Cool! I'll have a look.
kmeow has quit [Quit: No Ping reply in 180 seconds.]
kmeow has joined #lisp
<luis> ralt: I'm confused, didn't you say static-image-op bundled things like sqlite?
grumble is now known as rawr
<ralt> sorry for the confusion, it's been a confusing journey for myself as well
<luis> ralt: it's hard work becoming the cffi-toolchain maintainer!
<ralt> if someone has a hardcoded .so file somewhere, and loads it with cffi:load-foreign-library, does it become a system library?
<ralt> I would assume yes
<fe[nl]ix> yes
terpri has quit [Remote host closed the connection]
<luis> fe[nl]ix: what's the foreign-library type for? Yet another undocumented feature by young fe[nl]ix :)
terpri has joined #lisp
<luis> shame!
<yottabyte> question on yason and drakma: this works: (yason:parse (drakma:http-request "https://jsonplaceholder.typicode.com/posts/1" :want-stream t)) but if I don't have the :want-stream t, it fails. but I thought even without the :want-stream, a flexistream is returned
<fe[nl]ix> luis: to distinguish between groveler-generated libraries and the rest
<luis> fe[nl]ix: ACK
Lycurgus has quit [Quit: Exeunt]
<no-defun-allowed> yottabyte: possibly as one of the other values, but it may be closed already as Hunchentoot consumed the contents from it
<yottabyte> so I can't use yason:parse without :want-stream t?
<no-defun-allowed> Can it parse from a string?
<Fare> luis, ok, so do you have a fix in mind?
<Fare> if rpg is ok with expanding the with-upgradability into a tens of the same, then fine. IIRC, that slowed down compilation a bit, but that shouldn't matter much.
<Fare> It's mostly, do we want to rewrite every defun into a defun*, every defgeneric, maybe every defmethod, etc.
<rpg> Fare: If this can be automated, or if someone else does it, fine. But I don't have a weekend to spend grinding on that by hand.
<Fare> I'm not doing it. I'm just willing to consult on caveats.
<luis> I don't understand why find definition fails here yet.
<ralt> doesn't sound that hard with paredit + a couple of emacs macros
<rpg> luis: IIUC the problem is that SB-INTROSPEC isn't filling out the FORM-PATH, right?
<Fare> luis: it might be that the support for :supersede t / nil is what's breaking things, but it looks like this support is not really used anymore in ASDF3, so could be done away with.
<rpg> Like in your FAILS example, it should be (3 2), not (3), right?
<Fare> as in (defun (foo) ) versus (defun foo ).
<rpg> And FAILS-TOO path should be (7 1)
Jesin has quit [Quit: Leaving]
<Fare> where (foo) means (foo :supersede t) vs foo meaning :supersede nil
<luis> Yes, something like that.
<rpg> I haven't counted, but presumably the CHARACTER-OFFSET is to the start of the initial WITH-UPGRADEABILITY, not the nested DEFUN.
<Fare> This were necessary when upgrading from ASDF2, something less and less relevant, and I believe not used anymore
<Fare> We should probably get rid of the supersede feature.
<luis> rpg: the character offset seems to be from the beginning of the file excluding whitespace and comments or something weird like that
<ralt> luis: fyi, I have to go now, but I'm playing with testing the PR on ecl/clisp
Jesin has joined #lisp
<ralt> ECL is a bit slow at compiling.
<Fare> problem: to actually test that nothing is breaking, you must identify the worst old implementation / old asdf combination.
<ralt> ah, ECL seems broken before my patch :)
<Fare> and do the extra slow upgrade test.
<ralt> does it count if it's broken from the get-go? :P
cosimone has quit [Ping timeout: 252 seconds]
<luis> ralt: I think Fare is talking about WITH-UPGRADABILITY
<ralt> Ah, sorry, crossing streams
<yottabyte> no-defun-allowed: the return of the Drakma request isn't a string without :want-stream t. it's a Flexi-streams either way seemingly. yason can work with json strings, though
<yottabyte> but like you said the stream might already be closed without want-stream
* no-defun-allowed scratches head
<luis> Fare, rpg: so, understandably in retrospect, SBCL stores the position of the nearest read (i.e. non-consed) form. And that's with-upgradability.
<luis> Maybe mutating the form would work?
<luis> (ew)
<rpg> luis: I guess what I don't understand is that if that's all it does, why is there even a FORM-PATH?
<rpg> It seems to be made precisely for this use case.
remix2000 has quit [Quit: remix2000]
<Fare> luis: that's what I was trying to say, and apparently failed.
<Fare> rpg: I think the FORM-PATH is getting confused because of all the macroexpansion.
terpri has quit [Remote host closed the connection]
terpri has joined #lisp
terpri has quit [Remote host closed the connection]
terpri has joined #lisp
<luis> Fare, rpg: mutation works. (defmacro sort-of-like-upgradability (&body body) (setf (first (first body)) 'defun*) `(progn ,@body)) not sure what the spec has to say about it, though.
<rpg> luis, Fare sorry -have to run
random-nick has quit [Ping timeout: 256 seconds]
<Fare> I'm pretty sure the standard says that it's unspecified what happens if you modify a source form.
HiRE has quit [Quit: Later]
<Fare> IIRC, the problem that the EVAL-WHEN is fixing is to handle the case where an old ASDF compiles a new one, hasn't loaded it yet, and now tries to use the CLOS functions that are super confused between the old and the new state. And then there's the case when the gf is defined in one file, but some of the methods used by ASDF are defined in the next file, but are not available anymore (and that's why we use concatenate-source-op).
Kundry_Wag has quit [Ping timeout: 265 seconds]