I would just pick the value from the root of each underlaying balanced binary tree, easy.
- 0 Posts
- 17 Comments
Just buy a new SSD to install Linux on. If you decide to switch back just plug the old one in.
I quite enjoy Nix flakes for this. Only certain languages have good support though (C, Rust, Haskell, OCaml, …).
It’s easier to write that much if you are just making stuff up…
I don’t have 2 mil, how do I get out of this? File for bankruptcy?
Stand a little out of my sun.
Linux is already better than Windows, the latest versions are a mess, and is likely going to get worse.
A package is reproducible if you use the same inputs, run the build, and get the same outputs.
The issue is that the build can produce different outputs given the same inputs. So you need to modify the build or patch the outputs. This is something that is being worked on by most distributions: https://reproducible-builds.org/who/projects/
NixOS is not special in that regard nor are all NixOS packages reproducible.
Nope, nix doesn’t ensure or require that the builds are deterministic. It’s not any better in that regard than other package managers.
It’s not really fully reproducible either.
oessessnex@programming.devto Programming@programming.dev•Opinions on how to deal with duplicate code.61·2 years agoThe implementations mostly don’t matter. The only thing that you need to get right are the interfaces.
oessessnex@programming.devto Linux@programming.dev•Vim Wayland users: how do you bind CAPSLOCK to Escape?21·2 years agoXKB config files work under sway without XWayland.
oessessnex@programming.devto Linux@lemmy.ml•Fuck it, give me your most OVERRATED Distros4·2 years agoWell, most people installing Arch for the first time have no idea what a typical Linux install does under the hood. That makes it a worthwhile learning experience. The same commands you use during the setup you can later use to fix or change things. It basically forces you to become a somewhat proficient Linux user.
Nope. Monads enable you to redefine how statements work.
Let’s say you have a program and use an Error[T] data type which can either be Ok {Value: T} or Error:
var a = new Ok {Value = 1}; var b = foo(); return new Ok {Value = (a + b)};
Each statement has the following form:
var a = expr; rest
You first evaluate the “expr” part and bind/store the result in variable a, and evaluate the “rest” of the program.
You could represent the same thing using an anonymous function you evaluate right away:
(a => rest)(expr);
In a normal statement you just pass the result of “expr” to the function directly. The monad allows you to redefine that part.
You instead write:
bind((a => rest), expr);
Here “bind” redefines how the result of expr is passed to the anonymous function.
If you implement bind as:
B bind(Func[A, B] f, A result_expr) { return f(result_expr); }
Then you get normal statements.
If you implement bind as:
Error[B] bind(Func[A, Error[B]] f, Error[A] result_expr) { switch (result_expr) { case Ok { Value: var a}: return f(a); case Error: return Error; } }
You get statements with error handling.
So in an above example if the result of foo() is Error, the result of the statement is Error and the rest of the program is not evaluated. Otherwise, if the result of foo() is Ok {Value = 3}, you pass 3 to the rest of the program and you get a final result Ok {Value = 4}.
So the whole idea is that you hide the if Error part by redefining how the statements are interpreted.
oessessnex@programming.devto Programming@programming.dev•Why do they keep making new languages261·2 years agoSome people consider working on programming languages fun, so they create new ones.
oessessnex@programming.devto Learn Programming@programming.dev•*Permanently Deleted*English1·2 years agoIf you want to make games, start with a text based adventure game, something like Zork. Learn as you go, you will need console IO and data structures to represent game state, puzzles, levels. Then make a 2D game. After that you will probably be proficient enough to make anything you want.
oessessnex@programming.devto Linux@programming.dev•After 30 Years, Linux Finally Hits 3% Market Share1·2 years agodeleted by creator
The most important thing is that the codebase can grow without too much refactoring. Then you know you got the overarching design right. The rest then doesn’t really matter that much. You can always rewrite certain parts when/if needed.
A good way to do this is by making the core really solid, this is called bottom up programming: https://paulgraham.com/progbot.html