arisuchan    [ tech / cult / art ]   [ λ / Δ ]   [ psy ]   [ ru ]   [ random ]   [ meta ]   [ all ]    info / stickers     temporarily disabledtemporarily disabled

/λ/ - programming

structure and interpretation of computer programs.
Name
Email
Subject
Comment

formatting options

File
Password (For file deletion.)

Help me fix this shit. https://legacy.arisuchan.jp/q/res/2703.html#2703

Kalyx ######


File: 1493611447345.png (66.48 KB, 597x255, wG51k7v.png)

 No.49

Use whatever brace style you prefer.

But not this.

Don't do this.

Seek help instead of this.

 No.50

someone wishes they were using python? trying to hide the braces and semicolons

 No.51

;}}}

 No.52

>>49
i swear i've seen this thread before…

on another note, tabs >>> spaces. tabs save space (1 byte vs 2/3/4 bytes) and align properly with zero effort or configuration.

 No.53

>>52
Probably, but what better way to start discussion than to demonstrate where we all agree?

 No.54

>>52
This is ridiculous. Spaces are far better. Every character should be the same width. Tabs are unpredicatable, 4 spaces will always look the same, having a single character that is the width of 4 (or even worse 8) is just horrible. As for saving bytes that is just a dumb argument, there are so many things you can do to save bytes that I bet you don't do, why don't we just put all our code on one line to save on newline characters? Why not make every variable 1 character? Do you always leave out the braces if your conditional or loop body only has one line? Do you use the ternary operator where you can? The thing you are arguing for makes no sense. I'm one of the strictest people for optimizing as much as possible but you are trying to save a few bytes on storage of source code on disk, the biggest, cheapest storage there is. I can just delete 1 JPEG and I'll have the space for my spaces in code for the next year. You know that the compiled binary and actual program efficency will be unaffected right?

 No.55

>>54
Spaces are only useful for forcing your preferences upon other people, instead of letting them choose how big the indentation on their monitor is. Only use them if you don't want to publish or share your code.

Not part of my argument, but also useful description of Unix C code style:
http://man.openbsd.org/style
https://www.freebsd.org/cgi/man.cgi?query=style

 No.56

>>52
Yep that's the traditional lainchan format for starting off this flame war.

I don't get the point of this flame war either, why not argue about the colorscheme while we're at it? Light or dark? Light > dark. Fite me

 No.57

>>55
Guess I'll just write my own style guide then.

 No.58

>>55
The Linux style guide is also pretty good, makes a good argument for 8 character tabs too.

 No.59

>>58
>8 character tabs
That was the moment when I stopped reading their style guide and vowed to never contribute to the Linux kernel ever.

 No.61

>>59
congratulations

 No.63

>>59
okay autist, caring more about style than function
Isn't that kinda shallow?

 No.64

>>63
Its hard to write code if you want to vomit the entire time.

 No.68

>>64
Not as hard as writing something for the Linux kernel.

 No.104

>>59
What a major loss for the linux community. Note that a tab width of 8 is recommended, since it's tabs though, you can set that to whatever you want, so that entire point is moot.

 No.111

>>104
That's one of the reasons I prefer tabs, you can set the width of tabs to whatever you like.

I think it's stupid to argue so much about something as irrelevant as motherfscking whitespace.
One could argue about a lot of things instead of just getting some work done, and tabs is certainly one of the most trivial of subjects.

 No.301

>>55
>Spaces are only useful for forcing your preferences upon other people
Says the guy forcing his preferences upon other people. Spaces vs \t don't fucking matter. Just keep it the same through the whole program and don't be one of the weirdos who uses 2 spaces.

 No.303

Tabs for indentation
Spaces for everything else

 No.487

>>49
Tbh fam if I could set my editor up to do this for me and I could code like I was typing python, I'd rather use that. If you really trusted the editor you could even just set the color of brackets to the background color and do C like its python

 No.488

>>487
>set the color of brackets to the background color
And get weird ass bugs that you can't track because you can't see the missing or excessive brackets

 No.494

>>487
>>488
But here's a better idea. Write a script that takes indented text and inserts brackets around different levels of indentation. Should be a piece of cake.

 No.521

https://arxiv.org/abs/1703.01192
>This paper is written for programmers around the world. We hope by freely sharing a powerful new discovery, we might inspire you, dear programmer, to create new tools and languages, so that we all may experience a quantum leap in programming productivity.
>We include a Visual Abstract to succinctly display the problem and discovery. Then we describe the problem–the abstract syntax tree (AST)–and introduce the novel solution we discovered: a new family of 2D programming languages that align source code with geometric trees and remove the AST. Then we make some predictions and conclude with a plea to steal this idea.

 No.522

>>521
So Lisp with significant white-space?

 No.523

File: 1502628098911.jpg (10.42 KB, 210x240, DGRXGY6UQAA9uhv.jpg)

>>56
Aaaahhh.
No it isn't dark is better.
Oooohhhh I'm so mad.



[Return] [Go to top] [ Catalog ] [Post a Reply]
Delete Post [ ]