Arc Forumnew | comments | leaders | submitlogin
3 points by evanrmurphy 5113 days ago | link | parent

Feel free to steal from the previously written html.arc alternatives if you find anything useful:

- almkglor's whtml.arc: https://github.com/nex3/arc/blob/arc2.master/whtml.arc

- jazzdev's sml.arc: https://github.com/nex3/arc/blob/master/lib/sml.arc

- my html.arc: http://arclanguage.org/item?id=12010

As webapps become increasingly javascript-driven though, I think the need to write html decreases. That's why I'm personally more interested in lisp->javascript now than lisp->html (and also why I haven't done much with the html.arc fork linked above since posting it).



2 points by evanrmurphy 5113 days ago | link

From hasenj's deleted comment:

> that's why I'm considering playing with coffee-script/node.js next

Yes. That's where I'm at.

I think CoffeeScript is wonderful. If only it had macros we'd be set. I've made a bit of progress on that front (i.e. https://github.com/evanrmurphy/SweetScript) and will post about it soon.

Email me and we'll talk about javascript, hasenj!

-----

3 points by fab13n 5103 days ago | link

> If only it had macros we'd be set.

Working on this: https://github.com/fab13n/parsec-coffee-script

It's a port of metalua (https://github.com/fab13n/metalua), a macro + syntax extension system for Lua. Given that CS's grammar is more exuberant than Lua's, the parser combinator library that supports runtime syntax extension requires much more work.

-----

1 point by hasenj 5112 days ago | link

> I think CoffeeScript is wonderful. If only it had macros we'd be set.

It is.

I'm not sure about macros, but having something similar to s-expressions would be nice.

The only thing still kinda holding me back is html templating. Doing them in {{ templates }} like that was a horrible experience with Django. Jinja2 made it a bit more bearable, but {% endtag %} kind of stuff is still bad.

-----

1 point by evanrmurphy 5112 days ago | link

> I'm not sure about macros, but having something similar to s-expressions would be nice.

Yes, s-expressions too. But what aren't you sure about regarding macros. (And what do you see as the benefit of s-expressions besides macros?)

> The only still kinda holding me back is html templating. Doing them in {{ templates }} like that was a horrible experience with Django.

Are you referring to http://mustache.github.com/ ?

-----

1 point by hasenj 5112 days ago | link

> what do you see as the main benefit of s-expressions besides macros?

For this specific problem (html generation), the advantage of s-expressions is you can build a tree with it, with minimum boilerplate. For example, the closing tag is just a ')'. Also, again for this specific problem, because we're mostly just generating strings, just having functions would probably suffice.

> Are you referring to http://mustache.github.com/ ?

Yea. I was looking for html templating system for Node, and that was about the only thing that came up.

-----

2 points by garply 5112 days ago | link

Hey Evan,

What's the status of your arcscript? Do you have something usable? I'd love to use it if you feel like sharing.

-----

2 points by evanrmurphy 5112 days ago | link

Thanks for asking! It's in active development at https://github.com/evanrmurphy/SweetScript. I just added some install and run instructions so give it a go!

I'd love for you to use it and to have your feedback. Of course, it's still unstable, poorly documented, etc. Please open lots of issues and send me emails to the tune of "Why the hell <x>?". I'll always try to give you a personal response.

Also, if you're interested in working together on it, or just forking it and changing a bunch of stuff, that could be really neat! :)

-----