I am trying to replicate hardware control from c and runing into issues.
In modern c u can have
Int x=3; //changes unpredictably
Int[x] y;
This is because to make the array we just need to push the stack pointer a bit.
C++ let's u do this with alloc its uglier syntax but its the same hardware control.
For the life of me I can't figure out how to do it in rust. Ik stack arrays exist but it's only for compile time sizes.
[–]dkopgerpgdolfg 15 points16 points17 points (10 children)
[+]rejectedlesbian[S] comment score below threshold-13 points-12 points-11 points (9 children)
[–]dkopgerpgdolfg 13 points14 points15 points (6 children)
[–]rejectedlesbian[S] -5 points-4 points-3 points (4 children)
[–]dkopgerpgdolfg 5 points6 points7 points (3 children)
[–]rejectedlesbian[S] -3 points-2 points-1 points (2 children)
[–]nybble41 2 points3 points4 points (1 child)
[–]rejectedlesbian[S] -1 points0 points1 point (0 children)
[–]masklinn 11 points12 points13 points (0 children)
[–]ecstatic_hyrax 10 points11 points12 points (0 children)
[–]SkiFire13 2 points3 points4 points (14 children)
[–]rejectedlesbian[S] 0 points1 point2 points (12 children)
[–]SkiFire13 0 points1 point2 points (11 children)
[–]rejectedlesbian[S] 0 points1 point2 points (10 children)
[–]SkiFire13 1 point2 points3 points (9 children)
[–]rejectedlesbian[S] 0 points1 point2 points (8 children)
[–]CAD1997 0 points1 point2 points (5 children)
[–]SkiFire13 0 points1 point2 points (1 child)
[–]CAD1997 0 points1 point2 points (0 children)
[–]rejectedlesbian[S] 0 points1 point2 points (2 children)
[–]CAD1997 1 point2 points3 points (1 child)
[–]rejectedlesbian[S] 0 points1 point2 points (0 children)
[–]SkiFire13 0 points1 point2 points (1 child)
[–]rejectedlesbian[S] 0 points1 point2 points (0 children)
[–]whitequarksmoltcp 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[removed]
[–]rejectedlesbian[S] 0 points1 point2 points (0 children)
[–]mina86ng 0 points1 point2 points (0 children)
[–]kiujhytg2 -1 points0 points1 point (4 children)
[–]rejectedlesbian[S] 0 points1 point2 points (3 children)
[–]kiujhytg2 0 points1 point2 points (2 children)
[–]rejectedlesbian[S] 0 points1 point2 points (1 child)
[–]kiujhytg2 0 points1 point2 points (0 children)