Hacker News new | past | comments | ask | show | jobs | submit login

Thanks man. I'm pretty stoked about it too. It's shaping up nicely and is tons of fun, not to mention I really think it's got potential.

I just hope it honestly puts an end to this insistence on "one language to rule them all".




Zed, do you think you could have written Mongrel2 in C, whilst doing a good job, without having already had the experience with Mongrel v1? What I'm trying to get at is our we just seeing another example of scripting languages being good for prototyping, but getting better raw performance(memory footprint,/speed/disk usage) from a lower level language? Or do you think you could have ended up with a decent architecture on a first go?


I'm not Zed, but I have taken this approach several times (Primarily Ruby->Objective-C, but also Ruby->C). I often find it helpful to validate an idea in code quickly, and rewrite for speed/scalabilty/platform integration/etc once I'm happy with a design.


Yes, actually I do this all the time. While I think the total effort of a web server is about the same in most languages, an initial prototype is way easier in a language like Python or Ruby. That's mostly because there's much less ceremony involved and all the bits you need are right there.

As I work on the prototype though, I start to figure out if the language I decided at first will work well for it or not. Since I usually throw my first prototype out, with a fixed time to get it working, I'll end up picking a different language or not depending on my experience so far.


I'm not Zed either, but it's worth noting that you can usually do this without having to throw away the higher-level language entirely - most scripting languages have C APIs so that you can profile and move the expensive parts to C. Sometimes it's necessary to change the architecture of the entire project, but more localized changes are often good enough.

Lua and Tcl were designed with this approach in mind (they expect to be embedded), but you can do it with Python, Ruby, Lisp, Erlang, etc. too.


Can you describe your experience trying to port whichever method you were using for strings to bstring approach ? I'm curious as to what you thought about it.


It sucked, and I should have just started using bstring right away, but I was going with the inspiration at the time and wanted to get something working to see if the idea of HTTP->0mq was viable. As you can see, it didn't take very long to switch at that stage, just a couple days. Now if I'd waited it would have been a total nightmare and probably impossible.

First up, I had some unit tests, which are essential if you want to be able to pivot like this suddenly. Second, I knew a lot about the tools I could use so I had a clear idea of how to attack the problem. Finally, it's just a matter of picking the smallest little piece, converting it, and then stepping through all the parts that piece touches. Kind of like spreading a virus.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: