freenode/#sicl - IRC Chatlog
Search
16:11:03
Colleen
Bike: heisig said 8 hours, 14 minutes ago: The question is, should Trucler include functions for reading implementation-defined optimize info? Since they are implementation-defined, that particular implementation can simply subclass optimize-description and provide custom accessors.
16:11:42
Bike
i could have cleavir mandate that describe-optimize needs to return a special cleavir subclass of optimie-dscription, i guess
17:40:16
Bike
::notify heisig brief description of what i'm thinking wrt trucler optimize info https://gist.github.com/Bike/daa1bf795c8b718022856ac4cb15175a
19:31:12
jdz
There was a discussion about branch prediction here recently, so I'll just leave this here: https://blog.cloudflare.com/branch-predictor/
19:32:38
Bike
the "Obviously, this code could be improved" bit is a little weird to me because I'm pretty sure modern C compilers can rewrite that as a multiway branch/table lookup/whatever no sweat. sorta mentions that in the footnote though.
19:38:22
jdz
This sounds very good for all kinds of checks: "The takeaway is clear - you can have as many never-taken branches as you want, without incurring any cost."
1:01:40
karlosz
Bike: i was reading the make-load-form specification pretty carefully today; i don't know if you thought about it already but could you base an object graph copier/serializer based on the make-load-form mechanism?
1:02:46
Bike
yeah, i've tested that a bit in something else and it works. but you have to touch a file for it, which is not great.
1:05:08
karlosz
hm, i guess that's true, since the file compiler needs to be involved to actually do the work
1:06:16
karlosz
maybe just writing a 'liter' customized version of the literal dumper specifically for cloning in-memory objects which piggybacks off of make-load-form
1:07:01
Bike
well the nature of make-load-form is that it needs something compiler-like, since it checks circularity by walking the forms looking for constants
1:14:28
karlosz
i'm currently working on cleaning up some aspects of sbcl bootstrap which pretty intimately tie into the loader, file-compiler, and literals handling so i thought it could be adapted to the problem of cloning in memory stuff
1:14:58
karlosz
it's actually weird that there's this mechanism to reconstruct serialized object graphs but not also one just to copy since the protocol is basically identical
1:16:20
Bike
i think the way the compile-file mechanism is form based kind of throws a wrench in using it in any lighter weight way
1:20:16
karlosz
(m-v-b (c-f i-f) (make-load-form some-flat-struct) (eval c-f) (eval i-f)) works fine for simple stuff
1:21:27
karlosz
i guess the difficult part is actually doing the walk, since there's no easy way to do the part where other constants involved in the m-l-f form can get copied as well
1:22:04
Bike
that's what i mean. if you want to copy a whole object graph you can't just do eval since the forms will refer to constants you want to copy.
1:22:15
Bike
it would still be kind of nice if it was exposed in some way without touching a file, though
1:24:39
karlosz
right, i guess what you must've done is making a file with a macro or symbol-macro call to a value and compile-filing it?
1:27:19
Bike
basically i wrote (defvar *load* #.*save*) to a file, and then (let ((*save* object)) (compile-file file))
1:31:17
karlosz
oh yeah, so like (setq *load* #.*save*) to a file, and then (defun clone-object (object) (let ((*save* object)) (compile-file file) (load file) *load*)))
1:32:27
karlosz
there's probably a way to avoid touching the actual file system, but the cool thing is you could have a compiled object generator
1:51:38
Bike
there's no standard way to avoid it, i don't think. you can't compile-file with streams
3:06:43
no-defun-allowed
Me? Not much - I was going to call my old university (again) because they may or not be billing me when they shouldn't, but they are using some online conferencing program I can't use, as I am not a student anymore. You?
3:07:59
beach
Having problems with my bank, but those are what my (admittedly small) family calls "first-world problems". Today I should act upon the modifications to the specification that heisig brought up.