|
No Safe Word posted:semicolons-only ;_;
|
# ? Dec 9, 2019 22:54 |
|
|
# ? Jun 7, 2024 16:46 |
|
Jazerus posted:ultimately the ASI wars are over, everyone just does whatever they prefer and then formats it in line with the rest of the codebase. This is the correct thing for all this type of poo poo. If you don't have a code style for your project/team/company then just use prettier to format all your code.
|
# ? Dec 9, 2019 23:01 |
|
I use semicolons in python, that’s how much I love them
|
# ? Dec 10, 2019 01:13 |
|
Haskell can technically be written with semicolons (and brackets) instead of indentation but I've never seen it used in the wild. It's useful in the REPL though.code:
Magissima fucked around with this message at 03:23 on Dec 10, 2019 |
# ? Dec 10, 2019 03:14 |
|
I had an advisor who use the explicit notation religiously in Haskell. I liked the indentation-based notation, but something about Haskell’s rules was wrong for me; I would write stuff that didn’t parse, and I could never figure out what it was. I’ve never had that problem with Python.
|
# ? Dec 10, 2019 03:47 |
|
Semicolon insertion in javascript works like much of the rest of the language: fine until it fucks you over in the most asinine and unintuitive way possible. There are languages with similar features (e.g. go) that are designed so it’s not an issue. Seems like some programmers prefer to memorize fiddly rules when there’s an easy alternative, and then expect everyone else to do the same. Sometimes they’re in a position to dictate a style guide. Hopefully there’s helpful tooling involved! (I’ve totally been that person, but I’m learning from my mistakes. Just write the drat semicolons. Install a font that renders semicolons as a 1px interpunct or whatever if it ruins your aesthetics.)
|
# ? Dec 10, 2019 04:09 |
|
Magissima posted:Haskell can technically be written with semicolons (and brackets) instead of indentation but I've never seen it used in the wild. It's useful in the REPL though. That just looks so wrong. https://twitter.com/zkat__/status/1204188153008906240 ultrafilter fucked around with this message at 06:30 on Dec 10, 2019 |
# ? Dec 10, 2019 06:22 |
|
It's terrible in 2019 but back in the day it wasn't a metaphor of a typewriter, it was output to a literal teleprinter
|
# ? Dec 10, 2019 07:11 |
|
Qwertycoatl posted:It's terrible in 2019 but back in the day it wasn't a metaphor of a typewriter, it was output to a literal teleprinter Was DOS really ever used with teleprinters? and why is Unix, which actually calls its text mode interface a teletypewriter to this day, perfectly happy using LF by itself?
|
# ? Dec 10, 2019 08:52 |
|
Dr. Stab posted:Semicolons or newlines, pick exactly one. No. They serve different purposes
|
# ? Dec 10, 2019 11:47 |
|
Soricidus posted:Was DOS really ever used with teleprinters? and why is Unix, which actually calls its text mode interface a teletypewriter to this day, perfectly happy using LF by itself?
|
# ? Dec 10, 2019 12:45 |
|
Hammerite posted:No. They serve different purposes What's the purpose of new line in JS?
|
# ? Dec 10, 2019 14:36 |
|
canis minor posted:What's the purpose of new line in JS? Semicolon insertion opportunity.
|
# ? Dec 10, 2019 15:48 |
|
canis minor posted:What's the purpose of new line in JS? So Internet Explorer can count lines of code executed and cut you off when you do too many.
|
# ? Dec 10, 2019 17:59 |
|
Munkeymon posted:So Internet Explorer can count lines of code executed and cut you off when you do too many. Also at Microsoft your productivity used to be (maybe still is) measured by lines of code per week. That's more than enough reason to keep hitting that return.
|
# ? Dec 10, 2019 19:06 |
|
canis minor posted:What's the purpose of new line in JS? New line is sometimes purely a formatting thing, other times it ends a statement and an automatic semicolon is inserted by the interpreter. A semicolon always ends a statement (which is why you should probably just use them if you don't have an auto-formatter [but really you should have an auto-formatter/linter]).
|
# ? Dec 10, 2019 22:23 |
|
canis minor posted:What's the purpose of new line in JS? I interpreted Dr. Stab's post as being about programming language design in general, not about JavaScript specifically, and my post is to be read in that context whether or not that was in fact how Dr. Stab intended their post to be interpreted.
|
# ? Dec 11, 2019 10:41 |
|
I propose the addition of a number of new semantic characters to Unicode, such as statement terminator, etc. Then people can configure their ide to render these with or without semicolons as they prefer.
|
# ? Dec 11, 2019 17:58 |
|
Soricidus posted:I propose the addition of a number of new semantic characters to Unicode, such as statement terminator, etc. Then people can configure their ide to render these with or without semicolons as they prefer. And we could have an indentation character that people can configure to render at their preferred width!
|
# ? Dec 11, 2019 18:20 |
|
eth0.n posted:And we could have an indentation character that people can configure to render at their preferred width! could you also add a smaller, fixed indentation character that I could group together in lots of say, 4, so that I can be consistent across all systems i might need to view my code on tia
|
# ? Dec 11, 2019 18:24 |
|
Garbage. Whitespace is the only seperator and group everything between parenthesis.
|
# ? Dec 11, 2019 18:54 |
|
A lisp dialect, but instead of parens it uses quote marks and you have to escape them an extra time for every layer of nesting
|
# ? Dec 11, 2019 19:01 |
|
Soricidus posted:I propose the addition of a number of new semantic characters to Unicode, such as statement terminator, etc. Then people can configure their ide to render these with or without semicolons as they prefer. I would render it as COMPUTER EXECUTE
|
# ? Dec 11, 2019 19:44 |
|
Soricidus posted:I propose the addition of a number of new semantic characters to Unicode, such as statement terminator, etc. Then people can configure their ide to render these with or without semicolons as they prefer. So, something like this https://www.fileformat.info/info/unicode/block/control_pictures/list.htm?
|
# ? Dec 11, 2019 20:11 |
|
canis minor posted:So, something like this https://www.fileformat.info/info/unicode/block/control_pictures/list.htm? no, those are just printable representations of ASCII control characters, which mostly don't have useful semantics unless you're implementing a teletype protocol or a mainframe database. that's why we need new characters specifically for programming.
|
# ? Dec 11, 2019 21:24 |
|
This is ridiculous, the only valid statement separator is BEL
|
# ? Dec 11, 2019 22:01 |
|
Linear Zoetrope posted:This is ridiculous, the only valid statement separator is BEL I worked with a talented contractor who managed to add a BEL to the console spew of our device on boot. I left it in because I pavloved right on it and expected the bell when I'd flash a new build.
|
# ? Dec 11, 2019 22:07 |
|
Soricidus posted:no, those are just printable representations of ASCII control characters, which mostly don't have useful semantics unless you're implementing a teletype protocol or a mainframe database. that's why we need new characters specifically for programming. That is a good idea, some sort of Separator for different Groups of code. Perhaps we could call it the Group Separator?
|
# ? Dec 11, 2019 22:09 |
|
OddObserver posted:Not enough |0 around for that, I think? You may be thinking of asm.js, which is a different thing from WebAssembly. JawnV6 posted:I worked with a talented contractor who managed to add a BEL to the console spew of our device on boot. I left it in because I pavloved right on it and expected the bell when I'd flash a new build. I used to put && echo ^G^G^G on the end of long-running commands so I knew when they were done. Doom Mathematic fucked around with this message at 23:03 on Dec 11, 2019 |
# ? Dec 11, 2019 23:00 |
|
notify-send is nice for that in the modern world
|
# ? Dec 11, 2019 23:21 |
|
the galaxy brain version is the HCT build system used by some parts of microsoft which uses text to speech to literally say "Build Complete" out of your speakers scared me shitless the first time i compiled DirectXShaderCompiler
|
# ? Dec 11, 2019 23:42 |
|
Soricidus posted:Was DOS really ever used with teleprinters? and why is Unix, which actually calls its text mode interface a teletypewriter to this day, perfectly happy using LF by itself? Unix tty devices have options for things like turning LF into CR/LF. all hope abandon, ye who enter the termios(3) man page
|
# ? Dec 12, 2019 03:28 |
|
Seeing form-feed characters in source files is kinda an interesting "whoa, history!" experience.
|
# ? Dec 12, 2019 04:26 |
|
Suspicious Dish posted:That is a good idea, some sort of Separator for different Groups of code. Perhaps we could call it the Group Separator? What is a “group of code”? That’s not a term anyone uses. Now you’re right back at the old problem of using an arbitrary character with a different intended semantic, like semicolon or line feed. That’s why we need explicit statement separator, block start/block end, etc.
|
# ? Dec 12, 2019 10:47 |
|
Ola posted:I would render it as COMPUTER EXECUTE Approved, but your compy has to say it in a scary robot voice
|
# ? Dec 12, 2019 11:52 |
|
OddObserver posted:Seeing form-feed characters in source files is kinda an interesting "whoa, history!" experience. This is still relatively common practice in Emacs-land. Which makes no sense to me; Emacs out-of-the-box does not do anything particularly intelligent with form-feed characters and just renders them as ^L (although there are commands for zooming between them).
|
# ? Dec 12, 2019 14:48 |
|
This is one kind of a horror, I guess: https://www.zdnet.com/article/russian-police-raid-nginx-moscow-office/
|
# ? Dec 12, 2019 19:23 |
|
lobsterminator posted:This is one kind of a horror, I guess: That's a political horror, not a coding one.
|
# ? Dec 12, 2019 19:28 |
|
Volguus posted:That's a political horror, not a coding one. What is the difference?
|
# ? Dec 13, 2019 08:01 |
|
|
# ? Jun 7, 2024 16:46 |
|
https://twitter.com/elonmusk/status/1205230908837523456 Talking smugly about code and programming (and physics) without having the faintest idea how it works counts as a horror right? NtotheTC fucked around with this message at 13:32 on Dec 13, 2019 |
# ? Dec 13, 2019 13:21 |