jackdaniel changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <http://cliki.net/> <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.5.4, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
<pjb> err, the while index is not necessary.
liberiga has joined #lisp
<drmeister> Thank you - I have to run to catch a train. I'll look through this then.
<pjb> Have fun!
ebrasca has joined #lisp
aautcsh has quit [Ping timeout: 252 seconds]
aoeu256 has quit [Read error: Connection reset by peer]
aoeu256 has joined #lisp
sonologico has quit [Remote host closed the connection]
lucasb has quit [Quit: Connection closed for inactivity]
wigust- has joined #lisp
wigust has quit [Ping timeout: 245 seconds]
aoeu512 has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
aoeu256 has quit [Ping timeout: 258 seconds]
<remexre> is there a "really good"/"community standard" parsing library? (e.g. parsec for haskell, antlr for java)
<remexre> alternatively, what would people recommend for parsing "scanf data," i.e. data in a format made to be parsed w/ scanf (i.e. line-based, no nesting, clear separators, etc)
aoeu256 has joined #lisp
aoeu512 has quit [Ping timeout: 258 seconds]
t58 has quit [Quit: Leaving]
<ebrasca> remexre: you can load lisp data from text files and write it to files.
semz has quit [Ping timeout: 264 seconds]
aoeu256 has quit [Ping timeout: 248 seconds]
Kaisyu_ has quit []
Kaisyu has joined #lisp
<remexre> Pq
<remexre> Whoops, phone
<remexre> Sure, but what gets it from the format I already have to s-exprs :)
<remexre> ebrasca: ^^
* no-defun-allowed is partial to parser-combinators (which is the same theory as Parsec), but has only really worked with cl-yacc which is a little more y[au]c[ck]y
<remexre> Lol
anewuser has joined #lisp
q9929t has quit [Quit: q9929t]
semz has joined #lisp
semz has quit [Changing host]
semz has joined #lisp
Oladon_wfh has quit [Ping timeout: 260 seconds]
malaclyps[m] has joined #lisp
orivej has joined #lisp
<ebrasca> remexre: maybe (load path-to-file")
Achylles has quit [Ping timeout: 252 seconds]
<remexre> ebrasca: the existing format I need to work with isn't s-expressions
EvW has quit [Ping timeout: 264 seconds]
<ebrasca> remexre: I don't know one.
sonologico has joined #lisp
superkumasan has joined #lisp
saravia has quit [Remote host closed the connection]
dale has quit [Read error: Connection reset by peer]
dale has joined #lisp
dale has quit [Client Quit]
dale has joined #lisp
<sjl> smug is okay if you want parser combinators. other folks seem to like esrap (I've never used it).
Bike has quit [Quit: Lost terminal]
<sjl> I don't think there's one single library that everyone uses, like in the languages you mentioned
milanj has joined #lisp
notzmv has joined #lisp
shrdlu68 has joined #lisp
techquila has quit [Remote host closed the connection]
<drmeister> remexre: We use esrap for all of our parser needs in the Cando project.
<drmeister> I think we have three or four parsers now?
<remexre> Huh, I'll give it a try ig
<drmeister> We have some pretty exotic grammars to parse - it is industrial strength.
shrdlu68 has quit [Ping timeout: 245 seconds]
dddddd has quit [Read error: Connection reset by peer]
<beach> Good morning everyone!
torbo has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 245 seconds]
liberiga has quit [Ping timeout: 260 seconds]
lalitmee has joined #lisp
gravicappa has joined #lisp
ssake has quit [Ping timeout: 245 seconds]
dale has quit [Quit: My computer has gone to sleep]
nanoz has joined #lisp
shrdlu68 has joined #lisp
Necktwi has quit [Ping timeout: 245 seconds]
milanj has quit [Quit: This computer has gone to sleep]
<remexre> https://github.com/slime/slime/blob/master/swank.lisp#L1265 what the heck is going on here
DrDuck is now known as refreshing_drink
<beach> clhs ***
<munksgaard[m]> beach: good morning!
<beach> remexre: That Common Lisp HyperSpec page is for you.
<remexre> okay so it's just simultaneous assignment, not anything wacky with ASCII art?
<remexre> I guess sorta XY problem for why I'm digging in swank -- my program's got a (CPU-bound) main loop, and I wanna integrate a SWANK check in it; right now, I'm doing (loop for c in swank::*connections* do (swank::handle-requests c t))
<remexre> after (swank:create-server :style :fd-handler :dont-close t) at the top of the loop
<remexre> but it has trouble picking up on new connections
<remexre> is there something I need to call to get that to work?
<remexre> (this is all cobbled together from scraps of non-working code I've found, so if this is completely the wrong way to do this, I'm more than willing to accept that :P)
shrdlu68 has quit [Ping timeout: 245 seconds]
sonologico has quit [Remote host closed the connection]
lalitmee has quit [Remote host closed the connection]
ggole has joined #lisp
<stylewarning> Does ADJUST-ARRAY (to a smaller dimension) allow Lisp to reclaim memory in any implementations?
<LdBeth> how to call a base method of a parent class without invoke the :after method?
lalitmee has joined #lisp
<stylewarning> LdBeth: (call-next-method)
lalitmee has quit [Max SendQ exceeded]
<stylewarning> LdBeth: (unless I am misunedrstanding what you
<stylewarning> re saying)
<LdBeth> stylewarning: I mean without invoke the :after method of that base method of parent class
hiroaki has quit [Ping timeout: 258 seconds]
lalitmee has joined #lisp
<stylewarning> LdBeth: Ok, I misunderstood. I'm not sure without dynamically computing it; sounds like a code smell.
Volt_ has joined #lisp
lalitmee has quit [Max SendQ exceeded]
varjag has joined #lisp
<beach> LdBeth: If doing something like that is necessary, then there is something seriously wrong with the protocol design.
<LdBeth> beach: I agree. just happened someone asked my if there's an ad hoc fix
esrse has joined #lisp
Inline has quit [Quit: Leaving]
wooden has joined #lisp
wooden has quit [Changing host]
wooden has joined #lisp
scymtym has quit [Ping timeout: 248 seconds]
<LdBeth> so the answer seems to be "no" unless use implementation specific tricks or copy original parent class method definition
<stylewarning> LdBeth: you can probably do it portably with COMPUTE-APPLICABLE-METHODS, but it would be very roundabout and tedious
shrdlu68 has joined #lisp
nanozz has joined #lisp
nanoz has quit [Ping timeout: 245 seconds]
sauvin has joined #lisp
iovec has quit [Quit: Connection closed for inactivity]
nanozz has quit [Ping timeout: 245 seconds]
manualcrank has quit [Quit: WeeChat 1.9.1]
<LdBeth> stylewarning: thank you,
varjag has quit [Ping timeout: 246 seconds]
SaganMan has joined #lisp
lalitmee has joined #lisp
jello_pudding has joined #lisp
<refreshing_drink> Is 'else' just not allowed in common lisp's COND operator? If not, why? It is allowed in scheme.
<White_Flame> the cond tests are boolean
JohnMS_WORK has joined #lisp
techquila has joined #lisp
<LdBeth> Because schemes COND is defined with hygienic macro, which can have macro local “keywords”
<White_Flame> so... (cond ((test-something) (do-something)) .... (t (do-something-else)))
<refreshing_drink> If you want to include 'else' in your conditioning, what do you use?
<LdBeth> While Common Lisp has to keep compatible with some old fashioned lisps
<stylewarning> refreshing_drink: t
<refreshing_drink> o_o
<stylewarning> the boolean that's never false (:
<refreshing_drink> A little unexpected, but works for me!
<stylewarning> isn't it more expected than some random keyword?
<stylewarning> (cond (bool1 exp1) (bool2 exp2) ... (booln expn)) ; just let booln = T
<refreshing_drink> probably not, coming from a background where it has been provided in other languages :p
<LdBeth> Don’t assume you know Common Lisp while you already knows Scheme
<LdBeth> Vise versa
<stylewarning> refreshing_drink: in scheme, you could also do (cond ... (#t ...)), it would just look odd and unidiomatic
<refreshing_drink> :o
ravenous_ has joined #lisp
mathrick has quit [Ping timeout: 276 seconds]
ltriant has quit [Quit: leaving]
ravenous_ has quit [Ping timeout: 252 seconds]
flamebeard has joined #lisp
mathrick has joined #lisp
shrdlu68 has quit [Ping timeout: 248 seconds]
gko has quit [Remote host closed the connection]
gigetoo has quit [Ping timeout: 248 seconds]
orivej has joined #lisp
gioyik has joined #lisp
gigetoo has joined #lisp
anewuser has quit [Quit: anewuser]
shrdlu68 has joined #lisp
nanoz has joined #lisp
gioyik has quit [Quit: WeeChat 2.5]
scymtym has joined #lisp
knicklux has quit [Remote host closed the connection]
lalitmee has quit [Ping timeout: 244 seconds]
jprajzne has joined #lisp
froggey has quit [Ping timeout: 258 seconds]
froggey has joined #lisp
vlatkoB has joined #lisp
nanoz has quit [Ping timeout: 244 seconds]
nowhere_man has quit [Ping timeout: 252 seconds]
makomo_ has joined #lisp
lalitmee has joined #lisp
heisig has joined #lisp
Necktwi has joined #lisp
milanj has joined #lisp
karlosz has joined #lisp
Insanity_ has joined #lisp
karlosz has quit [Quit: karlosz]
ljavorsk has joined #lisp
<ljavorsk> Hi everyone, I'm working on maintaining pgloader for Fedora, and there is sbcl required. It is needed for build, but it uses this .lisp script where it downloads a bunch of files from network, but in mock build it crashes on error because of no connection. Did anyone had this problem? And what was your next steps? I've downloaded those files, and considering to make a tarball of them, but is it the best option for it? Thanks for help
<ljavorsk> Here is the link for pgloader repo: https://github.com/dimitri/pgloader
<ljavorsk> and the script is src/save.lisp
karlosz has joined #lisp
<|3b|> not sure how distro maintainers are expended to deal with that, dim might be able to help
<|3b|> what is a "mock" build?
<jackdaniel> normally I'd suggest making a bundle, but it seems that this build script depends on quicklisp itself
<dim> ljavorsk: I also maintain a “bundle” distribution of pgloader that includes all the build dependencies, for that purpose
<dim> ljavorsk: in debian, we package every build dependency, so I maintain ~60 lisp packages in debian
<dim> jackdaniel: there's quicklisp bundles and I'm using that in pgloader
random-nick has joined #lisp
<ljavorsk> dim, can you link me the bundle version please?
<jackdaniel> ddah
<jackdaniel> s/ddah/ah/
<ljavorsk> nice way of correcting yourself :D
lalitmee has quit [Remote host closed the connection]
<jackdaniel> I think I've picked it from someone on this channels a few years ago (I know it is the ed command but I'm not ed user)
<Insanity_> I see it rather frequently around IRC :) It's the same you'd use in VIM
<Insanity_> :s/ddah/ah in that case
<dim> I'm used to that syntax from the PostgreSQL channel, so I might have been using it here too without knowing if it was global IRC practice
<|3b|> fairly common techy/coder irc practice, not sure about outside thatt
<d4ryus> this syntax is also used by sed
gigetoo has quit [Ping timeout: 245 seconds]
<|3b|> doesn't perl also inherit it?
<|3b|> (and anyone who copied perl's regex syntax)
karlosz has quit [Quit: karlosz]
Lord_of_Life has quit [Ping timeout: 245 seconds]
shrdlu68 has quit [Ping timeout: 245 seconds]
gigetoo has joined #lisp
lalitmee has joined #lisp
lalitmee has quit [Max SendQ exceeded]
Lord_of_Life has joined #lisp
lalitmee has joined #lisp
<jdz> At some point Skype supported that, and actually went and did the replacement in the previous message.
<no-defun-allowed> Discord can do s/foo/bar, but it substitutes foo for bar/ with s/foo/bar/, and any other separator is right out.
<flip214> jdz: sounds like a s/((.*)*)*/a/ bomb to me ;) (or differently, depending on the RE engine used)
<jdz> flip214: pretty sure they don't support regular expressions, just literal text.
<flip214> too bad
<|3b|> doesn't seem like something used precisely (or accurately) enough in most cases for actual substitution to be useful
milanj has quit [Quit: This computer has gone to sleep]
<|3b|> though i guess it could show you a preview so you have a chance to adjust if you have a single client that most people use
milanj has joined #lisp
kajo has joined #lisp
plisp has joined #lisp
plisp has quit [Remote host closed the connection]
plisp has joined #lisp
plisp has quit [Remote host closed the connection]
<aeth> too bad #S is taken or else someone could make a #s/foo/bar/ reader macro. That would be fun. (+ 1 0) #s/+/*/ => 0
<aeth> probably can't work with exactly those semantics but people would find something that works
<White_Flame> yeah, reader macros don't really do postfix like that
varjag has joined #lisp
<jdz> The use case is more like a REPL command, and there's no need for a reader macro for that.
<aeth> jdz: yes, that's the point of a pointless reader macro
<jdz> Some implementations have REPL commands, they usually start with a colon.
<aeth> there'd be no use for a s// like construct in source code
<aeth> maybe in the REPL it could do + then do the substitution and then eval it again
quazimodo has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
manualcrank has joined #lisp
ljavorsk_ has joined #lisp
ljavorsk has quit [Ping timeout: 248 seconds]
maxxcan has joined #lisp
ljavorsk_ has quit [Quit: Leaving]
vaporatorius has quit [Read error: Connection reset by peer]
ljavorsk has joined #lisp
nanoz has joined #lisp
tdleffler has joined #lisp
<pjb> refreshing_drink: (defconstant else t) (cond ((= 0 1) 'nope) (else 'yep)) #| --> yep |#
<pjb> refreshing_drink: check /topic
<ck_> I feel an IF* discussion coming
<pjb> refreshing_drink: note, you might want to (defconstant otherwise t) too, to be consistent with (case 0 (1 'nope) (otherwise 'yep)) #| --> yep |# (cond ((= 0 1) 'nope) (otherwise 'yep)) #| --> yep |#
<flip214> pjb: shouldn't that be +else+? That would destroy the whole point, though! So perhaps we should have ++ on the other special operators as well - +if+, +cond+, etc.
<pjb> flip214: yes, lipe pi should be +pi+
<flip214> and most-positive-fixnum
JohnMS has joined #lisp
JohnMS_WORK has quit [Ping timeout: 246 seconds]
<flip214> actually, CL21 should have (defconstant π cl:pi)
<jackdaniel> and t should be +t+ ,-)
iskander has quit [Ping timeout: 245 seconds]
<jackdaniel> then I could write functions with T as a time argument!
<no-defun-allowed> (set-dispatch-macro-character #\# #\t (constantly t))
<LdBeth> Wtf
<flip214> well, just have #\T a reader macro that expands to CL:T, but have #\t give (intern "t" *package*)
<flip214> then you can have your T and your t as well
<jackdaniel> that sounds tempting: jd-user> package :)
<flip214> and yes, I'm stumbling upon "t" for "time" as well
<flip214> but I guess it's better called "time" anyway
<flip214> or "duration", etc.
iskander has joined #lisp
zaquest has quit [Ping timeout: 244 seconds]
<refreshing_drink> If I want to have multiple statements, if a condition has evaluated as true, what do I do?
<jackdaniel> (when (returns-true) (do-something) (do-something-more))
<refreshing_drink> In the last condition of 't' for example.
milanj has joined #lisp
<jackdaniel> your indentation is bad, I doubt many people will bother with reading code with such formatting
<refreshing_drink> I thought 2 spaces was the way to go. :O
<refreshing_drink> Is there a CL emacs style formatter?
<jackdaniel> each argument to cond is a separate clause and all should be indented the same way
<refreshing_drink> Ohhh so like starting the first one on a new line
<refreshing_drink> gotcha
<jackdaniel> there is, take a look at quicklisp.org which helps you to install slime (slime is an emacs mode for editing common lisp)
<jackdaniel> minion: tell refreshing_drink about pcl
<minion> refreshing_drink: please look at pcl: pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005).
<jackdaniel> pcl also describes how to set up slime
<jackdaniel> if you want something preconfigured take a look at portacle
<refreshing_drink> i have slime installed
<jackdaniel> minion: tell refreshing_drink about portacle
<minion> refreshing_drink: portacle: Portacle is a complete IDE for Common Lisp that you can take with you on a USB stick https://shinmera.github.io/portacle/
<jackdaniel> uhm
<refreshing_drink> i was having a look at winston's book
<refreshing_drink> but this is a cross-over of some old schole code to lisp
<refreshing_drink> just for fun
<refreshing_drink> s/lisp/common lisp
<refreshing_drink> so if i have a cond with multiple conditions, and i want to have multiple statements on the last condition o_o
<refreshing_drink> how do i habdle that
<jackdaniel> just put them there
<jackdaniel> cond has implicit progn for each clause
<jackdaniel> (cond ((foo) a b c) (t x y z))
maxxcan has quit [Quit: maxxcan]
xkapastel has joined #lisp
<refreshing_drink> i wonder why style-warning says the variable procedure is defined but never used
<refreshing_drink> must be a difference in scoping rules in CL than scheme
<jackdaniel> you define local functions with flet, not with defun
<jackdaniel> or if they are recursive you use labels
<refreshing_drink> oh nice
<jackdaniel> there aren't many occasions when you really want to put defun in body of another function
esrse has quit [Ping timeout: 248 seconds]
<refreshing_drink> hmm so flet doesn't allow for recursion
<jackdaniel> yes, that's what labels is for
<refreshing_drink> taking it over to #clnoobs
<refreshing_drink> s/schole/scheme
iskander has quit [Read error: Connection timed out]
iskander has joined #lisp
maxxcan has joined #lisp
maxxcan has quit [Client Quit]
cosimone has joined #lisp
<pjb> jackdaniel: that said, we don't lack T alternatives: ŢţŤťŦŧƬƭƮȚțʇʈΤτТҬҭṪṫṬṭṮṯṰṱẗ⒯ⓉⓣⷮꓔꓕꓝꓞꚌꚍꚐꚑTt𐊗𐋇𐌕
nanoz has quit [Read error: Connection timed out]
<pjb> (I included a pair of F alternatives for false/nil)
<jackdaniel> I'm too dumb to remember that same-looking characters make different symbol names
<jackdaniel> so I'd find it hard to track after writing the code
nanoz has joined #lisp
<pjb> jackdaniel: emacs has C-x = to give info about the character under the cursor.
cosimone has quit [Quit: Leaving]
<jackdaniel> that gives only 13 keypresses to verify that foo is really foo, nice!
<pjb> (defun v (Τ a v₀) (+ (* a Τ) v₀))
<refreshing_drink> why did hoyte stop writing common lisp?
<pjb> Oh, and also, I forgot, the various mathematical alphabets: 𝐭𝒕𝙩𝓉𝓽𝕥𝔱𝗍𝘁𝙩𝚝
<heisig> pjb: I also have (defun δ (i j) (if (= i j) 1 0)).
<refreshing_drink> also, since #clnoobs seems to be sleep
<refreshing_drink> i'm wondering why the following code is complaining about 'skip' and 'procedure' being undefined functions:
<pjb> 𝚂𝚘, 𝚛𝚎𝚊𝚕𝚕𝚢, 𝚝𝚑𝚎𝚛𝚎'𝚜 𝚗𝚘 𝚕𝚊𝚌𝚔 𝚘𝚏 𝚊𝚕𝚝𝚎𝚛𝚗𝚊𝚝𝚒𝚟𝚎𝚜.
<heisig> And (defun eye (m &optional (n m)) (let ((shape (~ 1 m ~ 1 n))) (α #'δ (indices shape 0) (indices shape 1)))).
<heisig> (Actual Petalisp code)
<jackdaniel> he has opened the pandoric box and nobody saw him ever rafter
<no-defun-allowed> (̵̖̜̺̘̦͈̓͂͑͊̌͗̚͟͢Í�͡͡ḑ̹͚̰̮͔̺̋̆̆̾̉͗̂̒̂̆e̛͎͈̹̳͈̋̉͊̑̓̈Ì�̔͞f̶̘͕̠̥̪̫̠͛͋̔Ì�̂͘͡u̴̲̜͕̩̙̭̣Í�̱̟͌̑̇̄͑͑̑̊̃̚n̬̫̠̖̲Ì�͑̌̾͂̓̽͗Í�͜͡ c̸͕̲̰͎̙Ì�̋̈̔̓Å�̸̢̡̭̱̗Í�̎̊̋͟͞ͅͅňÌ�͈͖Ì�̤͆͛̂̄ͅs̶̮̱̜̞͖͚͓̖̃̌̅̊̄͠͞t̢̟Í�̻͊͗͊͊͘͘͟a̢̪͖̙̻̩Í�͗̓̒̈Ì�̈Ì�Ì�Í Í�n̵̮͚͕̪Ì�Ì…Ì…Ì¿Ì�Ì�Í’Ì€Í�Í…t̩̱̘̻͙Ì
cdchapm2 has quit [Remote host closed the connection]
Colleen has quit [Quit: Colleen]
<no-defun-allowed> (̪̜̳̱̦̝͈̳̀͊̆͂͋̅̉͞͝͠ͅl̶̢̳̦̙̯̩͐̊̌́̌͌̿͡a̶͓͉̜͍̹̺̭̰̲̒͋͌̒̉̎m̴̨̢͇̪̜͚̙̲̞̀͋̿́́̍͑̇̿͠b̴̛̙̘͉̫̍̀̃͊̐̔͜͜d̵̛͈͚͉̟̭̀͑̓̾̆͌͘͜a̵̡̞̩̻͙͇͉͑͒̎̈́̄͛́̆̏͘ (̬͙̝̲̝̰̟̞̦̂̄̂̉͑́́͝&̖͖͙̪͈͚̖͔͗̾̎̈́͒̋͢͠r̨̠̙͚̦̝̤̦̭̆͆̎̉͝ȩ̷̛̤̩̤͓͊́̿͗̅̔̉͝͝s̸̗͎̩͇̫͕̙͈̆͂̾̓̅̒̌͟͞͠ͅť̸̞
<no-defun-allowed> v̘̹̯̟͍̜̹̖͎̦́͋̓͛̈ä̡͎̬͇̺̯́̇̒̈́̿͐͒̏̕͘l̙̼̮͈͈̤̊͂̓̓̐̂̏̋͗̚u̴̢͉̠͔̘̣͎̐̈́͊̄͘̚͡͞ẽ̴̯̳͈͋̓̈͂͑͢͟)̴̛̘͇̤͕̱̲̼́̃̈́̍́̈̕͠ͅ)̸̡͙̳̳͓̍̋͆̂̓̍̕̕͢
<semz> obligatory valid perl code remark
<LdBeth> Hello lispy
<no-defun-allowed> I apologise if that comes to IRC as a message and not an attachment.
<no-defun-allowed> Also that may have killed Colleen, but I really can't tell.
<no-defun-allowed> LdBeth: bruh you posted cringe, you're going to lose subscriber
Colleen has joined #lisp
<no-defun-allowed> Sorry Colleen
SaganMan has quit [Ping timeout: 268 seconds]
<pjb> refreshing_drink: also, add (setf blink-matching-paren t show-paren-mode t show-paren-ring-bell-on-mismatch nil) to your ~/.emac
<pjb> +s
<pjb> ~/.emacs
<mfiano> refreshing_drink: He didn't stop writing Common Lisp
zaquest has joined #lisp
shrdlu68 has joined #lisp
<jackdaniel> " (Nobody using pastel colors gets an A.) " :-)
tko has quit [Ping timeout: 276 seconds]
gigetoo has quit [Ping timeout: 268 seconds]
gigetoo has joined #lisp
ljavorsk has quit [Ping timeout: 258 seconds]
<gjvc> lisp in small pieces looks like a great book
<jackdaniel> it is
nanoz has quit [Read error: Connection reset by peer]
nanoz has joined #lisp
ljavorsk has joined #lisp
EvW1 has joined #lisp
<gjvc> i'm going to get the hardcover version
<jackdaniel> wasn't it like 5 times more expensive than soft cover?
<gjvc> yeah, but i strongly prefer hardcover books
<jackdaniel> I've replaced soft cover in my copy with a hard one for around $5
<jackdaniel> with a bonus point of having my own cover design
amerlyq has joined #lisp
<jackdaniel> English word for guys doing it is a "bookbinder" apparently
<LdBeth> I prefer digital books
<Insanity_> For books related to programming it depends heavily on the book. "The Go programming language" book had all source code snippets added as images instead of text, which works really well. But I've had books that embedded the code as normal text which does not make for a great reading experience
tko has joined #lisp
<LdBeth> That sucks. Wouldn’t they even bother to change the font
<beach> refreshing_drink: #clnoobs has been replaced by #clschool.
<gjvc> also, beware publishers like "lightning source" -- heard of them?
<Insanity_> I haven't
<Insanity_> LdBeth: Changing the font is not really a solution. Because you can select the font you want in digital books. Sometimes they'd italicize it, but the formatting is still fubar. Best to use images
tko has quit [Ping timeout: 276 seconds]
patrixl has left #lisp ["ERC (IRC client for Emacs 26.2)"]
<jdz> Copy/pasting from images is not very straight-forward.
<jdz> I mean code from images.
<Insanity_> Yeah but.. it's also not less straight-forward than with dead-tree books :P
<no-defun-allowed> I'm surprised typesetting code in a format that just stores strings and positions is hard, honestly.
<LdBeth> web browser is not typesetting engine, after all
<jdz> It's not very hard. SVG comes to mind.
<Insanity_> Perhaps I've just not been lucky with the books I've read :)
<jdz> PostScript and PDF have been around for a while.
<mfiano> The worst thing is the typesetting in most programming digital books converts quotes to smart quotes. So many times have I been fooled by quoted s-expressions.
orivej has quit [Ping timeout: 272 seconds]
<LdBeth> actually most (TeXed) PostScript files only has a low resolution font
<refreshing_drink> mfiano: are you sure? i didn't see any new lisp for the last few years on his github
<refreshing_drink> pjb: thanks i will take a look when i get more time to code today
<refreshing_drink> beach: thanks
<no-defun-allowed> The biggest pain I've had with typesetting is TeX converts ligature character pairs like "fl" to one character and encodes that weird, so copying "flobicate" gives me "obicate".
<mfiano> refreshing_drink: I am sure. I talked to him recently. He uses it for personal projects which he does not open source.
<no-defun-allowed> (Now Firefox does ligatures on proportional characters too, god knows why.)
<LdBeth> #'no-defun-allowed: that could be a problem of PDF reader you choose
<no-defun-allowed> Hmm, I think it's happened in Preview.app and evince at the least.
<refreshing_drink> mfiano: oh nice. he should put more lisp out in the open :p
lalitmee has quit [Read error: Connection reset by peer]
<LdBeth> Maybe I'm wrong, I don't know how texts are embedded in PDF
<mfiano> Let Over Lambda is not a very practical book. It's a "look what you can do with Lisp, but really shouldn't" type of book.
<jackdaniel> so he did not open the pandoric box after all ,)
<LdBeth> but apprently Preview.app can correctly handle ligatured ffi produced by tex
varjag has quit [Ping timeout: 245 seconds]
<LdBeth> mfiano: sort like the Dragon Book "Compilers"
<mfiano> Nah, that's just out-dated. There's a difference.
<refreshing_drink> mfiano: still it is nice to see a lisper use lisp proudly in public on a git repo :p
<LdBeth> I think at the days LOL was composed these macrologies are common
<mfiano> Early on his justification for not using earmuffs around special variables sets the tone for the rest of the book. Like, reader macros to do odd things where a regular macro would have sufficed, or that every function in the book relies heavily on anaphors. Not something you really want to do if others are reading/using your code.
<LdBeth> it's like arguing "xxx considered harmful"
<mfiano> The Dragon book is still my goto reference, among two others for compiler theory though. It is pretty valuable to me.
<LdBeth> If one wants to know how today's industrial strength compilers work, yes.
<refreshing_drink> does it have things that a lisper would find useful, the dragon book?
<LdBeth> Yes if you want to write a lisp compiler
<LdBeth> not a toy one, but also not a very advanced one
* heisig looks how today's industrial strength compilers work... compiler segfaults. Oh well...
<LdBeth> the other two books fit more onto advenced compiler technologies
<mfiano> Such as?
<LdBeth> register allocation algrithoms
<LdBeth> CPS transformation
<mfiano> The latest edition has JIT and other newer things.
<mfiano> Register allocation algorithms would be moreso for an assembler, no?
<LdBeth> actually it's for program loader/linker
<LdBeth> link time optimize
<no-defun-allowed> heisig: Which compiler? So far I have only ever segfaulted the CPython interpreter for no good reason.
papachan has joined #lisp
<heisig> no-defun-allowed: The Intel C/C++ compiler is a good candidate.
<heisig> LLVM also has a lot of potential for segfaults once you leave the beaten path.
dddddd has joined #lisp
<no-defun-allowed> You could probably leak kernel memory using the Intel C compiler if it's anything like their other products.
<drmeister> heisig: Bike has figured out how to trap segfaults in clasp
<heisig> I didn't manage to crash GCC, yet. But I once got a very polite apology that it couldn't handle my (standard compliant) code.
<heisig> But for now I have a very elegant workaround for these problems. I use SBCL as my main compiler :)
<refreshing_drink> LdBeth: what other 2 books
<dlowe> good thing sbcl doesn't have any bugs!
<drmeister> Certain kinds of problems - like dereferencing null I have been able to do again and again without the session becoming unstable.
<drmeister> Memory corruption though - I wouldn’t like to spend much time in a Common Lisp session with corrupt memory. Brrrr
<jackdaniel> "you need more them bits." \n ldb>
<LdBeth> refreshing_drink: whale book; tiger book
lucasb has joined #lisp
<drmeister> I have managed to crash clang and ld
<refreshing_drink> LdBeth: what are the whale book and tiger book? are they useful for lisp too?
<heisig> dlowe: Yes, Lisp compilers have no bugs :D They only have happy little accidents.
<LdBeth> refreshing_drink: they're not particularly instersting if you're not gonna write compilers
<surrounder> bob heisig
mindCrime_ has joined #lisp
ldb has joined #lisp
<refreshing_drink> LdBeth: i'm interested
<ldb> who's calling me?
<mfiano> Happy little accidents occur when traversing a little tree?
* ldb summoned
<ck_> ldb: which pronunciation do you prefer? ['lidib] or ['liduhb] or ['el'dee'bee]
<mfiano> eh the whale book is pretty dated and doesn't cover a lot of the modern techniques
<jonatack> mfiano: sorry to jump in, WDYT of Cooper and Torczon, Engineering a Compiler, 2nd Edition
EvW1 has quit [Ping timeout: 264 seconds]
<ggole> EaC is a bit unfocused but has a lot of good material
<mfiano> jonatack: I have it, but I haven't read enough of it to comment
<ldb> ck_: load byte
<jonatack> ggole: mfiano: ty
frgo has joined #lisp
<jonatack> jonatack: mfiano: saaaame
varjag has joined #lisp
ldb has quit [Ping timeout: 244 seconds]
Bike has joined #lisp
thawesWork has joined #lisp
ljavorsk_ has joined #lisp
ljavorsk has quit [Ping timeout: 245 seconds]
caoliver has joined #lisp
cosimone has joined #lisp
<caoliver> In trying to build SBCL 1.5.6, I'm running into this with docs: The documented contrib sb-aclrepl seems to have failed its tests.
<caoliver> Any clues?
ldb has joined #lisp
<papachan> i just tried to install latest sbcl but i have "src/runtime/sbcl not found, aborting installation."
<beach> caoliver: You might want to ask in #sbcl or on the mailing list.
<papachan> beach oh thanks
<Xach> papachan: did you download a binary release of sbcl, or the source?
<papachan> source
<papachan> i just take a look at logs: coreparse.c:49:11: fatal error: zlib.h: No such file or directory
shrdlu68 has quit [Ping timeout: 245 seconds]
<ck_> drmeister: did that LOOP / FOR / WHILE / FOR story have an ending?
ldb has quit [Ping timeout: 248 seconds]
<Xach> papachan: aha
ldb has joined #lisp
<Xach> caoliver: for what it's worth, no sb-aclrepl on 1.5.6 sources here. what do your build logs say?
<LdBeth> papachan: to compile sbcl from source, you need a working common lisp installed
ldb has quit [Client Quit]
<scymtym> caoliver: did you build sbcl before trying to build the documentation?
tko has joined #lisp
<papachan> LdBeth ah yeah. i have a previous version running
<caoliver> Wait a sec. I found a post suggesting an earlier problem in the compile. I'm running my build script which has done the right thing up to 1.4.12 under logsave, and maybe I can find an earlier barf.
<caoliver> If so, I'll try asking the right thing. Sheesh! ;-P
<caoliver> I have 1.4.9 bin/core as a build kit. Maybe I need something later.
<caoliver> /usr/bin/texi2dvi: etex exited with bad status, quitting.
<papachan> hmm now i have this:
<papachan> sbcl: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by sbcl)
<caoliver> Hmmm... Nothing sticks out in the actual build.
jhei is now known as jeremyheiler
<caoliver> That's the log capture. Am I missing anything?
warweasle has joined #lisp
jeremyheiler is now known as jhei
X-Scale has quit [Read error: Connection reset by peer]
X-Scale has joined #lisp
ljavorsk_ has quit [Ping timeout: 272 seconds]
JohnMS has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
shifty has joined #lisp
shifty has quit [Remote host closed the connection]
shifty has joined #lisp
iskander has quit [Ping timeout: 244 seconds]
iskander has joined #lisp
shifty has quit [Ping timeout: 246 seconds]
pierpal has quit [Remote host closed the connection]
dale_ has joined #lisp
dale_ is now known as dale
zaquest has quit [Remote host closed the connection]
rtmpdavid has joined #lisp
zaquest has joined #lisp
alca has quit [Ping timeout: 258 seconds]
heisig has quit [Quit: Leaving]
orivej has joined #lisp
dddddd has quit [Quit: Hasta otra..]
dddddd has joined #lisp
smazga has joined #lisp
jprajzne has quit [Remote host closed the connection]
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
alca has joined #lisp
shrdlu68 has joined #lisp
alca has quit [Ping timeout: 272 seconds]
alca has joined #lisp
karlosz has joined #lisp
Oladon_work has joined #lisp
edgar-rft has quit [Quit: Leaving]
Inline has joined #lisp
karlosz has quit [Quit: karlosz]
ravenous_ has joined #lisp
ravenous_ has quit [Client Quit]
lalitmee has joined #lisp
papachan has quit [Ping timeout: 248 seconds]
cosimone has quit [Quit: Leaving]
lalitmee has quit [Ping timeout: 246 seconds]
rippa has joined #lisp
bendersteed has joined #lisp
lalitmee has joined #lisp
lalitmee has quit [Ping timeout: 248 seconds]
gareppa has joined #lisp
gareppa has quit [Remote host closed the connection]
<drmeister> ck_: Yeah - if you write conforming LOOP code it's (LOOP FORs... termination_tests... body..)
gxt has joined #lisp
bendersteed has quit [Remote host closed the connection]
<ck_> I guess I have a lot of non-conforming code lying around then :/
asdf_asdf_asdf has joined #lisp
flamebeard has quit []
lalitmee has joined #lisp
gxt has quit [Ping timeout: 260 seconds]
gxt has joined #lisp
lalitmee has quit [Max SendQ exceeded]
lalitmee has joined #lisp
orivej has quit [Ping timeout: 258 seconds]
<Xach> I wish there was an easy way to swap in a strict loop in SBCL
<Xach> I would use it in Quicklisp build testing for fun
davr0s has joined #lisp
davr0s_ has joined #lisp
<beach> You could try SICL LOOP. It is strict.
<Inline> oh man
<Inline> today i saw mcclim on github and guess what
<beach> What?
<Inline> all my edits way way back then have seem to propagated into it
<Inline> like naming stuff like climb instead of climi
<Inline> no idea how that could happen....
sonologico has joined #lisp
<Inline> seems back then git edits made locally got propagated somehow to the master
aautcsh has joined #lisp
<Inline> must have been a git bug or so from early era maybe ?
<ck_> I don't follow what you're saying
nowhere_man has joined #lisp
<beach> Me neither.
<Xach> beach: I'm not sure how to put that into SBCL.
<Xach> Maybe it's as simple as loading it? I have not tried.
<beach> It has an ASDF system.
<beach> It compiles all the support code.
<beach> Then you just need to define the macro
<beach> Which will trip the package lock, but that can be avoided.
<Xach> (defmacro cl:loop (&rest args) `(sicl:loop ,@args))?
<beach> Not quite.
<beach> Let me check for you ...
<beach> Oh, you should be able to just build sicl-loop.
parab has joined #lisp
<beach> That one will define the macro as well.
varjag has joined #lisp
lalitmee has quit [Remote host closed the connection]
m00natic has quit [Remote host closed the connection]
<beach> Seems to work.
<Xach> beach: what do you mean by "define the macro"? In the CL package?
<beach> Yes.
<beach> It is native SICL code after all.
gioyik has joined #lisp
<beach> But if you only build the -support system, you can define the macro LOOP in some other package.
<beach> Xach: I need to go fix dinner. I might check back later in case you run into problems.
shrdlu68 has quit [Ping timeout: 244 seconds]
LiamH has joined #lisp
yoeljacobsen has joined #lisp
shrdlu68 has joined #lisp
yoeljacobsen has quit [Ping timeout: 245 seconds]
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
Inline has quit [Quit: Leaving]
EvW has joined #lisp
jello_pudding has quit [Remote host closed the connection]
shwouchk has joined #lisp
Insanity_ has quit [Quit: Connection closed for inactivity]
gxt has quit [Ping timeout: 260 seconds]
asdf_asdf_asdf has quit [Remote host closed the connection]
orivej has joined #lisp
iovec has joined #lisp
hiroaki has joined #lisp
yoeljacobsen has joined #lisp
<ck_> "[Condition of type SICL-LOOP::INVALID-CLAUSE-ORDER]".
<ck_> Many such cases.
Ven`` has joined #lisp
<Xach> ck_: i bet there are a lot in the wild because of mit loop
ravenous_ has joined #lisp
<ck_> Xach: well, have your error logs become short enough for you to embark on this endeavour? :)
<Xach> so short
shrdlu68 has quit [Ping timeout: 246 seconds]
shrdlu68 has joined #lisp
sjl_ has joined #lisp
orivej has quit [Ping timeout: 268 seconds]
shrdlu68 has quit [Ping timeout: 245 seconds]
shrdlu68 has joined #lisp
Inline has joined #lisp
<beach> Xach: Did you manage to make it work?
cmatei has joined #lisp
* beach hopes so.
<beach> Xach: I'm off to spend time with my (admittedly small) family. I'll be back tomorrow morning (UTC+2).
chewbranca has quit [Changing host]
chewbranca has joined #lisp
cl-arthur has joined #lisp
ggole has quit [Quit: Leaving]
EvW has quit [Ping timeout: 264 seconds]
Nomenclatura has joined #lisp
orivej has joined #lisp
kajo has quit [Ping timeout: 250 seconds]
serviteur has joined #lisp
varjag has quit [Remote host closed the connection]
varjag has joined #lisp
Volt_ has quit [Ping timeout: 272 seconds]
sauvin has quit [Read error: Connection reset by peer]
pnp has joined #lisp
serviteur has quit [Quit: ERC (IRC client for Emacs 26.3)]
edgar-rft has joined #lisp
gioyik has quit [Ping timeout: 272 seconds]
milanj has quit [Quit: This computer has gone to sleep]
random-nick has quit [Ping timeout: 245 seconds]
gareppa has joined #lisp
gioyik has joined #lisp
pnp has left #lisp [#lisp]
scymtym has quit [Ping timeout: 250 seconds]
gioyik has quit [Ping timeout: 248 seconds]
yoeljacobsen has quit [Quit: Leaving]
sonologico has quit [Remote host closed the connection]
yoeljacobsen has joined #lisp
sonologico has joined #lisp
yoja has joined #lisp
yoeljacobsen has quit [Client Quit]
yoja has quit [Client Quit]
<Xach> Ok, this should be fun. I will try building everything with sicl loop loaded as cl:loop.
sonologico has quit [Remote host closed the connection]
yoeljacobsen has joined #lisp
sonologico has joined #lisp
yoja has joined #lisp
yoja has quit [Remote host closed the connection]
yoeljacobsen has quit [Remote host closed the connection]
yoeljacobsen has joined #lisp
Volt_ has joined #lisp
yoeljacobsen has quit [Client Quit]
yoeljacobsen has joined #lisp
cosimone has joined #lisp
cosimone has quit [Remote host closed the connection]
random-nick has joined #lisp
cosimone has joined #lisp
<ck_> looking forward to the results!
myrkraverk has quit [Ping timeout: 258 seconds]
myrkraverk has joined #lisp
sonologico has quit [Remote host closed the connection]
sonologico has joined #lisp
yoeljacobsen has quit [Ping timeout: 248 seconds]
amerlyq has quit [Quit: amerlyq]
sonologico_ has joined #lisp
sonologico has quit [Ping timeout: 252 seconds]
sonologico_ has quit [Remote host closed the connection]
sonologico_ has joined #lisp
shrdlu68 has quit [Ping timeout: 248 seconds]
<jasom> Quick poll; how would you represent a sum type in lisp?
shrdlu68 has joined #lisp
sonologico_ has quit [Remote host closed the connection]
sonologico_ has joined #lisp
Ven`` has quit [Quit: Textual IRC Client: www.textualapp.com]
rippa has quit [Ping timeout: 245 seconds]
Ven`` has joined #lisp
alexanderbarbosa has quit [Remote host closed the connection]
rippa has joined #lisp
shifty has joined #lisp
sonologico_ has quit [Remote host closed the connection]
Insanity_ has joined #lisp
<semz> a cons cell with car being the tag i'd say
scymtym has joined #lisp
<flip214> jasom: only a single number? or a sum over vectors? or sum, count, and squared sum for statistics?
<jasom> a sum type, like rust or ML has, where it's a structure that may have different morphologies
<flip214> perhaps a struct for debugging, and when the bugs are ironed out switch the type definition over to a plain NUMBER...
<jasom> rust calls them enum's; C would used a tagged union.
<jasom> I'm considering just using a defstruct of type list; then I could destructure on them easily with something like optima.
thawesWork has quit [Ping timeout: 246 seconds]
<Bike> i would represent a sum as an (or ...) type, where the members are structs (or less)
<jasom> Bike: that was my other thought.
<borodust> question: lets say i wanted to map C structs to CFFI verbatim, is there a way in CFFI to define inner anonymous structs? if there's none, lets say i would define inner structs separately and use (:struct type) in defcstruct for those no-more-anonymous fields. Is there a sane and pleasant way to access these fields of inner structs w/o going for direct referencing of a foreign memory?
<Bike> since types aren't as strict in lisp, we don't have as much need to refer to the sum as a whole as you do in haskell or whatever
<borodust> *i want
<jasom> borodust: I've always just created a lisp name for the anonymous struct.
<borodust> jasom: that's alright (kinda), but can i access it by having a pointer for the enclosing struct w/o using mem-ref and friends?
<jasom> borodust: foreign-slot-value or with-foreign-slots
<borodust> foreign-slot-value would return a pointer to the inner struct?
<borodust> (inner anonymous struct)
<borodust> asking for a friend ;p
<jasom> foreign-slot-pointer to get the pointer to the inner struct
<jasom> then foreign-slot-value to get a field from it.
<borodust> i see
<jasom> oh, actually f-s-v gives you a pointer for aggregate slots anywas
<jasom> so no need to use f-s-p
<borodust> that might work, thanks!
<jasom> https://common-lisp.net/project/cffi/manual/cffi-manual.html#foreign_002dslot_002dvalue "For aggregate slots, a pointer inside the structure to the beginning of the slot’s data is returned. In C, this would be expressed as &ptr->slot."
Aruseus has joined #lisp
<borodust> yeah, i should have looked better :/
<borodust> *into the docs
<jasom> Bike: as a step back; this is a data-description language for tree-like structures, designed for ML and friends. Would you use structures for tree nodes or conses or something else?
<borodust> jasom: thanks much
<jasom> borodust: np
<jasom> Bike: I need to sufficiently preserve the types so as to allow for serialization to a standardized format.
<jasom> Bike: the base types are just integer, symbol, string, option(any type), sequence(any type).
<jasom> If I make the sequence be always a vector, I can represent the tree shap unambiguously with conses, but it may still be worth it to have structures.
<Bike> i don't usually use conses for anything permanent, unless it really is just a binary tree
<jasom> definitely not a binary tree
<jasom> I'll do structs then; can use etypecase to switch on the type when walking
gioyik has joined #lisp
vlatkoB has quit [Remote host closed the connection]
<jasom> aha, I remember now, I was considering using conses because the product types can have unnamed fields. so e.g. to define a cons type, you could do either of: Cons(sexpr, sexpr) or Cons(sexpr car, sexpr cdr)
<jasom> not a huge deal, I can just have the Nth unnamed field be named field-N
iovec has quit [Quit: Connection closed for inactivity]
gioyik has quit [Ping timeout: 244 seconds]
permagreen has quit [Remote host closed the connection]
gravicappa has quit [Ping timeout: 245 seconds]
Lord_of_Life_ has joined #lisp
Lord_of_Life has quit [Ping timeout: 258 seconds]
Lord_of_Life_ is now known as Lord_of_Life
gioyik has joined #lisp
gareppa has quit [Quit: Leaving]
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xkapastel has quit [Quit: Connection closed for inactivity]
<jasom> hmm; if I'm defining a type at runtime, do I use eval?
<Bike> yeah, that's all you've got.
<Bike> if you're doing this at runtime i might have to take back what i said about using defstruct, though
EvW1 has joined #lisp
<jasom> I guess I can hook into asdf to process the file and generate lisp source
tko has quit [Ping timeout: 264 seconds]
varjag has quit [Ping timeout: 246 seconds]
nanoz has quit [Ping timeout: 268 seconds]
zulu-inuoe has quit [Quit: Leaving]
Jesin has quit [Quit: Leaving]
cosimone has quit [Quit: Leaving]
milanj has joined #lisp
cosimone has joined #lisp
akoana has joined #lisp
xkapastel has joined #lisp
Bike has quit [Quit: Bike]
random-nick has quit [Ping timeout: 245 seconds]
<no-defun-allowed> What library should I use for naive-Bayes filtering?
Jesin has joined #lisp
<no-defun-allowed> Weird how the PCL Bayes implementation isn't on Quicklisp, like say PAIProlog.
<pjb> jasom: what's the point of defining a type at runtime?
<no-defun-allowed> .....or it is, under the name pcl-spam.
Volt_ has quit [Ping timeout: 244 seconds]
<jasom> pjb: I may compile a file later on that uses it?
<pjb> Notice that load takes a (or stream …)
Oladon_work has quit [Ping timeout: 260 seconds]
mindCrime_ has quit [Ping timeout: 246 seconds]
hiroaki has quit [Ping timeout: 246 seconds]
ltriant has joined #lisp
<slyrus> is there anything like with-slots for working with alists?
<White_Flame> no, but it wouldn't be that difficult to write
Volt_ has joined #lisp
<slyrus> indeed
<slyrus> then again it's always easy to make subtle mistakes writing macros and good to use a tried and true one (if one exists).
anewuser has joined #lisp
sjl_ has quit [Ping timeout: 246 seconds]
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
cl-arthur has quit [Read error: No route to host]
cosimone has quit [Max SendQ exceeded]
<aeth> slyrus: for plists you can use destructuring-bind, treating the plists as keyword arguments, using &key.
<aeth> for alists, there's nothing afaik
Aruseus has quit [Remote host closed the connection]
Bike has joined #lisp
karlosz has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
LiamH has quit [Quit: Leaving.]
smazga has quit [Quit: leaving]
<remexre> I've got a macro with side effects, and it doesn't look like they're preserved across runs unless I touch a file early in the asd file's components list; is there something I forgot to set here?
alexanderbarbosa has joined #lisp
<no-defun-allowed> I wouldn't recommend using macros with side effects. It would be better to perform the side effects in the code emitted.
buffergn0me has quit [Read error: Connection reset by peer]
iarebatman has quit [Ping timeout: 252 seconds]
buffergn0me has joined #lisp
<remexre> I fully admit I'm doing something awful :P is there any way to get this to work though?
akanouras has quit [Ping timeout: 252 seconds]
iarebatman has joined #lisp
teej has joined #lisp
akanouras has joined #lisp
Ricchi has quit [Remote host closed the connection]
tko has joined #lisp
<slyrus> Ok, here's my with-assoc: https://gist.github.com/slyrus/5c558d268248c7935c25d50f985a9416 comments/suggestions welcome!
<Bike> i'd bind the assoc pairs beforehand so that you don't do assocs repeatedly for the same variables
semz has quit [Remote host closed the connection]
PuercoPop has quit [Ping timeout: 252 seconds]
tko has quit [Ping timeout: 272 seconds]
<jasom> remexre: macros are expanded at compile-time; ASDF isn't going to recompile or reload a file unless it needs to.
<jasom> remexre: if you want something to happen every time a system is reloaded, perhaps you could define an :around method for your ASDF system?
PuercoPop has joined #lisp
<jasom> remexre: oh, I misread; if you want it to happen at load-time, have the macro emit the side effect
<slyrus> Bike: I'm not sure I follow. before what?
<remexre> like I'd want to build a function after the definitions
<Bike> before the body is executed
<jasom> e.g. instead of (defmacro foo (print "hi")) (defmacro foo `(print "hi"))
<remexre> so I've basically got (defthing foo (bar baz) ...body...)
<jasom> remexre: paste what you have?
<remexre> which is saying "run foo after bar and baz"
<remexre> which are defined elsewhere
<remexre> and I've got a (main-loop) macro which emits the actual loop body with the sorted functions
<remexre> https://p.acm.umn.edu/WzVaAUapAAA= is an older version of the macro (which is a bit more complicated than described above); I'm currently integrating the toposort
<slyrus> Bike: isn't that what I'm doing? or am I misunderstanding what you mean by "before"?
<jasom> remexre: https://github.com/jasom/cl-fccs/blob/master/src/route.lisp is an example of what I've done for something similar
torbo has joined #lisp
<Bike> slyrus: symbol-macrolet doesn't evaluate anything. (symbol-macrolet ((a (b))) (values a a)) is like (values (b) (b))
<remexre> jasom: is the eval-when the difference?
<jasom> remexre: look at defapprule which defines a function and puts it in a hash table, then expand-app-rules creates a lamda-expression for doing an optima match
<jasom> remexre: nope, notice that there are no side-effects in my macro expansion
<remexre> er, I mean the eval-when in defapprule's expansion
<slyrus> Bike: yeah, but don't I need it not evaluated so that I can setf my alist?
<remexre> as opposed to having side effects
<Bike> slyrus: that's why i said you bind the pairs beforehand - then (setf a b) expands into (setf (cdr pre-evaluated-pair) b)
<jasom> remexre: the eval-when is needed so that the hash-table is initialized when the expand-app-rules is compiled
<Bike> slyrus: (also, this won't work if the entry isn't already in the alist, but i assume you know that)
tko has joined #lisp
<remexre> jasom: er, I guess I mean, is asdf detecting that it needs to run the eval-when effects even when it's not actually doing recompilation? whereas it doesn't detect that for macro side-effects?
<jasom> remexre: you'll also want to change *main-loop-modules* to defparameter so that you don't end up with a constantly growing list
<jasom> remexre: this has little to do with asdf; absent ASDF, if you did compile-file and loaded the .fasl you would have the same issue
<remexre> jasom: that's why I'm not just pushing on a pair in defmodule; I'm allowing/expecting redefinition
<remexre> and I don't wanna wipe out REPL-defined modules on reload
<remexre> jasom: s/asdf/the compiler/ then?
<jasom> the loader, not the compiler, but yes
<remexre> also is there a reader macro / other idiom for ',foo?
<jasom> the side-effects of forms are not guaranteed to happen at compile time, so e.g. (setf *foo* 'bar) at the toplevel may not happen during compilation.
orivej has quit [Ping timeout: 248 seconds]
<jasom> remexre: other than ',foo you mean?
<remexre> yeah
<jasom> not sure I understand the question. `(',foo) will evaluate to ('<the value of foo>)
<jasom> if you are talking about https://github.com/jasom/cl-fccs/blob/master/src/route.lisp#L45 "name" is a variable holding a symbol, so there needs to be quoting in the gethash call; `(gethash ',foo *some-hash*) will expand to a gethash of the quoted value of foo...
<remexre> Sure, I get what it does
<remexre> I'm asking if there's a more pleasant way to write it
CrazyEddy has quit [Ping timeout: 245 seconds]
* jasom was never bothered by it so didn't ever check
<jasom> you can always use (quote ,foo) if you prefer
<remexre> Eh
<slyrus> Bike: seems like a lot of work :)
<Bike> slyrus: left a comment
<slyrus> wow, thanks!