libera/#commonlisp - IRC Chatlog
Search
4:11:58
char
the following doesn't work (end-of-file). I don't understand why the output isn't being read.
4:25:10
beach
It looks to me like you need to make your output go to the input stream of the echo stream.
4:48:55
kakuhen
and iirc this same library also offers a relatively portable way to make "fd-streams"
4:54:19
beach
jcowan: We can't know that all those function should be changed. The reason I am making individual issues is so that each one can be discussed and voted upon separately.
4:55:05
beach
jcowan: But thanks for the list of candidates. It saves me a lot of work going through each Common Lisp HyperSpec page.
6:10:11
moon-child
'Prima facie these are all candidates for adding type-error for each wrongly typed argument' barring constructors and predicates, and a couple of other fun ones like constantly
6:15:42
spiaggia
By "barring", do you mean that they are not (yet) on the list, or that they are and they shouldn't be?
6:21:51
phantomics
Hi, a question. I can't create subclasses of built-in CL classes like simple-array, so is there any other way of creating an array that has some specialized metadata that it carries with it but which functions as a standard array in all other respects and can be arefed and measured without the code doing so needing to be aware of its special type?
6:24:22
hayley
You could put the metadata in a weak hash table, but of course that is not in the array, and it is not reflected in the type system.
6:24:56
phantomics
That's what I've been doing, created a big hash table whose keys are the actual arrays I'm keeping track of
6:28:08
flip214
phantomics: you could have a few reserved elements in your array - eg. at the beginning. (Perl would allow to specify a negative start point for the indizes; CL doesn't, sadly.)
6:28:13
moon-child
I thought you were still not going to allow user code to subclass them, for portability reasons?
6:29:17
phantomics
flip214: the problem with that approach is that I want these arrays to be usable with any old CL code outside the system without someone having to make special allowances
6:29:32
moon-child
Hm. I thought you had said you were going to add a special-case to prevent that. I must be misremembering
6:30:52
phantomics
Currently, the arrays April generates are completely standard Lisp arrays, you can aref them, take their size and dims like any other array. If I wrap the contents in another array structure containing metadata it'll defeat that purpose, I might as well create a special class containing the array and its metadata at that rate
6:31:26
spiaggia
moon-child: In fact, I think it would be a good idea to expose the mechanism by which I create specialized arrays, so that someone who wants an array of (say) 24-bit integers can do that. It is basically a matter of defining the transformations CST-AST-HIR-MIR and associated classes.
6:32:44
flip214
phantomics: you could make the visible array displaced, and keep the metadata in the array the visible one is displaced to
6:32:45
phantomics
moon-child: I want to store something called the "array prototype." This sounds very strange, but an APL array will "remember" what its first element was if you shrink it to size zero, and if you then take that 0-size array and do a larger take of it, it'll reproduce its first element
6:32:49
spiaggia
moon-child: And, the SICL code should also be structured this way in fact. Currently, that's not the case.
6:33:09
flip214
but that makes a bit of difference - performancewise, and what you can do with that (displaced) array
6:33:59
phantomics
moon-child: if an array's first element is an array itself, the prototype will be an array of the same composition but with all its values set to the default for its type, like blanks for characters and zeroes for any other type. Hopefully that makes some sense
6:35:56
phantomics
moon-child: so for a 20x10 array with metadata, I could have the base array be a 201-element vector with the first element containing metadata, and then there would be a 20x10 array displaced to it with an offset of 1?
6:38:02
phantomics
If I have a fill pointer my understanding is that the (array-size), (aref) and other functions will still be aware of the array's full size, my goal is to have something that behaves just like an array for an external system that receives these arrays but has some special metadata
6:38:18
moon-child
though note for certain higher-rank array operations it is useful to pad the shape to have some alignment