Live data from Hacker News

The Dawn of Haiku OS

spectrum.ieee.org

41–50 of 115 posts

Re: The Dawn of Haiku OS

#41

I like the idea of Haiku OS, but from what I've heard, for binary-compatibility reasons (kernel drivers? All applications? I'm not sure) it still ships with GCC 2.95. Requiring a compiler over a decade old for a modern OS doesn't seem like a good long-term strategy.

IIRC one of the reasons Apple passed on BeOS was that the lack of a stable C++ ABI made app dependencies on the OS classes very fragile. For example, API classes had to be padded out with dummy members to make room for later non-breaking additions to apps. Is this still a problem? Isn't this why just about every other OS exposes it's lowest level APIs as C apis?

If the Apple story is indeed true, there's a certain irony to it: device drivers in the OS X/iOS kernel are written against a C++ API called I/O Kit. For forward-compatibility with newer kernel versions, all the public classes contain a significant number of dummy virtual functions, and many also have a pointer member variable called "reserved" so they can later add new fields if they need to without changing the class size.

E.g.: http://www.opensource.apple.com/source/xnu/xnu-1699.24.23/io... - note the

  ExpansionData * reserved;
member variable and the block of

  private:
    OSMetaClassDeclareReservedUsed(IOMemoryDescriptor, 0);
  #ifdef __LP64__
    OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 1);
    OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 2);
    OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 3);
    OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 4);
    OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 5);
    OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 6);
    OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 7);
  #else /* !__LP64__ */
    OSMetaClassDeclareReservedUsed(IOMemoryDescriptor, 1);
    OSMetaClassDeclareReservedUsed(IOMemoryDescriptor, 2);
    OSMetaClassDeclareReservedUsed(IOMemoryDescriptor, 3);
    OSMetaClassDeclareReservedUsed(IOMemoryDescriptor, 4);
    OSMetaClassDeclareReservedUsed(IOMemoryDescriptor, 5);
    OSMetaClassDeclareReservedUsed(IOMemoryDescriptor, 6);
    OSMetaClassDeclareReservedUsed(IOMemoryDescriptor, 7);
  #endif /* !__LP64__ */
    OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 8);
    OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 9);
    OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 10);
    OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 11);
    OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 12);
    OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 13);
    OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 14);
    OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 15);
dummy methods.

There is also a system in place for the linker to patch the vtables of dynamically loaded classes (i.e. third-party drivers). They've also built an Objective-C-like Class/metaclass system in C++ via macros for I/O Kit, for some very basic reflection (mainly to keep track of whether instances of a class exist, and if not, unloading the kernel module).

Re: The Dawn of Haiku OS

#42
post #37

The problem with open-source OS's is that they can't take advantage of things like attractive fonts for the user interface. There has got to be a better open-source font than what Haiku is currently using ( http://www.haiku-os.org/docs/userguide/en/deskbar.html ).

This is no longer true -- there are a few quality typefaces made by professional designers available for open source projects, for example DejaVu, Droid, Arimo/Tinos, PT Sans, Ubuntu. Even Mac OS X uses an open source font for a part of their interface (Menlo, based on DejaVu Sans Mono). timc is right, what you see is unattractive font rendering (no subpixel rendering, full hinting). For the state of the art of font…

> what you see is unattractive font rendering (no subpixel rendering

Haiku actually has ClearType support in the source, but it is not enabled at compile-time by default because it's patented.

Re: The Dawn of Haiku OS

#43
post #37

The problem with open-source OS's is that they can't take advantage of things like attractive fonts for the user interface. There has got to be a better open-source font than what Haiku is currently using ( http://www.haiku-os.org/docs/userguide/en/deskbar.html ).

This is no longer true -- there are a few quality typefaces made by professional designers available for open source projects, for example DejaVu, Droid, Arimo/Tinos, PT Sans, Ubuntu. Even Mac OS X uses an open source font for a part of their interface (Menlo, based on DejaVu Sans Mono). timc is right, what you see is unattractive font rendering (no subpixel rendering, full hinting). For the state of the art of font…

I think the problem with the font rendering in this screenshot is the hinting. When you hint the fonts too strongly they lose their character and the diagonals' width becomes inconsistent with the straight lines' width, as you can see in the lowercase 'w', for example. If this uses the FreeType library, you can set the font hinting to 'Slight' or 'Medium' and fonts look a lot better.

http://www.antigrain.com/research/font_rasterization/index.h...

Re: The Dawn of Haiku OS

#44
post #40
post #37

Earlier quoted context omitted.

This is no longer true -- there are a few quality typefaces made by professional designers available for open source projects, for example DejaVu, Droid, Arimo/Tinos, PT Sans, Ubuntu. Even Mac OS X uses an open source font for a part of their interface (Menlo, based on DejaVu Sans Mono). timc is right, what you see is unattractive font rendering (no subpixel rendering, full hinting). For the state of the art of font…

Those fonts definitely have sub-pixel hinting - easy to spot if you zoom in on any of the pics - the font is just not a very good UI font.

I don't see it - http://i.imgur.com/mZV1K.png

The font seem to be DejaVu Sans, and it's pretty good with proper rendering: http://i.imgur.com/ixI70.png

Re: The Dawn of Haiku OS

#46
post #44
post #40

Earlier quoted context omitted.

Those fonts definitely have sub-pixel hinting - easy to spot if you zoom in on any of the pics - the font is just not a very good UI font.

I don't see it - http://i.imgur.com/mZV1K.png The font seem to be DejaVu Sans, and it's pretty good with proper rendering: http://i.imgur.com/ixI70.png

I looked for an image with a white background http://i.imgur.com/9aTz2.jpg

Re: The Dawn of Haiku OS

#47
post #46
post #44

Earlier quoted context omitted.

I don't see it - http://i.imgur.com/mZV1K.png The font seem to be DejaVu Sans, and it's pretty good with proper rendering: http://i.imgur.com/ixI70.png

I looked for an image with a white background http://i.imgur.com/9aTz2.jpg

Yep, this is it. Still full hinting, though.

Re: The Dawn of Haiku OS

#49
post #11

"Generally, there is one thread for each application and one for the operating system’s user interface as well." I think the article writer meant "process" -- there are many threads per process, and that is present in most "contemporary operating systems". If this is their (Haiku Inc.'s) attempt at PR... they are not doing it well.

There can be many threads per process, but plenty of applications ("Generally") are still single-threaded or even if they aren't, they only use one for the UI.

Re: The Dawn of Haiku OS

#50

"Where BeOS drove ahead of other operating systems of its time (and where Haiku is still ahead of contemporary operating systems) is that each individual application uses many threads. The core of the application itself has one thread, and each window the application creates has a thread." I might not have been around when BeOS was first created, but this is certainly not a new concept today. I don't think I can name…

Hmm, good question, concurrency and UIs seem a natural fit, what was some prior art and who used it first?

I can name Modula-3's Trestle and Pike's Newsqueak language/GUI from the top of my head. Didn't Xerox' Mesa use threads for this?

Post reply on HN