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/>
waleee has quit [Ping timeout: 255 seconds]
<hayley> With regards to masinter saying "CDR-coding was for when RAM was expensive", cache misses are also expensive.
irc_user has joined #commonlisp
molson has joined #commonlisp
tyson2 has joined #commonlisp
Oladon has quit [Quit: Leaving.]
Demosthenex has quit [Ping timeout: 240 seconds]
triffid has quit [Ping timeout: 268 seconds]
triffid has joined #commonlisp
Demosthenex has joined #commonlisp
pmwals092 has joined #commonlisp
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
sjl has quit [Ping timeout: 268 seconds]
anticomputer has joined #commonlisp
anticomputer_ has quit [Ping timeout: 268 seconds]
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
Common-Lisp has joined #commonlisp
karlosz has quit [Quit: karlosz]
mariari has quit [Ping timeout: 252 seconds]
irc_user has quit [Quit: Connection closed for inactivity]
mariari has joined #commonlisp
livoreno has quit [Ping timeout: 268 seconds]
pmwals092 has quit [Ping timeout: 268 seconds]
tyson2 has quit [Remote host closed the connection]
masinter has quit [Ping timeout: 268 seconds]
azimut has quit [Ping timeout: 268 seconds]
Dynom has joined #commonlisp
eddof13 has joined #commonlisp
asarch has quit [Quit: Leaving]
eddof13 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
masinter has joined #commonlisp
rgherdt has joined #commonlisp
rgherdt_ has quit [Remote host closed the connection]
ttree has quit [Ping timeout: 268 seconds]
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
SR-71 has quit [Remote host closed the connection]
pve has joined #commonlisp
ec has quit [Write error: Connection reset by peer]
ec has joined #commonlisp
_cymew_ has joined #commonlisp
aartaka has quit [Ping timeout: 252 seconds]
aartaka has joined #commonlisp
sander has quit [Ping timeout: 268 seconds]
aartaka has quit [Ping timeout: 252 seconds]
aartaka has joined #commonlisp
sander has joined #commonlisp
aartaka has quit [Ping timeout: 244 seconds]
anticomputer has quit [Remote host closed the connection]
ec has quit [Read error: Connection reset by peer]
anticomputer has joined #commonlisp
ec has joined #commonlisp
masinter_ has joined #commonlisp
masinter has quit [Ping timeout: 252 seconds]
shka has joined #commonlisp
puchacz has joined #commonlisp
causal has joined #commonlisp
sander has quit [Quit: So long! :)]
sander has joined #commonlisp
cage has joined #commonlisp
opal[m] has quit [Quit: You have been kicked for being idle]
_cymew_ has quit [Quit: Konversation terminated!]
masinter_ has quit [Ping timeout: 268 seconds]
_paul0 has joined #commonlisp
paul0 has quit [Remote host closed the connection]
aartaka has joined #commonlisp
McParen has joined #commonlisp
<McParen> hello, i'm looking for a way to destructuring-bind a string, does somebody know if there is known library for that? essentially I want to bind (a b &rest c) to "foo bar baz qux", to get a "foo" b "bar" and c "baz qux".
<hayley> I think you want to split the string, then destructuring-bind the resulting list.
<McParen> I want to split a string, but keep the &rest in a single variable.
<_death> the analogy doesn't quite hold up, and there are various implicit choices so it's doubtful that there's a library that does just that
<McParen> I think it will be some combination of split-sequence and subseq, or cl-ppcre, but it is always better to check if there is a common solution to that.
random-nick has joined #commonlisp
<_death> sometimes position and subseq suffice :)
ec has quit [Remote host closed the connection]
ec has joined #commonlisp
<McParen> I'd like to (re)use the lambda list parsing of destructuring-bind, including the &rest, &optional keywords and such.
aartaka has quit [Ping timeout: 268 seconds]
<McParen> what I essentially want is to pars user input (read as a single string), to be able to have a command, some parameters in between and then the free content at the end of the string.
<_death> well, when I read "destructuring-bind a string" I imagined something like (destructuring-bind (a b &rest c) (coerce string 'list) (setf c (coerce c 'string)) body) but you're looking for something more elaborate with regards to atoms or tokens
<McParen> I dont theink it is more elaborate, when i write it it looks kinda simple: (destructuring-bind-string (a b &rest c) "foo bar baz qux" (list a b c)) => ("foo" "bar" "baz qux")
<_death> it looks simple to you because you're making implicit choices
<pjb> McParen: the way to destructure a string is to use cl-ppcre:scan
<_death> that's one way.. it could be something that expands to (destructuring-bind (a b c) (coerce (nth-value 1 (ppcre:scan-to-strings "([^ ]*) ([^ ]*) (.*)" "foo bar baz qux")) 'list) (list a b c)) .. of course you need to define &optional semantics (and &key? what would that mean..)
<pjb> McParen: you can also read a string. (read-from-string (concatenate 'string "(" "foo bar baz qux" ")")) #| --> (foo bar baz qux) ; 18 |#
<pjb> McParen: but reading opens a whole another can of worms. Such as syntax error, or upcasing the symbol names.
<hayley> pjb: I'm sure packages and un-pwned computers will appreciate that one.
<McParen> pjb: reading the string is not what I tried to do, because that would parse the user input I want to keep unchanged (including spaces, etc).
<pjb> The scan the string yourself, or with cl-ppcre.
<McParen> i guess that is what i will have to do, but since i do not know ppcre well, i was trying to avoid dealing with regexps...
<_death> another thing is that d-bind can be deeper, so (destructuring-string-bind ((a b) c) "\"foo bar\" zot" (list a b c)) => ("foo" "bar" "zot") ?
MajorBiscuit has joined #commonlisp
aartaka has joined #commonlisp
triffid has quit [Ping timeout: 268 seconds]
MajorBiscuit has quit [Ping timeout: 268 seconds]
triffid has joined #commonlisp
<pjb> McParen: then you may parse yourself. eg. (destructuring-bind (a b c) (split-sequence:split-sequence #\space "foo bar baz") (list a b c)) #| --> ("foo" "bar" "baz") |#
nij- has joined #commonlisp
<McParen> pjb, I've come that far already, what i was looking for was: (destructuring-bind (a b &rest c) (split-sequence:split-sequence #\space "foo bar baz qux") (list a b c)) #| --> ("foo" "bar" "baz qux")
<McParen> I will get to that point too, but my hope was that somebody has done it already.
nij- has quit [Ping timeout: 244 seconds]
beach` has joined #commonlisp
beach has quit [Ping timeout: 268 seconds]
thuna` has joined #commonlisp
attila_lendvai has joined #commonlisp
jmdaemon has quit [Ping timeout: 244 seconds]
McParen has left #commonlisp [#commonlisp]
<minion> Remembered. I'll tell NotThatRPG when he/she/it next speaks.
<scymtym> minion: memo for NotThatRPG: what is best place to ask shop3 questions?
_paul0 has quit [Quit: Leaving]
son0p has joined #commonlisp
masinter_ has joined #commonlisp
pjb has quit [Ping timeout: 244 seconds]
azimut has joined #commonlisp
shka has quit [Quit: Konversation terminated!]
nij- has joined #commonlisp
nij- has left #commonlisp [#commonlisp]
shka has joined #commonlisp
causal has quit [Quit: WeeChat 3.6]
mrcom has quit [Ping timeout: 252 seconds]
mrcom has joined #commonlisp
pmwals091 has joined #commonlisp
pmwals091 has quit [Ping timeout: 252 seconds]
beach` is now known as beach
igemnace has joined #commonlisp
MajorBiscuit has joined #commonlisp
makomo has joined #commonlisp
ebrasca has joined #commonlisp
thuna` has quit [Ping timeout: 268 seconds]
tyson2 has joined #commonlisp
ahlk has quit [Remote host closed the connection]
orestarod has joined #commonlisp
Colere has quit [Ping timeout: 268 seconds]
Colere has joined #commonlisp
Furor has joined #commonlisp
Colere has quit [Ping timeout: 268 seconds]
orestarod has quit [Quit: Leaving]
ttree has joined #commonlisp
Furor is now known as Colere
rgherdt_ has joined #commonlisp
rgherdt has quit [Read error: Connection reset by peer]
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
<Shinmera> Well, McParen left, but I once wrote a utility that can do exactly what they wanted. OH WELL.
eddof13 has joined #commonlisp
eddof13 has quit [Client Quit]
eddof13 has joined #commonlisp
eddof13 has quit [Client Quit]
thuna` has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
eddof13 has joined #commonlisp
eddof13 has quit [Client Quit]
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 268 seconds]
Lord_of_Life_ is now known as Lord_of_Life
rgherdt has joined #commonlisp
rgherdt_ has quit [Read error: Connection reset by peer]
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
karlosz has joined #commonlisp
rgherdt_ has joined #commonlisp
rgherdt has quit [Read error: Connection reset by peer]
cage has quit [Quit: rcirc on GNU Emacs 27.1]
waleee has joined #commonlisp
tyson2 has joined #commonlisp
karlosz has quit [Quit: karlosz]
rgherdt_ is now known as rgherdt
Dynom has quit [Quit: WeeChat 3.6]
Devon has quit [Ping timeout: 244 seconds]
eddof13 has joined #commonlisp
juanzr has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
pjb has joined #commonlisp
eddof13 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
eddof13 has joined #commonlisp
tyson2 has joined #commonlisp
MajorBiscuit has quit [Quit: WeeChat 3.5]
MajorBiscuit has joined #commonlisp
justache has joined #commonlisp
masinter__ has joined #commonlisp
masinter_ has quit [Ping timeout: 268 seconds]
juanzr has quit [Ping timeout: 268 seconds]
juanzr has joined #commonlisp
puchacz has quit [Quit: Client closed]
eddof13 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
juanzr has quit [Ping timeout: 268 seconds]
juanzr has joined #commonlisp
frgo has quit [Remote host closed the connection]
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
psf has quit [Read error: Connection reset by peer]
thomaslewis has joined #commonlisp
pve has quit [Quit: leaving]
thomaslewis has left #commonlisp [#commonlisp]
gxt has quit [Ping timeout: 268 seconds]
gxt has joined #commonlisp
thomaslewis has joined #commonlisp
psf has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
livoreno has joined #commonlisp
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
karlosz has joined #commonlisp
azimut_ has joined #commonlisp
azimut has quit [Ping timeout: 268 seconds]
eddof13 has joined #commonlisp
psf has quit [Read error: Connection reset by peer]
shka has quit [Ping timeout: 268 seconds]
psf has joined #commonlisp
psf has quit [Read error: Connection reset by peer]
eddof13 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
psf has joined #commonlisp
Devon has joined #commonlisp
psf has quit [Read error: Connection reset by peer]
psf has joined #commonlisp
psf has quit [Read error: Connection reset by peer]
psf has joined #commonlisp
attila_lendvai has quit [Ping timeout: 268 seconds]
flip214 has quit [Read error: Connection reset by peer]
karlosz has quit [Quit: karlosz]
karlosz has joined #commonlisp
flip214 has joined #commonlisp
psf has quit [Read error: Connection reset by peer]
karlosz has quit [Client Quit]
psf has joined #commonlisp
MajorBiscuit has quit [Ping timeout: 268 seconds]
psf has quit [Read error: Connection reset by peer]
psf has joined #commonlisp
psf has quit [Read error: Connection reset by peer]
orestarod has joined #commonlisp
jmdaemon has joined #commonlisp
psf has joined #commonlisp
attila_lendvai has joined #commonlisp
attila_lendvai has quit [Ping timeout: 252 seconds]
psf has quit [Read error: Connection reset by peer]
orestarod has quit [Quit: Leaving]