yauhsien has quit [Remote host closed the connection]
verisimilitude has joined #commonlisp
asarch_ has joined #commonlisp
asarch has quit [Ping timeout: 272 seconds]
yauhsien has joined #commonlisp
morganw has quit [Remote host closed the connection]
yauhsien has quit [Ping timeout: 244 seconds]
gxt has quit [Remote host closed the connection]
gxt has joined #commonlisp
gxt has quit [Read error: Connection reset by peer]
gxt has joined #commonlisp
Catie has quit [Quit: Heading out]
igemnace has joined #commonlisp
nij- has joined #commonlisp
aartaka has quit [Ping timeout: 272 seconds]
<nij->
If stability is of concern, should I stick with the latest release of sbcl? Or should I stick with older version? Both ways seem to have their merits. The former makes sure there's less bugs, while the later is more tested.
mon_aaraj has quit [Ping timeout: 272 seconds]
mon_aaraj has joined #commonlisp
Brucio-61 has quit [Ping timeout: 276 seconds]
Brucio-61 has joined #commonlisp
yauhsien has joined #commonlisp
qhong_ has joined #commonlisp
qhong has quit [Ping timeout: 240 seconds]
cosimone has quit [Remote host closed the connection]
<verisimilitude>
That's an optimistic view, nij-.
cosimone has joined #commonlisp
<nij->
Which one, verisimilitude?
<verisimilitude>
There's no reason to believe flaws won't be added by a newer version.
yauhsien has quit [Ping timeout: 272 seconds]
<nij->
I see, that's also something of concern.
<verisimilitude>
I suggest using multiple implementations of Common Lisp, and rarely, if ever, updating them.
<yitzi>
There is also no reason to think that old versions are more "stable" and contain less bugs.
<verisimilitude>
Yes.
<nij->
I see. If time permits, maybe the safest way is to test agains many impls. and many versions?
<verisimilitude>
To be pedantic, that should be ``fewer'' and not ``less''.
<verisimilitude>
Yes, nij-.
mon_aaraj has quit [Remote host closed the connection]
Madsy has joined #commonlisp
mon_aaraj has joined #commonlisp
mon_aaraj has quit [Ping timeout: 240 seconds]
mon_aaraj has joined #commonlisp
Brucio-61 has quit [Ping timeout: 240 seconds]
aeth has joined #commonlisp
yauhsien has joined #commonlisp
mon_aaraj has quit [Ping timeout: 268 seconds]
mon_aaraj has joined #commonlisp
<jeosol>
nij: depening on your setup, it doesn't take much to update. I use primarily SBCL, and updating is usually a breeze, apart from some changes required on your part, e.g., 2.2.6 using a different compression algorithm (?)
yauhsien has quit [Ping timeout: 255 seconds]
mon_aaraj has quit [Ping timeout: 272 seconds]
mon_aaraj has joined #commonlisp
attila_lendvai has quit [Ping timeout: 272 seconds]
notzmv has quit [Ping timeout: 272 seconds]
mon_aaraj has quit [Ping timeout: 272 seconds]
mon_aaraj has joined #commonlisp
yauhsien has joined #commonlisp
mon_aaraj has quit [Ping timeout: 260 seconds]
mon_aaraj has joined #commonlisp
WBarends has quit [Ping timeout: 272 seconds]
yauhsien has quit [Ping timeout: 244 seconds]
yauhsien has joined #commonlisp
akoana has quit [Quit: leaving]
yauhsien has quit [Ping timeout: 240 seconds]
gxt has quit [Write error: Connection reset by peer]
gxt has joined #commonlisp
Harag has joined #commonlisp
mon_aaraj has quit [Ping timeout: 272 seconds]
mon_aaraj has joined #commonlisp
yauhsien has joined #commonlisp
jealousmonk has quit [Quit: ERC 5.4.1 (IRC client for GNU Emacs 27.1)]
tyson2 has quit [Remote host closed the connection]
mon_aaraj has quit [Ping timeout: 272 seconds]
mon_aaraj has joined #commonlisp
<dbotton>
Is there a function that takes lisp code and spits it out formatted nicely? I see there is :trivial-formatter but that takes asdf systems not a string with code
<hayley>
PPRINT?
asarch_ has quit [Remote host closed the connection]
<dbotton>
it doesn't seem to do much, maybe there are settings for it?
<q3cpma>
Hello, beginner in CL, I want to represent some FS metadata using nested hash tables, but I want to be able to hold a "reference" to a node. Is wrapping each node in a cons the "idiomatic" way of doing so?
Th30n has joined #commonlisp
<jackdaniel>
yes, it is a poor man's locative
<jackdaniel>
but when you start expecting more from it then you should make it a slot in a class
<jackdaniel>
I gather that what you mean is that in the table you store (cons your-element #<garbage>), so you can modify the car
yauhsien has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
yauhsien has joined #commonlisp
shka has quit [Read error: Connection reset by peer]
gxt has quit [Remote host closed the connection]
gxt has joined #commonlisp
shka has joined #commonlisp
Everything has left #commonlisp [#commonlisp]
waleee has joined #commonlisp
<q3cpma>
jackdaniel: Thanks, and yeah I'd so (cons (make-hash-table)), but I don't understand the slot comment
<q3cpma>
(My understanding is that by copying the cons, I hold a reference to the node without copying the content of the cons)
<q3cpma>
But how do I hold an accessor in a variable? Can't do that, right?
<jackdaniel>
I don't understand
<q3cpma>
Well, I want to do (defvar *current-node* ...) to avoid doing a chain of gethash to reach said node
<jackdaniel>
so if you hold in *current-node* a cons, then you could hold there the instance of the class <wrapper>, it doesn't matter really
<q3cpma>
Hmmm, but isn't the slot copied when I copy the instance?
<jackdaniel>
and instead of (car *current-node*) you'd use (content *current-node*); that said cons is fine
<jackdaniel>
how would you copy the instance?
fitzsim has quit [Remote host closed the connection]
<jackdaniel>
in lisp everything is a pointer, you can't copy it by accident
<q3cpma>
Via setf, I suppose?
<Josh_2>
or you can use plists
<jackdaniel>
you are passing a pointer to the instance; perhaps you even want to avoid the cons, because it seems that you only want to have access to a single element
<Josh_2>
then you can destructure on them very nicelyu
<q3cpma>
But if do setf on array, I do copy the array (deep copy), I don't get a ref
<jackdaniel>
just (setf *current-node* #<node>)
<jackdaniel>
nothing will be copied
<q3cpma>
And I expect the same with a hash-table
<jackdaniel>
no, there is no deep copy
<q3cpma>
Hold on, if I do (defvar *ht* (make-hash-table)) and (defvar *ht2* *ht*) then modify *ht2*, *ht* isn't.
<q3cpma>
That's deep copy for me
pve has quit [Quit: leaving]
<jackdaniel>
use defparameter instead
SR-71` has quit [Ping timeout: 244 seconds]
<jackdaniel>
defvar does not assign the variable if it is already defined
<q3cpma>
Too long to type =p
<jackdaniel>
well, that's the source of your confusion
<Josh_2>
You are using the wrong language then :joy:
<jackdaniel>
you don't, a reasonable line length is ~100,120 characters for lisp
<jackdaniel>
but hey, we don't have 800x600 displays anymore
<jackdaniel>
or even 80 character wide terminals
<nij->
The 72-char rule is for 800x600 displays?
<jackdaniel>
it originates from terminals that were 80 character wide afair
<nij->
I'm on 1366x768.. how many chars are optimal?
<jackdaniel>
100,120
<ogamita>
q3cpma: given that accessors are pair of functions, you would have to hold two functions in the variable, the reader and the writer. However, in the case of structure-object accessors, it is not specified how the writers are implemented, possibly not a (setf foo-bar). In that case, you would have to wrap it in a closure.
<q3cpma>
ogamita: seems simpler to use cons, in that case
<ogamita>
q3cpma: obviously, you can define a macro to help.
<jackdaniel>
q3cpma: it is even simpler to directly setf the object, I thought that your use case is different from the original description
<nij->
jackdaniel .. but but I'm using a wide font and am enjoying 72 rule :)
<jackdaniel>
then there is no proble, is there?
<q3cpma>
Well, after a bit of experimentation, looks like I was mistaken about some fundamental CL stuff, so thanks for clearing that for me
<jackdaniel>
sure
<jackdaniel>
hint hint: (defmacro defpar (name value) `(defparameter ,name ,value))
sabas3dgh^ has quit [Read error: Connection reset by peer]
<jackdaniel>
there, it is not so long anymore
<nij->
(defmacro dp (n v) `(defpararmeter ,n, v))
<q3cpma>
Indeed, too set in my macro-less PL ways, I guess
sabas3dgh^ has joined #commonlisp
<q3cpma>
Another question that has nothing to do with the whole reference thing. What portable third-party hash table do people use when they want a custom test function (to use CLOS objects as keys, for example)?
sabas3dgh^ has quit [Read error: Connection reset by peer]
<jackdaniel>
many implementation allow supplying your own test function (that is the implementation - specific extension)
pranavats has joined #commonlisp
sabas3dgh^ has joined #commonlisp
<q3cpma>
Which is why I said portable, though
<q3cpma>
(and the define-test thing offends my eyes, when supplying a lambda should just work)
<jackdaniel>
I'm not aware of a 3rd party hash table implementation in cl; perhaps people are too busy to reimplement existing stuff for aesthetic raisins
<nij->
Is the older sbcls' manual hosted online?
<q3cpma>
jackdaniel: well, fset has something and cliki lists stuff like genhash, but I wondered if there was an "accepted" one
<jackdaniel>
if you accept it then it wil be accepted by you, wouldn't it?
<q3cpma>
Sure, but you do get my drift; having a bizarre (i.e. full of obscure stuff) dependency tree is a weakness, in general
<jackdaniel>
I don't see how this examplifies the problem, so I guess I don't get it, sorry
<jackdaniel>
nij-: standard mentions eq, eql, equal and equalp, but some implementations allow you to supply your own custom test along with a hash function
<q3cpma>
I know CL-land is a bit different, but if you depend on obscure code unused by almost everybody, your code becomes harder to read, you "force" users to install dependencies that are only needed by you (unlike something like alexandria, which is probably a zero-cost dep., in that sense) and chances of breakage may be higher in the future
<jackdaniel>
ah, sure; but fset is around for quite a long time
<q3cpma>
Yeah, but I'm wary of the ML/Haskell cult of "functional"
<q3cpma>
But indeed, FSet does seem quite right
<Josh_2>
You can already use clos objects as keys if you use the #'eq test
<q3cpma>
Really? Thought it was only defined for structures
<q3cpma>
(equalp, that is)
<jackdaniel>
eq is identity, if you supply the same object as the key, then any object will do (bar immediate objects, that's why you should always use eql)
<q3cpma>
Yeah, but if you want to compare content, you're done, right?
<jackdaniel>
then eql won't work unless you implement your own test and hash functions
<q3cpma>
Indeed, that's what I meant
<q3cpma>
Too bad generics aren't build into CL, really, or specializing equalp on your class would have been nice
<Josh_2>
What
<Josh_2>
They are
<q3cpma>
Well, I meant, in that standard library
<q3cpma>
the*
<Josh_2>
What
<jackdaniel>
even if equalp were a generic function, you'd still need to teach cl how to hash the object
<q3cpma>
jackdaniel: true, sxhash would need to be generic too, then
* jackdaniel
shrugs
<q3cpma>
Josh_2: What I meant is that a lot of standard functions would have made sense as generic functions to be extended by the user (like equalp)
<jackdaniel>
n.b implementation is not required to use sxhash; especially because different hashes may be useful for differnt tests
<q3cpma>
Huh, interesting
<Josh_2>
Perhaps you are approaching the problem incorrectly. You could just take the few important parts from you class, jam them in a list and then use that with equal as the key for a hash
<jackdaniel>
q3cpma: there is a library equals, why not use it? there isn't much merit in redefining equalp as a generic function
<q3cpma>
jackdaniel: I know, and there's generic-cl for a more general thing, still feels like the wart it is
<Josh_2>
I think it is quite common to define your own generic called equals
<q3cpma>
Josh_2: it would work, indeed
<Josh_2>
You could also just have an ID slot which is a randomly generated number and then use that as the key
<jackdaniel>
don't take it wrong, but you seem to have quite strong opinions for a self proclaimed newbie ;)
X-Scale has joined #commonlisp
<q3cpma>
I do, but I was under the impression that it was quite widespread due to CLOS being added late in that standard and thus what came before not "adapted" to it
<q3cpma>
Josh_2: that's a bit dangerous, isn't it?
<nij->
jackdaniel got it - if I use other testers for hash table, would the performance be much lower?
<Josh_2>
I dont think its particularly dangerous, especially if you use very long numbers
<jackdaniel>
if you rely on a random id as a key, they you may as well just rely on the object identity
<jackdaniel>
nij-: I guess that this depends on the hash function and the test performance
<Alfr>
q3cpma, no. (my-hash x) => 0 is a valid hash function for all x, every hashmap implementation not coping with it, is imo, broken.
<q3cpma>
Alfr: sorry, what post do you answer? I totally agree with you
<Alfr>
q3cpma, I think, I misinterpreted what you were referring to by dangerous, sorry. So, just don't mind what I just said.
<q3cpma>
np
Krystof has joined #commonlisp
<lisp123>
q3cpma: clos adds runtime overhead so you wouldn't want many standard functions to be generic functions unless you used some of the modern techniques for fast generic functions (whose authors visit this chat from time to time)
X-Scale has quit [Ping timeout: 255 seconds]
<lisp123>
you can always shadow a symbol and do as your heart desires, but probably not a good idea from a code readability perspective
<Alfr>
q3cpma, found it again; was at the time of writing, thinking that it was about the id slot w/ random id.
* Alfr
needs more coffee ...
<q3cpma>
lisp123: I discussed that on some forums and reached the (perhaps wrong) conclusion that if generic were to be pervasive to the language, a builtin mechanism to allow static dispatch (a way to say "that class can't be redefined, like structs", for example) would be needed
X-Scale has joined #commonlisp
<q3cpma>
Something like fast-generic-functions, but builtin, basically
Algernon91 has joined #commonlisp
<lisp123>
q3cpma: there's a concept of 'sealed' generic functions which may be the concept you described just now
<lisp123>
i agree with you btw, i think implementations already do some sort of optimisations?
<lisp123>
but for example
<lisp123>
if I call (generic-function 'abc 'def)
<lisp123>
you need to know what 'abc and 'def are to be able to call the right gf
<lisp123>
whereas (non-generic-function 'abc 'def) would just error out if the wrong types were received
<lisp123>
so i think the question is partly also how you organise your code base
<lisp123>
unless you are hoping for static type inference, but that kinda defeats the point of having functions as g.f
<lisp123>
(if you know a certain path in you program always will take values of certain types - why do you need to use g.f. there?)
<lisp123>
(of course, from a code organisational perspective, it helps)
<q3cpma>
Well yeah, if you want static dispatch, you need the type a build-time, for sure. But it isn't hard for stuff like SBCL with a few annotations
<lisp123>
Yeah my point was do you need g.f. if you know your types at compile time
<q3cpma>
The thing is that having both potential static dispatch and guaranteed dynamic dispatch in the same function (and symbol) is the real "goal"
<lisp123>
There is value, but I think the real value is at runtime
<q3cpma>
Well, anyway, no use crying about that, fgf exists and is already quite wonderful
<hayley>
JIT when
<lisp123>
my point was more conceptual
<q3cpma>
My only beef is that I'd prefer extending the standard library instead of replacing it
<q3cpma>
hayley: to specialize at runtime? Guess it would work, but I'm partial to the static way, personally
<lisp123>
at least you have the option
<q3cpma>
For sure
<lisp123>
in other languages, you wouldn't have the flexibility to modify the language at compile time
<lisp123>
:)
<q3cpma>
Main thing that attracted me to Lisp, together with my falling in love with sexprs
ebrasca has joined #commonlisp
tyson2 has joined #commonlisp
Oddity has quit [Ping timeout: 244 seconds]
lisp123 has quit [Quit: Leaving...]
sabas3dgh^ has quit [Read error: Connection reset by peer]
sabas3dgh has joined #commonlisp
<Josh_2>
Beach has been working on optimizing generic functions with a technique called call site optimization
<q3cpma>
In Cleavir?
<hayley>
q3cpma: The problem with doing it ahead of time (in my experience) is that you often generate code for types you never use.
<Josh_2>
in SICL
<hayley>
The technique isn't specific to Cleavir. It hasn't been implemented in SICL yet, either.
<q3cpma>
hayley: how is that? If you can determine the argument type at build-time, you just generate the code for it, right?
<q3cpma>
I see
<hayley>
You need to determine the possible argument types though, and the worst case is that we have to over-estimate, and compile for more types than necessary, to preserve semantics.
Brucio-61 has quit [Ping timeout: 260 seconds]
<hayley>
one-more-re-nightmare currently generates 4 specialisations at compile-time (which are (simple-array character 1), (simple-array base-char 1), (array character 1) and (array base-char 1)). Though I don't think SBCL distinguishes between the latter two in the code generated.
<q3cpma>
I still don't understand why the compiler needs to thing about "possible" argument types, when it could just see at compile-time what's needed, and keep a generic fallback for the rest
<hayley>
And it might be useful to deduplicate types, as the SICL specification suggests it wouldn't be necessary to have a separate base-string(?) type. (Counterpoint: base-chars are useful for packing more into SIMD registers.)
<Josh_2>
Methods and generics can be added at runtime :O
<q3cpma>
hayley: yes
<hayley>
The issue is I cannot see what is needed at compile-time. Maybe some type inference would help, and maybe the CLtL2 protocol would help, I dunno.
<q3cpma>
Josh_2: true, but that mechanism (the static one) should be restricted to the build time thing
<jackdaniel>
q3cpma: when you call the generic function, determining the effective method that must be called is based on classes of each argument (and if that fails, on object identities)
<q3cpma>
hayley: all this optimization stuff was about compiler internals, implementation defined stuff, from my side
<Nilby>
in practice, the small overhead of calling generic functions, is very rarely a problem. in code where it's an issue, you can easily, and even automatically, get rid of it.
<jackdaniel>
so if you want to skip the step for determining the effective method, you must know: argument types before the generic function is called, and the effective method at compilation time
<q3cpma>
Yes
<hayley>
I think it still applies to compiler internals, honestly.
<hayley>
In particular, any inter-procedural analysis is going to be tricky, slow, and could be invalidated by redefinition.
<q3cpma>
Well, yeah, can't do static dispatch with types that can change at the drop of a hat
<q3cpma>
(my understanding is that's one of the reasons slot type annotations are ignored by most impls.)
<hayley>
Hence the JIT part.
<jackdaniel>
heisig wrote a nice presentation about fast dispatch on sealed argument domains (and there is a library that implements that)
<q3cpma>
I'm not a fan of lack of determinism and whole program optimization, though
<q3cpma>
jackdaniel: I did read it and fgf seems like the cleanest solution on the block
<q3cpma>
The CLOS featureful method dispatch and combination sure doesn't help the endeavour
<hayley>
There are ways to make it deterministic (or close enough), since people do eventually want to benchmark their stuff. And one can speculate on whole programs.
<jackdaniel>
fast-gf-dispatch by beach is also a very nice solution (and it allows redefinition)
<jackdaniel>
its drawback is that it is slow after the redefinition until the discriminating funciton doesn't change
<q3cpma>
jackdaniel: Can't find it. I know about static-dispatch and fgf only
<jackdaniel>
for implementations where the compiler is slow (cough gcc backend cough) it is a mild disaster ,)
yauhsien has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
yauhsien has quit [Ping timeout: 276 seconds]
Colere has quit [Ping timeout: 240 seconds]
Colere has joined #commonlisp
waleee has quit [Ping timeout: 272 seconds]
waleee has joined #commonlisp
<hayley>
May I ask, what relevance does most of the documentation Quickref produces have for a "reference manual"? In particular, it documents the file hierarchy and all internal definitions, which I believe are definitely not relevant to a user.
Furor has joined #commonlisp
<hayley>
(It's also a bit annoying that the reference is called "The blabla Reference Manual", when I have my own "The blabla Manual" website which covers information that auto-generated documentation can't cover.)
<jackdaniel>
many people think that none; the outrage outbursts ~once 3 months when someone find "their" library on quickref and are /concerned/ :)
<jackdaniel>
finds*
<yitzi>
I don't find it useful.
Colere has quit [Ping timeout: 244 seconds]
ahlk has joined #commonlisp
waleee has quit [Ping timeout: 272 seconds]
sabas3dgh^ has joined #commonlisp
sabas3dgh has quit [Ping timeout: 244 seconds]
<hayley>
jackdaniel: I had similar thoughts months ago, but just remembered it today.
yauhsien has joined #commonlisp
mon_aaraj has quit [Ping timeout: 276 seconds]
mon_aaraj has joined #commonlisp
Algernon91 has quit [Quit: Leaving]
mon_aaraj has quit [Ping timeout: 272 seconds]
mon_aaraj has joined #commonlisp
cage has joined #commonlisp
yauhsien has quit [Ping timeout: 272 seconds]
sabas3dgh has joined #commonlisp
mon_aaraj has quit [Ping timeout: 240 seconds]
mon_aaraj has joined #commonlisp
sabas3dgh^ has quit [Ping timeout: 272 seconds]
waleee has joined #commonlisp
Th30n has quit [Quit: WeeChat 3.5]
mon_aaraj has quit [Ping timeout: 240 seconds]
mon_aaraj has joined #commonlisp
MajorBiscuit has quit [Ping timeout: 272 seconds]
MajorBiscuit has joined #commonlisp
Madsy has quit [Quit: Leaving]
sabas3dgh has quit [Read error: Connection reset by peer]
sabas3dgh has joined #commonlisp
ldb has joined #commonlisp
mon_aaraj has quit [Ping timeout: 272 seconds]
mon_aaraj has joined #commonlisp
<ldb>
good morning
frgo has joined #commonlisp
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
<beach>
Hello ldb.
mon_aaraj has quit [Ping timeout: 260 seconds]
mon_aaraj has joined #commonlisp
thomaslewis has joined #commonlisp
HaxCPU is now known as Andrew
azimut has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
azimut has quit [Remote host closed the connection]
igemnace has quit [Remote host closed the connection]
azimut has joined #commonlisp
Andrew is now known as HaxCPU
sabas3dgh^ has joined #commonlisp
ldb has quit [Remote host closed the connection]
ldb has joined #commonlisp
sabas3dgh has quit [Ping timeout: 272 seconds]
ldb has quit [Ping timeout: 255 seconds]
nij- has left #commonlisp [Using Circe, the loveliest of all IRC clients]
artchad has joined #commonlisp
<artchad>
Hey, how can I check whish system is loaded by quicklisp?
Oladon has joined #commonlisp
<beach>
Do you mean in the current image or that you have ever downloaded using Quicklisp?
<artchad>
I need to load a modified version of aserve on my server, so I just included a "third-party" directory in there, where I copy my custom version. But I'm not sure whether it's actually being loaded.
<beach>
artchad: In the second case, the stuff you downloaded is in ~/quicklisp/...
<artchad>
my lisp image runs a system from .local/share/common-lisp/source/<project>
MajorBiscuit has quit [Read error: Connection reset by peer]
<artchad>
I think it's loading the aserve from ~/quicklisp and not from my directory in .local
<Bike>
there's also ql:where-is-system to let you know where the source for the loaded system is
<Bike>
sounds like you want that maybe.
<artchad>
thanks
<artchad>
yeh, it indeed didn't load my version.
<artchad>
I guess I have to add it to the asdf:*central-registry*
<beach>
artchad: Or add it to ~/quicklisp/local-projects/
<artchad>
I stopped using that, for some reason. Can't remember why anymore.
<artchad>
had some loading issues
<beach>
Ah, OK.
<beach>
The disadvantage is that you need to do a (ql:register-local-projects) whenever something changes.
ebrasca has quit [Remote host closed the connection]
<artchad>
I think there was an issue where I copied some third party code into local-projects, which used a custom library I also used. Then I had trouble figuring out why the library behaved weirdly, while not realizing that a different version was loaded. Because local-projects seems to have precedence.
<artchad>
precedence over the quicklisp/dists/quicklisp/software that is
waleee has quit [Quit: WeeChat 3.5]
<ogamita>
artchad: you may also add directories to quicklisp-client:*local-project-directories*
tyson2 has joined #commonlisp
<ogamita>
AFAIK, quicklisp doesn't record what it does to the image, so it won't tell you that it loaded a system, but asdf does: asdf/operate:already-loaded-systems
<ogamita>
artchad: of course, then you won't know if the system was loaded with quicklisp or with asdf directly.
sabas3dgh has joined #commonlisp
sabas3dgh^ has quit [Ping timeout: 272 seconds]
ttree has joined #commonlisp
azimut has quit [Remote host closed the connection]
<artchad>
ogamita: thanks for the tip
sander has quit [Quit: So long! :)]
azimut has joined #commonlisp
<artchad>
I don't care whether it's loaded via asdf directly or by quicklisp. It should just load the correct library.
<artchad>
I actually moved the project to ~/quicklisp/local-projects on the server. There are no other projects in there, so it should be fine.
q3cpma has quit [Quit: leaving]
Oladon has quit [Quit: Leaving.]
sabas3dgh has quit [Read error: Connection reset by peer]
sabas3dgh has joined #commonlisp
orestarod has joined #commonlisp
sabas3dgh has quit [Read error: Connection reset by peer]
sabas3dgh^ has joined #commonlisp
attila_lendvai has quit [Read error: Connection reset by peer]
dra has joined #commonlisp
hashfunc658 has joined #commonlisp
ns12 has quit [Quit: bye]
tyson2 has quit [Ping timeout: 268 seconds]
<hashfunc658>
dbotton: what is the best way to reinitialize the INITIALIZE function without having to restart SBCL. for example: i'd like to make a change to the :LONG-POLL-FIRST parameter in INITIALIZE, but the change doesn't take effect for some reason when i reload my page
causal has joined #commonlisp
<dbotton>
(clog:shutdown) then initialize again.
<dbotton>
If changing how to handle the default page or new routes clog:set-on-new-window
sander has joined #commonlisp
<hashfunc658>
perfect, thanks. so it appears that when i set :LONG-POLL-FIRST to T, my initial HTML is properly served, but the WebSocket connection fails to connect. the error is "WebSocket connection to 'wss://<my-domain>.app/clog?r=1' failed:" where do you think would be a good place to start investigating this?
<dbotton>
your issue has nothing to do with CL or CLOG but apache, I would say apache docs for proxying websockets
<dbotton>
So I now have autocomplete working in clog builder using swank
<dbotton>
does sly also use swank?
Brucio-61 has joined #commonlisp
analogsalad has joined #commonlisp
yauhsien has joined #commonlisp
sander is now known as sndr
yauhsien has quit [Ping timeout: 276 seconds]
<yitzi>
It uses a slynk which is a fork.
<dbotton>
so the package swank exists? (sorry should have been more clear)
<dbotton>
or rather it uses that package as well
tyson2 has joined #commonlisp
Oddity has joined #commonlisp
jeosol has quit [Quit: Client closed]
jeosol has joined #commonlisp
cage has quit [Remote host closed the connection]
poselyqualityles has joined #commonlisp
cage has joined #commonlisp
jeosol has quit [Quit: Client closed]
dra has quit [Ping timeout: 255 seconds]
cage has quit [Quit: rcirc on GNU Emacs 27.1]
ttree has quit [Ping timeout: 244 seconds]
jeosol has joined #commonlisp
<AadVersteden[m]>
I jokingly wrote a ~red/blue reader macro but thinking about it, I started wondering. Suiting for karma I wondered how I could make `red` read randomly as `red` or `blue`.
<AadVersteden[m]>
I thought of setting a reader macro on the letter `r`, but that kicks in regardless of where `r` is positioned. The reader macro triggers on `green` splitting `g` off from `reen`. What would the right construction be for this devilish idea?
<verisimilitude>
I thought I'd visit this channel after a few years and see what's happening in it.
<verisimilitude>
Was that terminal program ever finished?
akoana has joined #commonlisp
mrcom__ has quit [Remote host closed the connection]
mrcom__ has joined #commonlisp
cosimone` has joined #commonlisp
<_death>
nah.. put it aside like so many other projects, maybe will pick up parts of it in the future, who knows
<verisimilitude>
Oh, what a shame. Still, I expected to be the only user of my libraries anyway.
cosimone has quit [Ping timeout: 272 seconds]
<rendar>
why `((first '(+ 2 3)) 5 6)` gives me an error? that first should be evaluated to `+` which in turn will add 5 to 6, right?
<saturn2>
AadVersteden[m]: you'd have to write your own read function, i think
livoreno has joined #commonlisp
<_death>
verisimilitude: I should check your site for new stuff, a bit later
dra has joined #commonlisp
<conjunctive>
rendar: CL is a Lisp-2, so you'll need to indicate that the symbol is in reference to a function. Try `(funcall (first '(+ 2 3)) 5 6)`
<rendar>
oh!
<rendar>
what is the lisp-2 difference?
<AadVersteden[m]>
saturn2: that would mean functions like the repl would need to call the different read function, right?
szkl has quit [Quit: Connection closed for inactivity]
<conjunctive>
rendar: To quickly summarize, it means that variables and functions live in separate places. So you have to differentiate when you want `+` the function and `+` the variable.
<saturn2>
AadVersteden[m]: yes. i guess you could abuse the readtable by setting every possible character to your replacement read function
<_death>
even in a lisp1 like scheme it wouldn't work, because (first '(+ 1 2)) evaluates to a symbol, not a function ((first (list + 1 2)) 5 6) however..
notzmv has quit [Ping timeout: 276 seconds]
<rendar>
i see!
<AadVersteden[m]>
saturn2: which would be fair for this trick. we are in evil land.
<rendar>
while in scheme they live in the same place
<verisimilitude>
I expect to work with Common Lisp a bit more soon, but mostly as a temporary measure. There's an old programming language suited to some of my work, but it's so old I'll need to write the implementation I use, and I've still yet to do so.
<AadVersteden[m]>
I would ideally be able to dispatch only on the start character.
<rendar>
thanks
<verisimilitude>
The initial implementation will probably be written in Common Lisp.
saura has quit [Ping timeout: 240 seconds]
<dbotton>
verisimilitude: what lang is that?
<verisimilitude>
I've been keeping it a secret, it helps that no one really asks, but I'll go ahead and write it: REFAL.
<verisimilitude>
My machine code development tool switched to a doubly-linked list model, what D provides, and REFAL is based around them.
<rendar>
uhm, a function is first class in CL right?
<verisimilitude>
I'm going to make it homoiconoic and call it CLEF.
<verisimilitude>
Yes, rendar.
<rendar>
so, a struct that contain data, such as integers or string, can contain also a function..
<verisimilitude>
Yes.
<Bike>
sure, you can store functions in structure objects, assuming the declared type of the slot agrees (which it does by default)
<rendar>
i see
<rendar>
this bring to object oriented design patterns in CL?
<Bike>
no, for object orientation we just use an actual object system. it's called CLOS, Common Lisp Object System.
<_death>
it is easy to imagine a lisp2 (CL-like) that has an evaluation rule similar to scheme.. then (#'+ 1 2) could work
<White_Flame>
design patterns aren't really applicable to CL, because you can build structure with macros instead of faking it at runtime with OO
<rendar>
i see
<verisimilitude>
What others call ``design patterns'' in weaker languages, a Lisp hacker calls a macro.
<White_Flame>
and besides, the usage styles/patterns of function values and source code generation predate OO design patterns anyway
<rendar>
yes
<White_Flame>
the term "functional programming" has had 2 meanings over time. While it usually implies "pure functional" programming nowadays, it used to mean the style of programming with function objects and passing them around to things like MAP functions
<White_Flame>
(though there is significant overlap between the two)
<rendar>
yes
<rendar>
but i guess that lisp is not pure functional programming
<White_Flame>
it supports that style
<rendar>
maybe it isn't functional programming either?
<White_Flame>
many of the list processing functions have a non-destructive and a specially-named destructive version
<verisimilitude>
They're for effect and efficiency.
<White_Flame>
things like SUBLIS (functional) vs NSUBLIS (destructive)
<White_Flame>
I don't recall the etymology of "N" for destructive, but that's what the letter implies
<_death>
nonconsing
<White_Flame>
ah, k
<_death>
though often clhs places no such constraint
analogsalad has quit [Quit: bye]
<verisimilitude>
Then there are REMOVE and DELETE, say.
<White_Flame>
and APPEND vs NCONC
<verisimilitude>
Say, I want to discuss REFAL a tiny bit more. Put simply, it's so alien I've had a hard time thinking how to implement it, so hard I'm willing to use a library instead of writing all of it by myself, for now. I'd appreciate some help in finding the right library for this.
<verisimilitude>
The core of REFAL is a backtracking pattern matcher.
<White_Flame>
have you written a prolog in lisp before? sounds like a good place to start
<verisimilitude>
I've not.
<_death>
many lisp books contain simple implementations for pattern matching
<White_Flame>
both On Lisp and PAIP create a prolog, I don't recall which was "better"
<rendar>
well purely fp languages are about non-modifiable structures, right? Lisp isn't like that..
<White_Flame>
but they go thorugh multiple backtracking strategies and pattern matching
<verisimilitude>
Ironically, another reason I chose REFAL was to have a small target for language implementation, before moving on to larger languages.
<verisimilitude>
It's just so alien to my usual work.
<White_Flame>
rendar: lisp has plenty of that
<White_Flame>
it's just style, not enforcement
<rendar>
uhm, i see
<rendar>
i know too little yet :( i'm reading A Gentle Introduction to CL, but it's.. too basic book
<White_Flame>
maybe switch to A Violent Bludgeoning with CL? ;)
<_death>
some of PAIP's (and, more recently, SDF's) pattern matchers are more expressive than On Lisp's (e.g., they can match segments)
<White_Flame>
verisimilitude: I actually did a ton of design work for pattern matchers with multiple multi-element wildcards, and that never ended up workable. Doing head-and-tail matching with a singular multi-element wildcard in the middle does simply it substantially
<White_Flame>
*simplify
<White_Flame>
I would presume that Refal matchers could only return 1 possible result for each match form as a result
<verisimilitude>
Yes.
<verisimilitude>
It has a choosing rule for that.
<White_Flame>
whereas if you had the equvalent of 'A'e1'B'e2'C' you could get an explosion of potential results
<verisimilitude>
Yes; it matches the leftmost possibility.
<conjunctive>
rendar: If you're looking for another resource, you could try Practical Common Lisp https://gigamonkeys.com/book/
sabas3dgh^ has joined #commonlisp
sabas3dgh has quit [Read error: Connection reset by peer]
random-nick has quit [Ping timeout: 272 seconds]
jmdaemon has joined #commonlisp
sabas3dgh has joined #commonlisp
sabas3dgh^ has quit [Read error: Connection reset by peer]
dra has quit [Remote host closed the connection]
moosch has joined #commonlisp
orestarod has quit [Ping timeout: 240 seconds]
mon_aaraj has quit [Ping timeout: 244 seconds]
mon_aaraj has joined #commonlisp
yauhsien has joined #commonlisp
sabas3dgh^ has joined #commonlisp
sabas3dgh has quit [Ping timeout: 240 seconds]
yauhsien has quit [Ping timeout: 272 seconds]
sabas3dgh has joined #commonlisp
sabas3dgh^ has quit [Read error: Connection reset by peer]
sabas3dgh^ has joined #commonlisp
sabas3dgh has quit [Ping timeout: 244 seconds]
Lord_of_Life_ has joined #commonlisp
ttree has quit [Ping timeout: 272 seconds]
Lord_of_Life has quit [Ping timeout: 272 seconds]
Lord_of_Life_ is now known as Lord_of_Life
sabas3dgh has joined #commonlisp
sabas3dgh^ has quit [Read error: Connection reset by peer]
attila_lendvai has quit [Ping timeout: 244 seconds]
verisimilitude has quit [Ping timeout: 244 seconds]