« first day (409 days earlier)      last day (1126 days later) » 

ksi
ksi
14:28
@ngn yeah, using char as int speeds up the copying quite a lot. btw, is it cost too much to implement an adaptive int list type? i.e. a list of integers whose type depends on the largest/smallest value in it?
 
1 hour later…
ngn
ngn
15:45
@ksi depends on how much is too much. detecting overflows is difficult in c - it may require asm and cost some performance. casting the current result to a wider type and continuing in another loop adds complexity.
ksi
ksi
@ngn yes, so i guess i meant in a append-only way like the list buffer you mentioned. or only support (char$1 2 3) + int$10, whenever the type can be known in advance. therefore the user is responsible for providing the type of results. i am not particularly into the idea of (char$3)+(char$127)=(`int$130)
@ngn yes, so i guess i meant in a append-only way like the list buffer you mentioned. or only support (char$1 2 3) + int$10, whenever the type can be known in advance. therefore the user is responsible for providing the type of results. i am not particularly into the idea of 0xff+0x01=256i
ngn
ngn
@ksi what about 2147483647i+1i?
ksi
ksi
@ngn -2147483648i or 0Ni in the case of k
ngn
ngn
16:03
@ksi so you don't care about overflows. this is how ngn/k works currently. what change are you proposing?
well, actually, except for chars..
arith ops always widen chars to ints
kelvin sherlock (is he in this group) has a lovely ssr implementation using a DFA table in the shakti email group.
ksi
ksi
@ngn i guess the only difference that matters is which type should a number literal have. i was thinking something like assigning number literals the smallest possible type unless instructed otherwise. so, !5 is 0 1 2 3 4 but actually 0x0001020304
ngn
ngn
16:18
@ksi 255+1 -> 0 would look like a bug
or simpler: 100+200 -> 44
ksi
ksi
@ngn yeah, not easy to understand for newbie. but is it a feature of k? :)
ngn
ngn
@ksi well.. i hope you never have to explain 100+200=44 to shareholders or to the taxman :)
17:22
maybe it would be nice for !scalar to use the prototype of the argument- (!0x3)~0x000102 (!3.0)~0 1 2.0 etc
more explicit
17:56
@JohnE except for chars, that's what k7 did.
18:41
I guess one alternative to wrap-around overflows is to use saturating arithmetic =P. Although if going down the route of examining the largest/smallest value in a list, might as well use some more advanced compression (rather than sticking to fixed machine-width integers, use e.g. 5-bit integers, or 20-bit integers or whatever).
19:21
non-word-compatible sizes will cripple random-access performance on most architectures
19:54
if we're still talking about optimizing where, maybe some kind of run length encoding would be better =P
20:51
"optimizing" where by making the operation a no-op is definitely thinking outside the box
21:25
initialize memory to match some defined RLE (hopefully this is cheap to do), then study the literature for the fastest decompression of RLE =)
 
1 hour later…
ngn
ngn
23:08
i've always assumed lena is russian - t.i.l. she's actually swedish
23:31
@ngn wired had a story about her last year: wired.com/story/finding-lena-the-patron-saint-of-jpegs

« first day (409 days earlier)      last day (1126 days later) »