freenode/#lisp - IRC Chatlog
Search
9:22:19
beach
Actually, I do have a task for someone who would be interested in contributing to the SICL project. The FORMAT module is one of the first modules I wrote, and it is not particularly coupled to the rest of SICL, so it could be extracted to a separate repository. There are a few directives missing, so those are additional tasks to work on.
9:22:20
beach
And the directive interpreter exists, but the directive compiler should be written at some point. The current (huge) file format.lisp should be split up into several smaller files, probably with the code for one directive in each file. And a test suite is needed, probably mostly taken from the ANSI test suite I would imagine.
9:23:59
beach
Two systems should be supplied, one for "intrinsic" use, i.e. in a system that does not already have FORMAT, and one for "extrinsic" use, i.e. for testing in a system that has FORMAT that we don't want to clobber. Each system should have an appropriate package definition.
9:24:59
beach
It would be possible for a relative newbie to take on this task, in which case, guidance will be provided.
12:38:43
phoe
;; debugger invoked on a SB-INT:SIMPLE-READER-ERROR: no dispatch function defined for #\/
12:51:25
lisp373
Hey guys, is there a way to undefine a method? I get the "attempt to add the method ... but the method and generic function differ in whether they accept" error
13:02:04
phoe
oh, right, (defgeneric foo ()) (defmethod foo (&key x)) is going to error on DEFMETHOD
13:02:38
beach
Right, but what if the generic function is reinitialized with a different argument list.
13:54:10
puchacz
I am happy with slime, but as usual - maybe I am missing something I don't even know about
13:55:47
contrapunctus
New to CL...not a fan of how the number for ABORT* changes in different situations. I'd rather have numbers for common restarts in the beginning 🤔
13:56:16
phoe
contrapunctus: multiple ABORT restarts may mean different things, that's why there's multiple
13:57:23
phoe
beach: I know you're jaded, but that comment actually brings nothing to the discussion
13:58:44
contrapunctus
I mentioned CL21, so some CL users said that the changes they want can't be made as libraries. So I suggested making a revised community standard.
13:59:27
phoe
1) someone needs to actually go and do that, and these people are either gonna be volunteers or someone finds a funding source
13:59:40
phoe
2) someone needs to actually go and have implementers adopt it, and these people are either gonna be volunteers or someone finds a funding source
14:00:13
beach
phoe: You forget that those people have to be competent in language design and compiler design.
14:02:31
phoe
but then again, we're talking about a new one whereas the old one is still heavily unmaintained and there's no good user-facing CL documentation that isn't a book or the good ol' CLHS that is not meant to be user-facing documentation
14:03:30
phoe
once we have that, we can create a separate version that is not *the* specification but is actually useful because it contains better examples and bugfixes and what not, and then implement WSCL on top of that
14:04:48
phoe
and then, only then, when we have a good and nice stable base, we can possibly think of making an unstable branch of Common Lisp that's called Uncommon Lisp or whatever that can then be a place for further language evolution and experimentation
14:05:04
contrapunctus
I figured the actual hard part would be getting people to agree on the changes.
14:05:32
phoe
it is a task so impossible that the only viable strategy is to get no one to agree and just do the changes oneself
14:05:53
phoe
that's why we have UIOP:QUIT, the only reasonably standardized and ubiquitous way of quitting a Lisp image
14:05:57
beach
contrapunctus: I don't think it will be hard to get them to agree on WSCL, because the changes suggested are already implemented in most implementations.
14:05:59
puchacz
phoe: as a matter of naming, there was/is an Uncommon Lisp library - a web thing that uses continuations in an interpreted subset of Common Lisp.... so here you go, Common Lisp extended
14:08:09
contrapunctus
beach: that's great, and I'm sure it meets the needs of at least some users if it was implemented and you were motivated to specify it. But the fact that it's already implemented means it is by definition not something that those people wanted...so there's room for more 🙂
14:08:17
beach
contrapunctus: But, since you are "new to CL", you don't know that this issue is being discussed roughly once a month or so, typically suggested by people who have absolutely no idea why Common Lisp was created the way it was, no idea what any of their suggested changes would have as consequences to the ability to compile the language, etc.
14:08:36
phoe
contrapunctus: WSCL is actually already implemented a real lot, like, implementations do common sane things in many of these cases
14:08:46
contrapunctus
beach: oh, I'm not suggesting any changes myself. It was some folks who were more experienced than me.
14:10:04
beach
contrapunctus: So the essence of my counter argument is that most people use languages on a daily basis that don't even HAVE a standard. So why do they suddenly want every feature to be standardized for Common Lisp. Why not use a library that is widely agreed upon?
14:11:03
beach
contrapunctus: Maybe it's not clear, but this issue is being discussed over and over again. All the experienced people here already know all the issues and have their ideas about them.
14:12:47
beach
I should stop. I am really not interested in participating in this discussion again today.
14:13:16
scymtym
contrapunctus: the SLIME debugger mode (sldb-mode) has keybindings for certain restarts: q - quit, a - abort, c - continue (press C-h m in the debugger buffer to see all)
14:14:25
phoe
the way forward is simple: grab your favorite Common Lisp implementation and hit it with a hammer until it behaves in this new way you'd like it to behave in
14:16:39
phoe
nowadays perhaps it's a similar situation, with threads, networking, GC/weakness, MOP, Gray streams being ubiquitous everywhere and standardized in a de-facto way via portability libraries
14:25:53
_death
many of these are immature or lacking, so we're better off without them being standardized for the moment
14:25:58
beach
phoe: A long time ago, I had plans to write a Common Lisp reference. Now I think such a thing would be better suited for a web site.
14:27:51
phoe
one thing is a modernized version of the language specification as-is without any fixes
14:28:00
phoe
another thing is a user-facing set of documentation describing the whole language with fixes to the text and examples and such
14:28:22
beach
Would you then separate the "specification" part from the "reference" part, or would it be just the reference?
14:28:54
phoe
I'd keep the two separate, because some people (most importantly, implementers) will ask the question "what does the specifiaction say?" whereas other people (most importantly, programmers) will ask "how does it work?"
14:29:54
phoe
someone suggested some system of comments "over" the original specification that can highlight the issues found with the original text
14:31:13
beach
Such a reference would need an entry for almost each operator, class, type, etc. in the specification, but the language would be much more helpful to a user.
14:31:35
beach
So one way of starting such a reference would be to solicit contributions in the form of individual entries.
14:32:23
phoe
once the original specification is wrapped into these new clothes, then contributions will be easy
14:32:40
phoe
the main pain is converting dpANS3 into some lispy format and then presenting this lispy format in some sane way.
17:40:41
mfiano
phoe: Did you figure out what you're going to do regarding the depressing situation?
17:44:19
phoe
the spec is owned by the community, ANSI CL is a derivative work of it, so is CLHS, so is Franz spec
17:46:53
phoe
it wasn't wrong, the copyright status of dpANS3 is highly dubious, because it's impossible to assert with 100% certainity that we get permission from *everyone* who participated in the discussion
17:46:57
mfiano
It mentioned something along the lines of dPANS never making it to the public domain, and explicit permission from the contributors must be obtained for derivative works.
17:49:24
phoe
the thing is that I think I can depend on kmp's intuition on the matter and go full "it's free real estate" on dpANS3
17:50:16
phoe
because the other option is literally writing a new specification from scratch that does not depend in *ANY* way on dpANS or ANSI CL
17:50:47
phoe
which will then be mistrusted, because it's not *the* spec or *the* standard that everyone's been following for decades.
17:51:31
mfiano
Not saying anyone would get sued, but if it does happen, that could be very damaging to a single user without the funds for a good lawyer.
17:51:50
jackdaniel
wasn't the last draft published precisely for sake of avoiding the copyright drama?
17:51:51
phoe
and anyway people will go "but what does The Specâ„¢ say" which will cross-pollinate with the new document anyway, casting more legal shadow on the new spec anyway.
17:54:11
phoe
CLUS was originally an idea of reformatting the specification and integrating errata into it
17:54:13
mfiano
I believe phoe wants to separate the spec from the reference for CLUS, modernizing the spec with fancy HTML and fixups
17:54:55
phoe
the language reference is doable mostly from scratch, sure thing, but the spec is the spec
18:04:20
jackdaniel
I'd just take dpans3 and assume it is public domain, splitting a hair in four will lead you to nowhere
18:05:06
jackdaniel
if you are not going to commercialize it, then it may be even in fair use territory
18:05:16
mfiano
Regardless, I think one of the contributors would have sent a cease and desist letter at some point to the many distributors of the dpANS documents if it was indeed an issue.
18:58:07
aeth
imo CL21 failed because it (1) was too radical (and a lot of it looked different just for the sake of being different), (2) was one person's tastes (not really consensus-based afaik), (3) oversold itself ("the true successor"), and (4) probably was inefficient (actually making a new Lisp implementation/dialect would let it be efficient)
19:02:13
aeth
But a few reader macros aren't really good enough reasons to bring in something huge and partially nonidiomatic as a dependency like cl21 or rutils.
19:06:37
aeth
Don't underestimate the effect of #4 on adoption, either. I think a lot of people using CL in 2020 are using it over alternatives because it is (or at least can be) fast.
19:07:12
aeth
If you make it into just another scripting language with no concern for performance, it doesn't offer much over scripting languages with huge communities like Ruby or Python.
19:11:43
aeth
I think another thing new "standard libraries" in CL get wrong is that they do things backwards. They do the library and then expect applications to follow, rather than deriving the library based on what their applications actually need.
19:13:07
aeth
Standards should follow use, ideally quite a few different use cases from different parties.
19:13:35
phoe
there's this weird thing that modifying Common Lisp requires one to modify the standard
19:13:44
aeth
I could be wrong, but most of these "new standard library" libraries tend to just look at cool features from other languages to borrow/steal
19:15:59
aeth
e.g. I used to bring up short-float being too precise to use IEEE half-precision floating point as an example, but someone pointed out that the actual standard says "Recommended Minimum Floating-Point Precision and Exponent Size", so implementations actually can just use hardware short-float if they want and they're just lazy.
19:17:02
pve
I'm super guilty of "borrowing from other languages", but I believe I have realistic expectations regarding adoption
19:22:04
pve
i actually made a working hindley-milner implementation in CL, but never got around to polish it up
19:22:21
aeth
phoe: yeah, but (1) it's probably not compatible with the choices I had to make to make Scheme work on CL and (2) I'd rather do language integration at the ASDF level with different extensions than do the #lang foo thing.
19:23:18
pve
but that was a long time ago, then later decided to do smalltalk and it's looking much better
19:25:41
aeth
pve: well, it's not ready yet... but I will have it. https://gitlab.com/mbabich/airship-scheme
19:27:15
aeth
(1) I use %scheme-boolean:f, which is just a constant that evaluates to '%scheme-boolean:f, as the false value. Since in most CLs, NIL is just a symbol not treated specially, it shouldn't really hurt performance, but it separates nil from #f
19:28:14
aeth
(2) I invert case to maintain almost all compatibility in a case-sensitive language. Idiomatic CL is writing lower-case that gets automatically upcased, and idiomatic most-other-languages (that don't use camelCase at least) is just writing lower-case that is preserved as lower-case, so this is the easiest interop
19:29:39
aeth
(3) I'm going to have (iirc, I left it broken from a partial refactor a while back) a minimal "runtime" that guarantees tail recursion (with a trampoline) and continuations (transforming the Scheme via macro to continuation-passing-style). Any CL entry point will handle this, as well as turning #f into nil
19:30:17
aeth
(4) On the CL side, I have two macros, define-scheme-procedure and define-scheme-predicate, where the difference is that the latter turns NIL into #f (i.e. %scheme-boolean:f) while the former treats NIL as the empty list.
19:32:52
aeth
(5) Scheme libraries are going to define both an ASDF system and a package for that ASDF system. Since Scheme is a Lisp-1, imports will rebind in a top-level LET. The only issue I see with this is that the symbols in e.g. lists will be namespaced to where they were defined.
19:34:28
froggey
I'm curious, why a symbol for false instead of a more anonymous object? like (make-instance 'standard-object)
19:34:58
aeth
froggey: A symbol for false is exactly how CL implementations operate: a symbol for NIL, which is false (and the empty list) so it will basically behave identically.
19:36:41
aeth
Oh, and (5b) I Lisp-1-ified the DEFTYPE because defining a Scheme type also defines a predicate of the same name, and the names all end in ?. This is because portable Scheme is basically "predicately" typed, e.g. the pair? type, tested with the pair? predicate)
19:38:23
aeth
phoe: Portable Scheme doesn't really have a type system like CL's, it just provides a bunch of predicates to test for if something is of that type or not. So I could have called it something like pair or scheme-cons (or even just cl:cons, it's the same thing) and put it in the same type namespace as CL's, but I decided to call it pair?
19:41:18
aeth
That is, it generates (deftype pair? () 'cons) and I could even just do (defun pair? (obj) (typep obj 'pair?) but I made a special case for when a predicate already exists (i.e. CONSP) just in case that's a faster path in the CL compiler (and if the type winds up being a SATISFIES type, things might go exactly backwards).
19:43:33
aeth
And the Scheme itself will generate something (for now, not final) like (defun r7rs::pair? (continuation obj) (funcall continuation (pair? obj)))
19:44:51
aeth
phoe: There are basically three ways the types could work. One is a DEFTYPE with a generated TYPEP predicate, another is an efficient DEFTYPE with a built-in predicate (like CONSP) that should be identical, and the third way is a predicate that's efficient with a SATISFIES in the DEFTYPE.
19:46:37
aeth
I'm actually pretty happy of some workarounds I found to avoid SATISFY types where you think they'd be necessary. e.g. even though it looks like zero? is just an ordinary predicate and not a type one, I actually define an efficient type for it, at least afaik. (define-scheme-type* (zero?) zerop `(or (real 0 0) (complex (real 0 0))))
19:47:12
aeth
That is, zero? is the predicate ZEROP and the corresponding efficient type is the real from 0 to 0 inclusively or the complex with both parts from 0 to 0 inclusively.
19:48:17
phoe
"The imaginary part can be a float zero, but can never be a rational zero, for such a number is always represented by Common Lisp as a rational rather than a complex."
20:02:09
aeth
pve: I have an advantage in that I'm translating a small specified language into a similar large specified language.
20:03:48
aeth
I don't have to design and implement at the same time, I just have to implement, and it's mostly about solving the mismatches.