freenode/#lisp - IRC Chatlog
Search
16:17:09
heisig
shka_: Here is my first draft: https://gist.github.com/marcoheisig/ddf35ad94e51fe9c3e5980759ef0fb70
16:22:22
heisig
scymtym: Yes, there are plenty of potential tweaks. Also, I should overload more than just `C-c i'. But that was already enough of a digression for one day.
16:24:51
heisig
Also, I am not exactly proud of referencing a symbol from clim-internals. Is there a better way to check whether a frame is still alive?
16:51:57
scymtym
heisig: maybe http://bauhh.dyndns.org:8000/clim-spec/28-5.html#_1560 ? the states are defined at the top of the page
17:11:22
adlai
Oh boy, here I go bearing bad news again! ... if anyone both industrious and stupid wants to volunteer to maintain yet another library slipping towards gitrot, it appears that Anaphora has been soft-abandoned.
17:12:00
adlai
[ as hinted by the maintainer, at https://github.com/tokenrove/anaphora/pull/10#issuecomment-757917329 ]
17:13:41
adlai
ACTION has anaphoric macros all over scalpl, even occasionally wrote a few of his own, although already has the volunteer hands more than full with wondering wtf to do about chanl's brokenness, an issue that blocks returning scalpl to official inclusion in various automated distributions.
17:16:37
adlai
while we're on bad news of abandonment: Henry Baker's paper archive has gone offline, apparently along with the entire webserver that hosted it. Wikipedia is already linking to https://web.archive.org/web/20200212080133/http://home.pipeline.com/~hbaker1/ although I do wonder whether anyone has available an archive of just the signal, to save others the trouble of sifting through HTML noise.
17:31:52
jackdaniel
you know what would be cool? displacing (unsigned-byte 8) array to (unsigned-byte 32) so first four elements in the former go through the first element in the latter
17:36:24
aeth
Another thing CL is missing that implementations could add is optimized heterogeneous 2D/3D/etc arrays.
17:37:03
aeth
so e.g. an array where every row looks like: single-float (unsigned-byte 8) double-float (unsigned-byte 32)
17:37:50
aeth
If it could reasonably be done as an extension, it would be compatible with portable CL since it'd just be a regular T array for those other implementations
17:38:59
jackdaniel
I'm rewriting McCLIM clx renderer to always use xrender extension: https://i.imgur.com/3Kb4gmH.png ; that's why I've asked (I can't simply "cast" array even when I know that bytes are in correct order)
17:41:44
adlai
however, provided that the array is an unboxed array of structs with unboxed immediates, that could have quite low overhead, if you have lots of state per cell.
17:41:48
aeth
adlai: you can get close if you put a bunch of different homogeneous arrays inside of a struct
17:42:57
aeth
adlai: you can't have an element type of a struct, that's just going to be T, and semantically speaking, it's not going to work to have an array of a mutable element like a struct work in a specialized way.
17:43:31
aeth
Whereas what I described would basically be like structs if you wrote the right kind of accessors, but without the semantic problems, although it would kind of mess with the concept of initial-element
17:45:48
aeth
An array row of (single-float (unsigned-byte 8) double-float (unsigned-byte 32)) is an array row of things that can all be an upgraded-array-element-type in arrays in reasonable implementations, just not all in the same array at the same time.
17:46:12
adlai
well, if all your immediates are numeric, you can probably fake it quite closely with jackdaniel's trick and possibly a bit of ldb and decode-float gluearbage.
17:47:24
adlai
ACTION leaves off pursuing this optimization, however mature it may be... enjoy your bit-twiddling!
17:47:45
aeth
Well, several problems there. First, arrays can store more than fixnums. An implementation could reasonably store unboxed double-float (larger than a fixnum), (unsigned-byte 64), or (signed-byte 64) in 64-bit implementations.
17:48:09
aeth
In fact, if you're working with such numbers, you're probably better off overusing mutable arrays to avoid boxing
17:48:59
aeth
Second, this would be for very high-performance things, so converting an integer to a float each time might have a cost. Even a tiny cost can add up. I had a 3D renderer in mind when I was thinking about this.
17:50:00
jackdaniel
I feel like in this meme with a pigeon (https://knowyourmeme.com/memes/annoyed-bird), laters \o
17:50:29
adlai
that would be the correct function, not decode-float, since the latter doesn't actually rescue you from the floatsam!
19:02:37
jackdaniel
looking at ecl code it seems pretty much doable - i.e by relaxing the displace requirement to allow an array with a /compatible/ element type
19:03:27
jackdaniel
there is also a cute internal function: (si:array-raw-data array) that returns an array with the element type byte8 (works on all arrays with the specialized element type)
1:08:38
lotuseater
if i type in SLIME (defmethod initialize-instance ...) there are shown at the bottom many keywords, what exactly affects that?
1:48:12
Bike
i think slime just shows all keywords that are accepted by any initialize-instance method. possibly slot initargs as well?
2:55:08
seok
if I compile a lisp program and give it to someone else, can they try to figure out what objects are internally by reading memory?
3:01:32
Bike
i don't think that's a good idea regardless of what programming language you're using, no
3:01:34
Alfr
seok, what problem are you trying to solve? Though it likely is better suited for the cafe.
3:03:55
seok
but if the client is shipped with encrypted variable, it would be have to be shipped with the key too
3:04:55
Alfr
seok, homomorphic encryption and that what you ship must only operate on the blobs. But I don't know of any efficient scheme or even if what you want to do is possible with what little we currently have.
3:06:07
Bike
you could do some key exchange to establish a secure channel and then send your ssn or whatever that way
3:35:12
tinga
Hi. How do I bind a value in the top level of a package, so that changes to the code (reloading the file) can have it be a different value?
3:35:34
tinga
(defconstant foo 123) in SBCL will not allow foo to be defined anything else on subsequent loads.
3:36:59
tinga
I feel like I'd be OK with setf not working on foo. There's defparameter for those, after all. But the SBCL behaviour seems to make it impossible to develop the program without a restart?
3:41:39
tinga
Why is this false? I thought `equal` does structural equality?: (equal (make-array '(2 3) :initial-element "hi") (make-array '(2 3) :initial-element "hi"))
3:47:00
Alfr
tinga, have a look at equalp, tough it's not case sensitive for string. If that doesn't fit your bill, simply write your own predicate.
3:59:09
tinga
How do I name variables (function arguments) that are never used? SBCL warns me even if I prefix them with an underscore.
4:03:52
pfdietz
Or an ignorable declaration. Or, if it's a required parameter to a method, a T specializer.