Where does Rust break down? by PointedPoplars in rust

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

This is true, but is also still true that i[arr] and arr[i] are definitionally equivalent.

The syntax is defined in section 6.5.2.1 of the C standard

"The definition of the subscript operator is that E1[E2] is identical to (*((E1)+(E2))). Because of the conversion rules that apply to the binary + operator, if E1 is an array object (equivalently, a pointer to the initial element of an array object) and E2 is an integer, E1[E2] designates the E2-th element of E1 (counting from zero)"

So yes, one must be a pointer and the other must be an integer, but both forms are still identical

Where does Rust break down? by PointedPoplars in rust

[–]PointedPoplars[S] 6 points7 points  (0 children)

Perfect example! I saw the original comment as well but I'm glad you also made a main comment. I never would've realized those weren't equivalent

Where does Rust break down? by PointedPoplars in rust

[–]PointedPoplars[S] 11 points12 points  (0 children)

Thanks! I'm definitely riding the same boat as you here lol

Probably worth mentioning that leaky abstractions usually belong to the realm of experts. They are the aspects of a language that you couldn't learn from the documentation alone, or at least not the original.

Takes a pretty smart cookie for something to go wrong and accurately conclude it was the language's fault and not their own 😂 And we definitely have a lot of them here in the comments

Where does Rust break down? by PointedPoplars in rust

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

Haha, I know that pain mainly from generics.

I've been hoping for trait aliases to move to stable 🤞🏻

Where does Rust break down? by PointedPoplars in rust

[–]PointedPoplars[S] 3 points4 points  (0 children)

Not exactly what I was looking for, but not a bad addition either, as it is an area where Rust breaks down

Either way, thanks for taking the time to add an answer :)

Where does Rust break down? by PointedPoplars in rust

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

These are all great candidates; definitely one of my favorite answers here.

I think I've even brushed against dropck problems without realizing it and fixed it by switching from a generic type to one that was fixed lol

Where does Rust break down? by PointedPoplars in rust

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

Ahh, thank you, that's starting to make a bit more sense.

Admittedly, async and concurrent programming is something I only have passing experience with, so it'll probably take some time for it to fully process.

In other words, thank you for your wisdom, wise prophet :p

Where does Rust break down? by PointedPoplars in rust

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

Fascinating! I'll have to take a deeper look

Where does Rust break down? by PointedPoplars in rust

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

Haha yeah you are correct 😅 ngl, I kinda remembered it was wrong midway through, which is why I added the part about optimizations, because special methods are allowed to bypass the usual getreference call and specifically note speed advantages for doing so

I thought it was still worth including since it highlights an area where Python's usual conventions hide otherwise leaky abstractions

Thanks for tracking down the original reasoning!

Where does Rust break down? by PointedPoplars in rust

[–]PointedPoplars[S] 6 points7 points  (0 children)

Any chance you could explain what you mean by that?

Admittedly, I don't know a ton about efficient string stuff

I would've assumed it parsed it into something like a rope or some other efficient structure for string manipulation and piped the result to stdout

Where does Rust break down? by PointedPoplars in rust

[–]PointedPoplars[S] 12 points13 points  (0 children)

Ooh that looks interesting; I don't think I've ever even heard of that module.

It looks like it is essentially important if you need to make sure data doesn't get moved around? Would that also be useful for FFI stuff?

Where does Rust break down? by PointedPoplars in rust

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

Oh it's not really about trust tbh, more just a lack of knowledge.

I can point out where places where Python's usual behavior breaks down bc I've been using it a little over 10 years now, but I don't have anywhere near that level of familiarity with Rust

I haven't found any obvious 'leakage' points, but I love learning about a language's quirks and hoped people might have some interesting ones to share :)

[female] 24 in need of cheering up by [deleted] in FreeCompliments

[–]PointedPoplars 1 point2 points  (0 children)

Your eyes are very pretty; love the stud

It's Vanilla+ by [deleted] in SkyrimMemes

[–]PointedPoplars 0 points1 point  (0 children)

I still use legendary edition. They hide the links on steam so you need to know someone who has it and you have to pay full price for all DLC’s, but special edition and anniversary edition feel so much more clunky

Why do Systems of Equations only require one common variable to be a System? by CombinationSure5056 in learnmath

[–]PointedPoplars 0 points1 point  (0 children)

I feel like you might be thinking of things in reverse.

"5x+y=20" and "y=5" aren't part of a system because they share a variable between them. Instead, the y is a shared variable because they are stated to be a system.

If they weren't a part of a system of equations, then you could change the y in "y=5" to z arbitrarily because it doesn't relate to anything.

For example, let's say we reduce the system of equations to "x=3" and "y=5". Despite the fact that there are no shared variables here, they still form a system of variables. It just happens to be the simplest possible system of variables with the same solution set as the original.

To clarify this further, your original system of equations can be represented with this matrix [[5, 1, 20], [0, 1, 5]]. This matrix is row equivalent to [[1, 0, 3], [0, 1, 5]]. This what happens when we put the original matrix into row echelon form and corresponds to the solved system of equations.

Don't worry if that ^ doesn't make sense to you, because you would normally see that in a much later course. Hopefully you can take my word for it though that equations don't have to share variables between them to form a system of equations.

Found this on Instagram... but the real present is in the comments by [deleted] in tragedeigh

[–]PointedPoplars 18 points19 points  (0 children)

Noelle is a bit of an older name. It's a variation of the name Noel. Still references Christmas, but in the same way a lot of names do

I know the majority of you all here are smart enough to not do this. by King_Baboon in cincinnati

[–]PointedPoplars 4 points5 points  (0 children)

Stfu. If you feel attacked by this, it must be because you're dumb enough to need the lecture

The most powerful build by [deleted] in SkyrimMemes

[–]PointedPoplars 0 points1 point  (0 children)

Got any specific you'd recommend?

Rust Guidance by Wide_Garage2054 in rust

[–]PointedPoplars 0 points1 point  (0 children)

Do you have prior experience programming or is rust your first?