Live data from Hacker News

Thor – A minimalistic operating system in assembly and C++

github.com

131–140 of 152 posts

Re: Thor – A minimalistic operating system in assembly and C++

#131
post #106

Earlier quoted context omitted.

> C is the first language that both stayed out of your way and also provided reasonable productivity features If we ignore the history of computers outside AT&T....

Example? Standard language that never required a trip to assembly language for system level programming? On IBM's, PL/I didn't cut it that regard. On a UNIVAC you could do a lot of system programming in FORTRAN, but only because there were a zillion proprietary extensions that accessed system programming primitives. BASIC on a Commodore 64 had PEEK() and POKE() but that doesn't count either, very non-standard. FORTH?…

You shouldn't complain about extensions to the language. C needs extensions too. For example, many architectures have 3 (or more) memory spaces: program/code, data, IO. If you want to do anything on IO, you'd have to rely on non-standard (proprietary) extensions to C, or, like FORTH, get to asm at the bottom, and call those functions from your C program.

Re: Thor – A minimalistic operating system in assembly and C++

#132

Earlier quoted context omitted.

FORTH? Nope... still asm at the bottom. I call shenanigans!

Either my sarcasm detecter is broken today, or you've never read the source code of a FORTH system. Or perhaps you are commenting that FORTH doesn't have high-level programming constructs -- but of course FORTH allows meta-programming, so you roll your own.

I'm saying that it's shenanigans that he's justifying disqualifying FORTH as a systems programming language because "it's ASM at the bottom." So I'm on your side of that debate.

Re: Thor – A minimalistic operating system in assembly and C++

#133
post #106

Earlier quoted context omitted.

> C is the first language that both stayed out of your way and also provided reasonable productivity features If we ignore the history of computers outside AT&T....

Example? Standard language that never required a trip to assembly language for system level programming? On IBM's, PL/I didn't cut it that regard. On a UNIVAC you could do a lot of system programming in FORTRAN, but only because there were a zillion proprietary extensions that accessed system programming primitives. BASIC on a Commodore 64 had PEEK() and POKE() but that doesn't count either, very non-standard. FORTH?…

> Example? Standard language that never required a trip to assembly language for system level programming?

That would exclude C as well.

Re: Thor – A minimalistic operating system in assembly and C++

#134
post #2

Last week I read the very good 'How to build an operating system from scratch' [1], and I'm glad I did. It meant that I could burrow into the files on this github project and understand exactly what was going on. One day, when I finally have some free time, I am totally going to do this myself. --- [1] https://www.cs.bham.ac.uk/~exr/lectures/opsys/10_11/lectures...

Weow, excellaent reply budday.

Re: Thor – A minimalistic operating system in assembly and C++

#135
post #47

+1 for being able to run on Bochs. There's nothing minimalistic about Qemu. It's an enormous resource intensive program to build. And it's not even easy to run in text mode (no x11). "Qemu-lite" is sorely needed.

It's not minimalistic in its capabilities or implementation, but it's minimalistic in its interface. Its a tool that emulates various hardware, and provides a CLI interface that's no more complex than necessary to operate its conceptually narrow functionality.

Re: Thor – A minimalistic operating system in assembly and C++

#136

Can an operating system be developed from scratch using a safe language such as Rust? If yes, why people still even think about doing it with unsafe languages?

"Why doesn't everyone agree with me that statically enforced safety is the only necessary consideration when building hobby projects?"

And yes, an operating system can be developed from scratch with Rust, maybe with a sprinkle of assembly, but every attempt I've seen makes widespread use of `unsafe', so the value mostly comes from Rust's modern type system with its traits and enums.

Re: Thor – A minimalistic operating system in assembly and C++

#137
post #136

Can an operating system be developed from scratch using a safe language such as Rust? If yes, why people still even think about doing it with unsafe languages?

"Why doesn't everyone agree with me that statically enforced safety is the only necessary consideration when building hobby projects?" And yes, an operating system can be developed from scratch with Rust, maybe with a sprinkle of assembly, but every attempt I've seen makes widespread use of `unsafe', so the value mostly comes from Rust's modern type system with its traits and enums.

> every attempt I've seen makes widespread use of `unsafe', so the value mostly comes from Rust's modern type system with its traits and enums.

http://os.phil-opp.com/ follows the Rust way of making safe abstractions as much as possible.

Re: Thor – A minimalistic operating system in assembly and C++

#138
post #47

+1 for being able to run on Bochs. There's nothing minimalistic about Qemu. It's an enormous resource intensive program to build. And it's not even easy to run in text mode (no x11). "Qemu-lite" is sorely needed.

It's actually quite easy to run in text mode, just add -nographic. It automatically hooks the serial port up to your terminal, too.

What OS are you using?

Is it working for you in VGA text mode (no x11)?

Is this now working on other UNIX-like OS besides Linux?

I have had problems with -nographic in the past and I know others who have as well, but maybe it works reliably now?

Re: Thor – A minimalistic operating system in assembly and C++

#139
post #138

Earlier quoted context omitted.

It's actually quite easy to run in text mode, just add -nographic. It automatically hooks the serial port up to your terminal, too.

What OS are you using? Is it working for you in VGA text mode (no x11)? Is this now working on other UNIX-like OS besides Linux? I have had problems with -nographic in the past and I know others who have as well, but maybe it works reliably now?

You mean can I run it without having X11 running? Yes, of course, with -nographic. How do you think most major VPS providers run qemu? They certainly don't run their hosts with X11 going.

And yes, it runs on not-Linux, but obviously the main selling point of qemu is the access it provides to KVM, which is an interface provided by the Linux kernel. You can do software emulation of a number of architectures on a number of operating systems with qemu.

Re: Thor – A minimalistic operating system in assembly and C++

#140
post #135
post #47

+1 for being able to run on Bochs. There's nothing minimalistic about Qemu. It's an enormous resource intensive program to build. And it's not even easy to run in text mode (no x11). "Qemu-lite" is sorely needed.

It's not minimalistic in its capabilities or implementation, but it's minimalistic in its interface. Its a tool that emulates various hardware, and provides a CLI interface that's no more complex than necessary to operate its conceptually narrow functionality.

I was referring to how long it takes to build from source and how much RAM and CPU it uses while building. The interface is fine. I love Qemu. Bellard writes great software. My early experiences with it were very good. But it has grown to become a whale of a program. I had to switch to Bochs.
Post reply on HN