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/>
bpanthi977 has quit [Remote host closed the connection]
bpanthi977 has joined #commonlisp
chomwitt has quit [Ping timeout: 276 seconds]
usagi_mimi has quit [Quit: WeeChat 4.5.2]
usagi_mimi has joined #commonlisp
ixelp has quit [Ping timeout: 244 seconds]
ixelp has joined #commonlisp
shawnw has joined #commonlisp
ixelp has quit [Ping timeout: 252 seconds]
surabax has quit [Quit: Leaving]
markb1 has quit [Ping timeout: 248 seconds]
ixelp has joined #commonlisp
X-Scale has quit [Ping timeout: 272 seconds]
shawnw has quit [Ping timeout: 252 seconds]
markb1 has joined #commonlisp
JuanDaugherty is now known as ColinRobinson
ixelp has quit [Ping timeout: 252 seconds]
lutherann has joined #commonlisp
ixelp has joined #commonlisp
ixelp has quit [Ping timeout: 268 seconds]
bpanthi977 has quit [Ping timeout: 260 seconds]
kevingal has quit [Remote host closed the connection]
aeth_ has joined #commonlisp
bpanthi977 has joined #commonlisp
aeth has quit [Quit: ...]
aeth has joined #commonlisp
aeth_ has quit [Quit: ...]
markb1 has quit [Ping timeout: 244 seconds]
admin- has quit [Quit: ZNC 1.9.1 - https://znc.in]
markb1 has joined #commonlisp
ixelp has joined #commonlisp
markb1 has quit [Ping timeout: 246 seconds]
random-nick has quit [Ping timeout: 252 seconds]
markb1 has joined #commonlisp
josrr has quit [Ping timeout: 246 seconds]
dinomug has joined #commonlisp
shawnw has joined #commonlisp
markb1 has quit [Ping timeout: 244 seconds]
decweb has quit [Quit: Konversation terminated!]
jonatack has joined #commonlisp
markb1 has joined #commonlisp
stanrifkin_ has joined #commonlisp
stanrifkin has quit [Ping timeout: 252 seconds]
markb1 has quit [Ping timeout: 276 seconds]
markb1 has joined #commonlisp
dinomug has quit [Ping timeout: 252 seconds]
surabax has joined #commonlisp
ColinRobinson has quit [Quit: praxis.meansofproduction.biz (juan@acm.org)]
markb1 has quit [Ping timeout: 245 seconds]
surabax has quit [Quit: Leaving]
markb1 has joined #commonlisp
markb1 has quit [Ping timeout: 248 seconds]
markb1 has joined #commonlisp
thuna` has quit [Ping timeout: 244 seconds]
khinsen has joined #commonlisp
Ruby has quit [Quit: ZNC - https://znc.in]
Ruby has joined #commonlisp
lutherann has quit [Quit: WeeChat 4.4.3]
mason has quit [Ping timeout: 260 seconds]
mason has joined #commonlisp
Guest47 has joined #commonlisp
chomwitt has joined #commonlisp
edgar-rft` has joined #commonlisp
chomwitt has quit [Ping timeout: 244 seconds]
Guest47 has quit [Quit: Textual IRC Client: www.textualapp.com]
edgar-rft has quit [Ping timeout: 260 seconds]
lutherann has joined #commonlisp
shka has joined #commonlisp
pve has joined #commonlisp
markb1 has quit [Ping timeout: 268 seconds]
markb1 has joined #commonlisp
istewart has quit [Quit: Konversation terminated!]
bpanthi977 has quit [Ping timeout: 268 seconds]
bpanthi977 has joined #commonlisp
Pixel_Outlaw has quit [Quit: Leaving]
cmack` has joined #commonlisp
cmack has quit [Ping timeout: 252 seconds]
mjoerg has joined #commonlisp
mjoerg has quit [Client Quit]
mgl has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 252 seconds]
Lord_of_Life has joined #commonlisp
mgl has quit [Ping timeout: 252 seconds]
attila_lendvai has joined #commonlisp
bjorkintosh has quit [Remote host closed the connection]
bjorkintosh has joined #commonlisp
khinsen has left #commonlisp [#commonlisp]
ecraven- has joined #commonlisp
ecraven- has quit [Remote host closed the connection]
ecraven- has joined #commonlisp
mwnaylor has quit [Ping timeout: 246 seconds]
ecraven- has quit [Quit: quit]
veqq has quit [Ping timeout: 248 seconds]
ecraven- has joined #commonlisp
X-Scale has joined #commonlisp
ecraven- has quit [Remote host closed the connection]
svm has joined #commonlisp
msv has quit [Ping timeout: 268 seconds]
bpanthi977 has quit [Ping timeout: 268 seconds]
ecraven has quit [Quit: quit]
ecraven has joined #commonlisp
ecraven has quit [Quit: quit]
ecraven has joined #commonlisp
ecraven has quit [Remote host closed the connection]
ecraven has joined #commonlisp
attila_lendvai has quit [Ping timeout: 252 seconds]
attila_lendvai has joined #commonlisp
TMA has quit [Ping timeout: 252 seconds]
random-nick has joined #commonlisp
mgl has joined #commonlisp
markb1 has quit [Ping timeout: 245 seconds]
markb1 has joined #commonlisp
GalaxyNova has quit [Ping timeout: 276 seconds]
Equill has joined #commonlisp
triffid has quit [Ping timeout: 264 seconds]
decweb has joined #commonlisp
mgl has quit [Ping timeout: 252 seconds]
svm is now known as msv
mosin has joined #commonlisp
zxcvz has joined #commonlisp
zxcvz has quit [Client Quit]
McParen has joined #commonlisp
cage has joined #commonlisp
mgl has joined #commonlisp
triffid has joined #commonlisp
mgl has quit [Ping timeout: 245 seconds]
markb1 has quit [Ping timeout: 252 seconds]
markb1 has joined #commonlisp
ixelp has quit [Ping timeout: 252 seconds]
shawnw has quit [Ping timeout: 268 seconds]
bpanthi977 has joined #commonlisp
McParen has left #commonlisp [#commonlisp]
ixelp has joined #commonlisp
bpanthi977 has quit [Ping timeout: 276 seconds]
mosin has quit [Remote host closed the connection]
vardhan__ has joined #commonlisp
kevingal has joined #commonlisp
mooseball has joined #commonlisp
TMA has joined #commonlisp
vardhan__ has quit [Quit: Leaving]
markb1 has quit [Ping timeout: 268 seconds]
markb1 has joined #commonlisp
shawnw has joined #commonlisp
Guest5501 has joined #commonlisp
mishoo has joined #commonlisp
chomwitt has joined #commonlisp
Guest47_ has joined #commonlisp
apac has joined #commonlisp
edline has joined #commonlisp
Guest47_ has quit [Quit: Textual IRC Client: www.textualapp.com]
chomwitt has quit [Ping timeout: 272 seconds]
<edline> Is (string-downcase 'foo) portable?
<beach> ::clhs string-downcase
<ixelp> CLHS: Function STRING-UPCASE, STRING-DOWNCASE...
<edline> https://www.lispworks.com/documentation/HyperSpec/Body/f_stg_up.htm says that the argument must be a string. So IIUC (string-downcase 'foo) is not portable. what do you think?
<ixelp> CLHS: Function STRING-UPCASE, STRING-DOWNCASE...
<beach> As you can see, the argument is a "string designator" and a symbols is a valid string designator.
<edline> what does this part in the documentation mean: "the string designator must be a string"?
<beach> No, it says that it has to be a string designator.
<edline> isn't it making the type more specific. like the type must be a string designator which must also be a string?
<beach> A string is a string designator, but so is a symbol or a character. But those two last ones are not allowed when the function modifies the argument.
<edline> oh, sorry, totally misunderstood that
<edline> "For nstring-upcase, nstring-downcase, and nstring-capitalize, the string designator must be a string." - this is the full sentence, so the "string" restriction applies to those 3 functions only.
<edline> thanks beach. this makes sense now
<beach> Pleasure.
shawnw has quit [Ping timeout: 252 seconds]
akoana has joined #commonlisp
apac has quit [Ping timeout: 244 seconds]
apa_c has joined #commonlisp
smlckz- has joined #commonlisp
smlckz- has quit [Changing host]
smlckz- has joined #commonlisp
bpanthi977 has joined #commonlisp
jonatack has quit [Ping timeout: 265 seconds]
yitzi has joined #commonlisp
bpanthi977 has quit [Ping timeout: 248 seconds]
veqq has joined #commonlisp
Guest47 has joined #commonlisp
edline has quit [Quit: Client closed]
akoana has quit [Quit: leaving]
akoana has joined #commonlisp
akoana has quit [Client Quit]
apa_c has quit [Ping timeout: 252 seconds]
spdegabrielle has joined #commonlisp
surabax has joined #commonlisp
surabax has quit [Changing host]
surabax has joined #commonlisp
apa_c has joined #commonlisp
X-Scale has quit [Ping timeout: 272 seconds]
Guest47 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
X-Scale has joined #commonlisp
khinsen has joined #commonlisp
Guest47 has joined #commonlisp
mathrick has quit [Ping timeout: 260 seconds]
mi6x3m has joined #commonlisp
<mi6x3m> hey, can someone help me figure out why CFFI is suddenly complaining about cffi/libffi/libffi-types__grovel.c:7:10: fatal error: ffi.h: No such file or directory
chomwitt has joined #commonlisp
<mi6x3m> nvm libffi was missing
<skeemer> why some functions finish with -p when they return boolean and other just with p? (characterp #\x)
<skeemer> (alpha-char-p #\x)
<skeemer> (alphanumericp #\x)
<skeemer> (digit-char-p #\7)
<skeemer> (lower-case-p #\x)
<skeemer> (upper-case-p #\X)
<skeemer> or stringp
<skeemer> also would that be okay to name predicate functions with a "?" at the end as it happens in scheme?
<skeemer> also why is it logior and not logor?
<smlckz-> p means predicate. The convention is to append p for single word name, and -p for hyphen seperated multiple word name.
<ixelp> 6. Predicates
<smlckz-> i for inclusive? (in contrast to exclusive or..)
<yitzi> skeemer: The norm is "p" in CL, not ?
<gilberth> Yes. i is for inclusive.
<skeemer> yaha ok now i get it
khinsen has left #commonlisp [#commonlisp]
<skeemer> also how do i perform the equivalent of (take '(1 2 3 4) 2) ?
mi6x3m has quit [Remote host closed the connection]
<gilberth> What does it do?
<skeemer> (take '(1 2 3 4 5) 2) ;; '(1 2)
<skeemer> > (take 'non-list 0) ;;'()
<gilberth> I'm not aware of such a thing. Roll your own.
<ski> why the latter ?
<gilberth> It appears to take n CDRs until n is reach or an atom is hit.
<yitzi> subseq maybe?
<skeemer> ski: it was just in the docs of racket...
<gilberth> Yes, SUBSEQ would work for the sane case. ,(subseq '(1 2 3 4 5) 0 2) but ,(subseq '(1) 0 2) and ,(subseq "hello" 0 2)
<ixelp> (subseq '(1 2 3 4 5) 0 2) => (1 2) and (subseq '(1) 0 2) ERROR: Bad interval for sequence operation on (1) : start = 0, end = 2 finally (subseq "hello" 0 2) => "he"
<yitzi> Yeah, well `(take 'non-list 0)` just seems dumb
<ski> skeemer : afaik, SRFI-1 mandates that your second example should give back that non-list, not an empty list
<gilberth> If one insists, how about (defun take (list n) (loop repeat n while (consp list) collect (pop list)))
<gilberth> ski: Oh, so my approach won't work.
<ski> er, no. sorry, thinko. but it doesn't seem to mandate what should happen, when the given number exceeds the number of CONSes in the chain
<yitzi> Yes, if you want to roll your own. I'd be pleasantly suprised if LOOP was faster then SUBSEQ.
<gilberth> UB? Making coffee?
<ski> preumably it's allowed to return an unspecified value, in this case
khinsen has joined #commonlisp
<skeemer> subseq seems cool enough
<gilberth> yitzi: I would be surprised otherwise. Though I think time would be dominated by consing anyway.
<yitzi> You could also probably use BUTLAST, but you'd need to call LENGTH first and would probably result in interating through the list twice.
bpanthi977 has joined #commonlisp
khinsen has left #commonlisp [#commonlisp]
<gilberth> Almost as silly as (defun take (list n) (reverse (last (reverse list) n)))
waleee has joined #commonlisp
<gilberth> Another option: (defun take (list n) (ldiff list (nthcdr n list)))
skeemer has quit [Quit: WeeChat 4.5.2]
<gilberth> Which should actually be about fair.
skeemer has joined #commonlisp
<decweb> (loop for i in '(1 2 3 4 5) repeat 2 collect i)
<decweb> ;; take
<skeemer> thank you
<skeemer> i liked the subseq
stanrifkin_ has quit [Quit: Leaving]
X-Scale has quit [Ping timeout: 272 seconds]
apa_c has quit [Ping timeout: 265 seconds]
Equill has quit [Ping timeout: 244 seconds]
shawnw has joined #commonlisp
stanrifkin has joined #commonlisp
Pixel_Outlaw has joined #commonlisp
mooseball has quit [Quit: Leaving]
Equill has joined #commonlisp
chomwitt has quit [Ping timeout: 260 seconds]
bpanthi977 has quit [Ping timeout: 268 seconds]
bpanthi977 has joined #commonlisp
zwr has quit [Read error: Connection reset by peer]
mishoo has quit [Ping timeout: 272 seconds]
josrr has joined #commonlisp
zwr has joined #commonlisp
bpanthi977 has quit [Remote host closed the connection]
bpanthi977 has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 30.1]
Adoz has joined #commonlisp
yitzi has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
bpanthi977 has quit [Ping timeout: 260 seconds]
bpanthi977 has joined #commonlisp
bpanthi977 has quit [Ping timeout: 252 seconds]
bpanthi977 has joined #commonlisp
remexre has quit [Remote host closed the connection]
mgl has joined #commonlisp
bpanthi977 has quit [Remote host closed the connection]
bpanthi977 has joined #commonlisp
GalaxyNova has joined #commonlisp
bpanthi977 has quit [Remote host closed the connection]
bpanthi977 has joined #commonlisp
molson has quit [Quit: Leaving]
Guest47 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
chomwitt has joined #commonlisp
mathrick has joined #commonlisp
skin has joined #commonlisp
kevingal has quit [Ping timeout: 268 seconds]
bpanthi977 has quit [Ping timeout: 245 seconds]
bpanthi977 has joined #commonlisp
JuanDaugherty has joined #commonlisp
shka has quit [Quit: Konversation terminated!]
Equill has quit [Ping timeout: 252 seconds]
pve has quit [Quit: leaving]
istewart has joined #commonlisp
bpanthi977 has quit [Ping timeout: 252 seconds]
bpanthi977 has joined #commonlisp
jonatack has joined #commonlisp
apac has joined #commonlisp
Adoz has quit [Ping timeout: 264 seconds]
mala has quit [Quit: ZNC 1.6.1 - http://znc.in]
bpanthi977 has quit [Ping timeout: 252 seconds]
mala has joined #commonlisp
kevingal has joined #commonlisp
skin has quit [Ping timeout: 252 seconds]
bpanthi977 has joined #commonlisp
yaneko has quit [Quit: parting]
yaneko has joined #commonlisp
jonatack has quit [Ping timeout: 252 seconds]
X-Scale has joined #commonlisp
mgl has quit [Ping timeout: 248 seconds]
chomwitt has quit [Ping timeout: 245 seconds]
waleee has quit [Ping timeout: 252 seconds]
stanrifkin has quit [Quit: Leaving]
spdegabrielle has quit [Quit: Connection closed for inactivity]
X-Scale has quit [Ping timeout: 272 seconds]
kevingal has quit [Ping timeout: 272 seconds]
decweb has quit [Quit: Konversation terminated!]
decweb has joined #commonlisp
remexre has joined #commonlisp
skeemer has quit [Ping timeout: 252 seconds]
gooba has quit [Remote host closed the connection]
gooba has joined #commonlisp
JuanDaugherty has quit [Quit: praxis.meansofproduction.biz (juan@acm.org)]