Live data from Hacker News

Rust and Nix = easier Unix systems programming

kamalmarhubi.com

81–85 of 85 posts

Re: Rust and Nix = easier Unix systems programming

#81

Earlier quoted context omitted.

> What if the Rust developer uses fork().unwrap_or(default_value) in a hurry The point here is that the language's tools and APIs can significantly better drive the developer towards the safe/right solution, that's a large point of type theory and static type systems after all. In this case rust's type system is used to split out the various "result cases" and notify the developer upfront of the various cases to hand…

This has been proven to be wrong over and over again with the many variations of languages that came after C. Newer "safer" languages don't improve bugs

That is blatantly false. Type-safety can prove (as in a mathematical proof) that whole classes of bugs are impossible.

Re: Rust and Nix = easier Unix systems programming

#83

I maintain LuaJIT syscall bindings https://github.com/justincormack/ljsyscall - they cover quite a lot, namespaces, netlink and so on. I spent quite a bit of time making them more intuitive than the raw bindings, with consistent error handling, also namespacing constants and so on. It is definitely useful to have these types of interfaces not in C.

This project looks really cool! I'm very curious to find out more about how you make sure constants are correct across platforms and architectures. I will be poking around!

Re: Rust and Nix = easier Unix systems programming

#84

This gets me thinking how awesome it would be to have functional programming on *nix systems, like Haskell (specifically). At least then it might be forcibly designed to be made more useful and ultimately get more people on board. One can dream.

Kinda like turtle! https://hackage.haskell.org/package/turtle Oh by the way, I accidentally hit downvote on your post and HN doesn't let me undo that action... I was just trying to hide it! Sorry!

Hey, thanks! Hadn't heard of turtle before, I don't believe. Time to install it on my crouton chroot and see what it can do. :)

Re: Rust and Nix = easier Unix systems programming

#85
post #83

I maintain LuaJIT syscall bindings https://github.com/justincormack/ljsyscall - they cover quite a lot, namespaces, netlink and so on. I spent quite a bit of time making them more intuitive than the raw bindings, with consistent error handling, also namespacing constants and so on. It is definitely useful to have these types of interfaces not in C.

This project looks really cool! I'm very curious to find out more about how you make sure constants are correct across platforms and architectures. I will be poking around!

There are a bunch of tests but the whole Linux ABI spec is a mess.
Post reply on HN