4 ms·
I think it's a lot less terrifying than writing Ruby extensions in C (which has been the main alternative up to now), because Rust is memory-safe. There's a lot
by pcwalton 14y ago
I think it's a lot less terrifying than writing Ruby extensions in C (which has been the main alternative up to now), because Rust is memory-safe. There's a lot less that can go wrong when you can't scribble on freed memory or jump to undefined addresses outside of designated "unsafe { ... }" blocks. Note that the Gaussian blur function is all safe code—the only unsafe code here is the code to marshal the data structures to and from Ruby.
- voidlogic 14y ago"less terrifying than writing Ruby extensions in C" Very true, still terrifying though. I wonder if the reputation of C might not cause a selection bias towards the type of developer that can hack it though. Anyway, this is definitely a solid move.
- jerf 14y agoWhat, specifically, is horrifying, though? It's not C. It's not C++. It's not ASM. You're not going to accidentally implement a buffer overflow, you're not even going to accidentally stomp on Ruby stuff. You might find the Rust language itself intimidating but I'm not seeing what's scary about the integration itself.