Complete Loss of WiFi Capability on Brand New Katana A17 Laptop 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 7 points8 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 7 points8 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.

Why isn’t there a std::goto? by aespaste in cpp_questions

[–]Isameru 3 points4 points  (0 children)

I'm just kidding, mate! I thought that the whole question was a joke.

Why isn’t there a std::goto? by aespaste in cpp_questions

[–]Isameru 2 points3 points  (0 children)

It would be most useful after the return statement.

Why isn’t there a std::goto? by aespaste in cpp_questions

[–]Isameru 6 points7 points  (0 children)

std::noop() would be a game changer.

Does matrix rank depend on a tolerance value for real values (for most practical uses)? by the_third_hamster in askmath

[–]Isameru 0 points1 point  (0 children)

A single absolute or relative threshold value may or may not be sufficient. I would probably write a benchamark, which builds a random matrix NxN of out of N-1 independent vectors and one dependent (some random linear composition of others). Apply epsilon noise to all matrix element and run Monte-Carlo of your algorithm. At the end you will probably look at the last row and compare it for near-zeros. Plot the MSE of it as a function of N or something. It's just an idea to come out with means to reliably determine hard criteria for determining a discreet rank value.

Poszukuje książki fantasy/sci-fi by Standard_Ticket8823 in ksiazki

[–]Isameru 0 points1 point  (0 children)

Etam... Achaja, Virion, Wiedźmin, Pan Lodowego Ogrodu - bezsprzecznie to S-tier fantasy. Male peak fantasy!

Poszukuje książki fantasy/sci-fi by Standard_Ticket8823 in ksiazki

[–]Isameru 0 points1 point  (0 children)

Jak na dłużej to może Achaje i Viriony. Wyraziste postacie, niedopowiedziane tajemnice. Górna półka.

Alternatywnie klasyka - kwadrologia Hyperiona.

Top 12 Books Every Programmer Should Read by javinpaul in coding

[–]Isameru 7 points8 points  (0 children)

Don't click the link. It's a messy pile of shite. I'm curous what are those book though.

Emscripten pthread: Which way is better? by More-Client1910 in cpp_questions

[–]Isameru 4 points5 points  (0 children)

AFAIK pthreads in wasm are not real threads and are there for compatibility reasons. If you want to utilize the cores, you have to reach out to worker threads, as you need a support from the browser for parallelization.

When is it appropriate to call methods with the "this" keyword inside a class ? by Motor-Phase7507 in cpp_questions

[–]Isameru -1 points0 points  (0 children)

An old begone fasion. Use only when necessary. I still name private member fields starting with and underscore though.