News for hackers. Stuff that matters.
Re:The Opa Framework for JavaScript by maxhowell on Tuesday June 18, 2013 @12:46PM (#5900388)
Recently I wrote a less overwhelming pre-compiler that allows you type HTML inline with your Javascript, may be worth a look: http://mxcl.github.io/bs BullScript’s goal is just to make writing JS a little nicer, but not to be some whole new language.
Re:The Opa Framework for JavaScript by tracker1 on Tuesday June 18, 2013 @04:11PM (#5901728)
Somewhat silly question... why not write BSC in JS? I mean, this seems like something that would be a natural fit in a NodeJS environment, and tying into NPM similar to CoffeeScript, Less etc.

I don't mean to come across as an ass, just curious. Though, I do think what you are doing could be a natural extension to CoffeeScript itself.

Also, I would suggest having an htmlEncode(variable) by default, I know that htmlEncode isn't a built-in JS method, but you should want to escape html entities.

Re:The Opa Framework for JavaScript by maxhowell on Wednesday June 19, 2013 @11:01AM (#5905912)
Yes with hindsight I wish I had written it in JS, but writing the BS compiler was something I wanted to get done fast, and I'm more proficient with Ruby.

BS has the #x{foo} syntax for htmlEncoding, or did you mean that should just be the default?

Re:The Opa Framework for JavaScript by tracker1 on Wednesday June 19, 2013 @07:58PM (#5909285)
I didn't notice the #x{foo}, though was thinking that should be the default (safe-first), and if you want unsafe/raw have that be explicit.
Re:The Opa Framework for JavaScript by pepijndevos on Tuesday June 18, 2013 @03:07PM (#5901297)
So it's like PHP for JS?