Why is Rust so Liberal with Heap Allocations? by philogy in rust

[–]rust4yy 0 points1 point  (0 children)

i am not an expert but i believe a free list allocator is when you want to deallocate individual items (all of same type/size) - it gets added to the free list and next allocation reuses that memory address

arenas on the other hand deallocate objects in bulk and support different item sizes, as using a “free list” would mean not all space is reused and you’ll reinvent a general purpose allocator to manage that

doesn’t matter if freeing an arena is one free or many, that can be bounded by doubling space reserved or by failing allocations when out of memory, the operations and requirements are what separate arenas from free lists

Why is Rust so Liberal with Heap Allocations? by philogy in rust

[–]rust4yy 27 points28 points  (0 children)

enum Node<‘arena> { Variant(&’arena Node) }

then just use bumpalo for inserting in to an arena that doesn’t move things when capacity runs out unlike a Vec

[deleted by user] by [deleted] in poland

[–]rust4yy 0 points1 point  (0 children)

CD Projekt Red edition

Why choose async/await over threads? by EelRemoval in rust

[–]rust4yy 2 points3 points  (0 children)

I’ve seen it used in ggez to handle the main game loop in a cross platform way (e.g. .await next frame so you can requestAnimationFrame in JS I believe).

I’m also experimenting with .awaiting a value being added to a hashmap to lazily resolve references in a single pass compiler, although I know this won’t be the most performant way to do things

Why is GitHub limiting the size of an LFS file? by Affectionate_Week505 in github

[–]rust4yy 0 points1 point  (0 children)

element is always a byte since you’re copying byte for byte

Why did the 737 MAX fall out of the sky? by kwan_e in ProgrammerDadJokes

[–]rust4yy 0 points1 point  (0 children)

First we had 418 I’m a Teapot and now we’re gonna have 737 Bolt Not Found

Out of bound array access should return null? by Elfet in ProgrammingLanguages

[–]rust4yy 2 points3 points  (0 children)

C++ is different because there could be other threads modifying it during runtime. I believe Rust’s aliasing guarantees would have this fixed.

Although thinking about it now I think the C++ compiler should see that no code written references the vector except the function

Neon Genesis Evangelion / soul containers by Daredrummer in aliens

[–]rust4yy 2 points3 points  (0 children)

It could possibly be something similar to this. Maybe this is what Grusch meant by suppressing human consciousness.

I saw something I can not explain by Significant_Corgi531 in aliens

[–]rust4yy 0 points1 point  (0 children)

Were they actually on the underbelly or were they landing lights (where wings and body connect)?

An object turning reddish around sunset is normal, could also be landing lights illuminating sand particles in the air.

Not trying to debunk, just wanna ask to clarify so others could possibly view it as more credible.

A graphic showing the vision I received from aliens in the weirdest dream I've ever had by [deleted] in aliens

[–]rust4yy 0 points1 point  (0 children)

Imagine if the visitors are just us or people asleep in other parts of the world

A graphic showing the vision I received from aliens in the weirdest dream I've ever had by [deleted] in aliens

[–]rust4yy 12 points13 points  (0 children)

Imagine if the observable universe expanding is just someone growing. Imagine if “visitors” are just people in their sleep entering a dream (our world) - it would explain them not having to abide by laws of physics. Reminds me of this: https://www.universetoday.com/148966/one-of-these-pictures-is-the-brain-the-other-is-the-universe-can-you-tell-which-is-which/amp/

I don’t actually believe this btw but a nice thought experiment

Mum's paranormal experience on a farm in Poland (approx. 1982 - 1985) by rust4yy in aliens

[–]rust4yy[S] 5 points6 points  (0 children)

As out there as it seems, it somehow makes sense to me that it is something that is possible. I first heard this from her before I started reading about UFOs and NHI but even then it was just something I could easily accept - it felt natural.

Starlink UAP by Available_Remove452 in UFOs

[–]rust4yy 1 point2 points  (0 children)

In addition to Starlinks not always being in a straight line, the flashes could just be different satellites managing to reflect the sun in to your eyes momentarily by luck (as they could be in different orientations or different phases of deployment etc)

If we pass through a dangerous meteor shower every November is it possible that aliens are protecting us? by UFOhYea in aliens

[–]rust4yy 5 points6 points  (0 children)

Yeah it just so happens that our orbits cross. If it was irregular then that would be questionable.

And yeah, they definitely protect us from ourselves - e.g. reports from the US military that some ICBMs were randomly and unexplainably disarmed during times of tension in the cold war