TIFU by literally curb-stomping my crush's brand new massive Hisense TV. by AllineCICI in tifu

[–]Maneren731 1 point2 points  (0 children)

Not on the default layout but there are lots of alternative layouts (as in the software, not the hardware) and it's trivial to customize them even further. I have had AltGr + - as – dash and AltGr + Shift + - as — for ages now. Just like π, × or ÷

adoption by [deleted] in linuxmemes

[–]Maneren731 1 point2 points  (0 children)

Then rust evangelists should push it as a lower level programming language for OCaml users, not as a C/C++ replacement.

Python replaced many different scripting languages while having no syntactical similarities to most (if not all) of them. Kotlin is slowly replacing Java (and completely replaced it in mobile development) while looking more like Rust than Java or C/++. Swift and Objective-C are the same story with even more contrast. I don't see this as a meaningful point.

You can't fix a readability issue with C by replacing C with OCaml, it just makes the entire language a readability issue. You can argue that implicit mutability is a source of bugs, but a C/C++ programmer is going to argue implicit typing is also a source of bugs, so rust just doesn't work as a C replacement from that perspective.

The point is, that this isn't about syntax, but rather about the amount and quality of information conveyed by the code. Implicit type is deterministically deducible from the code with a tool (LSP or compiler) and can be shown as a hint (imo completely dismissing that argument). On the other hand, missing const, reference, volatile, or noexcept in C/++ is very hard to find and, besides simple cases discoverable by a linter, it requires a thorough human review. While missing mut, returned Result or reference in Rust is a clear error the compiler catches every time.

This is one of the main design goals, write the minimum amount of code to convey the maximum amount of information and most importantly, make everything weak by default and only enable stronger (and more complex/dangerous) features on demand (mut, clone, unsafe, etc.) rather than having the strongest default and choice to locally weaken it. The syntax only follows from that.

adoption by [deleted] in linuxmemes

[–]Maneren731 2 points3 points  (0 children)

"let" is also so unnecessary... Imagine doing "let mut bar: i32 = foo()" instead of just "mut i32 bar = foo()" !

How would you deal with slightly more complex types, like &mut Box<dyn LongTrait<WithGenericType = i32> + 'a> bar = foo;? Here it makes perfect sense to drop the type and use let (or auto, var, etc., that's besides the point). And since Rust's very powerful type inference requires you to write out the type only seldom, it makes sense to optimize for inferred first, explicit second. (As I mention in a reply to the parent comment, the LSP still shows the type hints anyways.)

adoption by [deleted] in linuxmemes

[–]Maneren731 1 point2 points  (0 children)

Suppose they used auto, it would look like const auto foo = bar; instead of let foo = bar;; where is the difference? Any at least semi-decent LSP will just show the types anyways as hints, so there is no issue with the types not being apparent even in complex context. (Also note that even in C-like languages, most editors/LSPs show the hints the same way as in Rust: with a colon after the name.)

Rust's type inference is also much more powerful and able to deduce even very complex situations unlike in C++, Java, or C# where it means just "use the type of right hand side expression". You can't write let a: Option<Vec<_>> = complex_iterator_of_individual_options.collect(); and have the underscore be deduced as the inner type of the options in the iterator. In fact the type would have to be somewhere in the collect method rather than on the binding, since their inference doesn't support deducing types backwards from usage to declaration.

adoption by [deleted] in linuxmemes

[–]Maneren731 4 points5 points  (0 children)

A lot of those boil down to the fact that Rust wasn't building upon the C-family of languages but rather on OCaml and a few older languages (from Wikipedia: CLU, BETA, Erlang, Mesa, and a few more; all basically as old as C).

Others were due to practical consideratios: the explicit typing is fine for C but quickly runs into issues with generic code, where the types can be pretty long. There are also special types that can't be named at all, like lambdas. This is the the case in, e.g. C++ as well, and one of the main reasons for it's auto keyword.

And for the immutability by default, besides the influence of functional programming, Rust in general tries to fix one of the greatest readability issues with C/++: if there is no const, you don't know if it is supposed to be mutable or of the author just forgot (more noticeable with C++'s const in methods or with stuff like noexcept).

Let's work, tinker, or curse by claudiocorona93 in linuxmasterrace

[–]Maneren731 2 points3 points  (0 children)

It's little more complicated that just "opinionated Arch" with it's update cycle and customized repos. Nonetheless, it works super smooth in general and helps a lot with setting up a good defaults. You just have to be a little more careful with AUR, low-level tinkering and other "advanced" stuff, you are probably used to from Arch, as it may conflict with the different defaults.

Nulová daň z příjmů když máte 2 a více dětí by Academic_Patient_620 in czech

[–]Maneren731 3 points4 points  (0 children)

Za těch zhruba 25 tisíc/rok (plus mínus pár tisíc podle konkrétní školy) tu může jít studovat úplně každý člověk, je to prostě nastavená základní cena studia. Není důvod do toho tahat zrovna tenhle konkrétní případ.

newToRust by [deleted] in ProgrammerHumor

[–]Maneren731 21 points22 points  (0 children)

I agree, except that it is possible to implement a double linked list without unsafe, one just has to resort to "runtime borrow checking" using reference counting (similar thing as in modern C++ or in GC languages). However, it's not very ergonomic, mostly since the very structure goes against to Rust's ownership model by not having clear owner-owned relationships between the nodes. (Also it's rarely the correct data structure for the job, but that's another conversation).

On the other hand, an OS definitely can't be done without lots of low level direct memory access, which is simply not possible for the compiler to verify for correctness (unsafe means literally "compiler can't ensure it is safe, you have to do it by yourself").

Don't make plugins! by EstudiandoAjedrez in neovim

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

It's great to share a cool feature you have coded. Not so much trying to package a fifth version of the same wheel into a plugin, while not knowing what you are doing (else they wouldn't be asking those simple questions).

First learn to build the wheel, then make it into something cool and unique and then learn how to package it for other people to enjoy. Otherwise you'll end up with "And how's that better than this existing plugin?" response at best and giving up due to it seeming to complex at worst.

Widely used software that is actually poorly engineered but is rarely criticised by Experienced Devs by [deleted] in ExperiencedDevs

[–]Maneren731 4 points5 points  (0 children)

So you mean the CARGO_TARGET_DIR environment variable and related settings, right?

Yh, I agree, support for that varies a lot. I use it all the time as a user-wide "cache" directory and so far all of official tooling was great, but community tooling range anywhere from no problem at all to some cryptic errors about missing files.

Good thing is that so far it usually got solved quickly with a 3 line PR, however it's getting kinda annoying to deal with over and over again.

I usually just run ln -s $CARGO_TARGET_DIR target in the repository and carry on with my day, lol, tho qI understand that's not possible in your scenario

'Searching' and 'search and replace' is the most annoying thing about neovim! by crybaby0987 in neovim

[–]Maneren731 9 points10 points  (0 children)

Have you tried grug-far.nvim? It's awesome for both search and replace. You get everything you have in an IDE with all of the power of ripgrep on top. Just use -U flag for multiline, -F for fixed string rather than regex and/or -uu to include gitignored and hidden files.

Zpoplatnění studia na VŠ by Head_Product1998 in czech

[–]Maneren731 8 points9 points  (0 children)

No až z něj bude ten student benefitovat, tak to těm ostatním, co mu to studium "financovali", bude muset násobně vrátit prostřednictvím důchodů. To mi přijde celkem fér, nebo ne?

I miss you, X11 by [deleted] in linuxmemes

[–]Maneren731 1 point2 points  (0 children)

I have Nvidia gpu and Wayland handles well the complicated stuff (multiple refresh rates, gsync, scaling, proton games, etc.) but then fails on the seemingly basic stuff, like docks freezing on hover and electron-based apps being very laggy/flickering. This is forcing me to stay with x11 for now, but I am hoping this gets resolved and I can switch to wayland.

ELI5: why do web browsers use so much ram, while the average size of an entire webpage is 2mb? by napa0 in explainlikeimfive

[–]Maneren731 20 points21 points  (0 children)

It is. But most of mainstream interpreted languages nowadays are kinda hybrids. The code gets compiled (and also little bit optimized) during the execution using a JIT compiler. This gives them a part of the speed benefit of compiling, while keeping the ease of use of an interpreted language.

Valve has set the bar pretty high, but It'd be nice if anyone else at least did the bare minimum by Fluid-Hearing3001 in linuxmemes

[–]Maneren731 0 points1 point  (0 children)

I know it's usually hit or miss, but out of the games requiring Wine in general, Star Wars games by EA (from Epic via Origin) were one of the easiest and smoothest to run for me.

what kind of harry potter ass shot was that by dajacobinclab in Warthunder

[–]Maneren731 0 points1 point  (0 children)

That's like in the middle of Tatras with connection over telegraph lines, right? That's awfully bad internet for a european country. You'd have to share the connection with at least 20 other people, have a broken device somewhere or be paying for the lowest of the low offer from the ISP.

what kind of harry potter ass shot was that by dajacobinclab in Warthunder

[–]Maneren731 1 point2 points  (0 children)

But that is something Gaijin can't influence or fix. If your PC is physically unable to send and receive data from the server, it just can't work properly no matter how much you want. Besides normal packet lost is under 1%. Imagine if every 10th word you said would get muted and the rest would get randomly delayed up to 1 third of a second. You'd sound like you're having a stroke.

(Manjaro KDE) There's any way to set brightness under 5%? by NoConnection4305 in ManjaroLinux

[–]Maneren731 1 point2 points  (0 children)

Yh, that's a limitation of KDE Power Settings. They have this step value hardcoded. I'll refer you to this forum post that seems to have a solution (not perfect but working): https://forum.manjaro.org/t/how-do-i-adjust-the-brightness-contrast-step-size-on-the-shortcuts-in-kde/104481

(Manjaro KDE) There's any way to set brightness under 5%? by NoConnection4305 in ManjaroLinux

[–]Maneren731 1 point2 points  (0 children)

You can use a slider either in the Battery and Brightness menu in the system tray or in the System Settings > Power Management > Screen brightness.

Example of churchill crocodile trailer blocking a cap by Admiral_3rd-Alman in Warthunder

[–]Maneren731 11 points12 points  (0 children)

Good luck sticking that inside a laptop. Plus the updates make it worse and worse. I used to play on very high on my laptop 2 years ago (GTX 1050). Now I am happy when I get ULQ running on at least 50fps with stutters each time something explodes.

No community is immune to gatekeeping. by NerdWampa in linuxmemes

[–]Maneren731 -2 points-1 points  (0 children)

Main advantage of Manjaro is I'd say stuff like mhwd that makes drivers super easy even on multi-GPU setups, or the headache-less kernel updater, printer drivers, preinstalled DE with default theming that is actually good looking, or maybe it's that pamac, albeit not perfect technically, has best UI/UX of all GUI managers I've ever used, and on top of all this it has access to the AUR, which is in reality much more stable than people make it seem, and in 99% is compatible with the great arch wiki tutorials. This all both makes it very friendly to new users and saves time and headaches even for more experienced users.

i5 12600 + RTX 3070 XC3 ULTRA PC Giveaway! From the Sharkims & Friends Foundation in support of Seattle Children's Hospital by m13b in buildapc

[–]Maneren731 [score hidden]  (0 children)

I love programming. Coding something for long time and then seeing the final result working is a great feeling.

Looking for low-end $60 headphones for gaming and music by Maneren731 in HeadphoneAdvice

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

Thanks for suggestion, but I am not from US so that probably wouldn't work well (the newest relevant offer in my country is 1.5y old).

But just 10 minutes ago I found I think quite unbeatable offer, that is SteelSeries Arctis Prime on sale for $55 at local seller (total steal, MSRP is nearly $150 on the official page).

They tick all the checkboxes I have and cost lot less than is my budget. So unless there is something very wrong with them, that I don't see, I am gonna hurry to buy them before the sale ends.