Xach 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>
lisp123_ has joined #commonlisp
cjb has joined #commonlisp
lisp123_ has quit [Ping timeout: 265 seconds]
mister_m has quit [Ping timeout: 265 seconds]
CrashTestDummy3 has joined #commonlisp
CrashTestDummy2 has quit [Ping timeout: 258 seconds]
zacts has joined #commonlisp
kakuhen has joined #commonlisp
lisp123 has joined #commonlisp
scymtym has quit [Ping timeout: 245 seconds]
pegaso has quit [Quit: Leaving]
lisp123 has quit [Ping timeout: 256 seconds]
zacts has quit [Ping timeout: 246 seconds]
Bike has joined #commonlisp
lisp123 has joined #commonlisp
azimut has quit [Ping timeout: 244 seconds]
azimut has joined #commonlisp
cjb has quit [Ping timeout: 256 seconds]
lisp123 has quit [Ping timeout: 265 seconds]
cjb has joined #commonlisp
luis has quit [Quit: Ping timeout (120 seconds)]
luis has joined #commonlisp
edgar-rft has quit [Quit: Leaving]
Bike has quit [Quit: Connection closed]
tyson2 has quit [Remote host closed the connection]
srhm has joined #commonlisp
mister_m has joined #commonlisp
srhm has quit [Quit: Konversation terminated!]
derelict has quit [Ping timeout: 276 seconds]
prxq_ has joined #commonlisp
prxq has quit [Ping timeout: 255 seconds]
mister_m has quit [Remote host closed the connection]
mister_m has joined #commonlisp
<beach> Good morning everyone!
zacts has joined #commonlisp
<pillton> Good morning.
zacts has quit [Quit: Client closed]
zacts86 has joined #commonlisp
zacts86 has quit [Client Quit]
waleee has quit [Ping timeout: 256 seconds]
akoana has left #commonlisp [#commonlisp]
edgar-rft has joined #commonlisp
lisp123 has joined #commonlisp
Inline has quit [Quit: Leaving]
peterhil has joined #commonlisp
Lord_Nightmare has quit [*.net *.split]
lucerne has quit [*.net *.split]
spacebat1 has quit [*.net *.split]
kagevf has quit [*.net *.split]
pok has quit [*.net *.split]
gabc has quit [*.net *.split]
commandoline has quit [*.net *.split]
skyl4rk has quit [*.net *.split]
fishfinger has quit [*.net *.split]
pok_ has joined #commonlisp
commandoline_ has joined #commonlisp
pok_ is now known as pok
gabc_ has joined #commonlisp
kagevf has joined #commonlisp
fishfinger_ has joined #commonlisp
skyl4rk has joined #commonlisp
skyl4rk has quit [Signing in (skyl4rk)]
skyl4rk has joined #commonlisp
pok has quit [Changing host]
pok has joined #commonlisp
spacebat1 has joined #commonlisp
Lord_Nightmare has joined #commonlisp
lucerne has joined #commonlisp
happy-dude has quit [*.net *.split]
jmercouris has quit [*.net *.split]
etiago has quit [*.net *.split]
jmercouris has joined #commonlisp
etiago has joined #commonlisp
happy-dude has joined #commonlisp
CrashTestDummy2 has joined #commonlisp
CrashTestDummy3 has quit [Ping timeout: 265 seconds]
Oddity has joined #commonlisp
CrashTestDummy3 has joined #commonlisp
CrashTestDummy2 has quit [Ping timeout: 252 seconds]
mister_m has quit [Remote host closed the connection]
JeromeLon has quit [Remote host closed the connection]
gaqwas has joined #commonlisp
selwyn has joined #commonlisp
pillton` has joined #commonlisp
pillton` has quit [Remote host closed the connection]
pillton` has joined #commonlisp
pillton has quit [Ping timeout: 246 seconds]
spiaggia has joined #commonlisp
CrashTestDummy2 has joined #commonlisp
pillton` has quit [Quit: ERC (IRC client for Emacs 27.2)]
CrashTestDummy3 has quit [Ping timeout: 268 seconds]
selwyn has quit [Ping timeout: 245 seconds]
dsk has quit [Ping timeout: 252 seconds]
Lord_of_Life has quit [Ping timeout: 252 seconds]
Lord_of_Life has joined #commonlisp
selwyn has joined #commonlisp
recordgroovy has quit [Ping timeout: 258 seconds]
recordgroovy has joined #commonlisp
pve has joined #commonlisp
silasfox has quit [Ping timeout: 252 seconds]
shka has joined #commonlisp
blihp has quit [Quit: Leaving]
<_death> minion: memo for scymtym: you're right, there is :drag-callback.. it was something different that I can't recall at the moment
<minion> Remembered. I'll tell scymtym when he/she/it next speaks.
gaqwas has quit [Ping timeout: 276 seconds]
derelict has joined #commonlisp
PinealGlandOptic has joined #commonlisp
spiaggia has left #commonlisp [ERC Version 5.3 (IRC client for Emacs)]
hafat has quit [Ping timeout: 265 seconds]
amb007 has quit [Ping timeout: 265 seconds]
amb007 has joined #commonlisp
Qwnavery has joined #commonlisp
<Qwnavery> Hello, if someone has a moment to spare; I'm having some trouble getting quicklisp to recognize foreign libraries
<beach> Just ask your question.
<Qwnavery> It can't load libsqlite3 and sqlite3 for clsql library
Th30n has joined #commonlisp
<Qwnavery> I've searched and nothing comes up. I'm unsure if it's a fault of musl libc
<Qwnavery> - Using Voidlinux + musl, sbcl + quicklisp
<beach> I wasn't aware that Quicklisp could do foriegn code at all.
<Qwnavery> It may just be the clsql library then
<Qwnavery> Apologies, it is the library clsql
<_death> if you have the libsqlite3 shared library somewhere, you can check that the loader/cffi find it, see /etc/ld.so.conf and cffi:*foreign-library-directories* respectively
<pve> Qwnavery: does (quicklisp:quickload "sqlite") work?
<_death> oh right, ancient uffi.. well, it has *foreign-library-search-paths* according to that form
<Qwnavery> pvi it's installing, is there any reference for it or is it apart of the standard lib?
<Qwnavery> https://common-lisp.net/project/cl-sqlite/ is this the "sqlite" package?
<pve> Qwnavery: can you do (defparameter *DB* (sqlite:connect "mydatabase.db")), for instance?
<pve> Qwnavery: yes, that's the one
<Qwnavery> pve: it appears to be valid
<pve> Qwnavery: then it's probably clsql that's causing trouble
<Qwnavery> Yeah, is there any tangible performance benefit for using clsql for sqlite over sqlite?
<Qwnavery> if not then it's probably not worth trying to get foreign librarys working that's all
<pve> Qwnavery: both of those rely on foreign libraries
<Qwnavery> pve herm. ok. well sqlite is working so I'll stick with that I guess.
<pve> Qwnavery: you can probably forget about clsql for now
selwyn has quit [Ping timeout: 258 seconds]
selwyn has joined #commonlisp
<Qwnavery> you can tell, yeah I'm new. Apologies for being a nuisance. Thanks for your time. Really appreciated.
Qwnavery has quit [Quit: WeeChat 3.2]
hendursa1 has joined #commonlisp
prxq_ has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
prxq has joined #commonlisp
hendursaga has quit [Ping timeout: 244 seconds]
Jach has quit [Remote host closed the connection]
Jach has joined #commonlisp
lotuseater has joined #commonlisp
<lotuseater> good morning fellow lispers
<beach> Hello lotuseater.
unyu has quit [Quit: brb]
Melantha has joined #commonlisp
recordgroovy has quit [Ping timeout: 250 seconds]
recordgroovy has joined #commonlisp
<pl> ASDF can do some foreign code, and what ASDF can, QL can
<beach> Great!
<pl> And hello, I haven't been active here long, I feel... (Leenode migration doesn't count)
<beach> pl: Welcome back!
<lotuseater> hi there pl :)
<shka> pl: hi!
scymtym has joined #commonlisp
<pl> Anything particularly noteworthy in changes to common libs, implementations? I feel a bit behind on news
<beach> pl: The WSCL effort is well on the way: https://github.com/s-expressionists/wscl/tree/main/wscl-issues/proposed
<pl> Ooh, nice. Especially the part where it apparently codifies current real world behavior
<beach> That's the main idea with WSCL, i.e., do not invent anything that the main existing implementations don't already do.
<beach> So, just transfer reasonable and agreed-upon behavior to the specification.
cjb has quit [Quit: rcirc on GNU Emacs 28.0.50]
<beach> Bike created some "issues" that don't quire belong in WSCL, and we don't quite know how and where to present those. They don't belong because they discuss extensions and/or radical changes.
admich has joined #commonlisp
<beach> "quire"? I mean "quite", of course.
<lotuseater> pl: another very insteresting and well working project to notice is April by phantomics: https://github.com/phantomics/april
<lotuseater> it seems reasonable it even now outruns Dyalog APL which is 500.000 lines of C++ o_O
<moon-child> what do you mean by 'outruns'? Outperforms? I find that very unlikely
<moon-child> afaik it doesn't even do reference counting, which is necessary to get good-performing apl
<lotuseater> yes ok, it can't do anything up to now
<beach> moon-child: Why would a tracing GC not work?
<lotuseater> s/anything/eveythingr
<moon-child> (funny how languages differ that way :P)
<pl> Is refcounting needed when you have GC?
<moon-child> beach: it would 'work', but it would not perform well
<lotuseater> moon-child: can you shortly explain reference counting to me?
<beach> That sounds very surprising to me, given how reference counting works.
<pl> moon-child: why so? Runs contrary to all instincts and knowledge I have, so I'm curious
<beach> Same here.
<pl> The one time I've seen refcounting and "faster than tracing GC" actually work out was I think in Linear Lisp
<pl> And there it was essentially part of a trick to reduce trace time
<lotuseater> phantomics told me it is also planned (when stying with SBCL) to use SIMDs
<moon-child> First: apl tends towards small numbers of large objects, so the overhead of reference counting is lessened. Second: in apl, all object have value semantics. A statement such as 'x←y' is semantically a copy; however it can be implemented by making 'x' point to the same memory as that currently pointed to by 'y'. A statement like 'x ← x + y', then, can only be an in-place operation on the
<moon-child> memory pointed to by x if it is known that the reference count of x is 1
<moon-child> (where x is some very large array that it would be costly to copy)
<beach> Makes sense.
<lotuseater> yeah it's intended to handle BIG arrays ^^
<moon-child> *small numbers of large _and homogenous_ objects--an array of fixnums, say--so you don't need to maintain a reference count fo revery element
<beach> Avoiding the copy in many cases could dwarf everything else.
<pl> One-bit GC would work fine then
<pl> Sorry, one bit "reference counting"
<moon-child> pl: no
<moon-child> because you might create many references to some object, then delete all but one, at which point you should be able to perform operations on that object in place
<lotuseater> getting GC right when implementing a CL is one of the more tricky parts, right? Roger Corman said so in his talk about Corman Lisp.
<moon-child> lotuseater: gc is very touchy, yes; and design desiderata for GCs are somewhat application-specific
<pl> moon-child: would there be many references, or rather, big space to scan? Or rather, can the array refer suddenly to somewhere else in the middle, or can one optimize by allocating "no outbound refs" arenas?
<lotuseater> okay :) I thought about when one starts writing a language kernel in Rust, which does borrow checking and needs no GC, would the CL implementation still need GC? I think yes because of its very dynamic nature.
treflip has joined #commonlisp
<ecraven> lotuseater: it's not that Rust doesn't *need* a GC, it just doesn't have one.. many programmers might *like* one for some tasks, it just isn't there
<pl> lotuseater: Ruat's propaganda doesn't change the fact that it runs a half-baked Linear Lisp GC
<pl> *Rust's
<lotuseater> yes it does pl. propaganda :D
<ecraven> also, you can write CL code that does not cons ("allocate memory") very much, so the GC would only run very infrequently
<pl> And the end result is that when you get into complex data structures, you have to forsake safety
scymtym has quit [Ping timeout: 256 seconds]
<moon-child> pl: in apl we distinguish homogenous arrays (which contain only fixed-size numbers and characters) from nested arrays (which may contain other arrays). (And most arrays fall into the former category, so you do not need to scan very much.) _If_ you were doing tracing gc, it would make sense to allocate the former in a no-outbound-refs arena, but it doesn't make sense to do tracing gc with apl
<beach> lotuseater: You can use the host GC only if you have your compiled code executed by the host. But that's not usually how a Common Lisp implementation works. It generates native code with its own ABI, so it needs its own GC.
OlCe has joined #commonlisp
<lotuseater> A Rust enthusiast friend of mine told me the last time he was at my place he doesn't see lisp used or be adapted by industry now that Rust is. i showed him from time to time some magic. and then told him CL is in industry for now a long time, or isn't it?
<beach> lotuseater: Also, it is best to write the Common Lisp implementation in Common Lisp.
<moon-child> lotuseater: the semantics of lisp require a gc (or to leak memory); this is independent of the language you use to implement it. Rust's gc is not commensurate with lisp's semantics
<flip214> QL leaves me with clon-1.0b25; but loading that (via QL) gives me "System "net.didierverna.clon.termio" not found"
<pl> lotuseater: "GC" is the colloquiall name - the name of the art is "automatic memory management", and as much as I laud them for bringing half of a single GC design from mid-1990s into common usage, that's where my like ends
<lotuseater> beach: Sure it is!
<moon-child> pl: if steele brought the c++ programmers halfway towards lisp, rust is bringing them halfway towards ocaml/clean? ¯\_(ツ)_/¯
<lotuseater> let alone be ACL2 in industry use for proving hardware or this DART system in the gulf war
<lotuseater> moon-child: haha yeah one of my favorite quotes
<pl> moon-child: no, Rust let's them do a 180 turn
<moon-child> well, yes; as hayley points out, java also dragged the lisp programmers halfway back towards c++
<lotuseater> they also find it funny when i say stuff like C and friends are just special purpose langs. or that IDEs seem to converge to emacs
<lotuseater> and of course climacs ;)
<lotuseater> moon-child: and then Rich Hickey came along with Clojure
<beach> Industry seems determined to use languages with no independent standard, with a few exceptions.
<lotuseater> yes it does
CrashTestDummy3 has joined #commonlisp
<lotuseater> beach: you once said it's not good using things with no or often changing/breaking standard, much more when legacy is needed in the long run
<beach> And, as I emphasize in my industry talks, a project leader that chooses such a language should be fired.
<lotuseater> haha yes :D
<lotuseater> I can also imagine you had some big industry projects in your career.
<moon-child> beach: I do not think such blanket statements are appropriate
<pl> beach: to me, its funnier when some languages that get bad rep turn out to have standards XD, it's just not widely known outside of the community
<pl> (for example Ruby, which has both an (outdated) ISO standard, and informal standard including test suite that allows existence of interoperable implementations)
<lotuseater> nice
CrashTestDummy2 has quit [Ping timeout: 245 seconds]
<pl> Which is why JRuby thrives and Jython and IronPython are deader than door nail
<lotuseater> or this mess with the C++ standard changing all three years, adapting things that are well known for 20+ years and even the experts don't know/understand everything o_O
<moon-child> counterpoint: pypy, graalpython
<lotuseater> moon-child: ah with this GraalVM?
<lotuseater> python packaging is pain out of hell
<beach> moon-child: It keeps the audience awake. And then I explain why in greater detail.
<moon-child> the existance of a standard is invaluable when making a new implementation of a language, but I think its more important role is as a statement of the values of the designers and community of a language
<lotuseater> or when much is depending on that what you do with it. eg in medicine technology every line must be clearly justified
<moon-child> *existence
<beach> moon-child: That would be way to complicated a message for my typical audience.
<flip214> hmmm, why is :NET.DIDIERVERNA.CLON.TERMIO in *FEATURES*
<pl> moon-child: PyPy is rife with "this doesn't work, this works" for the last... 15 years or so? I think that's how old the project is
<moon-child> beach: heh! Fair enough
<lotuseater> flip214: maybe something depends on that with #+ or #-
<pl> moon-child: in comparison, with Ruby, you generally /assume things work/
* moon-child sometimes feels as though his role in this channel is to play devil's advocate to beach
<pl> With PyPy I assume the opposite
<beach> moon-child: Thank you. I need a few people playing that role.
<moon-child> :)
<lotuseater> moon-child: but that what's keeping the discussion awake :)
<flip214> lotuseater: in the ASD there's a :depends-on with (:feature :net.didierverna.clon.termio net.didierverna.clon.termio)
CrashTestDummy2 has joined #commonlisp
<flip214> but why *features* has that I don't know yet
<pl> moon-child: there's simply a big difference between language with a test suite as target, and language with "you have to work exactly like this big hairy C function"
CrashTestDummy3 has quit [Ping timeout: 258 seconds]
random-nick has joined #commonlisp
peterhil has quit [Ping timeout: 258 seconds]
NeoCron has joined #commonlisp
CrashTestDummy3 has joined #commonlisp
sm2n has quit [Ping timeout: 255 seconds]
CrashTestDummy2 has quit [Ping timeout: 268 seconds]
peterhil has joined #commonlisp
<shka> pl: don't forget about the shedskin :D
<pl> shedskin?
<shka> python->C++ compiler
<shka> dead, obviously
<shka> there can be only one python implementation
<shka> all others are getting decapitated
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
peterhil has quit [Ping timeout: 245 seconds]
kakuhen has quit [Quit: Leaving...]
<pl> It's not effectively possible to track CPython because the spec is "whatever PyEvalFrameEx is doing"
<pl> And then you have leaky abstractions, iirc, in Python C extensions
<pl> The latter is not an insurmountable problem by itself - Ruby IMO shows the way
<pl> (lots of CFFI style stuff happening)
<pl> But the CFFI style stuff became important because JRuby was viable
hhdave has joined #commonlisp
<etimmons> flip214: you probably just need to add it to local-projects to get it working
<flip214> etimmons: ah, thanks
<flip214> so it wasn't the QL update but the QL cleanup of "unused" stuff that broke the setup
<flip214> thanks!
peterhil has joined #commonlisp
tyson2 has joined #commonlisp
<gin> is the memory allocation different between these two options -- (push (cons a b) alist) vs. (push '(a . b) alist)? I think (cons a b) will allocate on the heap. what about '(a . b). does it not need to be allocated somewhere?
<gin> assuming a and b are variables passed around by some other part of the code.
lisp123_ has joined #commonlisp
admich has quit [Quit: bye]
lisp123 has quit [Ping timeout: 250 seconds]
<jackdaniel> when you qupte a and b are not evaluated
<jackdaniel> so instead of variables you have symbols
<jackdaniel> from the allocation side, quoted expressions may be stored once in the memory, so single modification may impact all future accesses
<jackdaniel> literal objects should not ve modified in general
<jackdaniel> be*
tfb has joined #commonlisp
<gin> jackdaniel: thanks
<jackdaniel> sure
<pjb> gin: (setf *print-circle* t) (let ((fresh-conses '()) (literals '())) (loop repeat 3 do (push (cons 'a 'd) fresh-conses) (push '(a . d) literals) finally (return (values fresh-conses literals)))) --> ((a . d) (a . d) (a . d)) (#1=(a . d) #1# #1#)
<pjb> gin: as you can see, there are semantic differences. That should be enough to decide which to use.
<pl> in SBCL, with safety=0, literals modification can be very... interesting
sander has quit [Quit: So long! :)]
sander has joined #commonlisp
<pl> SBCL generally will allocate literals in function header, so while I don't know how it would go with a cons cell, in my experience allocating a short vector resulted in said vector being completely stored in function header
<pl> this resulted in !fun! when I modifed its contents
<jackdaniel> ECL stores literals in the FASL header, so it may possible collapse equal literals from different functions
<jackdaniel> possibly*
<pl> interesting
dlowe has joined #commonlisp
dlowe has quit [Remote host closed the connection]
admich has joined #commonlisp
sm2n has joined #commonlisp
peterhil has quit [Ping timeout: 250 seconds]
IPmonger has joined #commonlisp
peterhil has joined #commonlisp
IPmonger has quit [Remote host closed the connection]
selwyn has quit [Read error: Connection reset by peer]
gabc_ is now known as gabc
lotuseater has quit [Ping timeout: 250 seconds]
peterhil has quit [Ping timeout: 265 seconds]
derelict has quit [Ping timeout: 245 seconds]
peterhil has joined #commonlisp
makomo has joined #commonlisp
hendursa1 has quit [Quit: hendursa1]
hendursaga has joined #commonlisp
mister_m has joined #commonlisp
derelict has joined #commonlisp
tfb has quit [Quit: died]
Bike has joined #commonlisp
jans1 has joined #commonlisp
jans has quit [Ping timeout: 256 seconds]
jans1 is now known as jans
admich has quit [Quit: bye]
jans has quit [Ping timeout: 258 seconds]
Inline has joined #commonlisp
derelict has quit [Quit: WeeChat 3.2]
lad has joined #commonlisp
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
yitzi has joined #commonlisp
cage has joined #commonlisp
azimut_ has joined #commonlisp
zacts has joined #commonlisp
azimut has quit [Remote host closed the connection]
dlowe has joined #commonlisp
azimut_ has quit [Remote host closed the connection]
azimut has joined #commonlisp
Th30n has quit [Quit: WeeChat 3.2]
peterhil has quit [Ping timeout: 252 seconds]
peterhil has joined #commonlisp
amb007 has quit [Ping timeout: 268 seconds]
amb007 has joined #commonlisp
random-nick has quit [Quit: quit]
random-nick has joined #commonlisp
srhm has joined #commonlisp
zacts has quit [Ping timeout: 246 seconds]
selwyn has joined #commonlisp
amb007 has quit [Ping timeout: 276 seconds]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 240 seconds]
amb007 has joined #commonlisp
peterhil has quit [Ping timeout: 250 seconds]
waleee has joined #commonlisp
lisp123_ has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 245 seconds]
Devon has quit [Read error: Connection reset by peer]
Devon has joined #commonlisp
lisp123 has joined #commonlisp
peterhil has joined #commonlisp
lisp123 has quit [Read error: Connection reset by peer]
dlowe has quit [Remote host closed the connection]
amb007 has quit [Ping timeout: 268 seconds]
amb007 has joined #commonlisp
Devon has quit [Ping timeout: 250 seconds]
NeoCron has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
Josh_2 has joined #commonlisp
<Josh_2> Hi hi hi
<Josh_2> whats the best RSS feed parsing library?
<Xach> etimmons: i don't see how that system file can be loaded. does asdf do something to suppress package-not-found or something?
dsk has joined #commonlisp
specbot has quit [Remote host closed the connection]
minion has quit [Read error: Connection reset by peer]
minion has joined #commonlisp
specbot has joined #commonlisp
tfb has joined #commonlisp
ggoes has quit [Quit: WeeChat 2.3]
tfb has quit [Client Quit]
tfb has joined #commonlisp
ggoes has joined #commonlisp
xantoz has quit [Quit: WeeChat 3.0]
hafat has joined #commonlisp
xantoz has joined #commonlisp
gaqwas has joined #commonlisp
<etimmons> Xach: Huh, you're right (I haven't actually tried using clon in a while, I just remembered Didier mentioning that issue at ELS)
<etimmons> ASDF does nothing with package-not-found, so sb-grovel must have been already loaded by the people that have gotten it to work
tfb has quit [Remote host closed the connection]
tfb has joined #commonlisp
<tfb> Has anyone done anything with series in recent history?
<tfb> (before I waste any time trying to revive it)
<etimmons> xach: Anyways, the proper way of doing what he wants is to use `"sb-grovel:grovel-constants-file"` instead of `sb-grovel:grovel-constants-file`.
AnimalClatter has joined #commonlisp
<Xach> etimmons: thanks.
notzmv has quit [Ping timeout: 272 seconds]
<Xach> etimmons: i tried finding that info in the manual, but failed - is it in there? if so, can you tell me where?
specbot has quit [Remote host closed the connection]
minion has quit [Remote host closed the connection]
AnimalClatter has quit [Quit: WeeChat 3.2]
specbot has joined #commonlisp
<etimmons> Xach: I can't find it either. And the commit that added that feature (50f2420f) didn't touch the manual
minion has joined #commonlisp
amb007 has quit [Ping timeout: 240 seconds]
amb007 has joined #commonlisp
tfeb has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
<etimmons> Xach: Did you figure out a path forward with the UIOP version mismatch at compile vs. load times?
tfeb has quit [Client Quit]
amb007 has joined #commonlisp
<gin> if I want to a push the values of variables a and b into an alist, it is going to be (push `(,a . ,b) alist), am I right? just checking if my coding style is alright.
<Xach> etimmons: i updated the build asdf i use for now
<Xach> gin: i don't find it that common to use backquote to construct conses like that, but preferences vary. I'd do (setf alist (acons a b alist)) or (push (cons a b) alist) instead.
<moon-child> gin: or (push (cons a b) alist)
<gin> moon-child: The Google CL guide I found online says, "For the Lisp efficiency point, given two options of equivalent complexity, pick the one that performs better. (This is often the same as the one that conses less, i.e. allocates less storage from the heap.)"
<gin> moon-child: so I was avoiding (push (cons a b) alist) until now and going for (push `(,a . ,b) alist) but like Xach mentioned, I too did not find this coding style used by others.
<gin> that is why I thought of coming to this channel and checking if I am doing the right thing by following the said style guide.
<etimmons> Xach: Nice. I worry we're going to have users reporting a whole bunch of similar issues when the latest UIOP is actually released to QL, though.
<lisp123> gin: my personal opinion (which is not much) is that you should use acons and not mutate the alist - given how powerful computers are, this very minor inefficiency is fine. UNLESS i guess you actually want to mutate it (there are many valid cases for that, but one should consider coding in a way without side effects wherever possible imo)
<lisp123> at least that is what I've been taught from the various books on lisp
<etimmons> Xach: This issue was randomly on my mind earlier today, so I opened <https://gitlab.common-lisp.net/asdf/asdf/-/issues/83>. Not sure if anything will come of it, but should be a lively issue thread at the very least.
<gin> lisp123: my question isn't about acons vs. push. my question is about (cons a b) vs. `(,a . ,b)
<gin> the Google style guide recommends avoiding cons whenever possible. but I never see the `(,a . ,b) coding style in practice. so that made me think if that style guide is followed in reality.
<Bike> well for one thing `(,a . ,b) isn't actually any more efficient
<lisp123> gin: oh I see. (cons a b) is easier for me to read, but others who write a lot of macros may prefer the latter approach
<Bike> it will cons
<Bike> on sbcl (macroexpand-1 '`(,a . ,b)) => (list* a b)
treflip has quit [Quit: good night]
<etimmons> Xach: I mentioned it in that issue, but I may open a separate issue about this particular local package nickname thing. There might be support for another quick release to mitigate the issue for packages that don't explicitly ask for package local nickname support.
<gin> Bike: thanks! that helps a lot.
<Bike> technically i guess an impl could use the information that modifying it is undefined behavior and do some kind of optimization there, but i doubt any of them do and the gain would be pretty marginal at best
<gin> lisp123: by the way, why did you make the point about mutating the list? did you see any code example here in the chat that was mutating the list?
<lisp123> gin: i thought push mtuates the original list
<lisp123> maybe I'm mistaken
<White_Flame> push mutates the variable binding that points to the list
<White_Flame> tacking on a new cons cell to the head of hte list does not mutate the old list's cells
<_death> gin: I think you misunderstood that style guide..
<lisp123> white_flame: but it changes the _place_ right?
Devon has joined #commonlisp
Devon is now known as Devon7
<White_Flame> yes. the place is not the list
Devon7 is now known as Devon
<White_Flame> it's a reference to the first cons cell of the list
<White_Flame> (from its perspective. there might be multiple other cons cells that use that list as a shared tail to their list)
<gin> lisp123: PUSH does not mutate the list. it only updates the place.
<gin> lisp123: what do you get when you run this: (let* ((a (list (cons 'x 10))) (b a)) (push (cons 'y 20) a) (format t "a: ~a, b: ~a~%" a b))
<White_Flame> so going from (2 3) to (1 2 3) or (1 . (2 3)), that (2 3) sublist is not mutated, and is used as the tail by the new (1 . <cdr>) cell which the place now uses as the first cell of its list
hafat has quit [Ping timeout: 276 seconds]
<White_Flame> another place might still be pointing at the first cell of (2 3), and is completely unaware and unmutated when that other place now tacks on the (1 . ###)
<gin> _death: I think so too that I have misunderstood the style guide. would you please explain what the style guide really meant here?
<White_Flame> (1 . cdr), (2 . cdr), and (3 . nil) are 3 different objects on the heap that point to its respective 'next' list cell
<_death> gin: assuming you mean https://google.github.io/styleguide/lispguide.xml?showone=Priorities#Priorities the wording there is not as decisive as "avoiding cons whenver possible".. there are ample qualifications, and note that efficiency is last on the priority order.. I don't particular like this style guide, and think the parenthetical remark should've been dropped
<gin> _death: yes that's the one
<gin> _death: is there another style guide that you or others here like?
<_death> there is http://www.norvig.com/luv-slides.pdf which is very good
<gin> _death: thanks
<lisp123> gin: I meant in this terms https://pastebin.com/DJqnpZUf
<lisp123> But I guess your understanding already is quite advanced, so you can disregard
<_death> gin: from what I heard in a recent talk (probably not recorded?) google's Lisp code is basically "C with parentheses" at this point so I don't think you should take its style guide as exemplary
CrashTestDummy2 has joined #commonlisp
<Devon> gin: ITASoftware aka Google has very specialized needs, they can afford to spend extra work to gain performance.
<_death> gin: this may be due to the constraints of their system.. you can read something written 20 years ago about it here: http://www.paulgraham.com/carl.html
tfeb has joined #commonlisp
<White_Flame> pretty sure that naughty dog's GOAL was also mostly C-in-Lisp, but it makes sense there for performance gaming
<White_Flame> but combined it with runtime recompilation
<lisp123> Interesting, thats a very unique way to use lisp
tfeb has left #commonlisp [#commonlisp]
CrashTestDummy3 has quit [Ping timeout: 255 seconds]
<lisp123> Would it be possible to convert 'usual lisp style' into 'c in lisp' style via macros?
<lisp123> i.e. get more efficient code but not sacrifice expressivity
tfb_ has joined #commonlisp
<White_Flame> it's a different style, not necessarily a mechanical transformatino
tfb_ is now known as tfeb
<White_Flame> it's like people asking if you can just compile JS to webasm, if you're in that space
<White_Flame> to try to make code faster
<lisp123> but is JS and webasm 1:1?
<White_Flame> no
<White_Flame> neither is manual memory management and lower level access style
<White_Flame> vs higher level lisp
<lisp123> I guess it would be very difficult :D
<lisp123> Theoretically might be possible though?
<pl> lisp123: there's a profile of webassembly that maps 1:1 with JS, which is common compilation target, but that's because Chrome's V8 has (had?) broken webassembly support
<White_Flame> you mean asm.js? that was something different
<pl> White_Flame: GOAL was afaik a stripped down mix of CL and Scheme with liberal access to assembly
<lisp123> pl: oh i see. Chrome is always a bad actor. The IE6 of 2021
<pl> White_Flame: no, webassembly. Because for considerable time, Chrome would compile webassembly to JS because it was incapable of JITing it otherwise
<White_Flame> ah, heh
<pl> (well, into JS-based IR)
<pl> the specific issue was that the JS roots of the V8 IR format meant there was no support for any sort of jump
<pl> only branches and loops
<pl> but no goto
<White_Flame> makes sense
<pl> GOAL btw had "normal" GC, somewhat
<pl> you had two arenas for allocation, a global one and level-scoped one
<pl> both had simple bump allocator
<pl> the level scoped one was dropped whenever you loaded a level
minion has quit [Remote host closed the connection]
specbot has quit [Remote host closed the connection]
<White_Flame> "regions" in lispm speak?
minion has joined #commonlisp
specbot has joined #commonlisp
<pl> iirc yes
tfb has quit [Quit: died]
<pl> There's an interesting reverse engineering post about it
tfeb has quit [Quit: died]
tfeb has joined #commonlisp
tfeb has quit [Client Quit]
lotuseater has joined #commonlisp
shka has quit [Ping timeout: 276 seconds]
hafat has joined #commonlisp
Devon has quit [Ping timeout: 255 seconds]
phantomics has joined #commonlisp
notzmv has joined #commonlisp
Devon has joined #commonlisp
<lotuseater> good evening from my pi :)
cage has quit [Quit: rcirc on GNU Emacs 27.1]
<phantomics> evening lotuseater
mariari has quit [Ping timeout: 258 seconds]
<lisp123> lotuseaster: nicely done :)
akoana has joined #commonlisp
CrashTestDummy3 has joined #commonlisp
CrashTestDummy has joined #commonlisp
mariari has joined #commonlisp
CrashTestDummy2 has quit [Ping timeout: 265 seconds]
<ecraven> does slime have a "call this lisp function with region as a parameter and replace region with the result" builtin?
CrashTestDummy3 has quit [Ping timeout: 276 seconds]
<lisp123> It may, but it should be pretty easy to write regardless
<lisp123> I haven't played around much with slime's output / result settings, so I might do that as an exercise one day - let me know if you struggle with it
Devon has quit [Ping timeout: 240 seconds]
<lotuseater> phantomics: did you get my mail from yesterday?
<lotuseater> lisp123: spacemacs with slime is running here fine too. this DELL laptop I borrowed temporarily has some hardware issue
<phantomics> lotuseater: I hadn't looked at that address, just read it
<phantomics> I've been looking at developing an Emacs mode for April to give a REPL experience similar to the GNU APL mode
kakuhen has joined #commonlisp
<lisp123> ecraven: Functions you need to use to do what you are after are (slime-eval-defun), (kill-region), (insert ...), slime-eval-print
<lotuseater> ok no problem
<phantomics> Apart from that, another longer-range project of mine is aimed at creating a general-purpose Lisp interface, kind of like an IDE
<lotuseater> phantomics: yes that was also what i thought about. or as i wrote, building with McCLIM some sort of IDE as Dyalog offers
<phantomics> Were you the one asking about visual interfaces for s-expressions before?
<lotuseater> no I wasn't
<lisp123> the first one (slime-eval-defun) you can probably avoid - you can use (buffer-substring-no-properties (region-beginning) (region-end)) to get the form, then pass it through slime-eval-print to get the result, then kill-region to delete the current region and finally insert to insert the result
<lisp123> that would be the basic idea
<lotuseater> we talked about eg it can get more performance by eg SIMDs meaning the SBCL intrinsics
pve has quit [Quit: leaving]
<lisp123> lotuseater: nice :-) will be curious to see how much performance you can get out of it (e.g. can you run a CRUD server)
<lisp123> time for sleep for me though :-) night all
<phantomics> I build a web-based interface before where I had a window of APL code next to a window containing a Minecraft-style voxel environment generated by the APL
<lotuseater> lisp123: atm i have NO IDEA how that even works. there is this nice blog article by Paul Khuong about it "for when abstracts too much away" :D
<lotuseater> or one video from cbaggers
<lotuseater> hehe minecraft. i know of this sucle voxel engine with opengl
<lisp123> lotuseater: :D
lisp123 has quit [Quit: Leaving...]
<lotuseater> but i wanna dive deep to show everyone else the power CL offers
<lotuseater> damn now he's gone, I saw i must correct "for when C abstracts too much"
<phantomics> I tried sucle a bit but it's very much alphaware
<phantomics> Needs a lot of work to be usable
yitzi has quit [Quit: Leaving]
<lotuseater> it was beginning of last year i got it running but didn't get how to do stuff. before my system had issues finding the .so files
gaqwas has quit [Ping timeout: 272 seconds]
lotuseater has quit [Read error: Connection reset by peer]
lotuseater has joined #commonlisp
<lotuseater> firefox on pi is not a good idea. and that was just 1 tab with rocketchat o_O
<lotuseater> but phantomics I'm happy you're in IRC again
<phantomics> I'll be around, let me know if you have further thoughts
<phantomics> I've been doing extensive debugging of April, getting ready for a new release
<lotuseater> oh wow
<lotuseater> the most important file is spec.lisp as you said in your long talk, right? i have to watch it again in detail and try out
<phantomics> Yes, spec.lisp is the core language spec
<phantomics> grammar.lisp specifies the grammar patterns
<phantomics> Most of the functions are implemented in library.lisp and aplesque/aplesque.lisp
<lotuseater> and as i see the parser is with combinators. i wonder if Dyalog does it this way
hafat has quit [Ping timeout: 240 seconds]
<phantomics> Not sure how they do it, theirs is an interpreter so it works very differently
<phantomics> I know theirs is very baroque with lots of exceptions to rules
<lotuseater> ou damn, and surely much old legacy C++ from before c++11
recordgroovy has quit [Remote host closed the connection]
hafat has joined #commonlisp
hafat has quit [Client Quit]
pillton has joined #commonlisp
hafat has joined #commonlisp
amb007 has quit [Ping timeout: 250 seconds]
amb007 has joined #commonlisp
selwyn has quit [Read error: Connection reset by peer]
silasfox has joined #commonlisp
frgo has quit [Remote host closed the connection]
cjb has joined #commonlisp
frgo has joined #commonlisp
silasfox has quit [Ping timeout: 240 seconds]
lotuseater has quit [Ping timeout: 245 seconds]
silasfox has joined #commonlisp
peterhil has quit [Ping timeout: 258 seconds]
silasfox has quit [Quit: WeeChat 3.2]
peterhil has joined #commonlisp
taiju has quit [Ping timeout: 240 seconds]
akoana has left #commonlisp [Leaving]
taiju has joined #commonlisp
edgar-rft has quit [Ping timeout: 250 seconds]
peterhil has quit [Ping timeout: 252 seconds]
notzmv has quit [Ping timeout: 240 seconds]