?

Log in

This will make no sense. - The Desian Universe
Links Home / GitHub January 2017
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 
 
 
 
deskitty
deskitty
Des
Tue, Aug. 17th, 2004 07:54 pm
This will make no sense.

[None of this will make any sense to anyone but me. So don't even bother reading it. But I have it on good authority that some of you enjoy reading this tripe, so I'll post it anyway. ;)]

Fried brain, marinated for 8 hours in opcodes and algorithms for binary-tree-ish-structure traversal. Mmmm, tasty.

5 stacks, one of which keeps track of the other 4. What's more, I might need one more.

Closures don't keep track of the context objects of their creator functions, but they should. Except then they'd have two context objects (one from their creators and one from their callers), and no idea which one to use. For now I'm going to force users to explicitly remember their context objects (e.g. "let: myoldself = self; . { /* do stuff with myoldself */ }"). To be addressed post-0.1, maybe. Assuming I don't decide I like it that way after all (because after all, the whole point of a closure is you can use it outside the context of its caller).

Update: Oooh, idea. Just push NULL for the context object if we don't want the called function to have one. That's much more elegant than the other solutions I was considering. So now this is fixed.

Context classes (as opposed to context objects) for closures aren't being done right, either. I have no idea how to fix this right now. I think I'll probably have to do something incredibly weird. Like, weirder than that NoOp hack for opcodes that actually use their next pointers. I briefly considered getting rid of them altogether, but that wouldn't work because they do in fact serve a function distinct from that of context objects.

Classes could be created at compile time, but their methods look uncannily like closures (probably because they are). I think I'll leave their creation for runtime, even though it could potentially bork a couple things (like, say, context classes, or saving/restoring objects ... still haven't figured out how to work that one yet). Besides which, creating classes at runtime seems so delightfully Lispish.

I keep thinking I'm in vim, and I'm hitting "j" to go down. But I'm in Logjam, not vim, or even vi. Stupid LJ clients and their lack of vi-ness.

I think I'll go watch a movie. I love you all.

Update: Did I mention I was hyper?

-- Des

Current Mood: confused confused

2CommentReplyShare

ferahga
ferahga
Girl of Impossible Dreams
Wed, Aug. 18th, 2004 07:09 am (UTC)

I think I'll go watch a movie. I love you all.

I understood that part..
so it was worth reading!


ReplyThread
deskitty
deskitty
Des
Wed, Aug. 18th, 2004 09:47 am (UTC)

Well, good. I'm glad somebody got something out of it. ;)


ReplyThread Parent