freenode/#sicl - IRC Chatlog
Search
15:59:33
jcowan
beach: In Boston, fixing all leaky pipes would raise the available amount of water by 50%. But who cares? Boston is not short of water, and it is a completely renewable resource there.
16:00:39
jcowan
A possible solution to the idea of removable disks is to use a hybrid 64-bit/128-bit addressing system and give every disk in the word a 64-bit unique id.
16:01:24
jcowan
That way you keep your uniform address space and make it big enough (with a locally reduced version) until we are contacted by the Galactic Empire.
16:02:22
beach
Still, you can't just remove a disk, or you will have pointers pointing to a place that is no longer there.
16:04:04
jcowan
but on disk they were 32 bits. When an object was needed, it was swapped in and assigned a currently-unused 16-bit id.
16:06:13
beach
Paul Wilson is (or was, not sure what he is doing now) a world expert on memory allocation and automatic memory management.
16:06:15
jcowan
The system tried to guess whether the object pointers in the newly swapped-in object should be chased, or whether they should be replaced by 0 (invalid id), to be figured out later.
16:07:37
drmeister
We've been struggling to debug inlining in Cleavir - I have a suggestion and I'd like others thoughts on it.
16:08:20
drmeister
I think a text representation of HIR would be extremely useful. Something that linearizes HIR into a textual representation that is as stable to inlining and optimization as possible.
16:08:28
jcowan
Pointer swizzling is a simpler version of this concept. Here's the paper: http://web.cecs.pdx.edu/~black/OOP/papers/Kaehler%20&%20Krasner-LOOM.pdf
16:09:00
jcowan
The invalid-id concept I mentioned is called lambda, for reasons unexplained. Try to ignore the collision in your mental hash tables this will cause.
16:09:29
drmeister
Something where you could (1) generate a text dump of HIR (2) perform one step of inlining or optimization (3) generate another text dump (4) generate a diff of (1) and (2) output and see only the essential changes made by step 2.
16:13:27
beach
It sounds trivial, but I can't guess whether a normal diff would actually be informative.
16:13:37
drmeister
I would guess we would gather together basic blocks, give them labels that wouldn't change every time a text representation is generated, and order the basic blocks in a systematic top-to-bottom(text)/left-to-right(HIR) manner.
16:14:52
beach
If you think it will be informative, then I think you just have to linearize the HIR code in some systematic manner.
16:15:20
jcowan
Primarily, I'd say, because diff is not hierarchical: it thinks in terms of non-semantic units called "lines".
16:15:31
drmeister
Rather, what would be a better way to see the differences between two HIR graphs?
16:17:44
beach
drmeister: Here is what I think. I think it is trivial to write a HIR-to-text module, so rather than guessing whether diff would be useful on such a thing, it is probably easier just to try it out.
16:18:56
jcowan
For example, when running regressions on my HTML->XML converter, I had it generate a format called PYX (also known as "nsgmls output format") which represents each open-tag, attribute-value pair, text content, close tag, etc. as a separate line so that ordinary diff will work on it.
16:19:27
jcowan
S-expressions could be linearized (in the literal sense of "converted to a sequence of lines") in a similar way.
16:21:12
jcowan
It may be that HIR objects are simple enough, apart from their references to other HIR objects, that they can be (in this sense) linearized by a special-purpose routine, I don't know.
16:21:39
drmeister
If we assign basic-block labels based on the depth from the first instruction then the insertion of a branch will completely change all of the labels.
16:24:57
beach
You want the arc that jumps back to the beginning to be represented as a jump from a position further down the page to further up the page.
16:27:24
beach
Otherwise, if you have cycles in the graph, it can be quite arbitrary which arcs go forward and which ones go backward.
16:28:10
beach
In Common Lisp, most graphs will have "natural loops", so you can compute such a natural ordering.
16:46:22
beach
You could use the "longest path" algorithm that I use in the HIR visualizer. That one is pretty good about getting a consistent layout.