Readit News logoReadit News
konstantinua00 commented on Resizable structs in Zig   tristanpemble.com/resizab... · Posted by u/rvrb
Out_of_Characte · a month ago
Because arrays simply do not deal with fragmentation. Yes, you could probaly get decent performance on a modern system that has memory overcommit strategy where you could allocate sparse adress ranges where you would probaly never run out of pointers unless you actually write to your variable array.

But its just kind of mediocre and you're better off actually dealing with the stack if you can actually deal with certain fixed sizes.

konstantinua00 · a month ago
...what are you talking about?

array-like storage with dynamic size has existed since forever - it's vector. over or undercommitting is a solved problem

VLA is the way to bring that into type system, so that it can be it's own variable or struct member, with compiler auto-magic-ing size reading to access members after it

konstantinua00 commented on Graphene OS: a security-enhanced Android build   lwn.net/SubscriberLink/10... · Posted by u/madars
homarp · a month ago
car analogy: I want my gazoline car to have hybrid engine. For free.

vendor: not possible

you: unfulfilled demand

me: the way I see it, you get a product for free if you fulfill certain conditions. If not, you buy these conditions.

konstantinua00 · a month ago
no, correct analogy would be

vendor: "we present 100% electric car"

we: "that's cool, I always wanted to decrease petrol use. But... can you provide an option for some petrol use? It's called hybrid, iirc?"

vendor: "no, our requirements only support 100% electric car. Hybrid cars use petrol and we can't allow that"

we: "suuure, I get that. But the price of electricity here still hasn't come down, everyone already has personal petrol reserves, and your cars are only provided with batteries from congonese child labor mines. Can we pleeease have the half-way option so that I can use less petrol for e.g. small distance travel, but still using petrol for country-sized movement?"

vendor: "no, we only support 100% electric car. Everything smaller is outside our requirements"

Real economics would've provided competition to fullfill demand - but currently Graphene is the only well-known vendor, so complaints will keep coming

konstantinua00 commented on Graphene OS: a security-enhanced Android build   lwn.net/SubscriberLink/10... · Posted by u/madars
palata · a month ago
There are hardware requirements.
konstantinua00 · a month ago
there are smaller security options
konstantinua00 commented on Resizable structs in Zig   tristanpemble.com/resizab... · Posted by u/rvrb
konstantinua00 · a month ago
one thing I never understood about VLAs - discussion about them always hits a "can't put it on stack safely" and gets halted, forever

why not to make it heap-only type? it seems such a useful addition to type system, why ignore it due to one usecase?

konstantinua00 commented on Graphene OS: a security-enhanced Android build   lwn.net/SubscriberLink/10... · Posted by u/madars
bubblethink · a month ago
The other devices don't meet the criteria. Be happy that Pixels are supported, for Google seems to closing down Pixel OS too, making this whole effort rather difficult.
konstantinua00 · a month ago
> The other devices don't meet the criteria

you got it wrong way around

the CONSUMER criteria is "we want better independent security ON DEVICES WE ALREADY OWN"

complaints like in this thread are symptoms of unfullfilled demand - and they can't be solved by saying "oh gosh, what a stupid demand that doesn't agree with our supply"

konstantinua00 commented on Graphene OS: a security-enhanced Android build   lwn.net/SubscriberLink/10... · Posted by u/madars
bubblethink · a month ago
What's ridiculous about it ? There are now 4-5 gens of Pixels with their major/minor bumps too (A series, pro, etc.). There's enough variety at different price points for everyone there.
konstantinua00 · a month ago
4-5 versions of the same phone in the gigantic sea of possible devices
konstantinua00 commented on In the long run, GPL code becomes irrelevant (2015)   josephg.com/blog/in-the-l... · Posted by u/Expurple
elsjaako · a month ago
Can you clarify what happened last autumn? I'm not sure I recall.
konstantinua00 · a month ago
iirc, some kubernetes library under BSD

microsoft spent a lot of time asking questions to the author - and then rolled out Azure copy of the lib

author went public "how dare they use me like that" - but he did make it BSD himself, it's his problem

konstantinua00 commented on “Bypassing” specialization in Rust   oakchris1955.eu/posts/byp... · Posted by u/todsacerdoti
SkiFire13 · a month ago
Note that negative traits are not for "this trait is not implemented" (i.e. a missing `impl Trait for Type`) but instead for "this trait is guaranteed to not be implemented" (i.e. `impl !Trait for Type`)
konstantinua00 · a month ago
aka that's what read-only is for write?
konstantinua00 commented on C++ Trailing Return Types (2022)   danielsieger.com/blog/202... · Posted by u/susam
konstantinua00 · a month ago
I prefer to never use it

C and C++ are about types before names - and modifying that is simply a change for the sake of a change, needless and useless. There's a lot of education enertia behind it - and effort should be spent on fighting what matters (like smart pointers), not hip/non-hip declaration style

decltype(a*b) is the only good "escape hatch"-type excuse for it, but idk why everyone make such a big deal out of it - when was the last time return type was both unpredictable AND needed to be specified? by that point you're already too deep

konstantinua00 commented on “Bypassing” specialization in Rust   oakchris1955.eu/posts/byp... · Posted by u/todsacerdoti
konstantinua00 · a month ago
can't it be solved by negative traits?

isn't the problem that rw is still r, so passes checks for both?

can't you make one rw and the other r(-w)?

u/konstantinua00

KarmaCake day143October 5, 2023View Original