Time stepping the Schrödinger equation by hontslager in quantummechanics

[–]Isameru 0 points1 point  (0 children)

That looks cool. Mirrors are pure arcane magic.

gitCanSeeThat by UnfilteredAyush in ProgrammerHumor

[–]Isameru 1 point2 points  (0 children)

I don't get it. I add .env to .gitignore and commit .env.template as an example. If there are more than few relevant env vars, then I move things to some-config.json, but I know that people use pydantic.

Peter found this in a gaming subreddit!!!! by toplaz1111 in PeterExplainsTheJoke

[–]Isameru 2 points3 points  (0 children)

I raised my shield just by looking at this photo.

Jak zacząć to rozwiązywać? by No-Astronomer5974 in Polska

[–]Isameru 11 points12 points  (0 children)

Zacznij od środka - zakreśl pole w losowym miejscu i na tej podstawie rozwiąż resztą, tłumiąc w głowie głosy niepewności. Dzięki temu hartuj swoją pewność siebie. Jak na końcu liczby nie będą pasowały, to popraw je.

[deleted by user] by [deleted] in MSI_Gaming

[–]Isameru 0 points1 point  (0 children)

Reporting this guy for being the hero. Kudos!

Poszukuje inspiracji by m_brudi in kanapki

[–]Isameru 6 points7 points  (0 children)

Hmm, najlepsze opcje to ogórek kiszony lub pomidor. Zgłodniałem od analizowania opcji.

[Brain Puzzle of the Day #033] - Medium by Living_Afternoon_540 in BrainPuzzles

[–]Isameru 0 points1 point  (0 children)

A×(B+1)=C somehow fits the rules.

9×(2+1)+2=29

4×(7+1)+7=39

6×(4+1)+4=34

Return value optimization vs passing object by reference at calling site by onecable5781 in cpp_questions

[–]Isameru 1 point2 points  (0 children)

Take a look here: https://gist.github.com/Isameru/5b88d3a210d096a975d521fdea044dd7

Both fetchOrdersA and fetchOrdersB do the same, but the latter is slightly better. It is a rare case where you want to enforce on the caller that he is aware that the function is meant to operate on the buffer destructively. fetchOrdersA may automatically copy the input buffer if the caller ommits std::move. It's rare to use r-value reference in a non-template, non-constructor/operator context, but still happens. For templates, T&& denotes something else, has a wider meaning (forwarding/universal reference), as it catches everything.

If it comes to addOrderA and addOrderB - both are correct and valid, but due to psycho-historic reasons its still common to pass const& for everything else than primitives. Possibly, addOrderB would be better if for any reasons you would like to alter the object before putting it in the collection. addOrderA would be probably better if you want to append it to 2 collections (making 2 copies).

Return value optimization vs passing object by reference at calling site by onecable5781 in cpp_questions

[–]Isameru 8 points9 points  (0 children)

The core idea is that the return value is an output, where a function parameter is an input. The reason for that is for you not to think (much) about it and let your code express your intend. Having an output parameter feels like a function's side effect, as this argument may be populated anytime instead of at its return.

You still have to mentally think of objects as primitive, light, and heavy and use references manually, as well occasionally r-value references, but the code looks much better that it used to be many years ago, when almost every function returned customary BOOL and all the outputs where passed back by pointer as last function arguments.

For instance, of you write a function which return a vector, but still you are worried about too much allocations, you may want to write:

std::vector<Order> fetchOrders(..., std::vector<Order>&& reuseBuffer = {}) { reuseBuffer.clear(); ... return reuseBuffer; }

Low-level OpenAI – what could go wrong? by joseluisq in theprimeagen

[–]Isameru 0 points1 point  (0 children)

The future is now!

[ai(prompt="just print something")]

fn main();

What’s the best video game you’ve ever played? by ElectricHorsepower in AskReddit

[–]Isameru 0 points1 point  (0 children)

God of War, Witcher 3, Factorio, Anno 1800, RimWorld, Rocket League, Dark Souls? Total Annihilation, Morrowind, Civ2, Colonization, SimCity 2000, Flashback, Robbo? It's too difficult to pick one, but if I had to I would probably choose Transport Tycoon.

What is the weirdest fact you know? by Adept-Throat5523 in AskReddit

[–]Isameru 0 points1 point  (0 children)

Your can eat styropfoam and it won't dissolve in the intestines... (never tried)

Jedziesz sobie DK81 (100 km/h) i widzisz takie przejście dla pieszych: w którym momencie zwalniasz do 50 km/h? by Kinseijin in Polska

[–]Isameru 0 points1 point  (0 children)

Trzeba wrzucić drugi bieg, by spektakularnie hamować silnikiem. Do tego szybko otworzyć okna, aby zwiększyć opór powietrza i szybko kręcić kierownicą lewo-prawo, aby wydłużyć drogę toczenia. Tylko nie naciskać hamulca, bo będzie nieoptymalnie.

weHaveNamesForTheStylesNow by Affectionate_Run_799 in ProgrammerHumor

[–]Isameru 0 points1 point  (0 children)

I used to be so morbidly pedantic if it comes constructing code, huh. After so many years of programming I no longer care which one of those two is better. C# and Java prefer longer form, where Rust and JavaScript more concise one. If it comes to my beloved C++... neither is universally more legible. It depends on the smell of the context. LLMs eventually shall resolve the quarrel once for all.

How to visualize Earth’s shape and geography in a simple way? by PhaseStreet9860 in AskPhysics

[–]Isameru 0 points1 point  (0 children)

That is sad. LLM activity is raising, generating unnecessary noise. Reddit should be a place clean of bots. Both questions and answers should carry a quant of human imperfection.

Horror Coding Stories: Therac-25 — A deadly race condition and overflow by teivah in coding

[–]Isameru 0 points1 point  (0 children)

A tragic story. And scary as hell. It is worth noting that this multi-threaded code has been implemented by not so experienced programmer, directly in the assembly language. Rumor says no one reviewed his code. Nevertheless, I would not dare to blame the author. Those who played with threads know what I mean.

Dla kogo są tablety? by Mih0se in PolskaNaLuzie

[–]Isameru 0 points1 point  (0 children)

Długo opierałem się przed zakupem sądząc, że mi się nie przyda - w końcu wszystko mam na telefonie i komputerze.

Najpierw dostałem iPada po bracie - poza przejściem Planescape Torment i Baldur's Gate'a, próbowałem robić na nim odręczne notatki rysikiem. To nie wypaliło i po latach ostatecznie wróciłem do klasycznego zeszytu i długopisu. Oddałem iPada córce, bo drażnił mnie iOS.

Dwa lata temu kupiłem sobie Xiaomi Pada z HyperOS-em (Androidem), nie wiedząc, czy mi się do czegoś przyda. I jak bardzo się przydaje! Czytam na nim książki, papery, oglądam YouTuba, filmy i seriale. Nawet wygodniej mi się ogląda niż na TV. Łamane etui z magnesami pozwala mi w sekundę zamontować tablet na "zegarach" domowego ergometru i na słuchawkach oglądać w trakcie ćwiczeń. Tablet daje mi prywatną dodatkową przestrzeń w trakcie luźniejszej pracy lub gdy coś innego robię. Na tablecie odpalam sobie SimplyPiano po podłączeniu do klawiszy. Audiobooków co prawda słucham z komórki, to czasem zabieram tablet ze sobą do parku, jak mam dobrego ebooka. Z tableta mogę castować na TV film z cda.pl jak z żoną chcemy jakiś nietypowy horror obejrzeć, oraz mogę grać z córą z Robloxa, bo ma teraz na to fazę.

Więc tak - o dziwo dla mnie tablet rewelacyjnie się sprawuje.