« first day (1843 days earlier)      last day (1866 days later) » 

"Less dogma"
why "Less RFCs" ??
 
2 hours later…
10:33
@FrenchBoiethios By our very own @LukasKalbertodt!
@FrenchBoiethios And hopefully also an IntoIterator impl for arrays.
 
2 hours later…
13:00
@LukasKalbertodt I hope so...
When will we be able to get rid of that 32 element restriction?
Waiting on a few const generics RFCs. I don't have much of an idea about their progress
@PeterHall As soon as const generics are stabilized.
 
3 hours later…
16:10
WTF, I was writing a full answer, and this guy deletes the question...
I spent a min or two on a comment to explain why Vec + Box aren't enough if you want parent pointers in a tree
hopefully he realized the root node parent was the least of his worries
@FrenchBoiethios It was definitely a dupe anyway
@PeterHall :(
@turbulencetoo Yep, I'm afraid that this design won't make it.
2
Q: What is the paradigmatic way to create a Rust tree with a parent pointer?

user1413793I need to define a binary search tree where each node has access to the parent: enum Tree<'a> { Leaf, Node { left: Box<Tree<'a>>, right: Box<Tree<'a>>, parent: &'a Tree<'a>, data: u64, } } impl <'a> Tree<'a> { pub fn new(data: u64, parent: &'a Tre...

I would create an arena with an index = a node
Or even references, that could do it
Yep, the Shepmaster's answer is the way to go IMHO stackoverflow.com/a/45109686/4498831
 
2 hours later…
18:08
an arena is definitely the way forward, and also more performant as long as you size it properly
18:37
That's how I handle my graphs in rust (for example in broot): with arenas. Of course it's a little cheating in that you're responsible of the consistency of your ids so it's kind of a hidden unsafe
 
5 hours later…
23:21
-1
Q: How do I get a minimal Rust + WebGL "Hello World" demo running in a Browser?

marknadalCould somebody show me a step-by-step guide on how to get "Hello World" text printed on screen in a browser with WebGL and Rust? Thanks. I know a lot of talented coders playing with Rust, but none of them seem to be able to get something basic compiled.

is this real ?
and wtf happen to close reason xd

« first day (1843 days earlier)      last day (1866 days later) »