phoe changed the topic of #commonlisp to: Common Lisp, the #1=(programmable . #1#) programming language | Wiki: <https://www.cliki.net> | IRC Logs: <https://irclog.tymoon.eu/libera/%23commonlisp> | Cookbook: <https://lispcookbook.github.io/cl-cookbook> | Pastebin: <https://plaster.tymoon.eu/>
pranavats has joined #commonlisp
karmichammer has joined #commonlisp
Bike has quit [Quit: Connection closed]
morganw has quit [Remote host closed the connection]
karmichammer has quit [Ping timeout: 240 seconds]
mon_aaraj has quit [Ping timeout: 256 seconds]
karmichammer has joined #commonlisp
mon_aaraj has joined #commonlisp
occ has joined #commonlisp
karmichammer has quit [Ping timeout: 240 seconds]
karmichammer has joined #commonlisp
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 240 seconds]
dec0d3r has joined #commonlisp
mgl has quit [Ping timeout: 256 seconds]
samps has joined #commonlisp
notzmv has quit [Ping timeout: 268 seconds]
<samps> Hi folks. I've been working on some pet projects in Common Lisp. I'm using SBCL and Iḿ having trouble trying to understand a compilation error. Would anyone be able to help me out? https://gist.github.com/lsmag/ebb517a8702f454c4bbf624d7c44b182 ... I tried typing out roughly the same faulty line on the REPL and it seems to work
<samps> changing the line just to (merge-pathnames (first argument)) also spawns the same error
<samps> but, say, (merge-pathnames (first '("foo" "bar" "baz"))) on the REPL doesn't
<EdLangley[m]> Just a note, errors are "signaled" in lisp
karmichammer has quit [Ping timeout: 256 seconds]
<samps> I've read about it but haven't dipped my toes into condition signalling yet, though I have found quite a few while playing with the adopt library
<EdLangley[m]> Anyways, that's not an error it's a warning because write-line expects a string and it's getting a pathname
<EdLangley[m]> clhs write-line
<EdLangley[m]> you should do something like (write-line (namestring target-dir))
jeosol has quit [Quit: Client closed]
<EdLangley[m]> samps: yeah, I'm just mentioning that because using the expected terminology helps people understand the problem :)
<samps> damn, I was caught off guard. The signal message actually starts with `IN (WRITE-LINE ...)`. Thanks, folks :)
<samps> and what would this "in hairy form" be?
<EdLangley[m]> I'm not sure, my guess is that just means sbcl able to print the form that's triggering the error for some reason
<EdLangley[m]> that is, sbcl isn't able to print...
Colleen has quit [Quit: Colleen]
<samps> gotcha. I'll try to dig further into that some other time. Nonetheless, thanks again :)
Colleen has joined #commonlisp
Inline has quit [Ping timeout: 250 seconds]
s-liao has joined #commonlisp
karmichammer has joined #commonlisp
molson_ is now known as molson
mon_aaraj has quit [Ping timeout: 256 seconds]
mon_aaraj has joined #commonlisp
karmichammer has quit [Ping timeout: 256 seconds]
Krystof has quit [Ping timeout: 250 seconds]
phadthai has quit [Ping timeout: 256 seconds]
pillton has joined #commonlisp
karmichammer has joined #commonlisp
masinter has quit [Ping timeout: 240 seconds]
<White_Flame> is it typical for implementations to close I/O streams when garbage collected?
karmichammer has quit [Ping timeout: 268 seconds]
<Xach> White_Flame: i seem to remember sbcl putting a finalizer on closing the fd on a fd-stream, but I'd have to double-check. I don't know if that would make it "typical" or not.
tyson2 has quit [Remote host closed the connection]
s-liao has quit [Quit: Client closed]
Bike has joined #commonlisp
random-nick has quit [Ping timeout: 240 seconds]
<Bike> so thanks to mfiano nerd sniping me, i now know that sbcl actually does maintain backpointers from arrays to arrays displaced to them (sb-kernel:%array-displaced-from). however the general form of the with-array-data macro does still do a loop to get at the simple vector backing
<Bike> (https://github.com/sbcl/sbcl/blob/master/src/compiler/array-tran.lisp#L1629-L1661). so does sbcl not actually collapse displacements despite going through some effort to maintain the backpointers?
<mfiano> Bike: I submitted the patch to sbcl-devel
<mfiano> It is roughly 2x as fast and eliminates consing
<mfiano> Still not adequate for my use case, but a nice change regardless
<EdLangley[m]> Is there any way to promise to the compiler that an argument to a function is const?
<Bike> meaning, a promise that the function will not mutate that value? no.
<EdLangley[m]> e.g. if I have (defun mapping (fn) (lambda (list) (mapcar fn list))) It'd be nice if I could convince the compiler that it doesn't need a closure
<Bike> how would it not need a closure?
<EdLangley[m]> Hmm, maybe I'm wrong
<EdLangley[m]> What I'm trying to figure out if there's anyway to use functions like this without blocking optimizations of things like (compose (mapping #'1+) (mapping #'1+))
<EdLangley[m]> If the compiler assumes FN never changes, I'd think you could do some sort of inlining trick to avoid extra indirection.
<mfiano> You're still looking it up in the global environment at runtime.
samps has quit [Ping timeout: 240 seconds]
<EdLangley[m]> It should be able to replace (mapping #'1+) with (lambda (list) (mapcar #'1+ list))
<EdLangley[m]> I guess I could do this with a compiler macro
karmichammer has joined #commonlisp
<Bike> if it's willing to believe that MAPPING will never be redefined, yeah. you could just proclaim it inline.
<EdLangley[m]> Hmm, I didn't think of that
<Bike> but MAPPING as a function itself can't behave as though its argument is unchanging, because it doesn't know what its argument is until it's called.
notzmv has joined #commonlisp
<EdLangley[m]> It can't know that the value named by FN isn't mutated, but it can know that FN is never re-bound
<Bike> it knows that already, since it's what binds FN.
<EdLangley[m]> So, when compiling the lambda, couldn't it eliminate the outer binding?
<EdLangley[m]> I guess it has to store the argument value somewhere
karmichammer has quit [Ping timeout: 256 seconds]
<Bike> right. it's stored in the closure.
<mfiano> How would it eliminate it if calling thing function is the only way to bind it to a value?
<mfiano> s/thing/the/
<EdLangley[m]> I think what I'm really interested in is whether something like (compose (mapping ...) (mapping ...)) can be optimized at all
<mfiano> Make mapping a macro
<Bike> yeah, it can be optimized.
<EdLangley[m]> That changes the utility
<Bike> if you're using alexandria:compose, a compiler macro on COMPOSE will kick in
<mfiano> Make it a compiler macro then.
<mfiano> Oh, automatically, cool.
<Bike> so (compose (mapping #'1+) (mapping #'1+)) will end up as something like (let ((m1 (mapping #'1+)) (m2 (mapping #'1+))) (lambda (&rest args) (funcall m1 (apply m2 args))))
<Bike> then after inlining each (mapping #'1+) ends up as (let ((fn #'1+)) (lambda (list) (mapcar fn list)))
<Bike> the compiler can be smart enough to inline _that_ into the body of the compose lambda
karmichammer has joined #commonlisp
<Bike> and then maybe it inlines mapcar into a loop
<Bike> that said, it will probably not be smart enough to avoid consing an intermediate list, due to side effect restrictions
<EdLangley[m]> cool, I think that answers my question
<qhong> Soviet Refal is able to eliminate that list automatically in 1970s
<EdLangley[m]> I've always wondered how much of an optimization barrier passing LAMBDAs around is
<EdLangley[m]> And it sounds like compilers can, in theory at least, be smart enough to inline them like any other function
epolanski has quit [Quit: Connection closed for inactivity]
<qhong> if everything is mutable, compiler just commit breinded
<qhong> but srsly I think this whole thing is totally broken
<qhong> we have dependence maintenence protocol in MOP
<Bike> clasp can do it, so i figure a better compiler like sbcl can as well
<qhong> why not do the same for compiler, assume the best scenario, and update dependent if the assumption is broken
<qhong> Bike: I don't think it can get around ubiquitous mutability
s-liao has joined #commonlisp
<Bike> i meant clasp can do the inlining
<Bike> for avoiding consing up the intermediate list, i think what the compiler would have to do is observe that the first mapcar's result is only ever used by the second mapcar, so the storage can be reused
<qhong> When lambda get passed around, most of the case that means they are stored in mutable variables that confuses compiler
<Bike> I don't think any implementations actually do this, though
karmichammer has quit [Ping timeout: 250 seconds]
<Bike> i mean, sure, but in this case the variables aren't actually mutable, so it's pretty easy to see how it goes.
<qhong> Bike: there's systematic western adhoc method called stream fusion, and chad Soviet method called super-compilation
<Bike> the variables aren't actually mutated* i mean.
<Bike> this is what, futamura projection stuff?
<qhong> Bike: yes I think the above cases the only problem is global functions getting redefined
<sm2n> supercompilation reduces your program to a normal form
<qhong> Bike: it's much stronger than western school of partial evaluation
<sm2n> but more or less any nontrivial language does not necessarily reach a normal form in finite time
<sm2n> does not even have to exist
<qhong> sm2n: supercompilation doesn't reduce your program to normal form
<Bike> "I have interpreted the major steps in biological and cultural evolution, including the emergence of the thinking human being, as nothing else but metasystem transitions on a large scale. Even though my Ph.D. was in theoretical physics, I" and i'm out.
<sm2n> with supercompilation you can get bit-identical compiler output for all programs with the same denotational semantics
<sm2n> qhong: oh?
<sm2n> Bike: where is that from?
<Bike> some paper by the refal guy.
<qhong> sm2n: are we talking about the same thing? there're two totally different thing supercompilation and superoptimization which has confusing name
<pillton> Bike: Have you seen work which allows users to perform optimisations of compositions (H X) <=> (G (F X)) without relying on compiler macros / inlining? I was thinking something like (LET ((GRAPH (G (F (LAZILY X))))) (OPTIMIZE-GRAPH GRAPH)) <=> (LAMBDA (X) (H X)).
<sm2n> qhong: oh, yes I see, I did mix them up I think
<Bike> seen some of that in the haskellverse, i think, though i don't think i understand your example.
<qhong> Bike: chad 20th century physicist
<qhong> Bike: physicist nowadays: I only know how to solve eigen value using matlab
karmichammer has joined #commonlisp
tyson2 has joined #commonlisp
<pillton> Bike: Assume that the evaluation of (G (F X)) is equivalent to the evaluation of (H X). I could extend both F and G to support being able to "record" their operations in a graph structure when given an "lazy" object. A "lazy" object allows F to inspect the object to obtain its type but does not perform the operation. The function F returns another "lazy" object which allows G to record its operation in the same graph as F and
<pillton> importantly, preserves the knowledge that it relies on the output of F.
<pillton> Bike: The function OPTIMIZE-GRAPH takes the full graph and identifies that #'H can be used instead of (compose #'G #'F) and returns the "optimized" graph as a closure.
akoana has quit [Quit: leaving]
pmwals09 has joined #commonlisp
<Bike> okay, sure. seems pretty simple phrased like that. your graph is something like <input> -> F -> G -> <output>, your optimizer replaces F -> G with H.
<qhong> pillton: you want to do it at runtime?
karmichammer has quit [Ping timeout: 268 seconds]
<pillton> qhong: Yes.
<pillton> Sorry, I think realistically, the output of OPTIMIZE-GRAPH would be (LAMBDA () (H X)).
lisp123 has joined #commonlisp
<pillton> ... to handle situations like (defun user-function (X Y) (OP (F X) (G (F Y)))).
samps has joined #commonlisp
phadthai has joined #commonlisp
lisp123 has quit [Ping timeout: 256 seconds]
karmichammer has joined #commonlisp
pmwals09 has quit [Remote host closed the connection]
karmichammer has quit [Ping timeout: 250 seconds]
samps has quit [Ping timeout: 240 seconds]
kevingal has quit [Remote host closed the connection]
wheelsucker has joined #commonlisp
karmichammer has joined #commonlisp
taiju has quit [Remote host closed the connection]
masinter has joined #commonlisp
karmichammer has quit [Ping timeout: 256 seconds]
pmwals09 has joined #commonlisp
pmwals09 has quit [Remote host closed the connection]
pmwals09 has joined #commonlisp
jeosol has joined #commonlisp
karmichammer has joined #commonlisp
<yottabyte> if I'm reading lines from a file, and I see "^M" in my repl, that means newline, right? how do I check for equality for that? as in, how do I check the line is a newline?
<yottabyte> (i'm doing (print line))
<pillton> yottabyte: It means carriage return. #\Return
s-liao has quit [Quit: Ping timeout (120 seconds)]
<pillton> There is carriage return (#\Return) and new line (#\NewLine).
s-liao has joined #commonlisp
<pillton> clhs 13.1.7
<yottabyte> thanks
<pillton> It is used to tell the cursor to go to the beginning of the current line.
<yottabyte> what will Newline and Linefeed show up as if Return shows up as ^M?
<pillton> ^N I think.
<pillton> Normally editors render the new line as a new line.
<pillton> Carriage return makes little sense in an editor.
<pillton> Carriage return is important for terminals.
<yottabyte> gotcha
<White_Flame> CR = 13 = ^M, LF = 10 = ^J. "Newline" technically is LF, but in practice the output encoder will render it as whatever's default for the platform
<White_Flame> well, ASCII calls LF Newline as well, afaik. I guess #\Newline is independent of that
occ has quit [Ping timeout: 256 seconds]
Jing has joined #commonlisp
taiju has joined #commonlisp
<remexre> are displaced vectors expensive to have as temporaries? wondering why e.g. find has :start, instead of there being a convenient (slice vec 3 nil) or something to make displaced vectors, and the common pattern being to use them
karmichammer has quit [Ping timeout: 256 seconds]
<pillton> remexre: (slice vec 3 nil) requires consing the displaced array where (find ... :start 3) does not.
<remexre> shouldn't a really basic escape analysis be able to determine that the one created by (find x (slice vec 3 nil)) has dynamic extent though?
<beach> Good morning everyone!
<remexre> good morning
<remexre> (well, evening here lol)
<pillton> remexre: You shouldn't return values with dynamic extent.
<remexre> pillton: this wouldn't be something declared on slice, it'd be something the compiler could recognize after inlining it
<beach> minion: Please tell remexre about universal greeting time.
<minion> remexre: look at universal greeting time: It is always morning when a person enters a channel, and late night when they leave. You may want to read http://www.total-knowledge.com/~ilya/mips/ugt.html for further information
<remexre> beach: hah, sure
<pillton> remexre: Sure, but it wouldn't catch every case where (find vec :start 3) is trivial to define, doesn't cons, interacts easily with :from-end, and doesn't require a "sufficiently smart" compiler.
occ has joined #commonlisp
waleee has quit [Ping timeout: 256 seconds]
<remexre> I guess, though I think the sufficiently-smart isn't too very smart
Guest43 has joined #commonlisp
<Guest43> Does the esrap parser library provide strong error reporting for parse failures?
aartaka has joined #commonlisp
igemnace has quit [Remote host closed the connection]
karmichammer has joined #commonlisp
karmichammer has quit [Ping timeout: 240 seconds]
Guest43 has quit [Quit: Client closed]
semz_ has joined #commonlisp
lisp123 has joined #commonlisp
semz has quit [Ping timeout: 250 seconds]
Bike has quit [Quit: sleep]
lisp123 has quit [Ping timeout: 250 seconds]
aartaka has quit [Ping timeout: 250 seconds]
aartaka has joined #commonlisp
s-liao has quit [Ping timeout: 256 seconds]
karmichammer has joined #commonlisp
karlosz has joined #commonlisp
karmichammer has quit [Ping timeout: 240 seconds]
igemnace has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
karmichammer has joined #commonlisp
karmichammer has quit [Ping timeout: 240 seconds]
pmwals09 has quit [Remote host closed the connection]
mon_aaraj has quit [Ping timeout: 256 seconds]
mon_aaraj has joined #commonlisp
kathe has joined #commonlisp
<kathe> hi all. :)
jealousmonk has quit [Quit: ERC (IRC client for Emacs 27.1)]
<beach> Hello kathe.
<kathe> heya beach. following the 'ug' maxim; good morning. :)
<kathe> and literally true out here. :)
<kathe> i am about to ask an existential question, though it might seem provocative.
<kathe> what could "i" do with "common lisp" after i've learnt it well?
<kathe> i am learning common lisp only because i've fallen in love with it.
<beach> Write some applications or some libraries.
<kathe> especially due to it's condition system and 'clos'.
<kathe> beach: is there some kind of "required projects" list for common lisp?
<kathe> like netbsd, freebsd have!
<beach> Feel free to ask questions about that list.
<kathe> that webpage is failing to get accessed.
<kathe> beach: could you please check at your end?
<beach> It works, but maybe you assume https when it is http.
<kathe> beach: yeah, got it loaded now. thanks for that tip. :)
<beach> Sure.
<kathe> beach: you are super cool, though cranky at times. may be it is the rest of us. ;)
<beach> Thanks, I guess.
<kathe> that projects list has as assembler! that's interesting, and more to my liking.
<kathe> i think that assembler should also mention need for a linker.
<kathe> i think that's the one i'm going to pursue.
<kathe> beach: thanks for sharing that list. :)
<beach> It is being worked on: https://github.com/robert-strandh/Cluster
<beach> But we have only a small portion of the x86 database, and we have no other architectures.
<kathe> cluster assembler is interesting. i'll ask if they would accept a linker too.
<mfiano> I am curious what linker means in CL context.
<beach> A linker is quite meaningless in the context of Common Lisp.
<beach> Heh.
<mfiano> Ha
<beach> kathe: I mean, you can write a traditional assembler and a traditional liker if you like, of course, but it wont be related to the project I meant in that list.
<kathe> beach: a linker would allow a 'cl' system to be fully independent.
<EdLangley[m]> kathe: it already basically is
<mfiano> Yes, it already is.
<kathe> EdLangley: hi. would you explain how?
<EdLangley[m]> Most implementations don't have direct access to the hardware but, generally, they don't use the OS for much else
<kathe> i can understand a 'cl' system generating object files, but how could they build an executable without having access to a linker?
<EdLangley[m]> They usually generate machine code for loaded code themselves
<mfiano> kathe: Are you only familiar with batch-compiled languages?
<EdLangley[m]> And just put it somewhere in memory
<EdLangley[m]> just try (defun foo (a b) (+ a b)) (disassemble 'foo)
<EdLangley[m]> in sbcl or ccl
<kathe> mfiano: yes.
<mfiano> kathe: Then you have much to learn (and to forget)
<kathe> mfiano: true that. :)
<mfiano> #clschool may be a more appropriate place for beginner questions.
<kathe> mfiano: okay, sorry to have polluted this space.
<mfiano> But nothing is wrong with here, if you don't mind people assuming you have a decent knowledge of CL
<mfiano> Not a problem
<beach> kathe: In Common Lisp, there is typically just one executable, which is the entire Common Lisp system. FASL files are loaded into the image when that executable is running. There is a process that ties the contents of the FASL to the image, and that process is similar to linking, but there is no traditional linker creating an executable.
<beach> kathe: Some Common Lisp systems can create an executable file, but that is usually done by turning the contents of memory directly into an executable file, and not by combining object files.
<kathe> beach: okay, that's what i was a bit confused about.
karmichammer has joined #commonlisp
<kathe> beach: so the common lisp's assembler has knowledge of things like "elf".
<beach> Not typically, no. No files are involved.
<beach> The Cluster assembler doesn't even read assembly source code.
<kathe> beach: yes, i read and understood that.
<kathe> but, some part of a common lisp system has to know about "elf" or similar formats, right?
<beach> No.
<beach> In a typical Common Lisp system, only the executable of the entire system is an ELF file.
<moon-child> some part of a bootstrapped common lisp system running under unix does, sure
<moon-child> but interacting with object files is not part of normal operation
<beach> Cluster takes a list of standard objects, each representing some abstract instruction or a label, like ADD or SUB. It then figures out, from the arguments, what machine instruction to use. That's the essence of an assembler. Reading text and writing object files is secondary.
<kathe> beach: so when a 'cl' compiler produces a binary, it holds some part of itself?
karmichammer has quit [Ping timeout: 256 seconds]
<kathe> moon-child: so a 'cl' binary is actually an entire operating environment host for the new application?
<beach> The Common Lisp compiler produces a FASL (if it is the file compiler) or if it is COMPILE, it does everything in memory. Typically, at least.
<beach> kathe: Yes, including the compiler.
<kathe> beach: okay, now i get it. that's quite similar to what squeak (smalltalk) does.
<beach> Sure, except it's probably the other way around, given history.
<kathe> beach: they both evolved independently.
<kathe> actually, in olden times, microsoft access projects needed a microsoft access "runtime" to work when deployed in the wild.
<beach> Smalltalk did not evolve independently of Lisp.
<kathe> beach: can you prove that?
<beach> I think pretty much any of Alan Kay's talks would say so.
<kathe> beach: alan kay only talks about 'cl' influence on the design of the language.
<kathe> beach: the architecture of smalltalk is a lot more than the language.
<kathe> beach: check out papers by "dan ingalls".
dec0d3r has quit [Quit: Leaving]
<mfiano> You say you are only familiar with batch-compiled languages, and then know all this about Smalltalk?
<mfiano> Are you trolling us?
<kathe> mfiano: i've worked with c++ majorly. but i've also spent around 10 years with smalltalk.
<mfiano> Smalltalk wasn't even conceived for like 15 years after Lisp.
<kathe> mfiano: no i'm not trolling. i'm for real.
<kathe> mfiano: and lisp was actually birthed because one of mccarthy's students/assistants thought it better to implement an interpreter instead of a pure compiler.
<beach> kathe: Quote from Alan Kay: "I’ve written about this variously elsewhere: including in “The Early History of Smalltalk”, and I’ve emphasized especially that “the idea of Lisp” pervades the underpinnings of Smalltalk as it was developed at Xerox Parc."
<kathe> beach: again, smalltalk the language isn't all there is, there's also smalltalk the architecture.
<beach> Fine.
<mfiano> I don't have an interest in continuing this topic the way it is going.
<beach> Moi non plus.
<kathe> agree. :)
<kathe> kind-a off-topic, does everybody who uses emacs on a regular 'pc' keyboard use the "esc" key in place of "meta"?
<moon-child> alt
<semz_> alt works fine. control often gets rebound to where caps lock normally is though
<kathe> moon-child: "alt" is quite awkwardly placed which prevents easy reach.
<kathe> semz_: yes, i've swapped "ctrl" with "caps_lock". :)
<semz_> keyboard designs suck pretty bad :/
<moon-child> I don't know how your keyboard is laid out ('pc' is not very descriptive). I am just telling you that the alt key generally corresponds to meta in emacs. You should be able to change which physical keys are associated with which virtual keycodes; the details will depend on what software you are using to perform input translation
<kathe> semz_: i also have a "happy hacking keyboard", so i guess i'll just have to pull it out.
<moon-child> semz_: kinesis is pretty good
<sm2n> moon-child: which one?
<kathe> moon-child: thanks. i am on a lenovo thinkpad.
<moon-child> sm2n: advantage
<ck_> keyboards have evolved pretty independently from smalltalk though.
<sm2n> I don't understand the appeal of these weird keyboards, are they really such a large improvement?
<ck_> scnr
<semz_> moon-child: interesting, it seems to get modifier keys right and doesn't lack F keys like so many
<kathe> sm2n: they definitely help a lot, especially with emacs.
<kathe> sm2n: the rhythmic flow stays undisturbed.
<moon-child> sm2n: it is split and bowled, which avoids wrist deviation, and the keys are arranged ortholinearly, which avoids unergonomic sideways movement
<kathe> sm2n: i've just migrated to emacs from vi, and i'm experiencing jarring. a lot.
<moon-child> sm2n: it also places many important keys on the thumbs (vs just space on a traditional keyboard), which are much stronger than other fingers
<semz_> ^
Jing has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<moon-child> sm2n: long travel distance also reduces stress of a given keystroke, though this can also be mitigated by with care
<moon-child> s/by//
<sm2n> I see
<White_Flame> kathe: for tab completion in a source code buffer, I use Esc Tab, as M-Tab/Alt-Tab is already taken by the OS :-P
karmichammer has joined #commonlisp
<kathe> White_Flame: i think i'll just stick with "esc" for "meta", less jarring. :-p
<sm2n> moon-child: What do you do for a compose key?
<White_Flame> C-M-foo might be weird, though
<White_Flame> or Shift-Meta
edmrk[m] has quit [Quit: Client limit exceeded: 20000]
<ck_> esc, c-foo is what I do
lisp123 has joined #commonlisp
<ck_> it's more easy to get used to than I once thought
edmrk[m] has joined #commonlisp
<moon-child> sm2n: I use the key labeled 'page down' as both compose and mode_switch (depending on press vs tap)
<White_Flame> I use either the right "windows key" or caps lock as compose
<moon-child> sm2n: not sure how worthwhile it is to look at the idiosyncrasies of my keyboard layout :P it works for me but
<sm2n> hmm, I see. I don't think I'd be willing to sacrifice pgdn
<moon-child> oh, I still have a pagedown key
masinter has quit [Read error: Connection reset by peer]
<kathe> is it acceptable out here to just leave? or better with a goodbye message?
<mfiano> Just leave.
<moon-child> but, again, this is my idiosyncratic keyboard layout. If you want something with more buttons there is maltron, but I have not found kinesis lacking
<kathe> mfiano: thanks.
kathe has quit [Quit: Leaving]
<White_Flame> I've seen asking to ask, but never asking to leave ;)
<mfiano> I use a modal keyboard
* moon-child backs out, facing White_Flame and bowing
karmichammer has quit [Ping timeout: 240 seconds]
<sm2n> Wow, I've never seen or even heard of a "mouth stick" keyboard before
lisp123 has quit [Ping timeout: 256 seconds]
<moon-child> yeah, maltron has some hardcore accessibility stuff
<moon-child> also one-handed keyboards which--I've always wanted to get two, one for each hand
<sm2n> why would that be useful? Are you trying to replicate a hollywood movie scene in real life?
<moon-child> more efficiency?
<moon-child> for any key, there are twice as many places I might find it
<ck_> I can see the benefit, for all character tuples that you'd have to move the same finger for with only one keyboard
<sm2n> I guess that makes sense
<moon-child> so better likelihood a given finger will be free when it is needed
<sm2n> yeah, but the keys are smaller
<ck_> for example you could type "vr" maybe four times as fast. That's a significant improvement
<moon-child> sm2n: they're smaller? I thought they were just more spread out
<sm2n> they look smaller at least
Jing has joined #commonlisp
<sm2n> hard to tell
<White_Flame> are there "null modem" type in-memory streams anywhere, where a reader can block until a writer writes into it?
<White_Flame> for an I/O byte stream specifically, not a message queue
<moon-child> not sure what you're asking for. A scheduler?
<EdLangley[m]> Isn't LISTEN something like this White_Flame ?
<EdLangley[m]> Hmm, nvm
<White_Flame> no, an in-memory stream where you write into it which will store into a buffer, and read from it which will block if the buffer is empty
<moon-child> like a unix pipe?
<White_Flame> I guess so, haven't used those before
<moon-child> I think you want a unix pipe
<moon-child> but will have to build something of your own if you want to support non-unix
<White_Flame> hmm, sounds like it's a fair bit of overhead for just connecting a stream-reader loop to a writer in the same process
<White_Flame> I'm using the zip library, where to compress a file you give it a stream to read
<mfiano> Sounds like a channel in CSP terms
<White_Flame> and I'd like to stream bytes _into_ that
<White_Flame> the whole CL notion of streams really needs a full replacement :-P
<mfiano> o.O
<moon-child> mr gray, I don't feel too well
<White_Flame> yeah, I know
<EdLangley[m]> I think flexi-streams might have something
<EdLangley[m]> I've had this problem before
<White_Flame> that converts output into a sequence
<EdLangley[m]> I guess most of this assumes you have all the data in memory
<White_Flame> not into an input stream
<White_Flame> right, I want to stream it through, not store it all at once, since it's big
<EdLangley[m]> The one before that does sequence->stream
<EdLangley[m]> same issue, though
<White_Flame> right, would have to wait until the sequence is completed
<sm2n> Yeah, but for this to make sense you need some notion of multitasking, which is not part of CL
<White_Flame> well, multithreading/"multiprocess" in lispspeak
<White_Flame> EdLangley[m]: ah, looks good
<EdLangley[m]> I think I've used that one before
<EdLangley[m]> But, one of the libraries for this I had to rewrite a bit
<White_Flame> there's always so many edge cases ot hit
<EdLangley[m]> it's been a while
<sm2n> wow, that actually uses a unix pipe underneath
karmichammer has joined #commonlisp
<White_Flame> huh, well we'll see then. I hope it still is fast enough
Cymew has joined #commonlisp
<White_Flame> at least I don't have to figure out another bare OS API with the lib ;)
<sm2n> or not? there is just a random file in there
<sm2n> it's reader conditional'd out in the .asd
<White_Flame> ah yeah, looking at the gray-streams-pipe, that's a proper in-memory buffering solution
<EdLangley[m]> It looks like it's attempting to provide something on implementations that don't supply gray-streams
<sm2n> right, but what implementations don't have gray-streams support but can also be assumed to run on unix?
<EdLangley[m]> One that's none of "abcl ccl clisp cmu ecl sbcl allegro lispworks"
<EdLangley[m]> :)
<mfiano> It looks like phoe is maintaining this now, so maybe ask him.
<EdLangley[m]> So, scieneer?
<EdLangley[m]> XCL?
<EdLangley[m]> hmm, it's probably actually gcl
xsperry has joined #commonlisp
<sm2n> I mean clasp fits that but I think it has gray streams
<EdLangley[m]> The fifo pipe file has a #> reader macro, which I don't recognize
<EdLangley[m]> that might be a clue
<sm2n> that appears to run a unix command
<sm2n> interesting
<EdLangley[m]> #> is undefined read syntax, per the standard
<EdLangley[m]> I wonder where it comes from
karmichammer has quit [Ping timeout: 256 seconds]
<sm2n> but this is unrelated and interesting: http://git.savannah.gnu.org/cgit/gcl.git/tree/gcl/doc/format
<sm2n> I think there was some talk about an extensible FORMAT here before
<sm2n> wow, gcl is /weird/
<mfiano> Why would they use the difference #-(or ...) to load a file that uses an implementation-specific reader extension?
xsperry has quit []
<mfiano> That seems wrong.
<sm2n> Yes
igemnace has quit [Remote host closed the connection]
<mfiano> GCL is not a CL
<mfiano> (yet, or probably ever)
igemnace has joined #commonlisp
<EdLangley[m]> From their release notes, it sounds like they're trying to make it one
<EdLangley[m]> Which is interesting
<EdLangley[m]> It's also interesting that, like clisp, their git repo seems pretty active without ever having a release
<mfiano> They've had releases
<mfiano> You just have to look almost a decade back
igemnace has quit [Remote host closed the connection]
<EdLangley[m]> My phrasing was imprecise
igemnace has joined #commonlisp
<EdLangley[m]> All I mean is they don't seem to care about cutting a new release, despite having a more or less continuous stream of commits
igemnace has quit [Remote host closed the connection]
Algernon69 has joined #commonlisp
<mfiano> My understanding is that they is a person and probably only uses it for personal things.
karmichammer has joined #commonlisp
karmichammer has quit [Ping timeout: 240 seconds]
attila_lendvai has joined #commonlisp
karlosz has quit [Quit: karlosz]
mgl has joined #commonlisp
igemnace has joined #commonlisp
karmichammer has joined #commonlisp
shka has joined #commonlisp
igemnace has quit [Remote host closed the connection]
karmichammer has quit [Ping timeout: 252 seconds]
igemnace has joined #commonlisp
lispy has joined #commonlisp
kathe has joined #commonlisp
<kathe> hello. :)
scymtym has quit [Remote host closed the connection]
Krystof has joined #commonlisp
<kathe> i read-up about "clx", it's interesting, but failed to find a widget-set.
<kathe> does anyone here know about any widget-set for "clx"?
cosimone has joined #commonlisp
<ns12> kathe: Is this the "clx"? https://github.com/sharplispers/clx
<kathe> ns12: yes.
Cymew has quit [Ping timeout: 250 seconds]
<kathe> okay, in relation with "clx", i found mcclim, but it depends on gtk+!
<kathe> so now, i don't understand what's mcclim? or for that matter what's clim?
lisp123 has joined #commonlisp
<_death> kathe: how did you determine that it depends on gtk+?
<kathe> _death: i read it in passing while going through various articles/blogs/forums about it.
<kathe> looks like mcclim, as it's name suggests is an interface-manager that uses gtk+ for widgets.
<_death> kathe: it does not.. although old documentation refers to a gtkairo backend, which isn't part of the main branch
<_death> kathe: mcclim renders its own widgets
s-liao has joined #commonlisp
lisp123 has quit [Ping timeout: 260 seconds]
<kathe> _death: can you point me to something on that widget set from mcclim?
<kathe> i'm running around circles. so any help would be nice.
<lisp123w> Is CL a "safe" language?
<lisp123w> (memory safe, similar to Rust)
<kathe> lisp123w: comparing apples with oranges.
<kathe> lisp123w: i think the 'cl' compiler enforces strong typing.
<_death> kathe: https://github.com/mmontone/clim-doc contains documents on clim.. you can try the guided tour or other tutorials/guides.. probably not a good idea to _start_ with the spec
<lisp123w> I don't have any idea of the topic, but I read online that memory safety is important, but I wonder if this is just an issue for languages like C and if CL already solved this problem before: https://news.ycombinator.com/item?id=30091980
<_death> kathe: in climspeak, widgets are called gadgets.. here's code for drawing gadgets like push buttons, radio boxes, scroll bars, etc. https://github.com/McCLIM/McCLIM/blob/master/Core/clim-core/gadgets/concrete.lisp
<lisp123w> kathe: A very good introduction to CLIM: https://franz.com/support/documentation/10.1/doc/clim-ug.pdf
lawt has joined #commonlisp
<_death> kathe: there are some videos on youtube talking about mcclim, and you can look at the demos by loading "clim-examples" and evaluating (clim-demo:demodemo)
pve has joined #commonlisp
<ns12> McCLIM doesn't look native at all. https://mcclim.common-lisp.dev/excite.html
<ns12> Actually, the screenshots are a bit weird.
<kathe> in the lisp world, just like in the 'oss' world, everybody is hell-bent on doing their own thing.
<kathe> quite discomforting.
<kathe> emacs + slime/sly are so well entrenched that even through symbolics/genera had advanced graphical 'ide' systems, there's nothing for the present day common lisp systems.
<kathe> even more discomforting.
scymtym has joined #commonlisp
<kathe> i see rainer joswig's tweets about his experiments with graphical integrated development systems for common lisp and get serious heart-burn.
<kathe> time after time, every time.
karmichammer has joined #commonlisp
<_death> be the change that you want to see
<kathe> even though there are so many free common lisp systems, including the 'gpl' one called "clisp", 'gnu' people are hell-bent on developing their own common lisp, and that too a variant.
<kathe> man, this is crazy.
<kathe> i'm taking time out to figure if i really want to go ahead with common lisp or simply learn enough common lisp to understand the "condition system" and "metaobject protocol" based 'clos' and return to the world of smalltalk via squeak.
<phoe> I think you are making the assumption that there is some "gnu" people in there
<phoe> or rather just one or a small group of developers who are hacking at it in their free time
<phoe> like, you assume there is some greater scheme behind it (pun intended)
<kathe> phoe: that was a good one. :)
<kathe> does anyone here use the lispworks system? their 'ide' is beautiful.
<White_Flame> lisp123w: yes, it's memory safe. basically, raw pointers aren't exposed and accessing out-of-bounds array indices or using the wrong accessors won't destroy your memory
<phoe> you might want to ask on lisp-hug; Libera Chat is kind of more about FOSS implementations
<flip214> Is there some UI tracing tool, like clouseau for value inspection?
<kathe> phoe: sure. thanks for that tip.
karmichammer has quit [Ping timeout: 245 seconds]
<White_Flame> (rust attempts to be automatically threadsafe, which is a separate topic)
<ns12> White_Flame: "yes, it's memory safe" - What if I use a foreign function interface (such as CFFI)?
<White_Flame> then that's not lisp, and you're interfacing with & includign non-safe language stuff
<ns12> flip214: #'INSPECT ?
<ns12> White_Flame: Is the Lisp part still memory safe in the presence of non-Lisp parts accessed through a foreign function interface?
<phoe> no
<White_Flame> no, because the non-safe stuff can trample lisp
<saturn2> is rust still memory-safe when run under a kernel written in a non-safe language?
<lisp123w> White_Flame: Thanks! Lisp 1, Rest of World 0 :)
<White_Flame> I prefer Lisp 2 ;)
<lisp123w> Heh ;)
wheelsucker has quit [Remote host closed the connection]
<White_Flame> saturn2: pedantic, but one assumes the runtime is implemented properly
<ns12> "no, because the non-safe stuff can trample lisp" - Doesn't this have significant implications, since many Common Lisp libraries rely on CFFI?
<White_Flame> the unsafety of an implementation would be a fixable bug
<White_Flame> ns12: correct, if you pull in a buggy/exploitable non-lisp library, you might have problems
frodef has quit [Ping timeout: 256 seconds]
<phoe> ns12: in practice, this has as many implications as using these unsafe libraries without Lisp
<phoe> you use a library, you get to use its bugs as well, no matter if these are about memory safety or logic bugs
<phoe> it's simply that memory safety issues are hard to get in a memory safe language
<phoe> ...unless you can evaluate Lisp code, at which point not only pwn the machine, but can also abuse DX to destroy memory
<phoe> s/at which point/at which point you/
<semz_> Maybe more notable than CFFI (which obviously can't give you much more than the pittance C provides) is safety 0 code
<_death> in general, nothing is safe.. there are risks and you can try avoid their triggers, place control mechanisms, or mitigate bad consequences
<semz_> which isn't THAT common, but I've still seen (declaim (safety 0) (speed 3)) way too often
<ns12> Why would one want (declaim (safety 0) (speed 3)) ?
<semz_> "to make it fast"
<ns12> Fast, but possibly wrong ...
<phoe> to mark your code as not usable for pubilc consumption
<semz_> it's dumb but it's out there. and unlike a CFFI dependency, it isn't as easy to spot
frodef has joined #commonlisp
<phoe> thankfully it's easy to fix with sb-ext:restrict-compiler-policy
<phoe> but that is SBCL-specific
<semz_> it's usually not even particularly fast
<ns12> semz_: "it isn't as easy to spot" - Why not? Isn't it a simple matter of using grep to find "(safety 0)"?
<semz_> sure, but a CFFI dependency is usually documented
<phoe> you need to walk all transitive dependencies
<flip214> ns12: no, something using mcclim or similar... allowing to click open subcalls and so on.
karmichammer has joined #commonlisp
<ns12> semz_: "CFFI dependency is usually documented" - I don't think so. In any case, CFFI would be listed in the ASD file.
<ns12> My ~/.sbclrc contains:
<ns12> (sb-ext:restrict-compiler-policy 'debug 3)
<ns12> (sb-ext:restrict-compiler-policy 'safety 3)
<ns12> Does the setting apply to everything that I compile, including all libraries and their dependencies?
<phoe> t
<ns12> This would override all (declaim (safety 0)) in any library that I compile?
Major_Biscuit has joined #commonlisp
karmichammer has quit [Ping timeout: 240 seconds]
<mfiano> You shouldn't ever declaim optimization qualities at the toplevel anyway. The semantics are not clearly defined.
<phoe> ns12: t
<ns12> Thank you phoe.
<mfiano> Years ago I remember taking a couple days to find a bug that was due to some library declaiming at the toplevel.
<phoe> therefore, after restricting compiler policy, you can e.g. (ql:quickload :jsown) without feeling guilty
<mfiano> Tainting the image, by leaking into later compiled files.
* mfiano waits for #+real-damn-fast-priority-queue bug report
<phoe> mfiano: I am giving the programmer a choice at https://github.com/phoe/damn-fast-priority-queue/blob/main/damn-fast-priority-queue/src.lisp#L20, not set the defaults for them
<jdz> There are cases where real damn fast priority queue is slower than alternatives.
<mfiano> I know
<phoe> jdz: you mean the ones listed in my benchmark, or have some other ones been foind?
<phoe> found*
<mfiano> I already informed phoe of some large optimizations that can be made. I'm not sure if he applied them yet
<jdz> I've been playing around implementing a straight-forward pairing heap: https://github.com/jdz/simple-pairing-heap/blob/master/bench.org
<phoe> I'm interested
<phoe> mfiano: not yet, https://github.com/phoe/damn-fast-priority-queue/issues/12 is still there
<mfiano> Looks like you didn't fork my ephemeral gists
<phoe> aw snap
<phoe> no, I didn't
<scymtym> flip214: can you elaborate on what you are looking for?
mon_aaraj has quit [Ping timeout: 240 seconds]
Dynom has joined #commonlisp
mon_aaraj has joined #commonlisp
occ has quit [Ping timeout: 240 seconds]
<flip214> scymtym: some UI that allows to trace a function call, and displays the data graphically (X11, McClim).
<lisp123w> That new CLOG demo looks pretty cool
<scymtym> flip214: i have a tool for that, but it is not very usable at the moment
kathe has quit [Quit: Leaving]
lisp123 has joined #commonlisp
karmichammer has joined #commonlisp
lisp123 has quit [Ping timeout: 250 seconds]
<flip214> The Story of My Life
karmichammer has quit [Ping timeout: 256 seconds]
igemnace has quit [Remote host closed the connection]
alvaro121_ has quit [Quit: Bye]
attila_lendvai has quit [Read error: Connection reset by peer]
igemnace has joined #commonlisp
Mandus has quit [Quit: WeeChat 3.3]
igemnace has quit [Remote host closed the connection]
taiju has quit [Remote host closed the connection]
attila_lendvai has joined #commonlisp
dilated_dinosaur has quit [Ping timeout: 240 seconds]
dilated_dinosaur has joined #commonlisp
lispy has quit [Quit: O/]
Mandus has joined #commonlisp
<beach> Although probably all implementations of Common Lisp are safe with high values of the safety quality, the language itself is not as safe as we would like to believe. Hence WSCL.
igemnace has joined #commonlisp
<beach> kathe: I think you should stick to Smalltalk and Squeak.
mister_m` has joined #commonlisp
fiddlerwoaroof has quit [Ping timeout: 256 seconds]
s-liao has quit [Ping timeout: 256 seconds]
occ has joined #commonlisp
selwyn has quit [Ping timeout: 256 seconds]
fiddlerwoaroof has joined #commonlisp
kevingal has joined #commonlisp
mister_m has quit [Ping timeout: 256 seconds]
selwyn has joined #commonlisp
jeosol has quit [Ping timeout: 256 seconds]
kevingal has quit [Ping timeout: 250 seconds]
kevingal has joined #commonlisp
kevingal has quit [Ping timeout: 245 seconds]
kevingal has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 250 seconds]
Lord_of_Life has joined #commonlisp
s-liao has joined #commonlisp
nij- has joined #commonlisp
karmichammer has joined #commonlisp
karmichammer has quit [Ping timeout: 252 seconds]
waleee has joined #commonlisp
igemnace has quit [Quit: WeeChat 3.4]
dickbar__ has joined #commonlisp
mzan has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
mzan has joined #commonlisp
samps has joined #commonlisp
dickbar__ has quit []
karmichammer has joined #commonlisp
karmichammer has quit [Ping timeout: 256 seconds]
waleee has quit [Ping timeout: 250 seconds]
Algernon69 has quit [Ping timeout: 260 seconds]
aartaka has quit [Ping timeout: 240 seconds]
Algernon69 has joined #commonlisp
random-nick has joined #commonlisp
karmichammer has joined #commonlisp
s-liao has quit [Ping timeout: 256 seconds]
OlCe has quit [Ping timeout: 240 seconds]
xsperry has joined #commonlisp
samps has quit [Ping timeout: 240 seconds]
karmichammer has quit [Ping timeout: 240 seconds]
karmichammer has joined #commonlisp
aartaka has joined #commonlisp
lisp123 has joined #commonlisp
karmichammer has quit [Ping timeout: 256 seconds]
karmichammer has joined #commonlisp
aartaka has quit [Read error: Connection reset by peer]
aartaka has joined #commonlisp
lisp123 has quit [Ping timeout: 256 seconds]
karmichammer has quit [Ping timeout: 256 seconds]
karmichammer has joined #commonlisp
Algernon69 has quit [Ping timeout: 252 seconds]
OlCe` has joined #commonlisp
karmichammer has quit [Ping timeout: 240 seconds]
mmk2410 has quit [Quit: ZNC - https://znc.in]
mmk2410 has joined #commonlisp
samps has joined #commonlisp
karmichammer has joined #commonlisp
foxfromabyss has joined #commonlisp
aartaka has quit [Ping timeout: 240 seconds]
aartaka has joined #commonlisp
s-liao has joined #commonlisp
karmichammer has quit [Ping timeout: 256 seconds]
Algernon69 has joined #commonlisp
tyson2 has joined #commonlisp
knobo has joined #commonlisp
Algernon91 has joined #commonlisp
shozo has quit [Remote host closed the connection]
Algernon69 has quit [Ping timeout: 240 seconds]
karmichammer has joined #commonlisp
shozo has joined #commonlisp
karmichammer has quit [Ping timeout: 250 seconds]
artchad has joined #commonlisp
szkl has quit [Quit: Connection closed for inactivity]
morganw has joined #commonlisp
splatt990 has joined #commonlisp
mon_aaraj has quit [Ping timeout: 240 seconds]
s-liao has quit [Quit: Client closed]
mon_aaraj has joined #commonlisp
<Demosthenex> anyone seen a simple utility to output lists to yaml, so i can avoid editing yaml ? =]
<phoe> you mean something to generate YAML from Lisp data?
<phoe> (ql:quickload :cl-yaml) maybe
<flip214> with TRIVIA, how would I match (A B C) and (A C)? Can I specify a nothing-pattern in an OR, like (LIST 'A (OR 'B <nothing>) 'C)?
<Demosthenex> yeah, i'm looking at cl=yaml. just felt like i was reinventing the wheel
shozo has quit [Remote host closed the connection]
<Demosthenex> flip214: i had the impression you couldn't chain tests in trivia because it was macros, not functions.
<flip214> Or would I need something like (OR (CONS 'A (CONS 'B #1= (CONS C NIL))) (CONS 'A #1#))?
<flip214> the actual example is a a bit more involved, so I'd like to share the part after the optional thing somehow
<flip214> well, SATISFIES might be another idea, though not actually better - I wanted to avoid all that CAR CDR EQ stuff
s-liao has joined #commonlisp
<Demosthenex> yeah, i've been tinkering with trivia to use to enforce grammar testing of records, and field extraction. and it appears there is no skip, optional, or wildcard that i can find
<flip214> Demosthenex: thanks
foxfromabyss has quit [Quit: Client closed]
Bike has joined #commonlisp
OlCe` has quit [Remote host closed the connection]
foxfromabyss has joined #commonlisp
karmichammer has joined #commonlisp
pmwals09 has joined #commonlisp
pmwals09 has quit [Remote host closed the connection]
cage has joined #commonlisp
Major_Biscuit has quit [Ping timeout: 260 seconds]
shozo has joined #commonlisp
<phantomics> For Europeans and American early risers: in an hour and a half (at 14:00 GMT) I will be presenting the April compiler to the British APL Association. You can watch it at https://zoom.us/j/858532665 with the passcode 391680
<Demosthenex> awesome!
nij- has left #commonlisp [#commonlisp]
<phantomics> This is a presentation for APL users, so will come from a different perspective than my presentation to the CL users at LispNYC
<phoe> phantomics: please post a link to the recording later
<phoe> I have a conflicting chore :(
<phantomics> Ok, I'll be recording this one myself just like the LispNYC talk
<phoe> thanks!
OlCe has joined #commonlisp
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #commonlisp
<phantomics> Correction: that's 16:00 GMT
jeosol has joined #commonlisp
s-liao has quit [Ping timeout: 256 seconds]
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #commonlisp
mon_aaraj has quit [Ping timeout: 268 seconds]
s-liao has joined #commonlisp
mon_aaraj has joined #commonlisp
samps has quit [Ping timeout: 250 seconds]
waleee has joined #commonlisp
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #commonlisp
OlCe has quit [Ping timeout: 250 seconds]
Major_Biscuit has joined #commonlisp
_73 has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
_73 has left #commonlisp [ERC 5.4 (IRC client for GNU Emacs 28.0.90)]
Inline has joined #commonlisp
OlCe has joined #commonlisp
mon_aaraj has quit [Ping timeout: 240 seconds]
s-liao has quit [Quit: Client closed]
szkl has joined #commonlisp
morganw has quit [Remote host closed the connection]
karmichammer has quit [Ping timeout: 240 seconds]
mon_aaraj has joined #commonlisp
Algernon91 has quit [Remote host closed the connection]
Algernon91 has joined #commonlisp
cosimone has quit [Remote host closed the connection]
mon_aaraj has quit [Ping timeout: 252 seconds]
cosimone has joined #commonlisp
karmichammer has joined #commonlisp
mon_aaraj has joined #commonlisp
karmichammer has quit [Ping timeout: 252 seconds]
treflip has joined #commonlisp
mon_aaraj has quit [Ping timeout: 240 seconds]
mon_aaraj has joined #commonlisp
<Josh_2> I have never used APL but I have to say April is very impressive
karmichammer has joined #commonlisp
karmichammer has quit [Ping timeout: 240 seconds]
tyson2 has joined #commonlisp
samps has joined #commonlisp
karmichammer has joined #commonlisp
jeffrey has joined #commonlisp
Jing has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
karmichammer has quit [Ping timeout: 268 seconds]
Inline has quit [Quit: Leaving]
Inline has joined #commonlisp
mon_aaraj has quit [Ping timeout: 240 seconds]
kevingal has quit [Remote host closed the connection]
mon_aaraj has joined #commonlisp
Major_Biscuit has quit [Ping timeout: 250 seconds]
karmichammer has joined #commonlisp
ldb has joined #commonlisp
wyrd has quit [Ping timeout: 276 seconds]
wyrd has joined #commonlisp
lisp123 has joined #commonlisp
<lisp123> Is there a reason why a compilation unit stops at a file?
karmichammer has quit [Ping timeout: 256 seconds]
karmichammer has joined #commonlisp
<ldb> lisp123: have you checked out ASDF?
<lisp123> ldb: Well, if a comp unit could be multi file, it would simplify ASDF
<beach> clhs with-compilation-unit
<lisp123> beach: Thanks! Problem Solved
<lisp123> Interesting that I haven't seen it used much (maybe I missing it)? ASDF likes to get people to specify the dependencies between files or to use the :SERIAL T option
<Bike> you still need that stuff because being in the same compilation unit isn't always enough. most obvious example is that macros need to be defined before they are used in code that's being compiled.
<Colleen> Bike: scymtym said 4 hours, 29 minutes ago: the "Minor fixes" pull request for Cleavir is in preparation for the BIR visualizer improvements
<lisp123> Bike: Thanks, yes that is true. Although I would tend to be careful around Macros and more liberal around functions (in terms of placing) for that reason
<Bike> i mean. yes. specifying dependencies between files is part of being careful.
<Josh_2> phantomics: Nice talk thanks. Shame that just as you answered my questions I had to leave :(
<lisp123> Yeah. I am just on my anti-ASDF phase for now, which I will come around to in due course once my projects become more complex :)
<Josh_2> It would be nice to have heard a bit more about how you implemented it, but thats because I am a lisper but you were talking to APL users
<lisp123> The automatic finding of files in ASDF is very convenient, but IMO is the root of quite a few of the problems (e.g. versioning)
Guest6628 has joined #commonlisp
ldb has quit [Quit: leaving]
<Guest6628> why are there two common lisp websites? https://lisp-lang.org/ and https://common-lisp.net/
<lisp123> Unrelated if I understand correctly
<phantomics> Josh_2, have you seen my previous presentation? https://news.ycombinator.com/item?id=24434717 (video linked here, more discussion in the comments)
<lisp123> The latter is the main one
<phantomics> Thanks for watching
Brucio-92 has joined #commonlisp
<Guest6628> lisp123 ty
<Josh_2> phantomics: totally offtopic but have you used swiper/marginalia in emacs?
<phantomics> No, haven't
<beach> Guest6628: Nobody controls the number of Common Lisp web sites there can be, so there are probably many more.
attila_lendvai has quit [Read error: Connection reset by peer]
<beach> Guest6628: The last one is run by the Common Lisp Foundation, but again, anyone can create a Common Lisp foundation, just not another one in the Netherlands.
<Bike> chaos reigns.
<moon-child> trademarked there?
attila_lendvai has joined #commonlisp
shozo has quit [Remote host closed the connection]
<Josh_2> phantomics: using lisp to generate APL which is then processed by lisp :P
Algernon666 has joined #commonlisp
<Guest6628> beach so, should i follow the CLFoundation one? or are there better references?
<beach> "follow"?
<beach> Guest6628: For what purpose?
<Guest6628> by follow i mean to use their guidelines
Algernon91 has quit [Ping timeout: 245 seconds]
attila_lendvai has quit [Read error: Connection reset by peer]
<phantomics> Josh_2: haven't done much APL code generation with Lisp, could be an interesting way to test
<Guest6628> idk the purpose, just see what it can offer me
<beach> Guest6628: Guidelines for what? You mean style guides for coding?
attila_lendvai has joined #commonlisp
<beach> Guest6628: I think you may be overthinking this issue. Both sites contain information about Common Lisp. I see no immediate conflicting information there, but I haven't looked too hard.
<Guest6628> guidelines for learning the language: the getting started, the documentation, the resources...
pillton has quit [Ping timeout: 260 seconds]
<lisp123> Guest6628: If you are any experienced programmer. read Practical Common Lisp
<beach> Yes, read a good book. That's a reasonable one.
<lisp123> If you are a beginner, read A Gentle Introduction to Symbolic Computing
attila_lendvai has quit [Read error: Connection reset by peer]
<etimmons> lisp123: ASDF performs its plan within the body of WITH-COMPILATION-UNIT
<etimmons> lisp123: Also what do you mean "automatic finding of files"?
foxfromabyss has quit [Quit: Client closed]
foxfromabyss has joined #commonlisp
<Guest6628> lisp123 okay, i will. ty
attila_lendvai has joined #commonlisp
<foxfromabyss> do BT threads create real threads in terms of overhead? I just need to poll a socket every 15 seconds, and a whole thread dedicated to that seems like an overkill
<beach> Are there threads that are not real?
<lisp123> etimmons: ASDF will find / load the first system definition it finds if I understand correctly. If the user was forced to supply the path of the dependency, they could 'lock-in' a particular version. Of course most would favour the ease of use of ASDF, but that automatic mechanism does have these downsides
Guest6628 has left #commonlisp [#commonlisp]
<Bike> foxfromabyss: if you mean operating system threads rather than green threads, that would be up to the lisp implementation, but i don't think any of them use green threads right now.
<lisp123> (I guess for large projects with many dependencies that end up sharing dependencies, the ASDF way is much better)
samps has quit [Ping timeout: 260 seconds]
Oladon has joined #commonlisp
<foxfromabyss> Bike i see, thanks. Could you point me in the direction of any more lightweight alternatives?
<lisp123> etimmons: If there is a way to force ASDF to load a dependency at a particular filepath, that could be quite useful
<lisp123> A lot of beginners also don't understand the ASDF scanning process and how they have to register folders to be searched
<lisp123> This would overcome that
<Bike> i don't know of any. i think people use thread pools, or maybe poll for that kind of thing
<beach> lisp123: I don't think ASDF requires registration. That's something that Quicklisp introduces if I remember correctly.
<lisp123> And then I can deliver a repo with all the dependencies being references by relative pathnames
karmichammer has quit [Ping timeout: 240 seconds]
<foxfromabyss> gotcha, thanks!
<etimmons> lisp123: ASDF has several ways to configure where to look for dependencies. But none of them are meant to be used from an .asd file. That's good in terms of separation of concerns.
<lisp123> beach: I think ASDF searches ~/common-lisp by default (and maybe some other folders), but otherwise you need to edit "~/.config/common-lisp/source-registry.conf.d/"
<etimmons> If you want to deliver such a repo, tell your users to set CL_SOURCE_REGISTRY=/path/to/repo// and then all your systems (and only your systems) will be found
<etimmons> Or have a helper script that calls ASDF:INITIALIZE-SOURCE-REGISTRY appropriately
<beach> lisp123: Oh, i thought you meant QL:REGISTER-LOCAL-PROJECTS. Sorry.
<lisp123> etimmons: Would that override ASDF default search and interfere with the user's use of ASDF for other purposes?
<lisp123> beach: No worries, most usually think directly in QL terms
<Bike> ccl complains about x being unused in (loop for (x . y) in list do (print y)). is there some way to pacify it? while keeping the destructuring, if possible
<Alfr> lisp123, place :inherit-configuration conveniently.
<scymtym> LOOP treats NIL (or ()) as ignored instead of an empty-list sub-pattern if i recall correctly
<Bike> ohh yeah i see, buried in 6.1.1.7. wasn't sure if that was standard or what
karmichammer has joined #commonlisp
treflip has quit [Quit: good night!]
<Bike> Thanks
<etimmons> lisp123: Alfr's got it.
karmichammer has quit [Ping timeout: 256 seconds]
<lisp123> etimmons & Alfr: Thanks, I did a quick search and didn't find any quick explanation on it. I'll take your word for it of course. But IMO I think if you can make the :depends-on clause to have an option to specify the exact path of the system, it would be much more natural to read and follow
<lisp123> Versioning wouldn't be a problem then, and having filepaths in the ASD would be much more readable for many IMHO
<etimmons> lisp123: That would introduce a lot more problems
<Josh_2> foxfromabyss: the overhead for starting a thread is tiny
<Josh_2> but you can just have a single thread that waits every 15 seconds and then checks and stores the result somewhere, that way you dont have the overhead
<etimmons> First, paths are likely to not be portable between different computers
<etimmons> Second, what happens if A loads B from foo/b.asd and C loads B from bar/b.asd?
<etimmons> There's been discussion here over the past few days how we can't load multiple versions of the same system (yet, at least)
attila_lendvai has quit [Read error: Connection reset by peer]
<lisp123> etimmons: On (1) - I see, my understanding was you could have a portability layer (UIOP?) and translate between filepaths on different computers without too much work
<EdLangley[m]> Depending by path is a bad idea`
attila_lendvai has joined #commonlisp
<EdLangley[m]> It's a great way to get build specs that have /home/foo/... in them
<EdLangley[m]> And only work in one place
<lisp123> (2) - I thought about that earlier, and its an issue which ASDF's current approach solves best. But you could leave it to the writer of the main system (e.g. me in this case), to go through each of the dependencies, and ensure they are compatible and specify the paths to the common dependency
<EdLangley[m]> lisp123: I think you're overthinking this, "version compatibility" is not a huge issue in CL at the moment
<EdLangley[m]> Occasionally an update breaks your code a tiny bit and you figure it out
<EdLangley[m]> But, it's nothing like what you find in other languages, IME
karmichammer has joined #commonlisp
cosimone has quit [Remote host closed the connection]
<EdLangley[m]> And my experience is that other languages have a huge problem of getting people used to the idea of not updating
<EdLangley[m]> Which makes everyone fear the upgrades, because they turn into huge projects
<EdLangley[m]> If you're always upgrading all the time, the work is significantly more manageable.
<lisp123> EdLangley[m]: Actually it doesn't affect me much. But something does sit off with me on not being able to specify a path to a particular dependency. Like, reading (load "/new-sass-idea/make-money.lisp") is a natural way of thinking about loading files, but with ASDF, I have to learn about how the process works
<lisp123> And I think its fair to say many don't understand it that well
<EdLangley[m]> You shouldn't think about "loading files"
<EdLangley[m]> Files are an implementation detail of systems
cosimone has joined #commonlisp
<etimmons> lisp123: But what if your "main" system uses a system that thinks _it_ is the "main" system and defines paths as well?
<EdLangley[m]> For example, there's nothing preventing someone from writing an ASDF component that loads code from an SQLite database
<etimmons> IMO there should be no distinction between a "main" system and non-main system. And that's why it's important configuration is decoupled from the system definition
<EdLangley[m]> The thing I like about ASDF is that it makes systems first-class
knobo has quit [Quit: Client closed]
<lisp123> EdLangley[m]: Yes, but that's getting too abstract :P Lisp is just an implementation detail of my thoughts ;) Like most people *DO* think in terms of files
<EdLangley[m]> Yeah, and IMO that's a problem with modern dev environments :)
<EdLangley[m]> Files force you to have one preferred code structure
<EdLangley[m]> Which doesn't make sense
<EdLangley[m]> In different contexts, different structures make sense
<etimmons> the short story is that you should really only care about the exact versions of your dependencies when you're delivering something like an application. In that case, you deliver an ASDF config that finds the exact systems you want
<EdLangley[m]> +1
attila_lendvai has quit [Read error: Connection reset by peer]
karmichammer has quit [Ping timeout: 256 seconds]
ldb has joined #commonlisp
<etimmons> Otherwise, let developers control exactly which systems they use
<etimmons> Also makes it easier for a dev to hack on one of your deps without needing to modify your .asd file to point it to a different place on their filesystem, etc.
<lisp123> etimmons: I didn't think of "main" systems at all, perhaps I missed it, but is it an issue if a system definition called by another system definition defines its own paths?
<lisp123> Each is loaded as a unit
<etimmons> Yes, if there are conflicting paths
<lisp123> to the same dependency?
<Josh_2> etimmons: does quicklisp support versioning? Wouldn't that be a royal PITA for Xach
attila_lendvai has joined #commonlisp
<etimmons> Josh_2: no, versioning doesn't fit into QL
<etimmons> other than the data at which the snapshot was taken
<etimmons> And you _can_ mix and match between different versions of the QL dist if you know what you're doing
<lisp123> etimmons: I don't deny the 'automatic' approach of ASDF makes using systems much more convenient. But I disagree that you should only care about dependencies if you are delivering an application, some of us will want control from the first step in the process
karmichammer has joined #commonlisp
<lisp123> I guess the crux is the though of whether files are an implementation detail or not
<etimmons> lisp123: I understand, but the reality is that current CL implementations make that basically impossible.
attila_lendvai has quit [Read error: Connection reset by peer]
<etimmons> because as soon as your and one of your deps disagree on where a shared dep is loaded from you've got problems
<etimmons> * you
<lisp123> Yes
attila_lendvai has joined #commonlisp
<etimmons> And sorry, there are more cases where explicitly pining deps is useful
<etimmons> One I use quite frequently is pinning the development environment of my libraries
<etimmons> So I know I, my collaborators, and CI are running in the same environment
<lisp123> Yes
<Demosthenex> hrm, i'm trying to figure out how to make trivia:match use my object accessor when it encounters a keyword (ie: compare the keyword to the obj)
<etimmons> But that doesn't leak to users of my library and is kept up to date on a semi-regular basis by automated CI jobs
<lisp123> I think the larger the system gets, the better ASDF gets
attila_lendvai has quit [Read error: Connection reset by peer]
<lisp123> And the cost of it is forcing small-time users to learn a bit of complexity
attila_lendvai has joined #commonlisp
<lisp123> I do think the lack of filepaths adds to quite a bit of that initial complexity. But I guess you may not want to enable practices that could cause some issues when systems have many dependencies (as just discussed)
<White_Flame> foxfromabyss: if you don't want to use OS threads (which I personally don't see as problematic for your use case), you could also use timers, if your implementation supports them. They can interrupt your code every 15 seconds and do something
Algernon666 has quit [Read error: Connection reset by peer]
Algernon666 has joined #commonlisp
lisp123 has quit [Quit: Leaving...]
<foxfromabyss> thanks Josh_2 White_Flame !
attila_lendvai has quit [Read error: Connection reset by peer]
Brucio-92 has quit [Ping timeout: 240 seconds]
attila_lendvai has joined #commonlisp
Algernon666 has quit [Read error: Network is unreachable]
karmichammer has quit [Ping timeout: 256 seconds]
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #commonlisp
attila_lendvai has quit [Read error: Connection reset by peer]
Oladon has quit [Quit: Leaving.]
attila_lendvai has joined #commonlisp
attila_lendvai has quit [Read error: Connection reset by peer]
karmichammer has joined #commonlisp
attila_lendvai has joined #commonlisp
attila_lendvai has quit [Read error: Connection reset by peer]
jeffrey has quit [Ping timeout: 250 seconds]
attila_lendvai has joined #commonlisp
jeffrey has joined #commonlisp
notzmv has quit [Ping timeout: 268 seconds]
karmichammer has quit [Ping timeout: 252 seconds]
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #commonlisp
alvaro121 has joined #commonlisp
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #commonlisp
karmichammer has joined #commonlisp
ldb has quit [Quit: ERC (IRC client for Emacs 27.2)]
mon_aaraj has quit [Ping timeout: 240 seconds]
mon_aaraj has joined #commonlisp
jeffrey has quit [Ping timeout: 256 seconds]
<Josh_2> Who maintains the cliki?
<phoe> all of us
<mfiano> Whoever is logged in?
<Josh_2> No I mean, who hosts the website
<Josh_2> vsedach ?
<mfiano> Yes
<mfiano> Likely on the CLF infrastructure
<phoe> ^
foxfromabyss has quit [Quit: Client closed]
jeosol has quit [Quit: Client closed]
rogersm has quit [Quit: Leaving...]
scymtym has quit [Ping timeout: 245 seconds]
alvaro121_ has joined #commonlisp
attila_lendvai has quit [Read error: Connection reset by peer]
alvaro121 has quit [Ping timeout: 250 seconds]
attila_lendvai has joined #commonlisp
nij- has joined #commonlisp
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #commonlisp
mon_aaraj has quit [Quit: WeeChat 3.4]
jmpeax has quit [Quit: leaving]
mon_aaraj has joined #commonlisp
foxfromabyss has joined #commonlisp
<foxfromabyss> how do I put a local fork of the library into `asd` system definition?
<foxfromabyss> and do i need to change both `package` and `asd` or just asd?
<pjb> foxfromabyss: just put it in some directory, and have asdf:*central-registry* or quicklisp:*local-project-directories* point to it.
<pjb> Changing the name of the system would be in order if you wanted to be able to load both the old and the new library at the same time.
<pjb> In that case, making sure they mutate different packages could be a good idea.
karmichammer has quit [Ping timeout: 250 seconds]
<foxfromabyss> hmm
<foxfromabyss> asdf and quicklisp variables don't intersect at all
<foxfromabyss> is this the way it's supposed to be to make local fork work?
<foxfromabyss> oh i figured it out, thanks for the help!
<pjb> asdf:*central-registry* let you shadow a library locally for all asdf commands. quicklisp:*local-project-directories* or storing in ~/quicklisp/local-projects/ let you shadow a library locally for all quicklisp and asdf commands.
<foxfromabyss> i see i see, thanks :P
karmichammer has joined #commonlisp
karmichammer has quit [Ping timeout: 260 seconds]
foxfromabyss has quit [Quit: Client closed]
karmichammer has joined #commonlisp
nij- has left #commonlisp [Using Circe, the loveliest of all IRC clients]
attila_lendvai has quit [Ping timeout: 256 seconds]
notzmv has joined #commonlisp
karmichammer has quit [Ping timeout: 250 seconds]
artchad has quit [Read error: Connection reset by peer]
karmichammer has joined #commonlisp
karmichammer has quit [Ping timeout: 256 seconds]
karmichammer has joined #commonlisp
aartaka has quit [Ping timeout: 240 seconds]
karmichammer has quit [Ping timeout: 240 seconds]
molson_ has joined #commonlisp
cosimone has quit [Quit: ERC (IRC client for Emacs 27.1)]
molson has quit [Ping timeout: 240 seconds]
samps has joined #commonlisp
Dynom has quit [Quit: WeeChat 3.4]
mon_aaraj has quit [Ping timeout: 240 seconds]
shka has quit [Ping timeout: 260 seconds]
mon_aaraj has joined #commonlisp
karmichammer has joined #commonlisp
Inline has quit [Ping timeout: 240 seconds]
karmichammer has quit [Ping timeout: 256 seconds]
scymtym has joined #commonlisp
Inline has joined #commonlisp
varjag has joined #commonlisp
Algernon69 has joined #commonlisp
mon_aaraj has quit [Ping timeout: 240 seconds]
mon_aaraj has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
morganw has joined #commonlisp
mon_aaraj has quit [Ping timeout: 240 seconds]
mon_aaraj has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 27.1]
karmichammer has joined #commonlisp
pranavats has joined #commonlisp
karmichammer has quit [Ping timeout: 240 seconds]
samps has quit [Ping timeout: 240 seconds]
_73 has joined #commonlisp
karmichammer has joined #commonlisp
scymtym has quit [Ping timeout: 240 seconds]
<_73> is there a library that provides reader macros on top of cl-ppcre that enables you to use syntax similar to perl?
<Demosthenex> _73: i saw one that did #R for regexps, but its not going to improve the function calls
dec0d3r has joined #commonlisp
<_73> Demosthenex: do you happen to remember what is was called? I was thinking of making my own but don't want to reinvent the wheel.
<Josh_2> oof
<_73> Bike: this library goes beyond string interpolation? I was thinking syntax similar to perl's m// s/// etc.
<Bike> it has stuff intended to allow you to write regexes exactly as you would in perl. i don't know anything beyond that.
<_73> Ill try it thanks
kevingal has joined #commonlisp
occ has quit [Ping timeout: 245 seconds]
Algernon69 has quit [Ping timeout: 240 seconds]
Tom has joined #commonlisp
<Tom> Hey! Any sly&sbcl users here? :) I'm trying to trace a method with sly, but it doesn't pass `:methods t` so sbcl doesn't trace the method
<Tom> aside from modifying my slynk, what are my options?
Tom is now known as Guest6655
lispy2 has joined #commonlisp
lispy2 is now known as lispy
shka has joined #commonlisp
mgl has quit [Quit: Client closed]
kevingal has quit [Remote host closed the connection]
varjag has quit [Ping timeout: 256 seconds]
<Demosthenex> _73: https://www.cliki.net/regular%20expression shows wrappers
OlCe has quit [Ping timeout: 256 seconds]
<Josh_2> Guest6655: you should keep your name as tom
<Josh_2> also you could just type (trace ..) in the repl, flex those finger muscles
pve has quit [Quit: leaving]
samps has joined #commonlisp
djuber has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
karmichammer has quit [Ping timeout: 240 seconds]
Lord_Nightmare has quit [Quit: ZNC - http://znc.in]
Josh_2 has quit [Ping timeout: 240 seconds]
Lord_Nightmare has joined #commonlisp
shka has quit [Ping timeout: 250 seconds]
<morganw> Would a sticker work?