freenode/#lisp - IRC Chatlog
Search
9:25:29
heisig
What does #lisp think about having an extensible defclass macro? Or is there already such a thing?
9:26:07
heisig
The idea would be that the metaclass can decide what clauses are allowed and how they are handled.
9:27:46
heisig
For example, one could define default methods for (:metaclass structure-class) that expand the entire thing into a defstruct definition.
10:02:58
heisig
shka_: I know. But how do I pass additional arguments to my custom metaclass? By not using defclass?
10:06:48
shka_
ok, so you want to pass extra options to make instance called on your metaclass, right?
10:09:19
heisig
But I am not sure whether that is a sane thing to do. The spec doesn't allow it, so I guess there must be a reason.
10:09:35
shka_
well, i think that passing additional options in usual place in defclass may be portable enough
10:16:43
shka_
maybe you can simply add your own initialize generic function and simply call it manually
11:08:05
heisig
jackdaniel: Yes, shadowing CL symbols is not a wise move. I will either call it define-class or defclass*.
11:29:05
akater
Does SBCL do “translation to C” at any point to produce native code for ANSI CL? (I believe it's not but I'd like to make sure.)
12:28:01
akater
TMA shka_: I'm aware of basics when it comes to SBCL and ECL, I just happened to encounter someone spreading claims that Lisp is hopelessly dependent on C.
12:28:06
akater
As far as I understand, once you have something like SB-SYS:*LINKAGE-INFO* and corresponding infrastructure, and have your system bootstrapped, there is no need to rely on C at all.
12:32:46
heisig
akater: The SICL project has also made a lot of progress towards bootstrapping Common Lisp from Common Lisp. It does not contain a single line of C code.
13:45:51
jcowan
There are very few language implementations that are completely independent of C, unless (e.g.) they compile I/O operations into system calls rather than libc function calls.
13:47:28
jcowan
Also, C with libgc is rather a nice language, although I've only used it once so far (I was modifying a buggy C program that had its own very limited gc).
13:49:42
jackdaniel
is that person making an argument, that CL is a crappy language because C is a crappy language? :-)
14:02:08
pjb
being dependent on libc is not being dependent on C. libc can be implemented in any programming language. Including CL.
14:37:30
Posterdati
pjb: I have the manual too, seems that it accepts f(x1, x2, ..., xn), but not f(X) with X = [ x1, x2, ..., xn ]
14:53:26
pjb
Posterdati: but in C, the functions to minimize take a vector and a parameter (closure).
15:07:20
jcowan
pfdietz_: By "fat pointer" I was talking about a data structure of some sort containing a reference to a string (or any 1d array), an offset, and a length. Unless this data structure were known to the GC, there's no way it could reclaim inaccessible parts of the string.
15:53:08
pfdietz_
Right. I was mistakenly thinking there was no way to get the displaced-to of a displaced array.
15:53:58
pfdietz_
If there were no such way, they GC could be implemented to prune off the dead parts of an array. But the presence of that function means that's not possible.
16:24:26
p0a
I'm curious about this, is common lisp faring well with concurrency? I recall that's the weak spot, is that right??
16:25:15
p0a
then again not sure why a pthread wrapper wouldn't just do the trick (on the other hand, I have next to zero experience with concurrency)
16:29:48
jackdaniel
standard dictates what implementation must offer, implementations may provide more
16:30:09
jackdaniel
moreover there is a portability layer which unifies interface for basic functionality
16:31:02
jackdaniel
if you are interested in parallellism, you may be interested in checking out lparallel
16:31:55
jackdaniel
bordeaux-threads is a portability layer which maps onto implementation-specific threading (which, in turn, may use pthreads underneath; this is not important in usual case)
16:32:43
jackdaniel
maybe some scheme evangelist said something like: common lisp has a well-defined order of evaluating function arguments, that's why they can't be evaulated in parallel
16:33:09
jackdaniel
because you may evaluated arguments before applying to a function and that's all there is to it. abstracting it with macro is trivial
16:33:34
p0a
I see, so instead of (f g h) you want (f g* h*) with g* and h* the evaluated versions of g and h?
16:33:38
jackdaniel
and defined order of evaluation to a function is an adventage from the intuitivity point of view
16:35:39
jackdaniel
there is a lot of fear, uncerntainity and despair on the internet, rarely founded on a reality
16:50:17
p0a
np I helped you using my google skills, literally knowing nothing about the subject(s). :P
17:00:42
pjb
Using paper is saving trees, since the paper industry must replant trees to continue producing paper. If you stop using paper, then you kill trees!
17:29:30
jmercouris
dlowe: don't bring logic into this discussion, what do you think this is, some computer science channel?
17:30:18
jmercouris
just in case it is unclear, I am making a joke, and with that, signing off, goodbye everyone, and thanks for all the fish!