[LISP] [Web] Let's work on the new Lispweb! [Standard]
Name:
Anonymous2015-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.
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
>>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.
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:
Anonymous2015-08-17 7:05
>>5 If you are the owner of that host, would you like to host old /prog/?
))))) 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:
Anonymous2015-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:
Anonymous2015-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:
Anonymous2015-08-17 21:54
What does /frog/ think of <http://haml.info/>? It's Ruby shit but it looks cleaner than Sexps.
Name:
Anonymous2015-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:
Anonymous2015-08-17 22:22
>>14 hipster/10, perhaps you would be more at home on hacker news?
Name:
Anonymous2015-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:
Anonymous2015-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:
Anonymous2015-08-17 23:08
Let ((( be an escape sequence for [[[ and [[[ an escape sequence for (((.
Name:
Anonymous2015-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.
>>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 {}.
HTML already escaping < > and &, though it's phenomenally worse by requiring the shitty longhand < > &. Having a single backslash here & 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:
Anonymous2015-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)))?>>>>)
Besides the use of HTML/XML/SexpCode, should the structure of a web document remain the same? I'm all for a step at a time and start writing a SexpCode parser. What should the extension of a SexpCode file be?
Name:
Anonymous2015-08-20 21:26
>>42 no it has to be completely different, since HTML is way way too complex
should the structure of a web document remain the same
Absolutely not. Attribute-ridden shit is the last thing we want to achieve. Cleaning up the current structure and giving it more logical names (what the fuck is a span) is the whole point of this.
Also, centering anything shouldn't be a royal pain in the ass.
Name:
Anonymous2015-08-21 0:02
One of the most important reasons for this is that it's impossible to write your own web browser today. That means the control is taken away from users and kept by companies that manage large software dev teams.
Everything about this has to be kept as simple as possible. Think about whether or not you could implement it in templeos (pretending it had a TCP stack).
Name:
Anonymous2015-08-21 2:21
Now that we've got a vague idea on a layout language, how do we format our lisppages?
Should the presentation be done entirely apart from the layout? Should we ban b, i, o, u? What about doing both in the same place? What are the pros and cons of using the current scheme?
>>50,51 If I recall correctly this site uses that to make sage names turn red when you hover over them.
Name:
Anonymous2015-08-21 9:25
One thousand css specifications are still better than one line of javascript.
Name:
Anonymous2015-08-21 10:06
>>52,53 Why would you re-create HTML and CSS from scratch while keeping Javascript intact?
Name:
Anonymous2015-08-21 10:33
>>54 I don't know. Why would you? That's a nice rhetorical question. Ponder it while you check my dubs.
Name:
Anonymous2015-08-21 12:45
Here's a good way to design a html/css replacement.
suppose you had some simple primitives for drawing and measuring text - what sorts of pages would be easy to create?
I think pages like this would be very easy: http://cr.yp.to/factorization.html - text with nice formatting, different sizes. but you just have text elements which take the height they need and wrap.
This would be a good start. I don't know how you would best buidl more complicated structures like tables and forms, but maybe we don't even need that.
This is my suggestion, it still lacks some things like user input, but I think it is a much more usable alternative to the HTML5/CSS3/JavaScript/Flash plugin combo that is the web today.
Name:
Anonymous2015-08-21 13:44
>>57 Context-sensitive grammars are a pain, though the rest sounds good.
Here we see how we can inform the browser of the language being used in the text. An intelligent browser should have the ability to translate it to another language if it better fits the users needs.
What
Mind explaining how this is to be implemented?
Name:
Anonymous2015-08-23 22:38
>>69 I think Google chrome already offers to translate pages when they are not in the native tongue as set by the user. It would just make it easy to identify what pieces of text are translatable, and from which language, and what pieces of text should be kept in the original form.
Name:
Anonymous2015-08-23 22:43
>>69 For instance imagine you have a website with French poetry translated to English side-by-side as is often seen in books.
It would make sense to indicate part of the text should not be automatically translated, while the other part should. Leaving it to the browser to detect the language of the entire document and try to translate everything is an inferior approach.
It might make sense to differentiate the language of a piece of text and whether it would make sense for it to be translated; however I didn't want to imply a browser would be forced not to translate something just because it was meant to be taken literally. It's a thin difference so I went with the simpler route.
>>71 I don't want to be the pessimist retard here but how are you stopping anyone from doing {language Arabic שָׁלוֹם}?
Name:
Anonymous2015-08-24 10:06
>>68 HTML5 has huge usage in video. Plain webm files are also getting common.
Name:
Anonymous2015-08-24 10:15
>>74 When people are presented with an easier and saner choice, they eventually migrate towards the saner choice. Maybe there is hope for the web after all.
>>77 I got you bro your dubs will always be checked
>>78 That's a terrible alternative because: 1. It can already be done (no one is forced to use any of those things) and they are not popular. Any attempt to use plain HTML would be just fighting using HTML+CSS+etc, which would meant a lot of people not even understanding the principles behind a document format for the user. 2. Not everything is an app either, why would I need an app if I just want for instance a small comment section? 3. HTML is objectively a poor document format. If you want non-interactive documents with a strictly defined look then you might as well use LaTeX.
>>57 Your proposal is sound but the grammar relies too heavily on context. It spoils the ``Lispiness''.
Name:
Anonymous2015-08-25 9:21
>>89 Well it would be too verbose otherwise, long lists of parameters are not easy to remember. It also adds to lowering the expectations of it rendering the same for everyone.
What functions would you replace and by what?
Name:
Anonymous2015-08-26 19:25
>>90 R5RS has functions with ~3 arguments and it's not verbose.
Name:
Anonymous2015-08-26 22:21
What does /prog/ think of putting logic and presentation in the same layer? We could do something about <span onclick="anus(); document.findObjectByTagId("AbstractTagFactory").some-css-shit-that-should-stay-css = "nigger"></span> by letting code be a first-class citizen in the new Lispweb. Of course, the logic should be designed to manipulate the AST on runtime and not to enable corner rounding appers to make ebin animations or jewssians and chinks to rape us with pop-ups and tracking.
Name:
Anonymous2015-08-26 22:27
By the way, I'm talking about something like this. http://hop.inria.fr/ It compiles to HTML and Javashit but web pages are written as programs and not as documents. It uses S-expressions but royally fucks up by using the same bloated tag set of HTML and literally makes them the car of the list (as in (<table> (<tr> (<td> niggers) (<td> niggers) (<td> niggers)))). Still an improvement though.
Name:
Anonymous2015-08-26 23:14
>>92 If it isn't designed with security as one of the key priorities, it wont be any better than what we have now.
>>95 Using memory errors to obtain remote code execution. cross site scripting. let's see, what else. Oh, china uses it to get people to launch a ddos with their browser, which is neat. Infinite pop ups. Someone on old /prog/ wrote a script that appended to the page in an infinite loop and it crashed every browser. At least try to address xss. Protecting against that in a way that doesn't depend on webdevs being smart is a step in the right direction.
According to Sgt. Dave Burke, who is in charge of the city’s LPR system, this change was not in response to Ars’ article, but rather was made primarily because the LPR computer—a Windows XP computer with an 80GB hard drive—was full and apparently "kept crashing."
Since Google is hyperaware that people tend to believe the company knows everything they do on the internet, it says right inside the app's privacy settings that the router is not tracking the websites you visit.
Name:
Anonymous2015-08-27 11:06
>>98 >>99 I guess it depends on what exactly you want lispweb to be. If you want lispweb to be a suitable replacement for the web, it will have to more powerful than it, in the sense that it lets you do more things, and better. But the way people actually use the web is that it's just a shitty, (supposedly) sandboxed version of normal desktop programs, where the only programming language is javascript and you can't do anything too interesting, like access arbitrary hardware. Many web sights could probably fit into the format you described, but most of the places people go on the web (facebook, email, youtube, amazon) won't - they require more complex formatting and client-side logic to fulfill their intended purpose.
What, then, are people who want to make a web sight like that to do if they wanted to use your system? Would you use a programming language that didn't let you use your own algorithms, and instead made you choose between a few pre-implemented ones? I see the value in such a system, because a lot of web sights are one of a small number of layouts, so making a system where it was easy to make things like that could be good (in addition to giving you some guarantees for reasoning about such pages, such as knowing that they are all of a few different layouts - like you said, much easier to make a language/interpreter/spec for).
But, from the observation that many places on the web follow that same format, it follows that the web is already a superset of that functionality - if you were to implement that idea, what advantage would it have over the web (HTML/javascript/etc) itself? It certainly has an advantage for implementors, but what about people who would actually make pages in your system - what do they gain by using a system with a subset of the functionality of an existing alternative? Sometimes only allowing a subset of possible inputs can give you something better in return - that's the whole point of static type systems, after all, and what you get is a strong guarantee about some of the properties of the programs that are allowed. In this case, though, what kind of guarantees do the users of such a system get in return (especially for the price of not being able to implement an infinitely large set of ideas that involve alternate layouts)?
If what you want is a nice way to make certain kinds of web sights, then that's a great idea, but I don't think it can compete with the web itself - a competitor to the web will need to be a superset, to appeal to the people who might use it, and it will need to be easier to reason about, to appeal to implementors.
Name:
Anonymous2015-08-27 11:10
>>99 gopher is just plaintext documents with links. still, it's very powerful and makes it easy to find what you want. So I'm not convinced that this is a bad idea from what you said.
Underscoring how much easier the service is to use than traditional BitTorrent clients, the ascension of Popcorn Time has resulted in an absolute explosion in piracy since its 2014 launch. Norway in particular has experienced a huge increase in piracy, with some estimates claiming that 15% of the population there has viewed pirated content within the last 12 months.
so usability was the barrier after all.
Name:
Anonymous2015-08-27 12:29
>>102 The goal was never to build web 4.0. What we require is something that can replace the terrible mudball that people have been adding to and adding to. Replace it with something that is simultaneously expressive enough to build "sites" for the things we want to do, and to be simple enough to implement by an individual.
What you said about "static type systems" is right: We need to restrict things a lot so that they can be implemented securely. Both implementors and users benefit from this. A simple-to-implement yet general way to design pages and layouts seems too difficult to come up with so far - so I proposed this alternative.
On a related note, can anyone explain what the Semantic Web is about? There's so much bullshit on the Internet about "web of data", "web 3.0" and "intelligent data" that it's hard for me to make any sense of it. So far it looks like they're using XML tag names to "give meaning" to things, which has been done for years.
Name:
Anonymous2015-08-28 15:11
>>112 some sperg retard nerds thought that tagging your HTML elements with "semantic" info would be the next big thing to help companies data mine the fuck out of everything.
Name:
Anonymous2015-08-28 17:40
sperg retard nerds
Did you mean ENTERPRISE retards and appers?
Name:
Anonymous2015-08-28 17:53
I think he meant ALPHABET stock owners
Name:
Anonymous2015-08-28 23:34
>>112-113 Furthermore another languages were made to specify the meaning of things, what same things are in different domains, restrictions between domains and so.
Imagine you know of three websites that sell books, even thgough they may specify slightly different things (some of them for instance sell magazines as well) the idea is you would be able to infer if concepts from different domains are compatible. This is related to formal language theory. You could also treat the three websites as web services and have automatic discovery and satisfaction of service requirements, this would be the semantic web applied to service cooperation and orchestration.
That is, if any of this wasn't academic hogwash.
Name:
Anonymous2015-08-29 17:58
Clojure is not a LISP.
Name:
Anonymous2015-08-29 20:24
Is nikita around these days? Sadkov? I quite miss him, I was the haskell guy on the other prog.
>>118 wrong thread and what do you mean? the dog owner? or do you think you were the only person on oldprog that knew haskell? anyway, yes - he has been around.
Let's get back on topic
Name:
Anonymous2015-08-30 16:12
>>89-90 You don't need to have functions with lots of arguments if you make everything an expression.
(Title Welcome to my websight)
would ``return'' a title object that's ready to be rendered by the browser and
(language French ( (title Welcome to my websight) )
would bind said object to a French language context, which is also an object that can be rendered by the browser. language is a function that takes two parameters: the name and the objects you want bound to the language.
After all, markup languages are in some way programming languages that run on the layout engine and languages which represent code with S-expressions are homoiconic.
Name:
Anonymous2015-08-30 16:39
We all know CSS is shit. Does anyone dislike its syntax, though? As much as I'd like CSS to have proper variables and nesting, is there anything wrong with the current selector {property: values} syntax? Is it necessary to use S-expressions for the new CSS?
Let's all be intelligent people and stop using the word "piracy" in connection with sending packets over the Internet. Piracy is about attacking ships, murdering people and stealing their possessions. Sitting peacefully at home and receiving network packets is about as far from piracy as making a breakfast or playing frisbee.
Keep in mind that SexpCode was meant as a replacement for BBCode, and not genuinely as a general-purpose markup language. So yes, I would treat the two parts of your first example as distinct, and I'd probably handle your second one with an ad-hoc exception (I don't think any of the existing implementations actually do, though).
I do think the way HTML handles whitespace is probably a better idea for a real markup language, but SexpCode as currently specified doesn't have {br} or even {pre …} or some other way to make whitespace deliberate, so it's deliberate by default. It's a thing that should probably be addressed.
~~~~
How would you implement significant whitespace in Sexpcode?
>>127,135 ``Piracy'' as a term meaning ``copyright infringement'' is over four hundred years old and you're both idiots.
Name:
Anonymous2015-09-20 2:19
Someone already FIOC'd HTML: http://jade-lang.com/ It would solve Sexpcode's }}}} but SIGNIFICANT WHITESPACE is evil.
Name:
Anonymous2015-09-20 2:25
>>143 What's the problem with implementing both? Honest question. You could even compiling Sexpcode to some kind of ``layout bytecode'' so anyone can make their websights in whatever language they want.
Name:
Anonymous2015-09-20 2:37
>>1 (div (img "foo.png") (br) (div (div (br)))))))fuck, forgot where I was at. Fuck this shitty LISP syntax and fuck you cult weirdo motherfuckers. There I said it. ))))))) )
>>145 The whole point of this thread is to leave behind the shit standards that force you to write endless divs, spans and ps, cretin.
Name:
Anonymous2015-09-20 4:17
>>142 The length of time used for such propaganda should not excuse its use as propaganda in this age. I do not accept the propaganda that equates copyright infringement to violence upon the high seas so I will never use “piracy” in any context that does not involve violence with ships. To be clear and accurate, I will only use language such as “copyright infringement” or even my preference “sharing information with my friends”.
Name:
Anonymous2015-09-20 4:18
>>146 HTML5 introduced many new elements that drastically reduce the need for endless div span soup. You should see it in action.
Name:
Anonymous2015-09-20 5:14
>>147 If somebody tells you that they are depressed, would you think they are sinking? Is the word "depression" a psychological state of being or is it a physical state? Words can have multiple meanings. Piracy in terms of digital media and piracy in terms of boats and pillage are not the same thing. Arguing about semantics is nonconstructive. What matters is in the dictionary.
Name:
Anonymous2015-09-20 15:10
Kind of off-topic but is there a reason why the HTML <script> tag has become synonymous with Javascript. Have they not ever tried to create a different client side scripting language. Javascript was created by a Jew so none of this should surprise me. The Jew controlled media won't let us hear about an alternative to Javascript.
>>149 piracy has violent and strong negative connotations - calling this quite different thing piracy is a tactic to force a particular opinion of it (vilifying it)
Name:
Anonymous2015-09-20 15:47
>>152 Exactly. This is just like using the label "racist" on anyone who opposes immigration from the Third World, or "sexist" on anyone who questions workplace privileges for women.
Name:
Anonymous2015-09-20 16:27
>>148 Care to provide some examples? I don't know what HTML5 is like, other than the myriads of ways to round corners and those <audio> and <video> tags that kinda work.
Have they not ever tried to create a different client side scripting language
https://www.w3.org/community/webassembly/ Bytecode for the web, which theoretically would allow any language to run on the web as long as there's a compiler to this hypothetical bytecode.
Name:
Anonymous2015-09-20 17:09
dubs
Name:
Anonymous2015-09-20 23:33
>>143-144 No whitespace-sensible content should ever be sent over the wire unless you are a masochist. Also, the constant tab tab tab is unsolicited bloat.
This is a stupid idea tbh. The various SGMLs have a legit usecase, and most of their use today stays in that domain. JavaScript is a good compilation target for QnD language implementations and WebAssembly will hopefully be better for more serious efforts.
Name:
Anonymous2015-09-23 13:08
>>158 SGML XML HTML all of these are bad as PROVED by the 'harmful' chart that guy made.
Name:
Anonymous2015-09-23 13:15
>>159 They are good for annotating e.g. a book because I want the end tag to be mandatory in that case <chapter> ... 100 pages of text ... </chapter>. They're shit for transporting something the size of a C struct around the network.
Such fleeting improvements are usually looks in practical form, like different programming paradigms described as "powerful" (easy to use for some) and supposedly cleaner operating systems. It's like humans evolving unusually sexy bodies. It would be cool if we kept them, but we don't need them. We live in ad-hoc hives, eat the flesh of enslaved lifeforms, and become sexually aroused upon viewing vague arrangements of triangles.
Name:
Anonymous2015-09-27 14:08
>>164 This is the most autistic post I have ever read.
Name:
Anonymous2015-09-27 18:19
We live in ad-hoc hives, eat the flesh of enslaved lifeforms, and become sexually aroused upon viewing vague arrangements of triangles.
It was all fun and games until the last one. I think >>164 tried to pretend to be an autist in a too obvious fashion so that everyone would think that xe's only pretending, but kinda gave xirself out with that one.
It's like as if someone tried to make a social commentary as if from a viewpoint of an alien, "they are made out of meat" style, but slipped up exposing xirself as an actual alien.
Name:
Anonymous2015-09-27 18:30
We live in ad-hoc hives, eat the flesh of enslaved lifeforms, and become sexually aroused upon viewing vague arrangements of triangles.
It was all fun and games until the last one. I think >>164 tried to pretend to be an autist in a too obvious fashion so that everyone would think that he's only pretending, but kinda gave himself out with that one.
It's like as if someone tried to make a social commentary as if from a viewpoint of an alien, "they are made out of meat" style, but slipped up exposing himself as an actual alien.
>>170 It's not about pronouns, it's about resisting the feminist cancer.
Name:
Anonymous2015-09-27 19:45
>>171 I see. You're the only thing standing strong protecting the world from the literally dozens of neon-haired idiots saying dumb things on twitter, by saying mean things to them. I thank you for your service, o keyboard warrior, your valor will not be forgotten!
>>172 I don't even go to Twatter, you moron. I go to prog and when I'm on prog, I don't want to read text contaminated by feminist dirt. That's why I've posted the corrected version.
Name:
Anonymous2015-09-28 21:47
>>176 you better get on there then, a whole community is going undefended from feminazis
only you can help save twitter from this scourge
Name:
Anonymous2015-09-28 22:26
>>177 But first you must ask, is twitter worth saving?
JavaScript is Indians shitting in the streets, but Lispweb is kikes shitting in your mouth.
Name:
Anonymous2016-03-28 19:46
>>184 Please elaborate, I have a Jewish scat fetish.
Name:
Anonymous2016-03-28 22:17
The human, typable textual format of the tag encoding is needless bullshit that holds this back. Allocate some Unicode control characters for begin & end tag, and have Ctrl-[ and Ctrl-] in your editor delineate your tags and output the proper control character. Ain't nobody got time for worrying about which internal characters to escape because you're trying to keep to the typewriter characters for both content and delineation.