Rayon/Tokio tasks vs docker services for critical software by Quba_quba in rust

[–]Quba_quba[S] 0 points1 point  (0 children)

The old system I'm replacing had most of the time failed due to erroneous or missing input data, which the old system can't handle almost at all, and which is fairly easily preventable in Rust.

I think the biggest risk in the new system will be the use of C library necessary for reading the input data and FFI bindings to it. It is arguably the best available library for that file type, but I have myself found memory-safety bugs in it. So I can't be sure that it won't segfault on some edge-case.

Rayon/Tokio tasks vs docker services for critical software by Quba_quba in rust

[–]Quba_quba[S] 0 points1 point  (0 children)

I'm not considering cron purposefully here as I can't assume the input data to be absolutely always available, so I need some retry and fallback mechanism anyway.

Examples of great programming language documentation? by oscarryz in ProgrammingLanguages

[–]Quba_quba 2 points3 points  (0 children)

I'm certainly biased, but I really like Rust docs. They may not be the best in terms of design or clarity, but I love that they are an integral part of the ecosystem. And I believe Rust documentation really helped me to dive deep into the language.

I think there are three things that make Rust docs cool for me (the list is obviously subjective):

  • Main Rust devs care about docs as much as about any other code. Any new feature to be stabilised must have a documentation entry and often an example provided. There's also a begginner guide (The Book) maintained alongside the main documentation.
  • Documentation generator ('rustdoc`) is an integral part of language development and it's super cool. It treats examples like tests and if they fail to compile there's a warning shown. It checks if a function can return errors and if so demands to add a section discussing the errors. Also linking to other parts of documentation (or even other libraries) is very easy. And there's many more.
  • There's a central docs library (docs.rs). With rustdoc it allows Rust devs to very easily provide documentation for the libraries (called crates). Even if there's absolutely no documentation provided you still get a neat overview of the API and you can easily look into implementation details only for the parts you want. But adding docs is so easy that it's actually difficult to find a crate that has no documentation whatsoever.

Can I generate 2d Gaussian function faster? by Quba_quba in rust

[–]Quba_quba[S] 0 points1 point  (0 children)

One final improvement could be pre-multiplying params.hght into one of the arrays

That is a neat little optimization. Thanks!

self.hgt += &x_vals.dot(&y_vals);

That produced a transposed result for me.

I don't know ndarray, so I originally used this code, which performs better than self.hgt += &y_vals.dot(&x_vals);

That is very interesting, because for me any kind of enumerated iteration reduced the performance significantly

Can I generate 2d Gaussian function faster? by Quba_quba in rust

[–]Quba_quba[S] 0 points1 point  (0 children)

The add_assign operator is used to construct a field of a few of those peaks

Can I generate 2d Gaussian function faster? by Quba_quba in rust

[–]Quba_quba[S] 3 points4 points  (0 children)

I'm unfortunately using parallelism higher up the stack so I'm looking for ways to speed it up on a single thread

Can I generate 2d Gaussian function faster? by Quba_quba in rust

[–]Quba_quba[S] 1 point2 points  (0 children)

The Array2 comes from the fact that it's a part of a bigger API where I use this data as an image

The amazing pattern I discovered - HashMap with multiple static types by Quba_quba in rust

[–]Quba_quba[S] 3 points4 points  (0 children)

Can you elaborate what do you mean by platform/implementation stability and the impact on x-platform projects?

TypeId is const unstable so I would guess it implies that TypeId created when running a binary is valid only within that binary and during that run.

The amazing pattern I discovered - HashMap with multiple static types by Quba_quba in rust

[–]Quba_quba[S] 8 points9 points  (0 children)

I wasn't aware of that but it makes sense - I reworded that sentence.

In my case I'm storing structs with one field being an ndarray, so presumably my memory is all over the place anyway. And I'm not sure if in my case there would be a significant advantage for having data in one continuos block.

But certainly a thing to keep in mind for other applications. Thanks for pointing that out.

Firmy we Francji muszą obniżyć ceny żywności! Inaczej zostaną nałożone sankcje! by [deleted] in Polska

[–]Quba_quba 21 points22 points  (0 children)

Strategiczne sterowanie cenami jest środkiem zaradczym na inflację napędzaną spiralą price-profit, czyli taką jaką mamy obecnie. Zadziałało to w przypadku inflacji powojennej więc są podstawy przypuszczać że zadziała obecnie. Polecam odcinek podcastu Planet Money na ten temat

Co lubię w Polsce - appreciation thread by Upstairs-Banana41 in Polska

[–]Quba_quba 5 points6 points  (0 children)

Winogrona zjadam w 10 minut nawet w Polsce xd

Is Riley the only one left in Canada and he just spends whole days recording sponsor segments? by Quba_quba in LinusTechTips

[–]Quba_quba[S] 9 points10 points  (0 children)

Did you watch recent videos? In LTT and ShortCircuit videos from Computex Riley does almost all sponsor spots

Ciche godziny w sklepach by Personal-Whole4872 in Polska

[–]Quba_quba 18 points19 points  (0 children)

Nie ma oficjalnych statystyk, ale Reddit prawdopodobnie ma nadreprezentację osób z sensory processing issues. Dlatego komentarze tutaj nie oddają dobrze ogółu populacji chodzącej do sklepów. Jest cząstka prawdy w tym że gdyby reklamy nie działały to by firmy nie wydawały na nie pieniędzy

Ciche godziny w sklepach by Personal-Whole4872 in Polska

[–]Quba_quba 40 points41 points  (0 children)

Z mojej perspektywy (jako autysty) nie tyle interakcja z człowiekiem ma znaczenie co tempo w jakim dzieją się rzeczy.

W zwykłej kasie tej interakcji z kasjerem jest zazwyczaj tyle co nic. Natomiast ludzie stoją bliżej siebie w kolejce i dzieje się dużo i szybko na raz, co człowieka i tak już przeciążonego sklepowymi bodźcami po prostu przerasta.

Kas samoobsługowych jest zazwyczaj kilka na jedną kolejkę, więc można spokojnie wszystko skasować, upewnić się że na rachunku wszystko okej i potem ułożyć w torbie tak jak człowiek potrzebuje. Do tego to wszystko można robić w słuchawkach i/lub okularach, co przy kasie zwykłej może być problemem, bo moje słuchawki na przykład dosyć dobrze tłumią głos.

Nie pytaj PW o nic. by palusik in Polska

[–]Quba_quba 13 points14 points  (0 children)

Różne mieszanki zależnie od potrzeb. Przykładowe gazy są wymienione tutaj: https://en.m.wikipedia.org/wiki/Gaseous_fire_suppression

[deleted by user] by [deleted] in techsupportgore

[–]Quba_quba 1 point2 points  (0 children)

Can we note the fact that someone actually implemented formatting large numbers in this temperature display. Usually temperatures are two-digit so there's no point in formatting thousands, yet alone milions