Ash Berlin

Posts Tagged “javascript”

Running JSGI Multiple Apps in One Process

Posted on Feb 10 2010

Good idea or bad?

‘App’ in this case is talking about running two different Pressed (a blog engine for Juice) apps. More generally this question could apply to any application written in a scripting language.

Well on the one hand, if the apps use a lot of common modules, the memory footprint will be reduced. And using less memory is always hand for resource-starved virtual servers.

However more seriously this turns out to be a horrendously bad idea. Who knew? (Clearly not me). Even when you control all the apps in question and can set aside the security concerns, there are other reasons to not do this. Well just one really: its far to easy to unintentionally share state between the apps apps, even when you know about this danger and thought you’ve worked around it.

This is just a post of the “Remember Ash, Don’t Do That” variety. Some approach like this node.js patch might be a suitable alternative, and it gives other fuzzy warm benefits too.

Markdown's List Handling

Posted on Jan 23 2010

Jeff Atwood of recently posted a rant/diatribe against Markdown, whilst at the same time declaring his love for it…

I agree 99% - the 1% where I don’t agree is point #3 is a non-issue for me.

When evilstreak and I wrote markdown-js recently we spent hours ranting against the fact that the ‘specification’ for Markdown is the broken implementation of (As for why we wrote a new implementation, well thats a whole other story. Main reason being needed an intermediate representation to play with.) Take this particular gem:

Read the rest »