The owners can just divide the income among enough agents that they fall into the lowest tax bracket. The real solution is to properly tax excessive profits and unrealized gains.
- 0 Posts
- 23 Comments
I don’t know about well documented, but if you use a standardized argument parser, you can even generate a gui from that.
anton@lemmy.blahaj.zoneto
Rust@programming.dev•What additional concepts should I learn before starting to learn rust?
1·2 months agoI thought that goes without saying.
anton@lemmy.blahaj.zoneto
Rust@programming.dev•What additional concepts should I learn before starting to learn rust?
14·2 months agoIgnore the reasonable comments that say you are more than ready.
The next step is obviously learning Haskell, specifically sum types (like rusts enums), lists (lazy, like rusts iterators) and classes (like rusts traits).
Then you will think, “if only there was a language that was a mix of C and Haskell” and that’s rust.
You can design a language where you don’t need to generate code to accomplish this.
Other people have python scripts generate C, so having on in the same codebase and language is certainly an improvement.
My question isn’t why this is necessary in Rust. My question is why Rust was designed such that this was necessary.
Because otherwise the compiler team either also needs to maintain a huge amount libraries or cut corners and move things to runtime that really should happen at compile time.
Someone mentioned elsewhere that this allows for compile-time type safety. I’m still trying to wrap my head around how that works.
printf is a great example. According to the C type system, it takes a string and a variable amount of untyped arguments dependent on the content of the string, but that doesn’t actually describe the allowed arguments.
Misusing printf like thisprintf("%s", 42);will get you a warning, but only because there is a special case for printf in the compiler. If you have your own function that does the same as printf, and you misuse the same way, you will find out by dissecting the core dump.In rust the format string gets parsed at compile time by a macro, which decides the type of each arguments that can than be checked by the compiler. Imagine printf(“%s %d”,…) created a function with the signature
specialized_printf(char* agr0, int arg1), it would be impossible to pass the wrong types of arguments.Now that these tools exist people have gone further and made a library that checks SQL queries against the shema of a running database and causes a compile error if it doesn’t fit.
anton@lemmy.blahaj.zoneto
Linux@programming.dev•Linux traffic has grown 22.4% in PH this year
17·4 months agoSerenityOS is “a love letter to '90s user interfaces with a custom Unix-like core”.
It’s good enough to be proud of, while alienating normal people, not incidentally, like linux used to, but on purpose, like this sentence does, making it a great for elitists.
anton@lemmy.blahaj.zoneto
Technology@beehaw.org•South Korea police say 120,000 home cameras hacked for 'sexploitation' footage
201·4 months agoThey may not have noticed the cameras or not have a choice to go elsewhere in a reasonable time.
Nowadays he probably just arranges electrons.
Remember to put
#!/bin/rmat the top of every file, to teach people not to execute files they shouldn’t.
Leap seconds are already a problem for minutes and hours, which is probably why they weren’t added until now.
But you’re also missing one use of the impl keyword: fn func() -> impl Trait.
[…] So dropping the
implin [return position] might not be completely impossible like the other uses ofimpl.But the impl markes that it is a trait to the programmers.
Take the following functions:func1()->A{...} func2()->A{...}Does the following snippet compile?
let mut thing = func1(); thing = func2();Under the current rules we know it will. But if A could be a trait, the functions could return different types. We currently mark that with the
impl.
Why? What value does -> () provide? Why not elide that?
What value is provided by keeping it?
What value does cluttering up your code with
-> ()provide?Why a syntactic special-case for exactly that type and not any other random type?
Because the unit type is special, just like the never
!type.()also has the special importance of being the return value of an empty statement and some other stuff.
languages w/o [semicolons] feel awkward since you’re generally limited to one statement per line
Then fixing that might make sense. :-)
It’s fixed with semicolons ;-)
If the spec contains default values why not make a constructor with all the missing fields or implement
Defaultwhen all fields are covered?Also lol:
#[test] fn test_config_load() { todo!(); }
You can already :
res_res??;I think it’s more for cases where you don’t want to return, like
let new_res = old_res.map(func).flatten();
anton@lemmy.blahaj.zoneto
linuxmemes@lemmy.world•I never had problems with permission again after I know the real power of sudo
5·11 months agoYou are supposed to run
sudoedit.
This command creates a temporary copy, opens it in you editor of choice and overwrites the protected file when the temp file changes.
That way the editor doesn’t run as root.
You can see the difference if you run shell command, likewhoami, in vim.
anton@lemmy.blahaj.zoneto
Rust@programming.dev•Introducing RPGCPF - A Toolkit for GCPF Compression
2·1 year agoThe format seems to be some glue to chose between different compression algorithms for the same file format and compress in chunks to be able to decompress only the parts you need.
anton@lemmy.blahaj.zoneto
Linux@lemmy.ml•Is there a way to connect multiple desktops and treat them as one system?
5·1 year agoI’m wondering if there’s a way [to] combine their computational power.
Only if your problem can be be split up reasonably, otherwise you will spend more time waiting for data to move.
Where it can work: video encoding, CI pipelines, data analysis
Where it won’t work: interactive stuff, most single file operationsI want to get into server hosting […]
Then you don’t need another reason to do it.
[If] I can connect them all to one display [or] make them all accessible in one place.
You can either get a hardware switch or chose a primary computer and connect to the others. For that you can use remote desktop software or be a try hard and use ssh.
anton@lemmy.blahaj.zoneto
Rust@programming.dev•Another Round Of Rust Compiler Improvements Merged For GCC 15.1
6·1 year agoI think both gcc and clang are roughly build around the C memory model.
If you want to interface with hardware you probably do volatile reads and writes to specific memory addresses.
You should be able to compile for most gcc supported platforms.
anton@lemmy.blahaj.zoneto
Rust@programming.dev•Introducing Limbo: A complete rewrite of SQLite in Rust
1·1 year agoImpressive, but the performance paragraph has to be a joke right?
One 500ns query is not a good benchmark.
I was a bit apprehensive because rust has like a gazillion different function types but here it seems to work like just any other language with a HM type system.
The
fn(T)->Rsyntax works for functions without associated data, it discards details of the implementation and works like function pointers in C. This allows them to be copy and 'static.The other function types can have data with them and have more type information at compile time which allows them to be inlined.
These functions each have their own unwritable type that implements the function traits (Fn(T)->R,FnMut(T)->RandFnOnce(T)->R) depending on their enclosed data.I hope I remembered everything right from this video by Jon Gjengset.
I misread the comment a bit, I thought they meant tax like a person. I wouldn’t put it past the owners to have their agents apply for small business grants or some other exemption.