stan klimoff

Writing paralysis

I have to admit that blogging regularly is harder than I imagined. My impression was that by putting myself into an “intermediate” format (not exactly Twitter, not exactly a full-featured blog) it will be easier just to write stuff that matters for me. However, the net outcome is that unlike on Twitter, I still worry too much about whether the stuff I write will be interesting to the subscribers.

Well, I know this is silly, but help me out there. What would you personally prefer to see here? Links to the new pieces of technology I stumble upon here and there? Proceedings from our product development? Philosophical ramblings about system design and the nature of computing? Reflections on career development? Expat’s impressions about the life in the Valley? Pictures of kittens and puppies? (Screw that last one, I don’t have any.)

Respond here, tweet to @graven, send me an email, give a call or whatever you feel is easier. This is pretty important to me, so take this one seriously, will you?

— 1 year ago with 2 notes

#meta 
Dictionary Processing

We all know that reductionism is quite widespread in the programming community. It’s easier to debug the program when you have a small number of moving parts and well-defined rules of composing these parts into something bigger.

For one thing, famous LISP (which, apocryphally, stands for LISt Processing) tried to reduce every computation to list manipulation. Lists were used as a basic structure for the source code as well. How effective is the approach is subject to intense debate, but in my world, idea is what counts.

Turns out there’s a handful of programming languages that tried to reduce computation to a different basis.

If you even did JavaScript, you probably know that it uses maps (hash tables, dictionaries, whatever) intensively. Some even dare to call JavaScript ‘the new Lisp’.

Lua goes farther that way, providing some pretty advanced meta-programming facilities by using maps internally to control behavior. Of course, it provides ability to alter those internal maps (mm, hacker’s delight).

Tangent: Presentation by Roberto Ierusalimschy on Lua design. Discussion on LtU.

Ruby advocates will indeed point out that objects is Ruby (and, arguably, Python) are all dictionary-based, making meta-programming magic akin to Lua possible.

Well, all of these languages do not address one of the key selling points of Lisp: uniformity of structure between data and code. What would it be like to have code written as a sequence of maps?

In my opinion, the most pure (from the reductionist’s standpoint) language in that realm is Io. For instance, local scope is a dictionary in Io. Check out the examples — this stuff definitely expands the boundaries of the mind.

One step further I can imagine is to treat maps and functions in the same fashion. Function is just a map from the set of inputs to the set of outputs, isn’t it?

What do you guys think — how far the reductionism of the maps can go?

— 2 years ago

Next (?) layer of virtualization

For some time already I’m considering different platforms for implementing an app that will run within a browser. This peculiar piece of software has to perform weird things with the user’s workstation and basically requires running native code with administrator privileges. Naturally, I was looking to sandbox it somehow to limit the damage done if a defect crawls in. Runtimes like .NET call the native code ‘unmanaged’ for a reason: if you decided to use native code, you’re on your own.

Yesterday my good friend brought to my attention an interesting project born within Google — the NativeClient (NaCl). The concept these guys are pushing is basically isolating parts of your process within a dedicated address space in a browser. I took a look at the documentation trying to figure out if there’s a detailed explanation of how this is done. Unfortunately, the only thing I found was a video and videos are not really my thing.

Coincidentally, I’ve stumbled upon a blog post with a unsuspicious title ‘What has happened to the segment registers’. (By the way, if you don’t read the LShift blogroll, you are probably missing a lot.) I did some assembly back in high school, so I was interested. If you did that as well, you may remember that the ‘real mode’ is all about setting the segment registers correctly. Not so in ‘protected mode’ — you have to care about GDT, LDT and other weird stuff. What you get in exchange, however, is real isolation between the processes — one process can not uncontrollably use the memory of the another. All books on the subject I’ve seen so far claim that protected mode is the way to go and hand-waive the impure segment-based to rust in peace on a pile of used 8086s.

Turns out that the segment registers didn’t really go anywhere. It’s just that they are rarely used. You still can access this layer of sandboxing and it still works. The isolated code will not be able to access anything besides the assigned segment. The code, however, is free to change the value of his segment register, so special care is needed to prevent this from happening. Both NaCl and VX32 (a general-purpose library built on the same principles) do that for you provided that you do not run dynamic code. I can not really say that I fully understand how this works — VX32 somehow manages to crash if you try to go execute syscall. If you do understand the machinery behind the scenes, please let me know — this is some really interesting stuff.

Where this technique may be useful? It’s hard to say. Mobile devices come to my mind immediately, but it looks like the managed environments are here to stay, at least for the higher end gadgets. However, it’s been a while since I dwelled in the native code land. The tech is indeed cool (the VX32 guys were even able to run Plan 9 kernel in userspace), but the use case eludes me.

What do you guys think?

— 2 years ago

blogging reboot

Dear friends,

A while ago I decided to re-think my “social media strategy”. Today I got LJ, Facebook, Twitter, FriendFeed, Tumblr, Flickr and a number of other services I rarely use. This armada is tiresome and impossible to manage. I want to cut down on the communication channels and find a way to use them more efficiently. Here are the first few steps I intend to make.

Kernel panic

  • Tumblr will become the primary blogging medium. It is perfectly enough for small posts, and I do not do long ones anyway. It will even get its own place on stanklimoff.com, for now as a sub-section live. Thanks for subscribing.
  • Twitter will act as an auxiliary channel, primarily for RT and one-liners.
  • All private posts will remain in Russian and will be published to a restricted circle of friends on Facebook.
  • LJ will remain read-only, I may even want to change my account to openID for that purpose.
  • FriendFeed’s destiny is TBD. Right now it’s no more than a dump.

Gonna be fun. Stay tuned.

— 2 years ago with 2 notes

#meta 
Link →

It is possible to travel faster than light. You just wouldn’t travel faster than light.

Seems strange, but by manipulating extra dimensions with astronomical amounts of energy, two Baylor…

— 3 years ago