Live data from Hacker News

Introduction to SerenityOS Programming

awesomekling.github.io

41–44 of 44 posts

Re: Introduction to SerenityOS Programming

#41
post #27

Earlier quoted context omitted.

SerenityOS did recently add an implementation of OpenBSD's pledge() and unveil() API calls¹; seems like - if SerenityOS does continue to pursue OS-level exploit mitigations - it'd make sense to continue down that path of referencing how OpenBSD does it. Andreas Kling's blog also describes some programming conventions for internal code, a lot of which seems geared toward avoiding potentially-security-compromising memo…

Hi yellowapple! Yes indeed, the pledge() and unveil() mechanisms are still spreading throughout the SerenityOS userspace. I'm happy to borrow smart mitigation techniques from anywhere, as long as they make sense and don't have unreasonable performance cost :) Since you mention memory access bugs, I should mention that the number of regular "C-style" memory access bugs I've had to debug in all of the system so far is…

That's all great to hear. SerenityOS looks awesome; keep up the great work!

> I've heard over and over that C++ is unsuitable for operating systems (and kernels, especially)

I think that myth's been dead for a long while (see also: Windows and Haiku, both of which - IIRC - have quite a bit of C++ in their kernels), but hey, one more nail in that coffin, right? ;)

Re: Introduction to SerenityOS Programming

#42
Wow, this is very cool. I am merely a BSD/Linux/UNIX hobbyist (I do not write code), but I love the concept and implementation of SerenityOS. Very clean and fast. The window manager reminds me of icewm, one of my favorites. And I love the global-style application menu on the top bar. I will be keeping an eye on your progress; I look forward to a bootable iso some day. Great work!

Re: Introduction to SerenityOS Programming

#43
post #31

Earlier quoted context omitted.

I wouldn't call the Win32 API clean. To me, it's one of the worst APIs I have ever encountered. It worked and it was well documented, but that does not mean its design is very nice. To me, that is.

There would be no surprise to this since the Win32 GUI APIs were created at a time when C++0x was widely used compared to what you see with APIs created in C++11 and onwards. I guess the latter is the case for SerenityOS and other OSes with integrated GUIs.

The Win32 API could have been much better designed even if done in plain C. The problems the Win32 API are basic, and can be solved in any language that provides minimal facilities.

Re: Introduction to SerenityOS Programming

#44
post #25

Earlier quoted context omitted.

This is amazing! I love it! I have a couple of random questions. What video mode does the GUI environment run in? Does it boot directly into the GUI or can it run headless as well? Do you have a more detailed overview of the different parts of the OS and its current capabilities?

Hi bananaboy! The system currently boots into 1024x768x32 by default. It uses the Multiboot protocol to request that the bootloader sets a video mode before passing control to the kernel. That allows the system to work in tons of places where we don't have a proper video card driver yet :) As DAlperin mentioned, it's possible to boot it headless although it's not something that gets a lot of focus since this is prima…

Thank you! I’ll have a look at your videos!
Post reply on HN