jackdaniel 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/>
akoana has joined #commonlisp
waleee has joined #commonlisp
JuanDaugherty has quit [Quit: JuanDaugherty]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
yitzi has quit [Remote host closed the connection]
thuna` has joined #commonlisp
eddof13 has joined #commonlisp
eddof13 has quit [Client Quit]
random-nick has quit [Ping timeout: 258 seconds]
xlymian`` has quit [Ping timeout: 276 seconds]
istewart has joined #commonlisp
jonatack has joined #commonlisp
jon_atack has quit [Ping timeout: 258 seconds]
troojg has joined #commonlisp
NotThatRPG has joined #commonlisp
char has quit [Ping timeout: 272 seconds]
waleee has quit [Ping timeout: 252 seconds]
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
istewart_ has joined #commonlisp
istewart has quit [Ping timeout: 252 seconds]
lucasta has joined #commonlisp
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 264 seconds]
thuna` has quit [Read error: Connection reset by peer]
troojg has quit [Ping timeout: 260 seconds]
wobbol has quit [Ping timeout: 258 seconds]
Guest68 has joined #commonlisp
edgar-rft has quit [Quit: don't waste your life by reading this]
NotThatRPG has joined #commonlisp
lucasta has quit [Quit: Leaving]
Lord_of_Life has quit [Ping timeout: 252 seconds]
Lord_of_Life has joined #commonlisp
Guest68 has quit [Quit: Client closed]
<beach> I don't think it makes sense to have duplicate variables in LET or in the required part of a lambda list. But in LET* it makes sense, just as in the &OPTIONAL and &KEY part of the lambda list. As I recall, the scope of declarations is clearly stated in the standard.
mathrick has quit [Ping timeout: 252 seconds]
xlymian`` has joined #commonlisp
xlymian`` has quit [Client Quit]
xlymian has joined #commonlisp
mathrick has joined #commonlisp
kiwiirc has joined #commonlisp
mathrick has quit [Remote host closed the connection]
mathrick has joined #commonlisp
kiwiirc has quit [Ping timeout: 256 seconds]
Pixel_Outlaw has quit [Quit: Leaving]
akoana has quit [Ping timeout: 244 seconds]
<aeth> in LET*, duplicate variables makes a ton of sense to me because sometimes there just isn't a good name for the same thing processed multiple times other than foo... though I guess I could do foo then foo* then foo** then foo*** then foo****
<Noisytoot> Why does nth take its arguments in the opposite order from elt/char/aref?
<aeth> probably because it was older
<beach> aeth: Absolutely.
<aeth> ELT's order makes more sense because AREF can take any amount of arguments from 0 to a very high integer so the indices in AREF have to come at the end and ELT matches AREF.
<aeth> So my guess is that NTH came before ELT and AREF and so the order couldn't change without breaking pre-existing pre-CL code
<beach> Noisytoot: Probably for hysterical raisins, as usual. It doesn't make much sense to ask "why" in situations like this, because Common Lisp was created to be backward compatible with existing dialects at the time.
<aeth> as for GETHASH also being different that's apparently because it matches the order from GET assuming you use a symbol-plist like a hash table
<aeth> beach: well, it makes sense to ask in one sense: the newer style should be the preferred and AREF/ELT/CHAR appear to be the newer style, or at least they would make sense as newer than NTH
<aeth> because if NTH came second it'd seem purposefully incompatible for no reason
<beach> Fair enough.
<beach> But in this case, NTH is more specific than ELT because it works only on lists.
<aeth> fortunately, NTH isn't that important for lists because of the way linked lists work (unfortunately NTH-VALUE inherits the order from NTH, although I guess it's not that bad because multiple values are their own thing)
istewart_ has quit [Quit: Konversation terminated!]
<beach> What makes you say NTH is not important?
<aeth> because usually when an index is used, it's a vector or array, e.g. sequence functions often have two implementations, one using ELT (though this assumes that extensible-sequences, where available and used, are vector-like and not list-like) and one without
<aeth> The use of NTH is usually a code smell for using lists where they shouldn't be used (such as the list-based matrix in §2.2.4 in the Worse is Better "Lisp: Good News, Bad News, How to Win Big" essay)... not always, of course
decweb has quit [Ping timeout: 260 seconds]
ello has quit [Ping timeout: 258 seconds]
ello has joined #commonlisp
awlygj has joined #commonlisp
varjag has joined #commonlisp
varjag has quit [Ping timeout: 260 seconds]
<nil> Already by CL someone understood that sequence last in sequence functions could enable things like parenless eval, arrow macros, pipelines, visual programs, etc.
<aeth> well, LAST or NTH in macros is sort of a special case because, yes, it's still O(n), but not really, because n is small (and it's not like it's n! so you won't really notice)... and it's all at compilation time
<aeth> though I'd prefer destructuring-bind over NTH in most cases in macros
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
pve has joined #commonlisp
<beach> Noisytoot: Did you get a satisfactory answer to your question?
Guest71 has joined #commonlisp
shka has joined #commonlisp
edgar-rft has joined #commonlisp
jonatack has quit [Ping timeout: 252 seconds]
jonatack has joined #commonlisp
wacki has joined #commonlisp
rtypo has quit [Ping timeout: 260 seconds]
<younder> I don't know how satisfying 'because it was designed be a committee' answers are ;)
<beach> I don't think anyone gave that answer.
<aeth> younder: it's "because breaking compatibility is worse than a flawed design" and arguably, yes, given what happened to Perl 6 and Python 3
<aeth> although I think the vast majority of Lisp was still in the future in 1984 so they probably could've gotten away with breaking a bit of compatibility if people still adopted Common Lisp
<beach> For what it's worth, I think design by a committee is a good thing, because it has a greater chance of avoiding bad design by an individual who might miss something or just have insufficient experience and knowledge.
<wacki> The success depends on the motivations of the members of a committee.
<wacki> And who judges about the success.
<younder> beach. I an reacquainting myself with Cleavir in particularly BIR the internal AST for the compiler.
<beach> wacki: I was going to say "define success".
<beach> younder: Excellent.
<beach> younder: However, Cleavir v2 (which is what uses BIR) does not have the backend part that I want a library for, because Clasp uses LLVM as a backend.
<aeth> beach: I think an individual usually does a better job than a committee on something new, but Common Lisp wasn't really a new design because if you read documentation for its direct ancestors, it's all very similar. The committee was mostly just getting people to agree on a common language.
<aeth> at least 1984 Common Lisp
ChanServ has quit [shutting down]
<aeth> CLOS seems to be the main thing that was genuinely new
ChanServ has joined #commonlisp
<younder> In 1984 macsyma was a big deal. It had to run that. That meant compatibility with maclisp. Also For there were OO implementations like Common Loops and Flavors and the design of CLOS and MOP reflect that.
cercopith has quit [Remote host closed the connection]
<beach> aeth: An individual does better only if that individual has the proper training, knowledge and experience. We have several examples of the contrary. Python is a good example I think, because its creator has demonstrated that lack of knowledge in public statements.
cercopith_ has joined #commonlisp
<beach> younder: I started the backend library: https://github.com/robert-strandh/Posterior
<ixelp> GitHub - robert-strandh/Posterior: Library for back-end compilation of Common Lisp and similar languages.
<beach> younder: It needs register allocators, code generators, and MIR-level optimizations.
<aeth> Python's well-designed if you ignore small details such as scope.
<beach> If you say so.
<younder> beach: I cloned a copy of it.
<beach> OK.
<younder> It does seem to promise more than it delivers at this moment. More of a scetch.
<beach> Absolutely. It doesn't deliver anything at the moment.
* beach is off to go buy food.
danse-nr3 has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
alcor has joined #commonlisp
danse-nr3 has quit [Ping timeout: 276 seconds]
danse-nr3 has joined #commonlisp
Cymew has joined #commonlisp
danse-nr3 has quit [Ping timeout: 255 seconds]
wacki has quit [Ping timeout: 260 seconds]
wacki has joined #commonlisp
Cymew has quit [Quit: Konversation terminated!]
Cymew has joined #commonlisp
wacki has quit [Ping timeout: 248 seconds]
wacki has joined #commonlisp
donleo has joined #commonlisp
JuanDaugherty has joined #commonlisp
danse-nr3 has joined #commonlisp
JuanDaugherty has quit [Quit: JuanDaugherty]
wacki has quit [Ping timeout: 258 seconds]
wacki has joined #commonlisp
ym has joined #commonlisp
cage has joined #commonlisp
cage has quit [Excess Flood]
cage has joined #commonlisp
<beach> Are you saying I should change the README?
danse-nr3 has quit [Read error: Connection reset by peer]
danse-nr3 has joined #commonlisp
wacki_ has joined #commonlisp
wacki has quit [Read error: Connection reset by peer]
random-nick has joined #commonlisp
<Shinmera> Minor improvement to cl-all: it parses flags better and supports a -x flag to run the implementations in parallel. Makes it quite a bit faster to get the output.
King_julian has joined #commonlisp
danse-nr3 has quit []
danse-nr3 has joined #commonlisp
wacki_ has quit [Ping timeout: 260 seconds]
wacki has joined #commonlisp
varjag has joined #commonlisp
Guest71 has quit [Quit: Client closed]
ym has quit [Quit: Leaving]
danse-nr3 has quit [Ping timeout: 248 seconds]
danse-nr3 has joined #commonlisp
King_julian has quit [Ping timeout: 244 seconds]
danse-nr3 has quit []
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
attila_lendvai has joined #commonlisp
prokhor has quit [Remote host closed the connection]
prokhor has joined #commonlisp
decweb has joined #commonlisp
<varjag> there is no reason COUNT should cons, amirite
<bike> generally no, but you could pass it a predicate or test that conses, or if you have extended sequences one of the methods could cons
<bike> (as in "generally no, it shouldn't cons")
<varjag> right
<varjag> getting me some strange profiling stats
<Shinmera> it can cons if it gets into bignum range
<Shinmera> but good luck with that I suppose
<varjag> yeah don't think am there
bobcave has joined #commonlisp
wacki has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
varjag has quit [Quit: ERC (IRC client for Emacs 27.1)]
waleee has joined #commonlisp
random-nick has quit [Ping timeout: 260 seconds]
random-nick has joined #commonlisp
wacki has joined #commonlisp
attila_lendvai has quit [Ping timeout: 264 seconds]
viaken has quit [Quit: rejigger]
viaken has joined #commonlisp
danse-nr3 has joined #commonlisp
JuanDaugherty has joined #commonlisp
amb007 has quit [Ping timeout: 248 seconds]
waleee has quit [Ping timeout: 248 seconds]
amb007 has joined #commonlisp
rtypo has joined #commonlisp
shawnw has quit [Ping timeout: 264 seconds]
amb007 has quit [Ping timeout: 272 seconds]
mgl has joined #commonlisp
varjagg has joined #commonlisp
varjagg has quit [Remote host closed the connection]
<Shinmera> added a thing to Deploy that computes a checksum of the sources pre-dump to show on startup
amb007 has joined #commonlisp
<Shinmera> mostly because charles and I are going insane trying to figure out the behaviour we're seeing and because our build setup is so messed up it's hard to know when things are stale
bobcave has quit [Quit: Leaving]
<Shinmera> anyway, maybe it'll also help someone else in the future
lucasta has joined #commonlisp
mgl has quit [Ping timeout: 244 seconds]
wacki has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
eddof13 has joined #commonlisp
Cymew has quit [Quit: Konversation terminated!]
icebarf_ has quit [Remote host closed the connection]
icebarf has joined #commonlisp
eddof13 has quit [Quit: eddof13]
eddof13 has joined #commonlisp
akoana has joined #commonlisp
JuanDaugherty has quit [Quit: JuanDaugherty]
bjorkintosh has quit [Quit: "Every day, computers are making people easier to use." David Temkin]
eddof13 has quit [Quit: eddof13]
mgl has joined #commonlisp
mgl has quit [Ping timeout: 244 seconds]
eddof13 has joined #commonlisp
hay has joined #commonlisp
thuna` has joined #commonlisp
cmack` is now known as cmack
danse-nr3 has quit [Quit: on the move]
younder has quit [Ping timeout: 252 seconds]
molson_ has joined #commonlisp
molson has quit [Ping timeout: 252 seconds]
<mwnaylor> Is there a packages that implements the `partial' function? I found a working implementation on the net and added to my .sblrc file; works, but does not seem to be an optimal solution. FWIW, I was able to get the `compose' function (and a lot more) with (ql:quickload 'cl-utilities).
<mwnaylor> s/packages/package/
hay has quit [Quit: Konversation terminated!]
<beach> s/packages/system/ rather.
<beach> mwnaylor: What does the PARTIAL function do?
<beach> mwnaylor: Alexandria has some stuff like that.
<mwnaylor> beach: Creates a new function with some of the actual parameters filled out.
<bike> alexandria hasa curry and rcurry, indeed.
<bike> compose too, for that matter
<mwnaylor> (paritial #'+ 3) creates a new function, similar to #'+, but adds 3 to the arguments, even if there are none.
<mwnaylor> I'll have to look into alexandria.
<bike> curry will do the same
<beach> I wonder who decided to rename it PARTIAL? Currying is an established concept.
ojo_ has joined #commonlisp
<bike> partial evaluation is as well
<mwnaylor> I think it is short for "partial function".
<bike> (though this isn't much of a partial evaluator)
alcor has quit [Remote host closed the connection]
ojo_ has quit [Client Quit]
rozenglass has quit [Ping timeout: 252 seconds]
<mwnaylor> My understanding of curry is that (f 1 2 3) -> (f1 1 (f2 2) (f3 3)). (more or less)
bjorkintosh has joined #commonlisp
bjorkintosh has joined #commonlisp
<mwnaylor> Or curry takes a function of n formal parameters and creates n functions of 1 formal parameter each.
rozenglass has joined #commonlisp
<mwnaylor> My limited understanding of curry comes from some exposure to Haskell.
wacki has joined #commonlisp
<Noisytoot> beach: yes
<beach> Noisytoot: Great!
<mwnaylor> alexandria is a great tip. https://alexandria.common-lisp.dev/draft/alexandria.html
<ixelp> alexandria Manual
<beach> mwnaylor: Are you using Common Lisp mainly as a functional programming language?
<bike> mwnaylor: that is not what curry does, no
<bike> i don't think that's how it works in haskell either
<mwnaylor> beach: Not entirely. But, from working with Clojure, I found some of the concepts usefull in other lisp
<mwnaylor> -like languages.
<beach> I see.
Perflosopher has quit [Read error: Connection reset by peer]
Perflosopher0 has joined #commonlisp
cercopith_ has quit [Quit: Leaving]
<mwnaylor> I'm playing with my own extensions to Stump WM, written in Common Lisp w/ heavy reliance on CLOS. A lot of setf going on there, which is not functional. I choose to write in a functional manner where feasible.
<bjorkintosh> functional is the new OO isn't it?
<mwnaylor> If you mean the latest trend, perhaps.
<dlowe> No, currying would be (f 1 2 3) -> ((((lambda (z) (lambda (y) (lambda (x) (+ x y z))) 1) 2) 3)
<beach> bjorkintosh: Only by people who think object-oriented programming is what Java, C# and the like can give.
<beach> bjorkintosh: But as I often point out, people go to a lot of trouble to avoid learning Common Lisp, or CLOS in this case.
<bjorkintosh> beach: as I understand it, it's more like what Erlang has to offer and what Smalltalk-72 intended to offer.
<dlowe> each function accepts one parameter and returns either a function that takes the next parameter or the result
<beach> bjorkintosh: Possibly.
younder has joined #commonlisp
<beach> bjorkintosh: But all the complaints I hear about object-oriented programming are really about the fact that the languages they use confuse representation and encapsulation.
<bjorkintosh> currying is a transformation process which turns every n-adic function into a monadic function isn't it?
<bjorkintosh> beach: representation and encapsulation. an example please?
<beach> Representation as what CLOS classes do, and encapsulation as what Common Lisp packages do.
bilegeek has joined #commonlisp
<mwnaylor> I think (may be way of base) is that curry is linked to a more pure math point of view. A function takes one value, from the /domain/, and (maybe) returns a value from a /range/. f(x) = 1 /x obviously fails for x=03
<beach> bjorkintosh: In most mainstream object-oriented languages, classes do both.
<mwnaylor> s/03/0.l
<mwnaylor> I'm having a bad case of the typos today. 😠
<bjorkintosh> mwnaylor: well, that is a pure function indeed. a table of domains and ranges with a 1-1 relation.
<mwnaylor> bjorkintosh: thx for confirmation. Drawing on algebra classes, which for me were a long time ago.
<bjorkintosh> mwnaylor: (almost) everything is a map I say. function? table? dictionary? set? array? memory? map? Map.
<bjorkintosh> someone else pointed out that that's the premise of category theory.
<mwnaylor> bjorkintosh: 30,000 ft view. But it works for high level interfaces. Love it or hate it, Clojure has embraced that concept. Functions work for a wide range of core data types/structures. Often my Clojure mind gives me problems when I'm coding in elisp or common lisp.
<bjorkintosh> why's that? what's the disconnect between clojure and common lisp?
<mwnaylor> I'm less familiar w/ cl. cl: some functions work w/ vectors/arrays but fail w/ lists; functions that work w/ lists fail for vectors/arrays. Clojure tries to hide the base type. CL has sequence functions that are a bit more flexible. I should focus on them more.
awlygj has quit [Quit: leaving]
<mwnaylor> For example, Clojure has a conj function. Similar to classic lisp cons, but /smarter/. If the element is being conjed to a list, it goes to the head. If the element is being conjed to a vector, it goes to the tail. `conj' does the *right thing* (most efficient) based upon the data type of the supplied collection.
<younder> My main gripe with Clojure is that it runs on the JVM. Java is based on the assumption that all data modifiable and Clojure on the assumption that they are constant. This makes the interoperability awkward.
<younder> s/constant/immutable/ and s/modifiable/mutable/
<mwnaylor> younder: Depends on what data structure you are dealing with.
<mwnaylor> FWIW: seems like the mutable/immutable boundaries are better handled by Clojure than they are with Kotlin.
<skin> I am a clojure refugee.
<mwnaylor> skin: To where?
<skin> To Common Lisp
<skin> CL has a sequences api that works on vectors or lists: https://www.lispworks.com/documentation/HyperSpec/Body/c_sequen.htm
<ixelp> CLHS: Section The Sequences Dictionary
<mwnaylor> skin: Why the change?
<skin> Start-up time
<skin> Rich Hickey made thousands of design decisions. From an ergonomics perspective, yes, he nailed a lot of them. However, from an engineering perspective, most of the decisions served to make a robust, efficient ... web application.
NotThatRPG has quit [Quit: Textual IRC Client: www.textualapp.com]
<skin> If you're writing a web app, clojure is great. But if you're doing anything else -- CLI, GUI application, cron job -- the start-up time kills you. This problem was not taken into account in the design.
<skin> Many lisps take the view that "All the other lisps are terrible, let's make a better one". Scheme and Clojure both took this view.
<skin> The problem with that view is that it encourages followers of your path to break off from your path the minute they find something wrong with your language, since that's what you did when you left the first lisp. For this reason, the Scheme community has been hopelessly fractured for years.
<bjorkintosh> well, communal lisp did the same thing: first rule of lisp by way of greenspun's rule, all other lisps are inferior to the one you will eventually half ass.
<mwnaylor> Yeah, can't argue that. In emacs, can start slime faster than a cider session.
<bjorkintosh> skin, but what's the rush, really?
<bjorkintosh> unless you're writing some embedded software, what's the hurry?
<skin> The view that Clojure takes is "Anything Rich Hickey does is the right way." Indeed, his is an excellent example to follow. He's really good, and having one opinion in the room solves the fracturing problem. However, it only really works best for one type of use case -- that of Rich Hickey's (web apps).
<selpoke> cider seemed really janky in comparison to slime
<bjorkintosh> and webapps ARE pervasive. this is Good.
<skin> Common Lisp actually did the opposite: "we all have something close to what each other has. Let's come together and create a standard that we can all live with."
<skin> That made for a somewhat messy standard, but what it DID do is set the tone for CL culture for decades to come: "Hey guys, I know we can do _anything_ in this language, but let's try to come to a consensus".
<mwnaylor> I despise webapps. Clojure melds best w/ the way my mind works. BUT, with 12+ years of elisp hacking, I can (and will) live with the common lisp (lisp-2) mode when it makes sense.
<skin> Yeah, lisp-2 is annoying, but "community over warts" is a good community norm to have\
<mwnaylor> I may have tried slime before cider. BUT, cider was my first environment for working with a lisp.
<Shinmera> Can we not do a lisp-1/2/n discussion in here thank youuuuu
<Shinmera> there's #lisp for those brawls
<skin> This way of working has served CL well. The standard didn't allow for unicode or threads, but we have since come to a consensus on that de facto among the implementations. The result is that CL is all things to all people. Whatever you're doing, CL will serve your use case well, since it was designed to meet the needs of many different people and institutions.
<skin> All this is to say: CL is less ergonomic in some ways, but the attitude of consensus and treating all use cases with equal rigor is more valuable to me than perfect ergonomics.
<skin> Sorry for the book, guys. I can soap box sometimes. I need to write a blog post about that subject though, it's a big deal.
<mwnaylor> lisp-2 has good points. Nice to have a value that tells the state and also have a function that changes that state.
dawids_ has joined #commonlisp
dawids_ has quit [Remote host closed the connection]
NotThatRPG has joined #commonlisp
<mwnaylor> Shinmera: It's not a brawl. We come from a mixed background. That means we have seen the advantages of many implementations.
<Shinmera> it devolves into a brawl and I do not care to have it get that far
<skin> At the end of the day, `save-lisp-and-die` was the killer feature. Waaaaay easier than getting graalVM + native-image to work.
<skin> Also it's nice that most CL implementations have good C FFI.
<mwnaylor> Shinmera: that is your opinion. It's not a brawl. It's a conversation among lisp fans who've been exposed to many dialects and have experienced the strenghths and weaknesses of them.
<Shinmera> It happens to my opinion, and I happen to be a mod. I happen to say "please cease". You may happen to heed my warning or you may not.
<Shinmera> Lots of maybes.
NotThatRPG has quit [Ping timeout: 255 seconds]
<mwnaylor> Shinmera: you have to much of a thin skin to be a mod.
<Shinmera> Interesting that you know so much about me. Tell me some more things why don't you?
prokhor_ has joined #commonlisp
<bike> if you're going to do some lengthy comparisons of languages that aren't common lisp please go to some channel that is not about common lisp specifically.
<bjorkintosh> mwnaylor: there's always #lispcafe if all else fails.
prokhor has quit [Ping timeout: 264 seconds]
<mwnaylor> Is it against channel rules to discuss the merits of other lisp dialects?
<dlowe> Discussion of lisp broadly is the purpose of #lisp
<bike> it's against channel rules to go off topic (with some leeway, of course)
<skin> Shinmera: I'm interested, as an aside. Is the lisp-2 thing like tabs vs. spaces? Like, is it usually a hot button topic?
<bike> it can be
<Shinmera> it is yes
<skin> Sounds like you've seen a lot of bar fights
<bike> i just find it repetitive, personally
<Shinmera> it's also as old as jesus and I'm very tired of it
<bjorkintosh> it's like ... an old drinking song.
<bjorkintosh> :-D
<bjorkintosh> lisp shanties
<dlowe> To be blunt, no one is going to change CL to be a lisp-1. So it's super-irrelevant
<skin> Man, sign me up for _that_
<skin> (lisp shanties)
<bike> i think there are a couple of those from the old MIT AI labs
<skin> Tell me more. I love war stories
<bike> what, shanties? i think they're in the jargon file? it's not like i was there
<ixelp> Eternal Flame - GNU Project - Free Software Foundation
alcor has joined #commonlisp
<dlowe> more of a hymn than a shanty, I guess
<skin> What a read. There's so many hidden little things like this for lisp.
<bjorkintosh> that's funny. I wasn't expecting that.
<skin> Oh wait, there's an audio recording??? LOLZ
thuna` has quit [Read error: Connection reset by peer]
yitzi has joined #commonlisp
<mwnaylor> OK. Backing off a bit. For 20+ years, I've tried to select a lisp. I struggled w/ common lisp vs scheme. Circa 2017, found Clojure. That meets my mindset best. I *really* tried scheme: guile, racket, chicken; none of them worked well with my Slackware distro. Circa 2011, went total immersion w/ emacs. elisp has a strong link to common lisp. Recently, switched to stupmwm. Written in common lisp. Some things I can do w/ out-of-the-box
<mwnaylor> Clojure I struggle to implement in common lisp. I'm not here to undermine CL.
<skin> What kind of things? Maybe I can help, been in both worlds.
<kagevf> not n-arity?
<bjorkintosh> mwnaylor: you're already in #lisp, it's a simple switch over.
<bjorkintosh> same folk.
<bjorkintosh> I'm interested in what you have to say.
<bjorkintosh> 'cause I'm eyeing clojure for a project because of the jvm and you have stuff to say. so if you don't mind terribly, #lisp?
<mwnaylor> bjorkintosh: thx. Yes, on #lisp, BUT, was responding to what I saw in this channel.
<bjorkintosh> same folk, so it won't be too hard to follow.
eddof13 has quit [Quit: eddof13]
<mwnaylor> bjorkintosh: What is your experience w/ Java/jvm?
<bike> talking about how you can maybe do clojure stuff in CL is plenty on topic, but you might have to describe the clojure stuff for us ignoramuses
<bjorkintosh> mwnaylor: Zero.
<mwnaylor> bjorkintosh: I had basic Java. Self taught. Mostly by reading the docs and kluging things together. High level, you can code Clojure w/o Java. BUT, you may have to jump through a lot of hoops if you can't access the Java interop.
<mwnaylor> bike: Does cl have a conj function?
eddof13 has joined #commonlisp
<bike> lessee, add some objects to a collection? I don't think there's anything general for sequences, and we don't have collections as a baked in concept
<bike> for a list in particular i guess it's just append
<bike> oh, concatenate for sequences, actually.
<bike> so maybe something a bit goofy like (defun conj (sequence &rest elems) (concatenate (class-of sequence) sequence elems))
<bike> the FSet library has a bunch of data structures. there's a `with` function that adds one element pretty generically. dunno if there's a convenience function to do a bunch.
<skin> Clojure's `(conj x coll)` = CL's `(cons x list)`, `(adjoin x list-set)`, `(vector-push-extend x vec)`, `(acons k v list)`, or `(setf (gethash k dictionary) v)`, depending on your use case.
<bike> right, generic.
<skin> FSet is nice, especially coming from clojure, except that no one uses it. In particular, good luck e.g. deserializing YAML into FSet collections.
<skin> bike: You were dead on the money with `with`, I just didn't see your comment until I was nearly finished typing mine
waleee has joined #commonlisp
<gilberth> beach: The scope is clearly defined indeed. What however is not specified clearly is the set of bindings a declaration applies to. In particular whether a declaration may apply to more than one binding or not. If it may only apply to at most one bindings: Which one? That's the puzzle.
<gilberth> In 3.3.4 it says "A declaration that appears at the head of a binding form and applies to a variable or function binding made by that form is called a bound declaration;". Does this "a variable" imply singular? Or does it used "a" with the meaning "some non-empty set"? When we take this meaning then a bound declaration should apply to all bindings of a variable which can be more than one.
<gilberth> Thus in a (LET* ((X ..) (X ..)) (DECLARE (SPECIAL X)) ..) the SPECIAL would apply to both X. This is the interpretation that CCL, CLISP, ECL, Allegro, and Lispworks pick. The odd ones are SBCL and ABCL which apply the SPECIAL to the second X only.
eddof13 has quit [Quit: eddof13]
Pixel_Outlaw has joined #commonlisp
NotThatRPG has joined #commonlisp
<kingcons> mwnaylor: There are a number of libraries that have tried to bridge the gap somewhat. Cloture may be worth a look and I've enjoyed using serapeum, a utility library by the same author: https://github.com/ruricolist/cloture
<ixelp> GitHub - ruricolist/cloture: Clojure in Common Lisp
shawnw has joined #commonlisp
<kingcons> If you do want a generic sequence protocol and to avoid setf as you've suggested, you might want to look at fset which has long seemed the premier functional collection lib from my perspective: https://gitlab.common-lisp.net/fset/fset/-/wikis/FSet/Tutorial
<ixelp> Tutorial · Wiki · fset / FSet · GitLab
eddof13 has joined #commonlisp
X-Scale has joined #commonlisp
waleee has quit [Ping timeout: 264 seconds]
char has joined #commonlisp
JuanDaugherty has joined #commonlisp
Equill has quit [Quit: Gone offline]
peterv has joined #commonlisp
bilegeek_ has joined #commonlisp
peterv has quit [Quit: Client closed]
akoana has quit [Ping timeout: 252 seconds]
bilegeek has quit [Ping timeout: 252 seconds]
X-Scale has quit [Ping timeout: 256 seconds]
shawnw has quit [Ping timeout: 260 seconds]
thuna` has joined #commonlisp
akoana has joined #commonlisp
contrapunctus has quit [Ping timeout: 248 seconds]
varjag has joined #commonlisp
eddof13 has quit [Quit: eddof13]
yitzi has quit [Remote host closed the connection]
JuanDaugherty has quit [Quit: JuanDaugherty]
eddof13 has joined #commonlisp
eddof13 has quit [Client Quit]
mwnaylor has quit [Remote host closed the connection]
pve has quit [Quit: leaving]
cage has quit [Quit: rcirc on GNU Emacs 29.4]
lucasta has quit [Remote host closed the connection]
<phantomics> CL is great for webapps, generating HTML is a snap, you can URL route through Clack and Ningle, and using HTMX you can easily build logic to generate and regenerate chunks of pages
waleee has joined #commonlisp
<phantomics> I was able to replace something formerly implemented using the massive complicated d3.js library with dynamically updated SVG content via HTMX
<aeth> generating HTML from s-expressions is definitely one of the short elevator-pitches for Lisp syntax you can do
<dlowe> CL is great for webapps *if* you don't work on a team
<dlowe> unless your whole team is all-in on lisp
<dlowe> your front end people will be mad if they can't use the tools they're familiar with
xlymian has quit [Ping timeout: 276 seconds]
JuanDaugherty has joined #commonlisp
<aeth> dlowe: good news on that front... WASM
eddof13 has joined #commonlisp
eddof13 has quit [Client Quit]
alcor has quit [Remote host closed the connection]
eddof13 has joined #commonlisp
xlymian has joined #commonlisp
eddof13 has quit [Client Quit]
mwnaylor has joined #commonlisp
xlymian has quit [Read error: Connection reset by peer]
<JuanDaugherty> hi, aeth (i'm Lycurgus)
<JuanDaugherty> i don't idle in this identity but i was wondering if you'd used any leg of acl-compat
wacki has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
JuanDaugherty has quit [Quit: JuanDaugherty]
amb007 has quit [Read error: Connection reset by peer]
varjag has quit [Ping timeout: 245 seconds]
eddof13 has joined #commonlisp
eddof13 has quit [Client Quit]
<aeth> I have never used it. Apparently it's https://www.cliki.net/ACL-COMPAT
<ixelp> CLiki: ACL-COMPAT
<aeth> it seems to be an '00s era Lisp thing
randm has quit [Remote host closed the connection]
randm has joined #commonlisp
shka has quit [Ping timeout: 272 seconds]
dtman34 has quit [Quit: ZNC 1.8.2+deb3.1 - https://znc.in]
dtman34 has joined #commonlisp
akoana has quit [Quit: leaving]
vats has joined #commonlisp
JuanDaugherty has joined #commonlisp
<JuanDaugherty> yeah, it's basically portableaserv, no question it's bit rotted relative to sbcl, just was wondering if anybody had used
<JuanDaugherty> practically i dropped the notion of using it and migrated to acl express 11
<JuanDaugherty> used in any implementation (other than acl ofc)
lucasta has joined #commonlisp
<JuanDaugherty> that is to say i dropped ftm the notion of trynna use it sbcl with stuff originally targetting acl
<JuanDaugherty> *it with sbcl on stuff
<smlckz> Please take a look and provide your suggestions for improvement: https://paste.rs/1qDjd
<smlckz> It's a variation of case macro with equality checked by string= instead of eql
<smlckz> How do I make sure that the test-key (result of evaluating keyform) as well as keys from clauses being matched against are all valid arguments to string=, i.e. are values of type (or string symbol character)?
JuanDaugherty has quit [Quit: JuanDaugherty]
<kagevf> smlckz: how about stringp
waleee has quit [Quit: WeeChat 4.1.2]
<bike> you can just do (typep whatever '(or string symbol character)), but you could also just use the string function, which will signal an error if it's not one of those, and get you an actual string
<smlckz> So, `(member ,kfsym ',keys
<smlckz> :test #'string= :key #'string) good enough in this case?
<bike> the keys are constants, right? you may as well resolve them at compile time. (member ,kfsym ',(mapcar #'string keys))
<bike> and at the beginning have (let ((,kfsym (string ,keyform))) ...) of course
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
donleo has quit [Ping timeout: 252 seconds]
<smlckz> anything else to fix? https://paste.rs/2HtcG
<bike> you can do the STRING at compile time in the single key case as well
<smlckz> okay
<smlckz> how close is the code I've written to ''idiomatic'' lisp?
<smlckz> here's the full code where I used the macro https://0x0.st/X4Yc.lisp
xlymian has joined #commonlisp
xlymian has quit [Read error: Connection reset by peer]
vats has quit [Ping timeout: 260 seconds]