• 0 Posts
  • 60 Comments
Joined 1Y ago
cake
Cake day: Aug 06, 2023

help-circle
rss

Indentation is visible, and much more so than braces.




xaf (extract a file) auto-detects the format.


Good. Spaces and tabs for indentation should never be mixed in any language other than Whitespace.


Poe’s Law moment. I can’t tell whether the terms are made up for the sake of the meme or actually used by gender theorists.


The only mention of capitalism in the article is specifically venture capitalism.


The people designing SQL, not having learned from the mistakes of COBOL, thought that having the syntax as close to English as possible will make it more readable.


But typeof(fire_extinguisher) === "toilet_paper"



Nim. It just doesn’t get in the way or have certain annoyances that other languages do.


“How do I do XYZ in JavaScript?”

answer using jQuery


is capped at JS speeds

So, just like every Electron app?


That’s not how you use this image macro.


Indeed. It’s a separator, so using it for indentation doesn’t make sense.


A newline is the separator between lines, so the concept of length doesn’t make sense for it.


15 years ago I was too young for programming, but I’m pretty sure Vim already had the expandtab option at that time.

You’re the one who started the passive-aggressive tone…


I prefer games that embrace the difference from Minecraft instead of trying to emulate it. My favorite is MeseCraft.


Minetest (an open-source Minecraft-like game) uses SQLite to save worlds.


Yes, but if you use something like cat, head, less, etc. to view code, or the Python REPL, you’re still going to see the default tab size.


Be specific. Which exact part would you abstract away and how?


If anyone didn’t notice, everything on this page is a link.


It’s not just “might”. Termux is pretty much the only good choice for programming on Android.

I think 9 is the best size for indent (matter of preference), do you think I should switch to space

I think you should switch to an exorcist.


How would you implement, for example, Gaussian elimination with at most 3 levels of nesting?


When you’re operating on such a low level of abstraction, it’s no wonder you don’t need deep nesting.


What environment are you using that has a hardcoded tab size?

  • Termux
  • SourceHut
  • “View page source” in the browser

Tabs let you define how big you want each indent to be

…except when they don’t. Many common environments have a hardcoded tab size of 8, which is insanely big for using it for indentation.


The horizontal tabulation character moves the cursor to the next column which is a multiple of the tabulation length. See the examples here: https://en.m.wikipedia.org/wiki/Tab_key

At least for me, it renders like this:

Screenshot of a part of the linked Wikipedia page

Clearly the whitespace produced by each tab character has a different length.


  • Many terminal emulators (may or may not be configurable), including Termux for Android (not configurable)
  • GitHub (by default)
  • SourceHut (not configurable)
  • Vim/Neovim (by default)
  • HTML (by default, I think)

Honestly, I can’t think of an environment that doesn’t have 8-space tabs by default.


I never understood how concatenative programmers can hold the current state of the stack in their head and never get confused about what is where, especially when changing complex code.


Your examples are ironically a great showcase of what I hate about PHP. Java-style object-obsessed programming with long names, piles of design patterns and dozens of imports, along with C-style syntax and dollars before variable names.


Did you have your mouth open while assuming that indenting with spaces actually involves pressing the space bar?


Indentation can be wrong, but braces can’t?


You’ve never needed an array whose size is not known at compile time?


So Windows is better than Linux because it allows you to use a restricted version of Linux?


It’s strongly typed, which is why if you want to store a list or object in a column, you have to encode it as JSON???


C++ makes programming look way harder than it actually is.


In Haskell, you could do something like map (\(thisItem, nextItem) -> …) (zip list (tail list))


MATLAB is bad not because it’s not object-oriented, but because it’s proprietary and can’t be run without an IDE.