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
lisp123 has joined #commonlisp
irc_user has joined #commonlisp
lisp123 has quit [Ping timeout: 260 seconds]
torbo has joined #commonlisp
azimut_ has joined #commonlisp
azimut has quit [Ping timeout: 240 seconds]
torbo has left #commonlisp [#commonlisp]
fitzsim has quit [Remote host closed the connection]
<drakonis> weary: oh?
akoana has quit [Quit: leaving]
morganw has quit [Remote host closed the connection]
<drakonis> well, that post seems to be downvoted to oblivion
<drakonis> flagged actually
Lord_of_Life has quit [Ping timeout: 258 seconds]
<weary> actually, it was mod-killed
<weary> > So true! Also, there are no decent UI frameworks for Lisp, so it's impossible to build a full stack app that looks good in a modern browser without adding a TS or JS web component layer. And... There's no modern IDE for Lisp.
<weary> my favorite comment though
Lord_of_Life has joined #commonlisp
<weary> the browser is the *only* place where it's trivial to make CL apps look really good
<drakonis> lol
mrcom has quit [Quit: Leaving]
mrcom has joined #commonlisp
<Josh_2> If you haven't made it in react is it *really* a website??
<seok-> programming in c vs programming in c on lisp with CFFI
<seok-> which do you prefer?
<Josh_2> Just write lisp simple az
<mfiano> What's a decent way to check if a plist with keyword symbol keys have any duplicate keys, and to return which ones?
<mfiano> I'll just do the traditional hashset method
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 246 seconds]
Bike has quit [Quit: Lost terminal]
Bike has joined #commonlisp
Guest74 has joined #commonlisp
<yitzi> mfiano: maybe get-properties as a start.
waleee has quit [Ping timeout: 255 seconds]
pranavats has left #commonlisp [Error from remote client]
<beach> Good morning everyone!
JoshYoshi has joined #commonlisp
Josh_2 has quit [Ping timeout: 255 seconds]
pranavats has joined #commonlisp
<irc_user> good morning beach!
<beach> irc_user: Are you new here? I don't recognize your nick.
<irc_user> beach: I'm learning scheme right now so I figured I'd join all the chats and I couldn't resist saying good morning...
<beach> I see. Welcome!
<irc_user> Thank you :)
<beach> What made you decide to learn Scheme?
<irc_user> The lisp groups seem so welcoming... A lot of the other ones I'm in are like warzones XD
<beach> Ah, yes, so I hear.
<irc_user> Well after a lot of research on what language to try for next projects everything kept pointing back to lisp, and I was always a fan of this one recording of a talk where a guy talked about "the most beautiful piece of code" which happened to be in scheme so I figured why not
<beach> Sounds good.
<irc_user> I'm open to common lisp too, but I want to read SICP so
<beach> I hear some people do the SICP exercises in Common Lisp.
<irc_user> Haha, well I'll probably try CL apart from SICP anyways. Clojure too.
<beach> Good idea.
<irc_user> I was trying to quickly find out if the "magic of lisp" so to speak was real or just hype, but then I got caught up in a bunch of recursion stuff haha.
<beach> I understand. The "magic" of Common Lisp is not so much recursion, but perhaps more macros and CLOS.
<irc_user> Thanks for the direct answer. Yeah the recursion was just because I was reading TLS. Since Scheme has macros too, I'm assuming the main differentiating factor with CL is that it has CLOS?
<beach> I am probably no longer the right person to answer that, because I haven't followed the evolution of Scheme since I switched some 25 years ago. :)
<irc_user> If there is a book that would potentially get me to realize the "magic" I would love to hear a recommendation. I understand I'd still have to put the work in though, of course.
<irc_user> Ah :P
<Bike> scheme and lisp have very different macro systems, though they're used for similar purposes.
<beach> For Common Lisp, we usually recommend "Practical Common Lisp" to people who already know some programming.
yagamisato has quit [Ping timeout: 240 seconds]
<irc_user> Bike: Oh okay, good to know. Thanks
<beach> minion: Please tell irc_user about PCL.
yagamisato has joined #commonlisp
yagamisato has joined #commonlisp
<minion> irc_user: please see 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).
yagamisato has quit [Changing host]
<irc_user> Ah yes I've read the first few pages of that, if that's the book to read I think I have the motivation now to finish it. Thanks :)
<beach> Pleasure.
Bike has quit [Quit: sleep]
aartaka has quit [Ping timeout: 258 seconds]
knusbaum has quit [Ping timeout: 246 seconds]
aartaka has joined #commonlisp
knusbaum has joined #commonlisp
<rotateq> beach: Do you have an emacs shortcut for the "Are you new here? ..."?
<beach> Yes, an abbrev.
<rotateq> I've bet so, as is written in your article about Kaizen on metamodular.
<beach> Heh, I see.
yagamisato has quit [Ping timeout: 258 seconds]
yagamisato has joined #commonlisp
yagamisato has quit [Changing host]
yagamisato has joined #commonlisp
pranavats has left #commonlisp [#commonlisp]
mrcom has quit [Quit: Leaving]
<beach> rotateq: In fact, I use "runh" as the abbrev.
<rotateq> Ah okay. (even if I do not know that)
<beach> It is important to choose an abbrev so that it doesn't correspond to a word that you would normally type.
pillton has joined #commonlisp
<beach> So choosing (say) "cl" for Common Lisp would be a bad idea.
<beach> Or "clhs" for Common Lisp HyperSpec.
<rotateq> Yes indeed it would be.
jack_rabbit has joined #commonlisp
knusbaum has quit [Ping timeout: 255 seconds]
Oladon has joined #commonlisp
hashfunc14e has joined #commonlisp
taiju has joined #commonlisp
hashfunc14e has quit [Remote host closed the connection]
mrcom has joined #commonlisp
pranavats has joined #commonlisp
ttree has quit [Ping timeout: 240 seconds]
tok has joined #commonlisp
rotateq has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.1)]
scymtym has joined #commonlisp
frgo has quit [Ping timeout: 244 seconds]
bilegeek has joined #commonlisp
pranavats has left #commonlisp [#commonlisp]
Oladon has quit [Quit: Leaving.]
tok has quit [Remote host closed the connection]
tok has joined #commonlisp
Cymew has joined #commonlisp
shka has joined #commonlisp
mrcom has quit [Quit: Leaving]
White_Flame has quit [Ping timeout: 244 seconds]
White_Flame has joined #commonlisp
mrcom has joined #commonlisp
random-nick has joined #commonlisp
pranavats has joined #commonlisp
mmk2410_ has joined #commonlisp
pve has joined #commonlisp
perrierjouet has quit [Ping timeout: 246 seconds]
mmk2410 has quit [Ping timeout: 276 seconds]
<iceman[m]> SICP released a javascript edition
<iceman[m]> ew
<iceman[m]> Javascript is not bad per se
<iceman[m]> but they wrote THE Book in THAT language
<ck_> I think they wrote it in english
<mfiano> I think this discussion belongs in #lisp
<iceman[m]> ck_: :)
<iceman[m]> mfiano: Sure
Furor is now known as Colere
<contrapunctus> Why does `eclector.concrete-syntax-tree:read` remove package prefixes for the value in the %RAW slot?
<contrapunctus> e.g. `(cl:in-package ...)` became `(in-package ...)`
perrierjouet has joined #commonlisp
White_Flame has quit [Ping timeout: 244 seconds]
taiju has quit [Ping timeout: 255 seconds]
Dynom has joined #commonlisp
bilegeek has quit [Ping timeout: 255 seconds]
lisp123 has joined #commonlisp
frgo has joined #commonlisp
frgo has quit [Ping timeout: 255 seconds]
lisp123 has quit [Ping timeout: 255 seconds]
White_Flame has joined #commonlisp
<beach> contrapunctus: What makes you think it "removes the package prefix"?
<contrapunctus> beach: just that I don't see it in the value of the %RAW slot 🤔️
<ck_> crystal ball says: your printer prints them that way because of the way that your current package is
<contrapunctus> ah
<beach> contrapunctus: When the reader creates a symbol, it either interns it in some package or it creates an uninterned symbol. I am pretty sure it creates a symbol in the CL package in this case. If you don't see the package prefix, it's because of the way you print it.
<contrapunctus> I see
bilegeek has joined #commonlisp
aartaka has quit [Ping timeout: 258 seconds]
aartaka has joined #commonlisp
tok has quit [Ping timeout: 246 seconds]
lisp123 has joined #commonlisp
frgo has joined #commonlisp
roklein has joined #commonlisp
tok has joined #commonlisp
causal has quit [Quit: WeeChat 3.5]
bilegeek has quit [Quit: Leaving]
frgo has quit []
jmdaemon has quit [Ping timeout: 244 seconds]
kathe has joined #commonlisp
kathe has quit [Client Quit]
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
tok has quit [Ping timeout: 255 seconds]
tok has joined #commonlisp
tok has quit [Ping timeout: 246 seconds]
pillton has quit [Remote host closed the connection]
tok has joined #commonlisp
pranavats has left #commonlisp [#commonlisp]
<ecraven> is there a good portable common lisp pretty printer?
<beach> Not sure how portable it is, but yitzi wrote Inravina.
<beach> I had a brief look at the one that is typically used in current Common Lisp systems, and was disgusted by the code. So yitzi took on the task of writing a better one.
<lisp123> The one written by Richard Waters?
<yitzi> I need to come back to it and work out some stuff with Inravina + Incless coupling. Been busy elsewhere.
<beach> lisp123: I think that's the one I looked at, yes.
<lisp123> beach: got it, thans
<lisp123> thanks*
Oddity has quit [Ping timeout: 244 seconds]
<shka> hi all
<beach> Hello shka.
<shka> how can i obtain, in agnostic-lizard, during code walking, form both before and after macroexpansion?
<shka> the only thing that comes to my mind is to grab before macroexpansion, and macroexpand on my own
<shka> but this feels wrong
<weary> i didn't realize until five seconds ago that common lisp's type system can be described as 'lazy'
<ecraven> beach: thanks!
<ecraven> yitzi: thanks, I'll look at Inravina!
<beach> weary: In what way is it lazy?
pranavats has joined #commonlisp
<ecraven> yitzi: did that paper ever get finished? https://github.com/yitzchak/Inravina/blob/main/papers/els2022/main.pdf
aeth has quit [Ping timeout: 276 seconds]
<yitzi> No. Delayed until next one, maybe?
aeth has joined #commonlisp
<weary> beach: the haskell sense of lazy (only determined when evaluated); i was reading a paper from 1988 that made it out to be a major innovation, and I just hadn't thought of it before.
<beach> Hmm. The Common Lisp type system is basically just about sets of objects. I guess you are referring to the fact that Common Lisp is dynamically typed rather than statically typed.
cage has joined #commonlisp
igemnace has joined #commonlisp
attila_lendvai has joined #commonlisp
<beach> An Lisp was dynamically typed from the start, so I am not sure what new things happened in 1988.
pranavats has left #commonlisp [Error from remote client]
<lisp123> whats the benefit of lazy types?
<beach> I don't see how the Common Lisp type system is "lazy" in the sense that the Haskell evaluation is "lazy".
dec0d3r has joined #commonlisp
<beach> And I don't know what paper weary is referring to that claims that there was a major invention in 1988 related to the Common Lisp type system.
<lisp123> Neither do I. weary - do you have a link to said paper?
Th30n has joined #commonlisp
Bike has joined #commonlisp
<Guest74> I'm having trouble with adobe's stupid encryption on type 1 fonts.  I think they may have specified their algorithm based on how C does arithmetic.  If I'm translating r = (cipher + r) * c1 + c2; Where r, c1, and c2 are 16bit integers is it sufficient to put a (mod r #xFFFF) or it has to be modded after every time it can overflow?
pranavats has joined #commonlisp
<jackdaniel> still a proof of concept, but well, I'm still proud of myself
<pjb> Guest74: often it's enough to add the mod at the end. But it's either (logand r #xFFFF) or (mod r #x10000) !!!
<Guest74> thanks, hopefully that explains it.
<Guest74> nope
<beach> jackdaniel: I am not sure what I am seeing.
<jackdaniel> beach: you are seeing ecl compiled to wasm (web assembly) running in the browser
<jackdaniel> as ecl_min.html
<beach> Oh, wow! Nice!
<jackdaniel> basically you could make a page like that, and you'd all people run common lisp without installing it on their own browsers
<jackdaniel> thanks
<jackdaniel> s/on their own browsers/on their own systems/
aeth has quit [Ping timeout: 256 seconds]
<lisp123> jackdaniel: nicely done
aeth has joined #commonlisp
<jackdaniel> thank you. with all debug symbols and no optimizations the module is 13M, I wonder how much could I trim it
<weary> beach: it didn't claim there was an "invention" specifically in 1988, it claimed that CL's latent (dynamic) typing was an innovation over the popular languages of the day, and described latent typing in effectively the same way I see haskellers describe lazy evaluation today
<weary> jackdaniel: there's an emscripten flag (oz i think) that you can use to have it optimize for space at the expense of some speed.
<weary> depending on how you implemented io there's also a flag you can use to rip out any io functionality you aren't using, but it didn't save any space on mine.
<beach> weary: I see. I still wonder who presented it that way. And "popular languages of the day" would be, let's see, just Fortran maybe?
<jackdaniel> yeah, I will experiment with flags after it is cleaned up; I'm also embedding a few files I've used "on host"
<weary> beach: pascal!
<beach> Nah! Pascal was much later than LISP 1.5.
<weary> i'm aware =p
<weary> the paper's from 1988, and pascal was very popular at the time.
<jackdaniel> I think that you operate on different definitions of "of the day" - 1960 vs 1990
<weary> jackdaniel: now you've hit the fun part, trying to deal with emscripten's awful pregenerated JS to handle io sanely
<beach> But how can something invented in 1958 be an innovation of something that was created in 1970 or so?
<beach> s/of/over/
<weary> bonus: if you do io wrong in the same way i did initially, it'll probably kill a single-process FF implementation
<jackdaniel> 'for typical pascal programmer, lisp exhibits innovative techniques [compared to techniques used in pascal]', where pascal may be replaced by any blub ,)
<weary> s/FF implementation/FF release
<beach> jackdaniel: You found the paper?
<jackdaniel> no, I've put in quotes what I've understood from what weary is saying
<beach> Ah.
<lisp123> jackdaniel: we just need WASM to support browser DOM manipulations (maybe it does?) and then its over for all other languages
<weary> i'll link it later when i've got ff pulled up again
<jackdaniel> well, for now I'm using a synchronized read char-by-char in node, and default input box in a browser
<weary> lisp123: not so fast! even if wasm supported that (it does not, the only blessed way is via js interop), wasm lisps are still huge.
<jackdaniel> well, 10MB if cached by the browser is sanely bearable (given "modern" web pages)
<lisp123> weary: CL-WASM would be design for a sufficiently fast internet connection ;)
<jackdaniel> either way, the cool thing I think about for the REPL is basically running clim-listener in sdl2 backend
<weary> my port of npt is probably just about as small as theoretically possible for an Emscripten-using CL, and it's in the 4-6mb range, depending on what compiler flags i use
<jackdaniel> that runs in the web browser ,)
<jackdaniel> well, ecl compiled and stripped on linux can fit in around 2MB
<jackdaniel> and it is a conforming CL implementation (with all fancy extras like clos ,)
<weary> i'm aware =p
<weary> ~ i actually spent a few hours one night trying to get it working, months before i ended up getting npt working, but i don't like autotools and bailed ~
<weary> wait, it's the one that uses autotools, right? i might be misremembering and it uses some other non-Make solution
<Guest74> Can someone check my interpretation?  This should be really simple as the instructions seems really simple. I do not know how much the c code follows the instructions.  https://pastebin.com/fDCecL5m
<jackdaniel> ecl uses autotools, yes
<weary> also, jackdaniel: npt has clos, in c
<jackdaniel> which are not that scary for C compilation requirements, afaik cmake and other fancy solutions work so so when you target a new platform
<jackdaniel> I've tried (defclass …) in npt and it did not work, so I've called it a day
JoshYoshi has quit [Remote host closed the connection]
pranavats has left #commonlisp [Error from remote client]
<weary> it might require loading something; i can't remember and am too lazy to run to my PC and check, but it's definitely defined, and there's an obscene amount of code defining everything you'd expect from clos; will check later
Josh_2 has joined #commonlisp
<lagash> jackdaniel: woah woah, but CL is a bloated language?? how can it fit on 2MB? :P
<Josh_2> Good morning :sunglasses:
<Josh_2> You mean fully featured ;)
<Bike> Guest74: looks correct to me, i think.
aartaka has quit [Ping timeout: 256 seconds]
<weary> lagash: 2MB is *huge*
<Bike> actually, wait.
<Bike> i think you mean logand rather than mod.
<Guest74> Thanks Bike: that's what I keep thinking.
<Guest74> I was just going by the instructions.
<Bike> the instructions say mod 65536, but what you are doing is mod 65535
<Guest74> even with logand #xFFFF decryption doesn't come out right, which is exactly the same formula.
<Guest74> ah, my weary eyes
<semz> Guest74: Note also that (random #xFF) doesn't generate completely random octets since it can't output #xFF
<semz> but of course random isn't a particularly good csprng in the first place
<Guest74> not a concern at the moment, there's other restrictions as well.  Just wanted to get encrypt/decrypt working.
<Bike> i assume for your test you're providing the same random bytes to the lisp and c code?
pranavats has joined #commonlisp
<Bike> (or doing n = 0 i guess)
<Guest74> I'm not testing the c.  I can barely understand it.
<Bike> Oh, so you're just encrypting plaintext and then decrypting it with lisp on both ends?
<Guest74> though I guess then I'd be able to tell if it's encryption or decryption that's the problem.
<Guest74> bike that's correct
<Bike> i see
<Guest74> it says plaintext, but it's actually a sequence of bytes representing ascii chars.
yewscion has joined #commonlisp
<Guest74> decrypt is essentially the same, and the math in my head says it should work out, but it doesn't.  https://pastebin.com/FCcMA2xC
<weary> jackdaniel: it's not so much that autotools is scary, i just dislike autotools. the other ecl (eclipse) has a like five hundred line makefile with terrible habits and i was in heaven.
<jackdaniel> this is just a build system. I'm not resigning from holiday becaue I don't like a color of the road
<weary> i'm totally not saying ecl should change its build system; just was explaining why i didn't end up trying anything with it.
<jackdaniel> sure (but it is still a surprising rationale)
tyson2 has joined #commonlisp
<weary> also, defclass works without loading anything; maybe you tried an earlier version? https://i.ibb.co/MN2qxDp/img.png
<weary> re: surprising rationale: i am a very silly person and i only ended up finally bashing it until it worked so i could use it as a punchline for a blog post complaining about how many times lisp in space had gotten reposted; most of the reasons i choose not to do things are arbitrary and silly
<jackdaniel> perhaps it is an issue of my environment, now that I look carefully nothing works in firefox, and I've first tested with typing 42 (and assumed that repl is working)
<jackdaniel> but 42 is a valid input also for js, so that's why it worked
<weary> that's strange; i'm on ff as well. version number?
<weary> oh, wait, actually
<weary> are you talking about npt you compiled?
<Bike> Guest74: I think I may see the problem
dec0d3r has quit [Quit: Leaving]
<weary> if so, it's because emscripten inherits unix's terribly stupid behavior regarding flushing stdout
<jackdaniel> no, about a version from the yellow website. either way I need to go now; I concede that defclass doesn't work because of my setup ,)
<Bike> Guest74: In the decrypt code, the first ciphertext byte does not make it into r, but in the encrypt code it does
<Bike> not sure yet
<weary> jackdaniel: by the sounds of it it seems as if you might just not be checking the browser console, which is where stdout is wired (because I didn't like how emscripten blocks the main thread if not given an instantaneous stdout since it crashed my firefox)
<weary> good luck with your day!
<Bike> Guest74: Yeah, that was it. I can get a round trip if I move the "for cipher across ciphertext" line in decrypt to after the "for r", so that the r computation uses the _previous_ ciphertext byte.
<jackdaniel> thanks
dec0d3r has joined #commonlisp
dec0d3r has quit [Remote host closed the connection]
lisp123 has quit [Remote host closed the connection]
<Guest74> thanks Bike: I was thinking it was an ordering thing.
<Guest74> yeah, I see it now.  I shouldn't have wrote it right before bed or looked at it first thing in the morning :)
<Bike> no problem
Th30n has quit [Quit: WeeChat 3.5]
frgo has joined #commonlisp
shka has quit [Quit: Konversation terminated!]
shka has joined #commonlisp
treflip has joined #commonlisp
<pjb> weary: note: nowadays, you could build and send in space a microsat with some lisp on board. That would make more than one example to blog about.
<weary> pjb: it's a lot funnier to port CL to the web and say that it can go to space in a modern way now, since SpaceX's rocket ships require Chrome to operate, though. plus, if you overdo a joke, it stops being funny; i liked porting it because it ended up being a fun punchline, but it would feel obnoxious to write genuine content about it.
epolanski has joined #commonlisp
Cymew has quit [Ping timeout: 255 seconds]
aeth_ has joined #commonlisp
aeth has quit [Killed (NickServ (GHOST command used by aeth_))]
aeth_ is now known as aeth
<weary> i need to find another fun, yet ultimately useless, software toy to make. hm.
<Guest74> downloading a font to test with, website overs .exe for windows or zip file. I happily click zip file only to open the zip and find an exe.
<Guest74> s/overs/offers/
<weary> Guest74: There are a few distros that package Type1s.
<Guest74> mine are all binary.  I figured I'd test the regular ascii before adding the binary encoding.
<weary> ah, interesting.
<weary> maybe check the freedesktop site?
<weary> might also have what you're looking for: https://sourceforge.net/projects/gs-fonts/
<Guest74> there's plenty out there, just relaying the stupidity of the font download that I've seen too many times.
<weary> it's profitable to ship .exes to windows users; if there's a rootkit, they're none the wiser.
<weary> of course, anyone will tell you that binary packaging was a mistake around here, probably.
pjb has quit [Read error: Connection reset by peer]
<semz> you called?
<semz> Guest74: Are you making a font rendering library?
<Guest74> I'm writing a generic font protocol.  I need to test it in text layout with a few different font types so I thought why not go after an 'easy' format.  For any font rendering I just convert paths to what cl-vectors takes and render that way.  for vectors anyways, bitmasks are just composited.
wheelsuc` has joined #commonlisp
wheelsucker has quit [Ping timeout: 255 seconds]
<Guest74> i.e, I'm specifically avoiding rendering right now as it shouldn't have anything to do with shaping tex, hinting glyphs, and/or getting information from the font to do so.
SAL9000 has quit [Remote host closed the connection]
frgo has quit [Ping timeout: 246 seconds]
ec has joined #commonlisp
Bike has quit [Quit: Connection closed]
Guest74 has quit [Quit: Connection closed]
SAL9000 has joined #commonlisp
rotateq has joined #commonlisp
orestarod has joined #commonlisp
waleee has joined #commonlisp
ec has quit [Ping timeout: 240 seconds]
kpoeck has joined #commonlisp
Bike has joined #commonlisp
pranavats has left #commonlisp [#commonlisp]
kpoeck has quit [Quit: Client closed]
aartaka has joined #commonlisp
kpoeck has joined #commonlisp
morganw has joined #commonlisp
causal has joined #commonlisp
treflip has quit [Remote host closed the connection]
ttree has joined #commonlisp
roklein has quit [Quit: Leaving]
kpoeck has quit [Ping timeout: 252 seconds]
<mfiano> Is it possible to destructure the &body form of a macro-lambda-list in the lambda list itself? I'd like to treat the body form as a property list with something like &body (&key foo bar) so I can selectively at expansion time different parts, however given (:foo 1 :bar 2) for that body form, macro-expansion fails with invalid number of arguments in keyword/value list: (1 :BAR 2).
<mfiano> selectively evaluate*
<Bike> how is &body (&key foo bar) different from just &key foo bar?
<mfiano> indentation :(
<mfiano> I suppose I don't even want this, because I need to type check the input before and after evaluation, so maybe I should be actually using #'eval :/
<semz> you can use ((&key foo bar) &body body) I think
tok has quit [Remote host closed the connection]
<mfiano> True, but as I mentioned I don't want this anyway. Also that would require the body being a list of a single plist, which would be an API breaking change
tyson2 has quit [Remote host closed the connection]
jmdaemon has joined #commonlisp
pranavats has joined #commonlisp
attila_lendvai has quit [Ping timeout: 255 seconds]
attila_lendvai has joined #commonlisp
attila_lendvai has quit [Read error: Connection reset by peer]
cognemo has quit [Quit: ZNC 1.8.2 - https://znc.in]
cognemo has joined #commonlisp
prokhor__ has quit [Ping timeout: 240 seconds]
kpoeck has joined #commonlisp
tyson2 has joined #commonlisp
epolanski has quit [Quit: Connection closed for inactivity]
Oddity has joined #commonlisp
<stylewarning> If i have (defun f ...) followed by (setf (fdefinition 'g) #'f), what's the incantation i do so that g may be used as a function later in that file? just DECLAIM it?
attila_lendvai has joined #commonlisp
MajorBiscuit has joined #commonlisp
<mfiano> Shouldn't eval-when be enough?
<Bike> i think stylewarning means they have a (defun f...) that is not evaluated at compile time, and then a (setf (fdefinition 'g) #'f) that is also not evaluated at compile time, and then they want to call G later in the file without getting undefined function warnings
<Bike> in which case a declaim might do it
<stylewarning> yeah that's right
<mfiano> Ah ok
<stylewarning> that = your explanation of my concern
<mfiano> I thought only notinline and special proclamations were defined to have any effect (with the exception of optimize for "safe code" semantics)
<mfiano> possibly have any effect*
<mfiano> err, well i can't English today, but I think it can be inferred what I meant.
<Bike> those are the only ones that have to have effects, but other proclamations can have effects to
<Bike> too
<mfiano> That is what I was trying to say. So this is implementation-specific code.
<Bike> Sure. The entire concept of getting undefined function warnings is also implementation specific.
<mfiano> True
<mfiano> In other news, I'm pretty excited. My ZFS application is pretty much complete. Running it in a test VM cluster for 12 hours now, and logs and results seem to be looking good with regard to snapshotting/replication/retention policies.
attila_lendvai_ has joined #commonlisp
attila_lendvai has quit [Read error: Connection reset by peer]
<mfiano> Special thanks goes out to |3b|, death, and Bike for slapping me in the right direction on multiple occasions. Exiting the graphics programming domain after ~20 years was interesting to say the least.
<mfiano> err _death
<Shinmera> Colleen: tell mfiano look up form-fiddle with-body-options
<Colleen> mfiano: Macro form-fiddle:with-body-options https://shinmera.github.io/form-fiddle#MACRO%20FORM-FIDDLE%3AWITH-BODY-OPTIONS
MajorBiscuit has quit [Quit: WeeChat 3.5]
<mfiano> Shinmera: Thanks, but as mentioned I don't actually want that anymore.
kpoeck58 has joined #commonlisp
kpoeck has quit [Ping timeout: 252 seconds]
<Shinmera> I really like the body options style, and am surprised it's not more common.
waleee has quit [Ping timeout: 260 seconds]
Guest74 has joined #commonlisp
xantoz has joined #commonlisp
tok has joined #commonlisp
fitzsim has joined #commonlisp
waleee has joined #commonlisp
waleee has quit [Client Quit]
attila_lendvai_ has quit [Read error: Connection reset by peer]
attila_lendvai has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
SAL9000 has quit [Remote host closed the connection]
SAL9000 has joined #commonlisp
aartaka has quit [Ping timeout: 246 seconds]
Dynom has quit [Quit: WeeChat 3.5]
aartaka has joined #commonlisp
tyson2 has joined #commonlisp
Oladon has joined #commonlisp
frgo has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 27.1]
frgo has quit [Ping timeout: 258 seconds]
wheelsuc` has quit [Remote host closed the connection]
Bike has quit [Quit: Connection closed]
waleee has joined #commonlisp
bilegeek has joined #commonlisp
masinter has joined #commonlisp
pjb has joined #commonlisp
kpoeck58 has quit [Quit: Client closed]
tyson2 has quit [Remote host closed the connection]
akoana has joined #commonlisp
shka has quit [Ping timeout: 246 seconds]
tok has quit [Ping timeout: 240 seconds]
tok has joined #commonlisp
tyson2 has joined #commonlisp
<mason> I think maybe I'll lead the kids through PAIP. Easier to find affordable copies.
<mfiano> mason: I don't think that's a very good idea
<mason> mfiano: So, I've got my third copy coming now, where I can't find a third copy of PCL without getting ripped off.
<mfiano> mason: PAIP was written between CLtL1 and CLtL2 IIRC, and it was at a time when CLOS was too new to consider using by many, including the author. As such, you will find not only antiquated code and style, but missing a lot of the parts of the language that make it pleasant to work with. I personally think a book that covers ANSI CL and modern idioms is the way to go.
<mason> mfiano: Plus, I like the idea of Norvig sneaking in the Scheme compiler.
<mason> Modern! Feh!
<mfiano> Using structs everywhere will be an absolute pain to produce modular interactive code.
<mfiano> mason: Apress usually has really good CYber Monday deals on all there books if you can wait that long. I got PCL and CLR for $25usd total
<mfiano> their*
<mason> CLR?
<mfiano> The follow up to PCL, Common Lisp Recipes
<mason> Oh, didn't know he'd written one. Interesting.
<mfiano> It is not by the same author, but it is an extension of PCL
<mason> That explains it.
Oladon has quit [Quit: Leaving.]
lottaquestions has quit [Quit: Konversation terminated!]
azimut_ has quit [Remote host closed the connection]
<weary> mason: Assuming you mean actual kids, give them a rapid-fire tour of the contents of the CL edition of *An Interactive Approach*, touch upon CLOS, and then, assuming it's a small enough amount of kids, pick a few SICP chapters and exercises you think the individual kids in question would be interested in, and adapt them to CL. They should be able to grasp it all pretty young, but textbooks are actually not nearly as helpful as just ha
<weary> ving a person with knowledge near.
azimut has joined #commonlisp
tok has quit [Remote host closed the connection]
<weary> A rapid-fire tour of AIA, an introduction to CLOS from your preferred resource, instruction on how to get use from the hyperspec, and then just giving them challenges that you'll help them through will do a lot better than the books on their own.
lottaquestions has joined #commonlisp
<mfiano> I believe mason home-schools his own kids iirc.
<mason> Yes.
<mason> Actual kids, eight and ten in this case.
attila_lendvai has quit [Ping timeout: 240 seconds]
wmblathe_ has joined #commonlisp
<weary> mason: Awesome! Yeah, building courses around the books is your best bet, and the cool thing about AIA is that he released the postscript files for them after it went out of print, which means you can put them into an on-demand book printing service and get copies for $20/pop, if you can't find any used copies for cheaper.
<weary> This is also the case for SICP, which is cc-by-sa.
wmblathers has quit [Ping timeout: 240 seconds]
<mason> weary: I'm not sure I know which book you mean by AIA...?
<weary> The CL edition of An Interactive Approach; it's a surprisingly simple and understandable introduction to Common Lisp, written in a style that makes things pretty intuitive even if your kids have never touched a computer before.
<mason> Ah, never heard of that despite its not being wildly new. Interesting. https://www.e-booksdirectory.com/details.php?ebook=1319
<mason> weary: They've actually started in with Lisp - we were using Land of Lisp - but I've been convinced it wasn't the best way in for them.
<weary> You could build a pretty solid introductory course using it, and the exercises are *wonderful.*
<weary> It's pure-CL, so there's no miserable mucking around with poorly-designed FFIs, and it encourages a functional style before it teaches any other paradigms.
<mason> kk - thank you for the recommendation
<Nilby> Those books can be heckin' boring, even for me. I would have kids mod a simple text adventure or roguelike. Read stuff in the books to figure out how to improve it, like e.g. langauge parsing, NPC movement.
<weary> That's actually specifically why I'm recommending AIA, Nilby. It's so *concise* that it gives you exactly what you need, and after the first few chapters it can more or less be used in any order, as needed for teaching's sake. Plus, the exercises are all relatively simple, yet pretty useful.
<weary> Building a course around a book doesn't necessarily mean just having a kid read a book; it can usually mean sourcing a lot of the framework of instruction from the book, and then tailoring the approach per-student.
<Nilby> yes, AIA is nicely to the point
<mason> I was hoping to have the book do most of the organizational and pacing work, with me just helping along the way, but that might not be feasible.
<weary> AIA *does* do a lot of the organizational and pacing work, but it's important to tailor stuff to who you're delivering it to, too.
<weary> I managed to get a non-technical friend to the point where they could write decent programs basically just using the structure of AIA, but delivered with the benefits of a person-to-person approach. People tend to remember things a lot better if you're the one giving the lesson rather than an abstract non-fiction author, and you giving a run-down first makes it easier for them to know what the author's talking about.
<masinter> from https://cse.buffalo.edu/~shapiro/Commonlisp/ there's a link to The notes from an on-line course, CSE 202, using this book, and given in Fall, 2000, is available.
<weary> A good portion of learning how to program (or do anything, really) is learning the vocabulary and structure you need to become self-sufficient, and I think AIA is a great book for boostrapping *that* knowledge.
<mason> Hah, this is funny. Looking at eBay, at copies of IAI, and a copy of Twistly Little Passages shows up.
<weary> My general prescription would be AIA course -> assign them some projects you think they'd find fun to do -> algorithms course -> more projects.
<weary> IF is cool; it's a shame it's kind of a dead thing.
<weary> One of the first really delightful experiences I had with Lisp as a kid was an IF game that was based around a scheme interpreter, even though I didn't really have the background to do anything cool with it at the time.
<masinter> common lisp is too designed-by-committee to be a good language to learn first
<mason> masinter: Scheme is tempting for the purpose.
<mason> weary: One of my first interesting programming projects as a kid was a text adventure. Sadly, I wrote it in Z80 assembly language. I hadn't yet encountered the term "impedence mismatch".
<weary> masinter: I disagree. CL is pretty flawed, but it's also pretty decent as a first language, *as long as you start with a resource that gets you the prerequisite vocabulary.*
<mason> I thought about Little Lisper, but while it's absolutely approachable, I think they'd be bored to tears after not actually *doing* anything.
<mason> So, yeah, we're doing CL because I want to have us design things as a family, and I want us to do it using CL.
<Josh_2> If CL is "pretty flawed" I hate to think how flawed you consider most other languages
<weary> Josh_2: I have written many, many paragraphs on exactly how much I hate modern computing.
<mason> FWIW, for applications, once they've got a reasonable vocabulary, I've got copies of The Armchair Universe for them and we'll use that for practise projects.
<masinter> josh_2 I was on the committee
<weary> AIA's a two-to-three week tour of the whole language (minus CLOS), if done via instructor rather than strictly by having them read the book themselves, and it manages to avoid many of the pitfalls of general CL recommendations by explaining exactly what everything can be expected to do, and only introducing some of the rougher edges of CL after it's introduced what you need to do anything useful with said rough edges.
<Josh_2> Having learned CL first, the problem isn't that it was designed by committee, the problem is that it is hard.
<weary> masinter: I understand that the standard was huge to allow everyone currently using bespoke Lisps to get DOD funding, but you guys couldn't have advocated it be a *little* smaller?
<Josh_2> If you want smaller use Scheme
<weary> Like, I don't know, removing the worst part of it (LET)?
<Josh_2> What
<masinter> you get into this mode that McCarthy called "log-rolling": I'll let you add your feature if you let me add mine
<weary> I genuinely believe the standard would be significantly better if LET was left out in favor of &AUX, which is much more elegant.
<Josh_2> (let ((confusionp nil)) (setf confusionp (weary-say-something-odd-p <text>))) -> t
<masinter> LET 1000 flowers bloom
<weary> Also, how do you even end up on one of those committees?
pve has quit [Quit: leaving]
lisp123 has joined #commonlisp
<masinter> Xerox sent me
<weary> I am extremely jealous that you got to work at a lispm company ~~that has never done anything else of interest aside from lispms~~
<weary> actually, it would have been kind of satisfying if xerox, ti et al. imploded when they stopped developing lispms
<weary> Josh_2: I've read a bit of Pitman's writing around the subject, but I haven't read that; thank you!
<masinter> 30 years later, you can make your own: https://ntterlisp.org
lisp123 has quit [Remote host closed the connection]
<weary> Were you meaning to link to the Medley Interlisp site?
lisp123 has joined #commonlisp
<masinter> there's a full CLtL1+ in there
<weary> There's a lot less magic when you need to load your virtual lispm over Docker, I think. I thought that was where I recognized your name from, though!
<weary> interlisp.org (for anyone curious to what the actual URL is)
<masinter> onlinr.interlisp.org
<masinter> online.interlisp.org sorry
<weary> Ha, I knew what you meant.
<masinter> based on this chat, I added AIA to https://github.com/Interlisp/medley/issues/609
<weary> But yes, I have a lot of respect for the Xerox lispm efforts.
<Nilby> weary: if you don't like the indentation of let, you can make a non-contained imlicict scope let
morganw has quit [Remote host closed the connection]
prokhor__ has joined #commonlisp
<weary> It's not that I dislike the indentation of let, it's that I think it's an ugly and unintuitive function for a concept better expressed as auxiliary variables. Sometimes you'll even find let inside of lambda expressions and vice-versa, which is aesthetically *grotesque.*
<weary> Nilby: Unfortunately, this blight on the language cannot easily be solved. I could manually find and replace every instance of let I come across with lambda+aux, but that's too basic a solution and wouldn't really leave you with idiomatic &aux usage.
<masinter> i'd get rid of &aux before let
<lisp123> masinter: I stumbled upon your homepage yesterday,,,wow! So cool
<weary> masinter: If you could kindly direct me to the person who insisted &AUX be left in the spec, I would like to mail them a letter of thanks, for keeping the standard at least slightly sane.
<masinter> weary: &aux variables have nothing to do with the signature of the function
<Nilby> weary: I agree with masinter, &aux is the wart left in only for compatibility with old old code. Imagine rewriting 1e6 lines of code just because you don't like let?
<masinter> lisp123: thanks
<weary> I have no idea how anyone could see such a beautiful feature as &AUX, then see such an ugly construct as LET, and come away thinking &AUX is the bad one.
<Josh_2> Are you trolling?
<weary> I am entirely serious.
<Josh_2> thats unfortunate
<lisp123> Does somebody have the printing algorithm for a list? I'm trying to write one from scratch but I keep getting (list) when looking at the final dotted list part..
<Josh_2> It was funnier when I thought you were trolling
<weary> Nilby: I'm aware that &AUX was for compatibility, but sometimes, the old does better than the new.
<lisp123> actually I'm just confused..ignore me
<weary> If I believed that new is always better because it's newer, I'd like Clojure. And I really don't think there are a lot of Clojure fans around here. As such, I can't in good faith claim &AUX is bad because it's old, since there's not a good alternative to it.
<masinter> you can transform (let (vars .) body( => ((lambda (varnames) body) varvalues)
<lisp123> I found this from PCL on printing a list, does anybody have a more elegant way (not saying that its not, but just looking for alteranatives before I settle on this)
<Nilby> weary: why don't you like let? how would you do the necessary let not at the top? also &aux pollutes the arg list
<masinter> lisp123: (pretty-print '()) ?
lisp123 has quit [Remote host closed the connection]
<Guest74> oh the beauty of two left sided parens together.  what a strange thing to consider more aesthetic than let.
<masinter> ((lambda (ep) (print (* radius radius ep))) 3)
<masinter> no let, no a'ux
<masinter> really should be called print-area-of-circle or just return the value and let the 'print' be done by the rePl
<mason> Alright, I got a PCL seller down to a reasonable number, so we'll have three of 'em. Good enough.
<masinter> bye now
<mason> o/
<weary> i agree, masinter, but when you don't compile with readline, some implementations break with backspace, and i didn't want to retype the entire thing
<weary> byte!
<weary> bye!*
masinter has quit [Quit: ~ Trillian - www.trillian.im ~]
Guest74 has quit [Quit: Connection closed]
lisp123 has joined #commonlisp