Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

[LISP] [Web] Let's work on the new Lispweb! [Standard]

Name: Anonymous 2015-08-17 1:10

We're all sick of dealing with the verbosity of XML/SGML based languages, the inconsistency of CSS and the overall badness of Javashit. Transcompiling to any of these languages is just a half-assed try at sugarcoating a turd.

Post your ideas for syntax/semantic rules, document structure, protocols, rendering techniques or anything relevant to the topic.

Hopefully we will be able to create a basic clone of /prog/ using the newly designed languages. No need to work on retarded features like animations or ``single page applications'' because this project is aimed exclusively at EXPERT PROGRAMMERS.

Name: Anonymous 2015-08-17 1:38

bump the previous thread

Name: Anonymous 2015-08-17 1:57

Using Sexps is the obvious way to go until you realize ))))) is only marginally better than </div></div></span></div></html>. I propose we use FIOC. It can be easily edited by humans on any text editor without installing any plugins.

It would look like
# This is a comment
# Header
name "/prog/ - Programming"
# Content
section
title "Giant sea cucumber eats with its anus"
text "This is a post"
section


No need for pointless html/head/body tags.

Name: Anonymous 2015-08-17 2:00

>>2
What was the title of that thread again?

Name: Anonymous 2015-08-17 2:21

>>3
Your text ``tag'' is a shit idea. Read this.
http://cairnarvon.rotahall.org/misc/sexpcode.html

Name: Anonymous 2015-08-17 2:50

>>3 is stupid
there is a problem with sexps though.
Assuming you use strings e.g. (body (p "welcome to my `cool' website")) then you are fucked if you want to use " inside a string, yes you can \" escape it but what if you wanted to paste some large text from esle-where into a lispweb document. You need a special editor or something.

XML gets around this problem by .... wait no it doesn't fuck XML.

Anyway it might be useful to have triple quote """ strings which allow stuff like " inside it.

Name: Anonymous 2015-08-17 3:02

>>3,6
You are bloating it. Drop the quotes.

A stack for parenthesis, car and cdr are all you need to unambiguously parse this. (body (p welcome to my `cool' website)) works just as fine as long as your ``subset'' of S-exprs doesn't have a quote function (you don't need a full-fledged Lisp to describe and format text anyway).

Name: Anonymous 2015-08-17 7:05

>>5
If you are the owner of that host, would you like to host old /prog/?

Name: Anonymous 2015-08-17 7:06

oh there's already a bbs.

Name: Anonymous 2015-08-17 19:09

>>7
how do you produce that from a normal lisp/scheme? seems like you need an extra translation step (security bugs will be introduced here).

And how you write text taht includes a bracket in it?

quotation and escaping are fundamental

Name: Anonymous 2015-08-17 19:23

>>3
))))) is only marginally better than </div></div></span></div></html>
This is wrong though, right parentheses don't contain information about what expressions they close, so there is no ambiguity or question about their function. In (HT|X)ML though, you must close your tag with the name of the tag you are closing, giving rise to a whole class of errors of the form <tag1><tag2></tag1></tag2>. The removal of this class of errors makes writing, reading, and parsing the language much easier for computers and humans alike. Have you ever had the misfortune of having to use a tagsoup-like XML "parser"? Sexps make them obsolete: since there are no closing tags, all sexprs with the right number of parentheses form valid trees.

Name: Anonymous 2015-08-17 20:22

>>11
It makes the document easier to parse, but it's still a pain in the ass to read by a human. This is why S-exprs are better but only marginally.

Name: Anonymous 2015-08-17 20:26

>>10
Escape them.
(body (p Welcome to my `cool' website \(this is my example text\) )
(body (p Welcome to my `cool' website %(this is my example text%) )

Name: Anonymous 2015-08-17 21:54

What does /frog/ think of <http://haml.info/>? It's Ruby shit but it looks cleaner than Sexps.

Name: Anonymous 2015-08-17 22:22

>>13
so coming up with some weird new lisp syntax that no one else uses and hase unclear whitespace semantics and escaping brackets.. instead of using normal sexps and escaping quotes inside strings is somehow better?
color me unimpressed

Name: Anonymous 2015-08-17 22:22

>>14
hipster/10, perhaps you would be more at home on hacker news?

Name: Anonymous 2015-08-17 22:26

How would Niggers (tongue) ``my anus''! be expressed in this s-expression based language?

Using quotes:
(b "Niggers " (u "(tongue)") " " (i "``my anus''")) "!"
Drawbacks:
- That silly " " between the (u) and the (i)
- Quote overload. If the language allows single or double quotes for delimiting strings, we end up with the '""' and "''" crap used in Bash and FIOC. If only one type of quotes is allowed, it would be necessary to escape any other kind of quotes.

Typing the text straight a la BBCode:
(b Niggers (u \(tongue\)) (i my anus))!
Drawbacks:
- Ugly escaping
- Any whitespace after the function name can't be used as a delimiter anymore. This means (b Niggers(u \(tongue\))(i my anus)) ! would output Niggers(tongue)my anus !. This means whitespace is now significant.

Anything else?

Name: Anonymous 2015-08-17 22:27

>>15
In the case you allow strings to be escaped, how would you nest tags like in BBCode and HTML?

Name: Anonymous 2015-08-17 23:08

Let ((( be an escape sequence for [[[ and [[[ an escape sequence for (((.

Name: Anonymous 2015-08-17 23:10

>>17
What if the parser is aware of tags that have text arguments. It could read until the next balanced closing non-escaped paren.

Name: Anonymous 2015-08-17 23:15

How about this?

(b Niggers (u {(tongue)}) (i my anus))!

Where {} is a balanced curly verbatim. And [] could be balanced verbatim with backslash escapes for non-balanced [].

concept stolen from sexpcode

Name: Anonymous 2015-08-17 23:32

>>19
That was web apper quality!

Name: Anonymous 2015-08-17 23:34

>>21
How would you escape curly braces though?

Name: Anonymous 2015-08-17 23:43

bbcode does't seem to suffer from this problem.I propose to based everything on bbcode.

Name: Anonymous 2015-08-17 23:45

>>24
How would you escape square brackets though?

Name: Anonymous 2015-08-18 1:25

>>23
You would not be able to represent unbalanced {} inside of a {}. But inside of a [] you could escape [,] with backslashes, and backslashes need to be escaped. Arbitrary text would be serialized safely inside of a [] with [,],\ escaped. Most hand written documents would have balanced brackets and could be written inside of {} without worry about escaping any characters.

With backslashes if they were not balanced. Backslashes need to be escaped with more backslashes. In most text they are balanced, so someone writing a document wouldn't need to worry about backslash hell with {}.

Name: Anonymous 2015-08-18 1:26

Wow, ignore the second paragraph. I'm spaced out today.

Name: Anonymous 2015-08-18 1:48

>>25
[#][b][/b][/#]

Name: Anonymous 2015-08-18 2:05

>>28
HTML and BBCode are isomorphic. We're trying to find a replacement here.

Name: Anonymous 2015-08-18 2:12

>>29
What do you mean by ``we''? I don't give a shit about finding any replacement.

Name: Anonymous 2015-08-18 2:15

>>30
Keep rounding those corners.

Name: Anonymous 2015-08-18 6:18

is bbcode turing complete?

Name: Anonymous 2015-08-18 8:40

HTML already escaping < > and &, though it's phenomenally worse by requiring the shitty longhand &lt; &gt; &amp;. Having a single backslash here &amp; there like better languages is an improvement.

Fuck, just do sexprs with angle brackets: <b Here is my text, but 2 \< 3 still needs an escape>

Name: Anonymous 2015-08-18 11:51

Fuck all y'all's fixed definition of delimiters.

The first two space-delimited symbols of the document should declare the opening & closing delimiters. Inside the document, a "delimiters" tag can specify new ones within its scope.

( )
(b Hey, it's plain sexpr with real parens!)
\(but we don't want to have to do this \(escaping shit\)\)
(delimiters << >>
<<p So why not <<b (switch (it (up)))?>>>>)

Name: Anonymous 2015-08-18 12:47

>>34
Disgusting.

Name: Anonymous 2015-08-18 13:28

>>33
Sir, I just wish to congradulate on your dubs.
But why, I aske, using angle brackets instead of round? And what of whitespace?

Name: Anonymous 2015-08-19 9:07

>>36
Delimiters should be the least used characters from the text. Parens occur fairly often. Therefore >>34 actually does make some sense.

Whitespace is largely the same as HTML. <[i]tag whitespace html-like-text[/i]>. Attributes can be sub-tags before the HTML text.

Name: Anonymous 2015-08-19 9:07

also, fuck bbcode & Reply instead of Preview.

Name: Anonymous 2015-08-19 13:42

The solution for this problem already exists and it's called Sexpcode.

Name: Anonymous 2015-08-20 1:04

>>39
I can attest that this is true.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List