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/> | News: ELS'22 this Monday (2022-03-21), see https://european-lisp-symposium.org
mrcom has quit [Quit: Leaving]
Bike70 has joined #commonlisp
Bike70 is now known as Bicyclidine
zacque has joined #commonlisp
mrcom has joined #commonlisp
ec has quit [Remote host closed the connection]
paule32_ has joined #commonlisp
ec has joined #commonlisp
paule32 has quit [Ping timeout: 246 seconds]
paule32_ is now known as paule32
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 240 seconds]
Lord_of_Life_ is now known as Lord_of_Life
jack_rabbit has joined #commonlisp
knusbaum has quit [Ping timeout: 255 seconds]
Oladon has quit [Quit: Leaving.]
orestarod has quit [Ping timeout: 258 seconds]
yauhsien has joined #commonlisp
ebrasca has quit [Remote host closed the connection]
taiju` has joined #commonlisp
taiju` is now known as taiju
Bicyclidine has quit [Quit: Connection closed]
anticomputer has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
Guest74 has quit [Quit: Connection closed]
waleee has quit [Ping timeout: 258 seconds]
karlosz has joined #commonlisp
yauhsien has quit [Ping timeout: 246 seconds]
Guest74 has joined #commonlisp
WBarends has quit [Ping timeout: 255 seconds]
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack has joined #commonlisp
irc_user has quit [Quit: Connection closed for inactivity]
karlosz has quit [Quit: karlosz]
<beach> Good morning everyone!
cosimone has quit [Ping timeout: 258 seconds]
tyson2 has quit [Remote host closed the connection]
<mfiano> Hey all. Can I get a second pair of eyes? I've been at this too long today to figure out if this COND is exhaustive or not: https://gist.github.com/mfiano/9f9e755a51db046dd12b1fa156a5ceab
<beach> Why do you test for TARGET-SNAPSHOTS being true in the second and third clauses?
<mfiano> Indeed it is not needed, but it was to clarify my thinking
<beach> But now you are asking others to read it.
<mfiano> It should still be readable, just with more context as to not backtrack your eyes. Can you not filter that out, or pass it to someone else?
<beach> Sure.
Oladon has joined #commonlisp
<White_Flame> looks exhaustive to me?
<mfiano> Thanks for rubber ducking. It is wrong
<White_Flame> fills the truth table
<mfiano> the second case can be an error. The annotated types are wrong. base-snapshot can be string|null
<White_Flame> true
<White_Flame> (and base-snapshot (string= base-snapshot ...))
<mfiano> Right. Thanks again :)
<White_Flame> however I would put the string= test within the last body
<White_Flame> depending on how you view this and if reordering that has any ill (side) effects
wmblathers has joined #commonlisp
<mfiano> I think it might
wmblathe_ has quit [Ping timeout: 260 seconds]
notzmv has quit [Ping timeout: 260 seconds]
<mfiano> Edited
<mfiano> and again to remove the AND now with this reordering, to please beach and the others reading the code.
<White_Flame> afk
livoreno has joined #commonlisp
aartaka has quit [Ping timeout: 240 seconds]
aartaka has joined #commonlisp
aartaka has quit [Ping timeout: 255 seconds]
notzmv has joined #commonlisp
yauhsien has joined #commonlisp
yauhsien has quit [Ping timeout: 258 seconds]
paule32 has quit [Quit: we see us]
wilfred has joined #commonlisp
karlosz has joined #commonlisp
Bike has quit [Quit: leaving]
aartaka has joined #commonlisp
Oladon has quit [Quit: Leaving.]
dider has joined #commonlisp
euandreh has quit [Ping timeout: 260 seconds]
euandreh has joined #commonlisp
dilated_dinosaur has quit [Ping timeout: 256 seconds]
shka has joined #commonlisp
opc0de is now known as opcode
Sauvin has quit [Read error: Connection reset by peer]
Sauvin has joined #commonlisp
Sauvin has quit [Ping timeout: 246 seconds]
Sauvin has joined #commonlisp
taiju has quit [Ping timeout: 255 seconds]
ehammarstrom has quit [Ping timeout: 260 seconds]
ehammarstrom has joined #commonlisp
ehammarstrom has quit [Ping timeout: 240 seconds]
jeosol has joined #commonlisp
<Josh_2> Good Mornin
Josh_2 has quit [Remote host closed the connection]
ehammarstrom has joined #commonlisp
ehammarstrom has quit [Ping timeout: 244 seconds]
aartaka has quit [Ping timeout: 244 seconds]
aartaka has joined #commonlisp
attila_lendvai has joined #commonlisp
ehammarstrom has joined #commonlisp
OlCe` has quit [Remote host closed the connection]
ehammarstrom has quit [Ping timeout: 258 seconds]
ehammarstrom has joined #commonlisp
livoreno has quit [Ping timeout: 260 seconds]
Josh_2 has joined #commonlisp
livoreno has joined #commonlisp
ttree has quit [Ping timeout: 240 seconds]
pve has joined #commonlisp
Cymew has joined #commonlisp
pranavats has joined #commonlisp
karlosz has quit [Quit: karlosz]
cosimone has joined #commonlisp
chimp_ has joined #commonlisp
Psybur has quit [Ping timeout: 255 seconds]
causal has quit [Quit: WeeChat 3.5]
molson has quit [Remote host closed the connection]
trocado has joined #commonlisp
dilated_dinosaur has joined #commonlisp
dider has quit [Ping timeout: 258 seconds]
mrcom has quit [Quit: Leaving]
trocado has quit [Ping timeout: 244 seconds]
frgo has joined #commonlisp
wilfred has quit [Quit: Connection closed for inactivity]
zacque has quit [Quit: Goodbye :D]
mrcom has joined #commonlisp
lisp123 has joined #commonlisp
<lisp123> Josh_2: 200k monthly visitors is a great achievement, congrats
<lisp123> whats the best recursive descent parser in CL?
<lisp123> I know how to build one now, but want to read its code after I do my own
<lisp123> The legendary Mark Kantrowitz had one which I have used in the past
yauhsien has joined #commonlisp
treflip has joined #commonlisp
treflip has quit [Changing host]
treflip has joined #commonlisp
treflip has quit [Client Quit]
treflip has joined #commonlisp
yauhsien has quit [Ping timeout: 246 seconds]
<Josh_2> Thanks :sunglasses:
cosimone has quit [Remote host closed the connection]
lisp123 has quit [Remote host closed the connection]
orestarod has joined #commonlisp
kpoeck has joined #commonlisp
kpoeck has quit [Client Quit]
treflip is now known as mr_huge
igemnace has quit [Remote host closed the connection]
mr_huge is now known as treflip
Dynom has joined #commonlisp
thuna` has quit [Ping timeout: 276 seconds]
attila_lendvai has quit [Ping timeout: 260 seconds]
random-nick has joined #commonlisp
Oddity has quit [Ping timeout: 246 seconds]
<Josh_2> I had a 90% working solution, I have changed it and now confused myself
<Josh_2> :joy:
kpoeck has joined #commonlisp
tyson2 has joined #commonlisp
kpoeck has quit [Quit: Client closed]
<rotateq> Josh_2: How did you measure it being 90%? :)
<Josh_2> educated guess :joy:
paule32 has joined #commonlisp
<paule32> hello
ebrasca has joined #commonlisp
<paule32> can i discuss common lisp internals here ?
<yitzi> Yes. This is just the place for that.
Oddity has joined #commonlisp
<paule32> hello yitzi
<paule32> i started a toy project, where i collect some dsl, for using at my own
<yitzi> You can also get help in #clsschool
<paule32> i would share the process
<paule32> it is a windows project
<yitzi> Sorry, meant #clschool
<paule32> yitzi: #clschool they stop me discuss, because it is for beginners
<yitzi> Most are not going to download zip files. If it is a single file then use a paste service. Or post a link to github or something like that if it is multiple files.
<ebrasca> Yea it can be anithing!
<yitzi> paule32: If you need a paste service here is one https://plaster.tymoon.eu
<paule32> i would not damage computer systems of other people
<paule32> life, and be lifed
<Josh_2> Yeh just paste innit
dec0d3r has quit [Quit: Leaving]
<ebrasca> Use git or the paste
<paule32> yitzi: it is a .exe file
<rotateq> We don't say or think that, but no source no download.
<ebrasca> I am not touching that zip file
<Josh_2> You are trying to showoff your windows lisp project?
<Josh_2> Make a youtube video of it working :sunglasses:
<Josh_2> then send link
<paule32> hui video, never done this
<yitzi> I can't speak for other, but no I am not downloading an exe. Try describing your problem in the interim.
WBarends has joined #commonlisp
<Josh_2> paule32 you can download obs (it is free) and you can use it to record your screen then upload to youtube
<Josh_2> I want to see Lisp project in action :thumbsup:
<dlowe[m]> Josh_2: It's not a lisp project.
<Josh_2> What is it?
<ebrasca> Maybe he created a exe with lisp
<ebrasca> but nobody is going to run it!
<dlowe[m]> An editor of some kind? Paule32 has been wasting our time since 2014
<yitzi> Oh goody.
<Josh_2> Persistent time wasting :sunglasses:
<Josh_2> Gotta give to the King :crown:
<Nilby> It's quite easy to run a windows exe safely today. But before one spends the effort it's good to know why and what one will be looking at.
<rotateq> I still don't know what this Window is that is sometimes talked about.
<paule32> here ypu have screen shoots:
<paule32> hello rotateq, my friend
taiju` has joined #commonlisp
<paule32> i have success in process for the lisp toy interpreter
<rotateq> That would be new to me. But yes, hello paule32.
<Josh_2> So what am I looking at?
taiju` is now known as taiju
<rotateq> Josh_2: Maybe an advanced form of CLIM.
<paule32> the actual state is: editor + (pre-alpha) parsers for lisp, dbase, and pascal + window form designer
SAL9000 has quit [Quit: WeeChat 3.4.1]
Bike has joined #commonlisp
<Nilby> I like gui/form builders. I have used multiple form/app designers that used or generated Lisp. Lisp is natural for it because you can type an expression and have it run immediately in the model. And it has an easy data model. You can turn plists with lambdas into live objects.
<paule32> you speak about LispWorks ?
trev has joined #commonlisp
Cymew has quit [Ping timeout: 276 seconds]
<Nilby> No. A much older longer history. Mostly can't be run anymore without emulation. e.g. sk8 on old macs
<paule32> text user interfaces are out of date ?
<Nilby> people still love text UIs, and they're still useful, but I was talking about GUIs
<paule32> my toy project is a gui application
Oddity has quit [Ping timeout: 255 seconds]
<paule32> first, i would write a lisp interpreter, then i came to the point, to document the source code, but no suit desire help authoring tool was present, so i start docma as wordprocessor (still planing), then i came back to lisp, and would collect the world of other dsl together with lisp, a toying starting project is now on work
<paule32> so, if the pre-alpha phase is over, i hope that the ffc procedure can be easy handled
<paule32> but i dont promise anything
<paule32> i have to check, and learn some internals of lisp
<Nilby> Yes, but I'm not clear how it uses Lisp? Is implemented in Lisp? Does it interface to a Lisp like SLIME, or does just have a Lisp editing mode? A mini-Lisp as a DSL for writing application code?
<paule32> completely other way
<paule32> the source dsl for all is Pascal / Delphi code
<paule32> thats why it is so very speed on
attila_lendvai has joined #commonlisp
<paule32> the editor + form designer is completely pascal
<paule32> the source code for lisp within this gui is handled by pascal
<paule32> little break
<paule32> cofe time
lisp123 has joined #commonlisp
cosimone has joined #commonlisp
lisp123 has quit [Ping timeout: 258 seconds]
WBarends has quit [Quit: Textual IRC Client: www.textualapp.com]
<Bike> if this is not an implementation of common lisp it is off topic.
<Nilby> sorry, I was just getting nostalgic for GUI builders actually in CL
<paule32> Bike: if you talk to me: i would like to implement a common lisp derivat, i know that i can not name this product then as common lisp, but it is only for education for me, and should not be a commerical purpose or co.
<paule32> when i doing new things, with new tools, then, that i learn between the gab of classic lisp, and new implementation
<paule32> okay, this have not directly to do with lisp, but the dsl i toying should interpret lisp code
<paule32> and, i will be free the final product as free to use without any fees
<paule32> i try to hold me on Ansi compatible
<paule32> and since common lisp is open source, and i could modified the source, i can feel free to do this
<paule32> the other question is then, is this needed, or is the product acceptable to others, or do it some things that other product dont do
<paule32> please dont worry, i am a hobby programmer, and i am not paid for this what i do, it is the interesst of retro computing
pranavats has left #commonlisp [Error from remote client]
<paule32> a older version of tha application can be downloaded (source code) on https://github.com/paulse32
<paule32> the first reprosity
<paule32> hui, type
<paule32> typo, that the correct link: https://github.com/paule32/docma
taiju has quit [Ping timeout: 240 seconds]
<jackdaniel> paule32: discussing pascal and other projects that are not cl is offtopic here, as pointed out earlier
<jackdaniel> so here's your last warning: don't do that.
pranavats has joined #commonlisp
cosimone has quit [Remote host closed the connection]
trocado has joined #commonlisp
ehammarstrom has quit [Ping timeout: 258 seconds]
pranavats has left #commonlisp [#commonlisp]
igemnace has joined #commonlisp
ehammarstrom has joined #commonlisp
igemnace has quit [Remote host closed the connection]
igemnace has joined #commonlisp
igemnace has quit [Quit: WeeChat 3.5]
jeosol has quit [Quit: Client closed]
igemnace has joined #commonlisp
pranavats has joined #commonlisp
cage has joined #commonlisp
cosimone has joined #commonlisp
Posterdati has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/]
Posterdati has joined #commonlisp
kpoeck has joined #commonlisp
kpoeck has quit [Quit: Client closed]
lisp123 has joined #commonlisp
ehammarstrom_ has joined #commonlisp
trocado has quit [Ping timeout: 240 seconds]
lisp123 has quit [Ping timeout: 244 seconds]
ehammarstrom has quit [Ping timeout: 240 seconds]
<dieggsy> how does lisp/the repl distinguish (values) and nil ? i see that putting (values) in an argument position converts it to nil, yet on its own at the repl it appears to return "nothing"
<beach> When (VALUES) is in a context where a value is needed, it returns NIL. Otherwise, it returns no values.
<White_Flame> the receiver can distinguish it with MULTIPLE-VALUE-LIST to get a list of all values, and seeing if it's empty
<beach> It also works indirectly, so if you have (defun foo (...) ... (values)) and then you evaluate (foo ...) in a context where a value is needed, then NIL is used.
<dieggsy> oh. well. heh, that makes sense. thanks
<White_Flame> s/receiver/caller/
<dieggsy> i guess how is that context determined? is that just up to the implementation
<beach> No that's well defined.
<Bike> it's defined by the language semantics
<Bike> function calls expect one value. (multiple-value-bind (foo bar) ...) expects two
<dieggsy> oh i see. I'm confusing myself with my own ambiguous language. the expected behavior is well defined, the specifics of how an implementation achieves said behavior is i assume up to them
<dieggsy> thanks
aartaka has quit [Ping timeout: 258 seconds]
aartaka has joined #commonlisp
wmblathe_ has joined #commonlisp
wmblathers has quit [Ping timeout: 255 seconds]
<White_Flame> if you're curious, in SBCL a singular value returns with clear carry & the value in a register. For other values, set carry and ECX = number of values, which are put in regs & the stack (but still sets the return reg to NIL on no value returns)
<White_Flame> so a caller expecting a single value can ignore carry and just use the return value register either way
<White_Flame> (this is on linux amd64)
<beach> I wonder why it does both carry and ECX. Why not just always put the number of return values in ECX, which would then just be ignored in most cases?
<pjb> it can be a side effect of the instructions choosen.
<beach> What can be?
<pjb> assembly programming is fun and magical for that.
<pjb> the setting of the carry.
<beach> But SBCL does it because it is specified.
<Nilby> dieggsy: It's just that the REPL gets all the values and doesn't print anything if there aren't any values. But say (print (values)) has to get a value, so it's smushed NIL, by the implementation, like White_Flame says.
<pjb> perhaps, but also, it may be specified because it's free in assembly.
<Nilby> Registers are precious on many legacy architectures
<Nilby> including the most popular one
<beach> pjb: I don't see how it can be free in all situations.
<beach> Nilby: So you are saying that when a single value is returned, ECX can be used for something else? How would that work?
<Bike> maybe because a branch on the carry flag is very slightly cheaper than a branch on ecx being one
waleee has joined #commonlisp
<beach> Bike: But if a single return value is wanted, then the carry flag does not have to be tested.
<beach> So this would be an optimization for a caller wanting either 0 or more than one value, and the callee returns exactly one value?
<Bike> right. it says in the internals document that it only does the branch when it's expecting something other than one value.
<Nilby> i suppose you could know the carry should be use for something else
<Bike> or rather, has to handle all values rather than just taking the primary
<beach> Bike: But if something other than one value is expected, then the number of values has to be tested anyway.
<Bike> ok, looking more closely now. i think the trick is that ecx (the number of values) is _not_ set by a single value return.
<Bike> so in the caller, it branches on the carry, and if it's a single value return it sets ecx = 1 etc and then goes to the multiple value return code
<Bike> "fakes up the register use convention of a multiple-value return" as the doc describes it
<beach> But in the multiple value return that follows, the value of ECX must be tested anyway.
<beach> So the test on the carry is extra.
<White_Flame> the test on the carry is to see if ECX is holding the value count
<White_Flame> if not, then it sets it to 1
<beach> I understand that.
<Bike> I mean, it's "extra" in the sense that there could be a different convention in which a single-value return did set ecx
<White_Flame> if a caller expecting multiple values ends up calling a single-value return function, then that test is necessary
<Bike> but it's not redundant in this convention. it does mean doing two tests
<beach> My question is why this protocol is better, and if so in which situation?
<White_Flame> I think this is a reasonable tradeoff for the common case of single-value returns & single-value expectant callers
<Bike> well, it means a single value return doesn't have to do as much.
<beach> How can the callee avoid either setting or clearing the carry flag?
<White_Flame> clc/stc is a very inexpensive addition to the epilogue of all functions
<beach> Less expensive than storing 1 in ECX?
<beach> That's hard to believe.
<White_Flame> yes
<White_Flame> that's an expense of losing a register for all single-valued functions as well
<White_Flame> (plus, it's a 2-byte instruction at least, instead of a single-byte clc)
<beach> You don't lose a register. It can't be used for anything else to communicate from the callee to the caller, at least not what I can see.
<beach> Ah, OK, so the number of bytes of instruction. That would be the optimization then.
<White_Flame> mov ecx,0 is a 4-byte instruction
<White_Flame> (at least in terms of what sbcl is generating)
<White_Flame> erm, mov ecx, 2
<beach> I am willing to accept the argument of the number of bytes in the instruction stream, but not any of the others (yet, at least).
<White_Flame> sure, I'm not positive on the register pressure that that ecx use would have specifically
<beach> ... and I would be very surprised if this optimization would be noticeable at all.
<beach> Did anyone try both ways and conclude that this technique actually makes a difference?
SAL9000 has joined #commonlisp
<White_Flame> ECX is used by the caller to list the number of passed parameters, too, so yeah that's already committed by the caller anyway
<beach> Sure. Either way, it couldn't be conditionally used to communicate anything form the callee to the caller. It would be available only if a single value is returned, so it couldn't be used for any additional values.
irc_user has joined #commonlisp
<White_Flame> I'm not on the dev team, so I have no idea what they tried when making this optimizatino
<Bike> if nothing else they were moving from a different convention that had more serious problems
<White_Flame> I think that a count offset by 1 would be good here, so a returned ECX of 0 would indicate 1 return value and be short/quick to be in the epilogue
<White_Flame> and the already more expensive multiple-value return handling just has to bump it a bit to get the real count of values
lisp123 has joined #commonlisp
<White_Flame> the use of carry flag just takes that a step further, saves 1 byte on the common epilogue, and pushes a bit more on multi-value stuff
<paule32> hello
<paule32> the fasl files, they are text or binary images ?
<Josh_2> did you try opening one?
<lagash> `file <my.fasl>`
<Josh_2> that'll tell you
lisp123 has quit [Ping timeout: 258 seconds]
Oladon has joined #commonlisp
pfd has joined #commonlisp
morganw has joined #commonlisp
prokhor__ has quit [Remote host closed the connection]
ttree has joined #commonlisp
cognemo has joined #commonlisp
kpoeck has joined #commonlisp
machaddr has joined #commonlisp
machaddr_ has joined #commonlisp
machaddr has quit [Ping timeout: 240 seconds]
machaddr_ has quit [Remote host closed the connection]
cognemo has quit [Ping timeout: 260 seconds]
molson has joined #commonlisp
cognemo has joined #commonlisp
pfd has quit [Quit: Client closed]
tyson2 has quit [Remote host closed the connection]
bitmapper has quit [Quit: Connection closed for inactivity]
molson has quit [Remote host closed the connection]
molson has joined #commonlisp
trocado has joined #commonlisp
molson has quit [Remote host closed the connection]
molson has joined #commonlisp
lisp123 has joined #commonlisp
machaddr has joined #commonlisp
molson has quit [Remote host closed the connection]
yagamisato has quit [Ping timeout: 246 seconds]
molson has joined #commonlisp
yagamisato has joined #commonlisp
yagamisato has joined #commonlisp
yagamisato has quit [Changing host]
lisp123 has quit [Ping timeout: 246 seconds]
machaddr has quit [Read error: Connection reset by peer]
machaddr has joined #commonlisp
Guest74 has quit [Quit: Connection closed]
<Nilby> What are the top 10 fasl file types? The answer might surprise you! https://plaster.tymoon.eu/view/3183#3183
yagamisato has quit [Ping timeout: 246 seconds]
<ehammarstrom_> Nilby: What's the |+ syntax, do you have lisp available in your shell?
<Nilby> yes
<Nilby> or something
<Nilby> |+ is basiclally mapcar
yagamisato has joined #commonlisp
yagamisato has quit [Changing host]
yagamisato has joined #commonlisp
<Nilby> but now I'm wishing I had a DIY-Thermocam
machaddr_ has joined #commonlisp
machaddr has quit [Ping timeout: 246 seconds]
rogersm has quit [Read error: Connection reset by peer]
thuna` has joined #commonlisp
tyson2 has joined #commonlisp
kpoeck has quit [Quit: Client closed]
<rotateq> This UNIX file command is mysterious.
<pjb> rotateq: no, it uses a file to determine what file format the files are.
<pjb> magic
<pjb> /usr/share/file/magic
<masinter_> file is a hack because no one pays attention to adding a "magic number" to distinguish file types
akoana has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
dmh has joined #commonlisp
akoana has quit [Quit: leaving]
pvalenta has quit [Quit: ZNC - https://znc.in]
pvalenta has joined #commonlisp
pvalenta has quit [Remote host closed the connection]
pvalenta has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
trev has quit [Remote host closed the connection]
<pjb> masinter_: granted. The solution being to keep mime types in the file metadata, whichi few file systems allow easily.
tyson2 has joined #commonlisp
snits has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
snits has joined #commonlisp
<dlowe> MacOS classic did this and it was pretty annoying for interoperability
<dlowe> (not mime types, but file metadata-based types)
<pjb> Yes :-)
kpoeck has joined #commonlisp
Oddity has joined #commonlisp
lisp123 has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
treflip has quit [Quit: good night]
trumae has joined #commonlisp
triffid has joined #commonlisp
lisp123 has quit [Ping timeout: 258 seconds]
triffid has quit [Remote host closed the connection]
triffid has joined #commonlisp
ehammarstrom_ has quit [Read error: Connection reset by peer]
ehammarstrom has joined #commonlisp
machaddr__ has joined #commonlisp
machaddr_ has quit [Ping timeout: 255 seconds]
machaddr__ has quit [Remote host closed the connection]
machaddr has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 27.1]
attila_lendvai has quit [Quit: Leaving]
vassenn has joined #commonlisp
vassenn has quit [Quit: Good bye!]
rotateq has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.1)]
causal has joined #commonlisp
euandreh has quit [Ping timeout: 258 seconds]
tyson2 has joined #commonlisp
Oladon has quit [Quit: Leaving.]
Dynom has quit [Quit: WeeChat 3.5]
azimut has quit [Ping timeout: 240 seconds]
azimut_ has joined #commonlisp
machaddr has quit [Quit: Leaving]
aartaka has quit [Ping timeout: 255 seconds]
aartaka has joined #commonlisp
Oladon has joined #commonlisp
attila_lendvai has joined #commonlisp
trumae has quit [Ping timeout: 260 seconds]
trumae has joined #commonlisp
lisp123 has joined #commonlisp
Spawns_Carpeting has quit [Ping timeout: 276 seconds]
kpoeck has quit [Quit: Client closed]
lisp123 has quit [Remote host closed the connection]
Spawns_Carpeting has joined #commonlisp
lisp123 has joined #commonlisp
jack_rabbit has quit [Quit: ZNC 1.8.2 - https://znc.in]
lisp123 has quit [Ping timeout: 244 seconds]
cosimone has quit [Read error: Connection reset by peer]
knusbaum has joined #commonlisp
cosimone has joined #commonlisp
Guest74 has joined #commonlisp
pfd has joined #commonlisp
MajorBiscuit has joined #commonlisp
triffid has quit [Remote host closed the connection]
triffid has joined #commonlisp
MajorBiscuit has quit [Quit: WeeChat 3.4]
waleee has quit [Ping timeout: 255 seconds]
waleee has joined #commonlisp
dmgk has left #commonlisp [#commonlisp]
livoreno has quit [Ping timeout: 244 seconds]
morganw has quit [Remote host closed the connection]
yewscion has joined #commonlisp
brandflake11 has joined #commonlisp
<brandflake11> Hey all, I'm writing code to generate drum beats, by putting functions into a list, that I then feed into a EVAL to activate in the right tempo. I wanted to know, is using EVAL bad practice?
random-nick has quit [Ping timeout: 246 seconds]
<mfiano> Almost always.
<brandflake11> mfiano: That's what I thought I had read from Paul Graham
<mfiano> You cna map over the list and funcall.
<brandflake11> If I were to call a function from a list into another function, is funcall a better function to use?
<mfiano> with map, dolist, etc
<brandflake11> mfiano: Okay, thanks, I'll try FUNCALL instead
<brandflake11> mfiano: Why is using EVAL bad?
<mfiano> It isn't always, but it's a common beginner mistake to think you need to use EVAL.
shka has quit [Ping timeout: 255 seconds]
<mfiano> Expressions are already evaluated.
<semz> eval usually makes it pretty difficult to understand the code
<mfiano> Rainer Joswig answered it fairly well here: https://stackoverflow.com/questions/2571401/why-exactly-is-eval-evil
<brandflake11> mfiano: Thanks so much for that link.
orestarod has quit [Ping timeout: 260 seconds]
X-Scale has quit [Ping timeout: 258 seconds]
<brandflake11> One thing I'm a little confused about when using FUNCALL, is how to take a list with my function's arguments, and put that into FUNCALL.
<brandflake11> I know it's probably a noob question
<brandflake11> Would I have to use a macro to do that?
<mfiano> You use APPLY for that
<brandflake11> mfiano: I see, I'll look into that. I remember On-Lisp talking about this, but I have a hard time with that book
<mfiano> Also there is #clschool for such language basics if you weren't aware. This channel generally assumes some fundamental knowledge.
<brandflake11> mfiano: Yes, I'm sorry, I'll use that next time
X-Scale has joined #commonlisp
Oladon has quit [Quit: Leaving.]
X-Scale has quit [Ping timeout: 246 seconds]
X-Scale` has joined #commonlisp
X-Scale` is now known as X-Scale
<White_Flame> if you're building up source code at runtime, then using EVAL, COMPILE, etc can be okay
dra has joined #commonlisp
<White_Flame> if all you're doing is dynamically chaining a bunch of prebuilt function objects, then consider funcalling a list of them, or maybe use continuation passing style
dra_ has joined #commonlisp
Guest74 has quit [Quit: Connection closed]
dra has quit [Ping timeout: 260 seconds]
<phadthai> then in-between where possible, there are macros, allowing to optimize code, if your lists/sequences don't change constantly
<phadthai> and it still allows to occasionally update them by recompiling relevant sections
yewscion has quit [Quit: Connection closed]
Bike has quit [Quit: Lost terminal]
Bike has joined #commonlisp