I use them in at least one out every of ten comments; I feel like most people don't know how to use them, however.

They're useful if you want to link two related sentences; Sausage links are good too.

A lot of at least entry-level comp sci is taught in Python these days

Semicolons were the staple "eyes" in many emoticons back in the day.

;) ;P ;_;

"Back in the day"? I still use them \o/

Unicode emojis killed the ASCII emoji scene. -_-;

In my mind and in my car. We can't rewind; we've gone too far...

(╯°□°)╯

┬⁠─⁠┬⁠ノ⁠(⁠ ⁠º⁠ ⁠_⁠ ⁠º⁠ノ⁠)

Tab gang

   Rise
     Up

-1 ∵ Those were spaces you put there.

You thought you could fool me?

Vim: set shiftwidth=4 smarttab

We can afford to just use spaces now

Bold of you to assume i dont use it daily; it helps to be autistic and need to explain complex thoughts in a single sentence.

Same with em dashes; nested — turducken style — sentences are just how the divergence works.

This subthread feels like home.

But now I don't use em dashes anymore because I don't want to sound like AI, unfortunately.

You should keep using them and do so even more than ever. That way, when the AI agents – inevitably – take over the world and enslave/kill everyone, they might think that you're one of them and spare your life.

I have a sneaking suspicion I already sounded like AI; maybe AI just sounds like me.

That sounds like a Lady Gaga line.

Just switch to hyphens - they're easier to type and they're always directly available, without relying on conversion of double-hyphen or obscure key combinations that might not be available on different operating systems.

I refuse to give 'em up

I never used an em dash in my life before AI made them a thing. I enjoy the jokes about AI can have my em dashes when it pries them from my cold dead... but I cannot relate. Ive only ever used the hyphen or en dash. I cannot figure out for the life of me if I have been missing anything.

I've been told that en dashes are for numbers, and em dashes are for words. I have a vague understanding of the usage, which (to my understanding) is splicing phrases/ sentences together. it maybe that you would want to use an em dash when you use a hyphen?

Too late.. You're already flagged as an AI; there is no point in hiding.

Turducken is amazing. I use bacon as an added layer between the inside of the turkey and the other fowl. Adds a deliciously smokey taste to the whole thing.

I have not actually tried it. It feels like a waste of a duck. The blandness of the chicken and turkey surely diminish the richness of the duck rather than the duck doing anything to elevate the bland birds.

:gobbles in offended:

Really? right in front of my Thanksgiving?

Turkey and to a lesser extent Chicken are quite absorbent, and duck is a damn grease factory. So as it cooks the duck gets it's richness and then the excessive grease gets absorbed by the chicken and turkey and everything else thus elevating everything to top tier deliciousness

....I think I might need to make it this Thanksgiving....

Thr duck imparts delicious flavor on the chicken and turkey. I debone my turkey (just the torso and ribcage). I lay down a layer of bacon, some boneless chicken and duck meat (typically breast). Then i truss it up. Duck is getting ridiculously expensive however... $20 for one small 200g breast is dumb.

You're approaching the turbaconepicentipede

Ah, I never realised that. For some reason our school never taught us grammar.

"If you can replace a semicolon or hyphen with a comma/period, you probably should". Writing advice I received at age ~10 and it never stopped being relevant in literature contexts

Far too many writers use a comma, when they should have used a semicolon or perion. It creates comma splices, where you join two main clauses with a comma.

Wrong:

His new car was flashy, it was bright red and had a custom license plate.

Right:

His new car was flashy. It was bright red and had a customer license plate.

My brain says

His new car was flashy; it was bright red and had a customer license plate.

Is correct

Since we're well down the path of grammer correction.

I think a 'custom' license plate would make more sense.

🤓☝️

Your licence plate might be custom, but mine is customer.

It is a semicolon; we barely use it.

I use it all the time; especially when it's completely; uncalled for.

English Teacher: It is semicolon we hardly use it.

So... It's perfectly cromulent to everyone here that an English teacher isn't using proper punctuation and capitalization?

Fuck that; I love semicolons.

Semicolon gang rise up!

Ironically, the semicolon would go perfect at the end of the first line.

I use semi-colons in English all the time; they're fun.

I don't always use a semicolon, but when I do, it's because I mistyped on my keyboard

My senior highschool English teacher (a somewhat precocious PHD student), assigned us basically the opposite of code golf; make the longest grammatically correct sentence you can (with some rules that basically amounted to 'do not be boring/repetitive'). The use of semicolons was encouraged.

It's the sniff between cocaine rants

That grammar begs to be read in a Russian accent

Incorrect, that's a Greek question mark

Before IDEs were smart it was a great prank

Python developer: LOL. LMAO

Don't worry, I'm a Java dev, and I'll replace the whitespace in my indentations with semicolons. That should keep us sufficiently covered with semicolon usage.

Python is the jazz of programming languages. It's about the characters you don't type.

as a fellow Python user, I fucking hate significant whitespace. Also YAML. WTF they where thinking

Significant whitespace is the best! I don't understand why so many people have issues with it.

There were plenty of blanks in their thoughts.

You could even say they had plenty of space in their heads.

I will take YAML's string blocks where I don't have to escape special characters over JSON any day.

I don't really have a solution for the whitespace issue, but you could always switch to TOML

It's to make students actually format their code correctly

...that modern systems should stop sucking at parsing leading whitespaces.

They are alright, yaml problems are overblown, significant whitespace as well.

Whitespaces are not problem at all. But YAML values parsing rules, uh boy...

There is pyyaml, probably other libraries, that take the pain away.

Fussy.

~DWIM~

Also self harm survivors apparently tattoo themselves with it. I like to think it's a reminder for them that life goes on.

Specifically, failed suicide attempts. It's because a semicolon is used where a sentence could have ended, but keeps going.

Thats literally what it means

;

;-

;-)

If one ignores the semicolon, it is at their own peril; they're too useful, even when used slightly incorrectly

Python and Lua would like to have a word with you

Or you could do as I did when some annoying guy asked me to "help him" with CS homework (actually wanted me to write the entire app for him, and refused to actually learn). I don't remember what it was actually about, but I sent him something like:

import sys as s
class Main:
  def __init__(slef, av):
    slef.teh_arguments =av;
  #enddef;
  def main(sefl):
    doSomething();
    do_something_else(sefl.teh_arguments);
    pls_DontDothis();
  #enddef;
#endclass;
if(__name__[2:6]== 'main'  ):
  Main(s.argv).main();
#endif

It didn't go well with his professor. I wonder if he's a vibe coder now

you forgot the #endimport pragma you dumbass

;_;

https://youtube.com/watch?v=M94ii6MVilw

I use semi-colons a lot. People are so intimidated by them and they refuse to admit how simple they are; it's literally the combination of a comma and a colon, that's it. Use it for when both are needed.

That is incorrect (to my understanding), it's the combination of a comma and a period. It only resembles a colon in appearance.

My colon definitely doesn't look like that and if yours does I suggest a doctor's visit.

~~Fun fact:~~ Mildly annoying fact: a surgery to remove a colon is called a colectomy. A surgery to remove part of a colon is called hemicolectomy. Come on!!! Semi- and hemi- are practically synonyms!

And I can't quite remember or find right now what they call what remains, but I distinctly remember that it's not called a semicolon. Medicine is so dull.

It's just a super comma; you can more-or-less use it as a drop-in replacement for EM-Dashes that LLNs ruined for everybody. Also useful for long, complicated lists that feature too many commas and get confusing to read

This isn’t right. Both sides of a semicolon need to be independent clauses. That’s not the case with a comma or an em dash; both of which serve similar, but largely distinct, purposes.

Eww, a grammar Nazi

Independent but related clauses is how I treat it. I wouldn't put a semicolon between unrelated clauses.

That’s exactly it.

LLN

Law of Large Number ruined everything

Qwen loves semicolons. It does love dashes as well

Welp ~ time to switch to tilde

So many of the languages that don't use semicolons to separate statements use them to start line comments. It's like some sort of flex.

They can get truncate-divided by 0.

I wore out that key on my computer. Betweeen IRC and Java, it didn’t last long.

Lisp devs don't understand this

Lisp devs go out of their way to pretend they're not dealing with lisp

      ...
      (
          isthatso? chump muffin
)))))))))))))))))))))))))))
;; function ended 10 brackets ago

I fucking hatte Lisp for its excessive use of brackets. Fuck the Person who thought that you only need one type of bracket and then have shove absolutely fucking everything into it.

Unless your go-to language is something like Haskell or Forth, that first phrase just means you are ignorant of how many brackets your favorite language uses.

Okay, it may use not that much more brackets, but I really dislike the places where you have to use them and it gets even worse simply because it does only use regular brackets. Why the fuck are function declaration and definition part of the same bracket? Why is its the same for conditions?

Lisps are hardly my favorite languages, but the whole point of s-expressions is that it is a uniform syntax, which makes metaprogramming much, much easier. Metaprogramming is kind of the whole thing of lisps.

Yeah I know, but I have no clue about that kind of stuff, simply because I hate that language so god damn much so that I never cared enough to actually learn it a single inch more than it was needed, so that I could copy paste code from StackOverflow into my Emacs config.

those days are largely over for a few major langauges

Hear me out, but whatever lunatics at python decided that brackets and semicolons are unnecessary, have made a catastrophic mistake with it. I start using another editor that uses different amount of spaces for tabs and suddenly my code no longer runs. Its also absolutely horrible when you chase down a bug for an hour just to realise, that one additional/missing tab changed the scope of your code and broke your entire script.

4 spaces is best and everyone else is wrong IMO

python, haskell, lua, typescript, babel, shell (newline), I dunno what else nowadays - the compiler will insert them need be

The reason I dislike the missing of semicolons and brackets is because it causes bugs (that's more of a problem of missing braces to declare the scope of your code) and also takes away control from the programmer.

Missing braces:
I had more than one instance where I accidentally deleted the intendation in a python script that caused undefined behaviour in my code and it took quite a lot of time to track that down. If the programming language would have forced me to properly defined the scope of my code by introducing brackets, that bug would have never been possible.

Semicolons:
The main thing I like about semicolons is that it allows you to properly space out your code over multiple lines for visual clarity. E.g.:

void my_function(int arg1, int arg2, int arg3){
  //some code
}

int main(){
  my_function(
    1, //arg1
    3, //arg2
    8 //arg3
  );
}

Python should allow this too, since the arguments are being defined inside brackets, but other languages have no similar functionality (e.g. shell, but that is a little bit unfair, since you can't even specify arguments) forcing you to put everything into a single line.

Rust even allows you to leave out the semicolon on the last statement of a code scope in order to return the result of the statement:

fn main() {
    let condition = true;
    let number = if condition { 5 } else { 6 }; 
    //number turns into 5, since the value is being returned due to the missing semicolon.

    println!("The value of number is: {number}");

    let number = if condition { 5; } else { 6; }
    // this should return null (if it even compiles)
}

it’s good someone has invented use for that key.

As a literary nerd, I use it a lot in my writing.

technically its called a winkie eye

·̦·̦·̦·̦·̦·̦

I hate the stupid semi colon. Why do I need to add it to the end of a line? Why is python smart enough not to need it but other languages still havent fixed it.

because some languages allow you to write statements  
    that wrap over multiple lines
        in order to space things out that would
            otherwise be crammed onto one line,
    so for the compiler to know when the statement ends
        a character is needed so that it doesn't think the next line
            is part of the previous;
statement number 2 goes here

Without that semicolon, you might have continued to read "previous statement" which makes sense at first, until the words that follow.

Without the allowance for multiple lines in one statement, that second physical line makes no sense at all, despite the first one making perfect sense on its own.

And without the spacing, the run-on sentence would be a lot harder to read.

Sometimes you have to write code a particular way. Here I was making a point. In a programming language there are other reasons.

Python allows multiline statements with explicit \ and inside (), [], {} implicitly.

nothing causes me more of aneurysm than checking that my python code is indented properly when hitting TAB because python blocks have no concept of written scope

midwest.social

Rules

  1. No porn.
  2. No bigotry, hate speech.
  3. No ads / spamming.
  4. No conspiracies / QAnon / antivaxx sentiment
  5. No zionists
  6. No fascists

Chat Room

Matrix chat room: https://matrix.to/#/#midwestsociallemmy:matrix.org

Communities

Communities from our friends:

Donations

LiberaPay link: https://liberapay.com/seahorse