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

Pages: 1-

Code is not a text string

Name: Anonymous 2014-04-26 7:33

Why does everyone think that source code can be stored in a text string? It's fucking 2014, you morons. The natural data structure for code is a tree, like in XML. Why do I have to put up with someone else's style conventions, superfluous comments, or with shitty generic syntax? If code was stored in XML, the IDE would be able to display it any way I want. One guy likes the {;} shit, another likes FIOC; one guy likes the faggot GNU style guide with a bunch of lines occupied by only one brace, while another likes the manly

void foo(int x) {
return; }


and so on.

So why the fuck is it still a one size fits all paradigm? It's not like a high school student can't write an XML parser these days. The days of Notepad are over. Besides, it's possible to output XML source code as text, as well as parse text code into XML form. So why the fuck is everyone still in the Stone Age? Either I am a genius, or everyone in the programming industry is an idiot.

Name: Anonymous 2014-04-26 7:36

Oh, I'm sorry, not everyone is an idiot. For instance, Paul Philips (an ex-dev of the Scala compiler) thinks the same:
http://www.youtube.com/watch?v=TS1lpKBMkgg&t=2296

why is the canonical code representation a STRING?

Name: Anonymous 2014-04-26 7:45

The canonical code representation is a SEXPR.

Name: Anonymous 2014-04-26 8:51

XML sucks and you should feel bad, your arguments also suck

One guy likes the {;} shit, another likes FIOC; one guy likes the faggot GNU style guide with a bunch of lines occupied by only one brace, while another likes the manly...
and some guys like putting the xml ending tags in the same line while others want to puts them in other line

you're mom

Name: Anonymous 2014-04-26 9:24

>>3
Sexpr is a degenerate form of XML.

>>4
My arguments are brilliantly clear and you don't even have any.

and some guys like putting the xml ending tags in the same line while others want to puts them in other line

The IDE won't show you the XML, you idiot, it will show a customizable view into the code with the style and even syntax that you personally like. And it will be totally shareable with the others on your team, even if they have different preferences.

Name: Anonymous 2014-04-26 9:39

>>5
Sexpr is a degenerate form of XML.
are you one of the enterprise programmers I heard about?

The IDE won't show you the XML, you idiot
Who the fuck uses IDEs?

My arguments are brilliantly clear and you don't even have any.
fuck you[i]![/i] you make me feel bad

it will show a customizable view into the code with the style and even syntax that you personally like. And it will be totally shareable with the others on your team, even if they have different preferences.
this can be applied in normal code

Name: Anonymous 2014-04-26 9:53

>>1,5
Here you go, you degenerates:
http://snap.berkeley.edu/

Name: Anonymous 2014-04-26 10:21

>>7
lawl
>>1
Can you give an example of what you mean, i.e. some XML hello world with whatever options you have in mind and can you explain why what you mean is hard to develop with a 1-man team
available? (you)

In short, I believe you're talking about a file format about code representation. This will possibly add to complexity. (what about common lisp macros?)

Name: Anonymous 2014-04-26 10:25

>>6
it will show a customizable view into the code with the style and even syntax that you personally like. And it will be totally shareable with the others on your team, even if they have different preferences.
this can be applied in normal code
Something like this?
https://www.gnu.org/software/indent/
But this should be considered a hack and not a solution.

Name: Anonymous 2014-04-26 10:43

After you strip the bullshit, XML is trees. However, trees in internal representation add another compilation phase for no benefit because the programmer still operates on text without enforced grammar: You'd either have to insert new code one subtree at a time or deal with data that is invalid more often than not.

Just use Lisp.

Name: Anonymous 2014-04-26 11:09

uses an OS where everything is line based files
complains about source code being treated that way

meanwhile the big kids are making their own operating systems

Name: Anonymous 2014-04-26 11:24

>>11
Whose statements are you repeating?

Name: Anonymous 2014-04-26 11:29

>>12
It's an imageboard thing.

Name: Anonymous 2014-04-26 11:42

>>11
Who[i]m[/i] are you quoting?

my son is a kike, faggot nigger
I am quoting your mom for example, please tell me whom are you quoting?

Name: Anonymous 2014-04-26 12:24

>>14
Are you schizophrenic?

Name: Anonymous 2014-04-26 12:26

having access to the tree structure of code is useful for selecting bodies of code without having to highlight it manually with a mouse. And being able to traverse the tree structure of the code in the editor. But this tree structure can be constructed by the editor when the text file is loaded, so the code doesn't need to be stored in XML. Storing code in XML only causes people not using the same editors to be unable to view and edit the file in a sane way.

It would be interesting to see a diff of tree-ified code. But this can also be done at the editor level. The documents being diffed don't need to be in XML. XML is a way to encode tree structures in text, which is no different from the purpose of a syntax for a programming language, assuming the language is parsed into trees naturally. concatenative languages are not.

Name: Anonymous 2014-04-26 12:33

OMG XML IS A TEXT STRING!

Name: Anonymous 2014-04-26 12:35

>>5
Sexpr is a degenerate form of XML.
Fuck off and die in a fire, Reddit fagshit.

Name: Anonymous 2014-04-26 16:32

>>10
But is there a Lisp with a System F-omega type system?

Name: Anonymous 2014-04-26 16:34

>>1

Yeah! Code is a byte array.

Name: Anonymous 2014-04-26 16:39

>>19
Is there any implementation of System Fω at all?

Name: Anonymous 2014-04-26 16:46

>>8
Compare this:
void foo(int[] x,int j)
{
if(true)
{
//Lorem ipsum dolor sit amet, consectetur adipisicing elit
//sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
x[1]=get_fucked(x[2])+get_stoked(x[x[j]-2]);
//Ut enim ad minim veniam, quis nostrud exercitation
x[2]=get_fucked(x[3])+get_stoked(x[x[j]-2]);
//Ut enim ad minim veniam, quis nostrud exercitation
x[3]=get_fucked(x[4])+get_stoked(x[x[j]-2]);
}
}


with this:
void foo(int[] x, int j) {
if (true) {
//Lorem ipsum dolor sit amet, consectetur adipisicing elit
x[1] = get_fucked(x[2]) + get_stoked(x[x[j] - 2]);
x[2] = get_fucked(x[3]) + get_stoked(x[x[j] - 2]);
x[3] = get_fucked(x[4]) + get_stoked(x[x[j] - 2]); }}

I think the first version is as readable as a pile of shit, and someone else might think the opposite, but why does there have to be only one choice? It's the same piece of code, just viewed differently. With an underlying tree representation it's easy to display one and the same piece of code whichever way you like. It would even be possible to customize the syntax and make your code look like Symta without sacrificing any readability by others.

>>18
Restrict XML to just one tag and write that tag as a bracket. There you have it: s-exprs. That's why they're a degenerate form of XML.

Name: Anonymous 2014-04-26 17:51

>>21
Haskell.

Name: Anonymous 2014-04-26 19:02

>>22
The latter is indeed more readable.

Restrict XML to just one tag and write that tag as a bracket. There you have it: s-exprs.
<tag>data</tag> is the degeneration of (tag data), you ENTERPRISE chucklefuck. S-expr parsers are readily available and you can make your own in 10 minutes.

IHBT

Name: Anonymous 2014-04-26 19:39

>>1,5
This is a decent suggestion save for two problems: (1) XML is a horrible ugly format to choose for serializing tree data and (2) there are not many good tools for interactively editing an AST. Text editors have been evolving for decades. Higher level representations have not taken off for the same reason M-expressions didn't - if you define a serialization format that's easy enough to edit directly, people will just do that.

Name: sage 2014-04-26 19:48

why are people complaining about XML

it doesn't fucking matter what implementation is used, you'll never be in contact with it

[yes XML is disgusting and shit]

Name: Anonymous 2014-04-26 20:29

>>26
Because >>1-san specifically wrote about XML. He actually mentioned how it's about trees in the end, but almost his entire post focuses on XML and its ``virtues''.

It's the n-th reinvention of Lisp anyway, who cares.

Name: Anonymous 2014-04-27 1:09

>>1
Now you need to add XML support to every popular text editor. Now you need to add formatting rules to every popular text editor, which may be adjusted according to each individual's personal preferences. Now you need to cope with the losses you suffer in expressiveness for particular programming languages. Now you need to worry about converting source code from the old format to the new format. Now you need to worry about adding support in compilers, interpreters, etc.

You're not proposing a solution, you're proposing a problem.

Besides, it's possible to output XML source code as text, as well as parse text code into XML form.
So why look for arguments? If you really believe in this representation, adopt in your own programs. Start off small by storing your own source code this way, then convert it to the old format at build time. See if it catches on and keep us updated on it.

Either I am a genius, or everyone in the programming industry is an idiot.
The latter. Beware of the ones who believe they're geniuses. :-)

Name: Anonymous 2014-04-27 1:33

>>28
> :-)
>LEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEL
>LE CLEVER FACE ;DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
>LEEEEEEEEEEEEEEEEEEEELELELELELELELE /:-)/RO LLELLELELELELELELLELELLELELELLELELELE
>LEEEEEEEEEEEEEEEEEE ANGRY GENIUSES FACE >:((((((((((((((( :DDDDDDDDDDDD LELELELELELLELELE
>LEEEEEEEEEEEEEEEEEEEEELELELELELLEELELELLELELEL

Name: Anonymous 2014-04-30 8:20

Everyone back to Reddit.

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