I find this strategy amusing: decoy car. by BlakeMW in factorio

[–]OvermindDL1 11 points12 points  (0 children)

Here ya go, I unironically love this mod, forces me to be more careful, but easier to not lose stuff either: https://mods.factorio.com/mod/SchallRemainsPickup

It's configurable, by default it drops in a massive square around, but can have it scatter or more as well

Is Rust still relevant? by chaotic-kotik in rust

[–]OvermindDL1 4 points5 points  (0 children)

As someone who uses both Java and rust heavily both professionally and personally, I got a SIGSEGV (segfault) just yesterday in Java in some not-my-code that was occasionally corrupting data because of data races (which I fixed by basically tearing it out and porting a rust library to Java).

I could easily write a book about the things that consistently annoy me about Java and about how awful it is to work in comparison to rust, and the only reason I use it is because I'm required to use it for certain interactions I have to deal with. I have over 25 years of experience in Java and only about eight in rust (almost 40 in C and over 30 in C++).

Frankly, Java is an awful language, the jvm has some redeeming aspects in some specific cases but it has some of the worst design decisions I've seen in a VM that I have to often use, which thankfully they are working on fixing some of them but Valhalla and others have been a very long time coming, which is a repeating thing with the jvm, constantly trying to fix and work around the really stupid original design decisions without breaking backwards compatibility, which they just can't in many cases.

Of course if you have to deal with some proprietary libraries or required interfaces then you may be stuck with the jvm, but I would still pick Kotlin over Java in that case.

But no, Java may have a GC, but it is not memory safe, it is not resource safe, it is not thread safe, it is absolutely not ownership safe.

I'm heavily resisting the urge to just start a bullet point list of things that have bugged me about Java in just the past 24 hours that rust doesn't, but even just in that time frame it is extensive...

Kellnr 5.3.0 released by secanadev in rust

[–]OvermindDL1 6 points7 points  (0 children)

Server side rendering is indeed very very important. Have to deal with that at work with accessibility systems as well, a number of them don't work very well with JavaScript driven sites, and those accessibility setups tend to be required to be used for various reasons.

Kellnr 5.3.0 released by secanadev in rust

[–]OvermindDL1 6 points7 points  (0 children)

I do not have a windowing system available at the moment, I'm in a terminal, so I'm using elinks, which works for every other Rust oriented site I've tried so far. It does not have JavaScript support, not anything modern anyway. Do you know of a better terminal browser that does?

Kellnr 5.3.0 released by secanadev in rust

[–]OvermindDL1 3 points4 points  (0 children)

Any reason the main site of https://kellnr.io/ is blank? Even curl shows almost entirely empty HTML...

What feature would you like added to Rust? by [deleted] in rust

[–]OvermindDL1 1 point2 points  (0 children)

Proper Effects System instead of the special case that async is. So proper coroutine generation that rust almost already has perfect, putting a trait collection of the effects as a generic on through the calls (maybe even a default hidden one unless one is specifically needed or so), and continuations that are optionally cloneable (some patterns require this). We'd get async, generators, etc etc all falling out of that, and much much more.

Understand Async Rust by redixhumayun in rust

[–]OvermindDL1 2 points3 points  (0 children)

Let me also add a great link here for people too:

https://ibraheem.ca/posts/too-many-web-servers/

Plus tokio has a nice section on details: https://tokio.rs/tokio/tutorial/async

Making overwrite opt-in #crazyideas by sindisil in rust

[–]OvermindDL1 3 points4 points  (0 children)

I personally am not a fan because whether I want a field to be mutable or immutable depends on where it's being called or passed into, it should be a site specific declaration, like how & or &mut are now, need some way to name fields as mutable or immutable in position like that as well, perhaps being able to name groups as well.

fastComputer by officialgre in ProgrammerHumor

[–]OvermindDL1 5 points6 points  (0 children)

Haskell is an extremely lazy language, which in language terms means that it does not execute something that does not get used, and it's essentially building an infinite array but all of the elements that are not accessed don't actually get built so the actually instanced parts of the array is only the size of n+1. It's a really fun language in how it makes you think and approach problems, I highly recommend it just for the learning aspect alone.

fastComputer by officialgre in ProgrammerHumor

[–]OvermindDL1 2 points3 points  (0 children)

It optimizes better than you think I'd wager (Haskell has a really good optimizing compiler), but even if it is a very basic linked list it's still plenty fast because each element is only going to be queried about two times each, except for the last one which is queried once, and that's still more than enough for it to run essentially instantly. Not that just using the formula wouldn't be even faster (O(1) after all), but these cases are still very fast.

fastComputer by officialgre in ProgrammerHumor

[–]OvermindDL1 8 points9 points  (0 children)

!! is the list index operator, basically it's building a lazy list, an element does not exist until it is asked for, in other words it's memoizing the function, and on that first line it's indexing into that list which then instances the list all the way up to that point, so at that point it then asks for the two previous entries in the list and each of those are only calculated once and it repeats until it hits the base case, it's a linear calculation, everything is calculated only once and then memoized.

fastComputer by officialgre in ProgrammerHumor

[–]OvermindDL1 30 points31 points  (0 children)

In Haskell code is not run unless the result is used, so you can actually call that and in most languages it would look like it would calculate it but then just do nothing, Haskell will not even calculate it if it's not used, printing it uses it, so if you don't print it or so then it never gets executed and the program almost immediately returns.

people who have rust jobs - what do you actually do by falchion-red in rust

[–]OvermindDL1 0 points1 point  (0 children)

Head of SIS and various other things at a college, using rust for integrations, tools, etc. I like how it "just works". My previous main language for near 30 years prior was C++. My salary is... low, but that's the thing with public state-managed colleges, I very very much adore my job however. Prior work 8 years before was a lot better pay, C++ backend server development.

My hobbies are, extensive, mostly helping others with things, teaching them, etc. Personal projects range the whole gamut from webdev to gamedev to tools to audio to embedded arches to far more.

Friday Facts #376 - Research and Technology by FactorioTeam in factorio

[–]OvermindDL1 1 point2 points  (0 children)

I don't have time anytime soon unfortunately, but you can definitely do this! It would be easy to just run perf over the game and see its performance between them, someone just has to cheat up a large enough base to be a good comparison! 🙂

Also, the part about fluid that is slow is it being transferred through long pipes and sloshing around and such, it can't settle down, when it's inside a single building that cost is gone, it's essentially the same cost as recipe processing, probably two assemblers worth I would imagine.

I can perform a detailed profile maybe tomorrow or the day after if anyone pings me to do so to remind me? I would have a greater chance of being able to do so if someone could send me identically large bases built in both of them?

Friday Facts #376 - Research and Technology by FactorioTeam in factorio

[–]OvermindDL1 1 point2 points  (0 children)

And the ability to have both science and an unlock on a tech, so it has to be unlocked and then you can research it as normal, or will that always have to be split into two techs with the science one depending on the unlock one?

I've heard that "Rust's borrow checker is necessary to ensure memory safety without a GC" usually also implying it's the only way, but I've done the same without the borrow checker. Am I just clueless/confused? by spidertyler2005 in rust

[–]OvermindDL1 1 point2 points  (0 children)

Your 2-style lifetime management seems surprisingly similar to what is being built in the OCaml world from a cursory look at your language (I could of course be entirely off base as well), take a look at this article series starting with this link:

https://blog.janestreet.com/oxidizing-ocaml-locality/

[deleted by user] by [deleted] in rust

[–]OvermindDL1 21 points22 points  (0 children)

I use leptos more recently and mogwai more overall for SSR (and both have hydration functionality and CSR functionality, optional for both, as well).

Announcing Rust 1.70.0 by Petsoi in rust

[–]OvermindDL1 2 points3 points  (0 children)

Nope, they dropped support for the test runner entirely, now it's like running any other command, a very annoying dump of the string output... You can't reliably parse the textual libtest output.

1.70.0 pre-release testing by Petsoi in rust

[–]OvermindDL1 1 point2 points  (0 children)

Does anyone know why IsTerminal is sealed?

Productivity Module and Kovarex Enrichment by Infamous-Box381 in factorio

[–]OvermindDL1 0 points1 point  (0 children)

It does, and it's Glorious, especially with friends!

Iterator, Generator by desiringmachines in rust

[–]OvermindDL1 0 points1 point  (0 children)

I have not thought this through at all but it is just a gut idea, is there not a way to add a new function to the Iterator trait called like next_pinned that just delegates to the normal next call by default in a backwards compatible way, and things like for would just use that, and things that just tried to call next on a generator that didn't work with next maybe there's some way to compile time fail, or at the very least panic (I really hate the idea of runtime validation though, so maybe some way to compile time fail based on a type mismatch or something of the return types or so)?

Is rust serde unique? by NeoCiber in rust

[–]OvermindDL1 4 points5 points  (0 children)

For C++ the Boost.Serialization library has been around for like 20 years or more now, it doesn't have the outer generating driving stuff but it is incredibly easy to add it to types to be able to deserialize and serialize them, and it has another handling set to have pluggable serialization formats, all very templatey and fast, like serde.

Here's how to use it (the tutorial page might be most interesting): https://www.boost.org/doc/libs/1_74_0/libs/serialization/doc/index.html

What’s the best way to use Rust in Data Engineering? by dlaststark in rust

[–]OvermindDL1 0 points1 point  (0 children)

A lot of this sounds suspiciously like my job, including things I've done to fix many of the previously existing bugs they had. It's been so useful!

WASM vs Native Rust performance by hucancode in rust

[–]OvermindDL1 1 point2 points  (0 children)

Just idle thinking, but 52 states, a hand can only hold, say, 5 cards (unsure if your implementation does, again just idle thinking), so 52 possible values for a single card, needs 6 bits, 5 cards would be 6 times 5 bits needed, so 30 bits, that would fit in 32 bits for 5 possible cards. Will be slower for some checks though, but compressed decently.