News for hackers. Stuff that matters.
Re:Show HN: Redox Rust OS – v0.3.3 release by jackpot51 on Tuesday September 19, 2017 @11:37PM (#15290616)
I am the creator of Redox OS. It is a microkernel based operating system mostly written in Rust.

Please ask any questions or make any comments you have about Redox!

EDIT: I am going to sleep soon. I will be up in 8 hours, 7 A.M. Mountain Time.

Re:Show HN: Redox Rust OS – v0.3.3 release by cyber1 on Wednesday September 20, 2017 @08:04AM (#15292749)
Your works are very amazing! I have three questions :)

1. Could you say your opinion about future of Rust. Will it become mainstream?

2. Pros/cons between Rust and C for system programming?

3. I heard many times that implementation of standart data structures like RBTree, Graphs without recursion traversal in Rust it's very difficult and painful tasks with unsafe hack code. So if i am Rust beginner i should avoid learn this language through implementations my own data structures(BST, AVL, LL, ...)?

*sorry for my English. It is not my native language.

Re:Show HN: Redox Rust OS – v0.3.3 release by pornel on Wednesday September 20, 2017 @09:42AM (#15293588)
Not OP, but maybe can help:

1. I can definitely see its future in drivers, filesystems, codecs (areas where both performance and correctness is required).

2.

+ Rust has fantastic error handling. No null pointers. Mandatory error checking, but with very light syntax.

+ Dependencies and modularization in Rust are soooo much easier than in C.

+ You never have to write `free()` again.

+ Thread-safety can be guaranteed at compile time.

- Significant learning curve. You need to "get" Rust's ownership approach before you even manage to compile a non-trivial program.

- It's still "new", so it may be hard to convince people to use it. C is 45 years old, so it seems like a safe bet (it has flaws, but the flaws are well-known).

3. What Rust calls "unsafe" is what all of C is, so it's never worse than C. The idea is that you carefully implement these structures using raw ("unsafe") pointers, and wrap them in a safe Rust API. This way you need get it right once, and rest of the code doesn't have to worry about breaking things.

Re:Show HN: Redox Rust OS – v0.3.3 release by empath75 on Wednesday September 20, 2017 @09:47AM (#15293640)
> You need to "get" Rust's ownership approach before you even manage to compile a non-trivial program.

I'm not entirely certain that's true. I wrote a useful (to me) cli script and only have the vaguest understanding of how the ownership model works. I think for text processing sorts of tasks, it's not too difficult to use.

Re:Show HN: Redox Rust OS – v0.3.3 release by aeleos on Wednesday September 20, 2017 @11:37AM (#15294943)
As someone learning rust and currently going through this, I would consider that a trivial program. You will know once you get there because you hit kind of a wall where you have to learn and understand what is basically a language inside of a language. And the language is kind of this mapping for logic that only used to be inside of your head (ownership logic), and so translating that fluently into this brand new language is a real roadblock.

The ownership model isn't too bad for strings, but those are easily the most simple way to start using the ownership model. At least for me, getting into the more advanced ownership stuff is a whole different beast entirely.

Re:Show HN: Redox Rust OS – v0.3.3 release by Mouse47 on Wednesday September 20, 2017 @11:33AM (#15294887)
Beginners frequently trip over `&str` vs `String`, but other than that I agree w/ you
Re:Show HN: Redox Rust OS – v0.3.3 release by nathcd on Wednesday September 20, 2017 @08:26AM (#15292929)
Is Orbital the desktop for Redox, or are there plans for a modular DE/WM system where other desktops can be slotted in and selected from the login screen, or wherever? If it is going to be modular, are there any plans for compatibility with Linux DEs?
Re:Show HN: Redox Rust OS – v0.3.3 release by jackpot51 on Wednesday September 20, 2017 @09:12AM (#15293324)
Yes, there are plans for others. Orbital is not tied to the lower level framebuffer driver, so it would be possible to write or port other GUI stacks.
Re:Show HN: Redox Rust OS – v0.3.3 release by yjh0502 on Wednesday September 20, 2017 @12:30AM (#15290873)
Could you write default username/password on a release page? :)
Re:Show HN: Redox Rust OS – v0.3.3 release by jackpot51 on Wednesday September 20, 2017 @12:35AM (#15290889)
I have added it. The username is `user` with an empty password, or `root` with a password of `password`.

The only way to change this at the moment is to edit `/etc/passwd`, where they are stored after being encrypted using argon2.

Re:Show HN: Redox Rust OS – v0.3.3 release by vesak on Wednesday September 20, 2017 @01:46AM (#15291117)
>after being encrypted using argon2.

Nitpick: s/encrypted/hashed/

Re:Show HN: Redox Rust OS – v0.3.3 release by jackpot51 on Wednesday September 20, 2017 @09:04AM (#15293263)
True
Re:Show HN: Redox Rust OS – v0.3.3 release by w4tson on Wednesday September 20, 2017 @01:43AM (#15291109)
What is your background? Like how many OSs have you written not in Rust?
Re:Show HN: Redox Rust OS – v0.3.3 release by jackpot51 on Wednesday September 20, 2017 @09:22AM (#15293415)
I wrote a toy OS in 32-bit assembler when I was younger. It was terrible. Unikernel, basically, with no memory protection.

I then rewrote it in 64-bit assembler, for fun.

After learning about Rust, I immediately went to work on Redox. The bootloader and framebuffer initialization code were lifted from the old toy OS's.

Re:Show HN: Redox Rust OS – v0.3.3 release by empath75 on Wednesday September 20, 2017 @09:50AM (#15293666)
How much unsafe code is in redox and the core utils and what are you doing to ensure that you don't end up with the same bugs in your unsafe code that you find in C codebases?
Re:Show HN: Redox Rust OS – v0.3.3 release by bronz on Wednesday September 20, 2017 @02:17AM (#15291221)
i watched an interview you did on a podcast some time ago. i found it to be very interesting! in that interview you said that redox was not going to become a viable desktop operating system for a long time. you seemed to even dismiss the sentiment. is that still so?
Re:Show HN: Redox Rust OS – v0.3.3 release by jackpot51 on Wednesday September 20, 2017 @09:14AM (#15293349)
I personally will use Redox once it is self-hosting as a desktop. However, there is a long, long way to go - wireless, graphics, and audio drivers must be improved.
Re:Show HN: Redox Rust OS – v0.3.3 release by wyldfire on Wednesday September 20, 2017 @10:13AM (#15293917)
> (just a hobby, won't be big and professional like gnu)
Re:Show HN: Redox Rust OS – v0.3.3 release by agumonkey on Wednesday September 20, 2017 @06:00AM (#15292075)
How long until emacs ? or I should say remacs (rust ported emacs by Wilfred Hughes :)
Re:Show HN: Redox Rust OS – v0.3.3 release by jackpot51 on Wednesday September 20, 2017 @09:13AM (#15293336)
Not sure. We just got termios support, and pthreads is WIP, so many programs like emacs should be portable.
Re:Show HN: Redox Rust OS – v0.3.3 release by agumonkey on Wednesday September 20, 2017 @10:45AM (#15294292)
I'm done with other oses
Re:Show HN: Redox Rust OS – v0.3.3 release by piinbinary on Wednesday September 20, 2017 @12:13AM (#15290796)
What are the most common classes of bugs you observe?
Re:Show HN: Redox Rust OS – v0.3.3 release by jackpot51 on Wednesday September 20, 2017 @12:25AM (#15290853)
I would say the most common are logic errors.
Re:Show HN: Redox Rust OS – v0.3.3 release by cdaringe on Wednesday September 20, 2017 @11:42AM (#15295010)
Seems to be the state all programers wish they were in, but only rustaceans practically find themselves in, assuming "logic" equates to "human rationale" regarding an arbitrary topic
Re:Show HN: Redox Rust OS – v0.3.3 release by adhambadr on Wednesday September 20, 2017 @06:52AM (#15292327)
any plans to port it to mobile phones? If anyone worked on porting a touch-based input drivers I could contribute!
Re:Show HN: Redox Rust OS – v0.3.3 release by jackpot51 on Wednesday September 20, 2017 @09:24AM (#15293436)
Mobile phones are extremely diverse. Attempting to target any more than one model would be very difficult, and that one model would need to be owned by all contributors.
Re:Show HN: Redox Rust OS – v0.3.3 release by NamPNQ on Wednesday September 20, 2017 @01:46AM (#15291118)
I wish to have an OS able to run DirectX same on window :D