freenode/lisp - IRC Chatlog
Search
16:09:15
asdf_asdf_asdf
https://www.hackerrank.com/challenges/between-two-sets/problem?h_r=next-challenge&h_v=zen
16:18:20
ck_
Wow "hackerrank", that sounds pretty elite. I think I am not qualified for this. Good Luck!
19:22:07
asarch
And when I try to dispatch a line like: "agda-stdlib-doc - biblioteca estándar para Agda — documentación"
19:28:29
asarch
Reading its documentation, it seems that there is trick for that: (with-http-response (req ent) (with-http-body (req ent :external-format (crlf-base-ef :iso8859-2)) ... generate and write page here..)
22:55:13
remexre
so I've got a tree of objects, where the leaves can either be of class optimized-leaf or unoptimized-leaf (for example's sake, let's say optimized-leaf is a bit-vector and unoptimized-leaf is a (vector t))
22:55:42
remexre
I want to be able to write values that are trits, where (deftype trit () '(or bit (eql :mu)))
22:55:57
remexre
would the implementation of (write-trit LEAF TRIT) be a reasonable use of change-class?
23:20:08
stylewarning
remexre: if it’s truly bit vectors, why not split the difference and use a specialized array of (UNSIGNED-BYTE 2) or so?
23:20:59
remexre
it's not actually bitvectors :P they're just an example of a representation that can densely store data, but aren't compatible with all the values I wanna store
23:21:21
stylewarning
remexre: Would everything start optimized, then possibly be unoptimized? If the tree is the “owner” of the leaves, I think it’s preferable to mutate the tree instead of changing the class. If the objects are strewn around everywhere, then maybe it’s easier to use change class
23:22:08
remexre
pretty much, yeah; the tree does own the leaves, i.e. the existence of the leaves is an implementation detail
23:24:25
stylewarning
I probably wouldn’t have a WRITE-TRIT function, I’d have functions to operate on the tree instead, and down deep I’d have %WRITE-BIT and %WRITE-TRIT which work on the storages directly
23:25:47
stylewarning
that is, id want to dispatch on the value as soon as possible, not at the last moment when all I’ve got is a lead
23:26:10
remexre
so would WRITE-TRIT-TO-TREE test the leaf types, and do some sorta (setf (left tree) (promote (left tree)))-looking thing?
3:45:22
beach
I find the example/question of remexre impossible to follow because of all the oversimplifications. You can't change the class of a vector, nor of a bit or :mu.