libera/#commonlisp - IRC Chatlog
Search
12:36:47
nij-
Is there anyway to let Climacs to read elisp and be augmented by packages written in elisp? The idea is that to attract more people temporarily, and gradually replace the packages by common lisp.
12:40:12
lisp123
nij-: I was thinking something similar, but different - write an elisp emulator in CL and port Emacs
12:42:01
nij-
E.g. some elisp package has effects on emacs buffer. So at least we need to coerce emacs buffer into climacs buffer?
12:44:06
lisp123
I was arguing with some people on r/Emacs but they noted that most of the more advanced elisp packages are already using a CL compatability layer
12:44:30
lisp123
So I wouldn't be suprised if there is an influx of package developers in the future
12:44:31
random-nick
nij-: I don't think that's very feasible, you'd have to emulate a lot of emacs internals for elisp packages to work
12:47:22
lisp123
For example, I am working a general framework for GUIs in SwiftUI (Apple), and if you create the APIs on both sides, you can have Lisp programmers write in CLIM and then have it displayed in Swift for example
12:48:22
nij-
Yeah lets just focus on the end effect. It's a temporary solution, just to let people switch to climacs without pain.
12:48:48
lisp123
The #clim guys are doing much more - canvas backends among other things. Then dbotton is doing CLOG
12:49:53
beach
nij-: (first) Climacs is not good enough. And Second Climacs is mainly meant to be excellent for editing Common Lisp code.
12:53:23
beach
Emacs packages rely not only on the Emacs Lisp programming language, but a lot on the architecture of Emacs, so you would have to emulate that entire architecture, which would mean you no longer have (first) Climacs or Second Climacs, but Emacs rewritten in Common Lisp.
12:54:50
beach
I think it is a much better strategy to make Second Climacs irresistibly good for Common Lisp programming, and then count on the users to perhaps rewrite their favorite Emacs packages for Second Climacs over time.
13:49:13
rotateq
no why do you ask? i cooked the meal recently, maybe working on something today, wee'll see. and you?
14:24:57
Guest4615
Hey so I am trying to write my own "plus" fnc which can addd a variable number of numbers
14:29:45
rotateq
yes here's often discussion about some more "advanced" topics or questions that lead to this
14:43:29
nij-
Steele's book "Common lisp, the language." feels easier to read than CLHS. However, I've heard that there's a difference between them, i.e. they do not specify the exact same language. Should I not read Steele, as many implementations are based on CLHS but not his book?
14:47:43
random-nick
cltl2 was released during the standardisation process and not all of its changes ended up in the CL spec
14:48:18
rotateq
and CLtL2 in 1990 :) even covers in the end a possible implementation for backquote, for which even Steele himself(!) claims that's it is all other than trivial
14:50:36
lisp123
otherwise you can buy the official standard from ANSI or read the hyperspec http://www.lispworks.com/documentation/lw50/CLHS/Front/Contents.htm
14:52:45
random-nick
there's this page linked from the cliki about differences between cltl2 and the final standard http://web.archive.org/web/20130807175341/http://bc.tech.coop/cltl2-ansi.htm
14:52:52
nij-
If it's the real standard, I might not care. // Does the real standard also has some difference between CLHS?
14:53:36
beach
nij-: You won't notice the difference. There are a few bugs in the Common Lisp HyperSpec, but not many and not very important.
14:54:07
random-nick
and the clhs is apparently a machine processed version of a draft of the real standard
14:56:40
beach
Right, but as scymtym's presentation for the online Lisp meeting showed, bugs were introduced in the translation process.
14:59:17
nij-
GASP.. "SBCL is a mostly-conforming implementation of the ANSI Common Lisp standard." Ok I guess that's life.
15:04:26
beach
nij-: It can be argued that 1. It is impossible to be entirely conforming because of (minor) bugs in the standard, and 2. It is not desirable to be entirely conforming because of some (silly) bugs in the standard.
15:19:10
phoe
3. it might be preferable to have e.g. unicode behavior rather than strict CL conformance with regard to lowercase-uppercase character mappings
15:41:02
semz
Afaik all deviations of CLHS from the standard are also pretty obvious. prog1 and prog2 are clearly not intended to do the exact same thing.
16:03:52
semz
There is also https://groups.google.com/g/comp.lang.lisp/c/LNWHPFfnCRA/m/hj0Cv9POmg4J for differences between CLTL2 and the standard.
16:46:50
nij-
After this form (https://bpa.st/ENAQ), is it correct to say that USER is a class, but USER is also an instance of a (meta)class MITO:DAO-TABLE-CLASS?
17:09:54
beach
Yes, but this was about finding metaclasses, not superclasses. So if you continue the CLASS-OF application, you will end up with STANDARD-CLASS.
17:10:50
rotateq
but I didn't see yet the :col-type slot keyword, maybe they changed the DEFCLASS macro
17:11:44
specbot
standard-direct-slot-definition: http://metamodular.com/CLOS-MOP/class-standard-direct-slot-definition.html
21:44:29
asarch
I have: (defclass foo () ((beer :initform 3))) and then (defclass bar (foo) ()) and I would like to have 6 as the default value of beer in bar. How can I do this?
21:47:05
asarch
Should I (defclass bar (foo) ((beer :initform 6))) or should I (defmethod initialize-instance :after ((instance foo)) (setf (slot-value instance 'beer) 6))?
22:31:45
asarch
How is better (in terms of efficiency)? (setf buffer (concatenate 'string buffer "…")) or just (setf buffer (format nil "~s …" buffer))?
22:34:13
hayley
Many Lisp implementations generate formatter functions at runtime, if the format string is constant.
22:39:17
sm2n
even if you pass a value to make-instance it will be overriden by your method in that case
22:40:50
sm2n
initialize-instance is more for doing things on new objects in general, for example putting them in a pool etc