« first day (2329 days earlier)      last day (1150 days later) » 

10:53 AM
@E_net4wantsmoreflags github.com/ben0x539/totally-safe-transmute/blob/master/src/… see that not that hard
 
11:12 AM
@Stargateur Seems totally safe...
 
@DenysSéguret I don't see what could go wrong #![forbid(unsafe_code)]
 
I don't see what could go wrong but my knowledge in memory management are lacking
TBH "unsafe" code is usually safe, and easier to check
 
if I understand correctly, the code put inside an enum the object, hard write the discriminant of the enum by doing f.write(&[1]) directly on the process memory, then just match the variant and return it.
I think there is nothing less unsafe than this
hahahhahahaa
 
12:10 PM
I agree with him. When you look at code, the problems are rarely inside the unsafe blocks. There's no reason to focus on this.
 
I agree about that too but say it's aggressive xd
 
 
6 hours later…
6:24 PM
that why we can't have nice thing github.com/RustAudio/rodio/issues/171
 
 
2 hours later…
8:50 PM
@Stargateur which part of that annoys you most?
 
@E_net4wantsmoreflags the part where someone think that having a stop function that prevent to continue to use the thing was a good idea leading to have this doc in rodio
> Stops the sink by emptying the queue. docs.rs/rodio/0.13.0/rodio/struct.Sink.html#method.stop
unclear
that transform to this in amethyst:
> Empties the sink's queue of all music.
And I can't link the amethyst doc cause everything is broken in their doc right now
 
I'm closing as duplicate on GH too...
> This request was made before, but was ignored
 
9:35 PM
@DenysSéguret but he is a genius....
why do he say the request was ignored ?
just because you didn't answer the original ? xd
 
@Stargateur & @DenysSéguret I believe whoever wrote that piece of code comes from C. If a union would have members which are trivially represented by a single memory block (e.g. primitives), this kind of casting would be safe, in fact it is used widely. However, with composite types, such as Vec and String this is not guaranteed, nor it should be. I'm not exactly sure what the author tried to achieve there TBF..
 
well, the author want a safe transmute I guess :p
it's a very difficult subject in Rust, and a lot of people are getting frustrating more and more about it so I guess the author YOLO with this crate
 
That's the double edge sword of "empowering everyone to build reliable and efficient software" -- everyone means everyone, even people who have no idea of how lower levels work and what implications of their choices might have.
Whether this should be a goal of a language is a different subject. Personally I don't think so. Rust is a system programming language, with an insanely high-level feel, and in the right hands it is as safe as a system programming language can be, which is thousands times more than what we had in any language in this category before.
But that does not mean, one should neglect the lower level aspects IMO.
 

« first day (2329 days earlier)      last day (1150 days later) »