Xach changed the topic of #commonlisp to: Common Lisp, the #1=(programmable . #1#) programming language | Wiki: <https://www.cliki.net> | IRC Logs: <https://irclog.tymoon.eu/libera/%23commonlisp> | Cookbook: <https://lispcookbook.github.io/cl-cookbook>
lisp123 has joined #commonlisp
random-nick has quit [Ping timeout: 268 seconds]
lisp123 has quit [Ping timeout: 268 seconds]
perrierjouet has quit [Quit: WeeChat 3.2]
kakuhen has joined #commonlisp
Oladon1 has quit [Quit: Leaving.]
abrantesasf has joined #commonlisp
karlosz has joined #commonlisp
abrantesasf has quit [Quit: Leaving]
karlosz has quit [Ping timeout: 265 seconds]
karlosz has joined #commonlisp
amk has quit [Ping timeout: 268 seconds]
amk has joined #commonlisp
Mandus has quit [Ping timeout: 265 seconds]
Mandus has joined #commonlisp
CrashTestDummy2 has joined #commonlisp
CrashTestDummy3 has quit [Ping timeout: 268 seconds]
sm2n has joined #commonlisp
igemnace has joined #commonlisp
kakuhen has quit [Quit: Leaving...]
<beach> Good morning everyone!
pillton has joined #commonlisp
<beach> I admire everyone's patience with Guest92. That's a very strange way of trying to learn a language.
<Guest92> What's that?
<Guest92> Trying to reconcile the differences between two seemingly similar primitive forms in a language by trying to rearticulate it in my own words?
<Guest92> Seems rather socratic
<beach> OK.
<Guest92> You're saying you DON'T try to formulate your understanding in your own words?
<Guest92> That's a strange way to learn <insert subject>
<waleee> Guest92: you would love the main maintainer of the pony language
<Guest92> Why is that? Also WHAT is that?
<waleee> but you'd have to join their zulip since they jumped the irc-ship even pre freenode-calypse
<waleee> one of the main maintainers is a huge fan of the socratic method when helping beginners
Krystof has quit [Ping timeout: 256 seconds]
<Guest92> The point isn't to be pedantic. What is the main activity one engages in when attending college? Likely writing, which serves the purpose of forcing the student to formulate their understanding in their own terms.
<Guest92> It reveals understanding, or the lack of understand
<Guest92> *ing
<Guest92> What I learned earlier is that my understanding of flet and labels is correct, but my formulation wasn't
<waleee> sometimes you prefer a quick answer, not an interactive session
<Guest92> Well I prefer the interaction
<Guest92> It allows me to confront my assumptions directly, rather than concealing my assumptions until a later time when it becomes costly
<hayley> I might be unable to navigate the documentation, but a thought I've found more evidence for is that it seems that the Common Lisp standard is unique in describing how you evaluate things, and not just describing the standard library.
kakuhen has joined #commonlisp
<hayley> The exceptions that I can think of are Standard ML, Scheme, TLA+ with operational(?) semantics, and Smalltalk-80 with a metacircular interpreter. Otherwise, it's like you're supposed to get the syntax, evaluation order, and everything else.
<hayley> Nah, you usually find a description for types and syntax. But evaluation order is often not mentioned, for example.
<Bike> easier to do when you can write your language at least somewhat as reduction rules, i guess
<Bike> C and C++ standards do describe evaluation order or lack thereof
<jcowan> C and Scheme are emphatic that no evaluation order can be counted on
<hayley> Right. But in languages without fancy standards, it seems that there is absolutely no discussion of evaluation order, not even that it is undefined.
<Bike> oh, yeah, maybe
<Guest92> Right, I describe it as user documentation vs implementation documentation
<hayley> It's not implementation documentation; you couldn't write some classes of programs in that language if you don't know the evaluation order.
<Guest92> Most language docs treat the user as someone who just wants to know "how do I do x in y language" not "in this context x is evaluated to an intermediate value..." Yeah yeah, but what's the behavior?
<moon-child> hayley: so you are saying: cl is somewhat unique in that it is standardised at all?
<Guest92> s/behavior/result/
<hayley> moon-child: I guess.
<Bike> understanding the evaluation semantics in detail is actually useful for writing programs correctly, not just for implementing the language
<Bike> and for reading them
<beach> Absolutely.
<Bike> do it vaguely and it's like C compilers for microcontrollers that can't apply optimizations because people keep writing empty for loops to pause execution
<hayley> With the Pony language website, for example, I only see a tutorial and standard library documentation, and tutorials don't tend to be normative.
<beach> hayley: With most languages no documentation is normative, because there is no standard. So, to me, there is then no "language" either. Just a programming system the behavior of which can change arbitrarily.
<waleee> they have https://patterns.ponylang.io/ and some lectures but there's sparse docs available
<hayley> One of the first parts of the tutorial states you use a program called "ponyc" to compile the program. Is an implementation which calls the compiler "pony-compiler" not a correct implementation of Pony?
<hayley> beach: Yes, I suppose I am indirectly stating that most programming languages are just the description of one programming system.
<beach> Indeed.
akoana has quit [Quit: leaving]
<beach> I mean, one of the first sentences I read was that Pony is "open source". I don't quite know how a programming language can be "open source".
<hayley> But, even if the documentation is not normative, properties like eager or lazy evaluation are never explicitly mentioned. You're presumably expected to guess that is eagerly evaluated.
<beach> Yeah, that's bad.
<hayley> If I managed to teach someone programming only with Haskell and Prolog, for example, I am sure they would struggle to figure out any code in the tutorial, despite having "some experience programming already".
<jcowan> moon-child: By bno means unique, There are ISO standards for Ada, Algol 60, APL, Basic, C, C++, C#, Chill, Cobol, ECMAscript (JavaScript), Eiffel, Forth, Fortran, ISLisp, Modula-2, Mumps, Pascal, PL/I, Prolog, Ruby, and SQL.
<hayley> But still, Smalltalk-80, Standard ML and TLA+ have useful specifications without having any official standards.
<moon-child> jcowan: hence 'somewhat'. I'm sure there are many more entries on this list https://en.wikipedia.org/wiki/List_of_programming_languages than languages that have been standardised
<jcowan> There are also ANSI standards for APT, Common Lisp, Dibol, PL/B, Rexx, and Smalltalk (so there is an official standard for that). Scheme has an IEEE standard.
<moon-child> (also: I don't think the forth or apl specs have done anybody much good)
karlosz has quit [Quit: karlosz]
<jcowan> SML never went through an official standards org, but its standard is very high quality, including its formal semantics.
karlosz has joined #commonlisp
<jcowan> Scheme also has both operational and denotational formal semantics
waleee has quit [Ping timeout: 260 seconds]
pillton has quit [Quit: ERC (IRC client for Emacs 27.2)]
rain3 has joined #commonlisp
semz has quit [Ping timeout: 260 seconds]
Bike has quit [Quit: Lost terminal]
karlosz has quit [Quit: karlosz]
semz has joined #commonlisp
karlosz has joined #commonlisp
pillton has joined #commonlisp
nature has quit [Ping timeout: 268 seconds]
fengshaun has joined #commonlisp
Inline has quit [Quit: Leaving]
karlosz has quit [Quit: karlosz]
ln43 has joined #commonlisp
gaqwas has joined #commonlisp
ln43 has quit [Quit: Connection closed]
pillton has quit [Quit: ERC (IRC client for Emacs 27.2)]
cosimone has joined #commonlisp
fengshaun has quit [Ping timeout: 265 seconds]
amb007 has quit [Ping timeout: 260 seconds]
amb007 has joined #commonlisp
cosimone has quit [Ping timeout: 268 seconds]
fengshaun has joined #commonlisp
lisp123 has joined #commonlisp
Cymew has joined #commonlisp
lisp123 has quit [Ping timeout: 265 seconds]
sm2n_ has joined #commonlisp
sm2n has quit [Ping timeout: 268 seconds]
cjb has quit []
gaqwas has quit [Ping timeout: 260 seconds]
Guest92 has quit [Ping timeout: 256 seconds]
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
montxero has joined #commonlisp
shka has joined #commonlisp
montxero has quit [Read error: No route to host]
montxero has joined #commonlisp
montxero has quit [Read error: No route to host]
montxero has joined #commonlisp
montxero has quit [Remote host closed the connection]
montxero has joined #commonlisp
silasfox has joined #commonlisp
montxero has quit [Read error: Connection reset by peer]
montxero has joined #commonlisp
<montxero> With cl-sqlite, is it possible to execute sql statements/queries that are already filled? I want to be able to do something akin to (sqlite:execute-non-query *db* "insert into USERS (user_name,age) values (joe,18)")
<montxero> Currently, I get an error `no such column: joe'
montxero has quit [Read error: No route to host]
<_death> you need to quote the string: 'joe'
montxero has joined #commonlisp
pve has joined #commonlisp
<flip214> montxero: or, even better, pass it in as an argument instead of inline, in the string
<montxero> _death: thanks will try that
<montxero> flip214: the query will be generated before hand
<montxero> _death: Thank you sir!
<akater[m]> Would it make sense for Common Lisp to have `compiler-macrolet`?
<hayley> There was a compiler-let once.
<hayley> Apparently it didn't make sense, so it was removed.
<semz> what could you do with compiler-macrolet that you couldn't do with macrolet?
<semz> if you want a local optimization you can just put it there, it's local after all
<akater[m]> semz: compiler-macrolet could optimize (funcall f ..) or (apply f ..) for local f's
<saturn2> it doesn't seem very useful, since the compiler would be compiling the local functions anyway
amb007 has quit [Ping timeout: 265 seconds]
amb007 has joined #commonlisp
<flip214> hayley: http://www.lispworks.com/documentation/lw50/CLHS/Issues/iss066_w.htm Issue COMPILER-LET-CONFUSION Writeup
<flip214> OTOH I've wanted to pass data to macros a few times, to modify the expansion behaviour
<flip214> I think I went with (eval-when () (setf *flag* t)) (macro-invocations)
<saturn2> several implementations have compiler-let even though it's not in the standard
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
ln43 has joined #commonlisp
silasfox` has joined #commonlisp
silasfox has quit [Ping timeout: 268 seconds]
abraham has quit [Quit: The Lounge - https://thelounge.chat]
abraham has joined #commonlisp
silasfox` is now known as silasfox
cosimone has joined #commonlisp
asarch has joined #commonlisp
mfiano has quit [Ping timeout: 250 seconds]
hendursa1 has joined #commonlisp
Qwnavery has joined #commonlisp
hendursaga has quit [Ping timeout: 276 seconds]
icer has quit [Quit: WeeChat 2.8]
Everything has joined #commonlisp
asarch has quit [Quit: Leaving]
l20dfx35jnkbfrn has joined #commonlisp
l20dfx35jnkbfrn has left #commonlisp [Leaving]
makomo_ has joined #commonlisp
ahlk has quit [Ping timeout: 252 seconds]
waleee has joined #commonlisp
attila_lendvai has joined #commonlisp
mfiano has joined #commonlisp
<mfiano> Anyone have AMOP handy?
<mfiano> I'm curious if I found a typo, or if the program example is just wrong.
<mfiano> Or my understanding is :)
<beach> I have it.
<mfiano> Oh good
<mfiano> page 56
<mfiano> One initform of the return value code is quoted
kakuhen has quit [Quit: Leaving...]
<beach> I don't see anything like that on page 56.
<mfiano> Hmm maybe edition difference. Section 2.2.3?
<beach> OK, yes.
<beach> I don't see any "return value code".
<mfiano> The initform for clearp is quoted, unlike the others. The input in the beginning of the book obviously intends for this to be evaluated and is not quoted
<mfiano> I guess we are looking at different books. I am referring to the result of the call: (display-defclass* 'color-rectangle)
<beach> Ah, yes, I see it.
<beach> That does look wrong.
<mfiano> I'm unsure if the example code is wrong, or just the return value transcription has a typo
<beach> Good question.
selwyn has joined #commonlisp
<beach> The :initform in the class definition is not quoted.
<mfiano> That's what I said above.
<beach> Oh, right.
<mfiano> Which leaves either the wrong slot-definition-initform function/glue macro, or a typo in the return value of the book
<mfiano> I'm trying to study this book in detail, and I don't mind which one it is, but would be very nice to be aware of which :)
<beach> It looks to me like the latter.
<beach> But it's strange. I mean, that code should be automatically generated.
<mfiano> Hmm, I guess I can ignore it then.
<mfiano> Thank you for looking
<beach> Sure.
yitzi has quit [Remote host closed the connection]
yitzi has joined #commonlisp
ln43 has quit [Quit: Connection closed]
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
CrashTestDummy has joined #commonlisp
CrashTestDummy2 has quit [Ping timeout: 260 seconds]
cosimone has quit [Remote host closed the connection]
cosimone has joined #commonlisp
Krystof has joined #commonlisp
amb007 has quit [Ping timeout: 240 seconds]
amb007 has joined #commonlisp
montxero has quit [Read error: Connection reset by peer]
mfiano is now known as help
help is now known as mfiano
heisig has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
<Mrtn[m]> Did @mayuresh:libera.chat leave #commonlisp:libera.chat ? Autocomplete doesn't seem to catch his profile ID. I thought I had some advice to perse, that I am not sure was mentioned. I am mostly agreeing with what was said already though, so it's not a "Biggie". Ah, perse quit already because of 268 seconds of ping timeout. Oh well.
random-nick has joined #commonlisp
<mfiano> pjb: They are not here, and their account is not registered (it is a randomly selected guest nick)
amb007 has joined #commonlisp
<Mrtn[m]> My answer came later in history. They left to eat.
<Mrtn[m]> Is an effort being made to pick up the regulars, that was lost in transit to Libera?
cosimone has quit [Ping timeout: 268 seconds]
heisig has quit [Quit: Leaving]
<pjb> mfiano: sometimes they select again the same?
<mfiano> Sure if it is not already taken, and if it the same human.
yitzi has quit [Ping timeout: 268 seconds]
attila_lendvai has quit [Ping timeout: 260 seconds]
VincentVega has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
yitzi has joined #commonlisp
X-Scale` has joined #commonlisp
slyrus has quit [Ping timeout: 260 seconds]
X-Scale has quit [Ping timeout: 268 seconds]
X-Scale` is now known as X-Scale
tyson2 has joined #commonlisp
santiagopim has quit [Read error: Connection reset by peer]
slyrus has joined #commonlisp
selwyn has quit [Read error: Connection reset by peer]
cosimone has joined #commonlisp
markthom_ has quit [Quit: Client closed]
Bike 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
selwyn has joined #commonlisp
selwyn has quit [Remote host closed the connection]
selwyn has joined #commonlisp
selwyn has quit [Read error: Connection reset by peer]
selwyn has joined #commonlisp
doyougnu has joined #commonlisp
hineios has quit [Excess Flood]
hineios has joined #commonlisp
selwyn has quit [Read error: Connection reset by peer]
selwyn has joined #commonlisp
nature has joined #commonlisp
<mfiano> beach: Where was "Chapter 5: The concept of a protocol" extracted from?
<beach> From an unfinished book of mine.
<mfiano> Oh are any other parts complete? (can't help but notice it starts on page 33)
<mfiano> It definitely has me intrigued
<beach> I don't remember. Let me check...
<beach> The book is about CLOS programming, and there are some chapters containing examples that are close to finished. For instance one chapter that describes Cluffer, more or less.
<mfiano> Nice and thanks. Good luck on that, and all your other projects
<beach> Thanks. But my favorite coauthor kind of abandoned me, so most book projects are stalled. Then phoe was going to help me with one of them, but he got very busy with projects for Apress.
didi has joined #commonlisp
ahlk has joined #commonlisp
<didi> I wonder if there is a builtin form for the idiom (let ((var (make-var))) (mutate-var var) ... var), i.e., create an object, mutate it, and return it.
<mfiano> How would something built-in know how to create something, whatever semantics is intended by that?
<didi> mfiano: No no, I want something like (prog1 (setf var (make-var)) (mutate-var var) ...).
<_death> there is no "built-in" operator for that stylistic misstep.. probably a close one is anaphora:aprog1, but then you have two stylistic missteps
<didi> Oh, well.
<didi> Thank you.
<shka> mfiano: i told you so... :P
copec has joined #commonlisp
makomo_ has quit [Ping timeout: 252 seconds]
Mandus has quit [Ping timeout: 265 seconds]
Mandus has joined #commonlisp
selwyn has quit [Read error: Connection reset by peer]
selwyn has joined #commonlisp
yitzi has quit [Remote host closed the connection]
selwyn has quit [Read error: Connection reset by peer]
selwyn has joined #commonlisp
Mandus has quit [Ping timeout: 265 seconds]
Mandus has joined #commonlisp
selwyn has quit [Read error: Connection reset by peer]
selwyn has joined #commonlisp
lisp123 has joined #commonlisp
lisp123_ has joined #commonlisp
lisp123 has quit [Ping timeout: 265 seconds]
Mandus has quit [Ping timeout: 268 seconds]
makomo_ has joined #commonlisp
pjb is now known as Guest544
pjb has joined #commonlisp
Guest544 has quit [Ping timeout: 268 seconds]
Mandus has joined #commonlisp
lottaquestions has joined #commonlisp
lottaquestions has quit [Client Quit]
hendursa1 has quit [Quit: hendursa1]
hendursaga has joined #commonlisp
Devon has quit [Ping timeout: 252 seconds]
srhm has joined #commonlisp
Mandus has quit [Ping timeout: 252 seconds]
Qwnavery has quit [Ping timeout: 268 seconds]
Qwnavery has joined #commonlisp
Mandus has joined #commonlisp
<copec> Did anyone keep working on CL on Wasm?
<jcowan> Running CLISP on WASM might be a straightforward (not zero-effort!) port.
Mandus has quit [Ping timeout: 265 seconds]
Mandus has joined #commonlisp
nature has quit [Ping timeout: 265 seconds]
<beach> I think phoe tried to convince the WASM people that Common Lisp needed control instruction and not exceptions. I don't know how that went.
jeosol has joined #commonlisp
<jeosol> Good morning all!
<beach> Hello jeosol.
<jeosol> I have a question for those running some kind of "release engineering" workflow. I am looking to move some code and test on the cloud. I am thinking of having methodology to test and push code that can be automated as possible. code is in a huge mono-repo if that matters
<jeosol> Hi beach, been a while. Hope you are well
lisp123_ has quit [Remote host closed the connection]
<jeosol> Still on my foray in the Algorithms course as a refresher - have two more weeks
<beach> jeosol: Yes, thank you. You too I hope.
<jeosol> As per my question, I only use SBCL.
<jeosol> @beach: yes, its going well
<jeosol> @beach: Thanks to you and other here for useful pointers over the last several months (years perhaps), my project is stable now and I can do tests on my machine. Much stable now. I don't do any optimization on CL side for now because the bottle neck is in a different external call
<aeth> CL rarely needs optimization other than using something with better big-O than linked lists. Computers are fast.
<beach> jeosol: Good to hear!
<aeth> (I mean, CL code. Obviously Lisp itself needs linked lists)
<jeosol> aeth: good point.
yitzi has joined #commonlisp
<jeosol> I also like the stability - I can run the application now for weeks. Each run taking up to 4 weeks - no issues at all. I am also not using a lot of conditions at this time - if I get a bad input, I just give it a bad score (objective function)
<jeosol> Obviously backward compatibility - I update SBCL monthly and I rarely get any issues (except ironclad related one some versions back)
cage has joined #commonlisp
random-nick has quit [Quit: quit]
ec_ has quit [Ping timeout: 276 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
didi has left #commonlisp [O bella ciao bella ciao bella ciao, ciao, ciao.]
random-nick has joined #commonlisp
VincentVega has quit [Remote host closed the connection]
amb007 has quit [Ping timeout: 265 seconds]
amb007 has joined #commonlisp
rain3 has quit [Remote host closed the connection]
rain3 has joined #commonlisp
<copec> beach: Yeah, I read the old discussions. It seems like if the wasm people were more on board to supporting higher language features it could become the runtime environment to rule them all
<aeth> maybe native Wasm
<aeth> but the web has an issue and it's that its security model (justifiably) can't support next-gen graphics APIs like Vulkan because those are too low-level
<aeth> There are probably some other things you don't want to let a web browser do that you do want to let native apps do
<copec> The trend with operating systems has been towards to settle on a single system with api to control virtualization extensions that software uses. With GPU's supporting SRV-IO I'm hoping some standard will evolve that parallels that
<copec> not necessarily SRV-IO, but some per process security model for stuff like Vulkan
<copec> aeth: There is work for wasm in dedicated client and server applications too
<aeth> yes, wasm should aim to be a JVM replacement
<copec> oh I see, you said "maybe native Wasm", so you were already there
markthom_ has joined #commonlisp
markthom_ has quit [Client Quit]
vats has joined #commonlisp
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 265 seconds]
amb007 has joined #commonlisp
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 268 seconds]
<beach> copec: The thing is, any system of conditions or exceptions can be implemented with the suggested control structures. The other way around is way more difficult as the Clasp developers can tell you from implementing unwinding with C++ exceptions.
cosimone has quit [Remote host closed the connection]
cosimone has joined #commonlisp
<lotuseater> Does Clasp also make use of "#define private public"? :)
<Bike> at times, unfortunately.
<Bike> though i don't know what that has to do with exceptions.
<lotuseater> nothing
ec_ has joined #commonlisp
<Bike> but yes, i can say authoritatively that implementing lisp control structures through C++ exceptions is frustrating on every level
akoana has joined #commonlisp
gaqwas has joined #commonlisp
<jcowan> I guess that's the downside of deep integration, where there is no single FFI point of control where you could catch a C++ exception and fire a Lisp one.
azimut has joined #commonlisp
<Bike> yeah, if you want to be able to interleave frames from both languages C++ pretty much forces you to play by its rules
<Bike> the itanium exception ABI everyone uses nominally works with different languages, even ones with different models, but it's a lie
<Bike> it is kind of interesting that they wanted it to be usable, though
azimut_ has quit [Ping timeout: 276 seconds]
<jcowan> Well, it probably works with everything except Lisp (broadly considered, including Dylan)
<Bike> i'm not sure about that. non-C++ exceptions are kind of second class citizens. doing stuff like trying to rethrow them from a handler can cause the C++ runtime to give up and terminate
<Bike> http://ix.io/3yRX i wrote a quick gloss of what implementing return-from with exceptions looks like. it's not great
<Bike> c++ won't let you write return-or-control-error, since if throw doesn't find a handler it terminates
VincentVega has joined #commonlisp
<jcowan> No wonder Google bans exceptions (except in Windows code)
Inline has joined #commonlisp
<Bike> i think windows SEH is a little less dumb? at least it has finally blocks, which are sort of annoying to emulate
<Bike> anyway, point is it's not a good abstraction for general control flow
<Bike> scheme got that one figured out
<Bike> although i recall some complaints that the details of continuations within dynamic-wind are ambiguous
Everything has quit [Quit: leaving]
<_death> h
<_death> oops, wrong buffer
rain3 has quit [Ping timeout: 268 seconds]
derelict has quit [Quit: bye]
derelict has joined #commonlisp
ec_ has quit [Ping timeout: 276 seconds]
srhm has quit [Read error: Connection reset by peer]
attila_lendvai has joined #commonlisp
srhm has joined #commonlisp
ec_ has joined #commonlisp
cosimone has quit [Ping timeout: 268 seconds]
Inline has quit [Remote host closed the connection]
<jcowan> Bike: I don't remember that, but it's possible
Qwnavery has quit [Quit: WeeChat 3.2.1]
<jcowan> In addition, there is a mysterious discrepancy between Scheme and CL exception handlers: a Scheme handler exits when the exception is handled, and reraises when it needs to pass the buck.
Inline has joined #commonlisp
<jcowan> It's not a problem exactly, just hard to remember
<jcowan> when switching gears
<Bike> oh, you mean like if the handler function just returns further handlers aren't called?
<jcowan> Right, and what the handler returns is what raise-continuably gets. If you call raise instead, it will immediately raise another exception.
<Bike> huh, i see
<jcowan> So it's more like Java etc., although it does not rewind the stack unless an explicit non-local jump is done (which is implicit with guard, the analog of handler-case)
tyson2 has joined #commonlisp
rogersm has joined #commonlisp
rogersm has quit [Client Quit]
<copec> (Forgive the hopeful/ignorant questions) Bike: Could clasp be bootstrapped all under the wasm? Do the C++ exception semantics get mapped to Wasm, so that the work you've done in clasp would carry?
<copec> s/the wasm/Wasm
<Bike> we might have to disable the non-exception mechanisms, but it might be possible
<copec> So it would probably become a bog.
<copec> heh
<Bike> c++ exceptions are basically slow by design (as they are in practice implemented), so, yeah
<shka> mmm
Devon has joined #commonlisp
<shka> Bike: maybe you are bored and want to explain how c++ exceptions implementation is different from exceptions in lisp?
<shka> ;-)
<shka> if not, that's fine
<Bike> lisp implementations usually cons a bit on the stack to indicate the presence of exit points and cleanup blocks to the unwinder
<Bike> C++ implementations instead record information about exit points and cleanup blocks in the executable file
<Bike> the good part of that is that it means no consing whatsoever. the bad part is that getting that information becomes orders of magnitude slower
<shka> this is because C++ follows the "0 overhead compared to C" approach?
<Bike> it's "zero-cost exception handling", yeah. i don't know if that's conceived relative to C or anything
<shka> iirc the running gag in C++ community is that C++ exceptions are 0 cost, unless you actually want to use it
<White_Flame> I always balk at that description. The handling is very expensive. It's when exceptions aren't fired/handled that it's zero cost
<shka> White_Flame: yeah, that's why it is funny :D
<shka> Bike: thanks for explanation, much appreciated!
<White_Flame> (parallel typing plus lag here :) )
<Bike> "C++ exceptions are 0 cost unless you actually want to use them" is exactly right
<Bike> it's very, very slow. we spent months in clasp trying to work around it
<Bike> it even screws up parallelism, since the unwinder might have to walk loaded shared objects to find the code, and that's lock protected
<shka> there should be other such statements in C++
<shka> like
<shka> "C++ programs compile very quickly, unless you try to actually compile"
<Bike> and the only intelligible advice we got from C++ people was "don't throw exceptions"
<shka> yeah, they are like that sadly
<shka> disabling exceptions is actually pretty common approach in the C++ land
<Bike> or "throw less exceptions", which is pretty much what we're doing, because we can't make C++ faster
<jcowan> Given that most actual problems in C++ code don't throw exceptions but are just UB, there is a point to that.
<shka> i am not sure if this is actually true
<Bike> we have it set up to use setjmp/longjmp instead which we can, which works much faster, but probably isn't supported by wasm
<shka> it may be true for performance critical stuff
<Bike> (i mean, neither are exceptions, yet, as far as i understand)
<White_Flame> every C++ project always has an exact subset of the language that they agree to use
<jcowan> Also, it is false that exceptions are zero-cost, because every one of them bloats your code, which squeezes more out of cache
<White_Flame> It's almost architecturally impossible to actually use all of C++ in one codebase
<shka> yeah, C++ features are simply mutually incompatible
ec_ has quit [Ping timeout: 276 seconds]
<shka> not strictly i guess, but in practice
<lotuseater> shka: sounds like bad design, again
<Bike> jcowan: yeah, that's true. we haven't really noticed since we do actually use exceptions and that's so much worse :/
<shka> i would argue that it is
<shka> C++ with all the templates stuff can become really, really, really good example of code bloat anyway
cage has quit [Quit: rcirc on GNU Emacs 27.1]
<lotuseater> or not just shooting easily in the foot like with C but instead rip of the whole leg at once
<shka> shooting in the foot, but with grenade launcher
<lotuseater> :D
<White_Flame> #commonc++opinions
<copec> I like objects
<lotuseater> eatable objects
ec_ has joined #commonlisp
<copec> Bike: It seems like it would have almost been easier to make a binary translator for Dr Meister to suck his C++ libraries into a CL image rather then to suck CL into C++
<copec> but, clasp is super cool
<shka> if that would be even possible...
<shka> templates, templates everywhere
<copec> Someone has to file those taxes
<copec> I come from an aspect of someone who has used dtrace fairly often and has the debug symbols
<copec> and then I see stuff like high level emulation binary translation for video games, and wonder if you could parse and translate a binary library into a usable lisp library
<copec> licensing aside
<shka> i mean, perhaps
<shka> but the thing is, C++ libraries currently in use really need that code generation templates offer
<shka> in fact a lot of scientific libraries are just headers
<shka> so there is no SO file that you can simply load
<copec> That makes sense
<shka> i think that this is why clasp even is what it is
<shka> Bike: correct me please if i am wrong
<Bike> there are certainly plenty of header only libraries
<Bike> another thing is a desire to be able to actually use C++ object definitions
<shka> hm
<Bike> e.g. in clasp you can define lisp classes that have a C++ class as a superclass
<Bike> so they work normally with slot-value and stuff, but you can also sling them at C++ functions expecting the superclass
<shka> you could introspect c++ objects using inspector?
<Bike> Inspector?
<shka> like a slime inspector
<shka> or the one beach made
silasfox has quit [Ping timeout: 240 seconds]
<Bike> well, all i mean is that information isn't in C++ object files so much
<shka> regardless, yeah, ability to simply use C++ as it was CL is appealing
<shka> Bike: how do you feel about the progress with clasp in the 2021?
<Bike> how do i feel about it? well, i'm hoping to soup up the compiler, mainly. nothing directly c++ related
<shka> well, i meant, do you think you progress slower or faster then you have anticipated?
<copec> How is the overall clasp performance these days?
<copec> In terms of program execution
<shka> haha
<shka> this turns into Q&A session
<shka> Bike: sorry about that
<Bike> it's fine
<Bike> well, basically making a good optimizing compiler turns out to be hard
<copec> You guys should host an online clasp symposium
<yitzi> As a user of clasp the performance has improved dramatically over the last year and half. But as Bike said there are certain things you have to be careful about like signals.
ec_ has quit [Ping timeout: 276 seconds]
<shka> yitzi: wow, do you use clasp for something interesting?
<yitzi> I work with drmeister and Bike sometimes on the cando stuff.
<shka> oh, cool
<yitzi> Mostly on the JupyterLab side of things.
<copec> I'd love to see clasp tied into unreal engine for all sorts of direct parametric generation fun
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
<copec> Someone that knows what they are doing should get on that
<copec> drmeister needs to view them molecules in VR
<yitzi> drmeister uses ngl via ngl-clj generally for 3d. ngl-clj is a lisp widget for ngl (3d molecules) that I wrote for juyter lab.
ec_ has joined #commonlisp
attila_lendvai has quit [Ping timeout: 260 seconds]
gaqwas has quit [Ping timeout: 260 seconds]
attila_lendvai has joined #commonlisp
ec_ has quit [Ping timeout: 276 seconds]
ec_ has joined #commonlisp
shka has quit [Ping timeout: 268 seconds]
sjl has quit [Quit: WeeChat 2.2-dev]
vats has quit [Ping timeout: 252 seconds]
Lord_of_Life has quit [Ping timeout: 265 seconds]
Lord_of_Life has joined #commonlisp
Oladon has joined #commonlisp
<jcowan> One reason langs with a C FFI rarely have a C++ FFI are header-only libs (there are many others, from overloading to exceptions themselves
nature has joined #commonlisp
yitzi has quit [Quit: Leaving]
Steeve has joined #commonlisp
ec_ has quit [Ping timeout: 276 seconds]
attila_lendvai has quit [Ping timeout: 268 seconds]
<mfiano> C++ can't even interface with itself :)
Lycurgus has joined #commonlisp
ec_ has joined #commonlisp
ec_ has quit [Ping timeout: 276 seconds]
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
ec_ has joined #commonlisp
Steeve has quit [Quit: end]
elderK has joined #commonlisp
molson__ has joined #commonlisp
Oladon has quit [Quit: Leaving.]
molson_ has quit [Ping timeout: 245 seconds]
molson__ has quit [Remote host closed the connection]
selwyn has quit [Read error: Connection reset by peer]
keir has joined #commonlisp
molson has joined #commonlisp
ec_ has quit [Ping timeout: 276 seconds]
<lotuseater> mfiano: So kind of itself younger sibling "No, I don't want to play with them!" :D
cosimone has joined #commonlisp
cosimone has quit [Read error: Connection reset by peer]
cosimone has joined #commonlisp
ec_ has joined #commonlisp
pve has quit [Quit: leaving]
EdLin has joined #commonlisp
VincentVega has quit [Ping timeout: 265 seconds]
ec_ has quit [Ping timeout: 276 seconds]
ec_ has joined #commonlisp
cosimone has quit [Ping timeout: 268 seconds]
hendursaga has quit [Remote host closed the connection]
hendursaga has joined #commonlisp
tyson2 has joined #commonlisp
gioyik has joined #commonlisp
ec_ has quit [Ping timeout: 276 seconds]
Guest85 has joined #commonlisp
ec_ has joined #commonlisp
Lycurgus has quit [Quit: Exeunt]
tyson2` has joined #commonlisp
tyson2 has quit [Ping timeout: 252 seconds]
ec_ has quit [Ping timeout: 276 seconds]