5 ms·
Rust came just in time. A low-level language like those of old, but without the undefined behaviour and terrible tooling.
by ashleyn 8y ago
Rust came just in time. A low-level language like those of old, but without the undefined behaviour and terrible tooling.
- tomrod 8y agoData scientist and lover of Python & Julia here. I'm looking forward to learning Rust.
- dnautics 8y agoHaving come from Julia - I rather like elixir. Rust seems like it's great if you need control over everthing at a low level (great for browsers, operating systems). If you want a high level, but still very performant[0], FP language with very nice guardrails... I wrote a complete scheduler for data science tasks, from nothing, in 3 months. [0] a lot of people seem to think that performance is everything but actually uptime and reliability are often more important.
- shele 8y agoI came the other way around and tried some Erlang before settling on Julia, but if I your focus is on scheduling of data science tasks I know why you used elixir.
- cercatrova 8y agoWith Elixir, can I set up a queue of separate programs written in other languages (Python/TensorFlow) such that when one task is finished, another can be started right away, or have a programmatic schedule? Essentially, can Elixir act as the scheduler for various tasks, or even spin up AWS instances through its scheduling?
- shele 8y agoYou should ask the poster above me.
- cercatrova 8y agoIndeed I shall
- dnautics 8y agoyou definitely don't want to be using a BEAM language for numeric computation. On the other hand, if you try to write a web application in Julia, you have no uptime guarantees. I think that Elixir/Julia would make a really sweet combination for certain things, if Julia could easily talk to BEAM instances by presenting itself as BEAM node (to do RPCs from Elixir to Julia).
- shele 8y agoYeah, I can imagine. That would maybe also not be too difficult as Julia apparently could ccall the erl_interface c-library http://erlang.org/doc/apps/erl_interface/ei_users_guide.html http://erlang.org/doc/apps/erl_interface/ei_users_guide.html
- deleted 8y ago[deleted]
- microcolonel 8y agoElixir's straight-line performance is horrible though, and the available profiling tools are not adequate to solve performance issues in anything that runs more than a few hundred milliseconds. Last year I had to buy a workstation with 64GiB of RAM because my team didn't have time to write a new profiler (or somehow fix the existing one), and all the current ones filled RAM almost as fast as memcpy, and one hit/request was taking ~400ms (without profiling overhead).
- cercatrova 8y agoWith Elixir, can I set up a queue of separate programs written in other languages (Python/TensorFlow) such that when one task is finished, another can be started right away, or have a programmatic schedule? Essentially, can Elixir act as the scheduler for various tasks, or even spin up AWS instances through its scheduling?
- dnautics 8y agonot out of the box, but that's basically what I wrote.
- cercatrova 8y agoHow does one connect Elixir to the various other programs? I'm not too familiar with it, just curious.
- dnautics 8y agoI use singularity containers! So that lets me define and use a "unified shell out" protocol. It's pretty sweet. If you have any questions drop a line.
- loeg 8y agoSay what you will about the undefined behavior, but C has great tooling :-).
- fooker 8y agoWithout undefined behavior, the compiler had to be really conservative and for some platform it is going to be really slow. For example, if you force C to have defined overflow semantics, the code you'll get for a CPU which does not behave in the same way will use an order of magnitude more instructions for that purpose.
- kurthr 8y agoI am no expert on Rust, but I think targeted optimized algorithms are what the unsafe trait is for. That way you can profile and choose when programming and debugging.
- jake_the_third 8y agoI'd take predictable slow software on some platforms over unpredictable fast software any day.
- lachlan-sneff 8y agoIn rust, integer overflows are defined to be wrapping, which is how it works automatically on essentially every architecture Rust supports.
- adrianN 8y agoRust actually gives you access to all overflow behaviors that you could want. So if you know that your target CPU has saturating overflow you use https://doc.rust-lang.org/std/primitive.i32.html#method.saturating_add https://doc.rust-lang.org/std/primitive.i32.html#method.satu... or wrapping_add, or overflowing_add, or checked_add. The syntax isn't as nice as for normal + though.
- fooker 8y agoIs there a way to specify that I don't care? That's exactly what C undefined behavior is for.
- geezerjay 8y ago> but without the undefined behaviour This line of comments is rather silly, as it tries to compare implementations with a language specification described through international standards. Apples and oranges. Mozilla's rust implementation has no undefined behavior because it isn't even defined in any standard document nor are there many competing commercial teams developing rust implementations independently of each other. Complaining that C has undefined behavior but rust hasn't makes as much sense as complaining that C has undefined behavior but MS Visual C 2015 doesn't.
- steveklabnik 8y ago> Mozilla's rust implementation has no undefined behavior because it isn't even defined in any standard document nor are there many competing commercial teams developing rust implementations independently of each other. This is not true. “No UB in safe Rust” is a guiding principle of the language design. (And there is a second implementation of everything but the borrow checker.) MS Visual C absolutely has UB.