Introduction to SerenityOS Programming
awesomekling.github.io
awesomekling.github.io
It usually takes less than 30 minutes to have everything set up if you're on a modern Linux system. Build instructions can be found here: https://github.com/SerenityOS/serenity/blob/master/Documenta...
Any plans to port it to other platforms (eg OpenGL so it becomes very cross platform) so it can be used outside Serenity?
That said, jcs@ from the OpenBSD project has been working on a port of the entire Serenity desktop environment to OpenBSD: https://twitter.com/jcs/status/1224205573656322048
I usually make a little round-up video at the end of each month and I invited jcs to show off his port in my last video[1] a couple days ago.
It would definitely be feasible to port it to other platforms. The original prototype for the Serenity GUI was built inside an SDL framebuffer on Linux, and it would be kind of fun to bring it back there someday. :)
[1] https://www.youtube.com/watch?v=m5JD5JCe1wY (jcs's segment starts at ~15:30)
Wow. That looks pretty awesome. Your gui aesthetic is pretty 90s in the best way possible, and combined with OpenBSD underneath this looks like it has potential to be a seriously no nonsense system.
I'm gonna keep building the custom SerenityOS kernel of course, since it offers extreme productivity and integration opportunities that would be a lot harder to explore with a foreign kernel at the moment.
But OpenBSD is a great kernel and user mode, all around. For context on my own biases, usually when discussions of desktop environments occur around here I am defending X, because it isn't as bad as people say. But seeing the combination of OBSD and your UI I am like... Yes, that looks like a feasible system that is not X.
As DAlperin mentioned, it's possible to boot it headless although it's not something that gets a lot of focus since this is primarily intended as a GUI system.
I have some presentation and "code tour" videos[1] on my YouTube channel where I go into great detail about how some parts of the system work. If you would like to know about the SerenityOS internals in-depth, it's a pretty good place to start. :)
[1] https://www.youtube.com/playlist?list=PLMOpZvQB55be9pGeYypHg...
Also do you have a serious key-management plan in place to signing and distributing your builds and packages?
----
¹: https://awesomekling.github.io/pledge-and-unveil-in-Serenity...
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 in the single digits.
I've heard over and over that C++ is unsuitable for operating systems (and kernels, especially) but so far it seems extremely suitable. To each their own, of course :)
> 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? ;)
Are there any plans for 64 bit support? and in general about SerenityOS's internal GUI system, how does it compare to RedoxOS or more similarly Haiku which language and GUI development wise, it is almost exactly the same.
I haven't looked at RedoxOS or Haiku enough to tell you how similar they are.
Are programmers expected to always use this high-level OOP style of writing GUI programs? Or does Serenity expose a lower level API for manually creating windows, reading hardware input, writing pixels to framebuffer, etc, like Xlib for example?
Indeed, this is the only native GUI programming interface available on the system. Outside of the standard C library (which includes an increasingly reasonable subset of POSIX), the whole OS is modern C++.
There are people actively working on various things like ACPI, AHCI and NVMe right now, but hardware support takes time. That said, things have been moving at a pretty decent pace :)
The main community hub for the project is #serenityos on Freenode :)
> programming cannot also be an introduction to SerenityOS
> programming as a whole?
It could be, but it's vague. The original title was very much to the point, I don't understand why 'GUI' was dropped.
Clean GUI C++ libraries like this always make me think that Microsoft deliberately chose to not implement such a nice C++ GUI API for Windows and instead gave us the horrible MFC in order to lock us in into Visual Basic and other proprietary projects.
If Microsoft had given us a clean C++ API for Windows, the world of programming would be very different today.
I mean, Win32 was a relatively clean C library. Not beautiful by any means, but it worked and was well documented. At the time it was huge, but it's pretty irrelevant today. If they did it in C++ instead of C, how could it have been different.
It worked and it was well documented, but that does not mean its design is very nice. To me, that is.
I guess the latter is the case for SerenityOS and other OSes with integrated GUIs.