<Mariaaa>
Angel_Feroz(Humbert0@ferozmente.angelical.y.angelicalmente.feroz)- loca de mierda te jodiste te haré la vida imposible te iré a buscar y probablemente te desaparezca!!!
<Mariaaa>
01:45 : Mariaaa ¦ 01:38:58 -Angel_Feroz(Humbert0@ferozmente.angelical.y.angelicalmente.feroz)- loca de mierda te jodiste te haré la vida imposible te iré a buscar y probablemente te desaparezca!!!
Mariaaa has left #lisp [#lisp]
fsmunoz has quit [Ping timeout: 244 seconds]
<gendl>
Hi, I just started using paredit for the first time (after editing common lisp with emacs for 25 years). It seems pretty cool but I should probably read a manual or watch a tutorial - whenever I search for same (even specifying "how to use paredit for common lisp") i'm getting a bunch of nice looking directions on how to use it for clojure.
<gendl>
that's all well & good and i suppose most of that will apply to CL as well, but is there a nice "paredit for common lisp for dummies" somewhere?
<gendl>
#emacs just told me to do M-x describe-mode paredit.
<gendl>
Duh. I'll start with that...
wsinatra has joined #lisp
_whitelogger has joined #lisp
gaqwas has joined #lisp
gaqwas has joined #lisp
gaqwas has quit [Changing host]
flip214 has quit [Ping timeout: 240 seconds]
_jrjsmrtn has quit [Ping timeout: 264 seconds]
zigpaw has quit [Ping timeout: 246 seconds]
__jrjsmrtn__ has joined #lisp
ldb has joined #lisp
<ldb>
gendl: I don't think paredit has any langauge specific feature
shifty has quit [Ping timeout: 264 seconds]
<ldb>
so it should be fine to follow any tutorials
<ldb>
good morning everyone
space_otter has joined #lisp
zigpaw has joined #lisp
sbryant has quit [Ping timeout: 256 seconds]
ldb_ has joined #lisp
flip214 has joined #lisp
ldb has quit [Ping timeout: 240 seconds]
flip214 has quit [Ping timeout: 260 seconds]
renzhi has joined #lisp
scymtym has quit [Ping timeout: 246 seconds]
flip214 has joined #lisp
ldb has joined #lisp
bilegeek has joined #lisp
gaqwas has quit [Remote host closed the connection]
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
ldb has quit [Quit: leaving]
cjb has joined #lisp
orivej has joined #lisp
torbo has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 240 seconds]
caltelt has quit [Ping timeout: 240 seconds]
dvdmuckle has quit [Ping timeout: 265 seconds]
terpri_ has joined #lisp
dvdmuckle has joined #lisp
orivej has joined #lisp
terpri has quit [Ping timeout: 244 seconds]
solrize has left #lisp ["Leaving"]
Alfr_ has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
zaquest has quit [Quit: Leaving]
Alfr__ has quit [Ping timeout: 260 seconds]
ajithmk has joined #lisp
FennecCode has quit [Ping timeout: 244 seconds]
terpri_ has quit [Remote host closed the connection]
terpri_ has joined #lisp
orivej has joined #lisp
terpri__ has joined #lisp
wsinatra_ has joined #lisp
wsinatra_ has quit [Client Quit]
wsinatra_ has joined #lisp
terpri_ has quit [Ping timeout: 260 seconds]
wsinatra_ has quit [Client Quit]
wsinatra has quit [Quit: WeeChat 2.9]
orivej has quit [Ping timeout: 264 seconds]
orivej has joined #lisp
paul0 has joined #lisp
shangul has joined #lisp
zaquest has joined #lisp
paul0 has quit [Remote host closed the connection]
FennecCode has joined #lisp
paul0 has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #lisp
Lord_of_Life has quit [Ping timeout: 240 seconds]
Lord_of_Life has joined #lisp
cjb has quit [Ping timeout: 245 seconds]
paul0 has quit [Quit: Leaving]
orivej_ has joined #lisp
Bike has quit [Quit: Lost terminal]
orivej has quit [Ping timeout: 240 seconds]
akoana has left #lisp ["Leaving"]
iissaacc has joined #lisp
beach has joined #lisp
<beach>
Good morning everyone!
<Fare>
bonsoir!
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
satousan has joined #lisp
orivej_ has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
shidima has joined #lisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
shangul has quit [Ping timeout: 256 seconds]
sympt has joined #lisp
sympt_ has quit [Ping timeout: 260 seconds]
mindCrime has quit [Ping timeout: 260 seconds]
narimiran has joined #lisp
satousan has quit [Quit: WeeChat 2.3]
DGASAU has joined #lisp
nirved has quit [Ping timeout: 240 seconds]
Oladon has quit [Quit: Leaving.]
em-bee is now known as eMBee
orivej has quit [Ping timeout: 256 seconds]
orivej has joined #lisp
OpenZen has quit [Ping timeout: 246 seconds]
eMBee has quit [Changing host]
eMBee has joined #lisp
shifty has joined #lisp
eMBee is now known as em-bee
em-bee is now known as eMBee
zmt00 has quit [Quit: Leaving]
mankaev has quit [Read error: Connection reset by peer]
nirved has joined #lisp
mankaev has joined #lisp
<mfiano>
Hello all. If I want to sort a list of symbols such that they are sorted lexicographically and ascendingly on both PACKAGE-NAME and SYMBOL-NAME, is it enough to treat the elements as string designators using (sort some-list #'string<), or must I write my own predicate?
<mfiano>
Just to elaborate, the question is moreso about how a symbol is converted to a string designator, since I want '(mypkg::foo mypkg::bar cl-user::foo cl-user::bar) to be sorted as (cl-user::bar cl-user::foo mypkg::bar mypkg::foo)
<White_Flame>
you might be able to use stable-sort, and first sort by symbol then by package
<White_Flame>
but to sort by package, the :key would have to be (lambda (sym) (package-name (symbol-package sym)))
gravicappa has joined #lisp
<mfiano>
I see. Thanks for the suggestion. I was about to resort to that, but was hesitant as while this doesn't occur frequently, when it is, it is being used in the context of a performance-sensitive event loop.
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #lisp
bocaneri has joined #lisp
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
iissaacc has quit [Remote host closed the connection]
<flip214>
mfiano: group the symbols by package, then sort the packages and the symbols (per package) separately
liberliver has joined #lisp
<pve>
stylewarning: Coalton looks nice
<treflip>
indeed
andrei-n has joined #lisp
ofi has joined #lisp
nicktick has quit [Ping timeout: 260 seconds]
hendursa1 has joined #lisp
ggole has quit [Quit: Leaving]
hendursaga has quit [Ping timeout: 240 seconds]
space_otter has quit [Remote host closed the connection]
bhartrihari has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #lisp
toorevitimirp has joined #lisp
nicktick has joined #lisp
gioyik has quit [Quit: WeeChat 2.9]
v88m has quit [Ping timeout: 256 seconds]
orivej has quit [Ping timeout: 246 seconds]
jonatack has quit [Ping timeout: 260 seconds]
scymtym has joined #lisp
joast has quit [Ping timeout: 240 seconds]
Fare has quit [Ping timeout: 240 seconds]
Inline has joined #lisp
mrcom has joined #lisp
gxt has joined #lisp
terpri_ has joined #lisp
terpri__ has quit [Ping timeout: 260 seconds]
dra_ has joined #lisp
dra_ has quit [Client Quit]
dra has joined #lisp
EvW1 has joined #lisp
nicktick has quit [Ping timeout: 264 seconds]
toorevitimirp has quit [Ping timeout: 265 seconds]
ayuce has joined #lisp
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
ljavorsk has quit [Ping timeout: 264 seconds]
X-Scale` has joined #lisp
X-Scale has quit [Ping timeout: 256 seconds]
X-Scale` is now known as X-Scale
jonatack has joined #lisp
enrio has joined #lisp
shangul has joined #lisp
_Posterdati_ has joined #lisp
Posterdati has quit [Ping timeout: 264 seconds]
bilegeek has quit [Quit: Leaving]
whiteline has quit [Read error: Connection reset by peer]
whiteline has joined #lisp
EvW1 has quit [Ping timeout: 244 seconds]
holycow has quit [Quit: Lost terminal]
ajithmk has quit [Quit: Connection closed for inactivity]
orivej has joined #lisp
ldb has joined #lisp
wxie has joined #lisp
<ldb>
is there any reason most programming langauges treats (expt x 0) const one rather than raise div by 0 error when x is 0?
random-nick has joined #lisp
shangul has quit [Ping timeout: 264 seconds]
Posterdati has joined #lisp
wxie1 has joined #lisp
wxie has quit [Ping timeout: 264 seconds]
wxie1 is now known as wxie
<jackdaniel>
in algebra 0^0 usually is treated as 1, often it is left as undefined expression, but I've never heard an interpretation that it is division by 0
<jackdaniel>
so 1 is OK, nan would be also OK (and exception)
<ldb_>
i wonder if they would manufacture selectric golf ball for Plex
<jackdaniel>
this ux is horrible, also I'm not sure how it is related to cl
mhrstmnn has quit [Remote host closed the connection]
enrio has quit [Ping timeout: 264 seconds]
galex-713 has joined #lisp
<galex-713>
Hi
<jackdaniel>
hey
<ldb_>
jackdaniel: it could be a choice for source code listings
<ldb_>
galex-713: hello
<galex-713>
Beside being older, more used, a lisp-2 (actually lisp-n, afaiu), not having continuation but having goto, and empty list/falsity equivalence, what are the other differences between common lisp and scheme?
<galex-713>
ldb_: hello
jonatack has quit [Ping timeout: 246 seconds]
<jackdaniel>
galex-713: common lisp has more predefined functions, longer standard which addresses many practical issues (which are undefined in scheme) and it is a language used by most people here ;)
<galex-713>
having goto/return
wxie has quit [Ping timeout: 240 seconds]
<galex-713>
jackdaniel: okay
<White_Flame>
didn't scheme start with only having lexical variables?
<galex-713>
for me that comes with “older”, sorry, I should have been more precise: what are *fundamental* differences, preventing of implementing one in the other fully and respectingly
<White_Flame>
the macro systems are also different
<galex-713>
White_Flame: oh there’s that too!
<jackdaniel>
galex-713: common lisp is actually "younger" than scheme, however it has lineage which dates before scheme was introduced
<galex-713>
White_Flame: as of macros, I just consider cl is lower level, I heard you can implement hygienism with defmacro, and can see how, and I saw several scheme implementation providing defmacro-likes
jonatack has joined #lisp
<galex-713>
jackdaniel: oh true indeed
<sm2n>
I believe someone was talking about their scheme implementation in cl here just yesterday
<jackdaniel>
'hygiene' is a bad word, it should be 'sterile' macros :)
<galex-713>
I should have said “older lineage”, thanks
<sm2n>
I don't know of any cl implementations in scheme though
<contrapunctus>
sm2n: Airship Scheme?
<galex-713>
jackdaniel: why not “guarded”?
<sm2n>
contrapunctus, I don't know the name
ldb_ has quit [Ping timeout: 240 seconds]
<jackdaniel>
'hygiene' suggests something good, but I (as a common lisp programmer) consider it bad, so 'sterile'
<galex-713>
sm2n: because of lisp-1 that would require redefining eval, and then also compile, at least… so it wouldn’t be the same thing… common lisp just looks lower level
<galex-713>
I’ve also a friend who says continuation are terrible, in terms of general performance
<jackdaniel>
having some tool at your disposal does not mean that you have to use it, so it is not a problem that scheme has them
<jackdaniel>
one thing, which is not guaranteed by cl standard, but is guaranteed by scheme standard, is tail recursion
<jackdaniel>
otoh common lisp programs usually use iteration, not recursion (maybe because of that, but also iterative style is more plain imo)
<sm2n>
that one's doesn't really matter in practice
ldb has joined #lisp
<jackdaniel>
it does if you write recursive functions
<galex-713>
jackdaniel: to me it looks like a children toy, or a rounded knife for children, like it’s made so that you can cut yourself with it, which may be handy if you’re clumpsy, but you can do less with it
<sm2n>
iirc every cl implementation aside from abcl gives tco
<sm2n>
and the corresponding scheme impl, kawa, doesn't have tco either
<jackdaniel>
are we talking about languages or particular implementations?
kaftejiman has joined #lisp
<sm2n>
hence "in practice"
<jackdaniel>
also, on cl implementations which do tco, it is usually "off" by default
<jackdaniel>
i.e you may need to have some specific combination of optimize options
<galex-713>
jackdaniel: maybe iteration is also more culturally anchored… proper tail-recursion, if instead of reusing the name of current lambda function used something more akin to “return” but call “recurse” (or “repeat”) it would really look like a pascal/cobol/fortran (forgot which of those have that) “do … repeat”
<sm2n>
huh, I did not know that, I've never run into a stack overflow from writing tail recursive functions
<jackdaniel>
galex-713: continuations (and delimited continuations) are actually very cool concept, and the latter is quite practical and may be implemented efficiently
<White_Flame>
do...repeat doesn't look at all like tail recursion
<contrapunctus>
Oh, speaking of recursion...is there a standard way or a library for named let in CL?
<galex-713>
ooooh, I thought “delimited continuation” was the full-name of it
<jackdaniel>
the macro DO has a syntax which resembles tail recursion
<White_Flame>
unless you can have 'repeat' in the middle of lexical bodies, and change a set of parameters inline with it
<galex-713>
contrapunctus: paul graham maybe? ^^'
<sm2n>
no, standard old scheme continuations are "undelimited"
<contrapunctus>
galex-713: ???
<galex-713>
contrapunctus: the macro-are-even guy, he wrote books on that
<sm2n>
though the latest iteration of continuation abstractions is effect handlers, which are quite cool and can be optimized away in certain cases
<galex-713>
White_Flame: well tco implies it’s somewhat near the end, so for variable binding/changing/conditions, I guess you can manage to do something which looks “almost the same”
<White_Flame>
think of a decision tree, with multiple leaves each calling the recursion
<White_Flame>
it's at the end of execution,but not at the end of the lexical block
<galex-713>
but to me it would then look uglier, and also it looks harder to modelize mathematically to prove stuff to me (but I’m not a math guy, many math stuff looks complicated too me, including formalizing behavior of an imperative loop)
<ldb>
sm2n: effect handlers are mostly equational logic
<ldb>
although continuation can be used for implement it in some functonal langauges
<contrapunctus>
galex-713: I'm not sure you understand what I want...I'm asking, if I want to use named let for recursion, does the CL standard have that? Or maybe there's a library for it? (Of course I can write it myself with a macro, but I want to be aware of prior art.)
<ldb>
contrapunctus: labels
<ldb>
it is right the thing you want
<sm2n>
ldb, what do you mean?
<galex-713>
White_Flame: yes but within do .. repeat you have some sort of return/continue (then it’s the same) or test guard right? you could use just the same stuff to define a variable “continue” which will affect that…
<White_Flame>
eh, I guess
<galex-713>
contrapunctus: I was answering about the library, as for standard, no it doesn’t
<galex-713>
I’ve almost finished CLtL2 and it’s not in it, at least
<galex-713>
though scheme appears to keep trying to reimplement all of cl, changing some names
<jackdaniel>
cltl2 does not describe common lisp standard
<White_Flame>
cltl2 isn't the standard
xrash has quit [Ping timeout: 256 seconds]
<ldb>
sm2n: i mean, with out cps, a compiler can still implement effect handler, by embedding the right equational rules
<galex-713>
I know, but I don’t know how much the standard diverge, and it seems many people based on it for their implementation, at least at first
<minion>
galex-713: look at pcl: pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005).
<galex-713>
(btw, I’m curious of what have been added since then)
<White_Flame>
yeah, it took me a while to figure out what "named let" is, since CL LET obviously creates named bindings. LET is never anonymous
<sm2n>
ldb, I don't follow, what do you mean by equational rules?
<galex-713>
jackdaniel: I started reading it too, does it talk about stuff not in CLtL?
<jackdaniel>
it does not list changes from cltl2, but it has plenty of content which is not covered by cltl2
<galex-713>
jackdaniel: CLtL2 is a thousand page… reading all of it again is… well… especially for me it’s easier on paper, as I distract easily…
<galex-713>
is there some changelog or errata from CLtL2 somewhere?
<ldb>
sm2n: equational logic, an implementation is OBJ3 (written in CL) and its succesor Maude
<galex-713>
before buying CLtL2, I searched for a printed version of the standard, like hyperspec but paper, and didn’t find anything :c
<jackdaniel>
you may buy a terrible copy from ANSI, but it would be a waste of paper
<jackdaniel>
you may compile dpans3 latex sources and print it yourself
<contrapunctus>
White_Flame: named let is Scheme's syntactic sugar for recursive functions - (let foo ((a 0) (b 1)) ... (foo 1 2) ...) (the next time, a and b will be bound to 1 and 2)
<ldb>
there's a free ANSI CL draft avaliable
<sm2n>
oh, term rewriting
<contrapunctus>
I was doing an exercise in recursion in CL, and missed the named let.
<sm2n>
this is interesting, thanks for the pointer
jonatack has quit [Remote host closed the connection]
<ldb>
contrapunctus: named let is essentially a recursive lambda
<ldb>
although named under Common Lisp manual, it is indeed CLtL2
<ldb>
and much better than the one from CMU AI repo
<galex-713>
ldb: I’ve the sources from steele’s website, as for CLtL2, I just can’t get the index to compile correctly
<ldb>
galex-713: that one in the link has the complete index with hyperlinks
<jackdaniel>
I think that while cltl2 is nicely written, learning from it will do you no good, because it is a *different* language than Common Lisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
<galex-713>
jackdaniel: I can’t follow your archive link, the page is void
<jackdaniel>
it worked for me, cvberry.com website went blank some time ago, that's why I've linked the archive copy
orivej has joined #lisp
<easye>
jackdaniel: RE: cltl2: slightly disagree, the style (Steele!) is excellent, and can help with some points. One does has to check the CLHS for exact differences, of course.
<galex-713>
ldb: I also have a compiled version with hyperlinks, but it’s more cool to have sources, to reprint and correct it if one day I feel it is needed
<galex-713>
jackdaniel: I’ve tried oldest snapshot, same thing
<galex-713>
jackdaniel: I read the diff you gave, to me it looks small or superficial, I disagree, I hoped bigger change (like the series, CLOS or condition system added as annexes in second edition of CLtL… though I know CLOS description is not complete and doesn’t describe MOP, I didn’t find where to get anything about that, and thought I could complete with ANSI Common Lisp from Graham
<jackdaniel>
easye: it is a nice reading, but learning about cltl2 to understand common lisp is not a sound idea in my eyes, precisely because of these small differences
<ldb>
by my judgement tracing from the roots is very effective
* jackdaniel
slaps ldb with interlisp manual ;-) and gets back to work
<galex-713>
dra: thank you very much for that!
<ldb>
newer standards may not bother to explain why a feature is present
<galex-713>
Also, is the standard under a free licence? such as public domain?
<ldb>
galex-713: the draft is under public domain
<galex-713>
ldb: I like that thing of US :)))
gravicappa has joined #lisp
<galex-713>
I wished there were a fusion of CLtL2 and that draft, in some format such as texinfo, that could convert to both a readable TeX book and to an html hyperspec
* ldb
actually, the best lisp book I've found is Anatomy of Lisp
bhartrihari has joined #lisp
<galex-713>
ldb: rly? is it easy to find? what does it says that standards and graham don’t?
<ldb>
galex-713: GNU Common Lisp has a TeXinfo version
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
<galex-713>
jackdaniel: I started with elisp, learnt scheme by reading r5rs, some r4,6,7rs and srfi, and wanted my knowledge to be exhaustive, I was especially excited about type declarations, but this doesn’t seem to have changed
<galex-713>
ldb: of what?
<galex-713>
CLtL or spec?
<galex-713>
jackdaniel: dra: also, was cl only standardised by ANSI? wasn’t it also by ISO, IEEE, or something alike, outside of US?
<dra>
I agree, Anatomy of Lisp is one of a kind.
<ldb>
galex-713: CLtL
<galex-713>
ldb: thank you :) it seems wise, to me
<ldb>
galex-713: Anatomy of Lisp teaches the LISP family of languages via the formal semantics
<dra>
galex-713: It's "only" an ANSI standard.
treflip has quit [Quit: WeeChat 2.6]
<jackdaniel>
islisp has iso standard, eulisp was being standardized in Europe (but only drafts are available, it was never finished)
<jackdaniel>
s/being standardized/being written/
<galex-713>
dra: okay, not so bad
<galex-713>
anyway, I think if any foreign org should have done that, they should have just dubbed the ansi one
<galex-713>
for the sake of standardization
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
<galex-713>
ldb: so it’s incomplete, but kinda dense and with maths?
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
<galex-713>
jackdaniel: buy from ANSI? that’s possible? I’m in Europe and only european also. And why terrible? why a waste? what’s dpans3?
orivej_ has joined #lisp
orivej has quit [Ping timeout: 264 seconds]
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
<jackdaniel>
dpans3 is the last document draft before the standard was accepted
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
qwe has quit [Ping timeout: 245 seconds]
<ldb>
galex-713: yes, it is just not math oriented, but focus on "computational logic"
<jackdaniel>
ansi sells documents with standards, but they charge (afair) $20 per copy, which is an ugly scan of a printed document
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
<jackdaniel>
I did not see it, but that's what I've been told
<galex-713>
contrapunctus: indeed labels in the best bet to build named let on it, but beware without syntactic sugar, you will have to write program body before init vars, like with map
<galex-713>
I usually add the least, as long as it’s unambiguous (then go back if it’s apparently not), so I don’t get unrelated answers that could be unrelated (or even not containing) the keywords that really interested me
<galex-713>
phoe: antoszka doesn’t include a readme and I don’t know which of these dozens of file research for the meaning of what “dp” stands for
<ldb>
intead, you should looking in books' reference/bibliography section for relatex information
<galex-713>
ldb: what? about what?
<galex-713>
phoe: and first ddg link doesn’t answer to the question either
<jackdaniel>
the first rule of steering through noise is to not generate it ;) discussing ddg vs google is not this channel topic
<galex-713>
also a horrible thing is then google makes so relevant bubble about people you ask for help, that you can’t get help from them because “google it it’s obvious”, and if trying ddg or other, you don’t get the answer…
<phoe>
that's #lispcafe material, as jackdaniel mentioned
<galex-713>
jackdaniel: you are right, thank you (through irrelevance can be sometimes relevant, especially as some people are sometimes more relevant than other, especially here ;) so each channel ought to have a -offtopic counterpart)
<phoe>
that's what #lispcafe is!
<galex-713>
phoe: not in my presence, thank you :))
<jackdaniel>
this channel has one, it is called #lispcafe -- a preemtive answer: some people are not on #lispcafe because they are _not_ interested in offtopic
<jackdaniel>
s/preemtive/preemptive/
gaqwas has joined #lisp
<galex-713>
jackdaniel: “[14:22:08] <dra> 20 years ago it was way easier to find useful information on the net.” was brought here by someone not on the offtopic channel, and I found that interesting, I think I should have answered privately then maybe, thank you anyway
<galex-713>
jackdaniel: shouldn’t #lispcafe be mentioned in topic then?
<jackdaniel>
there you go sunshine, I'm afk for a while (to avoid complaints for changing the topic)
Necktwi has joined #lisp
ldb has quit [Ping timeout: 256 seconds]
ldb has joined #lisp
<galex-713>
So let me resume: beside being older, hence more used, with special variables, being a lisp-2 (actually lisp-n, afaiu), not having continuation but having goto+return, and empty list/falsity equivalence, one of scheme or cl could be implemented in terms of the other?
<galex-713>
like having a small kernel implementing all these, and configurabilility about what to do about booleans and namespaces
orivej_ has quit [Ping timeout: 246 seconds]
<galex-713>
are there also pecularities to typing? or is just cl superior to scheme in this respect (which restricts itself to a few standard disjoint datatypes)?
<phoe>
kinda sorta - I think the most painful thing is the ability to express continuations in CL and (I guess?) implementing on Scheme-side the possibility of doing external non-local returns in CL
Inline has quit [Remote host closed the connection]
gaqwas has quit [Ping timeout: 260 seconds]
Inline has joined #lisp
<beach>
galex-713: Both languages are Turning complete, so you can always implement one in terms of the other. The only question is what technique you then use, and how painful it is.
paul0 has joined #lisp
Bike has joined #lisp
paul0 has quit [Remote host closed the connection]
paul0 has joined #lisp
paul0 has quit [Client Quit]
dsl` has joined #lisp
wxie has quit [Quit: wxie]
wxie has joined #lisp
hendursa1 has quit [Quit: hendursa1]
hendursaga has joined #lisp
ebrasca has joined #lisp
rumbler31 has joined #lisp
joast has joined #lisp
wxie has quit [Quit: wxie]
wxie has joined #lisp
shangul has joined #lisp
shifty has quit [Ping timeout: 256 seconds]
wxie1 has joined #lisp
wxie has quit [Ping timeout: 256 seconds]
gko_ has joined #lisp
mangul has joined #lisp
wxie1 has quit [Ping timeout: 256 seconds]
shangul has quit [Ping timeout: 265 seconds]
wxie has joined #lisp
shidima has quit [Ping timeout: 240 seconds]
vutral has joined #lisp
EvW has quit [Ping timeout: 256 seconds]
farooqkz__ has joined #lisp
<galex-713>
beach: some features are more low level than others. I’m pretty sure we can implement gotos in terms of lambda, but it looks extremely wrong to me, and I would never want to do that
<galex-713>
phoe: maybe with continuations it’s possible
<beach>
So then the question is what you want, and that is a very tough question to answer, because there are so many different options.
<galex-713>
so, let me try that: except continuations, all of scheme is expressible in terms of cl
redeemed has joined #lisp
<galex-713>
beach: I’d like to take any implementation and make it pyramidally built upon a small lower level kernel
mangul has quit [Ping timeout: 264 seconds]
<galex-713>
I think it’d need to be a lisp-n (in a configurable way: let n be any number, possibly as much as the number of types), have both continuations and gotos, configurable scope, and configurable conditionals
<jdz>
galex-713: Even Scheme people don't think full-blown continuations are a good idea — they don't mix with dynamic (special) variables very well.
<phoe>
galex-713: what is that for?
<galex-713>
phoe: I’d like to help a friend do something useful and amusing to more people from his thesis work
<galex-713>
he finds lisp not low-level enough
<galex-713>
actually he even finds C not low-level enough
<galex-713>
he tries to build a lispy-language which is lower level than C
mankaev has joined #lisp
<galex-713>
and build on that in a “reductionist way” (like in Grow a Language, from Steele)
<phoe>
I assume that ##lisp might be much better for that than #lisp
<phoe>
the former is a general Lisp discussion channel, where the latter (here) is strictly CL-related
<galex-713>
oh, what’s the difference? why 2 hashes?
<galex-713>
ooooh!
<galex-713>
I didn’t got that
<galex-713>
thank you!
<phoe>
two hashes is kind of a Freenode thing; it means "more generic/general"
<phoe>
but then not everyone follows it, again, for historical reasons
<galex-713>
okay!
<galex-713>
yeah I get that
<galex-713>
hirctory is a mess
<galex-713>
*hIRCtory is a mess
lonjil2 has quit [Quit: Quit.]
<Robdgreat>
two hashes means unofficial
<galex-713>
but anyway my base question was on cl, and scheme, and I asked on both channels, and got non-overlapping relevant answers
rumbler31 has quit [Ping timeout: 264 seconds]
mokulus has joined #lisp
ldb has quit [Ping timeout: 256 seconds]
ldb has joined #lisp
madrik has joined #lisp
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
shidima has joined #lisp
<beach>
galex-713: As it turns out, that technique of implementing a language (i.e., growing it from something lower level) is not necessarily a good idea, as you would see if you followed my presentations for the online Lisp meeting.
enrio has joined #lisp
sjl_ has joined #lisp
mankaev has quit [Ping timeout: 240 seconds]
enrioog has quit [Ping timeout: 240 seconds]
rumbler31 has joined #lisp
treflip has quit [Quit: WeeChat 2.6]
jonatack has joined #lisp
EvW has joined #lisp
<galex-713>
beach: damn, that’s a big thing… do you have an URL?
<galex-713>
I’ll use youtube-dl to find it but errrrrr
ldb has quit [Ping timeout: 260 seconds]
<phoe>
Creating a Common Lisp implementation, part 1 and 2
<galex-713>
phoe: what implementation did you work on?
ldb has joined #lisp
wxie has quit [Remote host closed the connection]
v88m has joined #lisp
<phoe>
galex-713: uhhhhh, me? I have some patches in CCL and some bug reports in SBCL
<phoe>
but I'm not an implementer myself
<galex-713>
CCL?
<galex-713>
how have you come up with your thought, experience and conclusion then?
<galex-713>
oh, CMU CL?
<phoe>
no, Clozure Common Lisp
<phoe>
CMUCL is a different one
<phoe>
my thought/experience/conclusion on which topic in particular? I'm just a Lisp hacker/programmer
nirved has quit [Ping timeout: 240 seconds]
<phoe>
several years of practice does wonders
<galex-713>
oh, given the size, it doesn’t look so long
<galex-713>
phoe: on cl implementation
<galex-713>
phoe: on cl implementation creation*
<phoe>
that's beach!
<phoe>
these two videos are his ones
<phoe>
he's likely been doing Lisp longer than I've been alive
ldb has quit [Ping timeout: 264 seconds]
<galex-713>
oh damn my head is gone again
ahungry has joined #lisp
<galex-713>
sorry
nirved has joined #lisp
<galex-713>
do you know which implementation did beach work on?
wxie has joined #lisp
<galex-713>
damn it doesn’t have subtitles…
<sm2n>
when did these online lisp meetings start? I must've missed it somehow
<jackdaniel>
after els2020
<sm2n>
galex-713, he's writing SICL right now
<galex-713>
els?
<phoe>
European Lisp Symposium
<sm2n>
oh, neat
jonatack has quit [Ping timeout: 246 seconds]
<phoe>
SICL Implements Common Lisp ; unofficial backronym
<sm2n>
are the ones not on the yt channel archived somewhere?
<phoe>
which ones do you mean?
<phoe>
all talks that I've streamed so far as a part of the OLM initiative are on this channel
ofi has quit [Quit: ERC (IRC client for Emacs 26.3)]
jonatack has joined #lisp
<sm2n>
oh you're right
<sm2n>
I thought #1 and #2 were missing for some reason
<sm2n>
but they're all there
nirved has quit [Ping timeout: 240 seconds]
<phoe>
whew, I was worried for a second
<beach>
minion: Please tell galex-713 about SICL.
<minion>
galex-713: SICL: SICL is a (perhaps futile) attempt to re-implement Common Lisp from scratch, hopefully using improved programming and bootstrapping techniques. See https://github.com/robert-strandh/SICL
dsl` has quit [Ping timeout: 240 seconds]
treflip has joined #lisp
nirved has joined #lisp
<phoe>
basically, SICL is an attempt to write a CL implementation 1) in a fully modular way, 2) in portable Common Lisp without parts in any foreign languages
<phoe>
1) makes its modules usable and useful in other implementations and just in general as libraries
<phoe>
2) is the craziest idea ever since it means that you can write all of CL in CL without any kind of intermediate core written in C or what else and without issues of "we can't use defclass because we don't have defclass yet"
dsl` has joined #lisp
wxie has quit [Ping timeout: 260 seconds]
<galex-713>
beach: thank you, I read several pages on that then :) so the new thing is you use the whole high level common lisp to implement it right? or some new features too?
<ebrasca>
phoe: Why it is "craziest idea"? , mezzano is in CL.
<galex-713>
phoe: wait, isn’t sbcl in cl? since it has a compiler…
<jackdaniel>
the idea is not crazy, C is bootstrapped using "full" C; it is just not very common among existing common lisp implementations
<phoe>
galex-713: it's mostly in CL, but it has a C core.
<galex-713>
ow :c
lucasb has joined #lisp
<phoe>
jackdaniel: ebrasca: I meant what jackdaniel mentioned - it's not what existing implementations do. Mezzano and SICL are unique in the matter
<galex-713>
jackdaniel: it is not very common among high-level languages implementations, I only know C, C++, rust, haskell and OCaml who do that
<phoe>
galex-713: the SBCL compiler is written in CL, the C core is usually used for interfacing with the OS and for garbage collection
<galex-713>
phoe: I see!
<galex-713>
so only I/O modules would be needed from SICL, in SBCL, right?
nirved has quit [Ping timeout: 240 seconds]
<galex-713>
modules which could dynamically load libc themselves, and/or base themselves on some kernel API, isn’t it?
<galex-713>
beach: isn’t sbcl modular, also?
<phoe>
SBCL is very far from being modular
<jackdaniel>
galex-713: you've mentioned /quite a few/ popular languages
<beach>
galex-713: Not so much, no. Most of the code is tied to SBCL itself. And the SBCL compiler is written in a subset of Common Lisp that does not include CLOS.
<galex-713>
oh!
nirved has joined #lisp
<galex-713>
I’ve seen that in guile too, lisp implementors keep implementing it in non-portable way, this is sad :c
dsl` has quit [Ping timeout: 240 seconds]
<galex-713>
and it’s bad, because the more important is something, the more readable it should be
<galex-713>
by the most people
<phoe>
I mean, SBCL is mostly readable
<phoe>
it's just very tied to its own self
<galex-713>
beach: so SICL is a partial OOP cl implementation?
<galex-713>
phoe: that’s cool, but what’s so non-portable about it?
<beach>
galex-713: ?
<phoe>
there's SB-INT and SB-C and SB-IMPL and SB-VM and SB-GRAY and SB-WHATEVER splattered all over SBCL source code: compiler, reader, FORMAT, LOOP, everything
<phoe>
this makes it nontrivial to use SBCL code in non-SBCL implementations
<beach>
galex-713: CLOS is part of the Common Lisp standard. So it all has to be implemented in a conforming Common Lisp implementation.
<jackdaniel>
galex-713: to add one more prominent example, Java is written in Java
<beach>
galex-713: The new thing is that most of the system is written using CLOS.
<galex-713>
jackdaniel: REALLY??? even the VM? but how is it natively compiled? I thought there was only gcj which did that, and it was abandoned…
<galex-713>
beach: okay, so OOP
<jackdaniel>
there are multiple compilers (the standard java compiler is written in java), but this is offtopic
<beach>
galex-713: That is what CLOS is, yes.
<beach>
galex-713: In other words, there is no "order" between modules. It is not the case that one module is written in a subset defined by modules that have been created previously.
<galex-713>
I dislike OOP, but your talk should be interesting, but it lacks subtitles and spoken english drains my energy if it’s not with a friend :c
<beach>
You must be French.
<galex-713>
I’m afraid I won’t last the whole talk
<galex-713>
beach: what makes you say that?
<galex-713>
beach: you are trying to do smalltalk again but in lisp
<beach>
"modelize"
<galex-713>
isn’t it?
<phoe>
galex-713: no, that's pve
<galex-713>
oh!
Fare has joined #lisp
<beach>
I am sorry to hear that you dislike object-oriented programming. That dislike is probably due to your not having been exposed to CLOS.
<galex-713>
oh wait
<galex-713>
wait
dsl` has joined #lisp
<galex-713>
beach: aren’t you from Bordeau and french too?
<galex-713>
beach: maybe, you are maybe right, I’m unsure
<galex-713>
I like polymorphism
<beach>
I am not technically French, no. Just for all practical purposes.
<galex-713>
oh ok, because your accent
<beach>
So I was right. :)
<galex-713>
it would have changed my way to see english, if a native french speaker had a so good accent that it made me tired
<beach>
I have lived in 5 countries on 4 continents. So I am not sure what I am.
<galex-713>
phoe: no no it’s the other way around, frenchman is the superclass
<galex-713>
beach: are you easiest with english?
<jackdaniel>
galex-713: this is offtopic on this channel
<galex-713>
jackdaniel: thank you!
<beach>
galex-713: So to summarize, "growing" a language implementation is not such a great idea, because it requires the person implementing and maintaining a module to know precisely what subset of the language is allowed.
ldb has joined #lisp
<galex-713>
beach: oh!
<galex-713>
this is an interesting idea!
<beach>
And, as it turns out, my brain is just too small to keep track of such subsets.
<galex-713>
I will think to it
dsl` has quit [Ping timeout: 260 seconds]
<galex-713>
personally I like reductionism (“growing a language” out of low-level) because it helps learning the whole system working going down, and also because it means you don’t have to know everything to read anything
<phoe>
for learning purposes, sure, that's very nice
<phoe>
that's how the first part of my upcoming book is structured
<galex-713>
yeah, so his way is better for writing, and steele’s one for reading
<galex-713>
phoe: what book?
<beach>
The Common Lisp Condition System.
<galex-713>
that’s his book?
<beach>
Yeah.
* ldb
missed a lot conversation
<galex-713>
did condition system evolves a lot since CLtL2?
<galex-713>
I’m just starting that chapter (I’m almost done ^^) looks amazing
<galex-713>
*( )
dsl` has joined #lisp
<ldb>
notmuch
nullheroes has quit [Quit: WeeChat 2.9]
<galex-713>
or is it about using it and doing fun or unheard or not-known-enough stuff with it?
<beach>
It is mostly about how unique and how great it is.
<beach>
And how it can all be defined with portable code.
<ldb>
condition system is the not-known-enough kind
<phoe>
it's about constructing it from scratch two times in a row in different ways, and then discussing its uses and traits and quirks and fun purposes
nullheroes has joined #lisp
<phoe>
and how it's unique and underused in general
<ldb>
actually most programming languages are suspicious to all kinds of exception handling like things
<galex-713>
oh fuck
<galex-713>
that looks damn interesting
<galex-713>
I will be smashed under a pile of books growing faster than I can read…
<phoe>
welcome to the club
<dra>
My copy is expected to be delivered mid October. Can't wait.
<ldb>
surely it takes years
<phoe>
dra: that's the ETA for all copies, it seems
<eta>
hmm?
<phoe>
xD
<ldb>
cao
<phoe>
oh that was good
<dra>
Yep, they've moved it closer a couple of times. But they stopped moving it now. ;(
<galex-713>
phoe: no no, you don’t understand, in my case it’s an issue, I don’t write anything T-T
<galex-713>
wait
* galex-713
goes lispcafe again
dsl` has quit [Ping timeout: 256 seconds]
dsl` has joined #lisp
<MetaYan>
dra: continued from #sbcl - I just happened to have read the errata a couple of days ago, so the form rang a bell. Not familiar with the details yet.
jonatack has quit [Read error: Connection reset by peer]
dsl` has quit [Ping timeout: 256 seconds]
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
rippa has joined #lisp
dsl` has joined #lisp
<phoe>
which errata? CLtL2?
<dra>
MetaYan: Yeah. I just noticed that SBCL spits out a few warnings and COMPILE-FILE sets FAILURE-P. Loading the FASL works and even the continuations work. But by now I'm convinced that Weitz must have DEFVAR'd the symbol before (setq foo 13). See 12m54s at https://www.youtube.com/watch?v=EyhL1DNrSME.
shidima has quit [Ping timeout: 264 seconds]
<dra>
phoe: I asked a question over at #sbcl regarding a warning with the On Lisp code.
theseb has joined #lisp
<phoe>
dra: thanks, will look there
ldb has quit [Quit: nearly midnight, go to bed]
<_death>
dra: it's an old habit to setq like that.. the standards committee decided to not define the consequences of doing it, and some implementations (e.g., sbcl) decided to be strict and signal a warning
dsl` has quit [Ping timeout: 265 seconds]
<phoe>
toplevel SETQ seems to be a thing in CL for backwards compatibility with old Lisps
EvW has quit [Ping timeout: 244 seconds]
treflip has quit [Quit: WeeChat 2.6]
<dra>
_death: Thanks. I got it now. I'll try the workarounds you pointed out.
<_death>
the clhs itself contains many examples that setq
dsl` has joined #lisp
<phoe>
yes, that's one of the worst things
<dra>
Adding to my confusion...
dominic34 has joined #lisp
nirved has quit [Ping timeout: 240 seconds]
shidima has joined #lisp
nirved has joined #lisp
galex-713 has quit [Ping timeout: 244 seconds]
dsl` has quit [Ping timeout: 264 seconds]
galex-713 has joined #lisp
wooden has quit [Read error: No route to host]
EvW has joined #lisp
nirved has quit [Remote host closed the connection]
dsl` has joined #lisp
markoong has joined #lisp
<galex-713>
phoe: I guess your book and what’s in it won’t be under a free licence…? :/ do you know how much it will cost btw?
<phoe>
also, nope, I expect coin to flow through them to me if you get the book in a legitimate way
nirved has joined #lisp
<beach>
How many pages did it end up being?
jonatack has joined #lisp
<phoe>
beach: I still don't know, I'll know when it comes out of production and we have a chance to implement our last fixes there
<beach>
Ah, I see.
<beach>
Roughly?
<phoe>
I... honestly don't know, because I don't know what kind of page size and font they'll use
<phoe>
I'll get back to you as soon as I know the stats
<beach>
Fair enough.
Inline has quit [Quit: Leaving]
dsl` has quit [Ping timeout: 256 seconds]
wsinatra has joined #lisp
edgar-rft has quit [Quit: Leaving]
dsl` has joined #lisp
Inline has joined #lisp
enrio has quit [Ping timeout: 260 seconds]
<galex-713>
phoe: does it teach anything that’s not in CLtL2?
<phoe>
galex-713: yes, CLtL2 (AFAIK) doesn't teach how the condition system works internally or how one can construct it from scratch
dsl` has quit [Ping timeout: 240 seconds]
redeemed has quit [Quit: q]
Lord_Nightmare has quit [Ping timeout: 240 seconds]
<galex-713>
phoe: just that? so I could read that in another implementation and it would be “just” more difficult and likely uglier (since I guess it’s must be beautiful to be published)?
<galex-713>
phoe: are both your implementations free, at least?
<galex-713>
(not the text of the book)
<phoe>
galex-713: yes, they are
<phoe>
and yes, "just" that
<galex-713>
oh cool!
<galex-713>
then I’ll try to get it when I will have read more stuff, hope I won’t forget
<phoe>
same way you can "just" read the Portable Common Loops sources in SBCL and it would be "just" more difficult and likely uglier than reading AMOP
<galex-713>
phoe: wait, is the ebook DRM?
enrio has joined #lisp
<galex-713>
phoe: what is AMOP?
<phoe>
Art of the Metaobject Protocol
<phoe>
the ebook isn't DRMed, Apress watermarks their copies instead
<galex-713>
oooh!
<galex-713>
clever
<galex-713>
that’s way better
<galex-713>
phoe: is that the thing written by Sonja Keene?
<phoe>
nope, Sonya's book is yet another thing
<galex-713>
ok
<phoe>
AMOP is by Kiczales, des Rivieres and Bobrow
<galex-713>
is Portable Common Loops the reference implementation of CLOS?
<phoe>
yes
<galex-713>
does Sonya’s book describe MOP too? what do you think of it if you have read it at least skimming?
<xristos>
it doesn't describe the MOP
<phoe>
MOP is a means of implementing and programming CLOS; I don't think Sony--- thanks xristos
<xristos>
you can find both online for free if you know where to look
<xristos>
AMOP is worth buying for sure
<phoe>
^
<xristos>
the sonya book is nice but i'm not sure i'd spend the money for it if i had another chance (i bought both)
<galex-713>
AMOP’s not free (as in free speech) either?
<phoe>
I can't say if my book is worth buying because that'll be up for the reviewers to decide
<galex-713>
phoe: for now it looks promising :) you you implemented conditions twice and are proud enough to put that on paper, that inspires trust
Lord_of_Life_ has joined #lisp
<galex-713>
*if you implemented
<galex-713>
*and were proud enough
<phoe>
galex-713: I didn't really do that from scratch once, I based the implementation on an earlier one
<dra>
phoe: I mean that is what convinced me to order the book. ;)
<phoe>
welp
<phoe>
;; so this kinda teaches me that the traveling salesman problem is not a problem when you're the salesman and you travel to HN to show your wares
vutral has quit [Quit: Connection closed for inactivity]
nirved has quit [Ping timeout: 240 seconds]
<galex-713>
phoe: x)
nirved has joined #lisp
EvW has quit [Ping timeout: 260 seconds]
<galex-713>
phoe: if you think to also convince other languages, why not titling it “Condition System”? it’s shorter and common lisper may already recognize what it is, wouldn’t they?
sbryant has joined #lisp
<phoe>
it's both an interesting and dangerous idea to me
rpg has joined #lisp
nirved has quit [Ping timeout: 240 seconds]
<rpg>
SLIME question: how does one start up slime with environment variables for the lisp process? the definition of SLIME-START has an ENV argument, but AFAICT there's no way to pass that argument to SLIME-START -- SLIME doesn't accept an ENV option. It seems like SLIME-LISP-OPTIONS should allow this, but afaict it only lets you add command line arguments to the command that invokes the inferior lisp.
nirved has joined #lisp
zmt00 has joined #lisp
<rpg>
Franz's ELI (emacs lisp environment) has the variable fi:subprocess-env-vars -- is there anything like that for SLIME?
<_death>
rpg: what about specifying them in slime-lisp-implementations ?
<rpg>
_death: Great! Thanks! that's just what I needed to know!
<phoe>
_death: you mean like "FOO=bar BAZ=quux sbcl"?
<_death>
phoe: no, it can pass arguments to slime-start.. so you can have :env ...
gko_ has quit [Ping timeout: 240 seconds]
<phoe>
TIL
bhartrihari has left #lisp ["Disconnected: closed"]
orivej has quit [Ping timeout: 246 seconds]
<galex-713>
phoe: still reading about your book on HN and… do you think it will be possible to order it without non-free javascript? I don’t know well apress, nor where it will arrive
<galex-713>
oh also if you order the dead-tree version, do you get the ebook as well? or would you need to pay twice'
<galex-713>
*twice?
narimiran has quit [Quit: leaving]
cosimone has quit [Quit: Quit.]
<galex-713>
phoe: also, when you say “programmable debugguer”, is that standard and integrated in the condition system? or standardized after CLtL2?
mindCrime has joined #lisp
bhartrihari has joined #lisp
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
<galex-713>
something that made me sad reading CLtL is that struct don’t support multiple inheritence
<galex-713>
is it especially difficult to do? is it bad?
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
<rpg>
galex-713: That would mess with the ability to efficiently access structs by memory offsets.
<galex-713>
oh, yes, you are right
bhartrihari has joined #lisp
<galex-713>
thank you
<phoe>
galex-713: I know that apress and/or amazon have it, I don't know about their JS-free versions
<phoe>
I don't know if you get an ebook when you order it paperback
<galex-713>
I think I maybe already try to get something from apress and failed
* jackdaniel
waves the offtopic banner
<galex-713>
because I have apress books, and everything I got I got through ebay, because I couldn’t get it elsewhere
<phoe>
the CL debugger itself is actually not defined in the standard itself, it's left for the implementations to define
<galex-713>
phoe: oh ok thank you… but stuff like step and break *are*, arent’t they?
<phoe>
so you can either tweak the implementations' provided debuggers, or - as we do in the book - define your own debugger somewhat easily and program it
<phoe>
yes, but stepping and breaking aren't parts of the debugger itself
<galex-713>
okay
<phoe>
stepping is actually more of a compiler thing than it is a debugger thing
<phoe>
and BREAK is a pretty trivial thing, it's a LET over WITH-SIMPLE-RESTART over INVOKE-DEBUGGER
<galex-713>
Also something opposite: same question about “supertyping” of struct and class… considering that offset thing, especially of classes: wasn’t there ever something like “define a super class of all these class, such as it contains the intersection of their common member and the intersection of their appliable methods apply to it”? or was there never a need to do that because of the possibility to redefine classes on the fly? (I guess
<galex-713>
beach could answer, as for CLOS knowledge)
<galex-713>
phoe: okay
<galex-713>
I thought of them as debugger commands, like in gdb
<galex-713>
I’m more used to C than cl
<phoe>
wait, a superclass of all these classes?...
<phoe>
I don't think DEFCLASS works this way
<galex-713>
with defclass you can only (re)define a class according its definition and the superclasses you give
<galex-713>
what I mean is like you define a new class, which would be the intersection of several classes so that it automatically is the superclass of all these a posteriori
<galex-713>
just like a subclass is the union of its superclasses
<phoe>
hmmmm, you could in theory hack the MOP to get something like that
<phoe>
but then you'd also need to take care to only mutate the classes that you are allowed to mutate
farooqkz__ has quit [Ping timeout: 240 seconds]
liberliver has quit [Ping timeout: 256 seconds]
<galex-713>
or defining a standard behavior wrt redefining
<galex-713>
just as clos do
<jackdaniel>
I don't understand what it means, that it is "automatically a superclass of all these a posteriori"
shidima has quit [Ping timeout: 264 seconds]
<galex-713>
rpg: what if structures are aligned and that turns up to just be a structures of structures (so there is overhead, but not as much), while letting the API be the same?
<galex-713>
jackdaniel: automatically IS a superclass of all these retroactively
<Bike>
"union" and "intersection" aren't quite right. superclasses have an order among them
<rpg>
galex-713: I suppose, but I believe that the intent was to give structs the efficiency that objects lacked...
<jackdaniel>
class hierarchy create a directed acyclic graph
<galex-713>
Bike: because they can overlap, but that is an issue with union, not intersection
<jackdaniel>
you may add one class as a superclass of some already existing class with mop
<Bike>
not because they can overlap. it also matters for finding relevant methods.
<Bike>
not JUST because they can overlap, i mean
<galex-713>
jackdaniel: okay so a mop thing
<Bike>
i don't know why you'd want to do this, anyway
<jackdaniel>
check out stealth-mixin library which allows adding a superclass to a "victim class"
<galex-713>
Bike: isn’t it because methods applicability can also overlap?
<jackdaniel>
but no unions / intersections
<jackdaniel>
just what it is said to do
<galex-713>
Bike: I don’t know either, I just like symetry, and it looks not infeasible
<galex-713>
jackdaniel: oh there’s a library? thank you
<phoe>
Lisp type unions/intersections are symmetrical but Lisp class unions/intersections are ordered and therefore asymmetrical
<Bike>
say you have classes A and B and C. you do this automatic definition thing to get AB s.t. A <: AB, B <: AB, and BC s.t. B <: BC, C <: BC. Then you define a generic function with methods on AB and BC and call it with a B.
<Bike>
now there has to be a decision about which method is more applicable.
<galex-713>
Bike: you do that by the topological order in which you specify the subclass in the automatic superclas definition
<galex-713>
wouldn’t that work?
<Bike>
er, what?
<Bike>
You mean depending on whether you specified AB as A, B or B, A?
<Bike>
I don't see how that would matter.
<galex-713>
yes
<Bike>
A and C don't even come into this.
<phoe>
galex-713: (defclass my-class (a b c d e f) ())
<galex-713>
it matters for defclass when you give several superclasses
shidima has joined #lisp
<phoe>
let's say that you want to insert a new superclass there
<phoe>
how would that work?
<Bike>
Yes, but then it affects the new class, not the superclasses.
<Bike>
The class-precedence-list, the linear list of superclasses, is a property of the class, not of its superclasses.
<galex-713>
phoe: at the end maybe?
<phoe>
galex-713: *maybe*?
<Bike>
well, anyway, i hope you can see this is a lot more complicated than symmetry
<galex-713>
I’m unsure, I feel like on a subset it’s feasible, I’m unsure how it would behave on special cases
<phoe>
what about (defclass my-other-class (f e d c b a) ())?
<phoe>
this is not special cases
<galex-713>
but that would be an important decision whenever trying to implement a such thing
<phoe>
this is basics of CLOS class precedence
<phoe>
and therefore method applicability
<Bike>
the need for this linear list is what makes this more complciated than unions and intersections.
<phoe>
^
<Bike>
for that we have the type system where you can easily specify intersection and union types.
<Bike>
but that's because method applicability isn't involved.
<galex-713>
oh wait I just got it thanks to phoe’s example
<Bike>
there are also some things with slots that would be non obvious. For example if one class has a slot that's an instance slot and the other has a slot with the same name that's a class slot.
<galex-713>
phoe: concatenation of matching subset of ordered list of superclass, would it work?
larme has quit [Quit: WeeChat 2.3]
<galex-713>
so (defsuperclass my-superclass (my-class my-other-class)) would have no applicable method
<phoe>
no applicable method for which generic function?
<galex-713>
for any, unless you define it for my-superclass
<jackdaniel>
galex-713: I think that you need to get at least some grasp of clos before making hasty suggestions
<phoe>
"concatenation of matching subset of ordered list of superclass" is a bit over my head
<phoe>
could you give me an example with MY-CLASS and MY-OTHER-CLASS that I mentioned up above?
<galex-713>
but given (defclass first (a b c d e f)) and (defclass second (a b d c e f)), (defsuperclass my-superclass (first second)) would have as ordered superclass list (a b e f)
<jackdaniel>
if I remember correctly, you've said that you have never used clos before
<phoe>
galex-713: so, basically, MY-CLASS and MY-SUPERCLASS would have what exactly as its ordered superclass list?
<galex-713>
jackdaniel: you are very likely right, I’m speculating, trying to mindplay with thing, I shouldn’t do that maybe…
<phoe>
would it be (A), (B), or (F)?
<phoe>
or maybe (C)
<phoe>
since these are the only kinds of ordered subsets you're gonna get from that one
<Bike>
i mean, it's fine. mop is designed to let you do weird things with clos, and is itself unfinished.
<galex-713>
my-superclass would have no superclasses at all
<jackdaniel>
you could, but I personally would not engage all channel participants with speculation without trying to understand what I want first
<phoe>
^
<galex-713>
but my-class would have (a b c d e f my-superclass) and my-other-class would have (f e d c b a my-superclass)
<galex-713>
phoe: oh wait you’re right, it’s not empty, it’s each of them
<phoe>
this in turn sounds like stealth-mixins that jackdaniel mentioned
<galex-713>
yes, that must be that
<galex-713>
I understand now how the problem is difficult and non-trivial
<galex-713>
I’m grateful to you to have made me understand why, despite my inexperience about clos
<galex-713>
it was tickering my head
<galex-713>
same thing for structs
<galex-713>
thank you :)
<phoe>
gee, how many things get complicated when you introduce a simple linear order on a set
<galex-713>
oh, do you know if there is a such thing such as data, or even compound data inlining within struct?
<galex-713>
so that to reduce the amount of pointer to dereference to access an element of a data structure of a member of a struct?
<phoe>
AFAIK yes but it's not going to be as efficient as in C by default in order to preserve object identity.
<phoe>
I remember that aeth was discussing this here someday
<galex-713>
oh, but is there a way to throw away object identity?
<galex-713>
and kinda get use of the eq/eqv distinction?
<galex-713>
like eq could never work but maybe eqv would work as equal (without going deeper than the most shallow level)
<phoe>
what's eqv?
<galex-713>
oh uh eql sorry
<galex-713>
eqv is an emacsism
<phoe>
EQ is, in very plain terms, pointer comparison
dsl` has joined #lisp
<galex-713>
oh no it’s not
<galex-713>
phoe: I know
shidima has quit [Ping timeout: 264 seconds]
<phoe>
and because small integers and characters are allowed to be stored inside pointers but also may not be stored there, it means that EQ may not work well on those
<galex-713>
no no I meant eql
<galex-713>
yes I know that
<phoe>
EQL is EQ that is additionally well-defined on numbers and characters.
<phoe>
that's all.
<phoe>
there's also EQUAL and EQUALP and = that mean different things, too.
<galex-713>
but is there a way to declare something so that you declare a member of a struct as, say, a cons, so that eq won’t work anymore on it, though eql would, but it would only compare its car and cdr, not going deeper (contrarily to equal)
shifty has joined #lisp
<galex-713>
it could be a cons or an array or any compound data structure
<phoe>
there's a concept of places in Common Lisp that works sorta similarly to what you describe
<galex-713>
places? isn’t that the setf thing?
<phoe>
it is, I'm thinking out loud now
<galex-713>
initially I thought there was a trinary separation between variable, place and value, and that each involved a pointer
<rpg>
galex-713: Note also the presence of the :type LIST opeion
<phoe>
but no, I don't think that you can tell Lisp to do things like that without breaking object identity in some way; for simple tagged structures like conses it might work, but for more complex objects that require having headers in memory that's going to break
<galex-713>
rpg: yes but I guess it won’t be inlined, especially as I don’t see a way of indicating the “fixed size” of a list, and it looks a dumb thing to do
gaqwas has joined #lisp
gaqwas has quit [Changing host]
gaqwas has joined #lisp
<galex-713>
phoe: but what if I’m *okay* to break object identity?
<galex-713>
I guess no implementation do that, right?
<galex-713>
give a way to break object identity
<galex-713>
anyway it’s not in standard I’m sure now
<phoe>
galex-713: I think no implementation does that
<galex-713>
given the diff to cltl I got here
<galex-713>
okay
<galex-713>
this looks an interesting problem
<galex-713>
my friend would be interested
<phoe>
I mean, you could cheat by explicitly allocating foreign memory, but that's only going to give you foreign types + overhead for converting between Lisp and foreign worlds
<galex-713>
oh that too
bsd4me has quit [Quit: gotta go]
ayuce has quit [Remote host closed the connection]
<galex-713>
phoe: I’m intrigued by your connection with places… how do you see places?
<galex-713>
in common lisp
ayuce has joined #lisp
<galex-713>
and btw sorry, eqv is not an emacsism, it’s a schemism (the scheme equivalent)
satousan has joined #lisp
<phoe>
a place is something that can be read from and can be written to
<phoe>
it's an abstract thing, and sometimes a lexical thing, and a second-class citizen in CL
<galex-713>
how is it distinct from a value, or a variable/symbol?
<phoe>
a variable is kind of a place
<phoe>
(#clschool would be happy to have you)
<galex-713>
(why that?)
<phoe>
(that's a basic Lisp question and #clschool is designed exactly for that sorta questions)
<galex-713>
I’m not interested in cl because I got how it is defined so how it can work, or not work
<galex-713>
I’m interested in how you see it
<phoe>
other examples of places include CARs and CDRs of conses, AREFs of arrays, ELTs of sequences, GETHASHes of hash tables with given keys, SYMBOL-FUNCTIONs of functions, etc..
<galex-713>
because it looks like how I saw it when first discovering lisp
<galex-713>
mmh
<galex-713>
okay I see
FreeBirdLjj has quit [Remote host closed the connection]
<galex-713>
no your vision of it is perfectly correct so I don’t understand why you made a connection I would have made before and wouldn’t anymore now I got how it work
<galex-713>
*works
<galex-713>
oh
<galex-713>
OH
<galex-713>
I got a design flaw in what I was thinking about
<galex-713>
lisp functions only returns pointer
<galex-713>
wait
<galex-713>
hm…
<phoe>
you can write most of these things in a single line, you know
<galex-713>
sorry, indeed, you are right, I’m too quick to type return while I think, instead of afterthought, thank you for the notice
<galex-713>
okay my idea is definitely complex to implement, but doable, and not definable according current standards
Inline has quit [Ping timeout: 264 seconds]
<galex-713>
are there or were there cl implementations that optimized so much so as to stop storing the size of arrays?
<galex-713>
for instance if som eprogram never asks for it, and because it keeps it in some data elsewhere and doesn’t need one per array
<phoe>
that would have to be nonstandard because ARRAY-DIMENSIONS must return a meaningful value
<galex-713>
I’m talking of optimization
<Bike>
well, it would be fine if array-dimensions etc aren't called. however it would be hard to impossible to maintain this across function boundaries
<galex-713>
yes this is obvious
<galex-713>
unless the function is really unsafe, but that particular unsafety ought to be declared as such and no such standard declaration exist
<Bike>
which is most of where you'd want this.
<Bike>
i mean, for some cases maybe, like if you have a constant array and access it only in one function
<galex-713>
yes
<galex-713>
I thought like imagine I have a datatype which is a list of arrays whose length change in a predictible manner
<galex-713>
for instance (a b c d) where a is #(nil), b is #(nil nil), c is #(nil nil nil), d is #(nil nil nil nil), etc. if you grow the list
<galex-713>
it would be space wasted to store the length each time if you can predict it
<Bike>
this sounds kind of exotic.
<galex-713>
since you can predict it, in some portion of program that access a such object, you would never call array-dimensions, nor length, etc.
<phoe>
you're talking about saving one word per array this way
<galex-713>
Bike: indeed it is, but it is one of the possibilities that makes C lower level than lisp in the sense that it can do some things that lisp couldn’t
<galex-713>
phoe: yes, that’s picky
<phoe>
I mean, you can go down to assembly level in SBCL or CCL and program this yourself
<phoe>
so it's not like lisp can't do it
<galex-713>
assembly is non-portable
<Bike>
i don't understand what you're trying to get at here.
<phoe>
but seriously why
<galex-713>
I have a friend who find lisp not low-level enough
<galex-713>
Bike: I know someone else who defined a language that allows to *specify* that kind of low-level memory nitpicking in a turing complete way, his language/software is called Poke
<galex-713>
*GNU Poke
paul0 has joined #lisp
<galex-713>
it’s kinda a binary data debugguer/reader/disassembler/tweaker
<phoe>
that's no longer Common Lisp territory though
Lord_Nightmare has joined #lisp
<galex-713>
phoe: right
<phoe>
#lispcafe awaits!
* phoe
afk
gaqwas has quit [Remote host closed the connection]
<aeth>
I leave out some of them (like Common Lisp macros preferring TAGBODY and Scheme macros prefering tail recursion... also Schemers prefering hygienic macros... well, maybe I should add something for that) that are irrelevant for the project of implementing Scheme in Common Lisp.
luna_is_here has joined #lisp
<aeth>
I put it all in CONTRIBUTING.md because it's quite possibly the only project where knowing the differences between Scheme and Common Lisp is relevant and almost a prerequisite for contributing. :-)
CEnnis91 has quit [Quit: Connection closed for inactivity]
luna_is_here has quit [Client Quit]
karlosz has joined #lisp
notzmv has quit [Ping timeout: 246 seconds]
ggole has quit [Quit: Leaving]
<pve>
Hi, I wonder if someone could shed some light on how conses are (generally) represented in memory. I'm looking at the output from (room) on SBCL, and dividing the number of bytes (used by conses) with the number of cons objects gives me 16 bytes.
<pve>
so does that mean a cons in this case is simply 8 bytes for the car and 8 bytes for the cdr?
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
<White_Flame>
pve: yes. The type is encoded in pointers _to_ the car
<galex-713>
aeth: oh seems awesome!
<galex-713>
eeeer, why does that page need javascript u.u
<galex-713>
hate modern web
<White_Flame>
if you disassemble CONSP checks, it hcecks to see that the pointer's low 4 bits has the value 7
<pve>
White_Flame: hmm, ok
<White_Flame>
I believe the allocation granularity is 16 bytes (two 64-bit words), so the bottom 4 bits can be used for tagging
<White_Flame>
so if you know it's a cons pointer, the car is at [ptr-7] and cdr is at [ptr+1], since the pointer already contains an offset of 7 for the tag
<pve>
White_Flame: thank you, so would a fixnum sit directly in the car? (i'm not super familiar with this stuff)
<White_Flame>
yes, fixnums have a low 4 bits of xxx0, and all other types use xxx1. So the fixnums can use 63 bits of the 64-bit word
<White_Flame>
and are shifted left 1 bit, so plain adds/subtracts/etc can work directly without masking off a tag
karlosz has quit [Read error: Connection reset by peer]
<galex-713>
aeth: interesting, thank you :)
<White_Flame>
fixnums, characters, and single-floats all reside literally in a word without indirecting
07EAAIGLB has joined #lisp
<White_Flame>
double-floats have to be boxed, as they require the full 64 bits of a word, and obviously multi-word elements are always pointed to as well
<pve>
ok great, this brings me to my second question: when I do (defclass kons (car cdr)) and allocate a long chain of them with fixnums (< 100000) in the car, i get something very close to 48 bytes per kons instance
<pve>
does that sound right?
<White_Flame>
well, the allocation reporting is probably rounding up to whatever block size it uses
edgar-rft has joined #lisp
<White_Flame>
but for an object instance, that'd be 6 words per, which probably isn't that bad?
<White_Flame>
obviously 2 words for the data, but 4 words of overhead does smell a little high. I think structs only have 1 word of overhead
orivej has joined #lisp
<pve>
yeah, I'm just curious if I messed something up
07EAAIGLB has quit [Read error: No route to host]
<Bike>
a standard object is probably going to indirect its slots in a vector, plus there's a link back to the class somehow, and possibly more header
karlosz has joined #lisp
<White_Flame>
pve: I do default to structs, and only move to defclass if I really need it, to keep things lightweight
<Bike>
so four words of overhead could be the object header, pointer to the class, pointer to the slots vector, vector header
luckless_ has joined #lisp
gaqwas has quit [Remote host closed the connection]
<pve>
ok, thanks guys, very informative as usual
luckless has quit [Ping timeout: 240 seconds]
dominic34 has joined #lisp
karlosz has quit [Quit: karlosz]
dominic34 has quit [Ping timeout: 256 seconds]
gaqwas has joined #lisp
gaqwas has quit [Changing host]
gaqwas has joined #lisp
orivej has quit [Ping timeout: 256 seconds]
orivej_ has joined #lisp
<aeth>
galex-713: If you *really* want to hate the modern web and Gitlab in particular, try using Gitlab's snippits (pastebin-esque) system. I used it for > 1.5 years after lisp paste shut down, but it's now entirely unusable for about 4 months because the dumb text input is gone
<aeth>
Now, it has a "smart" editor that reindents anything that you paste into it, and has no knowledge of Lisp, thus ruining any code you paste into it.
<aeth>
There is no way to disable it.
<aeth>
I think I'll just make a git repository next time I need pastebin-like functionality, and maybe I'd link to the /raw/ which doesn't appear to require JS
terpri__ has joined #lisp
akoana has joined #lisp
terpri__ is now known as terpri
terpri_ has quit [Ping timeout: 256 seconds]
gaqwas has quit [Remote host closed the connection]
gxt has quit [Quit: WeeChat 2.9]
galex-713 has quit [Read error: Connection reset by peer]
galex-713 has joined #lisp
orivej_ has quit [Ping timeout: 256 seconds]
orivej has joined #lisp
enrio has quit [Ping timeout: 260 seconds]
mokulus has quit [Ping timeout: 256 seconds]
akoana has left #lisp ["Leaving"]
mankaev has quit [Ping timeout: 246 seconds]
satousan has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #lisp
ayuce has quit [Ping timeout: 256 seconds]
orivej has quit [Ping timeout: 260 seconds]
orivej has joined #lisp
pve has quit [Quit: leaving]
orivej has quit [Ping timeout: 265 seconds]
orivej_ has joined #lisp
zmt00 has quit [Ping timeout: 240 seconds]
luna_is_here has joined #lisp
luna_is_here has quit [Client Quit]
gravicappa has quit [Ping timeout: 265 seconds]
orivej has joined #lisp
ayuce has joined #lisp
orivej_ has quit [Ping timeout: 256 seconds]
luna_is_here has joined #lisp
terpri has quit [Ping timeout: 240 seconds]
sjl_ has quit [Ping timeout: 246 seconds]
shifty has quit [Ping timeout: 240 seconds]
terpri has joined #lisp
terpri has quit [Ping timeout: 260 seconds]
cosimone has quit [Quit: Quit.]
orivej_ has joined #lisp
terpri has joined #lisp
caltelt has joined #lisp
CrazyEddy has quit [Ping timeout: 240 seconds]
orivej_ has quit [Ping timeout: 256 seconds]
orivej_ has joined #lisp
<dim>
if you're after a self-hosted web git thingy I've been told nice things about https://gitea.io/en-us/
orivej has quit [Ping timeout: 256 seconds]
hhdave has quit [Ping timeout: 256 seconds]
ahungry has quit [Remote host closed the connection]
terpri_ has joined #lisp
ebrasca has quit [Read error: Connection reset by peer]
SenasOzys has quit [Read error: Connection reset by peer]
terpri has quit [Ping timeout: 240 seconds]
ebrasca has joined #lisp
orivej_ has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
akoana has joined #lisp
terpri_ has quit [Ping timeout: 240 seconds]
ayuce has quit [Read error: Connection reset by peer]
zigpaw has quit [Ping timeout: 240 seconds]
orivej has quit [Quit: No Ping reply in 180 seconds.]
satousan has quit [Quit: WeeChat 2.3]
<z3t0>
hi
zigpaw has joined #lisp
orivej has joined #lisp
<dra>
Hi z3t0!
<z3t0>
how is lisp land these days! I've been out of touch for a few weeks playing with freebsd