News for hackers. Stuff that matters.
Re:'Dynamic' assembler with GC by 9oliYQjP on Friday August 21, 2009 @11:50AM (#777742)
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.

Re:'Dynamic' assembler with GC by scythe on Friday August 21, 2009 @01:07PM (#777957)
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.

Re:'Dynamic' assembler with GC by hc on Saturday August 22, 2009 @12:43AM (#779022)
what "prank" are you talking about? he wrote a silly, semi-offensive joke presentation about an impressive proof-of-concept he actually developed...
Re:'Dynamic' assembler with GC by pmjordan on Friday August 21, 2009 @10:02AM (#777524)
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.
Re:'Dynamic' assembler with GC by silentbicycle on Friday August 21, 2009 @11:09AM (#777665)
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.

Re:'Dynamic' assembler with GC by doelie_ on Friday August 21, 2009 @10:16AM (#777550)
Re:'Dynamic' assembler with GC by pmjordan on Friday August 21, 2009 @10:19AM (#777555)
Brilliant, thanks. I'll have to have a play with that.
Re:'Dynamic' assembler with GC by andreyf on Friday August 21, 2009 @11:19AM (#777690)
While you're at it, check out http://piumarta.com/ ;)
Re:'Dynamic' assembler with GC by doelie_ on Friday August 21, 2009 @11:52AM (#777752)
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.)

Re:'Dynamic' assembler with GC by jrockway on Friday August 21, 2009 @02:17PM (#778114)
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)

Re:'Dynamic' assembler with GC by wwalker3 on Friday August 21, 2009 @03:34PM (#778269)
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.

Re:'Dynamic' assembler with GC by hypermatt on Friday August 21, 2009 @12:32PM (#777862)
Pretty cool stuff, this would have been helpful in assembler class when I learned the hard way about aligning memory ;)
Re:'Dynamic' assembler with GC by Tichy on Friday August 21, 2009 @11:56AM (#777760)
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.
Re:'Dynamic' assembler with GC by mattyb on Friday August 21, 2009 @12:05PM (#777794)
I don't understand a word of it -> nobody understands

Quite a leap, sir.

Re:'Dynamic' assembler with GC by Tichy on Friday August 21, 2009 @12:05PM (#777797)
That's not what I said.
Re:'Dynamic' assembler with GC by mattyb on Friday August 21, 2009 @12:28PM (#777851)
I see; so you're not accusing him of babbling?
Re:'Dynamic' assembler with GC by Tichy on Friday August 21, 2009 @12:46PM (#777906)
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.
Re:'Dynamic' assembler with GC by jpeterson on Friday August 21, 2009 @07:22PM (#778713)
It's not a good idea to make widely generalizing comments about something you admittedly don't understand.
Re:'Dynamic' assembler with GC by Tichy on Saturday August 22, 2009 @04:54AM (#779171)
It seems people did not understand what I was trying to say - whatever.