freenode/#lisp - IRC Chatlog
Search
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.'
6:36:15
verisimilitude
Well, I'm of the opinion that anything that can be written in standard Common Lisp should be written that way is my point.
6:36:35
verisimilitude
Anything that can't that's still wanted should really try to support every known implementation, if it can.
6:37:32
verisimilitude
This isn't just something that's linking to some C library or something or another, is it?
6:37:36
jcowan
Okay, I was basically looking only for facts, and it seems to me that ECL is an important implementation.
6:59:24
jackdaniel
ECL works fine as a standalone implementation and as a shared object library. Regarding prevailing use, I'd suspect it is used as an implementation. That said ECL is a CL implementation available as a library (shared or static, depends on needs).
7:00:59
jackdaniel
(one perk of having it that way is a fact, that there are working application using Common Lisp on Android (where libecl is accessed via jni)
7:07:04
jackdaniel
there are more applications. I recommend taking a look at eql5-android project for examples if you are interested in something less than mere computations (i.e swank access, REPL and other things)
7:21:18
fouric
would someone quickly remind me how to check to see if an object is an instance of the class named by a given symbol
7:22:04
fouric
i already found that, tried both (typep 'class obj) and (typep (find-class 'class) obj)
7:23:55
fouric
so i read the class-name part and thought that i had the args in the correct positions but was passing in the wrong thing
7:29:33
jcowan
it breaks the idea that a type specifier is the name of a type, as a class is not its own name
7:43:00
phoe
And it's the only possible way when you have classes that don't have globally bound names. TYPE-OF instances of such classes have no name to return - so they have to return the class objects.
7:43:43
phoe
(defclass foo () ()) (defvar *foo* (make-instance 'foo)) (setf (find-class 'foo) nil) (type-of *foo*) ;=> #<class-object>
8:49:34
pjb
jcowan: If you have a CL program that doesn't work on a CL implementation, then it is VERY BAD. Because it means that you are at the mercy of the implementers of the implementations where it works. You are using implementation dependent behavior, and eg. the sbcl implementation changes every month! You are basically playing russian roulette every month with your program!
8:50:42
pjb
jcowan: now, you can mitigate the problem, by structuring your code into two parts, one module that is 100% conforming, and one module that is implementation dependent. This way, at least the 100% conforming module can run everywhere. Put the core functionality in there.
8:55:55
pjb
jcowan: notice that there is no type object in CL. Types are not first class objects in CL since they don't exist. Only type specifiers. Notice also that there are multiple type specifiers for a single type. For example: (member 42) and (integer 42 42) specify the same type. Now, clase objects ARE type objects! They're the only ones in CL. class names are type specifiers, but they have a real type object, the class object.
8:57:02
pjb
For example a string designer such as NIL designates the string "NIL". The string "NIL" designates the string "NIL itself too!
9:11:37
pjb
It's only because there is no actual type object in CL they use the term specifier instead of designator.
9:12:24
pjb
For example, for classes, there's the notion of class designator, since class objects exist.
9:12:40
phoe
So when you say specifier, I assume a type specifier, since that's the closest thing defined by CLHS.
9:13:46
pjb
Note the definitions for type specifier and class designator: both are of the form: "an X that denotes a Y".
9:14:29
pjb
The only difference, is that in one case, the Y is a first class lisp object, and in the other case, the Y is not.
9:30:10
phoe
I want to get a method that would get called if I called the GF with objects of these classes/specializers.
9:30:50
phoe
COMPUTE-APPLICABLE-METHODS won't help me because I have classes, not instances of these classes.
10:27:01
phoe
Is there a standard function that will return a copy of a list except for its Nth element being replaced by FOO?
11:25:56
pjb
phoe: (substitute-if :two (constantly t) '(0 1 2 3 4 5 6) :start 2 :end (1+ 2)) #| --> (0 1 :two 3 4 5 6) |#
11:30:51
phoe
Is (find-method #'print-object '() (list (list (find-class t)) (list (find-class t)))) a valid FIND-METHOD call?
11:31:15
phoe
I thought that (find-method #'print-object '() (list (find-class t) (find-class t))) was valid, but surprisingly, the former also works on SBCL.
11:32:21
shka_
phoe: no idea if it is valid, but using find-method with find-class t sounds like you wanted to use other method
11:32:50
phoe
My question is if using nested lists in FIND-METHOD's specializer argument is standard.
11:38:55
Bike
sbcl has some kind of internal "parsing" thing going on, so you can pass (eql foo) and stuff too
12:29:31
pfdietz
The standard does not require FIND-METHOD to signal an error if the specializers are malformed. It does if the specializer list isn't of the proper length, and errorp is true.
12:37:20
phoe
Hey. I just found a bug in my tests by finding a bug in my library by finding a bug in my tests.