[ / / / / / / / / / / / / / ] [ dir / agatha / animu / bestemma / cop / imouto / joosten / kemono / qanon ][Options][ watchlist ]

/tech/ - Technology

You can now write text to your AI-generated image at https://aiproto.com It is currently free to use for Proto members.
Name
Email
Subject
Comment *
File
Select/drop/paste files here
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Expand all images

File (hide): 84b04285f0650a5⋯.jpg (86.15 KB, 719x487, 719:487, r_896717_UyYsv.jpg) (h) (u)

[–]

 No.867978>>868045 >>868058 >>868068 >>868083 >>868099 >>868190 >>868342 >>868356 >>868674 >>868691 >>868730 >>868793 >>868972 [Watch Thread][Show All Posts]

Tabs or spaces?

Perfect indent size?

vim or emacs?

 No.867983>>867986 >>868043

There exists no sane argument for using spaces for indentation.

Only webdevs who are too retarded to indent properly insist on using spaces. Real programmers like the Linux kernel devs use tabs.


 No.867986>>868017

>>867983

What does stallman use?


 No.867994>>867995 >>868006

>these statistics

The real truth is most programming jobs today involve languages where space-based indenting is more common.


 No.867995>>868005 >>868006 >>869599

>>867994

This. No one writes C anymore.


 No.868005>>868008

>>867995

We are still writing software for low resource embedded computers, and also operating systems, and compilers. These are today's C applications for new projects.


 No.868006

>>867994

>>867995

python programmers spotted


 No.868008>>868012

>>868005

Everything will be javascript in the future and you can't stop it.


 No.868012

>>868008

I don't need to stop what doesn't exist.


 No.868017>>868545

>>867986

>What does stallman use?

Nothing, since he does not write code any more.


 No.868022

java bots and DEVOPS make more than freelancers, right?


 No.868043>>868098 >>868278 >>868539

>>867983

If you're writing your code for yourself, sure. Almost all projects using tabs fuck up on my screen because I use a different tab width than them.

>inb4 it's the "enjoy pressing space multiple times" autist

// vim: expandtab tabstop=4 shiftwidth=4:


 No.868045

File (hide): 1f05cfe2f2ce029⋯.jpeg (3.63 MB, 3008x2149, 3008:2149, 5D41BCC3-963F-43BC-A355-E….jpeg) (h) (u)

>>867978 (OP)

SPACES!


 No.868058

>>867978 (OP)

spaces

8

GNU emacs


 No.868068

>>867978 (OP)

>2018

>using tabs space

>not spaces

>not letting the client side render spaces properly on web view

>not letting the programming software handle spacing/auto tabbing but with spaces

>using windows

cold hard truth


 No.868070>>868076

I graduated at the top of my Javascript programming class, and I don't even know what the tabs button does. It's a remnant of the past, like racism and sexism in the workforce.


 No.868071>>868075 >>868076

Who the fuck uses spaces? I have been taught it all the classes in college to use tabs, I have never seen a single person use spaces. Girls who do webdesign?

https://users.ece.cmu.edu/~eno/coding/CCodingStandard.html#formatting


 No.868075

>>868071

Using spaces is the /g/ equivalent of flat earth meme.


 No.868076>>868081 >>868096

>>868071

The instructor probably expects the students not to be able to handle spaces as it's easier for them to fuck it up because they don't know how to use an editor properly.

>>868070

Everyone still uses the tabulator key


 No.868081>>868362

>>868076

WTF is a tabulator key?


 No.868083>>868090

>>867978 (OP)

Spaces because copy paste is predictable. Vim because I need an editor, modal is perfect, and for the rest I use tmux anyway.


 No.868090>>868097 >>868281 >>868363

>>868083

>modal is perfect

Even the vi creator thinks it's shit now that we don't use slow teletypes.


 No.868096

>>868076 junior college student computer engineer students can't handle spaces?


 No.868097

File (hide): e1e7720436da60c⋯.jpg (66.08 KB, 405x343, 405:343, 1457561770604.jpg) (h) (u)

>>868090

haha vim btfo


 No.868098>>868361

>>868043

>tabs fuck up on my screen

Explain. As long as some retard didn't use spaces for indentation it shouldn't matter what width your editor displays tabs as.


 No.868099

File (hide): 572c1f3096e25c2⋯.png (33.07 KB, 800x500, 8:5, debait.png) (h) (u)


 No.868190

>>867978 (OP)

>Tabs or spaces?

Both. Tabs for indentation, spaces for alignment.

>Perfect indent size?

3

>vim or emacs?

vim


 No.868241>>868285 >>868782

>spaces only

+ full control over indentation and alignment in a matrix-like display (any monospaced font)

+ looks exactly the same in every computer

- takes up more disk space (but who the fuck cares)

- contributors to a project must configure their editors to use the same amount of spaces

>tabs only

+ just werks, regardless of editor config

- what looks good with one configuration may not look as well aligned with another one

- may not look exactly pretty depending on how you want to align something

>tabs and spaces

+ "ackshully, it's semantically correct"

- unless your editor displays spaces and tabs differently, you may end up fucking up and making it look wonky in other configs

- actually have to spam space like a dumbass whenever you want to align something

- some indent sensitive languages may subtly break HOLY FUCKING SHIT

- copypasting is a fucking oddissey

Why would ANYONE pick anything other than spaces only?


 No.868278>>868361

>>868043

What does this do?


 No.868281>>868616

>>868090

>Even the vi creator thinks it's shit now that we don't use slow teletypes.

A screen editor wouldn't be usable on a teletype. You would use a LINE editor like ed.

And he didn't say its "shit". He just said the design is the way it is because of having to use a slow modem connected terminal.

http://www.theregister.co.uk/Print/2003/09/11/bill_joys_greatest_gift/


 No.868285>>868306

>>868241

>unless your editor displays spaces and tabs differently

Why wouldn't it?

>actually have to spam space like a dumbass whenever you want to align something

Just use editors with automated alignment

>some indent sensitive languages may subtly break HOLY FUCKING SHIT

Because their parsers are retarded. Prove me wrong.

>copypasting is a fucking oddissey

What?

>Why would ANYONE pick anything other than spaces only?

For me it doesn't matter how this is stored in files if the editor treats indentation block as a single char. But most don't so for example moving with arrows takes more time. And depending on the font and screen size i may want different indent size.


 No.868291

>mixing tabs and spaces

absolutely DESIGNATED


 No.868306>>868345

>>868285

>Why wouldn't it?

Because it requires certain types of terminals that may be commonplace now, but they still haven't been configured as the default for most text editors. You can configure your text editor to highlight tabs, but you better have a decent terminal and color scheme. Otherwise, most text editors represent both tabs and spaces as blankspace.

>Just use editors with automated alignment

Which text editors do have smart ALIGNMENT and not indentation? Alignment usually requires deep understanding of language semantics, which usually requires integration with beefy linters, which isn't something many editors or languages have. Fuck, some languages' official code conventions are designed with tabs-only in mind and look like shit, and I doubt linters will ever contemplate smart alignment if the language's official conventions say otherwise.

Basically, with spaces only, you can perfectly align something by pressing space once or twice. With tabs, it is impossible and futile, and mixing them, since your tabs are actual tabs, you need to press space a shitload of times snd you only save the keystrokes for current indentation level.

>Because their parsers are retarded. Prove me wrong.

Yeah, but they are still more useful and worth using than your shitty "muh semantics" code conventions.

>But most don't

Eh, no. That is a very basic feature, much more basic than highlighted tabs and intelligent code alignment. Point is, mixing tabs and spaces provides no advantages and a myriad of problems so just don't do that shit.


 No.868342

>>867978 (OP)

The correct answer to all code style wars questions.

If you're working for someone else, as part of a team, or part of a project you use the style that's already been established.

If there is no official style established yet defer to the language style guide (i.e. PEP8, Effective Go) or the style guide for the framework or most used library (i.e. Qt Style Guide, Poocoo (Flask) Styleguide).

If there's nothing like this available and you are working with others, consider following the style of a major project in the same language. For instance, if starting a project from scratch in C, try the Linux Kernel style guide, or look at Google's internal style guides. If no language specific style guide is acceptable you must decide collectively. Construct a style guide of simple cases for your chosen language and libraries and put each item to a vote. Allow everyone to vote multiple times (so as to determine what's most agreeable for the whole team). Don't allow arguments to take over the decisions. Don't flip flop on style rules, once the rules are in place try very hard not to change them. If rules must be changed be sure to refactor code to match the new style rule as soon as is convenient.

If you're the dictator of a project, it's perfectly acceptable to just use whatever you feel like at the time. The most important thing is to pick a readable code style and apply it consistently. Never deviate from the style guide unless you're refactoring all code to follow a new pattern.

tl;dr: Follow pre-established styles when working with others, especially on projects you don't own. When none are available or effective pick something the majority of people working working on the project can agree with. Code conistancy and readability are the only things that really matter.


 No.868345>>868355

>>868306

>terminals

M8, people are using fucking browsers and ides writtent in java nowdays.

>and not indentation

Their smart identation is just inserting multiple spaces, they don't treat them as a single char when you going though them.

>you need to press space a shitload of times

>i don't know how to assign shortcuts, lets change the dafaults

>Yeah, but they are still more useful and worth using than your shitty "muh semantics" code conventions.

So why would i care about this shitty languages while using others? There are also preparsers for that, i can write as i like and then replace for the interpreter.

>That is a very basic feature

Never saw this working when deleting an endline. This actually forses for additional clicks like ctrl or holding del.

>provides no advantages

Customizable size of the ident, which is logicaly a single char.


 No.868355

>>868345

Actually from this point it's reasonable to store tabs coz you can easily convert them to spaces, while converting spaces to tabs could fuck up alignment.


 No.868356>>868369

File (hide): 249eb60538ffd91⋯.png (34.93 KB, 400x400, 1:1, vim.png) (h) (u)

>>867978 (OP)

Spaces are better in every way...

Example:

1. Spaces are better

2. Tabs are horrible

Is this really an argument people have?

Emacs is not de wey

Vim is de wey


 No.868360

Just do whatever the style guide tells you to do, you fucking autists.


 No.868361

>>868098

You do realize that almost all styling guides make you indent with tabs and align with spaces for shit like parameter lists, right?

>inb4 no true scotsman fallacy

>>868278

Sets your tab key to enter 4 spaces, and makes << >> shift 4 spaces at a time. You can either directly add it to your vimrc as "set expandtab tabstop=4 shiftwidth=4", or add that as a comment to somewhere in the file (typically the header).


 No.868362

>>868081

>>>/facebook/

This is clearly hard for you, Norman. Please, stop thinking too hard.


 No.868363

>>868090

OK I'll modify that line

> modal is perfect FOR ME

Is fast, I always know what I'm doing and I don't need spastic C-M-whatever to simple things like copy paste


 No.868369>>868471 >>868541 >>868785

>>868356

>vim

>memes about niggers

>please donate to the my poor ugandan niggers

you can't make this shit up


 No.868471>>868484

>>868369

why exactly is vim donating to niggers in uganda?


 No.868484>>868496

>>868471

https://github.com/vim/vim/blob/master/runtime/doc/uganda.txt

They additionally say to help / donate when you open up the editor without a file, aka on the main screen.


 No.868496>>868498

>>868484

but why?


 No.868498


 No.868539>>868630

>>868043

>my retarded settings are retarded and so my opinions are retarded too

why?


 No.868541>>868628 >>868785

>>868369

I nearly killed myself when I saw the niggers plastered all over the homepage. It's fucking insane that they'd shunt all the development money to fucking niggers. He has some retarded license, too. He'll probably hand it over to the Ugandan people when he dies as one last fuck you.

I need a Vim clone stat.


 No.868545

>>868017

I think he still maintains RMAIL in emacs. He's pretty much the only person to use it though.


 No.868616>>868622

>>868281

The most important reason vi is modal is that Bill Joy never thought of making it modeless. It just didn't occur to him.


 No.868622>>868627

>>868616

Well, modal editing is superior anyways


 No.868627>>868681


 No.868628>>869953

>>868541

I personally just use the vi in openbsd base. But I have tried vis and its pretty good and also way faster to load then vim ever was.


 No.868630>>868789

>>868539

Nice adhom, but it doesn't change the fact that tab indent+space align is fucking cancer and the proponents should be gassed.


 No.868644

Why not both

https://man.openbsd.org/style

>Indentation is an 8 character tab. Second level indents are four spaces. All code should fit in 80 columns.

knf master race.


 No.868674>>868680 >>868791

>>867978 (OP)

tabs take less space you ignorant millenials


 No.868680

>>868674

>muh filesize

fuck off webcuck


 No.868681>>868684

>>868627

yes???


 No.868684

>>868681

ummm no????


 No.868691

>>867978 (OP)

>indenting with spaces

What kind of subhuman does that?


 No.868698>>869948 >>870184

>Indenting

Have fun wasting bytes on something that doesn't affect execution at all.


 No.868730

>>867978 (OP)

>Tabs or spaces?

Tabs for indentation, spaces for alignment

>Perfect indent size?

One tab. I don't give a shit about your tab size, set it to whatever you want (+1 for tabs). I use 4 for the most part, but also 2 for languages with lots of indentation levels (like HTML)

>vim or emacs?

Neovim


 No.868782

>>868241

>some indent sensitive languages

disgust.jpg


 No.868785>>869953

>>868369

>>868541

I don't care as long as the nogs in question stay in Uganda.


 No.868789


 No.868791

>>868674

not on my screen :^)


 No.868793>>868814

>>867978 (OP)

inb4 rei or asuka


 No.868814>>869315

>>868793

Rei is obviously for the beta males.


 No.868972>>869643

>>867978 (OP)

tabs to indent, spaces to align.

tab size: 4 spaces, not too narrow as to essentially make indentation moot and not too wide as to become too heavyhanded for small fonts and wide screens.

shitty thread.


 No.869315>>869952

>>868814

this.

rei has no personality and is basically a doll so betas flock to her

asuka is for chads who know how keep a girl in line


 No.869599

>>867995

>This. No one writes C anymore.

Pajeets don't write good software either.


 No.869643

>>868972

Quite right.


 No.869948


 No.869952

>>869315

You are mostly right, but a different types of beta males look at a clearly volatile female like asuka and make excuses, because they see her instability as a way to make up for their own lack of personality and assertiveness. They are subs, basically. Anno included.

A future with Asuka consists only of screaming, punching holes in the walls, beating the shit out of each other, destroying furniture, and having the cops called every other night while the kids cry themselves to sleep listening to it.


 No.869953

>>868628

Thanks, I'm looking at them now.

>>868785

They could have added some sick features with that money. Made it really really good out of the box. Now it's a blackhole, blacking everything it gets its license around. The longer you support it, and not alternatives, the more it destroys all nice things we could have.


 No.870184

>>868698

It affects the execution of developers.




[Return][Go to top][Catalog][Screencap][Nerve Center][Cancer][Update] ( Scroll to new posts) ( Auto) 5
75 replies | 5 images | Page ?
[Post a Reply]
[ / / / / / / / / / / / / / ] [ dir / agatha / animu / bestemma / cop / imouto / joosten / kemono / qanon ][ watchlist ]