Hacker News new | past | comments | ask | show | jobs | submit login
'Dynamic' assembler with GC (zedshaw.com)
67 points by spooneybarger on Aug 21, 2009 | hide | past | favorite | 19 comments



A while back I played this joke on Ruby people. It was an elaborate joke, where I wrote a fully dynamic assembler in a couple weeks, and then did an entire presentation at RubyEnRails (Amsterdam) basically showing how my “literal machine” beat the pants of all the Ruby virtual machines

What are "Ruby people" to Zed? I happen to use Ruby but I didn't even know who _why was until about 6 months ago, when somebody mentioned his book and asked how I possibly couldn't have heard of it. I don't follow any of the DHHs of the blogosphere unless I stumble on a story about them. I don't attend Ruby and/or Rails conferences.

I just happen to use Ruby from time to time, in situations where I believe it is the appropriate tool, and because I like it. The thing is, I may have fallen for this joke. I don't have the expertise to know that it was a prank. How would misleading somebody like me be funny? It would be like a a professor misleading her students instead of teaching them. How did things get so sour between Zed and the "Ruby people" that he feels the need to play these pranks at conferences where presumably he was called in because he had the respect of the attendees?

I was sad to see the fallout happen and at the time I emailed Zed and thanked him for his effort. What I didn't mention was that he shouldn't assume that the only people using Ruby and Rails were the type of people he mentioned that he hated. I'd like to think that a lot of programmers who use Ruby are modest and amicable, and like me, uninterested in the peripheral fluff that has sprouted up with the birth of Rails.


I think it was really a joke he played on the Rails guys. The original presentation is here: http://www.zedshaw.com/repository/rubyenrails2008/build/ruby... and it seems to me that it'd be easy to realize it was more or less a joke; the tone of the presentation didn't seem very serious ("Sounds like Erlang, so it's fast!").

On the other hand, maybe that's how Rails presenations typically are; I was never part of that scene.


what "prank" are you talking about? he wrote a silly, semi-offensive joke presentation about an impressive proof-of-concept he actually developed...


I have often wondered what it would be like to have an "all-levels" Lisp-like language. Start with a bootstrapping reader that attaches to a minimal assembler that generates bytecode from the S-expressions. Then build progressively higher levels onto that until you have a "proper" lisp system, except you can drop to a lower level anytime and hack the depths of it when you need to.


Have you ever looked at Forth? It's postfix and stack-based, but is exactly what you want from the standpoint of bootstrapping from next-to-nothing and getting a high-level language.

Here's thoroughly documented source for a Forth interpreter (http://www.annexia.org/forth) in i386 assembly.



Brilliant, thanks. I'll have to have a play with that.


While you're at it, check out http://piumarta.com/ ;)


Indeed. The peg parser generator is quite nice: http://piumarta.com/software/peg/

I recently used it to implement an s-expression reader: http://zwizwa.be/darcs/libprim/ex/sexp.leg

(It's incomplete, but it illustrates the principle: peg parsing is very nice for quick & dirty parsing work.)


JIT on very low-level languages is not a new concept; it's exactly what LLVM does. But of course, GC for all LLVM assemblies would be interesting.

(This also sort of exists: http://llvm.org/docs/GarbageCollection.html)


This looks like an assembler that writes out byte code that a virtual machine runs (where that VM also supports just-in-time optimization and garbage collection). There seem to be a bunch of these for the Java VM that convert "Java assembly code" into valid .class files (http://tinf2.vub.ac.be/~dvermeir/courses/compilers/javaa/ for example).

An interesting idea -- I work with Java and C# every day, but I never thought of writing assembly code for the JVM or .Net VM.


Pretty cool stuff, this would have been helpful in assembler class when I learned the hard way about aligning memory ;)


This might be cool or not, I don't understand a word of it (also for lack of patience). However it reminds me how simple it is to appear smart: just keep babbling about things nobody understands. The thing is they might actually be easy things, but because other people are not used to the context of the things, they can not follow you as quickly as you can talk. Therefore they'll assume you are smart. In reality, you are just talking about irrelevant stuff.


I don't understand a word of it -> nobody understands

Quite a leap, sir.


That's not what I said.


I see; so you're not accusing him of babbling?


No - it just reminded me of that concept, and I babbled about it. As I said, I did not have the patience to actually try to understand what Zed wrote. So I can not know if it was babbling or not.


It's not a good idea to make widely generalizing comments about something you admittedly don't understand.


It seems people did not understand what I was trying to say - whatever.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: