Xach 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>
charles_ has quit [*.net *.split]
raeda has quit [*.net *.split]
lad has quit [*.net *.split]
micro has quit [*.net *.split]
john__ has quit [*.net *.split]
random-nick has quit [*.net *.split]
montxero has quit [*.net *.split]
jeosol has quit [*.net *.split]
hhdave has quit [*.net *.split]
andreyorst has quit [*.net *.split]
mariari has quit [*.net *.split]
aeth has quit [*.net *.split]
CrashTestDummy2 has quit [*.net *.split]
specbot has quit [*.net *.split]
Noisytoot has quit [*.net *.split]
Colleen has quit [*.net *.split]
Posterdati has quit [*.net *.split]
minion has quit [Remote host closed the connection]
micro has joined #commonlisp
montxero has joined #commonlisp
john__ has joined #commonlisp
charles_ has joined #commonlisp
mariari has joined #commonlisp
andreyorst has joined #commonlisp
mariari has quit [Changing host]
mariari has joined #commonlisp
hhdave has joined #commonlisp
minion has joined #commonlisp
specbot has joined #commonlisp
Colleen has joined #commonlisp
CrashTestDummy has joined #commonlisp
raeda has joined #commonlisp
lad has joined #commonlisp
Posterdati has joined #commonlisp
random-nick has joined #commonlisp
CrashTestDummy has quit [Read error: Connection reset by peer]
CrashTestDummy has joined #commonlisp
Noisytoot has joined #commonlisp
aeth has joined #commonlisp
random-nick has quit [Ping timeout: 252 seconds]
Qwnavery has quit [Quit: WeeChat 3.2]
tyson2 has joined #commonlisp
Yehowshua has joined #commonlisp
robin has quit [Ping timeout: 252 seconds]
waleee has quit [Ping timeout: 252 seconds]
<Yehowshua> http://ix.io/3xSm
<Yehowshua> when I write out the sexps, can I make param1 and param2 symbols?
<moon-child> not sure what your question is. param1 and param2 _are_ symbols
<Yehowshua> oh
<mfiano> This backquoting and unquoting is meaningless.
Yehowshua has quit [Quit: Client closed]
Yehowshua has joined #commonlisp
Everything has joined #commonlisp
Oladon has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
akoana has quit [Quit: leaving]
jeosol has joined #commonlisp
amk has quit [Ping timeout: 245 seconds]
amk has joined #commonlisp
robin has joined #commonlisp
pranavats has left #commonlisp [#commonlisp]
peterhil has quit [Ping timeout: 256 seconds]
conjunctive has quit [Ping timeout: 240 seconds]
pl has quit [Ping timeout: 240 seconds]
conjunctive has joined #commonlisp
pl has joined #commonlisp
<Yehowshua> can I tell sbcl where to load and asd package from directly?
pranavats has joined #commonlisp
gaqwas has joined #commonlisp
john__ has quit [Ping timeout: 252 seconds]
wilfred has joined #commonlisp
montxero has quit [Read error: Connection reset by peer]
montxero has joined #commonlisp
Yehowshua has quit [Ping timeout: 256 seconds]
<beach> Good morning everyone!
<Oladon> Good morning, beach!
Qwnavery has joined #commonlisp
semz has quit [Ping timeout: 245 seconds]
semz has joined #commonlisp
notzmv has joined #commonlisp
Oladon has quit [Quit: Leaving.]
amb007 has quit [Ping timeout: 256 seconds]
amb007 has joined #commonlisp
Bike has quit [Quit: Lost terminal]
gaqwas has quit [Ping timeout: 256 seconds]
seok has quit [Ping timeout: 252 seconds]
amb007 has quit [Ping timeout: 245 seconds]
amb007 has joined #commonlisp
<susam> Good morning, beach!
hendursaga has quit [Ping timeout: 276 seconds]
hendursaga has joined #commonlisp
<beach> SICL FORMAT was the first module I implemented for the SICL project. That module is now 13 years old, and it shows. I think it would be a great project for someone to extract that module to a separate repository. Its specificity would be that it is extensible.
<beach> The module doesn't use conditions as much as it should so there is work to do too.
<beach> And the code is not very modular in that there is essentially one big file containing most of the code. I would rather see one file per directive, containing the directive interpreter and the directive compiler.
<beach> And we would need to come up with the best way of making an "intrinsic" and an "extrinsic" ASDF system and package. The former would be used when the module is meant to be the native FORMAT of an implementation, as it is in SICL. The latter would be used in a system that already has FORMAT, for example to run tests.
amb007 has quit [Read error: Connection reset by peer]
pve has joined #commonlisp
amb007 has joined #commonlisp
rain3 has joined #commonlisp
attila_lendvai has joined #commonlisp
shka has joined #commonlisp
icer has joined #commonlisp
gaqwas has joined #commonlisp
kuler has joined #commonlisp
<pjb> beach: I don't know if minion worked, I've updated the links in the README.org.
<beach> Oh, OK. Thanks!
<beach> I haven't seen anything from minion.
<beach> Perfect!
icer has quit [Quit: WeeChat 2.8]
lisp123 has joined #commonlisp
heisig has joined #commonlisp
hendursa1 has joined #commonlisp
hendursaga has quit [Ping timeout: 276 seconds]
santiagopim has quit [Ping timeout: 252 seconds]
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 252 seconds]
lisp123 has joined #commonlisp
waleee has joined #commonlisp
heisig has quit [Quit: Leaving]
cage has joined #commonlisp
wilfred has quit [Quit: Connection closed for inactivity]
scymtym has joined #commonlisp
attila_lendvai has quit [Ping timeout: 256 seconds]
random-nick has joined #commonlisp
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
igemnace has quit [Quit: WeeChat 3.2]
cosimone has joined #commonlisp
tyson2 has joined #commonlisp
Everything has quit [Quit: leaving]
Qwnavery has quit [Quit: WeeChat 3.2]
kakuhen has quit [Quit: Leaving...]
amb007 has quit [Ping timeout: 245 seconds]
cosimone has quit [Ping timeout: 245 seconds]
boeg has quit [Quit: Connection closed for inactivity]
amb007 has joined #commonlisp
lisp123 has quit [Ping timeout: 252 seconds]
cosimone has joined #commonlisp
pranavats has left #commonlisp [#commonlisp]
amb007 has quit [Ping timeout: 250 seconds]
amb007 has joined #commonlisp
luna-is-here has quit [Ping timeout: 252 seconds]
luna-is-here_ has joined #commonlisp
<lukego> Hey how do I get Lisp/SBCL to preserve the case of non-latin letters like σ verses Σ in symbol names? I'm looking for the minimally intrusive way to keep the reader/printer doing its upcase'ery but excluding these characters e.g. so that α doesn't get confusingly upcased into A.
<lukego> I suppose that I'd like the reader/printer to treat those characters as separate symbols rather than letter-pairs.
<_death> (defun read-single-char-symbol (stream char) (declare (ignore stream)) (intern (string char)))
random-nick has quit [Ping timeout: 252 seconds]
<Krystof> my guess is that you probably don't want them to print as |α|
<Krystof> in which case you might need to try readtable-case :invert
<pjb> lukego: (setf (readtable-case *readtable*) :preserve) #| --> :PRESERVE |# (QUOTE Été-σ) #| --> Été-σ |#
<lukego> That will affect latin characters too though, right? I don't want that
<beach> lukego: In case you can influence which reader you have, Eclector can be easily programmed to handle such cases.
<pjb> (string-upcase "
<lukego> beach: the printer will have to play ball too right? I want to see α and not |α|
<_death> could also set pprint dispatch for them
<pjb> :preserve is nice.
<lukego> I'll think about :preserve but I seem to remember that opening a can of worms each time I used it globally in the past.
<hayley> I wonder what the printer does when downcasing a symbol name like ΠΑΤΆΤΕΣ...I suppose it would use the Unicode downcasing algorithm and correctly print the last σίγμα correctly, i.e. πατάτες.
<hayley> (string-downcase 'ΠΑΤΆΤΕΣ) ; => "πατάτεσ" I think only the SB-UNICODE function does it correctly.
<lukego> The trouble is that these are mathematical symbols for me and not in fact e.g. greek letters.
<hayley> (That is not the printer, of course...but the printer does the same thing.)
<hayley> Okay. I'll be honest, I'd feel a bit bothered if the printer did treat the characters in my first language as "symbols" and refused to up/downcase them. But I can see the use given how mathematicians can't find anything better to do than use random Greek letters.
<lukego> I see that unicode has my back somewhat... there is a #\MICRO_SIGN that won't be unwantedly upcased the way #\GREEK_SMALL_LETTER_MU does... but no such counterparts to others like alpha and lambda
<hayley> As revenge, we do have the Greek question mark which looks like a semicolon.
<lukego> I wonder how unreasonable it would be to define new custom unicode non-letter characters for all the symbols and have the reader translate to them
<hayley> On the other hand, "greek question mark prank" is the first thing DuckDuckGo suggests when you type "greek question mark". So, not that thrilling.
<lukego> though also... if these will all be used in single-letter symbols in practice... maybe local reader/printer hacks would be fine.
<lukego> I'm also feeling a little envy towards racket/clojure and their multiple parenthesis styles... would it be so bad to do (let ❨(x 1) (y 2)❩ ...) I wonder...
cosimone has quit [Ping timeout: 252 seconds]
ryanbw has quit [Ping timeout: 252 seconds]
pranavats has joined #commonlisp
peterhil has joined #commonlisp
<_death> clhs s-s-f-c
<_death> though CL lacks a read-delimited-form, so implementation can be more involved.. but maybe read-delimited-list will be "good enough"
random-nick has joined #commonlisp
<lukego> thanks, s-s-f-c is a pretty painless approach
<lukego> The novelty will probably wear off quickly, but novelty is nice sometimes anyway.
<lukego> er, no, wasn't sufficient to make the closing ) match in my case
<lukego> but I have the source for the reader...
<_death> you need to set up a reader macro for #\❨ that e.g., uses read-delimited-list
<Shinmera> Anyone know of a pure SAT solver for lisp, preferably with XOR extension?
<lukego> have to consider why #\( calls READ-LIST which is not just a wrapper to READ-DELIMITED-LIST though..
<Shinmera> Or am I gonna have to write one myself, like it seems I always have to
<_death> lukego: consider (a . b)
<_death> Shinmera: do you mean that the solver has to be written in Lisp?
<Shinmera> yes.
<lukego> Shinmera: no, but fwiw CL-SMT-LIB works okay for me with Z3, I needed to make a couple of patches that may or may not have been merged
<Shinmera> No C bindings.
<lukego> (that's interfacing with an external process which might not be what you want, but to me was acceptable)
<Shinmera> It is indeed not what I want :)
<lukego> fun yak to shave, then :)
cosimone has joined #commonlisp
<Shinmera> Not for me, really.
<beach> Shinmera: I believe my favorite coauthor uses one of those, but she is no longer on IRC. You may want to send her an email.
<Shinmera> beach: Will do if I don't find anything
<Shinmera> Context is I'm building a build system with version constraint resolution.
amb007 has quit [Ping timeout: 252 seconds]
<lukego> _death: yeah likely the extensions for #\( aren't needed for the other parens, but guess have to look closely, e.g. because backquote needs to play nie
amb007 has joined #commonlisp
<hayley> Once I used programatically generated MEMBER types to do "theorem proving" with subtypep. I would not recommend that approach for a SMT solver, of course.
<Shinmera> hayley: hah
<_death> if the problems are small you can use screamer ;)
<hayley> I also recall someone using a general SMT solver for dependency resolution and it was found to be pretty slow. But I forgot who unfortunately.
<Shinmera> I'm going after what's described in the opium paper: https://cseweb.ucsd.edu/~lerner/papers/opium.pdf
<Shinmera> Not sure what you're talking about.
<Shinmera> I'm not yet set on using an SAT for the resolution though, which is why I'm a bit hesitant on diving into writing an SAT.
yitzi_ has joined #commonlisp
<Shinmera> *an SAT solver
<hayley> Hey, that's quite good. The blog post I read (which I think was from r/programming?) described taking minutes with something like Z3.
yitzi has quit [Ping timeout: 252 seconds]
<Shinmera> There's also http://0install.net/solver.html#idp172528 which builds on Opium.
<hayley> If you don't know, maybe it would be fine to prototype with an external solver?
<Shinmera> Anyway, I've been trying to figure out a different solution myself for weeks now but with no success so far. I feel like I'm just too stupid to figure this particular problem out.
<Shinmera> hayley: Probably what a smart person would do, yea
<hayley> Shinmera: On the contrary, I'd do it because I'm too stupid to write a solver. And apparently there is a standard input language with S-expressions, which is supposed to magically make Lisp interoperability problems disappear.
<hayley> (Maybe I'm too cynical in the last statement, but I did _not_ enjoy trying to read WASM text files, even though they are S-expressions on paper.)
seok has joined #commonlisp
yitzi_ has quit [Quit: Leaving]
yitzi has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<hayley> Right, that language is called SMT-LIB. And now I realise that one is SAT and the other is SMT, and I don't know the difference.
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
Jach has quit [Quit: Leaving.]
pranavats has left #commonlisp [#commonlisp]
Jach has joined #commonlisp
hendursa1 has quit [Quit: hendursa1]
hendursaga has joined #commonlisp
<lukego> any idea why my unicode brackets hack is erroring on read? https://gist.github.com/lukego/5694399a0cf10aa1773b883d3924b9bd
<_death> probably want to rebind open/close..
<lukego> ?
<_death> (mapc #'funcall (loop for x in '(a b c) collect (lambda () (print x))))
<lukego> oh!
<lukego> lexenv fail, thanks
<lukego> thanks, that fixed it
<_death> an easy way is to move the DO body into its own function
<lukego> I made it a do (let ((open ...) .....
<hayley> It's way more fun when you are starting threads in a LOOP.
<lukego> Maybe now C-u M-( will have to insert ⟦⟧ instead of ()
<_death> you probably also want to s-s-f-c #\(
<lukego> oh, M-( already takes a numeric prefix and does something useful with it, didn't even know that..
<lukego> _death: oh, yeah
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
jans has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
<pjb> lukego: loop for can use a single binding of the variable, so all your closures use the same variable, and the same value.
amb007 has joined #commonlisp
<lukego> yeah, obvious once pointed out. I'd actually introduced the "open" and "close" variables because I knew that i would be updated destructively, but I should have done that with LET instead of inside the FOR.
<lukego> If it were elisp I might have been tempted to do some stylish programming like `(lambda (stream) (read-delimited-list ,close))
amb007 has quit [Ping timeout: 240 seconds]
amb007 has joined #commonlisp
<lukego> okay that was the easy part, now how the heck will I update this format string in PPRINT-LET to use those parens... "~:<~^~W~^ ~@_~:<~@{~:<~^~W~@{ ~_~W~}~:>~^ ~_~}~:>~1I~^~:@_~@{~W~^ ~_~}~:>"
pranavats has joined #commonlisp
<lukego> [Narrator voice] By trial and error
<lukego> okay now lisp is happy. emacs is inserting this kind of parent on C-M-( but for some weird reason refuses to forward-sexp over it even with seemingly reasonable syntax table updates. https://imgur.com/a/GXt3ScI
makomo has joined #commonlisp
<jcowan> lotuseater: Hysterical raisins don't yell. They bite.
tyson2 has joined #commonlisp
Skyfire has joined #commonlisp
<beach> What should (coerce #(a b c) '(cons integer)) do?
Bike has joined #commonlisp
<Bike> (cons integer) is a recognizable subtype of list, so it has to coerce to a list. however, the "arguments and values" section says the result is of the given type, which wouldn't be the case here, so i guess the behavior is undefined, unless you read "if a coercion is not possible" to include this situation, in which case it's a type error
<beach> I think I'll vote for a type error.
<Bike> coerce taking general type specifiers is weird in this respect. same as the lengths. it effectively means putting in an extra length check, which seems a little orthogonal to the general purpose of the function
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
<beach> It's a strange function, yes.
<beach> Right, I can't imagine a situation where the type would include the length of the vector and a sequence was given that was not the right length.
amb007 has quit [Ping timeout: 240 seconds]
amb007 has joined #commonlisp
<lotuseater> jcowan: good to know
jans has quit [Ping timeout: 252 seconds]
tyson2 has joined #commonlisp
<lukego> ... Just thinking, for my unicode upcase/downcase issue, it's probably only really the greek alphabet that's relevant. all the other weirdo symbols won't be marked as alphabetic with upcase/downcase.
attila_lendvai has joined #commonlisp
Bike has quit [Quit: Connection closed]
khrbt has quit [Ping timeout: 252 seconds]
charles_ has quit [Ping timeout: 252 seconds]
Bike has joined #commonlisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #commonlisp
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
yitzi has quit [Quit: Leaving]
khrbt has joined #commonlisp
Lycurgus has joined #commonlisp
ryanbw has joined #commonlisp
Guest82 has joined #commonlisp
akoana has joined #commonlisp
<Guest82> Good afternoon lispers. Question: I wrote a readtable processor to parse `#"xyz"` content and pass create a cl-ppcre scanner for it. Scanners are functions. The problem is that compile-file refuses to emit the resulting cl-ppcre scanner function to fasl files. I could use some hints as to the best workaround for this.
<Bike> you could do what cl-ppcre itself does and use load-time-value
<Guest82> Thanks, will take a look.
<random-nick> I think you could also wrap it with a class and then specialise MAKE-LOAD-FORM
charles_ has joined #commonlisp
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #commonlisp
attila_lendvai has quit [Ping timeout: 240 seconds]
VincentVega has joined #commonlisp
yitzi has joined #commonlisp
cosimone has quit [Read error: Connection reset by peer]
<Guest82> Thanks again, load-time-value seems to be doing the job.
<lukego> Controversial opinion: readtable-case and print-case should only apply to iso8559-1 characters, leaving other characters e.g. greek letters available as case-sensitive without needing to be |escaped|
cage has quit [Quit: rcirc on GNU Emacs 27.1]
lisp123 has joined #commonlisp
<pjb> lukego: I would agree.
<lisp123> lukego: Hey how do I get Lisp/SBCL to preserve the case of non-latin letters like σ verses Σ in symbol names? I'm looking for the minimally intrusive way to keep the reader/printer doing its upcase'ery but excluding these characters e.g. so that α doesn't get confusingly upcased into A.
<lisp123> Can you expand on this? I am not having any issues with uppercase on that I think
<pjb> lukego: but even with iso-8859-1 (and 15?) you have the problem of ß
<pjb> (string-upcase "ß") --> "SS" (string-downcase "SS") -> "ß" only when "ss" depending on the word.
<lisp123> Oh wait, I see what you mean
<pjb> lisp123: it's implementation dependent.
<lukego> lisp123: well, in numeric code I'm seeing variable names like SIGMA and RHO. I'd prefer to write σ and ρ. But it will be very confusing if these are printed back in the REPL as uppercased to Σ and Ρ.
<pjb> lukego: one alternatiev is to use pretty-greek.
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
<lukego> pjb: true. I've done that kind of thing in the past. I'd quite like to try tasting liberation of having it directly in the Lisp image though. I've been reading Julia code lately and it's full of these symbols and I want to try that out in my Lisp code, even if it might turn out to be a bad idea.
<pjb> Well, Finally on June 29 2017, the Council for German Orthography, the country’s official spelling authority, decreed that ß deserved its own capital: ẞ.
<pjb> (char-name #\ß) #| --> "Latin_Small_Letter_Sharp_S" |# (char-name #\ẞ) #| --> "U+1E9E" |#
<pjb> Note: clisp does: (list (char-name #\ß) (char-name #\ẞ)) --> ("LATIN_SMALL_LETTER_SHARP_S" "LATIN_CAPITAL_LETTER_SHARP_S")
<pjb> this is why clisp is nice even if it has not had new relelase for decades: it does things better than more maintained implementations.
<pjb> lukego: so the principle stand, you can define a set of characters that will be processed by CL functions, including ß->ẞ
<lisp123> pjb: is it possible to locally bind *readtable* for reading & printing?
<lisp123> Seems like it is possible
<lukego> pjb: yeah, single characters might be an easy way out, but it would be nice to start off general e.g. allowing αᵢ α₀ α′
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
<lukego> at least in SBCL the reader seems to be hardcoded to apply :upcase and :downcase based on unicode notions
<pjb> lisp123: of course.
<lukego> I'm wondering about adding an extension (setf READTABLE-CASE-ISO8559-1-ONLY)
<pjb> lukego: no, I just explained that if your estrict yourself ot iso-8859-1 you cannot do it because of ß. You need to use unicode!
* lukego will sleep on it
Guest82 has quit [Quit: Client closed]
<pjb> lukego: but nothing prevents you to define your own set of characters. Only you'll want one that allows case round-trips.
<lisp123> pjb: Does clisp handle lower case greeks and upper case greeks separately? (just confirming from your message)
karlosz has joined #commonlisp
karlosz has quit [Client Quit]
<pjb> On the other hand, it doesn't know about the decision of the Concil.
Yehowshua has joined #commonlisp
<lisp123> lukego: p.s. you may like this https://github.com/ashok-khanna/math-hydras
<edgar-rft> To make things even more funny, the sorting order of non-english characters is locale-dependent, for example in the german alphabet #\ä appears between #\a and #\b, so this is SBCL example is plain wrong, but only in Germany: (sort "aäb"#'char<) => "abä"
rain3 has quit [Ping timeout: 245 seconds]
<edgar-rft> other languages have different sorting orders, in swedish and turkish for example the #\ä appears at different places than in germany
<lisp123> edgar-rft: Indeed, unicode opens up a whole can of worms
<Yehowshua> Is it possible to load an .asd package from a specific location?
Everything has joined #commonlisp
<lisp123> Yehowshua: If you want you can add that location to the directories that asdf searches
<lisp123> If you are okay with it permanently being added. Otherwise there may be another solution, but you could write a macro to write to the asdf file and then also clear the required path when its no longer required
<lisp123> function* (sorry not sure why I said macro)
<Yehowshua> well, I've been working with CL now for almost a week and have this really long file I'd like to modularize
<Yehowshua> I was thinking a package would be the right approach
<lisp123> Makes sense
<lisp123> Here you go
<edgar-rft> in the log run Unicode will solve more problems than it creates, but we're still not quite there....
<Yehowshua> It seems kinda silly to not be able to load asd files directly
<MichaelRaskin> To be fair, the sorting problem is technically there even with Latin-1
<lisp123> Yehowshua: Depends on what _exactly_ you are after. ASDF is for builds. If you just want to quickly load your files, you can add some (load ...) commands into your main file (usually packages.lisp)
<lisp123> and just load that
cosimone has joined #commonlisp
<Yehowshua> Well - I'm wondering what is the right way to structure a lisp project
<Yehowshua> are you supposed to have a bunch of (load)s?
<MichaelRaskin> For moderate size, I would expect a single .asd, a package or a handful, and some number of source files.
<lisp123> It's the easier approach, but to be honest if you learn ASDF it is super easy too
<lisp123> Yehowshua: ASDF searches recursively all of the directories in its search path. So either save your .asd files within one of the default folders (such as ~/common-lisp) or add your default root folders to that list (per the above link)
<lisp123> Then you just need to do (asdf:load-system "name
<lisp123> But I'm not sure what stage you are in your lisp programming experience. The error messages via ASDF are a bit more cryptic, so maybe its something for a slightly later stage. Also I wouldn't want to burden the complexity of learning ASDF onto beginners too early. Thus, if you are starting off, don't worry and just use (load)s. Also, learn how the package system works before jumping to ASDF
<Yehowshua> package system?
<Yehowshua> Can you use the package system without ASDF?
<Yehowshua> I had assumed in-package was part of ASDF
<lisp123> Jump to #clschool and I can explain more in detail, don't want to spam the main channel
<edgar-rft> the package system is part of the Common Lisp standard, it's not ASDF-only
<edgar-rft> don't feel insulted by the title, it's the fastest way to learn packages -> https://flownet.com/gat/packages.pdf
<lotuseater> containers for symbols :)
kakuhen has joined #commonlisp
Lycurgus has quit [Quit: Exeunt]
Yehowshua has quit [Quit: Client closed]
Yehowshua has joined #commonlisp
yitzi has quit [Quit: Leaving]
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 245 seconds]
Lord_of_Life_ is now known as Lord_of_Life
wheelsucker has joined #commonlisp
wheelsucker has quit [Client Quit]
Oladon has joined #commonlisp
peterhil has quit [Ping timeout: 256 seconds]
shka has quit [Ping timeout: 245 seconds]
gaqwas has quit [Ping timeout: 256 seconds]
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
<aeth> package subset of system subset of project; package is part of CL, system is part of ASDF, project is part of Quicklisp (or your version control in general)
<aeth> it's a bit confusing that all three concepts exist
<aeth> A project will have one or more ASDF systems, which contain packages, which are just namespaces for symbols.
khrbt has quit [Ping timeout: 252 seconds]
lisp123_ has joined #commonlisp
lisp123 has quit [Ping timeout: 256 seconds]
khrbt has joined #commonlisp
lisp123_ has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
hendursaga has quit [Ping timeout: 276 seconds]
hendursaga has joined #commonlisp
lisp123 has quit [Ping timeout: 256 seconds]
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
pranavats has joined #commonlisp
pve has quit [Quit: leaving]
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
lisp123 has joined #commonlisp
nckx has joined #commonlisp
borodust is now known as boro
boro is now known as borodust
tyson2 has joined #commonlisp
lisp123 has quit [Ping timeout: 240 seconds]
didi has joined #commonlisp
<didi> It's interesting how a CLOS object's slot can be used as a place and different classes can define the same symbol as an accessor and SETF still works. I'm guessing accessor when used as a generalized variable isn't a simple macro and it does some magic dispatching.
<Bike> it's not magic, just a generic function
<Bike> it's dispatched the same as any other generic function
<didi> Bike: (defgeneric (setf accessor))?
<didi> Hum, sounds about right.
<Bike> implicitly, yeah
<didi> Amazing stuff.
<lotuseater> but indeed SETF on its own is a macro which expands the place you specify to calling the setter function with SETQ
cosimone has quit [Ping timeout: 252 seconds]
VincentVega has quit [Remote host closed the connection]
<lotuseater> or no, using it with FUNCALL on the object and the new value you specify
<didi> Hum, how would I define myself such accessor?
<didi> I can only think of a macro, which does not dispatch on argument types.
<didi> (defmacro accessor (obj) `(slot-value ,obj 'same-slot-name-for-every-class))
<didi>
<hayley> (defun (setf blah) (new-value object) (setf (internals-of object) new-value)) loosely speaking.
<lotuseater> no it's really a generic function
<lotuseater> as hayley says
<hayley> Replace DEFUN with DEFMETHOD for that kind of accessor, that's more or less the general pattern though.
<didi> How would it differentiate classes?
<hayley> Yes, that is where you want generic dispatch as lotuseater said.
<didi> Thank you.
<lotuseater> that's what generic functions are for
<lotuseater> (defmethod accessor-name ((obj my-class)) ...)
<lotuseater> and (on SBCL) when just using DEFSTRUCT it defines the setters and getters just as functions
<lotuseater> so I mean with DEFUN and not DEFMETHOD
<didi> Ok, I think I got it: (defmethod (setf accessor) (new-value (obj class)) ...)
<didi> Cool, cool.
<lotuseater> good :)
<didi> I can even establish places deep inside the object. Cool indeed.
<lotuseater> you could even specify/customize it more to certain types for new-value
<didi> Interesting.
* didi didn't think of that
<lotuseater> yes it handles quite complex place specification
<lotuseater> i just thought of it myself right now ^^ so thx
<Yehowshua> does anyone have any insight into this error? https://paste.debian.net/1210450/
<random-nick> the case keys aren't evaluated
<lotuseater> yes too many quotes
<random-nick> so you shouldn't quote them
<random-nick> (unless you want to also catch the symbol CL:QUOTE in the case)
<lotuseater> that's also a point where #. can be useful if not the symbols but their before bound values should be matched
<random-nick> do note that #. can't see locals since it gets evaluated during read-time
<lotuseater> yes
Oladon has quit [Quit: Leaving.]
<Yehowshua> wdym by too many quotes?
<lotuseater> just what it means ^^ no hidden meaning
<Bike> you have (case state ('return-or-newline ...)) but it should be (case state (return-or-newline ...))
White_Flame has quit [Remote host closed the connection]
<Yehowshua> return-or-newline is a symbol
<random-nick> yes, but case does not evaluate the keys of case clauses
<Yehowshua> oh
<Yehowshua> now you tell me
<lotuseater> :)
White_Flame has joined #commonlisp
<didi> Shouldn't it be (case state ((return-or-new-line) ...) ...), i.e., `return-or-new-line' inside a list?
<random-nick> well if case evaluated its keys then it would be just cond but worse
<lotuseater> '(newline #\newline :newline)
<random-nick> didi: no
<didi> random-nick: Thanks.
<Yehowshua> ok - cool - removing the quotes seemed to make it happy
<lotuseater> better use CHAR= instead of EQUAL when you're sure comparing chars
<random-nick> the only symbols which have to be written using that syntax are CL:T and CL:OTHERWISE
<random-nick> since they have a special meaning when they aren't in a list like that
<lotuseater> or WHEN / UNLESS for if constructs that just have a then xor else branch
<lotuseater> and at line 60 there is a (BLOCK statements ...) but for this is PROGN
<random-nick> yeah there's no reason to use BLOCK if you're not using RETURN-FROM/RETURN
<random-nick> lotuseater: there's no need for a PROGN either
<lotuseater> you are right, in this case not ^^
<random-nick> also, for the WHEN / UNLESS comment, some styles prefer having an if with a nil branch when the return value isn't being thrown away
<random-nick> personally I don't think that's important
<lotuseater> Yehowshua: it's very good that you use #\space and not "#\ "
<lotuseater> yeah often very situation dependent and how to be well specific about things
<White_Flame> for maximum pain in your source code, try #\ followed by a literal tab or other non-printing character :-P
<lotuseater> very funny :D
<lotuseater> tabs kill people
<lotuseater> and for your lexer if you have often this property list with token lexeme cursor you could think catching that with a struct
<aeth> White_Flame: nice idea, but everyone uses GNU Emacs and GNU Emacs prints all of those
<aeth> Especially when you have ^M