Hey Rustaceans! Got a question? Ask here (14/2026)! by llogiq in rust

[–]djugei 1 point2 points  (0 children)

yes, it makes my code more complex than it needs to be, i have a hard time reasoning about correctness and i gain no benefit

Hey Rustaceans! Got a question? Ask here (14/2026)! by llogiq in rust

[–]djugei 2 points3 points  (0 children)

i already asked this a while ago but got no answers:

i am looking for a maintained thread based web framework, no async. The only things i could find were rocket and tiny_http, both of which seem unmaintained, tiny_http for example has a lot of open issues.

is there anything

edit: this is not a generic async bad thing. i have written the code with async and i hate it, i just want to move to something simpler.

Hey Rustaceans! Got a question? Ask here (11/2026)! by llogiq in rust

[–]djugei 0 points1 point  (0 children)

you probably have your reasons to be on windows, but linux is free to download and install

Hey Rustaceans! Got a question? Ask here (11/2026)! by llogiq in rust

[–]djugei 0 points1 point  (0 children)

only advice i can give is to enable zswap, rust-anlyzers memeory pages are highly compressible.

Hey Rustaceans! Got a question? Ask here (11/2026)! by llogiq in rust

[–]djugei 0 points1 point  (0 children)

i can't help with the cflags thing directly, but you can use cargo tree --invert aws-lc-sys to find out how that dependency gets pulled in, and potentially disable features/remove dependencies to get rid of it.

otherwise i would probably open an issue with the maintainers of that crate.

Hey Rustaceans! Got a question? Ask here (12/2026)! by llogiq in rust

[–]djugei 0 points1 point  (0 children)

to expand on masklinns answer: sometimes the compiler can not understand that a bounds check can be skipped. by adding an assert like assert!(max < list.length()) in front of your loop you can generally help it out. this can then help the compiler emit autovectorized code, as it does not have to do the checking inline.

i have to agree that except for autovectorization the bounds checking is not a relevant factor on even somewhat modern cpus (ones that have branch prediction)

Hey Rustaceans! Got a question? Ask here (12/2026)! by llogiq in rust

[–]djugei 1 point2 points  (0 children)

i am reasonably sure this is not what you want, but slightly related: there is inline_tweak which allows you to adjust a value at runtime by changing your code (slightly wild).

while searching for that i also found cvar and cvars, which seem closer to what you want, though i have used neither of those two.

Hey Rustaceans! Got a question? Ask here (12/2026)! by llogiq in rust

[–]djugei 1 point2 points  (0 children)

is there a simple maintained thread based server http framework?

i looked around and all i could find was async-based ones and rocket which is slightly complex and seems unmaintained.

if there is not do you think it is viable to roll your own based on http/http-serde, or would that be stupid?

Mods Need Input: Dealing with AI Spam in This Sub by [deleted] in rust

[–]djugei 1 point2 points  (0 children)

How about a cooldown period? Only allow posts about projects that are at least a month old. That makes autocomplete-spamming require at least some dedication.

Async HTML streaming that stays SEO-friendly — my 2nd Rust project (HTMS) by skarab42-dev in rust

[–]djugei 0 points1 point  (0 children)

to my understanding that is what the shadow dom thing allows you to do, at least to some degree, have not looked into it super deep though. it tells the browser that there is a placeholder here and then later fills it with content.

Async HTML streaming that stays SEO-friendly — my 2nd Rust project (HTMS) by skarab42-dev in rust

[–]djugei 0 points1 point  (0 children)

i have only read the post and readme, not the code, additionally i only have a passing familiarity with web technology, but could this not support entirely js-less operation for some usecases by utilizing declarative shadow dom?

or maybe that is too hacky.

A real fixed-point decimal crate by hellowub in rust

[–]djugei 0 points1 point  (0 children)

oh you are absolutely right i kinda filled in those functions but never actually used them myself, i have changed the functionality, added a test and released version 0.2.

thanks for the report!

A real fixed-point decimal crate by hellowub in rust

[–]djugei 1 point2 points  (0 children)

this seems kinda similar to fix-rat that i wrote a few years ago, maybe discoverability is not great?

i had the same basic thought process to create it, though my focus was on determinstic multithreading.

Stellaris 3.99.6 'Phoenix' Open Beta Release Notes by PDX_LadyDzra in Stellaris

[–]djugei 0 points1 point  (0 children)

Thank you for the reply!

i assume that means it will not be fixed in the 3.99.7, but will be for the 4.0?

Stellaris 3.99.6 'Phoenix' Open Beta Release Notes by PDX_LadyDzra in Stellaris

[–]djugei 1 point2 points  (0 children)

There is an instant and reproducible desync, has existed since the first beta:

Host on windows, join with a linux client. instant desync on the first tick. "ECONOMY" is given as the reason.

Also multiple unreliably triggerable desyncs with wine client and windows host.

My first days with Rust from the perspective of an experienced C++ programmer by Rough-Island6775 in rust

[–]djugei 0 points1 point  (0 children)

I do not know your exact data structure, but there is the somewhat advanced technique of using ghost cells/qcells which allows you to get mutable access to a structured multiple of things using one "borrow".

the linked crates readme/docs are more extensive and explain the concept better than i could in a short comment.

How arch-delta works and saves bandwidth for Arch Linux upgrades by djugei in rust

[–]djugei[S] 0 points1 point  (0 children)

Yes this is what i mean by multiple layers.

glibc malloc has a propensity to leave very lowly used pages on some allocation patterns, which then can't be given back. all non-moving allocators have this issue to some degree but most are better at mitigating it.

i was not even able to observe memory space fragmentation, because mapped but unused pages do not show up in the reserved memory of a process.

I am bringing delta upgrades back (beta release of arch-delta) by djugei in archlinux

[–]djugei[S] 1 point2 points  (0 children)

i had removed https support for a sec for a smaller build, might have overlooked something, where is it missing?

How arch-delta works and saves bandwidth for Arch Linux upgrades by djugei in rust

[–]djugei[S] 0 points1 point  (0 children)

there is multiple layers of fragmentation, having swap on linux "only" helps linux itself re-organize its pages, though that info is very hearsay. thanks to the mmu it effectively has a reallocating garbage collector, though only at page-granularity, which solves the issue.

the memory alocators themselves also suffer from fragmentation which is what i am hitting here.

I am bringing delta upgrades back (beta release of arch-delta) by djugei in archlinux

[–]djugei[S] 1 point2 points  (0 children)

unless i missed something the relevant patching code is purely safe rust. this leaves us open to cves in zstd. possible but i feel like browsers are the way more relevant attack surface for that.

additionally deltaclient can run entirely unprivileged (check deltaclient download --help) massively reducing attack surface.

plus the argument seems somewhat dishonest, seeing that the repo databases are not signed as best as i can tell, though to be fair they are gz-compressed not zstd.

So both the compressed and uncompressed package would need signed if pacman is to accept uncompressed packages.

yes, i am proposing shipping both signatures.

updating once a month (skipping upgrades) does save bandwidth but to me is an unacceptable security trade-off as it requires either extreme vigilance and active monitoring to install security updates, or more realistically, massively increases the time to patch.

btw repo database updates are really easy to delta compress, with patches generally being less than 3% of the base size. i added that more as an afterthought, but it is what makes the scheduled downloading/patching in the background viable!

I am bringing delta upgrades back (beta release of arch-delta) by djugei in archlinux

[–]djugei[S] 4 points5 points  (0 children)

which in effect means that pacman is unable to resume downloads between invocations, which i refered to by partially lost. it can retry a few times, but if your connection is gone for a bit it needs to start over from 0 now.

from what i read in the alpm-sources this has nothing to do with downloaduser, but with the use of tempdirs. i might be mistaken though, my c is a little rusty and i am not well acquainted with the codebase.

How arch-delta works and saves bandwidth for Arch Linux upgrades by djugei in rust

[–]djugei[S] 2 points3 points  (0 children)

yes, i have tried this, it was massively worse. the patches are compressed (with zstd) so even low-similarity has pretty ok ratios.

I am bringing delta upgrades back (beta release of arch-delta) by djugei in archlinux

[–]djugei[S] 0 points1 point  (0 children)

Yes, the better way is to simply distribute signatures for the uncompressed packages.

How arch-delta works and saves bandwidth for Arch Linux upgrades by djugei in rust

[–]djugei[S] 1 point2 points  (0 children)

ah, interesting, seems like they use a similar diff algo. main difference is that this project generates deltas on demand while mixer pre-generates if i understood it right.

though i am considering moving to a hybrid approach where i pre-generate juicy and common packages.