wilfred has quit [Quit: Connection closed for inactivity]
<beach>
Hello phoe.
<phoe>
hey hi beach
amb007 has quit [Ping timeout: 258 seconds]
Cymew has joined #commonlisp
amb007 has joined #commonlisp
<rdrg109>
Good morning
lucerne has joined #commonlisp
<beach>
Hello rdrg109.
<beach>
rdrg109: Do you have any particular reason for using GNU CLISP over other implementations?
lucerne has quit [Remote host closed the connection]
lucerne has joined #commonlisp
rgherdt has quit [Ping timeout: 252 seconds]
rgherdt has joined #commonlisp
IAmRasputin has joined #commonlisp
lucerne has quit [Remote host closed the connection]
ibinderwolf_ has joined #commonlisp
IAmRasputin has quit [Ping timeout: 252 seconds]
ibinderwolf__ has joined #commonlisp
ibinderwolf has quit [Ping timeout: 265 seconds]
ibinderwolf_ has quit [Ping timeout: 258 seconds]
hendursaga has quit [Ping timeout: 244 seconds]
ibinderwolf has joined #commonlisp
ibinderwolf__ has quit [Ping timeout: 252 seconds]
hendursaga has joined #commonlisp
ibinderwolf_ has joined #commonlisp
ibinderwolf has quit [Ping timeout: 252 seconds]
ibinderwolf has joined #commonlisp
ibinderwolf_ has quit [Ping timeout: 252 seconds]
dsk has quit [Ping timeout: 240 seconds]
ibinderwolf_ has joined #commonlisp
Tomte has joined #commonlisp
ibinderwolf has quit [Ping timeout: 258 seconds]
Duuqnd has quit [Remote host closed the connection]
Duuqnd has joined #commonlisp
<susam>
Hello rdrg109
<susam>
By the way, I still keep CLISP around because (1) nostalgia (2) testing out if some implementation-dependent behaviour behaves differently with CLISP. That is, SBCL as the primary implementation and CLISP to test out my programs to weed out any bad habits of writing implementation-dependent code.
<beach>
Sounds like a good idea.
tfb has quit [Quit: died]
lucerne has joined #commonlisp
kevingal has joined #commonlisp
<kakuhen>
I like to test on CCL just to weed out sbcl-specific code
<kakuhen>
i became really angry when doing this for a certain cl project because a bunch of really really simple functions that reinvented already-existing functions in the CL spec were using sbcl extensions
<kakuhen>
but after patching out that mess... i am now just angry at one thing: every CL implementation seems to have its own posix interface and export symbols for errors and signals, but neither uiop nor osicat-posix have decided to have wrappers for this
<susam>
kakuhen: Any example you can remember? I am trying to understand why a function in CL spec would use sbcl extension and even if it did why it would matter as long as it conforms to the spec.
<kakuhen>
also the CL spec already has a function for this: get-decoded-time
<phoe>
yes
<kakuhen>
remember when I came in here asking about sbcl-specific macros?
lucerne has quit [Read error: Connection reset by peer]
<kakuhen>
the macro i was dealing with was the result of some guy who took a perfectly fine macro using CFFI and decided "hmm let me just write out the pure sb-alien calls instead"
<kakuhen>
lots of stuff that originally used bordeaux threads for no reason were rewritten to just use sb-thread
<kakuhen>
i dont get what motivates to do this ;_;
<susam>
kakuhen: Where did you pick the get-decoded-system-time code from?
<kakuhen>
stumpwm -- a tiling window manager written entirely in common lisp
<kakuhen>
i've been writing a set of patches in order to bring *at least* CCL support back, and hopefully expand portability
<susam>
kakuhen: get-decoded-system-time is not the CL spec, is it? Only get-decoded-time is.
<kakuhen>
susam: the behavior of the function I posted is identical to get-decoded-time
<phoe>
this effectively makes stumpwm SBCL-only
<susam>
kakuhen: Okay. I think I get your point now. You meant that another software tool (stumpwm, in this case) decided to rely on SBCL ext instead of the spec. Problematic, of course. I see what you mean.
<kakuhen>
yeah, I don't mind what phoe suggested earlier, that is, (defun foo () #+sbcl ... #-sbcl ...)
<kakuhen>
obviously not everything can be portable across implementations
<phoe>
but come on
<kakuhen>
but in this case it's a mixture of, I guess oversight(?) on some committers parts, and then people deciding to just force sbcl hard deps
<kakuhen>
i havent sent my patches yet because I am waiting till I can get stump running fine on CCL, and then I will essentially send the maintainers every single patch
<kakuhen>
that way they are a bit more open to the idea of changing things for sake of portability
<kakuhen>
no point fixing that time function when there's still a dozen other sbcl-specific code left to patch; etc etc
<phoe>
git grep "sb-" | wc -l ;; gives me 65 lines for stumpwm
<phoe>
this means that stumpwm has heavy SBCL dependencies
<kakuhen>
i managed to bring it down to the 30s with my patches
<kakuhen>
the number is staying positive only because it DOES make sense in some scenarios to use sbcl extensions
<kakuhen>
i ran git blame on a lot of dubious lines
heisig has joined #commonlisp
<kakuhen>
and I found a bunch of stuff by some Javier guy to intentionally rewrite things to be sbcl-specific
<phoe>
there is an explicit #-sbcl (error "This lisp implementation is not supported.") in the code, so
<kakuhen>
if you look at the commits from javier
<kakuhen>
you'll see a bunch of "portable" code just get deleted and they leave the #+sbcl line remaining
<kakuhen>
kinda funny but also a bit frustrating to see heh
<phoe>
the only thing I can do about it is nerd raging
<kakuhen>
stump used to run a lot of major CL implementations but recently became SBCL-only.
<phoe>
so I think I instead won't do anything
<kakuhen>
oh the sbcl-specific stuff being forced in isn't the only problem
<kakuhen>
i also found extraneous declare's being used throughout the code
<kakuhen>
but yeah -- im still in the process of patching the main io loop so that it works on CCL
<loke[m]>
The main loop was the biggest reason why they went to SBCL
<phoe>
loke[m]: why?
<loke[m]>
The other implementations were terrible and completely unmanageable.
<kakuhen>
a lot of what they did for main-io-loop can be done with ccl, though because of the lack of a "good" posix wrapper for errors and signals, I had to write really ugly lines so that I don't throw in magic numbers in place of actual error/signal symbols
<loke[m]>
phoe: I don't recall. It's been a few years. But I was working on the timer support at that time, and it was pretty difficult to get it to work right in anything but the SBCL backend.
<loke[m]>
There should be a record on the mailing list of the discussion about the mainloop.
<loke[m]>
It's been several years though.
<phoe>
yes, I see
<kakuhen>
sounds like what you guys were trying to solve existed before iolib then
<kakuhen>
because I noticed some comments about SBCL lacking some feature for I/O multiplexing
<kakuhen>
but it seems to be offered by io-lib and works across multiple implementations
<kakuhen>
though this library is a recent thing (i.e. didnt really exist 3-4 years ago) and I'm not sure if anyone will be interested in refactoring the main io loop when it already works for most users.
<beach>
Isn't that a C library though?
<kakuhen>
iolib requires libfixposix to be installed, yeah.
<kakuhen>
that's the biggest setback I see to it
<beach>
That might be a reason to avoid it for some clients.
unyu has joined #commonlisp
dsk has joined #commonlisp
<loke[m]>
kakuhen: libfixposix is a huge problem, since it's not available in most repositories either, people have to seek it out.
<kakuhen>
yeah that's what stopped me from considering io-lib for the meantime
<loke[m]>
In theory, it would be possible to compile libfixposix from the ASD file, although that is only marginally better.
CrashTestDummy2 has joined #commonlisp
CrashTestDummy3 has quit [Ping timeout: 252 seconds]
killsushi_ has quit [Quit: Leaving]
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
rogersm has joined #commonlisp
ibinderwolf has joined #commonlisp
ibinderwolf_ has quit [Ping timeout: 258 seconds]
ibinderwolf_ has joined #commonlisp
ibinderwolf has quit [Ping timeout: 258 seconds]
<jmercouris>
loke[m]: sounds like a pretty big improvement to me
ibinderwolf_ has quit [Ping timeout: 265 seconds]
Duuqnd has quit [Remote host closed the connection]
Duuqnd has joined #commonlisp
kakuhen has quit [Quit: Leaving...]
tyson2 has joined #commonlisp
Guest63 has joined #commonlisp
<Guest63>
Quick Qn - Can a CLOS class have multiple meta classes?
<Guest63>
E.g. (:metaclass class-1) (:metaclass class-2)
<phoe>
Guest63: no
<phoe>
but your metaclass can have multiple superclasses
random-nick has joined #commonlisp
<phoe>
(defclass class-1-and-2 (class-1 class-2) ()) and then (:metaclass class-1-and-2)
<phoe>
as always with inheritance, it is up to you to resolve all interactions between your superclasses
<Guest63>
Thanks! Let me try that out
<Guest63>
Trying to figure out how to import/export XML from BKNR.Datastore
<Guest63>
Have written up a guide on the package, now the final piece is this :)
pjb has joined #commonlisp
<phoe>
<3
unyu has quit [Quit: WeeChat 3.2]
clos-encounters has joined #commonlisp
ibinderwolf has joined #commonlisp
Duuqnd has quit [Remote host closed the connection]
Duuqnd has joined #commonlisp
Tomte has quit [Quit: Leaving]
clos-encounters has left #commonlisp [ERC (IRC client for Emacs 27.1)]
xlei has quit [Read error: Connection reset by peer]
dnaeon has joined #commonlisp
yitzi has joined #commonlisp
dnaeon has quit [Client Quit]
xlei has joined #commonlisp
dnaeon has joined #commonlisp
IAmRasputin has joined #commonlisp
IAmRasputin has quit [Ping timeout: 265 seconds]
Bike has joined #commonlisp
borodust has quit [Quit: Leavin']
borodust has joined #commonlisp
selwyn has quit [Read error: Connection reset by peer]
IAmRasputin has joined #commonlisp
IAmRasputin has quit [Ping timeout: 265 seconds]
Lycurgus has quit [Ping timeout: 258 seconds]
Quasus has joined #commonlisp
random-nick has quit [Ping timeout: 252 seconds]
Lycurgus has joined #commonlisp
waleee has joined #commonlisp
hendursaga has quit [Quit: hendursaga]
random-nick has joined #commonlisp
Guest63 has quit [Quit: Ping timeout (120 seconds)]
yitzi has quit [Remote host closed the connection]
<jackdaniel>
derelict: join #common-lisp.net ; maybe they will be able to help you
<pjb>
:-)
<derelict>
it's not on freenode :/
yitzi has joined #commonlisp
<pjb>
derelict: yes, freenode killed old users it seems. That would include bots.
<jackdaniel>
there is no freenode anymore, so that would be weird.
<derelict>
my bad jackdaniel, just found them here
<jackdaniel>
that's a good place to come and ask for pointers
<jackdaniel>
as of minion, I don't know who is responsible for moving this bot. I remember stassats managed it at some point of time. either way, -> #common-lisp.net
silasfox has quit [Ping timeout: 240 seconds]
derelict has quit [Quit: WeeChat 3.2]
derelict has joined #commonlisp
Inline has quit [Quit: Leaving]
Inline has joined #commonlisp
selwyn has joined #commonlisp
aeth has quit [Ping timeout: 252 seconds]
aeth has joined #commonlisp
<rdrg109>
beach: Yes. I'm a Common Lisp newbie (1 week), so I don't know all the available options. I would appreciate if you could point me to some resources that might help me understand what are the differences between Clisp and the other available ones.
<beach>
rdrg109: Most people here probably use SBCL.
<pjb>
(I still used clisp from time to times)
<pjb>
(I almost never use sbcl).
<beach>
What do you mostly use? CCL?
<aeth>
The problem with using CLISP (even just to test) is that even CL isn't an unchanging language and CLISP hasn't gotten a release in just under 11 years, so it's missing extensions that some libraries might assume.
<pjb>
yes
<aeth>
CLISP is also missing useful features that it never had, e.g. specialized-arrays for simple float types like single-float and double-float that every other implementation has. It won't break code, it'll just deoptimize it and remove some runtiem checks that might be assumed.
<pjb>
but clisp is still maintained, you can use git to get the latest version. The same is true with ccl by the way, which hasn't had a new release for 14 months!
<aeth>
What sets CLISP apart is that CLISP is one of the few interpreters rather than compilers, so its memory usage is much lower (but it's much slower). It's also used in the bootstrapping of some implementations (since you might need CL to compile a CL), unless people have finally ported that over to something like ECL.
<pjb>
Actually, clisp has a (byte-code) compiler.
<aeth>
pjb: there's a difference between 14 and 131 (almost 132) months. The difference is an order of magnitude.
<beach>
Wow, slime-company is really stupid.
<pjb>
aeth: but still. Also, there seem to remain still a lot of bugs in sbcl, which justifies its monthly releases…
<aeth>
fwiw, I don't test on CLISP and I don't even bother to make sure that my code runs on CLISP, because some dependency-of-dependency-of-dependency is always broken on it and I write large programs.
<aeth>
Although ime, if you add enough libraries, you're probably only going to run in SBCL, CCL, and ECL... and I'm not sure about ECL. (To be fair, I don't even consider paid implementations let alone test on them.) In particular, ABCL likes to break things by implementing things differently because of its different environment (the JVM).
<jmercouris>
beach: what makes you say that? looking at the source?
eddof13 has joined #commonlisp
<beach>
jmercouris: No, the suggestions I get and, especially, the ones I don't get.
<jmercouris>
:-)
<jmercouris>
same experience here
<beach>
It is more a distraction than a help.
<aeth>
pjb: as for sbcl's bugs, it's more like... optimizations are infinite work because there's always something else to do for an extra 5%, which adds up
<loke[m]>
aeth: well, you can also download GCL which also gets patches so should be classified as being maintained.
<loke[m]>
Still, you're going to have a hard time running much new software on it.
<aeth>
Even CMUCL will break a lot
<aeth>
idk why
<rdrg109>
pjb, beach: Thanks for sharing! Will look into it
makomo has joined #commonlisp
<makomo>
hello \o
<beach>
Hello makomo.
<makomo>
is it legal for a toplevel function to be named by a gensym? something like (defun <gensym> (...) ...)
<jackdaniel>
sure, why?
<makomo>
(assume that the <geynsym> is placed there by a macro that generates the defun form, or maybe a reader macro, or something)
<beach>
Sure, but you would have to do (defun #.(gensym) ...)
<beach>
Right, DEFUN does not evaluate the name, so it would have to come from elsewhere.
<makomo>
mhm :)
<beach>
Are you having problems with it?
<makomo>
jackdaniel: i was just wondering because i have a macro that creates a gensym-named function wrapping some user-provided code, along with a "normal-named" macro that calls that hidden function
<makomo>
but i'm having some issues so i wanted to double check. something might be wrong with the body of my macro perhaps
<jackdaniel>
wouldn't it be more straightforward to put functions in a hash table?
<makomo>
but i'm wondering whether doing this gensym thing is a good idea for what i want to achieve
<jackdaniel>
you'd be able to inspect said hash table to check what's wrong
<makomo>
jackdaniel: hm yes, i was wondering about that
<jackdaniel>
and then you'll have glorious lisp-3 with three namespaces ;)
<makomo>
:D
<jackdaniel>
(before people jump to corrections, I'm aware that there are more namespaces)
tfb has quit [Remote host closed the connection]
<makomo>
LOL
tfb has joined #commonlisp
<jackdaniel>
rdrg109: people usually first pick sbcl, then ccl and after that whatever fits their niche purpose (i.e ecl works fine on android and inlines C/C++ code, abcl works fine in jvm etc)
<makomo>
i guess what i really want is for my "hidden" function to have a deterministic name, yet not clash with any of the user's symbols
ibinderwolf has quit [Quit: ByeBye]
<makomo>
so i guess i could either go for the hash table approach that you suggested, which avoids using defun in the first place
<jackdaniel>
as of people who do not test their libraries for portability- oh well, that's their right
<makomo>
or if i really wanted to use defun, i could use some sort of private package and come up with a deterministic scheme of generating unique symbols based on some name given by the user
<shka>
makomo: i was about to suggest that
<jackdaniel>
if you have your private package, then you may take the name as is, no?
<makomo>
jackdaniel: what if multiple people decide to use my macro and give the same name as the argument?
<jackdaniel>
ah, it is for different pools of functions
<makomo>
yep yep
<makomo>
shka: although i'm not sure how this scheme would look like
<shka>
neither do i honestly
<jackdaniel>
then the evaluator will need a client argument either way. then the hash table keys could be (cons client name), or the client could be a hash table itself
madnificent has joined #commonlisp
<_death>
you can use the symbol plist... (setf (get <name> 'my-hidden-function) ...)
<shka>
makomo: btw, depending on what kind of wrapping you want to do, you may prefer to use thunks
<makomo>
_death: i also thought of that, but ehhh, sort of wanted to avoid symbol plists (for nog ood reason)
<makomo>
shka: what kind of thunk do you have in mind exactly?
<makomo>
jackdaniel: hmm, i'm not sure if we're thinking of the same thing by "different pools of functions"? what do you mean by "it will need a client argument either way"?
<shka>
wrap user defined code in a lambda form, pass to a higher order function which will also perform some sort of cleanup
<jackdaniel>
makomo: say two clients define a function (defpun a () 'xxx) and (defpun a () 'yyy)
<jackdaniel>
how do you decide who is calling (a) ;?
<jackdaniel>
or (my-call 'a)
<makomo>
we're assuming that the two symbols "a" are within different packages, right?
<makomo>
because if they're eq, then it would just overwrite the previous def, which is fine with me
<jackdaniel>
ah, so the symbol package is the implicit client, I see
<makomo>
exactly :)
<jackdaniel>
then using a hash table and the symbol as a key should work just fine
<shka>
makomo: honestly, i personally really don't like implicit function names, i came to prefer explicit names required
<shka>
but this is obviously up to you
<makomo>
jackdaniel: so if i want this hidden function to have a nice name for each usage of defpun, i would have to come up with some scheme of generating unique names based on the given symbol
<makomo>
pjb: (by "nice name" i mean a non-gensym name)
<pjb>
This is an example of a gensym name.
<makomo>
shka: me neither in that sort of context, but the user would never actually use them
derelict has quit [Quit: WeeChat 3.2]
<shka>
yeah, i understand
<makomo>
it's just for a "pretty implementation" so to speak. however, if gensym-named funcitons work just fine, then it shouldn't make a difference i suppose
prxq has joined #commonlisp
<shka>
makomo: maybe you can do the following then
Guest63 has joined #commonlisp
<makomo>
jackdaniel: one thing that came to my mind regarding the hash-table idea is the issue of concurrency maybe, although i didn't think about it that much. i wanted to avoid having to think about synchronizing access to this hash table which acts as a global repo of function names, which i think i would get for free if i just used the impl's defun. is that a valid concern?
<shka>
ask user for the :hidden-function-suffix and add some sort of default
<splittist>
makomo: you might want to save extra information - who defined, when, defining form ...
<makomo>
splittist: i.e. use all of that extra info to generate a nice unique pretty name, or something else?
<makomo>
shka: that could work, but i don't want the user to even care about that detail :/
<shka>
makomo: metadata can be useful for API, depending on the context
<shka>
makomo: understandable, just a suggestion
<splittist>
I was thinking that would be easier if you had a user-function object in a hashtable (or list, or ...)
<splittist>
You could even make them funcallable objects
<makomo>
ah that's what you meant. right, if i use a hash-table, then i already have a unique identifier that the user provides anyway, so that's all good
<makomo>
i'm wondering about the concurrency issue with hash tables outlined above though ↑↑↑↑
<shka>
well, use concurrent hash table?
<makomo>
that's extra work that i want to avoid :D
<shka>
then ignore it
<shka>
IT IS FINE
<makomo>
LOL, easy :D
<splittist>
Are the functions going to be redefined?
<makomo>
that's why i just fell back onto defun and let the impl deal with it :D
<makomo>
splittist: yes, they might
<Bike>
there's no actual guarantee that function redefinition is done atomically either
CrashTestDummy3 has joined #commonlisp
<makomo>
Bike: interesting, but i think that's a separate issue (and my impl would have that same issue). i just didn't want to worry about synchronizing adding new entries into the hash table and similar
<Bike>
how is that a separate issue?
<makomo>
are you talking about the issue where a thread might continue executing the old version of a function's body even after the function's redefined?
<Bike>
yes, or might just do something incoherent
CrashTestDummy2 has quit [Ping timeout: 268 seconds]
<jmercouris>
I /could/ make a macro, just wondering if I /should/
<jmercouris>
maybe there is a better approach
<jmercouris>
now, of course this could be seen as bad style, because neither are booleans, nor am I treating them as booleans...
<pjb>
jmercouris: you would write (let ((x (uiop:getenv "xyz"))) (if (not (null x)) x "some-default")) but (macroexpand-1 '(or (uiop:getenv "xyz") "some-default")) #| --> (let ((#:g21415 (uiop/os:getenv "xyz"))) (if #:g21415 #:g21415 "some-default")) ; t |# this is exactly what OR does!!!
<pjb>
DUH
<jmercouris>
sure, but it seems an inappropriate usage of OR
<pjb>
Definitely not.
<jmercouris>
hm, OK
<jmercouris>
I seem to hear beach cursing me in his thoughts
<jmercouris>
but I will take your word for it :-D
<shka>
jmercouris: define your own getenv with &optional default
<pjb>
If you want you can wait a little and listen to beach :-)
<shka>
jmercouris: well, i can by your beach today
<pjb>
if you prefer to write a function rather than a macro, indeed, shka's advice.
<jmercouris>
either way is OK for me
<jmercouris>
I mean this isn't mission critical
<shka>
the problem with your use of or is two fold
<jmercouris>
just something I am wondering about
<pjb>
You can always declare a function inline.
<shka>
first, there is a stylistic problem which beach would point out
<jmercouris>
right, that is what I am thinking when I say "inappropriate" usage of OR
<shka>
yeah, and that's why IN GENERAL this is not the best approach
<shka>
however, getenv IIRC only returns strings... so it is mostly fine
<shka>
however, writing or all the time is kinda boring so i would add my own function anyway
<jmercouris>
lol
<jmercouris>
ay yai yai
<makomo>
shka: the 2nd issue is something that needs to be considered per-function (or per-expression) anyway, right?
dnaeon has quit [Quit: EOF]
<shka>
makomo: yes, but it is surprisingly easy to forget about it
<shka>
and it can also slip trough the code review as well sometimes
<jmercouris>
oh boy, my code would fail all reviews it seems...
<jmercouris>
I often take these little shortcuts
<shka>
jmercouris: no, it is fine in this case
<makomo>
Bike: right, but my issue is that since this global hash table is not synchronized, multiple threads evaluating my form might end up clobbering the hash table which ends up in a definition being lost, right?
<shka>
it is just that such style can lead to problems given the right circumstances
<shka>
and therefore is better to be avoided
<jmercouris>
makomo: use the actor model
<jmercouris>
Pierre convinced me of it yesterday
<jmercouris>
basically have a thread with a queue
<jmercouris>
you queue up operations on this thread
<Bike>
makomo: i don't understand. if you have two different threads redefining a function in different ways, one of those definitions is going to be lost
<jmercouris>
ONLY this thread mutates your hash table
<makomo>
Bike: not just redefining, but if they're defining separate functions a and b
<makomo>
just in general putting stuff into the hash table
<Bike>
...yeah, i mean, isn't this independent of the hash table?
<Bike>
you have two threads doing different things to the same place, one of them's goign to lose.
<tfb>
makomo: yes, if <new a> depends on <new b> you need the update to be atomic
<Bike>
oh, you mean with different names
<Bike>
i see
<makomo>
Bike: sort of, yes, but also no because the solution with DEFUN doesn't have that issue. it's another thing i would have to take care of
<makomo>
Bike: right :)
<Bike>
the solution with defun might have that issue
<Bike>
there's no guarantee. this is not defined behavior. the implementation might use a global table for function names anyway
<makomo>
really? does that mean cl impls don't guarantee that evaluating DEFUN accross multiple threads is "safe"?
<jmercouris>
why are you evaluating DEFUN across multiple threads anyway?
<jmercouris>
are you generating DEFUNs at run time?
<makomo>
Bike: true, and threads aren't even defined by the spec, right? but any impl that implements them surely takes care of this?
<rdrg109>
[Q] cl newbie here. I've started using sbcl + slime in Emacs. I've two questions: (1) Let's say I want to know more about the "princ" function. Where can I get information on that function. (2) How can I get a list of all ANSI Common Lisp functions?
<makomo>
jmercouris: that could be one situation, but i assume some impls might have a way of loading/evaluating code in parallel or whatever
<Bike>
i don't think any implementation makes that guarantee
<Bike>
it's not really a common thing to do
<jmercouris>
rdrg109: you can use the CLHS
<jmercouris>
rdrg109: you can download a copy of it locally to your machine
<makomo>
Bike: wuuut, really? how is that not a big issue?
<makomo>
(if we're really thinking of the same thing)
<jmercouris>
rdrg109: quickload the "CLHS" system
<Bike>
how often do you defun simultaneously in distinct threads
<jmercouris>
never
<makomo>
Bike: well, true, but you never know when a race condition might happen, no?
<makomo>
i mean, isn't that just properly handling synchronization in general?
<Bike>
i mean in normal use you only defun when you're editing code. it's not something you do problematically. so this doesn't come up.
<jmercouris>
I think of defun as a macro just for human usage
<makomo>
you have a global fundef repo. surely you'd want it to be synchronized?
<Bike>
what i'm saying is that this doesn't come up in practice so implementations don't bother
<makomo>
Bike: so does that mean that implementations don't usually evaluate/load code/systems/whatever in parallel?
<Bike>
not usually, no
<makomo>
evalute/load/compile as well
<makomo>
hmm, i see
<Bike>
there was an asdf extension that was supposed to do that, but it worked by forking rather than threads
<Bike>
in sbcl, there's a giant lock around the compiler, so you can't simultaneously compile anyway. or at least that was the case when i last looked at it a while ago
<makomo>
right, that would be one way of handling it, which is fine
<makomo>
are there any implementations that don't handle it at all?
<jmercouris>
compilation of a complete system doesn't really matter anyways
<Bike>
no, that's a different concern from the actual defun
<jmercouris>
lisp is all about incremental compilation
<jmercouris>
you aren't dumping the whole image and recompiling it every time
<Bike>
defun might involve changing multiple things, e.g. the fdefinition, any saved inline definition, global ftype proclamations
<Bike>
as far as i know sbcl doesn't try to synchronzie all that
<makomo>
Bike: oh i see
<makomo>
hmmm, interesting
<makomo>
tfb: agreed, but that's not something that i need in this case
livoreno has joined #commonlisp
derelict has joined #commonlisp
varjag has joined #commonlisp
d4ryus has joined #commonlisp
<rdrg109>
jmercouris: Thanks, I was able to lookup with hyperspec-lookup
<Guest63>
Thoughts on creating a new forum for more longevity of threads?
thmprover has joined #commonlisp
mariari is now known as babylon
<pjb>
Guest63: the channel is logged.
<jackdaniel>
logging is one thing, but irc discussions are more or less ephemeral anyway (without any organization)
<Guest63>
I find IRC better for short discussions
<pjb>
Perhaps you could manage a nntp server with some authentication to avoid spammers and we could restore the glory of past comp.lang.lisp?
<jackdaniel>
i.e if I had answered to what Bike said a week ago I doubt that will be intelligible
<_death>
cl-pro mailing list?
<Guest63>
pjb: that would be cool
<jackdaniel>
right, mailing lists are much better for that
<Guest63>
(I may be wrong since I don't use mailing lists) but the issue with mailing lists / IRC is discoverability
<Guest63>
whereas reddit & forums go onto Google search
* jackdaniel
doesn't consider getting into google search as a net positive
<Guest63>
Reddit is great but its annoying how you can't reply to a have 5Y old post
<beach>
Guest63: What kind of things do you want to discuss?
<Guest63>
beach: honestly I don't know. I just used forums for other things and prefer them to reddit
<jackdaniel>
necrobumping wouldn't be considered nice even on a traditional forum
cage has joined #commonlisp
<Guest63>
Projects would be better on GitHub Issues / GitLab, Q&A would be better on Stack Overflow, Chat / Quick responses would be better on IRC, memes on Reddit --> So I don't know
<_death>
Guest63: all of these are bigco
<Guest63>
jackdaniel: for a technical forum, I wouldn't mind necros
<_death>
except irc :)
<jackdaniel>
that said I think that old forums were much more useful than facebook, reddit and other attention-seeking platforms
<thmprover>
"This one strange trick will make your code bug-free!"
<Guest63>
_death: indeed :) Which is a scary thing (except SO, I think that one is safe for now)
<jackdaniel>
(i.e they didn't try to addict you to use them; many smart people work on that shameful practice)
<edgar-rft>
I'd say that not finding answers in mailing lists is a poverty of Google, not a bad thing of mailing lists
<Guest63>
jackdaniel: thanks, that's basically where I"m coming from - there always going to be a bit of attention seeking / blog posts / news etc, and a forum is better for those imo
<jackdaniel>
that said, mailing lists are quite good for discussions (when you have a topic to discuss - compared to posting cat pictures ;)
<_death>
you could also blog using mailing lists.. I'm thinking of the old kragen-thoughts list
<pjb>
Guest63: you can make your mail list discoverable, by puting their archives on the wbe.
<pjb>
web
<_death>
too bad gmane no longer does that
<jackdaniel>
that said mailman archives are hard to navigate via the web interface
rogersm has quit [Quit: Leaving...]
<pjb>
You have common lisp, you have the data, write a nice web interface!
<jackdaniel>
I have common lisp, I have the data, I have no time, so you do it.
<pjb>
And it's forecast there will be a scarcity of programmers for the next few years…
<Guest63>
shame there is one spammer sending 95% of the messages to it
<Guest63>
pjb: I'm waiting for lisp programmers to be in short demand, then I will get a professional job writing lisp :)
<pjb>
Guest63: but you'd definitely need to filter it, given the number of spammers and idiots who broke it.
<pjb>
Also, libera has a new rule: Nickname and account registrations expire ten weeks after they are last used. So you can expect me to not come back after my next holidays.
<_death>
you have common lisp, you have the credentials, write a nice irc interface!
<_death>
time? you can do it on the holiday ;)
<Guest63>
perfect timing of a holiday
rogersm has joined #commonlisp
zacts has joined #commonlisp
Danishman has joined #commonlisp
kevingal has quit [Remote host closed the connection]
zacts has quit [Quit: gtg]
pve has quit [Quit: leaving]
tfb has quit [Quit: died]
Guest63 has quit [Quit: Connection closed]
Quasus has quit [Ping timeout: 258 seconds]
random-nick is now known as random-nickname
random-nickname is now known as random-nick
mason is now known as ChibaPet
ChibaPet is now known as mason
Quasus has joined #commonlisp
silasfox has quit [Ping timeout: 268 seconds]
<jcowan>
on SBCL exts: this problem really bites in Scheme, because people get used to using non-portable stuff because they need to, and when some portable API comes along they don't switch to it. And of course the ANS is much larger than any Scheme standard hitherto
selwyn has quit [Read error: Connection reset by peer]
srhm has joined #commonlisp
yitzi has quit [Quit: Leaving]
<phantomics>
Is there a reason (gcd) and (lcm) don't work with ratios? Writing a version that works with ratios simple - multiply both by the product of denominators, take the gcd/lcm of the result and divide the result by the denominator product. Is there a gotcha I'm missing?
CrashTestDummy2 has joined #commonlisp
<Bike>
what is the definition of gcd and lcm on ratios? i've always understood them as integer operations
silasfox has joined #commonlisp
CrashTestDummy has joined #commonlisp
CrashTestDummy3 has quit [Ping timeout: 258 seconds]
CrashTestDummy2 has quit [Ping timeout: 265 seconds]
<Bike>
what you describe seems wrong even if we extend the definition to be the largest ratio that divides the inputs
<susam>
phantomics: As per your definition gcd(1/2, 1/6) = 1/6. Right? After multiplying by the product of denominators, we get 6, 2. Their gcd is 2. Then 2/12 = 1/6. But gcd(1/2, 1/6) = 1/6 does not make sense. Why 1/6? What is special about 1/6? Why couldn't the answer be 1/2 or 1/4 or some other fraction?
<Bike>
e.g. you'd calculate (gcd 1/12 1/18) to be 1/96, but 1/24 is larger and divides both
<susam>
I mean, we need to first define divisibility for fractions in a sensible manner. Otherwise it would appear that every fraction divides every fraction. Given p/q and r/s, surely (p/q)/(r/s) is another fraction.
<susam>
Assuming of course r/s != 0.
<Bike>
i was assuming it would mean the quotient is an integer
<susam>
For integers, divisibility is neatly defined. d divides n if there is an integer c such that n = cd.
<susam>
Bike: in that case 1/24 does not divide 1/18 because the quotient is (1/18)/(1/24) = 24/18 = 4/3, not an integer.
<susam>
I think phantomics' algorithm would give the result (gcd 1/12 1/18) = 1/36.
<phantomics>
That's what I get
Lord_of_Life has quit [Excess Flood]
<phantomics>
APLs allow for gcd and lcf of fractions (most implementations only have floats, not ratios), 1/36 is also given as the result by Dyalog and GNU APL
Lord_of_Life has joined #commonlisp
<susam>
Yes, with the definition that p/q divides r/s if r/s = c(p/q) for some integer c, I think it will work.
<Quasus>
probably the reason is that it's not standard maths
<Quasus>
normally, divisibility in a ring is defined as a divides b if b = ac for some c
Guest63 has joined #commonlisp
<Quasus>
if a ring happens to be a field, then everything (except zero) divides everything, as susam notes
<Quasus>
but in rings that are not fields, divisibility can give rise to a nontrivial theory
<Guest63>
Quick Qn - Is there a way to create an CL array of indeterminate dimensions?
<Quasus>
examples: integer numbers or polynomials
<shka>
Guest63: what do you mean by that?
<shka>
dimensions not known at the compile time?
Cymew has quit [Ping timeout: 265 seconds]
<Guest63>
yes
<shka>
ok, yes, it is simple
<shka>
makey-array dimensions-list
<phantomics>
You can use (make-array) with values that aren't known until compile time
<Quasus>
"d divides n if there is an integer c such that n = cd" doesn't work in general, e. g. for polynomials; sure we'd like x + 1 to divide (x + 1)(x + 2)
<Guest63>
sorry, say I don't know at runtime
<Quasus>
so let APLs do whatever they please
<shka>
Guest63: then not, but you can use hash-table with 'equal :test
<Guest63>
shka: thanks
<phantomics>
Guest63: When will you know the dimensions? This sounds like a hash table not array
<shka>
and this way you will be able to use lists of integers as keys in the hash-table
<Guest63>
Actually that's a good idea, I was trying to create attribute1 x attribute2 array, but I can just do (attribute1 . attribute2) as a key to the hash table!
<Guest63>
thanks!
<shka>
no problem, good luck
<Bike>
susam: 1/8, not 1/18. my bad
<susam>
Bike: Okay. For (gcd 1/12 1/8), phantomics' algorithm correctly results in 1/24.
<phantomics>
That matches the other APLs
<phantomics>
Is there a case where this algo will run into problems?
<Bike>
perhaps i am misunderstanding the "take the gcd/lcm of the result" step
<Josh_2>
I came up with a good (maybe) use for MOP, defining categories of 'hooks' into my system where the class is the category and each slot is an individual 'hook' that is executed, and then args to each hook are defined in the class definition. Although I guess this would mean I couldn't easily add new hooks without changing the class definition
entre-parenteses has joined #commonlisp
<susam>
phantomics: So stated concisely, gcd(p/q, r/s) is defined to be gcd(ps, rq)/qs. It is a reasonable definition for the expressed intention.
<susam>
phantomics: By the way, do you come across any practical usefulness for such a gcd definition?
<phantomics>
There are several APL algos that make use of this
<entre-parenteses>
Is anyone aware of any work being done to (eventually) have an implementation target WebAssembly? I know it's not completely possible, yet, due to lack of certain features in WebAssembly - i.e. GC is the main one that comes to mind - but I'm curious if anyone knows of any work being done along those lines.
<shka>
phoe: do you have something?
<shka>
regarding webass
Guest63 has quit [Quit: Connection closed]
<Josh_2>
Why would GC not be possible?
<entre-parenteses>
It's still a TODO feature
<entre-parenteses>
Not that it's not possible ever, just not yet.
<Bike>
the other issue is unwinding, unless they've figured that out by now
<Bike>
clasp uses llvm so webassembly isn't that far off, but putting a several-hundred-megabyte lisp image into a webpage seems kind of silly
<entre-parenteses>
Bike: Yeah, I looked a bit into ECL, so far, but I haven't made it very far with that.
<shka>
Bike: give it few more years, i bet it won't be so silly :P
Quasus has quit [Ping timeout: 258 seconds]
<phantomics>
Would make sense for a locally-hosted Lisp environment interfaced through the browser, it could talk to remote Lisps
makomo has quit [Quit: WeeChat 3.0.1]
<entre-parenteses>
Guess I found a new project. :D
<entre-parenteses>
_death: That's right! I came across it a few months ago (but forgot about it). If nothing else it could be a good jumping-off point.
silasfox has quit [Ping timeout: 252 seconds]
Guest6394 has quit [Ping timeout: 265 seconds]
Lord_Nightmare has joined #commonlisp
silasfox has joined #commonlisp
<Krystof>
Bike: for what it's worth, I think we no longer have a big compiler lock
<Krystof>
(since ~18 months ago or so)
<Bike>
cool
ec has joined #commonlisp
Guest63 has joined #commonlisp
Duuqnd has quit [Remote host closed the connection]
Lord_Nightmare is now known as Lord_Nightmare2
Lord_Nightmare2 is now known as Lord_Nightmare
Quasus has joined #commonlisp
silasfox has quit [Ping timeout: 244 seconds]
rogersm has quit [Quit: Leaving...]
heisig has quit [Quit: Leaving]
silasfox has joined #commonlisp
Duuqnd has joined #commonlisp
shka has quit [Ping timeout: 268 seconds]
dsk has quit [Ping timeout: 264 seconds]
d4ryus has quit [Quit: WeeChat 3.1]
Duuqnd has quit [Remote host closed the connection]
<rdrg109>
[Q] newbie here. Just as I can create tests for Emacs packages through the ert package. Is there any widely used package for testing Common Lisp modules?
<pjb>
rdrg109: I use com.informatimago.common-lisp.cesarum.simple-test
cage has quit [Quit: rcirc on GNU Emacs 27.1]
<entre-parenteses>
phantomics: Thanks for the reference! I'm having trouble accessing the gmane.org article but I'm reading through the PR comments - hopefully that covers most of what's discussed.
<phantomics>
Anytime, it seems like multiple-value return is another issue
<Bike>
really? does webassembly not allow structure returns?
thmprover has quit [Remote host closed the connection]
thmprover has joined #commonlisp
derelict has quit [Ping timeout: 258 seconds]
<phoe>
Josh_2: which part?
thmprover has quit [Quit: Up, up, and away]
Guest63 has quit [Quit: Connection closed]
derelict has joined #commonlisp
Quasus has quit [Quit: abiit]
Quasus has joined #commonlisp
kakuhen has joined #commonlisp
kakuhen has joined #commonlisp
kakuhen has quit [Changing host]
entre-parenteses has quit [Ping timeout: 264 seconds]
kevingal has joined #commonlisp
Duuqnd has quit [Ping timeout: 258 seconds]
Duuqnd has joined #commonlisp
derelict has quit [Ping timeout: 268 seconds]
rgherdt has quit [Ping timeout: 240 seconds]
luis` is now known as luis``
luis is now known as luis`
luis` is now known as luismbo
luismbo is now known as luis
luis`` is now known as luis`
<sm2n>
kind of late and Guest63 seems to have gone, but for posterity—SO is bigco now as well, it got bought out recently
<rdrg109>
[Q] How to get the docstring of a given function?
mason has left #commonlisp [#commonlisp]
<rdrg109>
I'm gonna put it clearer: I've recently installed Quicklisp and the documentation mentions that to install a package, you need to execute (ql:quickload system-name), but before doing that I would like to know the docstring of ql:quickload to understand what it does
<rdrg109>
I'm using SBCL + Emacs Slime
<akoana>
(documentation 'ql:quickload 'function)
<sm2n>
there are many ways to do it, but easiest is probably C-c I #'ql:quickload to open it in the slime inspector
<sm2n>
or just typing #'ql:quickload in the repl and clicking on the result
<rdrg109>
[Q] Thanks for the help! All of them worked. Another quesstion: Let's say I install a package with (ql:quickload "package-name") How to list all the functions that are defined by a given package?
ec has quit [Ping timeout: 244 seconds]
<Bike>
(loop for s being the symbols of "package" when (fboundp s) collect s else if (fboundp `(setf ,s)) collect `(setf ,s))
<Bike>
"systems" are different from "packages" though
Quasus has quit [Ping timeout: 258 seconds]
<Bike>
a given quicklisp system may have any number of packages, and the names of any packages defined don't have to coincide with the name of the system
<_death>
(package-name: C-c C-i ... you could also use lisp's introspective capabilities.. (remove-if #'fboundp (apropos-list "" "PACKAGE-NAME")) ;; homework: write a better apropos
<Bike>
hm, i guess should just be "when (fboundp `(setf ,s))" instead of else if
<_death>
*remove-if-not
Danishman has quit [Quit: Leaving]
<_death>
the slime-doc-contribs also show undocumented stuff
derelict has joined #commonlisp
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
<rdrg109>
[Q] I'm using SBCL + Emacs Slime, is it possible to get the list of all existing/loaded functions?
ilshad has quit [Read error: Connection reset by peer]
<phoe>
yes, but you don't want that
<phoe>
if anything, iterate over the *external* symbols of all packages
Duuqnd has quit [Remote host closed the connection]
<phoe>
loop over all packages, loop over all external symbols of a package, collect that symbol if it is fboundp and does not name a macro and does not name a special operator
<phoe>
remove duplicates
varjag has quit [Quit: ERC (IRC client for Emacs 28.0.50)]
kevingal has quit [Remote host closed the connection]
X-Scale` has joined #commonlisp
X-Scale has quit [Ping timeout: 268 seconds]
<Bike>
you probably don't even want all the external symbols, unless you're really interested in sbcl compiler internals
<phoe>
that too
<White_Flame>
rdrg109: tab completion is much more useful than a massive list of thousands of things
<White_Flame>
Tab at the repl, Esc-Tab in editing buffers
<White_Flame>
(and probably a billiion other key combinations)
<White_Flame>
you can do sb-ext:<Tab> to see all the exported symbols in a package, for instance.
aeth has quit [Ping timeout: 265 seconds]
<White_Flame>
and then search that list however you want, or from whatever prefix you tab from to pare it down
aeth has joined #commonlisp
<jasom>
re: in-browser CL: abcl will load in Doppio, but the initialization is dog-slow.
Oladon has joined #commonlisp
<jasom>
On Firefox it's 2 minutes before it prints "Startup completed" and a total of about 5 before you get a REPL.
<moon-child>
my
<jasom>
IIRC chromium starts up in half the time; testing now.
<jasom>
Looking about right so far: "Startup completed in 52.982 seconds"
<jasom>
about 3 years ago I said I'd profile the doppio JVM to see where the hot-spots are... yeah I didn't do that
<jasom>
6 minutes of CPU time for firefox to show the REPL and 3 for chromium
<jasom>
Naive (doubly recursive) fibonacci of 20 takes ~2 seconds on Doppio/Chrome vs 11ms on the native JVM
<jasom>
My new plan: convince the "Must Rewrite Everything In Rust" brigade to make a JVM in rust, and compile *that* to wasm.
livoreno has quit [Ping timeout: 268 seconds]
livoreno has joined #commonlisp
waleee has quit [Ping timeout: 264 seconds]
tyson2 has quit [Ping timeout: 252 seconds]
<White_Flame>
last I read, webasm only has a 4-8GB address space, though
<White_Flame>
pile on too many layers and you could start hitting that