276
Anon is a linguist (lemmy.world)
top 50 comments
sorted by: hot top controversial new old
[-] renzhexiangjiao@piefed.blahaj.zone 57 points 2 months ago

to me method names are imperatives, like when we order the dog to walk.

dog.walk() = "Dog, walk!"

[-] Camille_Jamal@sh.itjust.works 3 points 2 months ago

I don't python, but I know there's tons of ()

why is there so much () and other empty brackets?

[-] yetAnotherUser@discuss.tchncs.de 10 points 2 months ago* (last edited 2 months ago)

It's calling a function without a parameter.

You know how in math you had something like:

f(x) = x²

Not all functions need parameters though. The function:

f(x) = 2

does not even use the provided x! So just leave it out:

f() = 2

Similarly, you could give a function two parameters:

f(x, y) = x + y

Programmers use functions to primarily organize their code. Otherwise it would get very unreadable very quickly. Those function are usually a bit more complicated than a single line, though.

dog.walk() would call the walk() function of "dog". Some valid code could be:

dog.walk()
wait(10)
dog.stop()

This code would make the dog walk for 10 seconds assuming every function used is actually defined somewhere.

[-] Camille_Jamal@sh.itjust.works 2 points 1 month ago

Okay, cool, thanks! :D

load more comments (9 replies)
[-] fibojoly@sh.itjust.works 41 points 2 months ago* (last edited 2 months ago)

It's not theDog.walks(), it's 狗.走()

Conjugate this you anglocentrist fuck!

[-] farting_gorilla@lemmy.world 5 points 2 months ago

狗。走。了()

There you go, you canine-centric bastard

[-] alias_qr_rainmaker@lemmy.world 4 points 2 months ago

does chinese code take up less space? wait how many bytes does it take to encode a chinese character? is it just UTF-8 or is it something else

[-] fibojoly@sh.itjust.works 4 points 2 months ago* (last edited 2 months ago)

UTF-16 is fine for the vast majority of Chinese characters. It has been standard since 2008 for C++ (at least for code that wants to be running on windows; Microsoft moved everything to w_string back then).
C# uses UTF-16 natively for strings.
Dunno about other languages

[-] Camille_Jamal@sh.itjust.works 2 points 2 months ago

HAHAHAHA

I love how evil this is

Don't speak any chinese languages (or is that japanese?) but I do know that most words don't have a direct translation to english

HAHAHAHHAHAHAHAHAAAAAAAA I'M STEALING THAT IDEA!

I'm forced to learn french because I'm in canada, so if I get corrected I can chuck a phrase of similar meaning with no direct translation

God I love doing stuff like this

[-] BleakBluets@lemmy.world 36 points 2 months ago* (last edited 2 months ago)
Buffalo_buffalo::buffaloBuffalo.buffalo(Buffalo.buffalo);

p.s. I'm on mobile and this is a shitpost. I did not put a lot of thought into this code. Feel free to suggest a more accurate representation.

[-] Bosht@lemmy.world 6 points 2 months ago

NoIDontThinkIWill.gif

[-] alias_qr_rainmaker@lemmy.world 3 points 2 months ago

buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalobuffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalobuffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo

that's ruby

[-] rtxn@lemmy.world 23 points 2 months ago

[lady for lady in ladies if lady.is_single] just doesn't have the same bop.

[-] alias_qr_rainmaker@lemmy.world 7 points 2 months ago

list comprehensions aren't changed much. but a statement like dog = Dog(name="fido") is transpiled to the dog is now a Dog with name 'fido'

the language uses backticks for strings. it handles nested stringly nicely because of it

[-] lemmyman@lemmy.world 4 points 2 months ago* (last edited 2 months ago)

Can I just say that as someone who only codes tangentially to my work, code and documentation that uses the same word 2 or 3 times in an expression, when they mean different things, is such an immense pet peeve of mine when learning something new.

I'm already struggling with everything else about it, and now I have to parse out which lady is which and what the hell each one is supposed to be

object Object(object = object);

Statements dreamed up by the utterly deranged.

[-] rtxn@lemmy.world 5 points 2 months ago* (last edited 2 months ago)

That's just Python's generator syntax. Not all that difficult to parse once you get a feel for it. Plus syntax highlighting helps.

(OUTPUT_EXPRESSION for ITEM in INPUT_ITERABLE if CONDITION)
[-] ryannathans@aussie.zone 4 points 2 months ago

it's list comprehension syntax, not generator syntax

[-] fushuan@lemmy.blahaj.zone 1 points 2 months ago

All the lady in there are the same lady, it's being used for different things as the other comment answered you but it's the same box of information, if you will.

[-] iAmTheTot@sh.itjust.works 18 points 2 months ago
load more comments (2 replies)
[-] Feyd@programming.dev 10 points 2 months ago
load more comments (3 replies)
[-] lauha@lemmy.world 10 points 2 months ago

I would imagine the class would be aDog and when you instantiate it the variable would be theDog.

[-] green_copper@kbin.earth 1 points 2 months ago

theDog sounds more like a reference to a singleton than one of many instances. I think thisDog fits better.

load more comments (1 replies)
[-] Tetragrade@leminal.space 9 points 2 months ago* (last edited 2 months ago)

Javascript users be like.

try {
    mysteryBox?.open?.();
}
catch() {
    console.error("fuck")
}

Rust users be like.

let discord_kitten = femboys
    .iter()
    .map(|b| Bottom { thigh_highs: true, ..*b })
    .filter(|b| b.girth<5.0)
    .reduce(|top,b| top %= b);

C# users be like.

// from the Unity turoial IDK what this does
RegistrationHandler.SingletonInjectionHandler.InjectSingleton<IInjectedSingleton>(new InjectedSingleton(RegistrationHandler.SingletonInjectionHandler.SingletonType.Player));
[-] m0darn@lemmy.ca 8 points 2 months ago

I feel like I'm walking into a trap here but:

This pedant is using an adjective as an adverb.

(...)you don't conjugate your verbs right.

load more comments (5 replies)
[-] TheTiltster@feddit.org 6 points 2 months ago

Writes "I have a PhD in linguistics. I am literally a cunning linguist, and literally all of you are fucking stupid [...]."

Also writes "fuckoing".

LOL

[-] Jankatarch@lemmy.world 4 points 2 months ago* (last edited 2 months ago)

It is kinda funny we spent all these centuries turning english into a less-debatable notation called "math" to write algorithms in, only to then reverse that and get stuff like vibe-coding

[-] alias_qr_rainmaker@lemmy.world 0 points 2 months ago

vibe coded algorithms probably won't be the way your boss wants them coded but they still work. and i don't code for a living so i'm just like

[-] jaykrown@lemmy.world 4 points 2 months ago

Why are you using Python instead of Rust.

[-] einlander@lemmy.world 4 points 2 months ago

And that brings us back to BASIC.

[-] EldenLord@lemmy.world 3 points 2 months ago
[-] Camille_Jamal@sh.itjust.works 1 points 2 months ago

I forgot about it for a few minutes when going through comments.

I just fucking EXPLODED when I saw it again lmao

[-] FinjaminPoach@lemmy.world 2 points 2 months ago

Actually this is why I find python so hard. Might need to refer to his teachings

[-] DickFiasco@sh.itjust.works 2 points 2 months ago

Cunning linguist, he he. I wonder if they're friends with Colonel Angus.

[-] ZILtoid1991@lemmy.world 1 points 2 months ago

Anon reinventing "human language programming".

load more comments
view more: next ›
this post was submitted on 13 Dec 2025
276 points (95.7% liked)

Greentext

7780 readers
1276 users here now

This is a place to share greentexts and witness the confounding life of Anon. If you're new to the Greentext community, think of it as a sort of zoo with Anon as the main attraction.

Be warned:

If you find yourself getting angry (or god forbid, agreeing) with something Anon has said, you might be doing it wrong.

founded 2 years ago
MODERATORS