phoe 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/>
karlosz has quit [Ping timeout: 272 seconds]
orestarod has quit [Ping timeout: 260 seconds]
Oladon has joined #commonlisp
s-liao has joined #commonlisp
luna-is-here_ has quit [Remote host closed the connection]
luna-is-here has joined #commonlisp
rdrg109_ is now known as rdrg109
unyu has quit [Quit: WeeChat 3.4]
Krystof has quit [Ping timeout: 256 seconds]
zacque has joined #commonlisp
s-liao has quit [Ping timeout: 256 seconds]
asen has joined #commonlisp
unyu has joined #commonlisp
kevingal has quit [Remote host closed the connection]
eddof13 has joined #commonlisp
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
asen has quit [Quit: Leaving]
jealousmonk has joined #commonlisp
Oladon has quit [Quit: Leaving.]
igemnace has quit [Remote host closed the connection]
scymtym has quit [Remote host closed the connection]
igemnace has joined #commonlisp
<hashfuncadb> clhs #:
s-liao has joined #commonlisp
igemnace has quit [Read error: Connection reset by peer]
pjb has quit [Ping timeout: 256 seconds]
etimmons has quit [Ping timeout: 240 seconds]
etimmons has joined #commonlisp
<hashfuncadb> how can i get this behavior to work (in pseudo-code): (print `(#:,(make-symbol "sym"))) --> (#:SYM)
<hashfuncadb> instead, i'm given the output: (print `(#:,(make-symbol "sym"))) --> (#:|| #:|sym|)
unyu has quit [Quit: brb]
igemnace has joined #commonlisp
<White_Flame> make-symbol already returns an uninterned symbol
<White_Flame> #: and ,(make-symbol ..) are 2 separate symbols in your syntax
unyu has joined #commonlisp
<White_Flame> *the results of...
eddof13 has joined #commonlisp
aeth has quit [Ping timeout: 272 seconds]
<hashfuncadb> White_Flame: ok that makes sense. i'll try something different real quick
aeth has joined #commonlisp
s-liao has quit [Quit: Client closed]
<hashfuncadb> i tried: (print `(#:,(read-from-string "sym"))) --> (#:|| SYM)
<hashfuncadb> i don't understand what ... || ... is and why it's in the resulting list
<hashfuncadb> clhs ||
<specbot> Couldn't find anything for ||.
<White_Flame> I think you need to get some more basics down here
<White_Flame> pipes are escapes for symbol names when it's not a simply READable name
<White_Flame> eg spaces, breaking punctuation, and differently-cased letters
<White_Flame> so || is a symbol with a 0-length name
Bike has quit [Quit: Lost terminal]
<hashfuncadb> White_Flame: so in other words: ... #: = || whilst ... #:sym = SYM ?
Bike has joined #commonlisp
s-liao has joined #commonlisp
<hashfuncadb> if that's the case, i still don't understand why ... (print `(#:,(read-from-string "sym"))) ... isn't reduced to ... (print `(#:,(read-from-string "sym"))) => (print '(#:sym)) =? (#:SYM)
igemnace has quit [Remote host closed the connection]
<White_Flame> right, the colon is a prefix that the symbol tokenizer looks for
<hashfuncadb> White_Flame: that makes sense now. thanks! i got it to work using this strategy: (read-from-string (concatenate 'string "#:" "sym")) --> #:SYM
<White_Flame> I already said, #: and ,(read.. are two different forms
<White_Flame> comma is a terminating character, just like parens, quotes, etc
<White_Flame> well, that's one way to do it. remember that READ functions can be dangerous
<White_Flame> if the 2nd string isn't "sym" but " #.(format c: lol)" ...
igemnace has joined #commonlisp
<hashfuncadb> White_Flame: ok, thanks for the teaching/help
<White_Flame> I don't know what the extent is of what you're doing, but (make-symbol (string-upcase <foo>)) makes more sense
<White_Flame> (assuming that the read case is upper)
s-liao has quit [Ping timeout: 256 seconds]
Inline__ has joined #commonlisp
Inline has quit [Ping timeout: 245 seconds]
s-liao has joined #commonlisp
random-nick has quit [Ping timeout: 256 seconds]
Guest74 has joined #commonlisp
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
waleee has quit [Ping timeout: 240 seconds]
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack has joined #commonlisp
hashfuncadb has quit [Ping timeout: 240 seconds]
jgart has quit [Quit: Gateway shutdown]
<beach> Good morning everyone!
cjb has quit [Quit: rcirc on GNU Emacs 29.0.50]
jgart has joined #commonlisp
s-liao has quit [Quit: Client closed]
semz_ has joined #commonlisp
semz has quit [Ping timeout: 250 seconds]
s-liao has joined #commonlisp
jealousmonk has quit [Quit: ERC 5.4.1 (IRC client for GNU Emacs 27.1)]
Bike has quit [Quit: Connection closed]
whereiseveryone has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
paul0 has joined #commonlisp
Oladon has joined #commonlisp
yottabyte has quit [Quit: Connection closed for inactivity]
lisp123 has joined #commonlisp
aartaka has joined #commonlisp
azimut_ has quit [Remote host closed the connection]
azimut has joined #commonlisp
<jmes> Morning beach
Oladon has quit [Quit: Leaving.]
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
dre has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
aartaka has quit [Ping timeout: 256 seconds]
aartaka has joined #commonlisp
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
lisp123 has joined #commonlisp
eddof13 has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
scymtym has joined #commonlisp
semz_ is now known as semz
hashfunc1040 has joined #commonlisp
Cymew has joined #commonlisp
<hashfunc1040> is there a way to tell FORMAT to print tabs?
<hashfunc1040> meaning, i have a form that contains tabs, but when formatted as a string using FORMAT, they are converted to tabs
<hashfunc1040> sorry... *they are converted to spaces
aeth_ has joined #commonlisp
aeth has quit [Killed (NickServ (GHOST command used by aeth_))]
aeth_ is now known as aeth
<flip214> hashfunc1040: (format t "~c" #\Tab)
<hashfunc1040> flip214: i'm not representing my question accurately
<flip214> ah, sorry. (format t "~a" #\Tab)
<hashfunc1040> and i can't show an example because my irc client won't let me copy and paste tabs for some reason
<flip214> hashfunc1040: no, I understand what you mean. indentation doesn't use tabs, AFAIK.
<flip214> you'd need to do a search-and-replace run afterwards.
<hashfunc1040> flip214: thanks. yeah looks like i just need to change an emacs setting
s-liao has quit [Ping timeout: 256 seconds]
hashfunc1040 has quit [Remote host closed the connection]
karlosz has joined #commonlisp
aartaka has quit [Ping timeout: 256 seconds]
lisp123 has joined #commonlisp
aartaka has joined #commonlisp
aartaka has quit [Ping timeout: 240 seconds]
lisp123 has quit [Ping timeout: 240 seconds]
aartaka has joined #commonlisp
dre has quit [Quit: Leaving]
aartaka has quit [Ping timeout: 250 seconds]
frgo has quit [Ping timeout: 256 seconds]
aartaka has joined #commonlisp
s-liao has joined #commonlisp
alvaro121 has quit [Ping timeout: 256 seconds]
alvaro121 has joined #commonlisp
aartaka has quit [Ping timeout: 256 seconds]
zacque has quit [Quit: Goodbye :D]
pjb has joined #commonlisp
aartaka has joined #commonlisp
aartaka has quit [Ping timeout: 272 seconds]
aartaka has joined #commonlisp
aartaka has quit [Ping timeout: 240 seconds]
aartaka has joined #commonlisp
shka has joined #commonlisp
mingus has joined #commonlisp
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Krystof has joined #commonlisp
s-liao has quit [Ping timeout: 256 seconds]
mgl has joined #commonlisp
lisp123 has joined #commonlisp
|smlckz| has quit [Quit: WeeChat 3.2.1]
pranshukhandal has quit [Quit: the lounge - https://webirc.envs.net]
hhdave has quit [Ping timeout: 252 seconds]
pranshukhandal has joined #commonlisp
attila_lendvai has joined #commonlisp
Dynom has joined #commonlisp
mogan90 has quit [Ping timeout: 252 seconds]
hhdave has joined #commonlisp
scymtym has quit [Remote host closed the connection]
hhdave has quit [Ping timeout: 256 seconds]
hhdave has joined #commonlisp
cosimone has joined #commonlisp
hhdave has quit [Ping timeout: 256 seconds]
hhdave has joined #commonlisp
attila_lendvai has quit [Ping timeout: 245 seconds]
s-liao has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
shka has quit [Ping timeout: 272 seconds]
dirtcastle has joined #commonlisp
szkl has joined #commonlisp
mogan90 has joined #commonlisp
dirtcastle has quit [Read error: Connection reset by peer]
<Josh_2> Good Morning
dirtcastle has joined #commonlisp
s-liao has quit [Ping timeout: 256 seconds]
karlosz has quit [Ping timeout: 256 seconds]
dirtcastle has quit [Read error: Connection reset by peer]
dirtcastle has joined #commonlisp
s-liao has joined #commonlisp
s-liao has quit [Client Quit]
hirez has quit [Quit: Later]
scymtym has joined #commonlisp
lisp123 has joined #commonlisp
attila_lendvai has joined #commonlisp
dirtcastle has quit [Ping timeout: 272 seconds]
hirez has joined #commonlisp
dirtcastle has joined #commonlisp
hirez has quit [Quit: Later]
|smlckz| has joined #commonlisp
attila_lendvai has quit [Ping timeout: 250 seconds]
aartaka has quit [Ping timeout: 272 seconds]
aartaka has joined #commonlisp
frgo has joined #commonlisp
dirtcastle has quit [Read error: Connection reset by peer]
dirtcastle has joined #commonlisp
mogan90 has quit [Ping timeout: 260 seconds]
frgo has quit [Ping timeout: 272 seconds]
dirtcastle has quit [Ping timeout: 240 seconds]
frgo has joined #commonlisp
dirtcastle has joined #commonlisp
dongdigua has joined #commonlisp
Josh_2 has quit [Ping timeout: 240 seconds]
hhdave has quit [Ping timeout: 240 seconds]
frgo has quit [Ping timeout: 272 seconds]
dirtcastle has quit [Ping timeout: 260 seconds]
hhdave has joined #commonlisp
frgo has joined #commonlisp
pillton has quit [Quit: ERC (IRC client for Emacs 27.2)]
dirtcastle has joined #commonlisp
dirtcastle has quit [Read error: Connection reset by peer]
frgo has quit [Ping timeout: 240 seconds]
dirtcastle has joined #commonlisp
aartaka has quit [Ping timeout: 260 seconds]
aartaka has joined #commonlisp
dirtcastle has quit [Ping timeout: 252 seconds]
lisp123 has quit [Remote host closed the connection]
dirtcastle has joined #commonlisp
dirtcastle has quit [Read error: Connection reset by peer]
dirtcastle has joined #commonlisp
dongdigua has quit [Remote host closed the connection]
nature has joined #commonlisp
hirez has joined #commonlisp
random-nick has joined #commonlisp
dirtcastle has quit [Read error: Connection reset by peer]
dirtcastle has joined #commonlisp
aartaka has quit [Ping timeout: 256 seconds]
hirez has quit [Quit: Later]
lisp123 has joined #commonlisp
aartaka has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
dirtcastle has quit [Read error: Connection reset by peer]
dirtcastle has joined #commonlisp
aartaka has quit [Ping timeout: 245 seconds]
dirtcastle has quit [Read error: Connection reset by peer]
dirtcastle has joined #commonlisp
aartaka has joined #commonlisp
jeffrey has joined #commonlisp
aartaka has quit [Ping timeout: 256 seconds]
zacque has joined #commonlisp
dirtcastle has quit [Read error: Connection reset by peer]
dirtcastle has joined #commonlisp
s-liao has joined #commonlisp
aartaka has joined #commonlisp
tyson2 has joined #commonlisp
wacki has joined #commonlisp
Brucio-61 has joined #commonlisp
Brucio-61 has quit [Remote host closed the connection]
dirtcastle has quit [Read error: Connection reset by peer]
dirtcastle has joined #commonlisp
dirtcastle has quit [Read error: Connection reset by peer]
Brucio-61 has joined #commonlisp
lisp123 has joined #commonlisp
nature has quit [Ping timeout: 252 seconds]
lisp123 has quit [Ping timeout: 268 seconds]
hirez has joined #commonlisp
aartaka has quit [Ping timeout: 256 seconds]
yewscion has joined #commonlisp
hirez has quit [Ping timeout: 272 seconds]
mogan90 has joined #commonlisp
dirtcastle has joined #commonlisp
dirtcastle has quit [Read error: Connection reset by peer]
dirtcastle has joined #commonlisp
aartaka has joined #commonlisp
Bike has joined #commonlisp
aartaka has quit [Ping timeout: 240 seconds]
aartaka has joined #commonlisp
jeffrey has quit [Ping timeout: 250 seconds]
s-liao has quit [Ping timeout: 256 seconds]
dirtcastle has quit [Read error: Connection reset by peer]
dirtcastle has joined #commonlisp
hhdave has quit [Quit: hhdave]
hirez has joined #commonlisp
hhdave has joined #commonlisp
dirtcastle has quit [Remote host closed the connection]
VictorCarvalho[m has joined #commonlisp
euandreh has quit [Ping timeout: 240 seconds]
attila_lendvai has joined #commonlisp
mogan90 has quit [Remote host closed the connection]
jeffrey has joined #commonlisp
zacque has quit [Quit: Goodbye :D]
lisp123 has joined #commonlisp
yewscion has quit [Ping timeout: 240 seconds]
lisp123 has quit [Ping timeout: 272 seconds]
yottabyte has joined #commonlisp
|smlckz| has quit [Ping timeout: 240 seconds]
frgo has joined #commonlisp
splatt990 has joined #commonlisp
notzmv has quit [Ping timeout: 268 seconds]
ec_ has quit [Quit: ec_]
euandreh has joined #commonlisp
euandreh has quit [Ping timeout: 250 seconds]
Oladon has joined #commonlisp
silasfox has joined #commonlisp
waleee has joined #commonlisp
shka has joined #commonlisp
waleee has quit [Ping timeout: 252 seconds]
waleee has joined #commonlisp
ec has joined #commonlisp
jeffrey has quit [Quit: Client quit]
X-Scale` has joined #commonlisp
<utis> tried to run #'show-tag-headers from the id3 library in ``practical cl'', but after 16 files i got ``heap exhausted'' . . does that mean there's something wrong with the library?
X-Scale has quit [Ping timeout: 240 seconds]
X-Scale` is now known as X-Scale
ec has quit [Ping timeout: 240 seconds]
ec has joined #commonlisp
molson has quit [Quit: Leaving]
<beach> utis: Not necessarily.
<beach> utis: You may want to try with a larger heap. Is this SBCL?
<utis> yes
<beach> If so, you can increase the heap size when you start SBCL.
<beach> `sbcl --dynamic-space-size 10000' will give you 10GB rather than 1.
waleee has quit [Ping timeout: 252 seconds]
<utis> ah -- thanks
X-Scale` has joined #commonlisp
X-Scale has quit [Ping timeout: 256 seconds]
X-Scale` is now known as X-Scale
Cymew has quit [Ping timeout: 256 seconds]
<utis> and this can only be done at startup, right?
<beach> Yes, because of how their memory manager is written. But when I suggested that this was a silly limitation, I was told it's a feature.
<utis> did they supply an argument?
<beach> Something like "how else would you be able to control how much memory your application uses?". I was not up to arguing that the amount of memory used may depend on user data, so that you can't (and wouldn't want to) control it.
<White_Flame> yet python, javascript, etc all expand their heap with use. Not sure if the JVM started doing that, too
<beach> Wow, how do they control how much memory their applications use then?
<White_Flame> various thresholds as to when to run GC
<White_Flame> but crashing with out-of-memory because the default is too low is a terrible solution, IMO
<White_Flame> a memory heap limit should be optional
<beach> That was a tongue-in-cheek question.
<White_Flame> ah, ok :)
<beach> I mean, what SBCL does reminds me of the mainframes of the 1960s and 1970s where you had to give a memory limitation on one of the punch cards you put in before your "job".
<White_Flame> I suspect the main reason for sbcl was straightforwardness of implementation
<White_Flame> also, presumably a holdover from cmucl?
<beach> Yes, with respect to the GC techniques of the time.
Oladon has quit [Quit: Leaving.]
empwilli has quit [Quit: WeeChat 3.0]
Lord_Nightmare has quit [Quit: ZNC - http://znc.in]
Lord_Nightmare has joined #commonlisp
szkl has quit [Quit: Connection closed for inactivity]
<jackdaniel> beach: do you mean that an option to set memory limits for an application is silly? (or did I get that wrong?)
jeosol has joined #commonlisp
cage has joined #commonlisp
hhdave has quit [Quit: hhdave]
Oladon has joined #commonlisp
<Fade> I read the discussion to be constrasting a static fixed heap and a dynamic one.
<Fade> I suspect this feature dates back to a time when random access memory was very very expensive.
[smlckz] has joined #commonlisp
[smlckz] has quit [Changing host]
[smlckz] has joined #commonlisp
notzmv has joined #commonlisp
<Guest74> I remember when 1meg was $100.  Though that didn't compare to the 10meg hd for $10k
* Fade narrowly avoids falling into the infinite yak pen of normalizing all the metadata in his music collection
<Guest74> there's programs to do that at the press of a button.  None in cl that I know of.
unyu has quit [Quit: brb]
waleee has joined #commonlisp
mgl has quit [Quit: Client closed]
<Fade> there're programs that will do about 40% of that at the press of a button.
<Guest74> well, you can always write one that will do 100% of what you want.
<dbotton> My first HD was 5meg and cost me used $700
<Fade> the problem is not trivial, so while what you say is technically true, it is not practically true.
<Fade> but having that very discussion in my head almost lead me to yet another attempt to solve the halting problem.
<edgar-rft> replace all metadata by the string "meta data" - perfectly normalized
<Guest74> depends on how you approach it.  I find that having dividing things into the easy parts a computer can do, and some parts that require human intervention works well.
<Guest74> then when you're actually doing the human intervention it usually leads to a solution to make the computer do it.
hhdave has joined #commonlisp
unyu has joined #commonlisp
jealousmonk has joined #commonlisp
euandreh has joined #commonlisp
orestarod has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
NotThatRPG has quit [Ping timeout: 256 seconds]
ec has quit [Ping timeout: 240 seconds]
Oladon has quit [Quit: Leaving.]
joast has quit [Quit: Leaving.]
cyberbanjo has joined #commonlisp
cyberbanjo has quit [Remote host closed the connection]
kpoeck has joined #commonlisp
morganw has joined #commonlisp
cyberbanjo has joined #commonlisp
empwilli has joined #commonlisp
wacki has quit [Quit: Leaving.]
akoana has joined #commonlisp
NotThatRPG has joined #commonlisp
aartaka has quit [Ping timeout: 272 seconds]
aartaka has joined #commonlisp
unyu has quit [Quit: brb]
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 256 seconds]
IPmonger has joined #commonlisp
lispy has joined #commonlisp
IPmonger has quit [Remote host closed the connection]
Lord_of_Life_ is now known as Lord_of_Life
lispy has quit [Changing host]
lispy has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 27.1]
IPmonger has joined #commonlisp
IPmonger has quit [Remote host closed the connection]
ec has joined #commonlisp
lispy has quit [Quit: Leaving]
simendsjo has joined #commonlisp
Inline__ is now known as Inline
aartaka has quit [Ping timeout: 256 seconds]
aartaka has joined #commonlisp
unyu has joined #commonlisp
Oladon has joined #commonlisp
aartaka has quit [Ping timeout: 272 seconds]
aartaka has joined #commonlisp
silasfox has quit [Ping timeout: 240 seconds]
silasfox has joined #commonlisp
tane has joined #commonlisp
tane has joined #commonlisp
<CodeBitCookie[m]> Hello Everyone!
<CodeBitCookie[m]> I wanted to remove the nth char from a string
<CodeBitCookie[m]> It would be great if this were built-in, if it isn't, is it available in a library like alexandria or cl-str? If not, then just tell me a better way than (setf X (concatenate 'string (subseq X y z) (subseq X b c)))
<CodeBitCookie[m]> * It would be great if this were built-in, if it isn't, is it available in a library like alexandria or cl-str? If not, then just tell me a better way than:
<CodeBitCookie[m]> ``(setf X (concatenate 'string (subseq X y z) (subseq X b c)))``
aartaka has quit [Ping timeout: 240 seconds]
aartaka has joined #commonlisp
ec has quit [Ping timeout: 240 seconds]
<_death> (remove-if (constantly t) "abcd" :start 2 :count 1)
ec has joined #commonlisp
simendsjo has quit [Ping timeout: 256 seconds]
<CodeBitCookie[m]> _death: Wow, thanks!
<_death> of course you should make it into a function with a name like remove-nth, to make it easier for the reader of the code
kpoeck has quit [Quit: Client closed]
cosimone has quit [Quit: ERC (IRC client for Emacs 27.1)]
<pjb> CodeBitCookie[m]: (let ((s (make-array 6 :element-type 'character :initial-contents "Helllo" :adjustable t :fill-pointer 6))) (com.informatimago.common-lisp.cesarum.sequence:replace-subseq "" s 3 4) s) #| --> "Hello" |#
<pjb> Can also create a new sequence if the input is not adjustable: (com.informatimago.common-lisp.cesarum.sequence:replace-subseq "" "Helllo" 3 4) #| --> "Hello" |#
pillton has joined #commonlisp
Oladon has quit [Quit: Leaving.]
Dynom has quit [Quit: WeeChat 3.4]
kpoeck has joined #commonlisp
aartaka has quit [Ping timeout: 256 seconds]
tyson2 has joined #commonlisp
<yitzi> I'd like some longer package names ;)
wyrd has quit [Ping timeout: 240 seconds]
tyson2 has quit [Remote host closed the connection]
morganw has quit [Remote host closed the connection]
wyrd has joined #commonlisp
scymtym has quit [Ping timeout: 250 seconds]
Brucio-61 has quit [Ping timeout: 268 seconds]
tane has quit [Quit: Leaving]
random-nick has quit [Quit: quit]
<CodeBitCookie[m]> pjb: Nice way! Thanks.
robin has quit [Remote host closed the connection]
attila_lendvai has quit [Ping timeout: 250 seconds]
random-nick has joined #commonlisp
hashfuncadb has joined #commonlisp
tyson2 has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
Brucio-61 has joined #commonlisp
lisp123 has joined #commonlisp
scymtym has joined #commonlisp
shka has quit [Ping timeout: 252 seconds]
ec has quit [Ping timeout: 240 seconds]
lisp123 has quit [Remote host closed the connection]
tyson2 has joined #commonlisp
joast has joined #commonlisp
brandflake11 has joined #commonlisp
kpoeck has quit [Quit: Client closed]
<brandflake11> Hello all, I am reading ANSI Common Lisp by Paul Graham and learning about tail-recursion and was wondering: is a tail-recursion function generally faster than using the LOOP macro, or a DO?
<random-nick> execution speed depends on the implementations
<brandflake11> I see, so there's no hard and fast rule when it comes to this stuff?
<random-nick> well, I reckon that in most implementations it either compiles to the same code as LOOP or DO
<random-nick> or it's slower since it uses regular function calls
<brandflake11> random-nick: interesting...
<brandflake11> If that is the case, is there a reason why tail-recursion is emphasized in Paul Graham's books? I guess I can write some functions and test them to really find out
<random-nick> I haven't read that book but I presume it's either a stylistic preference or somehow more fitting for the book
<brandflake11> random-nick: I see, thanks for the help
<brandflake11> random-nick: I did do one test from the book, and it looks like the tail-recursion version of the function performed better than LOOP. The tail recursion version used 100 less cycles and took .000001 seconds less.
<brandflake11> I will have to do more tests though
<brandflake11> (And I'm still learning about optimization)
<brandflake11> Interestingly, I did another test with a much bigger piece of data, and it turned out LOOP destroyed the tail-recursion version.
<pillton> Tail call optimisation isn't required by common lisp implementations.
<Alfr> brandflake11, optimizing tail calls is not mandated by the spec, so you might run out of stack space.
<brandflake11> Alfr: Thank you for the heads up!
<brandflake11> It looks like sbcl has it.
<brandflake11> But that makes things interesting if I am making something for other common lisps
lisp123 has joined #commonlisp
<pillton> Someone should write a CDR to introduce a tail-call-optimisation feature. This subject arises enough times to warrant a FAQ entry.
<NotThatRPG> Also, even if your lisp has it, you need to check and make sure that the compilation settings are such that the optimization is applied.
lisp123 has quit [Ping timeout: 256 seconds]
NotThatRPG is now known as NotThatRPG_away
NotThatRPG_away has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<brandflake11> Do you all think it's silly to use tail-recursion when you can just use a LOOP?
pjb has quit [Read error: Connection reset by peer]
neominimum has quit [Ping timeout: 252 seconds]
pl has quit [Ping timeout: 252 seconds]
jcowan has quit [Read error: No route to host]
jcowan has joined #commonlisp
sveit has quit [Quit: Bye]
servytor has quit [Ping timeout: 252 seconds]
ullbeking_ has quit [Ping timeout: 252 seconds]
dbotton has quit [Ping timeout: 252 seconds]
neominimum has joined #commonlisp
servytor has joined #commonlisp
sveit has joined #commonlisp
dbotton has joined #commonlisp
pl has joined #commonlisp
ullbeking_ has joined #commonlisp
orestarod has quit [Ping timeout: 252 seconds]
karlosz has joined #commonlisp
parjanya has joined #commonlisp
<pillton> Well, if you use it, you need to ensure that the implementation supports it. The advised way of maintaining programs of that nature is to write some code which tests for the existence of tail-call-optimisation and pushes a feature on to *FEATURES*. The project source file which requires tail-call-optimisation should then contain #-my-project:tail-call-optimisation (eval-when (:compile-toplevel :load-toplevel :execute) (error "This file
<pillton> requires implementations which support tail call optimisation.")).
ec has joined #commonlisp
<pillton> All of this is very well described in the paper "Maintaining Portable Lisp Programs" by Christophe Rhodes.
<pillton> None of the above is required if you use LOOP.
s-liao has joined #commonlisp
servytor has quit [Quit: Connection closed for inactivity]
orestarod has joined #commonlisp