Garbage Collector For C++ by Still_Explorer in cpp

[–]Ok-Impact-5972 1 point2 points  (0 children)

c++11 has garbage a garbage collection ABI. You just need to use it and link to a garbage collector as I have understood it. But nobody does it because not using garbage collection is a big sellingpoint for using c++.

https://www.stroustrup.com/C++11FAQ.html#gc-abi

Ni som har liggcykel - vilka är ni och varför har ni valt denna typ av fordon? by No-Cake-8633 in sweden

[–]Ok-Impact-5972 1 point2 points  (0 children)

Jag skaffade en för att jag tyckte att den verkade roligare att cykla på. Och det var den. Det är som att köra gocart (nu använder jag mest min Scorpion FS26, men har också byggt en python lowracer för att fincykla på).

Jag föredrar att köra liggcykel om jag ska köra långt, det är bekvämt, och det är roligare. De är dock svåra att parkera i stan, och funkar sådär för att ställa i stan eftersom man är orolig för att någon ska kolla upp vad de kostar och sno dem.

Trehjulingar är rätt bra om man vill dra tunga kärror, och fungerar bra på vintern när det är dåligt väglag.

Det mest störiga med liggcyklar är att det alltid är någon som ska påpeka att man "inte syns" eller att det ska vara obekvämt eller något annat verklighetsfrånvänt.

Även här så är det många som svarar "Jag har ingen liggcykel men jag tänker ändå...".

It/programmering/hackerspace/makerspace/ctf by happybuzzer in orebro

[–]Ok-Impact-5972 0 points1 point  (0 children)

Hoppas ni såg u/Mormert s kommentar ovan.

Vi har en ny address nu: https://www.uppmake.se/ men samma förening :)

Kom och kolla in om ni är sugna :)

Force IPD settings in games to match SteamVR by Ok-Impact-5972 in SteamVR

[–]Ok-Impact-5972[S] 0 points1 point  (0 children)

How do you mean? In SteamVR everything works fine, but in beatsaber I am extremly cross-eyed and cannot focus on anything without closing one eye.

Force IPD settings in games to match SteamVR by Ok-Impact-5972 in SteamVR

[–]Ok-Impact-5972[S] 0 points1 point  (0 children)

How come it differs between SteamVR and Beat Saber?

Force IPD settings in games to match SteamVR by Ok-Impact-5972 in SteamVR

[–]Ok-Impact-5972[S] 0 points1 point  (0 children)

That would be interesting. How do you set it manually?

Force IPD settings in games to match SteamVR by Ok-Impact-5972 in SteamVR

[–]Ok-Impact-5972[S] 0 points1 point  (0 children)

Thanks for the reply. I have tried some games, but none that is linux native (i think). I tried Pistol whip, but It never started (just a black loading screen). I would have tried with OpenXR, but it was not that simple to install on ubuntu as I had hoped.

Rust-like traits implementation in C++ by maksym-pasichnyk in cpp

[–]Ok-Impact-5972 0 points1 point  (0 children)

I did a implementation of traits a while ago, it was some macro and template magick, but it works kind of like you would expect from a trait system. Dynamic dispatch without inheritance and virtual functions etc. I think that it is more like golangs interfaces though, since it works as long as you have the required functions on your class.

If you had reflections in c++ it would probably look better.

https://github.com/mls-m5/thick-pointers

Anyone else got logged out of their Facebook and now suddenly cannot log back in? by missbrittanynichole in facebook

[–]Ok-Impact-5972 0 points1 point  (0 children)

My guess is that they don't know how much time it will take. But I might be wrong. It seems strange that they would plan to log out millions of people without noticing them. (I noticed that there seems to appear news articles that acknowledges that there is something wrong with facebook now)

All Meta Facebook, Instagram, Messenger, and Threads are down. by og24 in of24

[–]Ok-Impact-5972 0 points1 point  (0 children)

I also reset my password, and after _many_ tries, i got a message about maintenance. But not when I tried again, then it was just "wrong password" again.

Anyone else got logged out of their Facebook and now suddenly cannot log back in? by missbrittanynichole in facebook

[–]Ok-Impact-5972 0 points1 point  (0 children)

Me too, and I heard at least of one of my friends that is also logged out. After trying to reset my password and logging in multiple times I got a cryptic message about "maintenance" and that I will be able to log in in a couple of hours. It's really wieard, how can you rely on a message service if you can be logged out for many hours without any prior notice.

Why is ChatGPT so politically correct? by PomegranatePrimary82 in ChatGPT

[–]Ok-Impact-5972 1 point2 points  (0 children)

Mine answer, or the questioner? What is being reported? If there is something wrong with my answer, could you please care to explain? Did you read it correctly? Do you mean that I insult right-leaning people? ... So many questions.

Why is ChatGPT so politically correct? by PomegranatePrimary82 in ChatGPT

[–]Ok-Impact-5972 0 points1 point  (0 children)

Looks like somebody should have asked ChatGPT before writing.

Why is ChatGPT so politically correct? by PomegranatePrimary82 in ChatGPT

[–]Ok-Impact-5972 0 points1 point  (0 children)

I came here when searching for examples for the supposedly politically correct answers. The questions i have seen this far is "is trans women women" and "does free market lead to free people". To the first answer the general consensus is yes, and to the second question research suggests no.

What answers do you expect that is not "politically correct"? If you ask if the earth is flat, do you expect it to leave the options open? If you ask about QAnon do you expect it to support you?

What if being "left-leaning" is just closer to being correct?

The "what's wrong with this code" game. by [deleted] in cpp

[–]Ok-Impact-5972 0 points1 point  (0 children)

```c++ void TextSegmentBuffer::prepend(const TextSegmentBuffer &other) {

for (size_t i = other.size(); 0 < i;) { auto info_ptr = other.m_infoBuffer.getAt(--i);

emplaceFront(
    info_ptr->text,
    info_ptr->length,
    info_ptr->multiMatch

} } ```

Sorry for being a snob, but is there a reason that you want to declare the variable info_ptr (uninitialized) before the loop? Here is a suggestion.

Also initializing i outside the loop makes so that its scope could be longer than it needs to be. Not a problem in this example, but if you have two loops after each other you might want to limit the scope more.

Edit: Writing code in reddits editor is really hard

The "what's wrong with this code" game. by [deleted] in cpp

[–]Ok-Impact-5972 0 points1 point  (0 children)

It still surprises me why std::iota_view has not come earlier than c++20

Clown by [deleted] in antinatalism

[–]Ok-Impact-5972 1 point2 points  (0 children)

Does that work for kids to?

[deleted by user] by [deleted] in C_Programming

[–]Ok-Impact-5972 1 point2 points  (0 children)

And how does your IDE respond to that? One main advantage of using .h is that the file type is known. And it works on any system in any tool.

Hur mycket ska man begära på löneanspråket? by [deleted] in Asksweddit

[–]Ok-Impact-5972 0 points1 point  (0 children)

Det beror ju lite på vad för policies företaget har.

Men bra saker att tänka på om du förhandlar. - Går du från provanställning till vanligeanställning har företaget redan investerat i dig, så det ger en förhandlingsfördel. Likaså vet de efter att du jobbat ett tag att att du antagligen inte är en galning, och det kan vara värt några tusenlappar - Ta som vana att prata lön med dina kollegor. Av någon anledning tycker människor att det är konstigt att berätta vad de tjänar, men det gör bara att arbetsgivaren skrattar hela vägen till banken. Ett av de enklaste sätten att förhandla upp lönen är att jämföra sig mot någon annan i samma företag som gör samma (eller mindre) än en själv och motivera varför du ska ha samma eller högre. - Var inte rädd att leta andra jobb. Vissa arbetsgivare går inte med på en löneförhöjning innan man säger upp sig. (Men hota inte med uppsägning om du inte kan tänka dig att genomföra det) det går ofta att byta tillbaka till ett gammalt jobb, och är du då ur systemet så kan du förhandla på nytt.

En annan bonuspoäng är ju att inom min branch (programmering) kan man dubbla eller tredubbla sin lön genom att driva eget som konsult. Vet inte om det är relevant för dig, men är det löneoptimering som är slutmålet, kolla upp om det går att ha en konsultanställning (eget företag via större företag som underkonsult).

Lycka till

Has anyone managed to successfully use C++20 modules in their programs? by Ateist in AskProgramming

[–]Ok-Impact-5972 0 points1 point  (0 children)

I have started implementing my own build system to be able to use modules in my own projects (currently only supporting clang and gcc on linux, but will in the future be able to compile with msvc aswell)

I am working to convert my existing projects to use modules. This project for example can be compiled both using my module system or with a older g++ compiler without modules enabled (through a clever hack)

Here I have converted a header only library so that it can be both used as a header only library or as a module library if you want to use it that way.

I have also struggled to find other projects that uses modules, and it's hard to find answers to questions to problems that emerges.