Profile cover photo
Profile photo
Noel Cower (Nilium)
Hi.
Hi.
About
Noel Cower (Nilium)'s posts

Apparently hangouts is no longer in Google+.. that made it surprisingly difficult for me to send someone a message. Hm.

I forgot Google+ existed.

Post has attachment
Wrote a quick-ish (i.e., around 4,500 to 5,000 words) blog post on the Rusalka virtual machine, my thoughts on its development thus far, and so on. Have fun.

Today has been a good reminder of why I'm better off not on Facebook.

Writing/rewriting my virtual machine is tedious since the interpreter (for lack of a better word I can think of right now) part's easy and the code loading part's annoying. I hate C-based IO (though at least it's not iostreams — not really fond of using those). I think I should just redesign my bytecode format so I can mmap the entire file into memory and adjust/convert offsets relative to the start of the file to pointers so I don't have to actually do much in the way of reading.

Or maybe I should just stop changing the VM's design over and over, but then that would make it less interesting to experiment with.

Spent most of last night working on a Lisp lexer/parser/interpreter in Ruby. For the most part, the parser is the first-smallest part because it's literally two functions: quote and expr, at 27-ish lines. The lexer's the largest part at around 370 lines. The rest is interpreting, which is around 220 lines, and most of that is just for handling specific expressions and managing the environment for certain things (that is, global scope is one environment, a let expression gets an environment on top of it, functions get an environment with their arguments on top of whatever environment they were created in, etc.).

So far, it can call into arbitrary Ruby code, though it has no way of passing functions as the block argument of a method right now. It probably won't even be able to do that, though, since it was just a one-off thing that I did because I was thinking that because I'd written the lexer and parser, I might as well have fun and see how long it takes to write a little Lisp that sits on top of Ruby. Turns out the answer is about 3-5 hours, if you count the time taken to write the lexer and parser and then try to account for time spent taking breaks to read about other stuff (or to occasionally check the R5RS for ideas).

Post has attachment
First off, the color scheme editor app is, for most purposes, done. I can't really think of much else to do with it other than add drag/drop support to the selectors table, which is more annoying than it is interesting to do. Currently just going through the code and slowly cleaning it up, file by file, to get a little closer to consistent code style (since it started out one way and switched half-way through because it was too out of place with Obj-C).

Second is that I added a light theme, called Higuchi, to the Freesia package. It's orange and blue and grey. Sort of standard fare for light themes — there's not a whole lot of interesting things you can do with light grey, it seems like, or at least I haven't found anything good to do with them yet.

The picture conveniently has both things in it.

#SublimeText  
Photo

Post has attachment
Semi-real-world test: I created a new color scheme, saved it, set it in Sublime, then edited it with Schemer (the worst project name ever, but whatever). Worked pretty well. I saved, Sublime did its thing and updated the theme, and I got to see the changes each time I saved it.

Also, the project is now open source on https://github.com/nilium/schemer/

There's one weird glitch with the name textfield, but I can't figure out what's causing it. It seems like there's just a ton of overdraw on the field borders and that it's not clearing it, so I haven't figured out what's up yet. This happens regardless of whether the field is hooked up or doing anything. It clearly doesn't happen in other apps, so it's got to be something I'm doing, but I don't know what that is yet.

#SublimeText  
Photo

Post has attachment
Selectors are now hooked up. The UI layout changed a bit because the old one wasn't very pleasant to use. Selectors are now a list, so you can add/remove specific ones more easily. Font style still isn't working and I'm actually not sure why since the code looks right, but it wouldn't be the first time I thought something looked right when it wasn't. Might have to subclass the control and tweak some things.
Photo

Post has attachment
Started working on a color scheme editor for #SublimeText  that basically just copies the original TextMate theme editor. At this point, saving and loading color schemes now works more or less as expected. The only things not wired up entirely are the add/remove rule buttons, the scope list, and the font style buttons that I had working and then broke somehow and have ignored since then because I honestly don't use font styles in code.
Photo
Wait while more posts are being loaded