freenode/#lisp - IRC Chatlog
Search
18:59:14
beach
MoziM: No, that looks totally wrong. And we don't write it "LISP" anymore. We write it "Lisp".
19:00:23
beach
MoziM: Common Lisp allows both assignments and sequences of forms (expressions to evaluate).
19:01:43
beach
MoziM: And the "value of a symbol" thing is wrong. Common Lisp uses eager evaluation.
19:03:15
beach
MoziM: But if you do (SETQ X (+ A B)), then the addition is computed once and the result is stored as the value of X.
19:11:27
jcowan
interestingly, Univac Lisp is a Lisp-1; that seems to be a common change for people reinventing Lisp from scratch
19:14:17
pjb
So, for who searched for a non-emacs editor, here is one, in univac lisp: http://www.frobenius.com/source.htm
19:14:30
pjb
So, for who searched for a non-emacs editor, here is one, in univac lisp: http://www.frobenius.com/editor.htm
19:20:59
jcowan
interestingly, it has a non-closed function constructor spelled LAMBDA, and an otherwise identical closure constructor spelled LAMDA (which is how it is spelled in Modern Greek)
19:34:54
phoe
What is the function that does the inverse of REMOVE? I want to keep all the elements instead of removing them.
19:35:27
phoe
I can do it via (remove-if-not (curry #'eql thing) list) but I wonder if there's a shorter way.
20:10:35
phoe
I have a class object. I want to remove it from the Lisp system altogether. No live instances of that class remain. Is it enough to call REMOVE-DIRECT-SUBCLASS on all of the direct superclasses of that class and remove all methods that specialize on that class?
20:14:16
LdBeth
phoe: for you question, I think the class is kept somewhere that FIND-CLASS can get it by it's name
20:14:58
phoe
I want to ensure that the class object itself is inaccessible. This means removing everything that links to it from CLOS.
20:40:04
LdBeth
interesting, so seems (setf find-class) to nil is sufficient, all the other things are mop specific, https://groups.google.com/forum/#!topic/comp.lang.lisp/hzQ7RRTK4Lg
20:46:38
flip214
phoe: alternatively just replace your class with one that has no slots - then all the accessors should become invalid at once
20:50:11
phoe
I don't think so. X is then a direct subclass of EMPTY, so there still is a strong reference.
20:51:14
flip214
why should it become a subclass? the (CHANGE-CLASS (FIND-CLASS 'X) 'empty) replaces the _class_ object with (an incompatible) object
20:55:02
phoe
(c2mop:class-direct-subclasses (find-class 'standard-object)) still has a reference to it.
20:55:57
phoe
try it out yourself: (defclass empty () ()) (defclass foo () ()) (change-class (find-class 'foo) 'empty) (c2mop:class-direct-subclasses (find-class 'standard-object))
21:02:53
flip214
my guess is the best we can do is some hack with CHANGE-CLASS - replace the class object with an empty one
21:05:05
phoe
Removing STANDARD-OBJECT as its direct superclass and SETF FIND-CLASS NIL are not enough.
21:08:28
flip214
well, with that SETF you should make it inaccessible. and if there are no more references, it should (might?) be gone at some later time
23:57:43
vms14
I saw a lot of posts of lisp fans saying with no problem that lisp is the best language
23:59:23
phoe
Lisp is just yet another programming language equivalent to almost all others by means of Turing completeness.
23:59:45
phoe
But it's nonetheless a pretty fun and useful one, at least for me, due to its nature of being very bendy and malleable.
0:01:00
phoe
vms14: good. 50% of all Lisp goodness comes from a proper interactive environment such as slime.
0:02:27
vms14
I really liked the first time I've tried emacs with elisp, how you have a file and you can directly execute parts of the file
0:03:52
vms14
I've tried quicklisp to install clx, It's failing when it tries to open connection to the display
0:04:43
phoe
vms14: Lisp and Unix are conflicting concepts. They don't exactly map to each other and the Lisp philosophy is richer than the Unix one.
0:05:15
phoe
In Unix, everything is a file and therefore a stream of bytes. That's a very primitive concept compared to Lisp's object-oriented and typed system.
0:11:41
vms14
this happens when I try to open the display, Xorg works with sockets in a server-client model
0:19:20
phoe
Could you try the example at https://rosettacode.org/wiki/Window_creation/X11#Common_Lisp ?
0:20:06
vms14
I had a lot of problems with libraries and stuff in some programming languages in netbsd
0:22:15
vms14
I know nothing and I guess it's a thing I'll appreciate when I'll understand the language
0:24:08
phoe
Lisp applications are made by bundling the Lisp runtime with each application, so a hello-world app may take multiple megabytes of size (which isn't an issue nowadays)
0:24:39
phoe
Even more if you decide to hand-write the hottest parts of code in assembly (which SBCL allows)
0:26:33
phoe
https://nl.movim.eu/?blog/phoe%40movim.eu/response2-to-5-reasons-why-why-lisp-games-suffer-cdt2CD
0:28:22
phoe
Myself I was stuck in the mindset that languages are immutable and you always need to adapt problems to languages, well, perhaps switch a language for a different one
0:28:40
phoe
And Lisp taught me that it's possible to bend languages to problems in addition to the other way around.
0:32:05
minion
vms14: 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).
0:32:14
minion
vms14: please see gentle: "Common Lisp: A Gentle Introduction to Symbolic Computation" is a smoother introduction to lisp programming. http://www.cs.cmu.edu/~dst/LispBook/
0:36:48
pjb
It uses scheme (it was titled "The Little Lisper" before scheme, but since it uses a lisp-1, it was renamed).
0:37:50
pjb
Actually, the videos were shot at HP, at a private course. But indeed, the teachers were from MIT.
0:37:56
phoe
As for recursion, the most basic example I can think of is https://plaster.tymoon.eu/view/1035#1035
0:39:38
equwal
The call stack carries the value around, but since you don't explicitly use it (like you would in FORTH) it confuses people.
0:39:49
pjb
(defun %len (lst res) (if (null lst) res (%len (cdr lst) (1+ res)))) (defun len (lst) (%len lst 0)) (len '(1 2 3 4)) #| --> 4 |#
0:43:55
equwal
Read the section in SICP where they go though how the tracing works and the way that the shape of it gives away the tail recursion or lack of it. Eventually you will be able to predict what the traces will look like and you'll be ready to go.
5:00:33
no-defun-allowed
i set up xmodmap to switch in and out of greek using alt-space and i realised i have little use for it ):
5:39:31
emaczen
Do we call #'cffi:foreign-funcall-pointer just like cffi:foreign-funcall but with a function pointer as the first argument instead of the string name?
6:02:33
jcowan
There are about 7000 languages, so nobody speaks more than a vanishingly small fraction of them
6:11:24
verisimilitude
The important thing about programming languages is most of them aren't worth learning, also.
6:17:03
jcowan
about one every two weeks, and the half-life at present is about 80 years (one maximum human lifetime)
6:22:02
jcowan
How bad would it be if a program ran on SBCL, CMUCL, and CCL, but not ECL. (No, it can't be made portable easily.)
6:30:45
verisimilitude
As a good baseline, you want to make a list of implementations and try to get something working on at least four or five before you release it.
6:32:13
jcowan
I definitely do not care about CLISP or ABCL (which won't work) and not much about the commercial CLs (which will)
6:33:41
verisimilitude
Well, I don't much care about the proprietary Common Lisps either, but I support them if it's feasible and I can learn how from the documentation.
6:34:13
verisimilitude
From my understanding, it's still true, but I don't necessarily have an up-to-date understanding.
6:35:16
jcowan
I prefer not to say at the moment as it is not mine, I am merely doing a bit of research.'