Live data from Hacker News

Lisp-like html as a replacement to bbcode/markup/textile

94.249.190.129

41–50 of 83 posts

Re: Lisp-like html as a replacement to bbcode/markup/textile

#41
Xarn came up with a very similar implementation of an s-expression-based markup language a few years ago:

http://cairnarvon.rotahall.org/2010/05/25/towards-a-better-b...

It's fun to play around with for a minute, but unless you really like /prog/, you're rarely going to want that kind of flexibility in basic text formatting. Still, a sexpcode parser would make for a decent board gimmick, so I'm kind of surprised that no one (that I can remember, anyways) used it for that.

Re: Lisp-like html as a replacement to bbcode/markup/textile

#42
post #4

you mean like CURL? http://en.wikipedia.org/wiki/Curl_(programming_language) - used it years ago and it did not make my life easier.

but curl is a programming language itself. This is intended to be safe and primarily for markup. I did change from parens to angle brackets because of curl. It made much more sense because brackets are much less used in everyday chat, on non programmer sites. I made this after I made an html parser, so it's parsed in very much the same way. Curl is very very different.

Re: Lisp-like html as a replacement to bbcode/markup/textile

#43
post #21

No. How does it replace markup?! It's still writing html but (more or less) using {} instead of . That's just silly, imo. Markup (and restructured text) are so much more concise because you don't need to know what's or or whatever. Also, the page itself uses markup in HTML (not CSS)... wow.. back in 1995 again, are we?

Line by line parsers are extremely limited and markdown makes use of everyday characters we use in text for their formatting. The page itself uses style tags at the top so not sure what you mean. This is just showing off my progress so far of something I plan to use. Not an announcement telling you this is the future.

Re: Lisp-like html as a replacement to bbcode/markup/textile

#44
post #14

That look nice, but four things: divs. How to write something like Test lore ipsum ? Does this have a chicken scheme style named parameters? Inline HTML, especially useful for macros. {html i } should become i A unification and . It's not that easy to translate to html, but i felt there should be one mechanism, since they all just embed a another medium. The sematics would make more sense IMO. The macro expression ta…

I set it to parse attributes with this syntax {b_class="text"_id="foo" content}. It only supports the style attribute at the moment, because I was worried about people using stuff like onclick or inheriting a class with a huge width. I structured it like this mostly because it was easy to parse. I also support tags like p, span, cite, section, article, aside, sub, sup, hr and pre. I don't know what you mean in the last part about the macros.

Re: Lisp-like html as a replacement to bbcode/markup/textile

#45
post #17

Hmm, an awful lot of s in the generated code. Never mind that I'm not a big fan of explicit 's, either, as s-expression like formatting isn't that helpful once your actual content pushes the starting tag beyond the screen. SGML is actually not a bad idea if your markup content is pretty low ( It's still a bit line-noisy compared against markdown and, well, I've yet to see a forum using bbcode properly.

A new BR for every enter I press. The goal was to make the text in the textarea readable. Maybe that's why markdown uses 2 line breaks for every
but I'm not sure I want to do that.

Re: Lisp-like html as a replacement to bbcode/markup/textile

#46
post #5

Looks interesting. I would have prefered the use of () in place of {} though.

It's pretty easy to switch the delimiters. I plan to add it to a roleplay site first because they use parens much more than angle brackets. You can see the old version here, but it's a line by line parser http://rp.eliteskills.com/editing.php . They're using it every day.

Re: Lisp-like html as a replacement to bbcode/markup/textile

#50
post #22

Like all other html "improvements" this just trades one set of obscure conventions for another. A bit more consistent perhaps, and the macros are cool. How is this better than any other templating library though? Is the source available?

The difference is normal users are able to use this more easily when used as a markup language. People use parenthesis all the time as a delimiter for their ideas (they do this sometimes). So telling them to {i do this sometimes}, isn't much of a stretch when they want to change tones or context of what they say. If you know html, this is pretty much the same thing but with {tag content} instead of {tag}content{/tag}. Not a lot of memorization involved and if I allow any tag then it's the same set of html tags plus the syntax transformations I've added. There is no source. It's not quite finished, and even so, the source is in erlang. Not the most common of languages.
Post reply on HN