News for hackers. Stuff that matters.
Re:The State of Rust on Haiku by dnautics on Friday July 06, 2018 @04:11PM (#17474734)
Having programmed in the BeOS API long ago, and now a BEAM language developer, I noticed that basically they were implementing a crude and unsafe actor model. There must be modern libraries that provide that at a lower level than say the erlang VM, but with better safety guarantees than C++.
Re:The State of Rust on Haiku by tormeh on Friday July 06, 2018 @05:44PM (#17475376)
Actix[0] is probably what you're looking for. I don't think the actors in Actix are network transparent, though, which is a bummer for distributed applications, but wouldn't matter for an OS.

0: https://actix.rs/

Re:The State of Rust on Haiku by losvedir on Friday July 06, 2018 @06:25PM (#17475587)
I think a lower level, type safe, actor based framework is the idea behind the Pony language, which I've been meaning to check out.
Re:The State of Rust on Haiku by dnautics on Saturday July 07, 2018 @12:05PM (#17479095)
Obsessive type safety in my opinion is a bit silly, it stems from this thought that you can squeeze out every possible runtime error by defensively coding. The truth is, you can't; there are going to be language errors, os errors, driver errors, and errant cosmic rays. Designing for resilience is not solved by typing, and an obsessive typing pattern can create a false sense of security.
Re:The State of Rust on Haiku by OtterCoder on Sunday July 08, 2018 @04:02PM (#17485878)
Bah, I've seen runtime errors with dynamic and strict typing, and I'll take type safety any day. Besides, good type systems like Rust's force you to think about all sorts of errors at all points of the program. It's harder to write, but it's harder to break, and much, much easier to fix.
Re:The State of Rust on Haiku by dnautics on Sunday July 08, 2018 @04:59PM (#17486164)
have you ever programmed in a BEAM language like erlang or elixir? It's easy to write, when there are errors, most of the time it's "no big deal". If something that is outside of your control (someone else's code, or hardware, or a driver, etc) then it's often not a fatal problem. Pushing errors to the edge is great, but "forcing you to think about all sorts of errors", I think is an antipattern. You should code the happy path, anticipate the 80% errors, patch the next 19% error, and ignore the last tiny sliver of errors, and generally be able to refactor easily.

Of course your environment should be able to survive and persist 99.99999% of errors, that's critical... there should be no throw()s or panic()s.

Re:The State of Rust on Haiku by OtterCoder on Monday July 09, 2018 @01:05AM (#17488086)
No, and I really should give those a try. That said, when I just want happy-path, idc, just reload on errors, kind of code, it's a sore temptation to just reach for JS.
Re:The State of Rust on Haiku by krylon on Saturday July 07, 2018 @09:53AM (#17478496)
I played around with Pony a little, and I found the library situation unsatisfactory.

But the type system is gorgeous. And the community is awesome.