freenode/#lisp - IRC Chatlog
Search
23:16:16
Bike
types just represent sets. (member 4 5 6) is the type of numbers that are 4 or 5 or 6. you can always augment a type with OR and MEMBER and stuff. so no, they don't involve inheritance per se.
23:27:18
charles`
I see, then how would I get a list of super-classes (of a class) in a portable way?
23:29:12
alandipert
typep seems like the ultimate method specializer, i wonder why there's only eql. perf?
23:30:14
alandipert
hm, i suppose also the infinitude of the type relationships might make method selection too ambiguous
23:37:43
Bike
alandipert: that's the problem, yes. classes are linearly ordered into class precedence lists, so it's easy to see which methods are more specialized than others.
23:38:39
Bike
for example if you had a method specialized on (member :a :b) and another on (member :b :c) and you called it with :b it would not be obvious what is called.
23:41:51
Bike
you can't have two distinct methods that have the same qualifiers and the same specializers.
1:05:18
nij
It's nice to be able to define printing function for cl-structs. However, sometimes I want to see its raw presentation (record-like). Can I temporarily disable the printing function?
3:00:26
antonv
in ASDF, if my system consists of several files, each file depends on differend libraries
3:22:59
fiddlerwoaroof
There's some examples here: http://christophe.rhodes.io/gitweb/?p=specializable.git;a=tree;f=examples
7:28:09
beach
asarch: I would probably use BIT and test for 0/1. Otherwise, you get a full word for each value.
7:32:37
beach
Like I said, if you want NIL, you get a full word for each element. You can do that if you want, but the element type would then be T.
7:34:37
beach
If your choices are 0 or 1, I don't see what the problem is, and I don't see why you would choose NIL.
7:35:07
beach
If you want NIL in there, then since NIL is a symbol, you will have an array of element type T.
7:35:32
beach
It is very unlikely that your Common Lisp implementation has a Boolean element type for arrays.
7:43:06
asarch
One last stupid question: how would I get a full-created array with the 35 elements with nil so I could randomly (setf (elt my-array some-random-index) t)?
7:43:44
asarch
I got: "Invalid index 3 for (VECTOR T 35) with fill-pointer 0, should be a non-negative integer below 0."
7:46:08
asarch
I do (setf (elt my-array 3) t) and I get: Invalid index 3 for (VECTOR T 35) with fill-pointer 0, should be a non-negative integer below 0.
7:47:08
asarch
I use: (my-array (make-array the-size :adjustable t :initial-element nil :element-type 'T :fill-pointer 0))
7:48:45
beach
asarch: ELT obeys the fill pointer, so if you set it to 0, that means your array has 0 elements in it.
7:49:24
asarch
And mostly because I get: #(NIL NIL T T NIL T NIL NIL NIL NIL NIL NIL ...) is not an array with a fill pointer.
7:50:22
asarch
So, how would create an array with 35 initial element set it to nil with the possibility that the array could increase its size dynamically?
7:51:33
beach
You could use AREF which doesn't take the fill pointer into account, or you could not have a fill pointer.
7:53:56
beach
... or you can set the fill pointer to T when you create the array. Then it will be the same as the size of the array initially.
7:56:12
asarch
Array: #(NIL NIL T T NIL T NIL NIL NIL NIL NIL NIL NIL T NIL NIL T NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL)
8:45:07
ralt
anyone knows a library that can be used to send/receive file descriptors over unix sockets? Using ancillary data. I'm fine if it's sbcl specific.