Des (deskitty) wrote,
Des
deskitty

  • Mood:

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
Subscribe

  • (no subject)

    Well, I'm off to Dreamwidth. I hope to see you all there! Nice knowing you, LJ. It's been grand. — Des

  • A fresh start?

    So I'm thinking of moving away from LJ. Every time I glance at my ad blocker, there are an uncomfortably-large number of advertising and tracking…

  • 2012: Ramp It Up

    It’s that time of the year again -- another year has passed, and as usual, I don’t finish reflecting on it until the first 3 months of the following…

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 2 comments