Live data from Hacker News

Writing a Unix clone in about a month

drewdevault.com

21–30 of 140 posts

Re: Writing a Unix clone in about a month

#21

It was really cool watching the ~daily updates on this on Mastodon - seeing how someone so skilled gradually pieces together a complex piece of software.

Link to the mastodon thread (from Drew’s article), for those that are interested:

https://fosstodon.org/@drewdevault/112319697309218275

Re: Writing a Unix clone in about a month

#22
post #10

Hare looks like an interesting language. Though this limitation will limit its adoption in this multicore age I think: From the FAQ https://harelang.org/documentation/faq.html .... Can I use multithreading in Hare? Probably not. We prefer to encourage the use of event loops (see unix::poll or hare-ev) for multiplexing I/O operations, or multiprocessing with shared memory if you need to use CPU resources in parallel.…

> multiprocessing with shared memory if you need to use CPU resources in parallel

This is actually pretty powerful. I personally prefer it for most purposes, because it restricts the possibility of data races to only the shared memory regions. It's a little like an "unsafe block" of memory with respect to data races.

Re: Writing a Unix clone in about a month

#23
post #8

Very cool. Most of these Unix clones are usually written in C. This one is written in a new programming language.

I only read part of the FAQ. I find the desire to keep the complexity low by limiting the compiler lines of code and not using LLVM interesting, but I wonder how practical it is. The FAQ admits that because of this, it generates slower code. So it shifts the complexity to the software codebase, by telling the users to “use assembly where needed”.

Seems a bit like Python’s philosophy of not introducing too much optimizations to prevent the runtime complexity from spiraling out of control.

Re: Writing a Unix clone in about a month

#24
post #7

I was interested in Hare until I found this immensely self-defeating FAQ item: https://harelang.org/documentation/faq.html#will-hare-suppor... As a baseline, I support developers using whatever license they would like, and targeting whatever operating systems, indeed, writing whatever code they would like in the process. That doesn't make this specific policy a good idea. Even FSF, generally considered the most extre…

"We cannot effectively study, understand, debug, or improve, the underlying operating system if it is non-free. We actively work with the source code for the systems on which we depend, and we are not interested in supporting any platforms for which this is not possible."

I understand that you don't like it, but how do you come to regard a statement like this as "arbitrary?" It's exclusive, for sure. "Purity test" is one way to characterize it. But do you really think that statements like this are just the product of individual caprice? That it's not someone's attempt at a principled intervention, but just an "attitude?"

Re: Writing a Unix clone in about a month

#25
post #18

> I also finally learned how signals work from top to bottom, and boy is it ugly. I’ve always felt that this was one of the weakest points in the design of Unix and this project did nothing to disabuse me of that notion. Would love any resources that goes in more details, if any HN-er or the author himself knows of some!

I wanted to say the exact same thing! I would love to get more details about that.

Re: Writing a Unix clone in about a month

#26

Impressive, super cool, and inspiring! Example of “creating something impressive in X days” requires a lot of experience and talent that is built over years .

... and also a previously kernel implementation called Helios to provide a lot of the lowest level code. Not trying to knock down the accomplishment, but DD is pretty open about the fact that a lot of the speed of this project was dependent on having done Helios first (and reusing code from it).

...which is part of the "experience and talent built over years", I guess? :-)

Re: Writing a Unix clone in about a month

#28
post #8

Very cool. Most of these Unix clones are usually written in C. This one is written in a new programming language.

I only read part of the FAQ. I find the desire to keep the complexity low by limiting the compiler lines of code and not using LLVM interesting, but I wonder how practical it is. The FAQ admits that because of this, it generates slower code. So it shifts the complexity to the software codebase, by telling the users to “use assembly where needed”. Seems a bit like Python’s philosophy of not introducing too much optimi…

I doubt it is a real problem for anything other than number crunching. I like to use tcc during development (which does very little, if any optimizations) to speed up compilation and I never noticed any regressions in performance, even for GUI software. Throughput just isn't that big of a deal for most applications (although latency and resource usage is, but that's not affected by choice of compiler).

Re: Writing a Unix clone in about a month

#29
post #7

I was interested in Hare until I found this immensely self-defeating FAQ item: https://harelang.org/documentation/faq.html#will-hare-suppor... As a baseline, I support developers using whatever license they would like, and targeting whatever operating systems, indeed, writing whatever code they would like in the process. That doesn't make this specific policy a good idea. Even FSF, generally considered the most extre…

I don't think that Apple particularly cares about porting their software to Linux. Do you feel the same about Apple? That with such an attitude, they surely cannot succeed?

Re: Writing a Unix clone in about a month

#30
post #24
post #7

I was interested in Hare until I found this immensely self-defeating FAQ item: https://harelang.org/documentation/faq.html#will-hare-suppor... As a baseline, I support developers using whatever license they would like, and targeting whatever operating systems, indeed, writing whatever code they would like in the process. That doesn't make this specific policy a good idea. Even FSF, generally considered the most extre…

"We cannot effectively study, understand, debug, or improve, the underlying operating system if it is non-free. We actively work with the source code for the systems on which we depend, and we are not interested in supporting any platforms for which this is not possible." I understand that you don't like it, but how do you come to regard a statement like this as "arbitrary?" It's exclusive, for sure. "Purity test" is…

Ouch, I hadn't really considered it before but that quote deeply resonates with me. The experience of trying to debug windows wifi system is day and night compared to wpa_supplicant/mac80211.
Post reply on HN