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>
akoana has quit [Quit: leaving]
ec has quit [Ping timeout: 244 seconds]
random-nick has quit [Ping timeout: 248 seconds]
ec has joined #commonlisp
pillton` has joined #commonlisp
pillton`` has joined #commonlisp
pillton has quit [Ping timeout: 256 seconds]
pillton`` has quit [Remote host closed the connection]
pillton`` has joined #commonlisp
pillton` has quit [Ping timeout: 256 seconds]
pillton`` has quit [Ping timeout: 256 seconds]
ec has quit [Ping timeout: 244 seconds]
ec has joined #commonlisp
Fare has joined #commonlisp
Josh_2 has joined #commonlisp
<Josh_2> Hi
<Josh_2> What should I use to generate an atom and RSS feed for a website?
<mfiano> I use...what was it...
<jcowan> My general rule of thumb is that alists/plists make sense up to about 30 key/value pairs, and then hash tables kick in.
<mfiano> xml-emitter
<Josh_2> Thanks mfiano :)
ec has quit [Ping timeout: 244 seconds]
<hayley> I thought I had observed a crossover of 7 elements with SICL's alist "hash table" and its linear probing hash table. But that would also include SBCL's generic function overhead.
ec has joined #commonlisp
beach` has joined #commonlisp
beach has quit [Ping timeout: 272 seconds]
ec has quit [Ping timeout: 244 seconds]
ec has joined #commonlisp
beach` is now known as beach
prxq has joined #commonlisp
prxq_ has quit [Ping timeout: 248 seconds]
djuber has joined #commonlisp
Qwnavery has joined #commonlisp
<beach> Good morning everyone!
<Qwnavery> afternoon.
<beach> char: If I understand things right, throwing exceptions in C++ in particular does not work right because of their manual memory management, so it seems that the only safe way in C++ is to return error codes, which has a disastrous effect on modularity.
<beach> But languages with automatic memory management don't have that problem
<beach> char: Also, as phoe points out in his book, non-local control transfer is the very basis of a sane condition system, so there are your super gotos that are absolutely necessary as well.
<beach> It is amazing how much misconception there is in this area. Pascal had non-local gotos and that was the only mechanism Pascal could use for error handling. Turbo Pascal eliminated those, thereby making generations of programmers use error codes instead.
kakuhen has quit [Ping timeout: 240 seconds]
pillton has joined #commonlisp
kakuhen has joined #commonlisp
ec has quit [Ping timeout: 244 seconds]
djuber has quit [Ping timeout: 268 seconds]
Qwnavery has quit [Quit: WeeChat 3.2]
nij- has joined #commonlisp
notzmv has joined #commonlisp
<Bike> that is _one_ reason throwing exceptions in C++ does not work right
<beach> What are some others?
<aeth> If CL had to use error codes, there are multiple language features that make them less painful than "normal" languages. Lots of fun ways to do it. Multiple return values? Special/dynamic variables? Probably some cleverer ways than that, too.
<aeth> But it doesn't, unless it's working with FFI
ec has joined #commonlisp
<hayley> GETHASH and COMPILE use multiple values, but the former doesn't use multiple values for erroneous situations, and the latter ends up producing a function object anyway.
<Bike> another one comes up with how catching works. like pretty much any exception handling thing, the exception handling clauses discriminate on the dynamic type of the exception. however, c++ is generally statically typed, so the type associated with the exception is whatever the static type of the object is
<beach> I guess special variables could work, but otherwise, the main problem with error codes is that all functions between the function indicating the error and the function knowing what to do with it must also be aware of the error code. So you end up with a program with most of its code doing error handling.
<aeth> well, with multiple values, if it had become an idiom, there would be a macro for it
<Bike> which means if you have a catch block like "catch (ExcType1& e) { ... throw e; }", and the exception "is" some subtype of ExcType1, that information is lost by the rethrow, so catch handlers for that subtype won't fire
<Bike> so C++ has to compensate for this with a special rethrowing mechanism
<beach> Bike: I see. That language truly is a disaster.
<Bike> i think it's fairly unique in this respect though. even languages as similar as java lack these issues as far as i know
<beach> It is very interesting to me to see how one single design decision can have such dire consequences to the rest of the language; in this case lack of automatic memory management.
<hayley> I remember that in Java, generic types "erase" the type parameters, so you can't throw or catch an exception of type Blah<String>. But you don't usually do that.
<beach> I mean, making such a decision is fine in a relatively simple language like C. But then, trying to create a language for application programming based on such a decision is just a recipe for disaster.
<lotuseater> It's this overfocusing on performance.
<hayley> lotuseater: Once someone said that not having bignums in some language was a tradeoff, and they focused on performance. The trouble is that taking non-zero time to produce a garbage value isn't very performant at all.
<lotuseater> okay
<hayley> So it is a weird definition of "performance".
<moon-child> floating point is also imprecise
<moon-child> it is very difficult to avoid such imprecision short of something like mathematica
<moon-child> in many domains you can know what your bounds are, such that fixed-size integers are acceptable
<moon-child> (indices are an excellent example--you will run out of memory far before you ever overflow a 64-bit array index!)
<moon-child> (on the flip side, more people should be using arb)
ec has quit [Ping timeout: 244 seconds]
<beach> lotuseater: But, as I often point out, it is impossible to write a large-ish C++ program that is both fast and modular. For modularity, something like smart pointers or reference counters is needed, or you need to copy every object. And in either case, you take a factor 10-100 performance penalty.
<beach> lotuseater: So if they were really focused on performance, they would have used uniform reference semantics the way Common Lisp does.
<moon-child> beach: the modularity is also sometimes derived by implementing the logic in a 'dynamic' language such as lua. Why the whole program could not be written in such a language, it is never explained!
<hayley> "have u used lua it is too slow, I use C++ and Lua and thus get best of both worlds!1!!one"
<beach> lotuseater: I think that's the real tragedy here. C++ programmers firmly believe that they have chosen a good language for performance, because "everybody knows that the C++ compiler generates fast code", but since they don't compare with different languages, they don't know that their code is slow.
<beach> moon-child: Hmm, yes I see.
<hayley> Hm, last time I had a "discussion" with a C++ programmer, they proceeded to uncritically shove some benchmark list in my face.
<lotuseater> beach: So it's kind of a ont-point statistic. :)
<hayley> I use the adjective "uncritically" because, upon reading the benchmarks, most are a matter of who knows the best SIMD instructions.
<beach> hayley: And all those benchmarks were for real applications like the size of a web browser or a music engraver, I guess, right?
<hayley> beach: Oh, of course not. Stuff like drawing Mandelbrot sets and searching strings.
<beach> Yes, I was being sarcastic.
<hayley> Sure. I wasn't sure whether I should join in too.
<hayley> "Of course, Mandelbrot sets and string searching are the basically the same thing!"
<hayley> s/are the/are/
<lotuseater> It's more about using the right algorithms and data structures for a specific problem.
Bike has quit [Quit: sleep]
jans has quit [Ping timeout: 268 seconds]
pillton has quit [Ping timeout: 256 seconds]
<beach> lotuseater: That is often the case. However, even for relatively simple systems, like say, information systems, that manipulate objects that represent nontrivial real-word concepts, there is this choice of using references or not.
<lotuseater> "Oh, we use the school method for multiplying numbers with over 100 digits."
<beach> lotuseater: And if you are forced to copy objects or use reference counters to avoid pointer problems, then you take this performance penalty that C++ programmers conveniently seem to ignore.
pegaso has joined #commonlisp
ec has joined #commonlisp
<lotuseater> okay
<lotuseater> I'm not so deep into that.
<beach> Word processors, web browsers, music engravers, etc. fall into the same category.
<moon-child> web browsers typically seem to be implemented with about as much javascript as c++
<moon-child> whether this is an improvement, I don't know
<lotuseater> I like this Mandelbrot program by Edi Weitz, runs good in wine.
<lotuseater> s/good/well
<lotuseater> It would be nice to see how he wrote that, or the other programs.
char has quit [Remote host closed the connection]
char has joined #commonlisp
<char> lotuseater: I downloaded the full size buddhabrot and opening it crashed Xorg
char has quit [Remote host closed the connection]
<lotuseater> char: Okay so the warning just states that for browsers. :) So a "Use at your own risk."
ec has quit [Ping timeout: 244 seconds]
hexology has joined #commonlisp
<lotuseater> But you can inspect the source for it.
char has joined #commonlisp
<lotuseater> Once a former friend of mine who I got temporarily into Lisp asked "How do those loosy parentheses terms even can become something executable?"
jans has joined #commonlisp
<beach> Wow.
<beach> With emphasis on "former". :)
<lotuseater> Yes, but that came because of other reasons.
<beach> char: So now do you see the importance of both a sane condition system and goto (especially the "super" non-local) goto?
pillton has joined #commonlisp
<beach> lotuseater: It is very hard to combat ignorance, especially if it is self chosen.
taiju has quit [Ping timeout: 245 seconds]
<hayley> Once I met some people who were still testing a program after some months (apparently). I said I had "whacked out most of it in a weekend", and eventually we exchanged code.
Inline has quit [Quit: Leaving]
<beach> char: Or did you just mention the thing about exceptions to start a debate?
<hayley> "Dude, why did you write it in Lisp? XD" "Well, some of us are still testing their software months later..."
<char> I understood goto already. As for the exceptions, I wrote a little example (gone now due to buddhabrot) one with exceptions and one with multiple return values indicating erros. I found the one with exceptions to be more readable, more flexable, and more concise.
<hayley> (What I had whacked out was a pretty identical program otherwise.)
<beach> hayley: How did the people react?
taiju has joined #commonlisp
<hayley> beach: I don't recall getting a response.
<beach> Sounds typical.
<lotuseater> How do you tell people of friends or family what you're doing?
<char> beach: I think function programming is usually a good thing. I was watching some video that mentioned scala's error handling with the Either monad. I don't think one way or another is more FP, but I just wanted to talk about it with some sane people.
<beach> char: Yes, but if you are going to compare the opinions of others, your personal experience is not enough. That is why I put forward the argument about "intermediate functions".
<hayley> I just say I work on a compiler. "What's a compiler?" "It is a program which translates a program into something a processor can directly execute."
blihp has quit [Read error: Connection reset by peer]
<beach> I was once consulting for a company and I was given a medium-sized C program to evaluate. It was written by someone who didn't know about setjmp/longjmp, so more than half of the code was about managing exceptional situations.
<lotuseater> hayley: sounds good.
blihp has joined #commonlisp
<hayley> I'm not sure what is the question is trying to ask. Do they need to know about Common Lisp? Most of the time the follow up question is about the purpose of what I am programming.
ec has joined #commonlisp
<beach> hayley: That's an easy one. It is to make an attempt to make software production more efficient, and the resulting code more safe.
<hayley> Maybe "purpose" is the wrong word. Rather what I am producing at the moment, such as "a register allocator" or "a fix to some part of HIR-to-MIR".
<hayley> Though I've only been further questioned about three times.
<beach> That's much harder to explain.
<beach> I try to answer the daily question from my (admittedly small) family "what are you working on today", and it is not easy to come up with an answer.
<beach> "Well, you see, when I load Eclector into environment E5, the reader macro for backquote stops working, so I am trying to find out why".
<lotuseater> Could also be a strategy to stop the questioning. :)
<blihp> "the same thing I do every day... try to take over the world!"
<lotuseater> indeed. "Brain, what are we doing tonight?"
<blihp> lol... I figured someone would get the reference
<lotuseater> blihp: Oh nice, then an early little success for me today. :)
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
gaqwas has joined #commonlisp
ec has quit [Ping timeout: 244 seconds]
jans has quit [Quit: jans]
ec has joined #commonlisp
ec has quit [Ping timeout: 244 seconds]
makomo has joined #commonlisp
<pjb> aeth: of course, the first thing you do when you work with a FFI, is to write a wrapper macro to signal conditions when the foreign functions return an error code.
<pjb> hayley: note that in CL we have conditions, not only errors. We can also signal "normal" conditions. Is it an error for a hash-table not to contain an entry? It could be a condition.
cjb has quit [Ping timeout: 256 seconds]
<pjb> beach: note that garbage collection is as much out of the scope of the language definition in C than in CL. The glossary for "G" starts at "general", and for "C" goes directly from "coerce" to "colon".
<pjb> beach: hence C + libgc, etc. C++ too could be used with a GC. But some people are more stubborn than others…
<moon-child> as I recall, a gc interface is specified for c++, but no one implements it
ec has joined #commonlisp
Cymew has joined #commonlisp
<pjb> beach: at least in your case, she'll understand what you're explaining ;-)
shka has joined #commonlisp
lisp123 has joined #commonlisp
<beach> pjb: Good points.
ec has quit [Ping timeout: 244 seconds]
ec has joined #commonlisp
attila_lendvai has joined #commonlisp
Lord_of_Life_ has joined #commonlisp
nij- has quit [Ping timeout: 245 seconds]
gaqwas has quit [Ping timeout: 245 seconds]
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 245 seconds]
Lord_of_Life_ is now known as Lord_of_Life
lad has quit [Ping timeout: 245 seconds]
pve has joined #commonlisp
ec has quit [Ping timeout: 244 seconds]
Th30n has joined #commonlisp
ryanbw has quit [Ping timeout: 258 seconds]
ryanbw has joined #commonlisp
ec has joined #commonlisp
pillton has quit [Quit: ERC (IRC client for Emacs 27.2)]
hendursaga has quit [Quit: hendursaga]
hendursaga has joined #commonlisp
lisp-newbie has joined #commonlisp
hendursa1 has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
hendursaga has quit [Ping timeout: 244 seconds]
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 248 seconds]
amb007 has quit [Ping timeout: 240 seconds]
amb007 has joined #commonlisp
ec has quit [Ping timeout: 244 seconds]
lisp123 has joined #commonlisp
tfeb has joined #commonlisp
attila_lendvai_ has joined #commonlisp
attila_lendvai has quit [Ping timeout: 240 seconds]
ec has joined #commonlisp
attila_lendvai_ has quit [Quit: Leaving]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
NeoCron has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
tfeb has quit [Quit: died]
amb007 has joined #commonlisp
ec has quit [Ping timeout: 244 seconds]
cosimone has joined #commonlisp
ec has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
nij- has joined #commonlisp
amb007 has joined #commonlisp
selwyn has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
hendursa1 has quit [Quit: hendursa1]
hendursaga has joined #commonlisp
nij- has quit [Quit: Using Circe, the loveliest of all IRC clients]
lisp123_ has joined #commonlisp
cosimone has quit [Remote host closed the connection]
lisp123 has quit [Ping timeout: 258 seconds]
amb007 has quit [Read error: Connection reset by peer]
Th30n has quit [Ping timeout: 245 seconds]
amb007 has joined #commonlisp
Th30n has joined #commonlisp
blihp has quit [Ping timeout: 240 seconds]
amb007 has quit [Ping timeout: 240 seconds]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
ec has quit [Ping timeout: 244 seconds]
amb007 has quit [Ping timeout: 245 seconds]
amb007 has joined #commonlisp
lisp123_ has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
lisp123 has quit [Ping timeout: 240 seconds]
Cymew has quit [Ping timeout: 240 seconds]
Fare has quit [Ping timeout: 240 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
lisp-newbie has quit [Quit: This computer has gone to sleep]
lisp-newbie has joined #commonlisp
lisp-newbie has quit [Remote host closed the connection]
lisp-newbie has joined #commonlisp
lisp-newbie has quit [Remote host closed the connection]
ec has joined #commonlisp
rain3 has joined #commonlisp
random-nick has joined #commonlisp
tyson2 has joined #commonlisp
amb007 has quit [Ping timeout: 240 seconds]
amb007 has joined #commonlisp
Lycurgus has joined #commonlisp
ec has quit [Ping timeout: 244 seconds]
amb007 has quit [Ping timeout: 240 seconds]
amb007 has joined #commonlisp
lisp123 has joined #commonlisp
<shka> hi all
<shka> does cl-flatbuffers for exist?
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
ec has joined #commonlisp
kakuhen has quit [Quit: Leaving...]
lisp123 has quit [Ping timeout: 240 seconds]
Posterdati has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
Posterdati has joined #commonlisp
lisp-newbie has joined #commonlisp
Lord_Nightmare has quit [Quit: ZNC - http://znc.in]
amb007 has quit [Read error: Connection reset by peer]
Lord_Nightmare has joined #commonlisp
amb007 has joined #commonlisp
lisp123 has joined #commonlisp
lisp-newbie has quit [Quit: This computer has gone to sleep]
ec has quit [Ping timeout: 244 seconds]
treflip has joined #commonlisp
notzmv has quit [Ping timeout: 240 seconds]
treflip` has joined #commonlisp
abrantesasf has joined #commonlisp
treflip has quit [Ping timeout: 248 seconds]
Cymew has joined #commonlisp
sabra has joined #commonlisp
ec has joined #commonlisp
<pjb> shka: if it doesn't you should create it.
<pjb> After all those circular buffers and other round data structures, something flat will be welcome.
<shka> perhaps i will, but i have a tight schedule right now
<pjb> (we do have "flat lists", but as you know in lisp, lists are just some degenerate tree, so not flat at all).
<shka> but yeah, flatbuffers look like a useful tool
<shka> pjb: flatbuffer is an serialization format btw
<pjb> No, it's just the first step of Flat Earthers conquest of the world! :-)
lisp123_ has joined #commonlisp
Qwnavery has joined #commonlisp
treflip` has quit [Remote host closed the connection]
lisp123 has quit [Ping timeout: 245 seconds]
<gin> is there a search function that can search multiple strings in a string and return the first index of match? example - (multi-search '("foo" "bar" "baz") "hello bar foo world")) => 6
<shka> pjb: you can't conquer the world if you can't read the map :P
<lisp123_> gin: Do you have another example?
<gin> (multi-search '("foo" "bar" "baz") "bar foo baz world")) => 0
<shka> gin: not to my knowledge, but it is easy to implement
<shka> namely
<MichaelRaskin> I would look what string-case package has
<gin> an extra ) in my previous examples. please ignore that.
<gin> thanks shka
<shka> (position-if (rcurry #'member set :test test :key key) input_set)
nij- has joined #commonlisp
<shka> gin: if you would implement this function, you most likely would want to add some feedback on which variant was hit
<nij-> In this Lisp meme (https://www.youtube.com/watch?v=QTiAWZ1YfzI), it talks about how Lisp has resolved some modern issues in the 50s. I wonder if it's just a joke or if it's true.
<shka> anyway, one line
<nij-> (Btw it's a great meme.)
karlosz has joined #commonlisp
<hayley> It is true.
<hayley> See the previous discussion about C and automatic memory management.
<nij-> So rust is also a joke?
<hayley> Taken way too far, yes.
<MichaelRaskin> Rust takes different balance on many things
<nij-> :-O If someone wants to manage memory (as finely as in C) in lisp, is it possible?
<MichaelRaskin> (some of these options do not work without modern computing speeds)
<shka> nij-: yes and no
<hayley> Using CFFI, technically yes. But then you find out what it's like to crash (c.f. <https://www.youtube.com/watch?v=3L0HlL7hwQI>).
<random-nick> memory management in C isn't very fine either (unless you're writing a kernel in C)
<shka> nij-: yes because you can do what hayley said, or use mmaped buffer
<shka> no because it is hardly language supported
<shka> yes because it is lisp, and it supports whatever you can macro
<random-nick> but yeah CFFI even stack allocates on some implementations
<shka> no because it is not completely portable
<shka> so it is complicated
<nij-> lol I have to admit I don't really understand. But coool that it's not just a joke.
Qwnavery has quit [Quit: WeeChat 3.2]
lisp-newbie has joined #commonlisp
ec has quit [Ping timeout: 244 seconds]
pegaso has quit [Quit: Konversation terminated!]
dra has joined #commonlisp
ec has joined #commonlisp
edgar-rft is now known as world
world is now known as edgar-rft
<pjb> gin: (cl-ppcre:scan "foo|bar|baz" "quux bar foo baz world") #| --> 5 ; 8 ; #() ; #() |#
<pjb> gin: you can even know easily which one matched: (cl-ppcre:scan "(foo)|(bar)|(baz)" "quux bar foo baz world") #| --> 5 ; 8 ; #(nil 5 nil) ; #(nil 8 nil) |#
lisp123_ has quit [Quit: Leaving...]
attila_lendvai has joined #commonlisp
vats has joined #commonlisp
lisp-newbie has quit [Quit: This computer has gone to sleep]
cosimone has joined #commonlisp
lisp-newbie has joined #commonlisp
notzmv has joined #commonlisp
* jcowan catches up on the scrool
<jcowan> hayley, beach: both white-box and black-box testing are important: black-box for conformance to the spec, white-box for things like coverage and performance issues.
ec has quit [Ping timeout: 244 seconds]
<jcowan> :: is how you do white-box testing
<Colleen> Unknown command. Possible matches: 8, time, set, say, mop, get, tell, roll, help, deny,
<hayley> I agree, that is what I do.
<jcowan> Because the Lisp I am writing these days is basically sample implementations, I don't focus on performance that much (though I don't totally ignore it either)
Lycurgus has quit [Quit: Exeunt]
<jcowan> I put a continuable exception into my code for the first time yesterday, but I am seriously considering replacing it with a function argument instead. The code is highly recursive, so I need to be able to escape from the context and say "What now, boss?"
<jcowan> and then return to it with the answer. But conditions work best when crossing abstraction boundaries, and there is no boundary between a function and itself.
Th30n has quit [Quit: WeeChat 3.2]
<flip214> If HANDLER-BIND and IGNORE-ERRORS around a form isn't enough to ignore an (ERROR ...) form, what's wrong?
nij- has left #commonlisp [#commonlisp]
<jackdaniel> flip214: could you show the code? (ignore-errors (error "HI")) works here
<beach> jcowan: I didn't know you were using Common Lisp for programming. I thought you were using mainly Scheme. No?
Bike has joined #commonlisp
<jcowan> I'm talking about a scheme program, yes, but the condition system (and therefore the issues) are exactly the same, except that Scheme doesn't (yet) make restartts standard, though there is a library for them.
<beach> I see.
ec has joined #commonlisp
<flip214> jackdaniel: I'm asking SBCL to return the code segments of a function, and sb-disassem:seg-virtual-location errors out #<SIMPLE-ERROR "Source path no longer exists." {101A6FA653}>
lisp-newbie has quit [Quit: This computer has gone to sleep]
rgherdt has joined #commonlisp
lisp123 has joined #commonlisp
cognemo has quit [Quit: ZNC 1.8.2 - https://znc.in]
cognemo has joined #commonlisp
Fare has joined #commonlisp
Bike has quit [Ping timeout: 268 seconds]
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 268 seconds]
lisp123 has joined #commonlisp
ec has quit [Ping timeout: 244 seconds]
notzmv has quit [Read error: Connection reset by peer]
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
Bike has joined #commonlisp
ec has joined #commonlisp
Inline has joined #commonlisp
MichaelRaskin has quit [Quit: MichaelRaskin]
nij- has joined #commonlisp
ec has quit [Ping timeout: 244 seconds]
ec has joined #commonlisp
nij- has quit [Ping timeout: 258 seconds]
nij- has joined #commonlisp
nij- has quit [Client Quit]
nij- has joined #commonlisp
lisp-newbie has joined #commonlisp
cage has joined #commonlisp
silasfox has joined #commonlisp
abrantesasf has quit [Quit: Leaving]
lad has joined #commonlisp
<rain3> https://termbin.com/6ztl how to send a string to an xclip subprocess to get it into the clipboard?
Fare has quit [Ping timeout: 240 seconds]
ec has quit [Ping timeout: 244 seconds]
Cymew has quit [Ping timeout: 268 seconds]
<flip214> rain3: I guess that the thread waits on the child process and so won't send any data to its stdin.
<flip214> try cmd&
<lisp123> Does anybody know if there was a particular reason for CLOS slots to be unbound unless there is an :initform, instead of being bound to nil to begin with (which can be overridden with an :initform value)
<rain3> flip214: that worked. thanks ! cmd would also send data to the stdin and the clipboard would get affected but the thread would keep waiting on the child process forever
<flip214> so that "unknown" can be different from "no"?
<flip214> rain3: you'll need to check whether it works for input > 4KB, ie. multiple stream buffers
<lisp123> flip214: Perhaps (that is the most likely conclusion)
ec has joined #commonlisp
Cymew has joined #commonlisp
<rain3> flip214: like this? https://termbin.com/esb5 it seems to work
attila_lendvai has quit [Quit: Leaving]
Jach has joined #commonlisp
nij- has left #commonlisp [#commonlisp]
silasfox has quit [Quit: Connection closed]
ec has quit [Remote host closed the connection]
ec has joined #commonlisp
lisp-newbie has quit [Quit: This computer has gone to sleep]
lisp-newbie has joined #commonlisp
lisp-newbie has quit [Remote host closed the connection]
lisp-newbie has joined #commonlisp
lisp-newbie has quit [Remote host closed the connection]
lisp-newbie has joined #commonlisp
lisp-newbie has quit [Remote host closed the connection]
lisp-newbie has joined #commonlisp
lisp-newbie has quit [Client Quit]
lisp-newbie has joined #commonlisp
lisp-newbie has quit [Client Quit]
dra has quit [Ping timeout: 245 seconds]
lisp-newbie has joined #commonlisp
lisp-newbie has quit [Remote host closed the connection]
Cymew has quit [Ping timeout: 240 seconds]
taiju has quit [Ping timeout: 240 seconds]
attila_lendvai has joined #commonlisp
taiju has joined #commonlisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #commonlisp
ec has quit [Ping timeout: 244 seconds]
cosimone has quit [Remote host closed the connection]
cosimone has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
ec has joined #commonlisp
MichaelRaskin has joined #commonlisp
cosimone has quit [Remote host closed the connection]
Posterdati has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/]
cosimone has joined #commonlisp
amb007 has quit [Ping timeout: 248 seconds]
amb007 has joined #commonlisp
Posterdati has joined #commonlisp
cosimone has quit [Remote host closed the connection]
blihp has joined #commonlisp
lisp-newbie has joined #commonlisp
ahlk has joined #commonlisp
ec has quit [Ping timeout: 244 seconds]
kulernil has quit [Ping timeout: 244 seconds]
selwyn has quit [Read error: Connection reset by peer]
pve_ has joined #commonlisp
gxt has joined #commonlisp
jans has joined #commonlisp
pve has quit [Ping timeout: 245 seconds]
ec has joined #commonlisp
lisp-newbie has quit [Quit: This computer has gone to sleep]
lisp-newbie has joined #commonlisp
lisp-newbie has quit [Remote host closed the connection]
lisp-newbie has joined #commonlisp
lisp-newbie has quit [Remote host closed the connection]
yitzi has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
pranavats has joined #commonlisp
Fare has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 240 seconds]
ec has quit [Ping timeout: 244 seconds]
lisp123 has joined #commonlisp
ec has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
Fare has quit [Ping timeout: 240 seconds]
lisp123 has quit [Quit: Leaving...]
tfeb has joined #commonlisp
ec has quit [Ping timeout: 244 seconds]
silasfox has joined #commonlisp
Fare has joined #commonlisp
tfeb has quit [Quit: died]
PinealGlandOptic has quit [Quit: leaving]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
gaqwas has joined #commonlisp
<jeosol> Good morning all
<jeosol> Is anyone aware of a CL library with tree-based algorithms, e.g., 2-d tree/quadtree for doing things like range searching, nearest neighbor search, etc
<lotuseater> hi jeosol :)
<jeosol> hi lotuseater, how are you
<jeosol> I am doing okay. Still exploring algorithms (Sedgewick's) course
<lotuseater> Ah I'm fine atm I think, we could query some time again.
<jeosol> yeah, definitely, good conversation last time
lisp-newbie has joined #commonlisp
<mfiano> jeosol: I have a quadtree library, but it hasnt been tested
<jeosol> mfiano: interesting
<jeosol> is the library decomposable, or generic, e.g., 2d, 3d, or 4d trees
<jeosol> ok, i will check the link
<mfiano> a 3d quadtree is an octree, and it is much more complex to implement, with a lot of tradeoffs to make. I ported some Rust code that I am not happy with but it is not public.
<jeosol> mfiano: very nice, I see you also have other related code in the binary-search-trees
<jeosol> mfiano: no, above, I didn't mean octree just 3d-tree
<mfiano> Yeah that's my "pile of junk" repo that I found useful once or twice but hasn't been extracted/polished into a separate library
<jeosol> I think there could be some utility to optimize and improve this
<jeosol> mfiano: good work btw
<mfiano> I'm not sure what you mean by 3d tree. That is exactly what an octree is
<White_Flame> a cube splits down into 8 subcubes
yitzi_ has joined #commonlisp
<White_Flame> given a 1/2 split on each dimension
yitzi has quit [Ping timeout: 240 seconds]
<jeosol> mfiano: never mind
<jeosol> are you still working on the project or left it for now
<mfiano> I work on all my projects when I need to :)
<jeosol> I am not sure if there exists, a tree-focused algorithms library somewhere but it could be worthwhile to have - assuming there are people doing search that needs to be to efficient (in games dev, etc)
<jeosol> mfiano: that's coold :-)
<jeosol> *cool
amb007 has quit [Ping timeout: 268 seconds]
<mfiano> For gamedev I only really use spatial hashing for collision detection, rather than spatial trees.
yitzi_ has quit [Quit: Leaving]
<mfiano> I use avl trees much more in gamedev, but for other purposes.
<mfiano> which should be in that repo, as well as maybe a RB tree, i forget
<jeosol> Yeah I did see the avl-trees file
<jeosol> rb-trees, not sure, but will check
<jeosol> rb-trees with the rotation (right or left) is tricky. But the tree-based techniques are efficient
<lotuseater> jeosol: do you also know this book on purely functional data structures by okasaki?
<mfiano> ah no, the rb tree is not.
<mfiano> it is in one of my game engines
<mfiano> should be standalone if you need it
<jeosol> lotuseater: no I am not, but I will search for it
<jeosol> mfiano: very nice on the rb-tree
<mfiano> it's literally just translated pseudo-code from CLRS, nothing special
<jeosol> Oh i see,
<jeosol> do I have a copy of CLRS here, good book
<mfiano> CLRS is "Introduction to Algorithms", aka the the big freakin book of algorithms used in a lot of universities.
<jeosol> I mean I have a copy of CLRS here, I am aware of the book
<mfiano> ok
amb007 has joined #commonlisp
lisp-newbie has quit [Quit: This computer has gone to sleep]
lisp-newbie has joined #commonlisp
lisp-newbie has quit [Remote host closed the connection]
<mfiano> speaking of functional data structures and trees, i recall seeing a library, i think called functional-trees, that integrates with FSet.
<mfiano> I haven't evaluated it in any way though
<mfiano> I would probably write something using split/join generalization to support any type of balanced tree, with HAMT's for persistence
<mfiano> But...time
<phantomics> Hey, quick question. Does anyone know how to wipe out any cached compiled code for a given system? I've erased all .fasl files for something but it's not working. I've made significant changes to a system and now things that depend on it are broken because they seem to be invoking the new functions on old compiled code.
<White_Flame> if you have function objects that are stored somewhere on the heap, they won't be recompiled by a reload.
<White_Flame> have you restarted your image to flush everything out?
<phantomics> Yes, that doesn't help
<White_Flame> asdf stores its fasls in ~/.cache/common-lisp/
<phantomics> I've manually recompiled some components which helped
<White_Flame> and there's a :force t option in some of the asdf/ql stuff that forces recompilation
<phantomics> I'll try erasing those
<White_Flame> rm -rf ~/.cache/common-lisp/ is the easy nuclear solution to fasl issues
<dieggsy> Is there an easy way to list files by modification time ?
<dieggsy> uiop:directory-files has no such options
<phantomics> dieggsy: probably best to use (uiop:run-program "ls ...
<dieggsy> fair
<dieggsy> thanks
<phantomics> White_Flame: tried it, didn't work, and I lost the progress I made with manually recompiling stuff to work
<White_Flame> I think I'd need more details about what specifically is going wrong
mr_rob0t has joined #commonlisp
<mr_rob0t> hey
<jeosol> mfiano: ok, I will do a search for the functional-trees lib
<mr_rob0t> anyone read the book Land of Lisp?
<phantomics> White_Flame: it's complicated, I have a bunch of systems that contain demos for the April compiler. I've made changes to April and now many of the demos are broken because they were compiled when the implementation was different. When I manually recompile functions they work. But the files containg the demo code are still compiling wrong, even when I delete the .fasls in their directories and the .cache .fasls
<White_Flame> does your code write any of its own files?
<phantomics> No
blihp has quit [Quit: Leaving]
<phantomics> I do automatically create software packages that aren't dependencies of the package definitions or the ASDF systems
<White_Flame> I wonder if you have duplicate definitions of some things. So in file A, it creates the working thing, file B creates the broken thing, and your state is left there after compilation. Recompiling file A would fix it
<phantomics> Is it possible those packages could have their .fasls stored in some other place?
<White_Flame> C-c C-k by default creates the .fasl next to your .lisp iirc, but that shouldn't be relevant for asdf loads
<White_Flame> and since you blew away cache/common-lisp, I don't think it's a .fasl issue
<phantomics> Well I'll try deleting that whole folder
amb007 has quit [Read error: Connection reset by peer]
<White_Flame> I had some serious load ordering issues in the past, with compile-time effects happening in macro expansions. Loading from source would not yield the same system as loading from fasl, as the latter doesn't retain the compile-time dynamic state of the system
amb007 has joined #commonlisp
<White_Flame> since you're doing a sublanguage, that class of error could very well be likely
<phantomics> Erased the whole folder and the problem persists
<White_Flame> right
seraphim_ has joined #commonlisp
<phantomics> It shouldn't be anything that complicated, like in one of the demo files I have a little string being compiled that has a bug due to some of the changes
<White_Flame> redefinition/reinitialization & compile-time side effects would be culprits to look for
<White_Flame> can you be more specific about that?
<phantomics> That string should have been recompiled, I've recompiled the file with it many times
<White_Flame> so you're saying the older compiled version exists when you load your system, and manually recompiling the file brings in the new compiled version?
<phantomics> To be specific, this string: (is "⌊10000×polar⍉↑ ¯1 0 1∘.,1 0 ¯1" -its output-) causes a bug, the ∘. part is exactly where it's going wrong, that's one example
<phantomics> Yes, when I manually recompile one of the APL functions, it then works in the test system
<White_Flame> it really smells like a duplicate definition problem dependent on load order tome
<White_Flame> *to me
<phantomics> Yeah just wondering how to purge that other definition
amb007 has quit [Ping timeout: 248 seconds]
<phantomics> I don't know if there's another version of April cached that compiles it in the old way
<White_Flame> it would be elsewhere in your source code, loaded after your correct function
yitzi has joined #commonlisp
<dieggsy> Are relative logical pathnames a thing? e.g. something like "./my/path" would be ";my;path" ? ..this doesn't seem to work for me
<phantomics> It would make sense if the files were somehow calling the old version of April
<White_Flame> dieggsy: "my/path" is relative
<White_Flame> whereas "/my/path" is absolute
amb007 has joined #commonlisp
<dieggsy> White_Flame: ah, sure, but i mean the semicolon version
<phantomics> The macroexpansions shouldn't be causing any side effects that cause other versions of code to be saved somewhere
<White_Flame> phantomics: on your clean load, test that suspect function directly
<dieggsy> White_Flame: ./my/path and my/path are the same though. but i mean this format: https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node209.html#SECTION002715100000000000000
<White_Flame> see if its behavior matches the source code that works when you reload
<phantomics> I can look at what it outputs
<phantomics> I'll also try cloning the repo on another system
<phantomics> I've done my latest work in another branch, not sure if that could be related to the problem
<White_Flame> oh, also do M-. on the function name to bring up its definition. If it's being redefined somewhere, that would point to the current/other/broken copy of it
<White_Flame> if you wiped the fasl cache, that shouldn't be an issue
<White_Flame> but obviously any repo weirdness is outside the scope of lisp :L-P
<White_Flame> :-P
<Alfr> phantomics, does (asdf:system-source-file (asdf:find-system "YOUR-SYSTEM")) give you the expected path?
<White_Flame> ah yeah that could be another issue. ensure quicklisp/local-projects/ is up to date
<phantomics> Alfr: yes, gives correct path
<Alfr> Ah ... worth a shot, phantomics.
rain3 has quit [Ping timeout: 240 seconds]
<phantomics> Just tried erasing and restoring the local-projects symlink
clos-encounters has joined #commonlisp
<phantomics> That didn't work
cage has quit [Quit: rcirc on GNU Emacs 27.1]
<White_Flame> I still do suspect that the dynamic state of your code is being affected during load, and recompiling that particular file/function re-tramples the state back to where you expect it to be
<pjb> dieggsy: (first (pathname-directory "my/path")) #| --> :relative |# (first (pathname-directory "/my/path")) #| --> :absolute |#
<pjb> dieggsy: but for logical pathnames, it's surprising: (first (pathname-directory ";my;path")) #| --> :relative |# (first (pathname-directory "my;path")) #| --> :absolute |#
<pjb> it's because the syntax is host:my;path for absolute with host, and host:;my;path for relative with host.
<dieggsy> pjb: this is interesting, but just ";my;path" doesn't actually translate to anything with translate-logical-pathname for me
<pjb> dieggsy: ./my/path and my/path may resolve to the same inode, but as pathnames, they're different: (length (pathname-directory "./my/path")) #| --> 3 |# (length (pathname-directory "my/path")) #| --> 2 |# (mind the :absolute or :relative keyword in pathname-directory).
<pjb> dieggsy: of course, there may be no translation, notably if no logical host is specified.
<pjb> (pathname-host ";my;path") #| --> nil |#
<dieggsy> and host:;my;path returns an error. maybe this is a confiuration error on our end.
<pjb> (translate-logical-pathname "home;my;path") #| --> #P"/home/my/path" |#
mr_rob0t has quit [Ping timeout: 240 seconds]
<pjb> mmm, not what I expected.
<dieggsy> pjb: that gives me #P"home;my;path" on allegro
<pjb> dieggsy: you need to set the logical pathname translations of the logical host first.
<pjb> also, be careful that normally logical pathnames should use uppercase, notably the logical host.
<pjb> (if you use lowercase, you have more implementation dependent behavior).
<pjb> (setf (logical-pathname-translations "DIEGGSY") '(("**;*.*" "/Volumes/Deiggsy/**/*.*"))) (translate-logical-pathname "DIEGGSY:MY;PATH") #| --> #P"/Volumes/Deiggsy/MY/PATH" |# the case of the result depends on the customary case of the file system: implementation and platform dependent.
<pjb> If you want a specific case, in a conforming manner, you need to put it in the translations: (setf (logical-pathname-translations "DIEGGSY") '(("MY;PATH" "/Volumes/Deiggsy/My/Path") ("**;*.*" "/Volumes/Deiggsy/**/*.*"))) (translate-logical-pathname "DIEGGSY:MY;PATH") #| --> #P"/Volumes/Deiggsy/My/Path" |#
<dieggsy> interesting
<pjb> Using logical pathnames in a conforming way is very possibly, but a tad inconvenient if you expect specific translations to physical pathnames, since in that case you need to list each translation in the logical host translations…
<dieggsy> thanks
<dieggsy> only just found out about logical pathnames this months and my team uses them fairly extensively
<pjb> They're quite useful to avoid platform specific path syntaxes and quirks.
yitzi has quit [Remote host closed the connection]
amb007 has quit [Ping timeout: 268 seconds]
amb007 has joined #commonlisp
mr_rob0t has joined #commonlisp
<mr_rob0t> sup
amb007 has quit [Read error: Connection reset by peer]
<Josh_2> Hello
<mr_rob0t> how are you man
CrashTestDummy2 has joined #commonlisp
amb007 has joined #commonlisp
silasfox has quit [Ping timeout: 240 seconds]
CrashTestDummy has quit [Ping timeout: 258 seconds]
<Josh_2> Writing lisp
<mr_rob0t> same
<phantomics> Josh_2 what are you writing?
<mr_rob0t> im new, going through land of lisp book
<mr_rob0t> built a basic chat bot though
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<phantomics> Land of Lisp is fun, some of the programming practices it teaches are not the best though
<mr_rob0t> oh yeah?
<mr_rob0t> do you have any favorite sources for a newb?
<Josh_2> Depends how n00b
<Josh_2> If you are not new to programming then Practical Common Lisp, but ofc the best is to just write some programs and ask for reviews
<Josh_2> phantomics: I am constructing some basic blogging software
<phantomics> Cool, I've also done some web dev stuff
<phantomics> Seconding Practical Common Lisp for mr_rob0t, it does the best job of introducing the language
<seraphim_> i'm currently reading Practical Common Lisp. great book. fantastic writing. 10/10 would recommend to anybody new to Common Lisp.
<seraphim_> i don't mean to incite passions but when i tried to do some programming in Clojure it felt like a lisp bolted onto the JVM in a way which did not suit the debugging and REPL environment a lisp is supposed to provide. professional common lispers, is there any factual truth in my argument?
<White_Flame> I've only fiddled a little with clojure, but I would say that's similar to my assessment as well
<_death> may want to move this question to another channel..
<seraphim_> excuse me if this was off-topic. i will stop it now.
<mfiano> seraphim_: absolute truth
seraphim_ has quit [Quit: leaving]
<mfiano> Heh, I didn't think it was off topic. He was asking about how interactive and natural CL was compared to alternatives. We talked about C++ compared to CL for a while just yesterday after all...
dra has joined #commonlisp
doyougnu has quit [Remote host closed the connection]
clos-encounters has quit [Ping timeout: 245 seconds]
<mason> There's #lisp for that too now.
<mason> I like the new world order.
<jcowan> However, there is a CL that runs on the JVM (and Schemes that run on the JVM and the CLR). But yes, this discussion should go to #lisp.
mr_rob0t has quit [Ping timeout: 245 seconds]
<random-nick> abcl can theoretically run on the CLR
<mfiano> So it's okay to discuss CL compared to C++ here, but not CL compared to Clojure. Noted.
nij- has joined #commonlisp
<edgar-rft> many people here don't know C++ so they won't notice, but many people here dislike Clojure so much that they will instantly go nuts :-)
attila_lendvai has quit [Quit: Leaving]
attila_lendvai has joined #commonlisp
pve_ has quit [Quit: leaving]
gaqwas has quit [Ping timeout: 240 seconds]
attila_lendvai has quit [Ping timeout: 268 seconds]
mr_rob0t has joined #commonlisp
selwyn has joined #commonlisp
selwyn has quit [Remote host closed the connection]
akoana has joined #commonlisp
selwyn has joined #commonlisp
sabra has quit [Quit: Konversation terminated!]
nij- has quit [Quit: Using Circe, the loveliest of all IRC clients]
mr_rob0t has quit [Ping timeout: 240 seconds]
shka has quit [Ping timeout: 245 seconds]
selwyn has quit [Read error: Connection reset by peer]
<jcowan> There is no channel (that I know of) that covers both CL and C++. There is a channel that covers both CL and Clojure.
CrashTestDummy3 has joined #commonlisp
mr_rob0t has joined #commonlisp
CrashTestDummy2 has quit [Ping timeout: 248 seconds]
<White_Flame> what about #clasp? :-P
mr_rob0t has quit [Ping timeout: 245 seconds]
notzmv has joined #commonlisp
gaqwas has joined #commonlisp
<Bike> most of my talking about c++ in clasp in contemptuous
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
elderK has joined #commonlisp
kakuhen has joined #commonlisp
lottaquestions has joined #commonlisp
gaqwas has quit [Ping timeout: 240 seconds]
notzmv has quit [Ping timeout: 245 seconds]
Oddity has joined #commonlisp
rgherdt has quit [Ping timeout: 240 seconds]
notzmv has joined #commonlisp
<mariari> wouldn't #lisp cover CL and Clojure?
<mariari> since it's all lisps
<hayley> Yes, then some more.
dra has quit [Remote host closed the connection]
random-nick has quit [Ping timeout: 268 seconds]
makomo has quit [Ping timeout: 240 seconds]
Krystof has quit [Ping timeout: 248 seconds]
blihp has joined #commonlisp