OSNews sat down with Ian Seyler, the Founder and Lead Programmer at Return Infinity, the maker and sponsor of Baremetal OS, a 64-bit OS for x86-64 based computers written entirely in Assembly. Editor's note: We'd love to do similar interviews with the people behind other alternative or hobby OS projects. If there's a project that you'd like to learn more about, let us know.

"Forth compiled code is compact. Forth applications require less memory than their equivalent assembly-language programs and consume less power (important for hand-helds and portable gadgets!)"

Something doesn't seem right about this. Either forth is emulating a more compact byte code than x86, or it's executing native x86 code. I don't understand how it can be both smaller and as efficient as assembly, can you elaborate?

But while reading "Starting Forth" you surely noticed, where I copy the above from?
I understand that statement, that using Forth words, instead of coding in assembly, usually overall size of your code is smaller, when programming in Forth. I think, it depends on quality of macroassembler you can use, quality of Forth compiler, which you're comparing to - and, of course, on your skills both as assembler- and Forth-coder.

Portability is huge, however in my experience platform specific APIs hinder portability more so than the language itself. Does forth have a standard API for things like networking, name resolution, databases, threading, graphics, etc?

No. Actually, programming in Forth is rather "designing one's own problem-specific language". Forth is the basis. Then instead of using ready-available high-level function (which you'll find in langs like Python), you're designing your own higher-level language using Forth words.

I'm sure this is true for many cases. But what about compared against ruby, or python, C#, or even something like haskell?

The question is difficult to answer (at least for me) because I don't have the time to implement the same program in a dozen different languages to compare the relative difficulty.

Of course, it's not that easy to measure it. Since I'm Forth-newbie (learning it about year for now), you may be interested in asking these questions on comp.lang.forth, where you'll meet several experienced Forth-programmers, coding in Forth more than 20 years.

"But while reading 'Starting Forth' you surely noticed, where I copy the above from? "

Yes.

"...using Forth words, instead of coding in assembly, usually overall size of your code is smaller, when programming in Forth."

We're still talking about compiled x86 code? Honestly I don't understand the logic, but no matter.

"No. Actually, programming in Forth is rather 'designing one's own problem-specific language'...instead of using ready-available high-level function"

This is fine for programming algorithms, and it's probably fine for OS work. However I'd be worried about leaving typical web developers to write their own functions. I imagine this results in a lot of duplicate code between libraries.

"Since I'm Forth-newbie (learning it about year for now), you may be interested in asking these questions on comp.lang.forth, where you'll meet several experienced Forth-programmers"

Thank you for answering my questions. The language seems to have an almost universal quality to it - I think you'll know what I mean by that.

"...using Forth words, instead of coding in assembly, usually overall size of your code is smaller, when programming in Forth."

We're still talking about compiled x86 code? Honestly I don't understand the logic, but no matter.

If I'm correct, there have been studies into that (Like can an Assembler programmer outperform an optimizing C compiler). Result: Only about 10 percent of programmers can outperform an optimizer.
Ans so I guess, that something similar to the above is behind the logic: Forth makes "dirty work" for you.

"No. Actually, programming in Forth is rather 'designing one's own problem-specific language'...instead of using ready-available high-level function"

This is fine for programming algorithms, and it's probably fine for OS work. However I'd be worried about leaving typical web developers to write their own functions. I imagine this results in a lot of duplicate code between libraries.

Nobody said, that Forth is going to replace HTML. Regarding the libraries: Forth programmers often prefer to "reinvent the wheel" - and to implement the things own way - instead of relying on old, fatty, buggy, and (still more and more) bloated libraries.

"..using Forth words, instead of coding in assembly, usually overall size of your code is smaller, when programming in Forth."

We're still talking about compiled x86 code? Honestly I don't understand the logic, but no matter.

It's been a while since I thought of Forth but from my long term storage...
Technically speaking Forth is a compiled language, but technically speaking Forth is not compiled like other high level languages. Forth has no real syntax, it is mostly code 'words' and data on a stack. As such it is already very compact. Forth is very close to the metal, so it is also very optimal. Forth is not for everyone. But if you like it, you love it. If it is for you, you become a Forth zealot and you try to convert all your friends. And of course they become annoyed, because they have never heard of Forth.