p_l changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | ASDF 3.3.4
man213 has quit [Read error: Connection reset by peer]
man213 has joined #lisp
man213 has quit [Read error: Connection reset by peer]
man213 has joined #lisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
nowhere_man has joined #lisp
random-nick has quit [Ping timeout: 260 seconds]
man213 has quit [Read error: Connection reset by peer]
man213 has joined #lisp
zaquest has joined #lisp
shangul has joined #lisp
ebzzry has joined #lisp
ebzzry has quit [Read error: Connection reset by peer]
Oladon has joined #lisp
man213 has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<dlowe> So I'm poking at postmodern a bit for db stuff - does s-sql support SQL function calls?
<dlowe> I can't find any examples or reference on how it would work
benjamin-l has quit [Ping timeout: 240 seconds]
renzhi has quit [Ping timeout: 246 seconds]
lucasb has quit [Quit: Connection closed for inactivity]
<dlowe> never mind, I figured it out
benjamin-l has joined #lisp
pfdietz has quit [Ping timeout: 240 seconds]
ayuce has joined #lisp
asarch has joined #lisp
_whitelogger has joined #lisp
jonatack has quit [Ping timeout: 240 seconds]
torbo has joined #lisp
jonatack has joined #lisp
EvW has quit [Ping timeout: 240 seconds]
xlei has quit [Quit: ZNC - https://znc.in]
choegusung has joined #lisp
choegusung has quit [Client Quit]
zaquest has quit [Quit: Leaving]
zaquest has joined #lisp
bitmapper has quit [Ping timeout: 244 seconds]
anlsh has quit [Remote host closed the connection]
xlei has joined #lisp
ayuce has quit [Remote host closed the connection]
Oladon has quit [Quit: Leaving.]
remexre has joined #lisp
efm has quit [Ping timeout: 240 seconds]
efm has joined #lisp
CrazyPython has joined #lisp
Fare has joined #lisp
CrazyPyt_ has joined #lisp
CrazyPython has quit [Ping timeout: 244 seconds]
Josh_2 has quit [Ping timeout: 264 seconds]
meepdeew has joined #lisp
mono has joined #lisp
cyberoctopi has joined #lisp
monok has quit [Ping timeout: 260 seconds]
CrazyPyt_ has quit [Ping timeout: 244 seconds]
Bourne has quit [Ping timeout: 256 seconds]
Bourne has joined #lisp
cantstanya has quit [Remote host closed the connection]
Myk267 has quit [Quit: Leaving]
cosimone has quit [Quit: Quit.]
cantstanya has joined #lisp
Bourne has quit [Read error: Connection reset by peer]
ayuce has joined #lisp
wsinatra has joined #lisp
orivej has quit [Ping timeout: 256 seconds]
wsinatra has quit [Quit: WeeChat 2.8]
ebzzry has joined #lisp
turona has quit [Ping timeout: 272 seconds]
<beach> Good morning everyone!
ebzzry has quit [Client Quit]
meepdeew has quit [Ping timeout: 244 seconds]
Oladon has joined #lisp
cyberoctopi has quit [Ping timeout: 260 seconds]
meepdeew has joined #lisp
cyberoctopi has joined #lisp
meepdeew has quit [Client Quit]
ayuce has left #lisp ["ERC (IRC client for Emacs 28.0.50)"]
Bourne has joined #lisp
ayuce has joined #lisp
turona has joined #lisp
Bike has quit [Quit: leaving]
hiroaki has quit [Ping timeout: 256 seconds]
cyberoctopi has quit [Ping timeout: 246 seconds]
hiroaki has joined #lisp
<Oladon> I feel like I'm missing something... can I specialize a method on a typed array? I can do (typep foo (array (unsigned-byte 8))), but that doesn't seem to be a valid parameter specializer.
<Oladon> (er, insert a quote into the above, of course)
slyrus_ has joined #lisp
slyrus has quit [Ping timeout: 240 seconds]
<beach> Oladon: You can only specialize to classes, not general types.
<beach> Oladon: There are several libraries that can do what you want though.
ayuce has quit [Remote host closed the connection]
ayuce has joined #lisp
Guest35090 has joined #lisp
<aeth> It's going to be slower than a defgeneric/defmethod unless inline, though.
<aeth> And it can online inline based on type declarations, not type inference.
<aeth> s/online inline/only inline/
<aeth> Oladon: and it is probably actually called (simple-array (unsigned-byte 8) (*)) like e.g. (typep (make-array 2 :element-type '(unsigned-byte 8)) '(simple-array (unsigned-byte 8) (*)))
<aeth> That's incredibly verbose but there are shortcuts you can do, like using DEFTYPE to create your own short names, e.g. (deftype octet () `(unsigned-byte 8)) is pretty common
dtman34 has quit [Quit: ZNC 1.7.5 - https://znc.in]
dtman34 has joined #lisp
krid has quit [Ping timeout: 240 seconds]
<Oladon> Hrm, thanks aeth and beach
<Oladon> I shall pursue these options :)
<beach> Oladon: The system with classes was designed to be fast, it is going to be significantly slower to dispatch on arbitrary types. That might not be a problem for you of course. Just saying.
narimiran has joined #lisp
<beach> Am I understanding things right that the ELS presentations will be streamed, but that there is no audio nor video for the participants, including the presenters?
cyberoctopi has joined #lisp
<beach> ... so that Q&A will be through the associated "stream chat"?
<beach> I am guessing that this "stream chat" will allow neither my usual spell checker, nor my abbrevs.
<beach> That should be, er, amusing.
cyraxjoe has quit [Ping timeout: 256 seconds]
MightyJoe has joined #lisp
<no-defun-allowed> beach: You can access the twitch chat via IRC.
lxbarbosa has joined #lisp
<no-defun-allowed> Although, that is a bit messy, and really designed for running bots.
<beach> I'll just suffer without my usual tools.
<beach> I can't help wondering why people do this to themselves, though.
narimiran_ has joined #lisp
narimiran has quit [Read error: Connection reset by peer]
<beach> no-defun-allowed: Can you confirm that I have understood the format?
refusenick has quit [Read error: Connection reset by peer]
<no-defun-allowed> I think that is how twitch works, yes.
<beach> OK, thanks!
<no-defun-allowed> It is for the better for more popular streams with...people that have less need to be polite.
<beach> As an alternative to what. I am not part of the set of "cool kids", so I am not following such things. Too busy with my projects I guess.
vlatkoB has joined #lisp
cyberoctopi has quit [Ping timeout: 246 seconds]
Oladon has quit [Quit: Leaving.]
terpri has quit [Remote host closed the connection]
terpri has joined #lisp
<no-defun-allowed> It's frequently used to stream games to a lot of viewers, and gamers are very noisy. Having some thousands of them screaming into microphones would be sickening for everyone involved.
<beach> I see. Yes, I can very well imagine that.
<no-defun-allowed> Or, I guess, the fundamental difference is that it is a one-to-many streaming system, unlike "conferencing" software which is many-to-many.
<beach> Makes sense.
asarch has quit [Quit: Leaving]
gko has joined #lisp
dddddd has quit [Remote host closed the connection]
gravicappa has joined #lisp
Lycurgus has joined #lisp
keep_learning has quit [Quit: This computer has gone to sleep]
cyberoctopi has joined #lisp
keep_learning has joined #lisp
_paul0 has joined #lisp
paul0 has quit [Ping timeout: 265 seconds]
heisig has joined #lisp
Inline has joined #lisp
torbo has quit [Remote host closed the connection]
shifty has joined #lisp
KDr23 has joined #lisp
KDr22 has quit [Ping timeout: 265 seconds]
ayuce has quit [Remote host closed the connection]
Intensity has quit [Remote host closed the connection]
shka_ has joined #lisp
Inline has quit [Quit: Leaving]
Nilby` has joined #lisp
Nilby` has quit [Client Quit]
Nilby has joined #lisp
Inline has joined #lisp
pve has joined #lisp
jayspeer has joined #lisp
Lycurgus has quit [Quit: Exeunt]
v_m_v has joined #lisp
cyberoctopi has quit [Ping timeout: 260 seconds]
rgherdt has joined #lisp
jayspeer has quit [Ping timeout: 244 seconds]
dale has quit [Quit: My computer has gone to sleep]
cyberoctopi has joined #lisp
orivej has joined #lisp
lxbarbosa has quit [Remote host closed the connection]
rixard has quit [Remote host closed the connection]
rixard has joined #lisp
rixard has quit [Ping timeout: 240 seconds]
rwcom has joined #lisp
rogersm has joined #lisp
_whitelogger has joined #lisp
cyberoctopi has quit [Ping timeout: 240 seconds]
nika has joined #lisp
duncan_ has joined #lisp
rogersm has quit [Quit: rogersm]
rixard has joined #lisp
rixard has quit [Ping timeout: 260 seconds]
stepnem has quit [Ping timeout: 250 seconds]
stepnem has joined #lisp
Adamclisi has joined #lisp
cyberoctopi has joined #lisp
cyberoctopi has quit [Ping timeout: 260 seconds]
nowhere_man has quit [Read error: Connection reset by peer]
Guest35090 has quit [Read error: Connection reset by peer]
pi` has joined #lisp
rixard has joined #lisp
narimiran_ is now known as narimiran
rixard has quit [Ping timeout: 246 seconds]
rixard has joined #lisp
rixard has quit [Ping timeout: 244 seconds]
pi` has quit [Remote host closed the connection]
karlosz has quit [Quit: karlosz]
cyberoctopi has joined #lisp
cyberoctopi has quit [Ping timeout: 240 seconds]
random-nick has joined #lisp
karlosz has joined #lisp
dddddd has joined #lisp
Bourne has quit [Read error: Connection reset by peer]
rwcom has quit [Quit: Ping timeout (120 seconds)]
rwcom has joined #lisp
adam4567 has left #lisp ["ERC (IRC client for Emacs 26.3)"]
karlosz has quit [Quit: karlosz]
akoana has left #lisp ["Leaving"]
gxt has quit [Quit: WeeChat 2.8]
Lord_of_Life_ has joined #lisp
cyberoctopi has joined #lisp
Lord_of_Life has quit [Ping timeout: 240 seconds]
Lord_of_Life_ is now known as Lord_of_Life
cyberoctopi has quit [Ping timeout: 260 seconds]
cyberoctopi has joined #lisp
narimiran has quit [Ping timeout: 244 seconds]
pfdietz has joined #lisp
ebrasca has joined #lisp
cyberoctopi has quit [Ping timeout: 260 seconds]
ggole has joined #lisp
Bourne has joined #lisp
jonatack has quit [Ping timeout: 260 seconds]
jonatack has joined #lisp
msk has quit [Remote host closed the connection]
msk has joined #lisp
ramHero has joined #lisp
scymtym_ has quit [Quit: ERC (IRC client for Emacs 28.0.50)]
scymtym has joined #lisp
scymtym_ has joined #lisp
scymtym has quit [Ping timeout: 240 seconds]
cyberoctopi has joined #lisp
catalinbostan has joined #lisp
ramHero has quit [Ping timeout: 265 seconds]
SGASAU has quit [Remote host closed the connection]
cyberoctopi has quit [Ping timeout: 260 seconds]
SGASAU has joined #lisp
scymtym_ has quit [Read error: Connection reset by peer]
scymtym has joined #lisp
Achylles has joined #lisp
Josh_2 has joined #lisp
rawr has quit [Quit: They're putting dbus in the kernel. For fairness, I want a Java RMI registry in the linux kernel too. dont @ me]
rawr has joined #lisp
EvW has joined #lisp
catalinbostan has quit [Quit: Textual IRC Client: www.textualapp.com]
jonatack has quit [Ping timeout: 240 seconds]
_heisig has joined #lisp
jonatack has joined #lisp
jprajzne has quit [Quit: jprajzne]
heisig has quit [Ping timeout: 246 seconds]
jprajzne has joined #lisp
_heisig has quit [Client Quit]
Bike has joined #lisp
v_m_v has quit [Remote host closed the connection]
jprajzne has quit [Client Quit]
jprajzne has joined #lisp
ayuce has joined #lisp
rogersm has joined #lisp
rixard has joined #lisp
izh_ has joined #lisp
rwcom has quit [Quit: Ping timeout (120 seconds)]
rwcom has joined #lisp
rixard has quit [Ping timeout: 260 seconds]
man213 has joined #lisp
man213 has quit [Client Quit]
rogersm has quit [Remote host closed the connection]
Inline has quit [Ping timeout: 265 seconds]
rogersm has joined #lisp
rogersm has quit [Client Quit]
hiroaki has quit [Remote host closed the connection]
Inline has joined #lisp
hiroaki has joined #lisp
keep_learning has quit [Quit: This computer has gone to sleep]
v_m_v has joined #lisp
bars0 has joined #lisp
AmyWilleron has joined #lisp
nowhere_man has joined #lisp
AmyWilleron has quit [Client Quit]
catalinbostan has joined #lisp
arseniusz has joined #lisp
ljavorsk has joined #lisp
efm has quit [Remote host closed the connection]
efm has joined #lisp
rixard has joined #lisp
rixard has quit [Ping timeout: 260 seconds]
ljavorsk has quit [Remote host closed the connection]
ljavorsk has joined #lisp
cyberoctopi has joined #lisp
cyberoctopi has quit [Ping timeout: 260 seconds]
ljavorsk has quit [Ping timeout: 260 seconds]
arseniusz has quit [Ping timeout: 240 seconds]
francogrex has joined #lisp
<francogrex> hi I am trying to sort this list (sort '((1 "spade") (2 "heart") (3 "spade") (4 "heart") (12 "heart") (6 "heart") (2 "spade")) #'string<= :key #'cadr)
<Bike> sort can mutate the sequence, so you can't pass it a quoted list like that.
<francogrex> i would like however to sort first on the cadr and then on the car, so that i have: ((1 "spade") (2 "spade") (3 "spade") (2 "heart") (4 "heart") (6 "heart") (12 "heart"))
<francogrex> Bike: yes I know this is a sample, not the code that will be finally used, the issue is what I wrote next
<beach> francogrex: Use stable-sort and sort first on the CAR then on the CADR.
<Bike> or you could pass a lexicographic predicate.
<beach> Or that.
Oladon has joined #lisp
msk has quit [Remote host closed the connection]
<francogrex>
<francogrex> (let* ((fst (stable-sort '((1 "spade") (2 "heart") (3 "spade") (4 "heart") (12 "heart") (6 "heart") (2 "spade")) #'<= :key #'car)) (sls (stable-sort fst #'string<= :key #'cadr))) sls)
<francogrex> not the desired effect :(
v_m_v has quit [Remote host closed the connection]
<francogrex> ((12 "heart") (6 "heart") (4 "heart") (2 "heart") (3 "spade") (2 "spade") (1 "spade"))
<beach> francogrex: You are still passing literal data to sort.
v_m_v has joined #lisp
msk has joined #lisp
<phoe> use (stable-sort (copy-list '(...)) ...)
<francogrex> beach, not the issue here
<francogrex> is it?
<beach> Maybe I got it the other way around with the two passes.
<phoe> issue or not, it's undefined behaviour
<phoe> it's hard to work with code that willingly invokes UB because implementations may do whatever at that point
<francogrex> yeah. anyway why am I getting the list reversed?
<francogrex> nope, inversing doesn't do the trick
<francogrex> (let* ((lst '((1 "spade") (2 "heart") (3 "spade") (4 "heart") (12 "heart") (6 "heart") (2 "spade")))
<francogrex> (fst (stable-sort lst #'string<= :key #'cadr))
<francogrex> (sls (stable-sort fst #'<= :key #'car)))
<francogrex> sls)
v_m_v has quit [Ping timeout: 260 seconds]
<phoe> francogrex: please use pastebin
<Grue`> though I guess it wouldn't work since you have two different predicates
bitmapper has joined #lisp
<francogrex> phoe, thanks but as you can see it's not what I asked for
<francogrex> ((1 "spade") (2 "spade") (3 "spade") ...
<beach> francogrex: You have several sketches of solutions. You just have to vary the parameters.
<beach> francogrex: Experiment a bit.
<francogrex> lisppaste is dead
<beach> It has been for a long time.
<francogrex> died long time ago and nobody revived it, although it was quite useful
ayuce has quit [Read error: Connection reset by peer]
nowhere_man has quit [Ping timeout: 240 seconds]
<pjb> francogrex: what don't you understand in the concept of nasal daemons?
<pjb> francogrex: use termbin.com; cat ~/bin/tb --> #!/bin/bash \n nc termbin.com 9999 | tr -d '\000'
<pjb>
<pjb>
<pjb>
<phoe> francogrex: one second then; you want to sort the second first
<francogrex> phoe yes please I am trying to dick around with the code you provided, it's like beach said
<Grue`> francogrex: you probably should just use bucket sort for suits and then sort each suit, it will be more efficient
efm has quit [Ping timeout: 244 seconds]
nowhere_man has joined #lisp
<phoe> Grue`: if we're talking even about a full deck of cards which is 52 elements then we could probably care little about efficiency
<pjb> francogrex: https://termbin.com/zfwi
<francogrex> phoe: 👍
<phoe> unless we're writing something that will sort cards for a living
<francogrex> that was supposed to be a thumbs up emoji ...
<phoe> it is, I can see it
<pjb> francogrex: unless you want: https://termbin.com/t252
<francogrex> ok :) on my emacs erc it's just garbled code... anyway yues thanks
<pjb> francogrex: but I would rather use a more specific lessp function!
<pjb> francogrex: https://termbin.com/397h
efm has joined #lisp
_jrjsmrtn has quit [Ping timeout: 240 seconds]
EvW has quit [Ping timeout: 244 seconds]
__jrjsmrtn__ has joined #lisp
<francogrex> pjb: what i got from phoe next was exactly what I needed. thx
ayuce has joined #lisp
shifty has quit [Ping timeout: 260 seconds]
francogrex has quit [Remote host closed the connection]
efm has quit [Ping timeout: 260 seconds]
ebrasca has quit [Remote host closed the connection]
efm has joined #lisp
Achylles has quit [Quit: Leaving]
bars0 has quit [Quit: leaving]
narimiran has joined #lisp
cyberoctopi has joined #lisp
cyberoctopi has quit [Ping timeout: 240 seconds]
ljavorsk has joined #lisp
scymtym_ has joined #lisp
scymtym has quit [Ping timeout: 246 seconds]
ljavorsk has quit [Ping timeout: 260 seconds]
EvW has joined #lisp
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
Fare has quit [Ping timeout: 260 seconds]
jprajzne has quit [Client Quit]
jprajzne has joined #lisp
rixard has joined #lisp
Lycurgus has joined #lisp
SGASAU has quit [Remote host closed the connection]
Inline has quit [Ping timeout: 265 seconds]
SGASAU has joined #lisp
SGASAU` has joined #lisp
Inline has joined #lisp
buffergn0me has joined #lisp
SGASAU has quit [Ping timeout: 260 seconds]
Fare has joined #lisp
<Oladon> slyrus_: Around? Wondering if you'd mind sharing your bytea code for clsql.
<Josh_2> How do I make a function available for a macro at compile time?
<Shinmera> define it in a separate compilation unit (file), or wrap it in (eval-when (:compile-toplevel :load-toplevel :execute) ...) and put it before the first macro use.
<Shinmera> *somewhere before
abhixec has joined #lisp
<Josh_2> Shinmera: is this correct? https://plaster.tymoon.eu/view/1779#1779
<Shinmera> no
<Josh_2> rip
<Shinmera> only the function needs to be in the eval-when.
<Josh_2> Okay thanks
<Josh_2> Got it
gareppa has joined #lisp
gareppa has quit [Remote host closed the connection]
<phoe> the macro can be in the eval-when (:always), it'll just have no effect
<phoe> so it's common to only put functions in there, and have macro definitions outside it
rippa has joined #lisp
<Shinmera> better to limit the scope of eval-when as much as possible.
<phoe> ^
Kundry_Wag has joined #lisp
<Oladon> phoe: Aha, it's you! Did you ever (~2018) get bytea working with clsql?
<phoe> Oladon: wait who where
<phoe> I don't remember this thing
<Oladon> Back in 2018 you were asking about the bytea column type in Postgres
<phoe> somewhere on github?
<Oladon> IRC
<Oladon> Lemme see if I left the log open
<phoe> can't remember, show me the logs
<Oladon> Bah, I misremembered. You were using Postmodern. https://irclog.whitequark.org/lisp/2018-04-08#21761747;
<phoe> sounds more like it
<phoe> and I know why that is the case
Kundry_Wag has quit [Ping timeout: 260 seconds]
<Oladon> ah
Guest35635 has left #lisp [#lisp]
SGASAU` has quit [Remote host closed the connection]
shifty has joined #lisp
Lycurgus has quit [Remote host closed the connection]
v_m_v has joined #lisp
cosimone has joined #lisp
Kundry_Wag has joined #lisp
Necktwi has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
Necktwi_ has quit [Ping timeout: 260 seconds]
gko has quit [Ping timeout: 260 seconds]
izh_ has quit [Quit: Leaving]
shangul has quit [Remote host closed the connection]
shangul has joined #lisp
jonatack has quit [Ping timeout: 246 seconds]
zulu-inuoe has joined #lisp
narimiran has quit [Quit: leaving]
jonatack has joined #lisp
efm has quit [Read error: Connection reset by peer]
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
efm has joined #lisp
Oladon has quit [Quit: Leaving.]
kpoeck has joined #lisp
karlosz has joined #lisp
jonatack has quit [Ping timeout: 244 seconds]
shangul has quit [Ping timeout: 244 seconds]
jonatack has joined #lisp
Fare has quit [Ping timeout: 246 seconds]
cyberoctopi has joined #lisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
Inline has quit [Ping timeout: 272 seconds]
vlatkoB has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
cyberoctopi has quit [Ping timeout: 260 seconds]
jonatack has quit [Quit: jonatack]
jonatack has joined #lisp
xkapastel has joined #lisp
SGASAU has joined #lisp
twelvemonkeys has quit [Ping timeout: 256 seconds]
rand_t has quit [Quit: rand_t]
twelvemonkeys has joined #lisp
buffergn0me has quit [Ping timeout: 240 seconds]
okflo has joined #lisp
cosimone has quit [Quit: Terminated!]
cosimone_ has joined #lisp
cosimone_ is now known as cosimone
buffergn0me has joined #lisp
okflo1 has joined #lisp
MerlinTheWizard has joined #lisp
RagnarDanneskjol has joined #lisp
SGASAU has quit [Remote host closed the connection]
jayde has joined #lisp
SGASAU has joined #lisp
okflo1 has left #lisp [#lisp]
okflo has quit [Quit: Leaving.]
okflo has joined #lisp
bars0 has joined #lisp
<MerlinTheWizard> Hey, sorry for the simple question, but I'm having trouble getting an answer from google...
<MerlinTheWizard> I just need to store a character in a variable in common lisp.
<MerlinTheWizard> If anyone could help me figure out how to do this, I'd appreciate it.
<luis> MerlinTheWizard: what have you tried so far?
<MerlinTheWizard> (let (charchar) '#\a
<MerlinTheWizard> charchar)
twelvemonkeys has quit [Ping timeout: 260 seconds]
<MerlinTheWizard> Oops, that didn't paste right
<MerlinTheWizard> (let (charchar) #\a
<lieven> (let ((charchar #\a)) charchar)
<MerlinTheWizard> charchar)
<luis> MerlinTheWizard: that let syntax is wrong. It should be (let ((var-name value)) ...)
Kundry_Wag has joined #lisp
<lieven> and chars are self evaluating so no need for the quote
<MerlinTheWizard> ok, could you explain the extra parenthesis please?
<luis> MerlinTheWizard: it's let's syntax.
twelvemonkeys has joined #lisp
<MerlinTheWizard> luis, yes. I would remember it better if I understood the reason for it.
<luis> MerlinTheWizard: well, you can define multiple variables (let ((var1 x) (var2 y)) ...) and so on.
<MerlinTheWizard> I mean I understand basically that it's differentiating something, I just don't know what.
<MerlinTheWizard> Ah, I see.
<luis> MerlinTheWizard: it's grouping multiple variable bindings
<MerlinTheWizard> Ok, I forgot let could do that.
<lieven> and they don't do (let (var1 val1 var2 val2 ...) ....) because you can also not supply an initial binding so (let ((val1 t) (val2 42) val3 (val4 nil)) ...) is possible
<MerlinTheWizard> ok
<_death> hmm weird.. planet.lisp.org does not respect Update-Insecure-Requests (and no HSTS).. it's also not on the HTTPS Everywhere list, had to add a rule
Kundry_Wag has quit [Ping timeout: 260 seconds]
<MerlinTheWizard> So is there a trick to learning the intricacies of common lisp syntax? Is it just 'keep going till you get it' or what?
Kundry_Wag has joined #lisp
<MerlinTheWizard> Maybe some exercises available online?
<luis> MerlinTheWizard: books like Practical Common Lisp help!
<MerlinTheWizard> luis, I'm reading that currently, feeling confused a lot...
pve has quit [Quit: leaving]
<MerlinTheWizard> I'm sure I'll get it. I guess I just have to persevere.
<saturn2> MerlinTheWizard: you could also use an editor that reminds you
<saturn2> or type (describe 'let) in the repl
Kundry_Wag has quit [Ping timeout: 240 seconds]
<MerlinTheWizard> saturn2, in my SLIME + SBCL in emacs (describe 'let) gives me this:
<MerlinTheWizard> LET ({(var [value]) | var}*) declaration* form*
<MerlinTheWizard> What do the curly braces mean? Does it just indicate an expression, or what?
<phoe> they mean that you can use any number of what's inside
CrazyPython has joined #lisp
<saturn2> the curly braces indicate a section that can be repeated
<phoe> or, in other words, that you can bind multiple variables in there
<phoe> (let ((x 42) (y :forty-two) (z 42.0) ...) ...)
<MerlinTheWizard> Oh, I see.
<MerlinTheWizard> but I was under the impression that the '*' was what indicated possible repetition. Do the braces just group and then the '*' indicates repetition, or what?
torbo has joined #lisp
<MerlinTheWizard> Oh, EBNF, I'll have to look at that.
<saturn2> yes, the braces just group, sorry
<MerlinTheWizard> Ok, good to know. Thanks.
<phoe> actually the wiki page says that {...} is repetition
<MerlinTheWizard> Really? What the heck is '*' then?
<phoe> the star in there seems like a pleonasm
<phoe> so it might be confusing
<MerlinTheWizard> phoe, so it's not really using EBNF?
<MerlinTheWizard> Can I set it to just give me EBNF somehow?
<phoe> it clearly attempts to, but I have no idea if it's 100% successful in compliance
<phoe> clhs let
<Bike> "set it"? it's just text.
kpoeck has quit [Remote host closed the connection]
<phoe> hah, CLHS does the same
<MerlinTheWizard> Maybe it's a different Backus-Naur, or a different notation?
<Bike> clhs 1.4.1.2
<saturn2> EBNF is just a convention, CLHS and SBCL use a slightly different version from the standard one
rogersm has joined #lisp
<saturn2> or the usual one, rather
<saturn2> since there's no real standard
rogersm has quit [Read error: Connection reset by peer]
rogersm has joined #lisp
lucasb has joined #lisp
rogersm has quit [Client Quit]
<MerlinTheWizard> Ok, so it looks like they all just use their own alternative to EBNF, but I guess they don't define it.
<Bike> well, practically speaking it's generally unambiguous for a human reader. like the LET page has a bunch of examples.
CrazyPython has quit [Read error: Connection reset by peer]
<MerlinTheWizard> Bike, I'm just not sure why someone would create a rigorous syntax and not fully describe it anywhere. So maybe it's not a rigorous, formal system at all?
kpoeck has joined #lisp
<MerlinTheWizard> So like a pseudo-grammar or something?
<Bike> it's not really that rigorous, no. the standard is intended for human readers and would not be suitable for formal use without a lot of work.
terpri has quit [Ping timeout: 244 seconds]
<MerlinTheWizard> Ok, well, I'll just do my best with what I've got then. Maybe I'll create my own hyperspec later once I get this stuff down.
<Bike> feel free to ask more questions about confusing points.
<saturn2> i suppose the main motivation for the difference is that usually EBNF uses parentheses for grouping, and that would be very inconvenient for describing lisp forms
<Bike> tru
terpri has joined #lisp
okflo has quit [Quit: WeeChat 2.8]
<MerlinTheWizard> Bike, thank you. I'm sure I will.
<MerlinTheWizard> saturn2, I was just going to make a similar comment.
<MerlinTheWizard> And it seems like EBNF was actually designed for human consumption to a certain extent: https://www.cl.cam.ac.uk/~mgk25/iso-14977-paper.pdf
<Bike> to be honest, i'd say the syntax is usually pretty simple. i mean, it is lisp. the confusing points there are declarations and lambda lists, and they both have specific pages explaining them.
<Bike> other than that there are only fairly minor irregularities, like restart-case.
<buffergn0me> LOOP is the worst offender.
<Bike> oh. right. also loop.
<Bike> i've gotten to the point i can usually figure anything out just by looking at the grammar, but that could just be stockholm syndrome
<MerlinTheWizard> Bike, CL syntax is confusing because analogous functions can differ in how arguments are ordered.
efm has quit [Read error: Connection reset by peer]
<MerlinTheWizard> Bike, Stockholm syndrome, that's funny.
<Bike> like elt and nth? are there other ones?
<Bike> i mean, elt and nth is definitely bad, though.
<MerlinTheWizard> I'm not sure, I'm a noob. But it's confusing to me so far and I still haven't got the syntax even halfway through PCL.
<MerlinTheWizard> Frustrating, but I'll figure it out.
<selwyn> aref and nth
<MerlinTheWizard> PCL should have been written better. I'm going to follow up with 'On Lisp'.
<Josh_2> wat
<Josh_2> what is confusing about (<fun name> <args>) ?
<phoe> On Lisp is actually an advanced book
<buffergn0me> Same. If I don't have SLIME giving the function signature in the message area, I have to go look up the argument order half the time
<phoe> Josh_2: please read the context
<Josh_2> reeeee
<Bike> function call syntax is easy, but macros and special operators are nontrivial.
<phoe> it's not about (<fun name> <args>), it's about <args> in this case
<phoe> and also what Bike said
<MerlinTheWizard> phoe, 'On Lisp' was recommended by a reviewer on amazon as a second lisp book.
cosimone has quit [Remote host closed the connection]
<MerlinTheWizard> Just looking at the table of contents, it looks very appropriate for me after PCL.
<phoe> hm, it sounds okay - it pays a lot of attention to Lisp macros
<Bike> there's also https://www.cs.cmu.edu/~dst/LispBook/book.pdf, which is intended for people new to programming. I haven't read it myself.
cosimone has joined #lisp
<MerlinTheWizard> Yes, I need about 100 pages of lisp macros...
<phoe> Gentle has a very very slow pace that might be frustrating for someone who's already programmed a bit
JessiStein has joined #lisp
<saturn2> it really should've been titled On Lisp Macros
<Josh_2> Bike: It's a very good introduction to programming
<Josh_2> Bike: it was my first programming book
<buffergn0me> I read A Gentle Introduction last year, 15 years after starting programming and Common Lisp. Learned a couple of things.
JessiStein has quit [Client Quit]
<selwyn> is the style of 'on lisp' typical of common lisp of that era, or is it just trying to be scheme? i am thinking about the emphasis on recursion in particular
pennTeller has joined #lisp
<Bike> so no, i don't think it's normal
pennTeller has left #lisp [#lisp]
MerlinTheWizard has quit [Ping timeout: 244 seconds]
<selwyn> thanks for link
shka_ has quit [Ping timeout: 244 seconds]
X-Scale has quit [Ping timeout: 265 seconds]
[X-Scale] has joined #lisp
bars0 has quit [Quit: leaving]
[X-Scale] is now known as X-Scale
ggole has quit [Quit: Leaving]
dale has joined #lisp
<Shinmera> getf/assoc/gethash.
<Shinmera> ah fuck, was scrolled up, sorry.
<Bike> oh, about argument order? you're right, though.
<Shinmera> yes.
CrunchyChewie has quit [Quit: ZNC 1.7.4 - https://znc.in]
<Grue`> i even mix up PUSH argument order all the time
v_m_v has quit [Remote host closed the connection]
v_m_v has joined #lisp
MerlinTheWizard has joined #lisp
man213 has joined #lisp
nika has quit []
gravicappa has quit [Ping timeout: 246 seconds]
<Grue`> is (boundp '*) guaranteed to be true even outside of REPL?
<Bike> Hm. I suppose not.
efm has joined #lisp
<phoe> clhs *
<Grue`> I'm thinking of defining a function with "&optional (some-arg *)" so that I can run it on previous REPL value but I wonder if it will freak out the compiler in some contexts
<phoe> nothing seems to explicitly require it
<Grue`> it says the initial value is "implementation-dependent" but doesn't say it can be unbound
<phoe> it says it's "maintained by the REPL", whatever it means
<phoe> nonetheless, I wouldn't do that; the REPL variables are supposed to stay in the REPL, and typing an additional " *" in the repl to turn (foo ...) into (foo ... *) seems cleaner and not much more effort-expensive to me
xkapastel has quit [Quit: Connection closed for inactivity]
corpix_ has quit [Quit: corpix_]
corpix has joined #lisp
<Bike> though the only way you're going to be outside a repl is something like --quit or in a different thread, in which case i don't know what (foo) would be expected to do anyway.
hiroaki has quit [Ping timeout: 240 seconds]
<Shinmera> I suppose stuff like --eval is also not necessarily 'in the repl'
<jmercouris> how to prevent format from printing shortened version of long list?
<jmercouris> you know how it does ... for very long things
<phoe> clhs *print-length*
<pjb> jmercouris: the default setting of the *print-…* variables is IMPLEMENTATION DEPENDENT!
<pjb> jmercouris: therefore you are advised to set them yourself in your rc files!
<jmercouris> I see
<jmercouris> thanks for the tips
<phoe> or to create your own with-* macro that mimics with-standard-io-syntax, except it has your own values for print-related dynavars (and possibly for read-related ones too)
efm has quit [Remote host closed the connection]
<pjb> Grue`: well, clhs * says that it has an initial-value that is implementation-dependent. I don't understand this to mean that it can be unbound.
<pjb> Grue`: notably, after (values) * is specified to be bound to nil, not to be unbound.
<pjb> Grue`: therefore I would think that it's conforming to expect it to be always bound.
<pjb> Grue`: but this doesn't say anything about what it's value is when you're outside of the repl, or if it's the form to be evaluated in the repl.
efm has joined #lisp
<jmercouris> turns out I had set it in my rc file and that was causingp roblems in my program
<jmercouris> so I let bound it to nil
<jmercouris> don't remember why I had done that
<jmercouris> probably didn't want masive lists printing in the REPL
<Bike> yeah, i have that in my rc for that reason.
v_m_v has quit [Remote host closed the connection]
MerlinTheWizard has quit [Remote host closed the connection]
MerlinTheWizard has joined #lisp
jprajzne has quit [Quit: jprajzne]
ayuce has left #lisp ["ERC (IRC client for Emacs 28.0.50)"]
<pjb> yes, of course, the advice of setting them in your rc files implies that you REMEMBER that you've set them and to what values…
Kundry_Wag has joined #lisp
efm has quit [Read error: Connection reset by peer]
<jmercouris> I know allegro and lisp works both have prolog extensions
<jmercouris> anyone have experience with them? what can one do more easily with an expert system in lisp?
<jmercouris> i’m looking for some inspiration
buffergn0me has quit [Ping timeout: 240 seconds]
duncan_ has quit [Ping timeout: 260 seconds]
<Bike> i know sjl's prolog was for game AI. not really an expert system, i guess
Jesin has quit [Quit: Leaving]
Kundry_Wag has quit [Ping timeout: 246 seconds]
Jesin has joined #lisp
<jmercouris> that gif is very irritating
<jmercouris> interesting project
<Bike> the ELS talk was cool too.
<jmercouris> maybe one could recreate clippy in prolog
<jmercouris> or bonzai buddy lol
kpgiskpg has joined #lisp
ayuce has joined #lisp
<kpgiskpg> Any suggestion for dealing with nickname conflicts between dependencies?
CrazyPython has joined #lisp
<phoe> kpgiskpg: RENAME-PACKAGE is working but ugly
<phoe> do you mean dependencies as in quicklisp systems?
<Shinmera> kpgiskpg: get the maintainers to change the names.
<kpgiskpg> Dependencies I've defined in my asdf file. When I try to load my package in slime, it errors out saying "Q is already a nickname for RTG-MATH.QUATERNIONS".
<phoe> kpgiskpg: ooh, so you control all the packages?
<phoe> if so, use package-local nicknames instead of standard nicknames
<kpgiskpg> Nope, I'm depending on 'cl-threadpool', which depends on 'queues'.
<phoe> PLNs are still a choice then
<phoe> AFAIR they're capable of shadowing standard nicknames
<kpgiskpg> That still applies if all of the nicknames are defined in my dependencies?
SGASAU has quit [Remote host closed the connection]
<phoe> you'll want to drop the global Q nickname from your package and instead locally nickname that package in the package that uses it
SGASAU has joined #lisp
<kpgiskpg> Wow, that is indeed ugly. I'll give it a shot, thanks.
<phoe> nah, it's the cleaner option
<phoe> mutating global state via RENAME-PACKAGE is the uglier option
<phoe> (defpackage foo (:use :cl) (:local-nicknames (:a :alexandria))) and suddenly I can do a:assoc-value
man213 has quit [Quit: Going offline, see ya! (www.adiirc.com)]
SGASAU has quit [Remote host closed the connection]
efm has joined #lisp
SGASAU has joined #lisp
jonatack has quit [Ping timeout: 244 seconds]
jonatack has joined #lisp
acolarh has quit [Ping timeout: 256 seconds]
CrazyEddy has joined #lisp
<kpgiskpg> Do you have an example to hand of how add-package-local-nickname and remove-package-local-nickname would be incorporated into an asdf file?
kamid has joined #lisp
cyberoctopi has joined #lisp
buffergn0me has joined #lisp
whiteline has quit [Ping timeout: 256 seconds]
abhixec has quit [Quit: leaving]
cyberoctopi has quit [Ping timeout: 246 seconds]
Fare has joined #lisp
whiteline has joined #lisp
akoana has joined #lisp
kpoeck has left #lisp [#lisp]
MerlinTheWizard has quit [Ping timeout: 240 seconds]
rgherdt has quit [Ping timeout: 260 seconds]
random-nick has quit [Ping timeout: 240 seconds]
MerlinTheWizard has joined #lisp
whiteline has quit [Ping timeout: 244 seconds]
acolarh has joined #lisp
zulu-inuoe has quit [Read error: Connection reset by peer]
whiteline has joined #lisp
zulu-inuoe has joined #lisp
cosimone has quit [Ping timeout: 240 seconds]
benjamin-l has quit [Ping timeout: 260 seconds]
lxbarbosa has joined #lisp
MerlinTheWizard has quit [Remote host closed the connection]
MerlinTheWizard has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
kpgiskpg has quit [Quit: Leaving]
Lord_of_Life has quit [Ping timeout: 260 seconds]
Lord_of_Life has joined #lisp
MerlinTheWizard has quit [Ping timeout: 240 seconds]
renzhi has joined #lisp
davsebam1e has quit [Ping timeout: 256 seconds]
orivej has quit [Ping timeout: 260 seconds]
cyberoctopi has joined #lisp
keep_learning has joined #lisp
lucasb has quit [Quit: Connection closed for inactivity]
cyberoctopi has quit [Ping timeout: 246 seconds]
davsebamse has joined #lisp
SGASAU has quit [Remote host closed the connection]