Josh_2 has quit [Remote host closed the connection]
akoana has joined #lisp
ex_nihilo has joined #lisp
semz has joined #lisp
semz has quit [Changing host]
semz has joined #lisp
Fare has quit [Ping timeout: 264 seconds]
galex-713 has quit [Ping timeout: 264 seconds]
galex-713 has joined #lisp
ukari has joined #lisp
Fare has joined #lisp
galex-713_ has joined #lisp
galex-713 has quit [Ping timeout: 272 seconds]
hineios1 has joined #lisp
Sheilong has quit [Quit: Connection closed for inactivity]
hineios has quit [Ping timeout: 260 seconds]
hineios1 is now known as hineios
_jrjsmrtn has joined #lisp
__jrjsmrtn__ has quit [Ping timeout: 264 seconds]
perrier-jouet has joined #lisp
Lord_of_Life_ has joined #lisp
Lord_of_Life has quit [Ping timeout: 260 seconds]
Lord_of_Life_ is now known as Lord_of_Life
galex-713_ has quit [Ping timeout: 245 seconds]
galex-713 has joined #lisp
ldbeth has quit [Ping timeout: 260 seconds]
madage has joined #lisp
ldbeth has joined #lisp
ldbeth has quit [Ping timeout: 245 seconds]
aartaka_d has joined #lisp
galex-713_ has joined #lisp
skapata has quit [Remote host closed the connection]
galex-713 has quit [Read error: Connection reset by peer]
karlosz has quit [Quit: karlosz]
semz has quit [Ping timeout: 260 seconds]
mange has quit [Ping timeout: 276 seconds]
ldbeth has joined #lisp
aartaka has quit [Ping timeout: 264 seconds]
ldbeth has quit [Ping timeout: 260 seconds]
galex-713_ has quit [Ping timeout: 246 seconds]
galex-713 has joined #lisp
ldbeth has joined #lisp
semz has joined #lisp
semz has quit [Changing host]
semz has joined #lisp
warweasle has quit [Quit: rcirc on GNU Emacs 26.1]
ldbeth has quit [Ping timeout: 265 seconds]
rickygee has joined #lisp
notzmv has quit [Ping timeout: 265 seconds]
ldbeth has joined #lisp
pankajsg has joined #lisp
ldbeth has quit [Ping timeout: 264 seconds]
routeveg has quit [Quit: leaving]
galex-713 has quit [Ping timeout: 256 seconds]
ldbeth has joined #lisp
hendursaga has quit [Ping timeout: 268 seconds]
hendursaga has joined #lisp
ldbeth has quit [Ping timeout: 276 seconds]
ldbeth has joined #lisp
supercoven has joined #lisp
rixard_ has joined #lisp
sm2n_ has joined #lisp
ldbeth has quit [Ping timeout: 245 seconds]
X-Scale` has joined #lisp
hineios3 has joined #lisp
hhdave_ has joined #lisp
astronavt___ has joined #lisp
borodust- has joined #lisp
idxu_ has joined #lisp
ecraven- has joined #lisp
hdasch_ has joined #lisp
micro_ has joined #lisp
elflng_ has joined #lisp
micro_ is now known as Guest47409
getha has joined #lisp
scoofy_ has joined #lisp
deltab_ has joined #lisp
akoana_ has joined #lisp
cods_ has joined #lisp
ramus_ has joined #lisp
bmansurov has joined #lisp
fengshaun_ has joined #lisp
antoszka_ has joined #lisp
dtman34_ has joined #lisp
nitrix_ has joined #lisp
White__Flame has joined #lisp
xanderle has joined #lisp
ldbeth has joined #lisp
copec_ has joined #lisp
albusp has joined #lisp
datajerk_ has joined #lisp
hhdave_ has quit [Ping timeout: 264 seconds]
leo_song_ has joined #lisp
SAL9000_ has joined #lisp
malm has quit [Killed (tepper.freenode.net (Nickname regained by services))]
malm has joined #lisp
Ekho has quit [Disconnected by services]
akoana_ has quit [Client Quit]
Trieste_ has joined #lisp
pankajsg has quit [*.net *.split]
ukari has quit [*.net *.split]
akoana has quit [*.net *.split]
JokerAscensionEx has quit [*.net *.split]
Nikotiini has quit [*.net *.split]
elflng has quit [*.net *.split]
flazh has quit [*.net *.split]
Jesin has quit [*.net *.split]
scoofy has quit [*.net *.split]
sm2n has quit [*.net *.split]
copec has quit [*.net *.split]
vhost- has quit [*.net *.split]
rixard has quit [*.net *.split]
ramus has quit [*.net *.split]
antoszka has quit [*.net *.split]
White_Flame has quit [*.net *.split]
cods has quit [*.net *.split]
thijso has quit [*.net *.split]
X-Scale has quit [*.net *.split]
_death has quit [*.net *.split]
nitrix has quit [*.net *.split]
dtman34 has quit [*.net *.split]
xlei has quit [*.net *.split]
leo_song has quit [*.net *.split]
Posterdati has quit [*.net *.split]
Juonu has quit [*.net *.split]
datajerk has quit [*.net *.split]
micro has quit [*.net *.split]
fouric has quit [*.net *.split]
really21 has quit [*.net *.split]
hineios has quit [*.net *.split]
Bike has quit [*.net *.split]
kam1 has quit [*.net *.split]
supercoven_ has quit [*.net *.split]
Trieste has quit [*.net *.split]
xanderle_ has quit [*.net *.split]
nullman has quit [*.net *.split]
vaporatorius has quit [*.net *.split]
astronavt has quit [*.net *.split]
ecraven has quit [*.net *.split]
SAL9000 has quit [*.net *.split]
hdasch has quit [*.net *.split]
traxex has quit [*.net *.split]
d4ryus has quit [*.net *.split]
albusp_ has quit [*.net *.split]
hvxgr_ has quit [*.net *.split]
Guest47363 has quit [*.net *.split]
[df] has quit [*.net *.split]
deltab has quit [*.net *.split]
fengshaun has quit [*.net *.split]
hhdave has quit [*.net *.split]
idxu has quit [*.net *.split]
[df]_ has joined #lisp
borodust has quit [*.net *.split]
SumoSud0 has quit [*.net *.split]
ecraven- is now known as ecraven
copec_ is now known as copec
hineios3 is now known as hineios
idxu_ is now known as idxu
X-Scale` is now known as X-Scale
akoana has joined #lisp
hvxgr has joined #lisp
Bike has joined #lisp
SumoSud0 has joined #lisp
fouric has joined #lisp
vhost- has joined #lisp
ldbeth has quit [Ping timeout: 264 seconds]
Nikotiini has joined #lisp
Juonu has joined #lisp
gitgoood has quit [Read error: Connection reset by peer]
d4ryus has joined #lisp
flazh has joined #lisp
ukari has joined #lisp
vaporatorius has joined #lisp
Posterdati has joined #lisp
JokerAscensionEx has joined #lisp
Jesin has joined #lisp
Alfr has quit [Killed (leguin.freenode.net (Nickname regained by services))]
<fitzsim>
I'm trying to use net.didierverna.clon in clisp
Alfr has joined #lisp
xlei has joined #lisp
<fitzsim>
in core/meta.lisp, (named-readtables:defreadtable dummy (:dispatch-macro-char #\# #\_ #'dummy-reader) [...])
hhdave has joined #lisp
kam1 has joined #lisp
<fitzsim>
results in an error: SET-DISPATCH-MACRO-CHARACTER: #\# is not a dispatch macro character
<beach>
Good morning everyone!
<fitzsim>
hi beach
nullman has joined #lisp
Ekho has joined #lisp
ldbeth has joined #lisp
rickygee_ has joined #lisp
<beach>
Do you get the same error in some more popular Common Lisp implementation?
hhdave has quit [Ping timeout: 265 seconds]
adeht has joined #lisp
<fitzsim>
this is on Debian ppc64le; does this work for anyone on other platforms?
<fitzsim>
I'm not sure what else to try; the macro character seems fine to me
<fitzsim>
ros install clisp
<fitzsim>
separately, I'm trying to install clisp via roswell
<fitzsim>
results in :'ffcall+' is not a valid target for 'install'
rickygee has quit [Ping timeout: 260 seconds]
nitrix_ is now known as nitrix
<fitzsim>
beach: no, SBCL is fine
ldbeth has quit [Ping timeout: 260 seconds]
<fitzsim>
beach: oh, actually, SBCL is complaining too
<fitzsim>
it's in a #+clisp form, and when I try to run that form through SBCL, I see the same failure
<Bike>
i haven't used named readtables, but i think if you don't specify existing readtables to get definitions from the new readtable starts out empty
<Bike>
so maybe #\# really isn't a dispatch macro character
really2 has joined #lisp
hhdave has joined #lisp
<Bike>
"An empty readtable is a readtable where each character's syntax is the same as in the _standard readtable_ except that each macro character has been made a constituent. Basically: whitespace stays whitespace, everything else is constituent." yeah ok.
ldbeth has joined #lisp
<Bike>
oh, but it looks like it just uses this dummy readtable in addition to the standard one
<Bike>
maybe all you need is a (:macro-char #\# :dispatch) first
<Bike>
er, (:macro-char #\# :dispatch t) i guess
<fitzsim>
ok, the above worked with clisp
<fitzsim>
now trying your suggestion
orivej has quit [Ping timeout: 260 seconds]
ldbeth has quit [Ping timeout: 246 seconds]
<Bike>
works for me
<Bike>
i wonder if named readtables got stricter or something
<fitzsim>
yeah, your suggestion worked
hdasch_ is now known as hdasch
ldbeth has joined #lisp
<fitzsim>
Bike: does it work for you on clisp without the :macro-char addition?
<beach>
fitzsim: Do you have particular reasons for using CLISP? I am asking because I suspect not many people here use it, so help is harder to find.
<Bike>
i do not have clisp installed.
<fitzsim>
I'm just trying out various CL implementations
<beach>
Ah, OK.
<fitzsim>
I find CLISP useful because it's good for bootstrapping SBCL
<fitzsim>
but I'd also like to keep my code working on several different implementations
<fitzsim>
Roswell seems really promising for this, since it'll e.g. build latest Git CLISP
ldbeth has quit [Ping timeout: 276 seconds]
<fitzsim>
it seems like CLISP is developed but not released, unfortunately
<Bike>
but based on defreadtable's docstring i can see how not defining # as a dispatching macro character would cause problems, regardless of implementation
<fitzsim>
Bike: yes, agreed; this seems to be a bug in net.didierverna.clon
<fitzsim>
specifically, in net.didierverna.clon's clisp portability code
hhdave has quit [Ping timeout: 260 seconds]
<fitzsim>
(which SBCL doesn't see normally)
<Bike>
yeah.
ldbeth has joined #lisp
<Bike>
eck, named readtables does have to resort to some implementation internals to make an "empty" readtable. that's kind of unfortunate
akoana has left #lisp ["Leaving"]
hhdave has joined #lisp
ldbeth has quit [Ping timeout: 265 seconds]
mindCrime_ has quit [Ping timeout: 264 seconds]
orivej has joined #lisp
ldbeth has joined #lisp
ldbeth has quit [Ping timeout: 260 seconds]
hhdave has quit [Ping timeout: 265 seconds]
karlosz has joined #lisp
ldbeth has joined #lisp
kaiwulf has quit [Ping timeout: 245 seconds]
hhdave has joined #lisp
ldbeth has quit [Ping timeout: 264 seconds]
mindCrime_ has joined #lisp
ldbeth has joined #lisp
Guest47409 has quit [Quit: leaving]
micro has joined #lisp
ldbeth has quit [Ping timeout: 264 seconds]
asarch has joined #lisp
<asarch>
If I have (:food tacos :drinks beer) how could I add :snacks pizza at the end of the list So I could get (:food tacos :drinks beer :snacks pizza)?
quazimodo has quit [Remote host closed the connection]
khajeya has joined #lisp
khajeya has quit [Remote host closed the connection]
waleee-cl has quit [Quit: Connection closed for inactivity]
pillton has quit [Quit: ERC (IRC client for Emacs 27.1)]
really2 has quit [Ping timeout: 260 seconds]
ldbeth has quit [Ping timeout: 265 seconds]
andrei-n has joined #lisp
<flip214>
quite a few people say that... until they _know_ how to use REs ;)
<Lycurgus>
or how to copy and paste from a generator
rgherdt has joined #lisp
karlosz has joined #lisp
ldbeth has joined #lisp
karlosz has quit [Client Quit]
karlosz has joined #lisp
ldbeth has quit [Ping timeout: 246 seconds]
ldbeth has joined #lisp
aartaka has joined #lisp
<ldbeth>
good morning
toorevitimirp has joined #lisp
aartaka_d has quit [Ping timeout: 265 seconds]
nicktick has quit [Read error: Connection reset by peer]
orivej has quit [Ping timeout: 276 seconds]
Lycurgus has quit [Quit: Exeunt]
jonatack has joined #lisp
nicktick has joined #lisp
surabax has joined #lisp
karlosz has quit [Quit: karlosz]
luni has joined #lisp
random-nick has joined #lisp
<beach>
markasoftware: I think NCONC is specified to modify the list, unless it is the empty list of course.
<beach>
aggin: Thanks!
<beach>
Hello ldbeth.
zdravko has quit [Quit: Leaving]
nicktick1 has joined #lisp
zdravko61 has joined #lisp
nicktick has quit [Ping timeout: 256 seconds]
jonatack has quit [Read error: Connection reset by peer]
jonatack has joined #lisp
zdravko61 has quit [Client Quit]
zdravko61 has joined #lisp
zdravko61 has quit [Remote host closed the connection]
zdravko61 has joined #lisp
ljavorsk has joined #lisp
bitmapper has quit [Quit: Connection closed for inactivity]
iskander has quit [Quit: bye]
pve has joined #lisp
scymtym_ has joined #lisp
<ck_>
I believe the regex quote is in the unix hater's handbook as well
<moon-child>
markasoftware: nconc is defined in terms of rplacd, so it would have to be in-place
<ck_>
but it might be for a specific tool, like sed
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
iskander has joined #lisp
scymtym has quit [Ping timeout: 260 seconds]
<ldbeth>
sometimes it is easier to write a proper parser
<moon-child>
imo raku (née perl6) has the best regex implementation out there
aggin has joined #lisp
<moon-child>
not least because it's really well integrated with the rest of the language. And whitespace isn't significant, so you don't have to squish all the code together
* moon-child
wishes for something like that in cl
<aggin>
what would be the best implementation of CASE that uses string= and also supports the OTHERWISE key ?
<flip214>
aggin: ALEXANDRIA:SWITCH
<aggin>
flip214: ok will check it out
varjag has joined #lisp
ex_nihilo__ has joined #lisp
<splittist>
You can break a (cl-ppcre) regex into mulitple lines and provide line comments. That can reduce the write-only-ness of complex mangling.
ex_nihilo_ has quit [Ping timeout: 264 seconds]
aggin has quit [Quit: WeeChat 3.0.1]
Nilby has joined #lisp
anticrisis has quit [Read error: Connection reset by peer]
zups has joined #lisp
pve has quit [Ping timeout: 276 seconds]
pve has joined #lisp
<semz>
moon-child: cl-ppcre has an alternative sexpr syntax, though I find it pretty cumbersome and idiosyncratic personally
<semz>
I can really go without writing :non-greedy-repetition over and over to get optional matches
ccl-logbot has quit [Quit: Client terminated by server]
ccl-logbot has joined #lisp
kam1 has quit [Ping timeout: 272 seconds]
dtman34_ has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
<flip214>
phoe: though I'm trying to be at or above one second for TIME, to reduce noise a bit.
<phoe>
sure, let me try with 3M and bear with the fact that SHUFFLE is quadratic for lists...
<flip214>
phoe: phoe: well, put the shuffled data into a special and do that only once
<phoe>
eh, it's not *that* bad; still finishes in under a minute
<mfiano>
Well you're not timing that, so just put the shuffle on the array
gabiruh has joined #lisp
zdravko61 has quit [Remote host closed the connection]
<Nilby>
I think it's because it with the element type it actually has to do more copying. And quicksort may have a slight throughput advantage to mergesort.
<Nilby>
I imagine there might be some way to get that mergesort a smidgeon faster, by maybe having an architecture specific version. But of course the advantages of parallelizing are likely greater.
<_death>
my opinion is that the answer to both your questions is "no"
<phoe>
I assume you meant the 2nd and 3rd questions
<_death>
yes
<phoe>
I think the same way, but my nitpickish nature told me to nonetheless put the questions there
<phoe>
better to voice my worries out loud even if they are only going to be read by a single random person 10 years from now whose old code blew the heap because of this change
<_death>
if you have a large list, you already lose with that shuffle
<phoe>
yep, I can fully agree with that
<_death>
so maybe that person is still waiting for it to finish, and in the meantime won't use the new shuffle
<_death>
(by the way, by "large" I mean really small)
<_death>
if only it performed the shuffling on disk, like they used to merge sort "big data" in the old days...
jonatack_ has quit [Ping timeout: 264 seconds]
xlei has joined #lisp
<flip214>
_death: oh sorry, got no notification? phoe: thanks, will take a look
Bike has joined #lisp
<_death>
flip214: interesting.. I also had something like that happen to me, and only noticed a PR by chance
<Nilby>
Also of course the performance on a random value straight consed list is slightly faster than shuffled
hiroaki__ has joined #lisp
<Nilby>
But what's not to like about a linear shuffle?
contrapunctus has left #lisp ["Disconnected: closed"]
contrapunctus has joined #lisp
<_death>
if you can do that, sure.. often, I find that I need shuffle
curtosis has joined #lisp
<_death>
many alexandria functions are good for convenience but may not be the most efficient for your particular use-cases.. e.g., I remember having to implement a map-iota-permutations function that's similar to alexandria:map-permutations but uses a compact representation, given that the sequence is [0-n)
jonatack has joined #lisp
<_death>
flip214: I guess the reason for no notification is that your alexandria repo on github is a "fork"
<_death>
flip214: so since you're maintaining it, you may want to recreate it as an original
Lycurgus has joined #lisp
curtosis has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
contrapunctus has left #lisp ["Disconnected: closed"]
contrapunctus has joined #lisp
Lycurgus has quit [Quit: Exeunt]
pfdietz has joined #lisp
ebrasca has joined #lisp
wsinatra has joined #lisp
kam1 has joined #lisp
ex_nihilo__ has quit [Quit: Leaving]
warweasle has joined #lisp
narimiran has joined #lisp
kam1 has quit [Read error: Connection reset by peer]
Sheilong has joined #lisp
kam1 has joined #lisp
attila_lendvai has quit [Ping timeout: 246 seconds]
theothornhill has joined #lisp
Nilby has quit [Ping timeout: 264 seconds]
<jmercouris>
what symbol would you use to designate a function as a implementation detail
<jmercouris>
like %salmon
<jmercouris>
or?
<jackdaniel>
%caribe
<jackdaniel>
they are dangerous
<jackdaniel>
the usual way to designate a function as an implementation detail is to not export it
<jackdaniel>
%foo denotes "dangerous"
<jmercouris>
I don't want to say it is dangerous
<jmercouris>
I just want to say it exists for this insular purpose
<jmercouris>
it is not really meant to be used
<jmercouris>
outside of this context
<phoe>
in my headcanon foo:bar is public, foo::bar is private, foo::%bar is an invocation to cthulhu and should never be used
<jmercouris>
like you can, nothing bad will happen
<jackdaniel>
then don't use %
<jmercouris>
OK
<jmercouris>
how about this
<jmercouris>
let's say we have something called process-salmon
<jmercouris>
and it processes a single salmon
<phoe>
is that exported?
<jmercouris>
then we have another function that processes multiple salmon
<phoe>
how does this second function differ from mapcar #'process-salmon?
<jmercouris>
the only reason we need the function that processes multiple salmon is because the caller expects to be able to pass a list of salmon to be processed
<jmercouris>
it MAY or may not differe from (mapcar #'process-salmon
<phoe>
what is the difference, then?
<jmercouris>
for example, sometimes we might only (process-salmon (first salmon))
<jmercouris>
I'm just wondering how to name these class of functions
<jmercouris>
because you see the problem right? salmon is the singular and plural
<jmercouris>
so my thought was process-salmon*
<jmercouris>
to indicate the plural of salmon
<phoe>
oh, I see
<phoe>
I'd avoid trouble and use a singular process-salmon and indicate this in the documentation/docstring, and ask the users to mapcar/mapc #'process-salmon if they want to try and process multiple
<jackdaniel>
how about process-one-%caribe;drop table users;
<jmercouris>
phoe: I know, that is what I would normally do
<jmercouris>
phoe: can I show you a concrete example?
<phoe>
sure
<jmercouris>
one moment please
<phoe>
is a single salmon allowed to be a list, or not? if that is the case, you can make a very simple GF of typecase that accepts either a non-list singular salmon or a list of salmon
<phoe>
that would be kinda sloppy, but would in turn work around the sloppiness of english
sjl has joined #lisp
<jmercouris>
here is the problem, the prompter:actions ALWAYS specify a list to return
<jmercouris>
it is part of our API
<jmercouris>
and therefore any action MUST handle a list of objects
<jmercouris>
therefore I need a sort of 'mini wrapper' to just unwrap the list, I do NOT want to put that logic into scroll-page-to-heading
<jmercouris>
I would end up having to write a (if (listp heading) (first heading) heading) at the top
<phoe>
alexandria:ensure-car
<phoe>
but, yes, I see the issue
<jmercouris>
yeah, that's fine, I could do thta
<jmercouris>
s/thta/that
<jmercouris>
but still
<jmercouris>
I don't think it is a wise idea to overload the value of heading to accept EITHER a list or a single value
<phoe>
this sounds like a question of API design - are your functions specified to accept a single object, a list of objects, or both?
<jmercouris>
it /depends/
<phoe>
I'd grab any of those choices (preferably the first, but that's my preference) and apply that consistently
<phoe>
if that is impossible, then specify in the function contract/documentation/docstring what is accepted by a given function - a single object, or a list, or both - and then use that
<phoe>
and then refactor as much as possible in order to aim for eventual consistency in the API
Feldman has joined #lisp
<jmercouris>
hm
<jmercouris>
interesting thoughts
wsinatra has quit [Read error: Connection reset by peer]
[df]_ is now known as [df]
kam1 has quit [Read error: Connection reset by peer]
wsinatra has joined #lisp
<jmercouris>
thanks for your feedback phoe
<jmercouris>
well we have decided that the API should return a list /always/
<jmercouris>
the problem is that many of our functions do not yet respect this, and they accept only single values
<jmercouris>
I guess ensure-car could be a band-aid...
<jmercouris>
or making the inline-command as I have done
<phoe>
hey wait a second
<phoe>
return a list, sure
<phoe>
but we are not talking about returning values
<phoe>
we are talking about *accepting* values
<jmercouris>
yes
<phoe>
that's the other end of the function call
<jmercouris>
the functions do NOT ACCEPT values, correct
<jmercouris>
sorry, a LIST
<phoe>
so you have a lot of functions that return lists of things
pfdietz has quit [Quit: Connection closed]
<jmercouris>
only one function that returns a list, but it is used to gather user input
<jmercouris>
and this function is used extensively
<phoe>
I am confused now
<phoe>
< jmercouris> well we have decided that the API should return a list /always/
<phoe>
I thought that you meant all of your API
<phoe>
what do you mean by "API" here?
<jmercouris>
phoe: yes, when calling (prompt "give me some input") prompt will ALWAYS return a list
<jmercouris>
a list of things the user has inputted
<phoe>
okay, and what is the problem?
<phoe>
you have a single function that is used a ton of times, and it always returns a list
<jmercouris>
yes
<jmercouris>
it did not ALWAYS return a list, in the past it would return a single value
<jmercouris>
and many functions are built around this concept
orivej has quit [Ping timeout: 256 seconds]
<jmercouris>
so for example, the one I showed you
<jmercouris>
"scroll-page-to-heading", it expects a single heading
<phoe>
oh, I see
<jmercouris>
it doesn't make sense that one could scroll to multiple headings
<jmercouris>
you can only scroll to one, it is a mutually exclusive operation
<jmercouris>
you can scroll to several in a row, but only one at a time
kam1 has joined #lisp
<phoe>
then call it like (scroll-page-to-heading (first input))
heisig has quit [Quit: Leaving]
<phoe>
that's what I would call the clean way
<jmercouris>
so the way that I've written it in my example :-D
kam1 has quit [Read error: Connection reset by peer]
<phoe>
yes, I understand your example now
<jmercouris>
OK, it is a good reassurance
<phoe>
this way it's clear that HEADINGS is always a list, even if it is a singleton list
<jmercouris>
and I did not know about ensure-car anyways
<phoe>
so at least we have type issues out of the way
<jmercouris>
indeed
<phoe>
but!
<phoe>
you won't need ensure-car if HEADINGS is always a list
<phoe>
you can just use CL:FIRST all the time instead
<phoe>
ENSURE-CAR is useful in situations when you *maybe* have a list
<jmercouris>
OK here is where it gets tricky
<jmercouris>
I do want ENSURE-CAR
<jmercouris>
because someone else could use the function
<jmercouris>
and they just want to pass a single value
<phoe>
then they fucked up
<jmercouris>
a single heading
<phoe>
and they need to fix up their code
<jmercouris>
well yes, but
<jmercouris>
it is counterintuitive to pass a list when we only want the first value /always/
<jmercouris>
so I wouldn't blame them
<jmercouris>
even if the spec shows something else
Feldman has quit [Read error: Connection reset by peer]
<phoe>
hmmmmmm
<phoe>
is this an internal function?
<jmercouris>
yes and no
<phoe>
why no?
<jmercouris>
all functions in nyxt that are commands are external
<jmercouris>
we export all commands
<phoe>
okay, so in this case, SCROLL-TO-HEADING* that accepts a list of headings is exported
<jmercouris>
you see that this is not a command, it is a regular defun
kaiwulf has joined #lisp
<jmercouris>
it is not exported
<jmercouris>
however, we encourage users to muck around even with unexported things
<phoe>
oh, wait, SCROLL-PAGE-TO-HEADING - is it a command? it's just a function
<jmercouris>
it is jus ta function
<phoe>
I see MAKE-COMMAND in L6, I assumed this is what we are making
<phoe>
> however, we encourage users to muck around even with unexported things
<jmercouris>
we are making a command, yes
<phoe>
ouch
<jmercouris>
:-) it will bite us yes
<jmercouris>
at some point
<phoe>
well then, you should encourage users to fix their code whenever you change stuff, too
Fare has quit [Ping timeout: 264 seconds]
<phoe>
and then move fast and break stuff fearlessly
<jmercouris>
yes
<jmercouris>
so the exported thing in this case is scroll-to-heading*
pfdietz has joined #lisp
<jmercouris>
which ONLY accepts a list
<jmercouris>
you see that it does (first headings)
<phoe>
yes, I see
<jmercouris>
so the user of said function could very well get it wrong
<phoe>
in that case I can understand the use of ENSURE-CAR
<jmercouris>
thats why I wanted some convention or something to show it
<phoe>
because that function is supposed to DWIM, in a way
<jmercouris>
right, I could just add ensure-car to the other function
<jmercouris>
I could ensure-car in scroll-page-to-heading
<phoe>
and you kinda use it in both contexts
<jmercouris>
and it would be cleaner that way
<phoe>
sure
varjag has quit [Quit: ERC (IRC client for Emacs 26.3)]
<phoe>
;; and then you could just (make-command scroll-to-heading* scroll-page-to-heading) if you're willing to changing your MAKE-COMMAND macro to accept a function name instead of a lambda list and body
<phoe>
but then! are all of your commands single-argument functions?
<jmercouris>
No
<jmercouris>
Only some
<jmercouris>
That’s the thing :-D
<jmercouris>
I think ensure car might be the way to go here
kam1 has joined #lisp
<phoe>
well then which one of them accept lists and which one of them don't accept lists, because things are getting real sloppy
<phoe>
and I don't want to be the one maintaining it
<jmercouris>
All of them should gracefully accept lists
<jmercouris>
That’s what we decided
<jmercouris>
And I can either wrap them as ive done with (first xyz) or use ensure car within the body of the actual function
<jmercouris>
What should I do?
<phoe>
accept lists as which arguments
<phoe>
first, second, third, nth?
<jmercouris>
doesn't mater
<jmercouris>
it is always the first
<jmercouris>
s/mater/matter
<phoe>
oh, I see
<jmercouris>
so IDEALLY
<phoe>
then ensure-car all the things and pray that you never get a list as a valid argument
<jmercouris>
scroll-page-to-heading should accept a list OR a value
<jmercouris>
and like I said I can either wrap it (as I've done)
<phoe>
because if (1 2 3) is a valid argument to one of your functions then (ensure-car '(1 2 3)) ;=> 1
<jmercouris>
or use ensure-car within its body
<phoe>
and so your users will need to work around your sloppiness and manually wrap their lists
<jmercouris>
I'm not sure
Lycurgus has joined #lisp
<phoe>
so they'll need to call it like (do-command '((1 2 3)))
<jmercouris>
when would they need to manually wrap their lists?
<phoe>
when a command would normally accept a list of things
<jmercouris>
let's say I write a new function
<jmercouris>
download-links
<jmercouris>
as you can imagine, this accepts a list of links
<phoe>
yes
<jmercouris>
I'm not going to write ensure-car within download-links
<jmercouris>
that woud be nonsensical
<jmercouris>
so the user can just do (download-links '(link1 link2))
<jmercouris>
there is no manual wrapping
<phoe>
then what about (download-links 'link1)
<jmercouris>
yeah, that's not possible
<jmercouris>
should it be possible?
<phoe>
no idea, you tell me
<jmercouris>
well, the name is plural
<jmercouris>
so no, it should not be possible
<jmercouris>
if if it was (download-link 'link1) then it would be fine
<phoe>
it's weird to me, because (download-links '(a b c)) operates on A B C whereas (scroll-to-heading '(a b c)) operates on A and nothing else
<jmercouris>
yes, that is inconsitent
<jmercouris>
while it is true that (scroll-to-heading '(a b c)) is technically correct
<jmercouris>
we are always expecting a list of a single value
<jmercouris>
the only reason it is a list is becuase of PROMPT
<jmercouris>
no other reason, prompt ALWAYS returns a list of values that the user selects
<jmercouris>
if I could declare a type of a list of a single value
<jmercouris>
I would
<jmercouris>
then it would be clear
<phoe>
you can
<phoe>
(cons t null)
<phoe>
this is a proper list containing exactly one value
<jmercouris>
ah
<jmercouris>
I did not think of that
<phoe>
s/a proper list/type of a proper list/
wsinatra has quit [Ping timeout: 260 seconds]
<jmercouris>
is the problem clear?
<jmercouris>
it does not make sense to jump to a list of headings
<jmercouris>
but prompter ALWAYS gives a list
<phoe>
I'd honestly always explicitly unwrap this list whenever I want to get its first element
<jmercouris>
that is what I will do
<phoe>
and signal an error if the list contains zero or two+ elements
theothornhill has quit [Ping timeout: 265 seconds]
<jmercouris>
with scroll-to-heading*
<phoe>
just for type safety
iskander has quit [Ping timeout: 264 seconds]
<phoe>
because if prompter is allowed to return a list of N elements (including one), then we need to always verify if we get a list of exactly 1 element
<phoe>
then extract it via CL:FIRST, and then operate on it
<jmercouris>
yes
<phoe>
at least that's what I'd do to keep it as magic-less as possible
<jmercouris>
that is why we do not use it directly, and wrap it
<phoe>
because magic means bugs
<jmercouris>
indeed, there is no magique aqui
<jmercouris>
you see in my example, I wrap it and extract the first function quite explicitly
ljavorsk has quit [Ping timeout: 276 seconds]
<phoe>
yes
<jmercouris>
s/function/value
<phoe>
and that's how I'd do it, I guess
<jmercouris>
1
<jmercouris>
thank you phoe
<jmercouris>
I'll be sure to curse your name some years from now when it all blows up :-D
<phoe>
but, just to be sure
<phoe>
make-command scroll-to-heading* is the thing that is going to be user-facing, right?
<jmercouris>
that's correct
<splittist>
Just stick :before and :after methods to ensure-car all the things. What could go wrong?
<phoe>
splittist: god no
<phoe>
jmercouris: I'm actually thinking of one more thing
<jmercouris>
OK, what?
<phoe>
what is your prompter like?
andrei-n has joined #lisp
<jmercouris>
what do you mean?
<phoe>
does it always allow one to input multiple values?
<jmercouris>
sometimes
<phoe>
what does it depend on?
<jmercouris>
if you invoke it with multiple-selection-p
iskander has joined #lisp
<jmercouris>
now, sorry
<jmercouris>
that's not the full story
<jmercouris>
a prompter contains multiple sources of information
<jmercouris>
each source decides if multiple-selection-p is allowe
<jmercouris>
and each source has its own list of actions
* splittist
wonders why jmercouris wants to eat parakeets
<jmercouris>
starting with "When I wrote this I realized it did not work. Then I tried to do"
zdravko61 has joined #lisp
<phoe>
currently the prompter returns very simple metadata about the values that it returns
<phoe>
namely, the length of the list
<phoe>
but it's not the prompter returning that IMO is the problem, it is the prompter getting invoked
<phoe>
I'd like to invoke the prompter in a way that always returns one element, because then I can depend on that element being singular
<jmercouris>
right, explicitly asking for a single return value
<phoe>
yes, when the prompter is invoked
<jmercouris>
I'm not sure that fixes the problem though
<jmercouris>
ACTIONS operate on the SOURCE level
<jmercouris>
hm, maybe it would work
<phoe>
hm
<phoe>
this has become a strangely specific discussion
<phoe>
maybe let's move it to #nyxt
gitgoood has joined #lisp
<jmercouris>
OK
gitgoood is now known as gitgood
orivej has joined #lisp
kam1 has quit [Read error: Connection reset by peer]
varjag has joined #lisp
toorevitimirp has quit [Remote host closed the connection]
notzmv has quit [Ping timeout: 272 seconds]
curtosis has joined #lisp
luni has quit [Quit: Connection closed]
dbotton has quit [Quit: This computer has gone to sleep]
CrazyPython has joined #lisp
gitgoood has joined #lisp
zdravko61 has quit [Remote host closed the connection]
kam1 has joined #lisp
gitgood has quit [Read error: Connection reset by peer]
kam1 has quit [Read error: Connection reset by peer]
dbotton has joined #lisp
jeosol has quit [Quit: Connection closed]
orivej has quit [Ping timeout: 276 seconds]
kslt1 has quit [Remote host closed the connection]
wsinatra has quit [Read error: Connection reset by peer]
wsinatra has joined #lisp
zdravko61 has joined #lisp
aartaka has quit [Read error: Connection reset by peer]
aartaka has joined #lisp
curtosis has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
jonatack has quit [Ping timeout: 276 seconds]
<mfiano>
So if we have a class with a few slots that is not exported, and then we have a macro
<mfiano>
oops
<mfiano>
MOP question: If I have an internal class that is not exported which has a few slots, and then I have a macro that is exported that the user uses to define a class that is a subclass of this class (among other details), can our internal code reliably use STANDARD-INSTANCE-ACCESS to access the inherited slots, without fear of the vector positions changing when the user redefines the subclass?
<mfiano>
The internal class is never going to be changed itself, only the user's subclass, which we want to S-I-A in our internal code to access the inherited slots
rogersm has joined #lisp
<mfiano>
Seems like a question Bike or beach would know best :)
arcontethegreat[ has joined #lisp
anewuser has joined #lisp
jonatack has joined #lisp
kevingal_ has joined #lisp
cage_ has joined #lisp
anewuser has quit [Ping timeout: 264 seconds]
ebrasca has quit [Remote host closed the connection]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
iskander- has quit [Quit: bye]
zdravko61 has quit [Quit: Leaving]
rogersm has quit [Quit: Leaving...]
noko has quit [Ping timeout: 260 seconds]
mindCrime_ has joined #lisp
kaiwulf has quit [Ping timeout: 265 seconds]
* fiddlerwoaroof
just spent an hour or so because of SET-PPRINT-DISPATCH
<fiddlerwoaroof>
It turns out that if you do (SET-PPRINT-DISPATCH 'string ...), you can break ASDF/UIOP
<fiddlerwoaroof>
For portability, they should probably copy the pretty-print dispatch table and add it to the WITH-SAFE-IO-SYNTAX macro
<fiddlerwoaroof>
(or similar)
<fiddlerwoaroof>
Or, just NIL out *PRINT-PRETTY*
<_death>
fiddlerwoaroof: you should use your own dispatch table.. I have a patch for slime that lets you have a repl-specific dispatch table
<fiddlerwoaroof>
Yeah, the issue was that I accidentally modified the global one
<fiddlerwoaroof>
So, user error, but it seems like the sort of problem a library like ASDF should think about
<_death>
fiddlerwoaroof: as I wrote in that patch's commit message, their assumptions may not be warranted, but this is the real world ;)
bitmapper has joined #lisp
gxt has quit [Remote host closed the connection]
scymtym has quit [Ping timeout: 246 seconds]
dopeCanoe has joined #lisp
gxt has joined #lisp
curtosis has joined #lisp
scymtym has joined #lisp
notzmv has joined #lisp
CrazyPython has quit [Read error: Connection reset by peer]
mmohammadi9812 has joined #lisp
dopeCanoe has left #lisp [#lisp]
CrazyPython has joined #lisp
charles` has joined #lisp
jeosol has joined #lisp
pfdietz has quit [Quit: Connection closed]
waleee-cl has joined #lisp
jonatack_ has joined #lisp
jonatack has quit [Read error: Connection reset by peer]
contrapunctus has left #lisp ["Disconnected: closed"]
contrapunctus has joined #lisp
karlosz has joined #lisp
jonatack_ has quit [Read error: Connection reset by peer]
jonatack_ has joined #lisp
jonatack_ has quit [Client Quit]
jonatack has joined #lisp
<waleee-cl>
Will a newer sbcl re-use the cached files in ~/.cache/common-lisp from the previous version on the system?
<waleee-cl>
I got a package error when building nyxt that went away after wiping the cache, hence the question
<_death>
waleee-cl: it's best to delete the cache
<_death>
waleee-cl: sbcl's fasls have versions, but even with the same version I don't know if you can practically rely on that
<Bike>
mfiano: i think you can rely on the slot locations being the same unless the user can use multiple inheritance or affect the inherited slots in certain ways
<waleee-cl>
_death: yeah, I guess. It worked without wiping it for about 4 months of sbcl's straight from the git repo
<Bike>
mfiano: "For a given class, the locations increase consecutively, in the order that the directly accessible slots appear in the list of effective slots."
<mfiano>
Bike: I was told the MOP does not guaranteee slot locations, in that the "youngest" slots could be placed first.
<mfiano>
Which would definitely be against my idea
<Bike>
hmm yeah i might be misremembering
<Bike>
"Direct slot definitions coming from classes earlier in the class precedence list of class appear before those coming from classes later in the class precedence list."
<Bike>
so any new slots would displace the old ones
<mfiano>
Does that mean superclass slots would appear first?
<Bike>
no, superclasses will be later in the CPL
<Bike>
well i suppose i can just test what sbcl does
<Bike>
seems the slot locations are consistent. wonder what i'm misreading here
<Bike>
oh, wait, i see, "The result of compute-slots is a list of these effective slot definitions, in unspecified order."
<Bike>
so you can't rely on an ordering of effective slots
<mfiano>
Fun times. Back to the drawing board. Thanks!
<Bike>
if this is important, you could define your own metaclass with a compute-slots that does define the order/locations
<mfiano>
I would have to underatand that better to see if the obsoileted instance edge case would bite me
<mfiano>
I'll read more into it tomorrow I guess
<Bike>
i don't think redefinition poses a special issue
<mfiano>
Also I feel like I would totally screw that up. I'm not very familiar with defining custom metaclasses
<mfiano>
D you have an example of doing something similar?
<mfiano>
Do*
<Bike>
something similar in the sense of keeping locations consistent, no
kam1 has joined #lisp
<mfiano>
Fair enough
kam1 has quit [Read error: Connection reset by peer]
<Bike>
yes, although as you can see you have to explicitly specify the slot-order for every class, which is probably not what you want
<Bike>
(also i think that example is from AMOP)
<mfiano>
Really all I want is for 2 slots in a private class that is the sole direct superclass (enforced by a macro) to always by first in the storage
<Bike>
sure. plenty of ways you could do that. all you need to do is make sure compute-slots always returns those two slots first
<mfiano>
The example I linked to says it will not work for subclasses
<mfiano>
I am not sure what must be done to do such
curtosis has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<Bike>
it's simple. say your slots are named A and B. one thing you could do would be to (call-next-method), get your list, look for the slots named A and B, and reorder them to the head of the list, and then return that.
<mfiano>
Sounds simple enough, and gives me enough of an idea to play around with it. Thanks
<Bike>
no problem
<mfiano>
Also, looks like there is a typo in that example
<mfiano>
The test function is comparing A with A instead of A with B
<Bike>
right you are.
jonatack has quit [Ping timeout: 246 seconds]
Nilby has quit [Ping timeout: 264 seconds]
luni has joined #lisp
<mfiano>
Can you dumb it down for me, as far as how your suggestion of using c-n-m is different than the use of it there?
<Bike>
in the example they sort the entire list with this predicate that uses the (custom) class-slot-order property
<Bike>
you'd want to just... you know what i'll just write it out
sauvin has quit [Remote host closed the connection]
jonatack has joined #lisp
<Kingsy>
https://github.com/xach/buildapp <- is this considered the easiest way of buildign an executable when using commonlisp ?
<Xach>
Kingsy: i think asdf has an easier option that works with more implementations
<mfiano>
I see, and if I needed more slots I wouldn't even need to open code them it looks like
<Kingsy>
looking.
<Xach>
Kingsy: i can't remember the operation, though - it is in the manual iirc
<Bike>
mfiano: just like, don't overthink it i guess? all you need to do is reorder a list. it's like a pretty abstract data problem
<mfiano>
:)
<Kingsy>
yeah I am looking now. I'll have a read of the getting started guide.
<Kingsy>
Xach: thanks
<mfiano>
Bike: Do I need to do anything special for validate-superclass?
<Bike>
(defmethod validate-superclass ((class mfiano-class) (superclass standard-class)) t) should be it i think
<Bike>
assuming your defining macro puts in the metaclass as well
<mfiano>
Ok thanks
<mfiano>
Well that doesn't avoid the error
<mfiano>
I should just read more MOP
rumbler31 has quit [Remote host closed the connection]
rumbler31 has joined #lisp
<Bike>
what's the error?
<mfiano>
Well my superclass definition uses the metaclass, and I can make an instance of that with that validate-superclass in place, but I cannot make an instance of a subclass of that superclass. Do I also need to add the metaclass to that as well?
<mfiano>
Oh you later corrected yourself to "unspecified order". I was remembering your earlier comment about super slots appearing last
<Bike>
in this case it's probably set-difference moving things around
<mfiano>
Well the latter 2 slot ordering is meaningless. It was just me remembering the wrong thing you said earlier about A and B appearing last in the storage vector
<Bike>
right
aartaka has quit [Read error: Connection reset by peer]
aartaka_d has joined #lisp
Lycurgus has joined #lisp
kaiwulf has joined #lisp
curtosis has joined #lisp
Ashok has quit [Quit: Ping timeout (120 seconds)]
aartaka_d has quit [Ping timeout: 272 seconds]
hiroaki1 has quit [Ping timeout: 240 seconds]
hiroaki1 has joined #lisp
narimiran has quit [Ping timeout: 246 seconds]
Josh_2 has joined #lisp
casual_friday_ has joined #lisp
casual_friday has quit [Ping timeout: 260 seconds]
jeosol has quit [Ping timeout: 240 seconds]
bendersteed has joined #lisp
Lycurgus has quit [Quit: Exeunt]
hiroaki__ has quit [Ping timeout: 272 seconds]
borodust- is now known as borodust
borodust has quit [Changing host]
borodust has joined #lisp
curtosis is now known as curtosis[away]
curtosis[away] has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
jonatack has quit [Ping timeout: 264 seconds]
cage_ has quit [Quit: Leaving]
curtosis has joined #lisp
creuxsader has joined #lisp
hiroaki__ has joined #lisp
JokerAscensionEx has quit [Read error: Connection reset by peer]
mmohammadi9812 has quit [Remote host closed the connection]
mmohammadi9812 has joined #lisp
JokerAscensionEx has joined #lisp
andrei-n has quit [Quit: Leaving]
moon-child has quit [Remote host closed the connection]
hvxgr has quit [Ping timeout: 260 seconds]
hvxgr has joined #lisp
Cesdo has joined #lisp
hvxgr_ has joined #lisp
rumbler31 has quit [Remote host closed the connection]
rumbler31 has joined #lisp
wsinatra has quit [Quit: WeeChat 3.0.1]
villanella has joined #lisp
warweasle has quit [Quit: later]
moon-child has joined #lisp
curtosis is now known as curtosis[away]
hvxgr_ has quit [Ping timeout: 246 seconds]
moon-child has quit [Ping timeout: 240 seconds]
curtosis[away] has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
dilated_dinosaur has quit [Ping timeout: 264 seconds]
hvxgr_ has joined #lisp
dilated_dinosaur has joined #lisp
moon-child has joined #lisp
kam1 has joined #lisp
kam1 has quit [Read error: Connection reset by peer]
moon-child has quit [Remote host closed the connection]
hvxgr_ has quit [Read error: Connection reset by peer]
ljavorsk has joined #lisp
mmohammadi9812 has quit [Ping timeout: 276 seconds]
mmohammadi9812 has joined #lisp
dbotton has quit [Quit: This computer has gone to sleep]
shka_ has quit [Ping timeout: 265 seconds]
moon-child has joined #lisp
dilated_dinosaur has quit [Ping timeout: 246 seconds]
moon-child has quit [Ping timeout: 240 seconds]
Josh_2 has quit [Remote host closed the connection]
dilated_dinosaur has joined #lisp
surabax has quit [Quit: Leaving]
random-nick has quit [Ping timeout: 264 seconds]
hvxgr_ has joined #lisp
quazimodo has joined #lisp
hvxgr_ has quit [Ping timeout: 264 seconds]
dbotton has joined #lisp
gitgoood is now known as gitgppd
gitgppd is now known as gitgood
nicktick has quit [Ping timeout: 256 seconds]
Feldman has joined #lisp
Josh_2 has joined #lisp
<mfiano>
Bike: still there?
<Bike>
yes
<mfiano>
Is it possible to generalize the compute-slots method to work for any class, such that A and B aren't hard-coded into find, or can we not, due to the undefined ordering?
<Bike>
anything's possible, as long as you have some way to define what slots you want first
<Bike>
you are imposing an ordering
<mfiano>
(assuming we want all slots of a particular class, and not some subset of them)
<fiddlerwoaroof>
Is there some fork and dump trick to saving an executable without kill your sbcl repl?
<fiddlerwoaroof>
And, is this packaged somewhere?
<mfiano>
Bike: Ok, thanks a lot.
anticrisis has joined #lisp
txxt has joined #lisp
txxt has quit [Client Quit]
txxt has joined #lisp
varjag has quit [Ping timeout: 256 seconds]
pve has quit [Quit: leaving]
<scymtym>
fiddlerwoaroof: there is SWANK/BACKEND:SAVE-IMAGE which attempts a fork-based trick on SBCL. i don't know whether it works
teej has quit [Quit: Connection closed for inactivity]
gaqwas has quit [Ping timeout: 276 seconds]
teej has joined #lisp
kam1 has joined #lisp
moon-child has joined #lisp
rgherdt has quit [Ping timeout: 246 seconds]
kam1 has quit [Read error: Connection reset by peer]