Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
cwzwarich
on Oct 25, 2015
|
parent
|
context
|
favorite
| on:
Writing an OS in Rust
But has anyone actually done that? Can you even express those as safe interfaces in Rust?
chadaustin
on Oct 26, 2015
|
next
[–]
It's the same thing with Haskell, or any other "real" system that, at some level, has to interface with low-level primitives. The platform gives you a pile of unsafe, low-level primitives (
https://hackage.haskell.org/package/ghc-prim-0.4.0.0/docs/GH...
) on top of which you (or a library writer) can provide safe interfaces, e.g.
https://hackage.haskell.org/package/buffer-builder
MaxGabriel
on Oct 26, 2015
|
parent
|
next
[–]
The unsafe low-level stuff gives rise to some great function names like `reallyUnsafePtrEquality` and `accursedUnutterablePerformIO`
https://github.com/haskell/bytestring/blob/dd3c07d115840d134...
Jweb_Guru
on Oct 25, 2015
|
prev
[–]
IMO, the answers to those questions are "no" and "yes" respectively. Redox in particular seems like it has way more unsafe code than it actually has to (though it seems to have gotten a bit better very recently).
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: