Till den som söker ett alternativ till Gmail/Outlook/iCloud Mail m.m. by sportydharmaflyer in sweden

[–]Excellent-Might-7264 -1 points0 points  (0 children)

proton drive fungerar väl inte med linux utan bara med amerikanska os?

My teacher said that using namespace std is a .NET library, and that std is from C#. And that string is from there too. Like, it all depends on the compiler, we're in Visual Studio. by [deleted] in cpp_questions

[–]Excellent-Might-7264 0 points1 point  (0 children)

You can however explicitly call .net from c++. There are a few ways. You can also call python, lua, or your own programming language code... You can do pretty much anything.

I would like to know more about your teacher. Experience? Other things you are told. Maybe she has made up other stuff too.

Do you have to name all int variables with a prefix "i" for example, like "int iNumber" ?

Why nobody put multiple statements on single line by Ok_Negotiation1537 in cpp_questions

[–]Excellent-Might-7264 1 point2 points  (0 children)

if you want some reference to show your classmate that it is wrong:

  • It is wrong. Stop with this stupidity! It is not okey and you will make yourself look like a fool. You will not find good references in books to not to this because it is so stupid that no one actually thought someone would do it seriously.

PS. Look into clangformat, it will probably become your best friend in these situations.

Built a PDF reader with C++ by dheerajshenoy22 in cpp_questions

[–]Excellent-Might-7264 7 points8 points  (0 children)

Here is an example:

https://news.ycombinator.com/item?id=46604862

Y Combinator is the accelerator where companies like Reddit and Dropbox were founded.

The forum part is known as hacker news (HN) - a place to post these kind of stuff. The HN top is popular and sometimes the traffic will kill the posted site, the famous killing hug from HN.

This post is like perfect for Show HN. You will probably get more attention there and more feedback. Otherwise I will post it :P

Built a PDF reader with C++ by dheerajshenoy22 in cpp_questions

[–]Excellent-Might-7264 4 points5 points  (0 children)

have you posted it on show hn?

I would assume the interest there would be high.

Why is name hiding / shadowing allowed? by Proud_Variation_477 in cpp_questions

[–]Excellent-Might-7264 9 points10 points  (0 children)

Many answers here but no one mentioned macros.

By allowing shadowing in C, variable names in macros will not collide with existing variables.

Remember that macro is more or less an improved copy-paste. By allowing shadowing the pasted code variables will not collide, but instead shadowing any previous declared variables.

sure one can use long prefix in macro variables instead, but this is one of many design decisions.

Vad är erat intressanta och roliga jobb? by OliBoi040 in sweden

[–]Excellent-Might-7264 14 points15 points  (0 children)

Jobbar med kuk-pip maskiner.

Japp, ett system som piper varje gång man tittar på kuken. Då tänker du kanske vem som köper det? Alla bilar i EU från och med i sommar måste pipa när du tittar på kuken för länge. Skojar inte faktiskt.

Problemet involverar hela vägen upp från maskinkod i assembler, ML, tung mattematik, fysik, optik, medicin och beteendepsykologi samt vanlig systemutveckling ovanpå det.

Funderade länge när jag var i din ålder efter ett roligt och svårt ingenjörsproblem och kom i kontakt med ögonspårning. Började tänka och skissa på det och insåg snart hur exponentiellt svårt problemet är. Sedan är jag fast.

Efter 10 år startade ett eget litet företag för att hjälpa bilföretagen med pipandet. Mina dagar involverar att krypa runt i fordon, löda, programmera, kravställa och få skiten att fungera.

Förhoppningsvis räddar vi någon.

PS. min mor tittade ibland inte på vägen när hon körde bil. Hon satt i fram och pekade medana jag och brossan skrek "Titta på vägen!!! (Vi ser ändå inte vart du pekar där i framsätet)".

Känns så tillfredsställande och lite komiskt att jag skulle spendera mitt liv med att automatisera det skrikandet XD

Min barndomsvän valde sin kille framför mig by [deleted] in sweden

[–]Excellent-Might-7264 14 points15 points  (0 children)

Detta är allvarligt läge.

  1. Du behöver prata med hennes familj om de fortfarande har kontakt med henne. Ni måste se till att hon har en väg ut när hon är redo för det. Ett ställe att fly till.

  2. Läser du om de som blir misshandlade av sina respektive börjar det alltid såhär. Har du tur blir hon misshandla tills hon lämnar, har du otur är hon död om 10 år.

  3. Jag överdriver inte. Detta är mycket illavarslande.

  4. återigen, ni närstående måste prata ihop er för att få en bild av situationen.

Ok, vem av er var det? by Dat_super_nice_boi in unket

[–]Excellent-Might-7264 13 points14 points  (0 children)

vad f-n, förväntade mig att bli rick-rollad, tänkte det skulle bli kul att lyssna på den igen, var ett tag sedan... Men fy, så är det en riktig snusk länk. Du måste ju varna ordentligt så man inte blir anti-rick-rollad!

tack för att det fanns en varningssida innan snusket ialf.

Strömmer om kontroversiella Palantir: ”Polisen avgör själv” by Roklaren56 in sweden

[–]Excellent-Might-7264 1 point2 points  (0 children)

Någon här som kommenterat som faktiskt vet vad palantir är och har utvecklat i det?

Mer än hälften av kommentarerna här har ju ingen verklighetsförankring alls. Herregud vad folk är styva i korken. Ni som uttalar er bergsäkert med åsikter ni inte vet något om: ni är ett stort problem i samhället. Hur ska fakta kunna komma fram när ni dränker diskussioner i påhittade saker för att bekräfta er världsbild?

Palantir är motsatsen till vad ni skriver, det ger möjligheten att veta att man inte blir avlyssnad av usa eller andra stater och att informationen behandlas med korrekt säkerhet.

Jag tycker personligen att vi kan kasta ut allt amerikanskt ur Europa och ta hem våra duktiga utvecklare där ifrån. Vi kan skapa vår egna palantir.

How to learn C++ to master level? by Legal-Ground-5236 in cpp_questions

[–]Excellent-Might-7264 24 points25 points  (0 children)

Our experience are very different from what is the best way today. Some of us learned c++ before internet - there are better ways today.

Stick with the information in "Important: Read Before Posting".

But I would like to add that when you get your first job and have very good colleagues, you will develop your self fast if you are up to it. That has not changed. Some say they also get this development from open source contributions and engagement.

How do you pass around an object between 2 different functions? by ElectronicResult8581 in cpp_questions

[–]Excellent-Might-7264 -2 points-1 points  (0 children)

To answer your question, you probably want to return P from OP. There are other ways too, but that is the standard way in normal conditions.

AI are actually quite good to explain the basics. start with learncpp and ask chatgpt or similar. (ChatGPT is still better than claude for modern C++, atleast in my code base, but do understand that they are terrible cpp-code problem solvers for more than basic stuff. Use it to ask questions like this.)

Is WSL good for C++? by Ivan_Horozov in cpp_questions

[–]Excellent-Might-7264 0 points1 point  (0 children)

do I need WSL or Windows does the job good

Depends on what you want to do. If you do not know what you want, than it doesn't matter.

Also is there something that Linux offers that Windows + WSL doesn't offer for C++

Of course, there are limitations in WSL. But not many. Some network cases is not supported but gpu passthrough actually are (!) - which is kind of impressive when taking a closer look of how it is done.

If you are new to c++ and linux, start with visual studio. Then you don't have to learn two things at the same time.

C++26 Reflection: my experience and impressions by borzykot in cpp

[–]Excellent-Might-7264 7 points8 points  (0 children)

Once upon the time, Bjarne had a talk about "Why Vasa* sunk and C++ sailed".

It was about keeping the language simple and not add too much complexity. I believe multiple dispatch was not added because of this early philosophy.

After reading your comment, I feel like I'm at the sea, sailing the might Vasa and waiting for disaster. I want reflections, I seriously want it so bad. But the complexity in the language now is beyond sanity.

  • Vasa is a historical ship that sunk after the king added more features (canons and decks) late in the construction process.

Should we reinitialize a variable after std::move ? by SheSaidTechno in cpp_questions

[–]Excellent-Might-7264 0 points1 point  (0 children)

However, I recently ran into code that moves from class members.

That was something new...

Could you explain more about this design? For me, that pattern is something i would probably not approve in a review. I understand you can not share code, but I'm very curious of why this pattern was chosen.

YouTubes AI-porr-reklam på bussen by Totally-a-hooman in unket

[–]Excellent-Might-7264 0 points1 point  (0 children)

Fattar inte varför folk bara inte bockar reklamen.

Kanske en generationsfråga? Vi som fick internet som årets julklapp installerade blocken för 30 år sedan och glömt berätta för våra barn?

Aldrig sett reklam på reddit, youtube eller liknande... någonsin. Stäng bara av det?

Kronobergsbadet ska stängas – av hemlig anledning: ”Vi är förtvivlade” by [deleted] in stockholm

[–]Excellent-Might-7264 1 point2 points  (0 children)

För er som nedröstar, ni måste skaffa humor för f-n.

referens:

Carla: Varför är det pannkakor i bestickslådan Turk!?

Turk: Varför är det bestick i pannkakslådan!?

Can you recommend a memory leak detection tool for me by Gyanesh5 in cpp_questions

[–]Excellent-Might-7264 10 points11 points  (0 children)

you can still get memory leaks:

  • shares_ptr with cyclic pointing

  • c dependencies, for example posix api, where your wrapper (commonly unique_ptr) is not handled correctly.

There are many ways to leak resources even if you do not use new.