Lucky enough, I am C++ Developer

440 points · 115 comments · view on lemmy.world

115 Comments

9point6@lemmy.world · 134 pts · 262d (3 replies)
#include <delusion>
navi@lemmy.tespia.org · 30 pts · 262d

delusion was added in C++24 and we are stuck in C++03 😭

siha@feddit.uk · 4 pts · 261d (1 reply)

#define GIRLFRIEND = NULL

TechLich@lemmy.world · 5 pts · 260d
error: expected primary-expression before '=' token
1 | #define GIRLFRIEND = NULL
  |                    ^
BrokenGlepnir@lemmy.world · 63 pts · 262d

As a c++ professor, I would never lie to my students like this.

Jankatarch@lemmy.world · 51 pts · 262d (10 replies)

C++ lets you assign variables with <%%> in case your parents were killed by an equals sign.

entwine@programming.dev · 12 pts · 262d (2 replies)

TIL about bat! Looks awesome!

dwraf_of_ignorance@programming.dev · 5 pts · 261d

Look into batman too. Its like bat but for man pages

djmikeale@feddit.dk · 4 pts · 262d

Bat is really cool - I share your enthusiasm! As far as I remember, the repo for bat has a bunch of example use cases that I hadn't thought of, fyi!

blobchoice@feddit.uk · 7 pts · 262d

Finally, someone gets it

SleeplessCityLights@programming.dev · 6 pts · 262d

I have the perfect module to use this once. Most people will see it and will figure out that it is doing what it should, but no one can change it because the file will be LFS locked like 99% of the time.

marcos@lemmy.world · 3 pts · 262d (4 replies)

What is happening there?

Is it about templates? I can't find any reference for that syntax.

Jankatarch@lemmy.world · 7 pts · 262d (3 replies)

I mixed digraphs and initilization together.

marcos@lemmy.world · 6 pts · 262d (2 replies)

Oh, I didn't know about digraphs at all. C++ is a really big language.

And wow, that's a well hidden footgun.

ulterno@programming.dev · 1 pts · 256d (1 reply)

Feels like this thing should require an extra flag in case of gcc in this day and age, or a separate compile-time defined variable, specifically for cases where you don't want to require the flag.

marcos@lemmy.world · 2 pts · 256d

To be fair, the biggest footguns are the trigraphs, and now that I tested those do require a flag in gcc.

The digraphs are just hard to search, never used operator symbols.

atopi@piefed.blahaj.zone · 46 pts · 262d (11 replies)

I am trans

Do i need to learn rust?

thevoidzero@lemmy.world · 50 pts · 262d (9 replies)

I'm a rust developer, do I need to transition?

genfood@feddit.org · 15 pts · 261d (3 replies)

To both of you a clear yes!

ulterno@programming.dev · 5 pts · 261d (2 replies)

I am a C++ developer, learning Rust.
Do I eventually get all of them?

UnderpantsWeevil@lemmy.world · 10 pts · 261d (1 reply)

Learn assembly and you can DIY your gender.

ulterno@programming.dev · 3 pts · 261d

I have already done 8085 and ARM6 (or was it 5?).
How many more do I need?

Guess I'll need RISC V for a FOSS gender, but I also like performance and am not sure if it completely envelopes x64 performance.

atopi@piefed.blahaj.zone · 13 pts · 262d (4 replies)

i recommend you read this

RemindMe! 2 years

thevoidzero@lemmy.world · 16 pts · 262d (3 replies)

Good read, thanks

But I believe in generics, just write your functions so that it can work with all the types ;)

translation: Just get rid of what is a boy or a girl thing. Just let people do what they like.

luciferofastora@feddit.org · 9 pts · 261d (2 replies)

The idea of abolishing all gendering of things is a curiously contested one within LGBT+ spaces, as far as I can see.

I can understand how people wishing to be identified a certain way have a vested interest in the existence of markers for that identity.

On the other hand, I wish painting my nails wasn't fem-coded on some level. Of course guys can do so too, but the only "guy" I knew who did so regularly eventually turned out not to be a guy, which doesn't exactly help me ignore that connotation.

thevoidzero@lemmy.world · 7 pts · 261d (1 reply)

I can understand people wanting markers. But maybe we have like 10-20 markers and someone having 5-6 from the other side is not weird. Like if someone is presenting as a girl completely and is not, they could just reply with "oh, I'm a guy, I just dressed as a girl today" and people would be like "that's fun" instead of being weirded out.

Like long hair/short hair for example. Or how girls wearing pants is normal now.

In my case, my culture does have people cross dressing during certain events so it's not as ostracized. But that could also be because people didn't actually think about wanting to be the other gender but just dressing up for one occasion.

Few fun things:

  • My parents wanted a daughter but had me,
  • my nickname at home was a girl's name version of my name,
  • only children close to my age and vicinity growing up were girls so I grew up playing "girl" games,
  • my mom didn't stop me from painting my nails, or putting makeup or anything as a child. (I still paint my nails black sometimes),
  • In highschool I was the only guy among the group of students with nails too long on a biology lab,
  • a guy friend once told me I walk gay (I didn't even know that was a thing?)
  • I don't watch sports, so I don't have many common things to talk to guys as much,
  • Good friends I had (guys) were based on either common interests (programming, philosophy, etc) or other nerds. And when I don't have those and only friends are based on proximity then I don't have as many things in common.

All those considered I'm still a guy, I just don't care about being "manly", and just do things that interests me. Plus lots of the things people do to be manly seems to just make them spend even more time with other guys lol. And although I don't want to do a lot of things that are for each genders, I just wish everyone was chill about doing whatever someone likes. Or for someone to just try it out to see if they like it not, instead of thinking "that's what X do, I won't do it".

luciferofastora@feddit.org · 6 pts · 261d

I just wish everyone was chill about doing whatever someone likes.

Preach, sibling.

As an aside:

Like long hair/short hair for example.

This reminds me of the song "Turn The Page", specifically the lines "Always the same old clichés: Is it woman, is it man?"

They refer to the issue rock musicians with long hair faced, back when Seger wrote it. ~30 years later, when I first heard it, I was a metalhead with long hair. On one hand, I felt it keenly because classmates made fun of my "girl" hair. On the other, it struck me as odd because I saw plenty of metalheads with long hair (nevermind people from other cultures where that was never an issue).

Eventually, with figures like Thor making long hair "manly" enough, that stopped. It's curious how culture shifts can be so irregular, once slow and uneven and then suddenly very quickly.

FosterMolasses@leminal.space · 11 pts · 262d

Only if you like women

AngularViscosity@piefed.social · 43 pts · 262d (6 replies)

Whew! Thankfully I'm a gay JavaScript user

Masterkraft0r@discuss.tchncs.de · 40 pts · 262d (5 replies)

everybody on the internet is a javascript user! do you even develop, bro?

AngularViscosity@piefed.social · 22 pts · 262d

I guess I pretend to with limp wrists.

Pissmidget@lemmy.world · 10 pts · 262d (2 replies)

Is that why people keep calling each other gay online?

0ops@piefed.zip · 15 pts · 262d (1 reply)

They're putting scripting in the webpages, that TURNS THE FRICKEN USERS GAY

QuazarOmega@lemy.lol · 5 pts · 262d

Brendan Eich was a Dark Programmer of the Netscape, so powerful and so wise he could use the scripts to influence the sexuality to create gay… He had such a knowledge of the dark side that he could even keep the ones he cared about from straight. The dark side of the Bit is a pathway to many abilities some consider to be unnatural.
He became so powerful… the only thing he was afraid of was losing his power, which eventually, of course, he did.
Unfortunately, he sent the anti-gay everything he had, then a woman touched him in his sleep. Ironic. He could save others from straight, but not himself.

solomonschuler@lemmy.zip · 1 pts · 262d
[ removed ]
FilthyShrooms@lemmy.world · 38 pts · 262d (12 replies)

MatLab user

I like how it doesn't say "coder" because everyone knows MatLab isn't a real programming language

mcv@lemmy.zip · 21 pts · 262d (2 replies)

It's realer than vibe coding.

FilthyShrooms@lemmy.world · 4 pts · 262d

Tru dat

87Six@lemmy.zip · 2 pts · 260d

A unicorn written in thunkable is realer than vibe coding

mnemonicmonkeys@sh.itjust.works · 7 pts · 262d (6 replies)

Then what's Java?

goatinspace@feddit.org · 12 pts · 262d (1 reply)

Shadow that is cast by the sins of men

FosterMolasses@leminal.space · 2 pts · 262d

LMAOOOO

FilthyShrooms@lemmy.world · 5 pts · 262d

Coffee? Idk I'm not a coder, I just know MatLab lol

zod000@lemmy.dbzer0.com · 3 pts · 262d

A hive of villiany and boilerplate

luciferofastora@feddit.org · 3 pts · 261d

A language for describing frameworks.

Allegedly, some people use it for implementations too, but I don't know if it's really suited for that.

lmagitem@lemmy.zip · 1 pts · 262d

Exorcist

Jankatarch@lemmy.world · 5 pts · 261d

Gnu octave on the other hand...

apftwb@lemmy.world · 1 pts · 260d
[ removed ]
rizzothesmall@sh.itjust.works · 35 pts · 262d

Let's not go referring to vibe coders as developers, now.

QueenMidna@lemmy.ca · 28 pts · 262d (4 replies)

Am a trans Rust developer. Can confirm.

missfrizzle@discuss.tchncs.de · 17 pts · 262d (3 replies)

I'm old and remember when all the trans women were Haskellers. now they've all moved to Rust and here I am, still toiling away with my monads and combinators, a lonely spinster. 😔

lena@gregtech.eu · 8 pts · 262d

I'm a trans woman and recently started learning Haskell :3

It's fun, I plan to eventually rewrite Lemvotes in Haskell (backend with Servant, frontend in Miso) as an exercise (and because the current codebase sucks and I didn't know what I was doing when I wrote it)

QueenMidna@lemmy.ca · 6 pts · 261d (1 reply)

Do I get points for being an F# nerd?

missfrizzle@discuss.tchncs.de · 3 pts · 260d

you get so many points you'll want a computation expression and some custom infix operators to handle all of them!

TheLeadenSea@sh.itjust.works · 26 pts · 262d

What

saltesc@lemmy.world · 22 pts · 262d (17 replies)

SQL enjoyer?

Every time I use it I feels like I'm going back to the 90s. No variables, no functions; Oh but you can do a CTE or subquery.......👍

UNION ALL, UNION ALL, UNION ALL... "There's got to be a better way, surely..."

looks up better way

"Oh, what the fuck?!.... Nope, this will just be quicker..." UNION ALL, UNION ALL, UNION ALL...

Join in a table sharing column names... Everything breaks. You gotta put the new prefixes in front of all the headers you called in now. In every select, in every where, etc... Which is weird because that kinda works like a variable and it's fine...

"When you see this little piece of text, it means all this, got it?"

"Okay. Yep. Easy."

"So why can't you do that with expressions?"

SQL SCREAMS MANICALLY

"Okay, okay, okay!... Jesus..."

And then you try put a MAX in a where and it won't let you because you gotta pull all the maxes out in their own query, make a table, join them in, and use them like a filter...

I hate it. It has speed, when you can finally run the script, but everything up to that is so...ugh.

jjjalljs@ttrpg.network · 18 pts · 262d (1 reply)

Personally I feel like SQL syntax is upside down, and things are used before they are defined.

SELECT 
a.id -- what the fuck is a?
, a.name
, b.city -- and b??
from users a -- oh 
join city b on a.id = b.user_id -- oh here's b

I'd expect it to instead be like

From users a
join city b on a.id = b.user_id
SELECT
a.id,
a.name,
b.city
invictvs@lemmy.world · 1 pts · 239d

Well, in this case a and b are only aliases of table names, and it is assumed that tables were already "defined", i.e. they already exist. And aliases in my opinion are meant to shorten long table names, or give a name that will be more appropriate in the context of the query, considering more than tables names can be aliased, at least that's how I'm using them. But they still have to be descriptive enough so it's clear what kind of data we are working with without the need to look for what they are actually aliasing in advance. In your example if the table was named users_who_won_the_company_lottery (intentionally bad name) then aliasing it as users or even as winners will be nice, even necessary, and you do not have to ask "What the fuck is winners?

For me, although I have seen a lot of people do this in SQL in real scenarios, using a and b in SQL is not a bad practice, it's a terrible practice. Feels like using them in function declarations in other programming languages, like doing a function declaration in C, at the top of the file like that:

int some_func(char a, bool b, char *c);

And letting whoever has to read the code after you go look at the definition and figure out by themselves what any of that is supposed to mean.

Or naming your variables a, b, c, etc.

Aliases are meant to improve readability imo, not worsen it.

DarkAngelofMusic@lemmy.sdf.org · 10 pts · 262d (3 replies)

While I agree that "SQL Enjoyer" seems like a weird category, I personally love SQL. I've been using it professionally for over 20 years, and I've yet to encounter a more elegant, efficient, and practical language for handling data in a relational database. Every attempt I've seen to replace it with something simpler has fallen far short.

Which database systems were you dealing with, that didn't allow variables? My personal favorite is PostgreSQL, which does allow them on scripting languages, such as PLPGSQL.

Jesus_666@lemmy.world · 12 pts · 262d (1 reply)

See, I don't have to worry about such details. I work in corporate software dev, which means that everything is an MSSQL database where most of the tables contain only an ID of a table-specific format and a JSON blob. Why use an ORM when you can badly reimplement NoSQL in a relational database instead?

Quill7513@slrpnk.net · 8 pts · 262d

hey hey, there there. don't worry. most of the major NoSQL DBs implement just as horrible of travesties

sp3ctr4l@lemmy.dbzer0.com · 6 pts · 262d

Yep.

PostgreSQL is where its at, everybody else just hasn't figured that out yet.

marcos@lemmy.world · 7 pts · 262d

It seems that you need to get better. There are plenty of valid complaints against SQL, but your problems seem to be all due to lack of familiarity.

No variables, no functions; Oh but you can do a CTE

Yeah, CTEs are more expressive than variables. And as somebody pointed, every database out there supports functions, you may want to look how they work.

UNION ALL, UNION ALL, UNION ALL… “There’s got to be a better way, surely…”

What do you mean by a "better way"? Union all is a perfectly valid operation.

And then you try put a MAX in a where and it won’t let you because you gotta pull all the maxes out in their own query, make a table, join them in, and use them like a filter…

Window functions exist.

expr@programming.dev · 7 pts · 262d

No variables, no functions

Every major SQL implementation includes both of those things. Of course, it's rarely needed or desirable if you know how to properly write SQL.

"So why can't you do that with expressions?"

You can alias expressions.

And then you try put a MAX in a where and it won't let you because you gotta pull all the maxes out in their own query, make a table, join them in, and use them like a filter...

Wtf are you talking about? For one, filtering by the output of an aggregate is what the HAVING clause is for. But even if that didn't exist, you could just use a subquery instead. You don't need to make table...

Tbh it just sounds like you don't know SQL very well. Which is fine, but doesn't make for a very compelling criticism. SQL does have warts (even though it's great overall), but none of what you described are real problems.

Valmond@lemmy.world · 2 pts · 262d (8 replies)

LEFT JOIN

Includes empty entries, doubles others.

...

It sure is long due for an overhaul.

expr@programming.dev · 5 pts · 262d (7 replies)

That's the whole point of a left join? Anything else wouldn't be a left join anymore.

Valmond@lemmy.world · 1 pts · 262d (6 replies)

Well I didn't expect doubles. I'm sure not an expert.

expr@programming.dev · 5 pts · 262d (5 replies)

It doesn't arbitrarily double rows or something. For each row in the relation on the left of the join, it will produce 1 or more rows depending on how many rows in the relation on the right of the join match the join condition. The output relation of the join may have duplicate rows depending on the contents of each joined relation as well as what columns you are projecting from each.

If you want to remove duplicates, that's what DISTINCT is for.

Valmond@lemmy.world · 1 pts · 262d (4 replies)

Thanks, I will kot forget that the next time I have to do SQL!

Still wild there are no simpler language that have grown in popilarity for databases though.

expr@programming.dev · 5 pts · 262d (3 replies)

To be honest, it's remarkably simple for what it's doing. There's a ton of details that are abstracted away. Databases are massively complex things, yet we can write simple queries to interact with them, with semantics that are well-understood and documented. I think, like anything else, it requires a bit of effort to learn (not a lot, though). Once you do, it's pretty easy to use. I've seen many non-technical people learn enough to write one-off queries for their own purposes, which I think is a testament to its simplicity.

Valmond@lemmy.world · 1 pts · 262d

Oneliners are simple I give that to you, but then you have those incomplete tables and whatnot. Like take all entries from A and join B on A.id and B.id, set the result to some default if B doesn't exist.

You are surely going to whip up a perfect string of SQL but I'd struggle.

captainlezbian@lemmy.world · 21 pts · 262d (1 reply)

The word for R Studio fan is "scientist"

Meron35@lemmy.world · 2 pts · 261d

Scientists too busy writing grant proposals to realise that the developers of RStudio have made Positron, which is VS Code based and generally better

sunoc@sh.itjust.works · 17 pts · 262d

Java !

Scoopta@programming.dev · 15 pts · 262d (2 replies)

C++, ew, no thanks, also where is C??

entwine@programming.dev · 14 pts · 262d (1 reply)

You can't spell "INCEL" without "C"

Scoopta@programming.dev · 10 pts · 262d

😭😭😭😭

sexy_peach@feddit.org · 15 pts · 262d

Never c++

palordrolap@fedia.io · 14 pts · 262d (3 replies)

Me, looking between a picture of Bjarne Stroustrup and OP: ... are you sure about that?

genfood@feddit.org · 0 pts · 262d (2 replies)

Who’s that?

WanderingThoughts@europe.pub · 26 pts · 262d (1 reply)

This sexy hunk is the inventor of C++

genfood@feddit.org · 9 pts · 262d

I knew that, just wanted to test you.

RoyaltyInTraining@lemmy.world · 13 pts · 261d (4 replies)

Programming in C++ is downright horrifying to me after trying other languages. The way it does generics is fucked up on so many levels...

UnderpantsWeevil@lemmy.world · 10 pts · 261d (2 replies)

Feels a bit like being told to do brain surgery and getting handed a hatchet, especially in the modern era.

Like, its a great learning language precisely because it does force you to think about what's actually under the hood of your objects and attributes. You actually have to learn what a pointer is. You actually have to think about memory usage and system states. Its like Bio 1 when they have you dissect a rat.

But without a ton of library support, you're doing so much heavy lifting. And with a bunch of library support... why not just use C#?

Pelicanen@sopuli.xyz · 10 pts · 261d (1 reply)

...do you mean C++ or just C? Cause, sure, you can poke around with pointers and references in C++ but it can also be used just like any other OOP language, whereas in C it's absolutely necessary since it's not an OOP language.

UnderpantsWeevil@lemmy.world · 4 pts · 261d

Cause, sure, you can poke around with pointers and references in C++ but it can also be used just like any other OOP language

Fair. It is harder to break things in C++ than C. Although I've definitely created a few memory leaks.

I'll admit I haven't actively fucked with C++ in over a decade, but in my experience you're not going to find the kind of native integration with - say - Azure or SQL that's baked into more modern languages. You can work around this with libraries. But eventually you're just emulating a higher level language.

bestboyfriendintheworld@sh.itjust.works · 4 pts · 260d

C++ is a great language it you refrain from using 70% of its features.

BartyDeCanter@lemmy.sdf.org · 9 pts · 262d (1 reply)

I was a C/C++ dev for a long time. Then a while back I got an ewaste Thinkpad running Linux and have started developing in Rust. When do my programming socks show up?

sukhmel@programming.dev · 2 pts · 260d

You have to knit them yourself

BlameTheAntifa@lemmy.world · 9 pts · 262d

I do find C++ and Rust very attractive. I’m sure some of the other languages have very nice personalities, though.

apftwb@lemmy.world · 8 pts · 260d

"Yeah I am something of a Javascript user myself"

opens any modern webpage

falseWhite@lemmy.world · 8 pts · 262d (1 reply)
[ removed ]
Uri@infosec.pub · 4 pts · 262d

Hopefully I keep js disabled

umbraroze@slrpnk.net · 8 pts · 262d (2 replies)

Yeah I wouldn't date an RStudio user. Real men do their R coding in Jupyter.

sp3ctr4l@lemmy.dbzer0.com · 5 pts · 262d

... and thus they also have no time left to date.

I was gonna comment on why Jupyter isn't on here, and then I realized that any one who uses 'raw' R and/or Jupyter... they have 0 free time, they are generally overworked as fuck, thus they correctly are not even on a dating social graph.

Search your heart, or your datasets, you know it to be true.

adry@piefed.social · 1 pts · 262d

The only truth in your statement is that I don't need any dates. RStudio is my loyal waifu.

Mesa@programming.dev · 8 pts · 261d

I presume "vibe coder" stands for Visual Besic?

baltakatei@sopuli.xyz · 8 pts · 262d

I expected circular arrows pointing back towards themselves for many on the diagram.

Bababasti@feddit.org · 7 pts · 261d (2 replies)

What do I get as PHP Developer?

123@programming.dev · 13 pts · 260d

A beating on a good day.

tangonov@lemmy.ca · 4 pts · 260d

A lambo obviously

ButteryMonkey@piefed.social · 7 pts · 262d (6 replies)

RStudio and SQL are the only ones of those things I’m aware of having experience with (no idea what language rimworld is coded in, but I’ve also only read that, not tried to modify it).

But if some dude wanted to spend a bunch of time and energy to teach me all about their burning passion language or whatever, that’d be pretty hot. Maybe not JavaScript.. ;)

Not in a “dick me down immediately” sort of way, ofc, but in a “mmmm sexy brain and sexy willingness to teach complicated stuff” sort of way. And really to me that’s a solid spring-board to “dick me down immediately” territory.

thevoidzero@lemmy.world · 4 pts · 262d (4 replies)

I second this. This is how I got my wife to like me.

Be careful not to go overboard though, my wife, during the first few weeks, thought I might be hacking into her phone because I was tech savvy and we had too many weird things in common.

masuhiro@lemmy.world · 2 pts · 261d

Thirding it. My now girlfriend and I met through our D&D group, but she only asked me out after another player got a surprisingly believable scam text about paying for her college classes and I did some digging into the link to see what all it was doing to show it was fake. So uh I guess learn how DNS lookups and curl work kids?

DoctorPress@lemmy.zip · 2 pts · 260d (2 replies)
[ removed ]
thevoidzero@lemmy.world · 1 pts · 252d (1 reply)

Sorry I forgot to respond.

The thing that triggered it was when I shared an xkcd link. I have seen it a lot here but I guess it's niche. And knowing about tardigrades, and many weird biology knowledge about bugs, bacteria, and such. We're both super nerdy about science, but at the same time we hadn't met anyone else be this nerdy about science in real life.

DoctorPress@lemmy.zip · 1 pts · 251d
[ removed ]
ReluctantMuskrat@lemmy.world · 2 pts · 259d

Teaching my lady SQL is exactly where the sparks started over 30 years ago. It worked at least once 🙂

KokusnussRitter@discuss.tchncs.de · 7 pts · 262d

having a C# dev boyfriend would be such a boon. "hey honeyyy? unity is not doing what I want it to, can you be my rubber ducky? <3" Wait, I remebered I am using Unreal/ C++ now. Nevermind. 10/10 accurate diagram.

SoftestSapphic@lemmy.world · 7 pts · 262d

I hate C++ so much

cepelinas@sopuli.xyz · 3 pts · 262d

So that's why they teach c++ in schools.

Miaou@jlai.lu · 3 pts · 262d (4 replies)

I started learning Coq recently. Where does that place me?

entwine@programming.dev · 16 pts · 262d

The White House?

edinbruh@feddit.it · 5 pts · 262d (2 replies)

It places you one year ago before they rebranded in rocq (obviously to stop the puns)

Miaou@jlai.lu · 2 pts · 261d

I know but I choose to ignore the rebranding, for exactly the same reason

massive_bereavement@fedia.io · 2 pts · 261d

That sounds harder.

FosterMolasses@leminal.space · 2 pts · 262d

Matlab?! Holy shit hahaha

REDACTED@infosec.pub · 1 pts · 260d

Damn, I'm c-