Details
-
AboutAAAAAAAAAAAAAAAAAAA
-
SkillsRust and other things
-
Locationhere
-
Website
Joined devRant on 12/8/2018
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API

From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
-
Man that gives me nostalgia
Why can't modern websites be this cool anymore -
@jestdotty You maybe already know but serde allows you to declare foreign implementations for types
So if you have RefCell<T> you can write your own serialize logic (which locks the refcell and then calls the default serialize method on the inner type) and attach it via #[serde(serialize_with = "path")] -
@jestdotty For very simple things yes, but even with AI any more complex thing is just a disaster ;-;
-
@BordedDev Haven't tried yet but my idea was to have two working buffers per thread and then submit a read for the next file while processing the current one
Not sure if you did something similar -
@BordedDev Shucks!
I was planning on adding some io_uring too. I think just the file reading (and waiting...) is like half the runtime :P -
@BordedDev Don't know, Rust doesn't have -Ofast :P
-
@BordedDev Oh yeah you're right. Though I wonder what the difference between std::async and std::coroutine is
I think only the latter is "true" stack-machine based async comparable to Rust -
@antigermanist Just tell her to calm down and be less emotional. I'm sure that'll work :P
-
@BordedDev Swift is pretty cross platform nowadays
-
@Lensflare To be fair, even if she *did* need actual generators, there are good solutions in Rust
-
@BordedDev Not sure what you're referring to. coroutines were only added in C++20
-
@BordedDev -O3 is always bigger. LLVM just can't stop itself auto-vectorizing a loop over 4 elements with 16 unique unrolled SIMD variants for every possible combination of array length lol
-
@BordedDev C++ got async and generators *after* Rust
...well maybe not generators :P -
@jestdotty You do you :P
As far as I can tell it's a pretty small dependency. Sometimes I really think you are allergic to abstractions that make your live easier -
@jestdotty There are crates which give you generators on stable (by using async under the hood), just search coroutine on crates.io
`genawaiter` for example -
@antigermanist I think that's just called being a woman
-
@kobenz Oh right it literally says that :P
Surprises me though, since it's literally the same* compiler logic as for async -
Generators should be pretty stable since I believe they share a lot of code with async in the compiler
-
Maybe Hitler or Diddy is available too
-
You're a JS girl. You don't know the horrors of manual memory management and UB due to memory unsafety :P
-
Introverts rise up!
-
I know right!
It's a constant battle to steer it into the right direction without it going off and doing weird shit
I can see why people like it, but oh buddy is it not for me -
The only waffles worth loving are the ones with butter milk
-
@jestdotty One of the things I like about JS. You can always make it work
-
@BordedDev Now thats the spirit!
-
@jonathands Mac mini pro M4 with 64 GB is $2500, RTX 5090 is ~$2200
I'd personally keep your current pc and upgrade just the GPU
Then you have better support too! Most serious stuff is in CUDA only (e.g. if you want to train some weird model or whatever) -
Hell yeah!
When it still works... :P -
@BordedDev @retoor
-
Seems unfortunately that some of your code gets optimized away, so not the fairest comparison :P
time ./isspam books/*.txt
C:
```
Total Words: 0
Total Capitalized words: 0
Total Sentences: 9191539
Total Numbers: 0
Total Forbidden words: 0
Capitalized percentage: 0.000000%
Forbidden percentage: 0.000000%
Word count per sentence: 0.000000
Total files read: 904
./isspam books/*.txt 0.25s user 0.08s system 844% cpu 0.039 total
```
Rust:
```
time ./risspam books/*.txt
Total Words: 81079224
Total Capitalized words: 1538100
Total Sentences: 9193023
Total Numbers: 14973275
Total Forbidden words: 113955
Capitalized percentage: 1.897033
Forbidden percentage: 0.140548
Word count per sentence: 8.819648
Total files read: 904
./risspam books/*.txt 1.76s user 0.17s system 1999% cpu 0.097 total
``` -
@antigermanist But normal people aren't invested like with their subprime loans in 2008, so it's not gonna be that bad. Wall street guys can lose money, they're gonna be fine either way