freenode/#lisp - IRC Chatlog
Search
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.
11:56:10
dim
beach: I'm trying to find your protocol document pdf where you explain how to implement protocols first, you have authored such a doc right?
11:57:37
beach
I have a chapter of a book that explains what a protocol is. But nothing else I think.
12:02:02
dim
context: a friend of mine is trying to figure out how CL would approach the async situation that Python finds itself into nowadays, and I'm like, you know, we don't need any language-level decision making, any lib could do that
12:02:31
dim
you could easily have an async protocol or even just a protocol implementation that is async
12:03:29
beach
I am afraid I don't know what the "async situation that Python finds itself into" is.
12:05:36
jackdaniel
dim: do you mean a situation, where you have a protocol i.e for a mailbox, and that protocol could have a thread-safe implementation and a simpler implementation that works only in a single thread?
12:07:26
dim
beach: I'm still trying to figure out what my friend means here, it seems to be both a syntax issue and a semantics issue, where you have to use what the core developers of the language have designed
12:08:14
dim
in that case, methods have to be declared async and then return with the await keyword in their source, and the caller then must use another keyword to plug into the event loop of async stuff, if I understand correctly
12:09:00
dim
the most comparable thing to me would be providing the same protocol with both a sync and an async implementation and the caller would have to pick one at call time
12:09:55
dim
but I think my friend is curious more about the language itself somehow, well, let's be honest, I'm lost here ;-)