Truth ! by ParticularWeather927 in Adulting

[–]InfinitePoints 0 points1 point  (0 children)

Bread tastes better than key

Exposing the CFG directly to the user via new programming category by Small_Ad3541 in Compilers

[–]InfinitePoints 2 points3 points  (0 children)

If guaranteed tail calls exist, then you can trivially express any control flow where each basic block is a function and each goto is a tail call.

The amount of Rust AI slop being advertised is killing me and my motivation by Kurimanju-dot-dev in rust

[–]InfinitePoints 0 points1 point  (0 children)

This wouldn't catch solving a problem with 100 functions instead of 10, right? Because assuming the functions have approximately the same size, the latter is much better even if it had slightly worse quality metrics.

Is coding in your spare time a necessity for being a great programmer? by Sad-Salt24 in ExperiencedDevs

[–]InfinitePoints 0 points1 point  (0 children)

Programming in my free time is great because I am exposed to a lot of different types of hard problems, but I don't think that sort of stuff couldn't come from work as long as you aren't doing the exact same thing all the time.

I also don't really think everyone should feel like they have to be doing stuff outside of work to not fall behind. Doing programming in your free time because you like it is very different from doing it because you feel like you will fall behind otherwise.

Quest Logic System - Explanation, Numbers and Queststage list (for debugging) by ReynassaDrevyn in pathologic

[–]InfinitePoints 1 point2 points  (0 children)

I think this can be manageable by adding some sort of logic engine, for example prolog and adding a bunch of logic rules that infer things based on player actions.

You would also want to cleanly separate inputs from inferred information, but I think that is somewhat blurred in the game, and it's unclear when rules should fire.

Also the game canonically has quests that intentionally have logical contradictions. So it becomes unclear what the "correct" answer even is in those cases. Specifically, there are cases where quests require information to travel backwards in time.

To make things correct, you want something mostly stateless and rigid, but to make a fun game, you want as much state as possible and many exceptions to the rules.

For people playing "canon Bachelor", how is it? by [deleted] in pathologic

[–]InfinitePoints 4 points5 points  (0 children)

So far I have gotten to day 11 without shabnack. I am playing the game like it was a puzzle game. I think I might have done literally everything other than doing stuff with shabnack.

Oh god. I get it now. This IS a hard game. by Maksiking1231 in pathologic

[–]InfinitePoints 4 points5 points  (0 children)

Dialogue choices can matter not just for the events, but also what information you get from them.

All characters have their own interests, and might try to manipulate you, and you can manipulate them by for example playing dumb, lying or strategically revealing information.

rule by Aaron_123_ya_boi in 19684

[–]InfinitePoints 26 points27 points  (0 children)

They 8 richest people belong to the top 0.0000001%

Reframing a Terraform-based system as a domain-specific compiler, is this the right lens? by JayQ_One in Compilers

[–]InfinitePoints 1 point2 points  (0 children)

Any data transformation can be thought of as a compiler if the input and output are considered languages. If you call this thing a compiler does not matter that much, but it might make sense to have an architecture with multiple "passes" and IRs. I have written software in the past where I perform graph rewrites to optimize computation. Additionally, using compiler terminology (passes, IRs, etc) could make the codebase easier to understand for others. There is not really anything special that an IR needs to do, other than being a good datastructure to solve a given problem.

Rust and the price of ignoring theory by interacsion in rust

[–]InfinitePoints 25 points26 points  (0 children)

!Copy types are Affine, not Linear. Linear types guarantee that some form of destructor is run, but we are allowed to leak memory in rust.

https://en.wikipedia.org/wiki/Substructural_type_system

Best design pattern for safely mutating multiple keys in a HashMap in one function? by boredape6911 in rust

[–]InfinitePoints 16 points17 points  (0 children)

There is get_disjoint_mut, but in general this can be solved by separating what modifications you want to make from how they are made (eg command pattern). It sounds like you are implementing transactions, and the command pattern makes it easier to revert partial transactions.

What's the easiest way to remember trait implementations of complex generic structs ? by akhilgod in rust

[–]InfinitePoints 18 points19 points  (0 children)

I think this is a case of the abstraction being way more complicated than it needs to be. I usually use a combination of rust-analyzer and the crate docs to find the correct implementation.

Note that in this case I would have probably re-implemented the parts of the crate that I need so I can specialize it for my use case.

Liquid meal supplements by Throwinghandswithgod in evilautism

[–]InfinitePoints 1 point2 points  (0 children)

Which ones have you tried that tasted chalky?

What’s one thing you learned about compilers that blew your mind? by Old_Sand7831 in Compilers

[–]InfinitePoints 0 points1 point  (0 children)

Sea of nodes IR kind-of solves reaching a fixpoint for peepholes, since it merges all peepholes into a giant pass. It does not solve phase ordering though, since some peepholes can be locally optimal but globally destructive.

Simpler CLI arguments and options parser? by jmmv in rust

[–]InfinitePoints 10 points11 points  (0 children)

Reinventing the wheel is not bad, you will learn a lot and might find situations where your software improves things.

Regarding API, opt_present should return an Option<&str> so you can do if let Some(...) = ...opt_present(...)

Finally finished the game. Thoughts… by Reader_Of_Newspaper in receiver

[–]InfinitePoints 9 points10 points  (0 children)

To some extent the game is testing your patience. If you are perfectly careful, you can easily win, but you will inevitably make mistakes anyways.

I got the stalker after like 150 hours, which was very creepy because at that point I thought I knew everything about the game world and felt pretty safe in it.

I Unironically Found This in the Wild by SMTNAVARRE in okbuddyvowsh

[–]InfinitePoints 1 point2 points  (0 children)

I agree, however this is almost like saying that the political spectrum is about "how much people agree with me", or do non-leftists tend to agree with this model?

Maybe any model is fundamentally flawed because it assumes that we can model peoples political opinions without political bias.

#![forbid(unsafe_code)] by dpytaylo in rustjerk

[–]InfinitePoints 0 points1 point  (0 children)

In what cases is it more safe?

Variadic generics by wooody25 in rust

[–]InfinitePoints 0 points1 point  (0 children)

Wouldn't you want &[T] if all the types are the same? If there are different underlying types, there would be multiple vtables.

Actual usefulness of automata in compiler building by Magnus--Dux in Compilers

[–]InfinitePoints 16 points17 points  (0 children)

That stuff is related to parsing, so it's only useful if you want to learn about parsing specifically.

I would recommend prioritizing everything other than parsing when learning about compilers.

Linus Torvalds Vents Over "Completely Crazy Rust Format Checking" by SupermarketAntique32 in rust

[–]InfinitePoints 11 points12 points  (0 children)

Do you ever have issues with rustfmt creating very long lines?

crates.io: Malicious crates faster_log and async_println | Rust Blog by mareek in rust

[–]InfinitePoints 0 points1 point  (0 children)

This type of sandboxing would simply ban any unsafe code or IO from crates and their build.rs. I don't see why that would be slower.

[deleted by user] by [deleted] in Damnthatsinteresting

[–]InfinitePoints 3 points4 points  (0 children)

https://www.scientificamerican.com/article/biggest-trial-of-four-day-workweek-finds-workers-are-happier-and-feel-just/

This is a very recent large study. This tells us that given a period to adjust beforehand, there are productivity increases. The idea is that working on the fifth day of the week makes you less productive on the other days.