Live data from Hacker News

Redox – A Unix-Like Operating System Written in Rust

redox-os.org

111–120 of 215 posts

Re: Redox – A Unix-Like Operating System Written in Rust

#111
post #15

Great news! Now it's worth to learn Rust just to keep up with this project. Does Redox run in qemu only or also in VirtualBox? I tried it with all devices (USB, Network, etc.) disabled. Installation from ISO to /dev/sda worked fine but after reboot I got a hangup: "IDE Primary Master: Unknown Filesystem". Do I have to format the hardisk image with ZFS before installation?

Thanks for the recommendations!

First I have to install the current Rust version. Are there any MD5/SHA256/GPG to verify the integrity? Rust's download page doesn't provide anything like that.

https://www.rust-lang.org/downloads.html

Re: Redox – A Unix-Like Operating System Written in Rust

#112
post #91
post #9

I'm pretty impressed that 37 people are capable of writing an entire OS with a gui in under a year. Looks really cool.

Its actually much easier then it sounds, we had an undergrad write an entire windowing system on-top of implementing the rest of the OS for undergraduate operating systems at UW in a single quarter (2.5 months~).

Also relating to the whole thread, I think these kinds of statements are dangerous. What is a "windowing system" here? There is a huge spectrum. If a windowing system were so easy, why has Wayland taken such a long time? It's best to give a link to the project so people can see what problems were actually solved and how useful it is in practice.

I have been thinking hard about a simple plain text file format and associated tools for the last couple months. Sounds nowhere near as impressive. Yet I hope the end result could eventually make a practical difference.

Re: Redox – A Unix-Like Operating System Written in Rust

#113
post #38

Earlier quoted context omitted.

You are right. Barebone stuff is usually unsafe. The point I'm trying to make is that open hardware could also be programmed in Rust, reducing the number of "unsafe" blocks in user applications. Software for proprietary hardware is usually written in unsafe C/C++.

I think what you're trying to say is that architecture-specific code will be isolated in unsafe blocks. That's not necessarily true, as a lot of safe code can definitely benefit from knowledge of the underlying metal. I'm thinking of scheduling in particular.

Ok, seems I have yet a misconception about Rust's "unsafe".

Re: Redox – A Unix-Like Operating System Written in Rust

#114

Oh man if we could get hard realtime scheduling in early, large, critical embedded systems like medical would benefit greatly!!!$$$

While I'm not sure this fits with Rust's existing concepts of safety and correctness, it would be interesting (and not just for RT purposes) to have a language in which one could mark functions as <= some complexity (given the usual simplifying assumptions) or provably terminating, and have the compiler throw an error if it can't prove that those constraints are met. Does something like this exist?

The closest thing that comes to mind is total functional languages- the compiler doesn't deal with complexity classes, but it does prove termination. It's mostly used in dependently-typed languages and theorem provers so they can prove the type checker will terminate.

Re: Redox – A Unix-Like Operating System Written in Rust

#115
post #15

Great news! Now it's worth to learn Rust just to keep up with this project. Does Redox run in qemu only or also in VirtualBox? I tried it with all devices (USB, Network, etc.) disabled. Installation from ISO to /dev/sda worked fine but after reboot I got a hangup: "IDE Primary Master: Unknown Filesystem". Do I have to format the hardisk image with ZFS before installation?

Thanks for the recommendations! First I have to install the current Rust version. Are there any MD5/SHA256/GPG to verify the integrity? Rust's download page doesn't provide anything like that. https://www.rust-lang.org/downloads.html

http://static.rust-lang.org/dist/ has them. If you use multirust to install, and you have GPG installed, it will use them to check upon installation.

Re: Redox – A Unix-Like Operating System Written in Rust

#116

Earlier quoted context omitted.

Thanks for the recommendations! First I have to install the current Rust version. Are there any MD5/SHA256/GPG to verify the integrity? Rust's download page doesn't provide anything like that. https://www.rust-lang.org/downloads.html

http://static.rust-lang.org/dist/ has them. If you use multirust to install, and you have GPG installed, it will use them to check upon installation.

Ah, very good -- thanks!

Re: Redox – A Unix-Like Operating System Written in Rust

#117
post #18

Earlier quoted context omitted.

Warning: I have no idea about systems programming. I understand that the amount of lines of driver code comes from the variety of devices. But still, it looks completely unbalanced, when compared to the kernel code itself. So I have some questions here: 1) Shouldn't there be common interfaces / abstractions for most of the devices? 2) If they exist, could they be improved somehow? 3) A bit unrelated, but how fun / in…

1. There are, but they only exist in software. You have to write a different glue layer for virtually every device. And sometimes the device's model doesn't really fit your driver's. 2. Not... really. Standards are supposed to do that. Many hardware manufacturers don't really implement them in a proper manner, and "whoever designed this flash controller should die a slow, painful death" is not something users care ab…

Even then, most standards have parts that are obtuse to say the least, others that aren't really needed for a given application and others that are just open to some interpretation or otherwise not clearly defined...

In the end, people tend to do the best they are able to in a given situation. Often that means ignoring some parts, and making assumptions for others so that your product can ship instead of waiting over a year for a standards body that might clarify something.

Re: Redox – A Unix-Like Operating System Written in Rust

#118
post #9

I'm pretty impressed that 37 people are capable of writing an entire OS with a gui in under a year. Looks really cool.

Wirth and a few others went to Xerox to see their personal computer with GUI that Steve Jobs also envied. They were told they couldn't buy it. "So, I built one..." (Wirth)

http://www.cfbsoftware.com/modula2/Lilith.pdf

Lilith was a custom computer with all kinds of hardware. The mouse eventually inspired Logitech. The software included a safe language (Modula-2), its compiler, an OS (Medos-2), a relational DB, and some other stuff. The trick was safe language, modularity, and simplicity in implementation details. Two or 3 people over a few years.

Later, that turned into the Oberon series of languages, compilers, and OS's. The extensions or ports usually took 1 or 2 students months to a year or two to pull off. Last one they released IIRC was A2 Bluebottle OS. Primitive, but usable. I keep telling people to rewrite it in other safe, C alternatives to save them work. Students got it done fast so I'm sure hobbyists could too.

https://github.com/Ignat99/a2

Re: Redox – A Unix-Like Operating System Written in Rust

#119
post #84

Very nice. It was time to do this. There are three near-term products to develop on this: - A small router (home/small office, not data center) - A DNS server - A BGP server Those are standalone boxes which do specific jobs, they're security-critical, and the existing implementations have all had security problems. We need tougher systems in those areas.

This may be helpful for the DNS server https://github.com/gtadam/rust-dns

Re: Redox – A Unix-Like Operating System Written in Rust

#120
post #97
post #33

Earlier quoted context omitted.

I would guess, that most of the size comes from history. Like, once it seemed a good idea to have it like that and later people found out there are a bunch of things missing. Now many of them have to be implemented on the driver side over and over again.

Have you read the USB specs recently? They're publicly available here: http://www.usb.org/developers/docs/ Just making a standards compliant implementation takes a huge quantity of code. And with a standard this complex people inevitably get it wrong, so you'll need workarounds for all the broken devices too.

Not just with hardware interfaces, but even in pure software... I wrote an LMS that the core of which was used by a fortune 100 company, and a few airlines for nearly a decade... I literally left out about 1/3 of the SCORM spec, and implemented one piece badly... it wasn't until about 8 years in that the missing piece was even an issue, and the part I got wrong never became an issue.

In the end, you understand as much as you can, implement what you have to, and do your best to get through it... and even then, someone will mess things up on some end or another... to this day, I'm surprised that SCORM was synchronous... hell, it feels like they're half the reason XHR has a sync option.

I feel the same way when looking at terminal emulators... sigh, so many things to implement to get something useful, even if you're only looking to get a small subset working.

Post reply on HN