<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.
<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...
<_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.
<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]
<_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
<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.
<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: ẞ.
<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
<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
<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.