Slashdot Mirror


MenuetOS, an OS Written Entirely In Assembly Language, Inches Towards 1.0

angry tapir writes "MenuetOS is an open source, GUI-equipped, x86 operating system written entirely in assembly language that can fit on a floppy disk (if you can find one). I originally spoke to its developers in 2009. Recently I had a chance to catch up with them to chat about what's changed and what needs to be done before the OS hits version 1.0 after 13 years of work. The system's creator, Ville Turjanmaa, says, 'Timeframe is secondary. It's more important is to have a complete and working set of features and applications. Sometimes a specific time limit rushes application development to the point of delivering incomplete code, which we want to avoid. ... We support USB devices, such [as] storages, printers, webcams and digital TV tuners, and have basic network clients and servers. So before 1.0 we need to improve the existing code and make sure everything is working fine. ... The main thing for 1.0 is to have all application groups available'"

372 comments

  1. Assembly == SLOW ; JAVA == FAST! by Anonymous Coward · · Score: 5, Funny

    ASSembly language? This OS will run as slow as frozen mollasses.

    I want my computer to run FAST!

    I want an operating system written in Java, running on a java interpreter written in java [add recursion here].

    Java is faster than C, so logically, java must be faster than ASSembly. More java == more speed.

    Lets get to it!

    1. Re:Assembly == SLOW ; JAVA == FAST! by scuzzlebutt · · Score: 5, Funny

      You keep using this word, "Java". I do not think it means what you think it means.

      --
      In C++, your friends can see your privates.
    2. Re:Assembly == SLOW ; JAVA == FAST! by Anonymous Coward · · Score: 0

      There's a reason it was posted as Anonymous Coward!

    3. Re:Assembly == SLOW ; JAVA == FAST! by jythie · · Score: 4, Informative

      Yeah, outside a few rather narrow cases, modern CPUs have just gotten too complicated to write efficient assembly for.

    4. Re:Assembly == SLOW ; JAVA == FAST! by arfonrg · · Score: 4, Funny

      So, what you're saying is that the C compiler is better Assembly coder than you are. I feel your pain on that one.

      --
      Your thin skin doesn't make me a troll
    5. Re:Assembly == SLOW ; JAVA == FAST! by Guppy06 · · Score: 2, Insightful

      If a compiler can't produce better assembly than any one programmer, it's time to get a new compiler.

      I mean, that's pretty much the point of upper level languages to begin with.

    6. Re:Assembly == SLOW ; JAVA == FAST! by Anonymous Coward · · Score: 0

      Pfffftttt..... Java........ Once they make an OS in PHP, they get all the speed in the world!

    7. Re:Assembly == SLOW ; JAVA == FAST! by Teancum · · Score: 5, Insightful

      If a compiler can't produce better assembly than any one programmer, it's time to get a new compiler.

      I mean, that's pretty much the point of upper level languages to begin with.

      Hardly.

      The point of high level languages is to improve the productivity of software developers with the full knowledge and recognition that compilers will always do an inferior job... trading off efficiency and memory space for increased throughput of the developer.

      That some compiler developers using some languages (notably C) can usually produce software that is within a few single digit percentages of the efficiency of a hand crafted assembly code written by competent and knowledgeable programmers well versed in those respective languages (an important distinction.... you need to compare expert C programmers with expert assembly programmers) for a few benchmark algorithms is besides the point.

      Grace Hopper, one of the developers of COBOL, created the programming language for some very different goals than what you mention. Portability (the ability to move from one CPU architecture/operating system to another) was a key component and rationale. The other was to use "understandable" words that supposedly non-programmers could at least in theory be able to read. It is debatable if COBOL actually met those goals. Another very significant goal is to increase the volume of software produced by the individual software developer (mentioned above), and perhaps finally the point of a high level language is to reduce the learning curve for somebody new to computers and software development to be able to become the expert that is needed to get software developed.

      I would agree that some compilers need to be tossed out the window in terms of their code efficiency, but you might be surprised at which compilers really can make the cut or not as well.

    8. Re:Assembly == SLOW ; JAVA == FAST! by ciderbrew · · Score: 5, Funny

      These are the words you keep inside when you report to board level.

    9. Re:Assembly == SLOW ; JAVA == FAST! by Anonymous Coward · · Score: 4, Interesting

      Ah but that depends. Because it's written entirely in assembly, MenuetOS is so small that the entire thing can fit in the CPU cache: most of it in L1 directly. What it loses in things like pipe-lining & branch prediction it more than makes up in sitting in the cache.

      You can also do this with DOS & Windows 3.1 on a modern CPU: an i7 has 8MB of cache, which is more than most PCs c. 1995 had in their entirety.

    10. Re:Assembly == SLOW ; JAVA == FAST! by mcgrew · · Score: 4, Insightful

      You jest, but wikipedia says it will boot in five seconds on a 90 mHz Pentium FROM A FLOPPY. Is that fast enough for you, javaboy?

    11. Re:Assembly == SLOW ; JAVA == FAST! by meerling · · Score: 2, Insightful

      If your C is faster than your Assembly, that's because your Assembly is crap.
      It's the same way that your Bicycle is faster than your Jet Fighter Plane that is held together by duct tape and you've 'fueled up' with whip cream.

    12. Re:Assembly == SLOW ; JAVA == FAST! by lgw · · Score: 5, Informative

      So, what you're saying is that the C compiler is better Assembly coder than you are. I feel your pain on that one.

      Indeed. I spent 5 years supporting a production commercial OS written entirely in assembly (one of many forks that happened when IBM started licensing the source for their old mainframe OS). Today I let a C compiler do it's job on my personal projects.

      Can you write faster code than the compiler - sure you can, though it requires a deep understanding. But that code will be crap unmaintainable code. There was a day when C was called a high level language, and in a meaningful way it still is. You can write good maintainable C code that doesn't look optimized and get nearly-perfect assembly that bears little resemblance to the source.

      The worst choice in C is to think you need to help the compiler optimize. Seriously, the compiler doesn't care at all whether you write x = x << 1; x += x; or x *= 2; it sees them all the same, so code the one that makes sense in context.

      --
      Socialism: a lie told by totalitarians and believed by fools.
    13. Re:Assembly == SLOW ; JAVA == FAST! by Teancum · · Score: 5, Insightful

      Yeah, outside a few rather narrow cases, modern CPUs have just gotten too complicated to write efficient assembly for.

      That says more about lousy CPU architecture design with bloat and incredible inefficiencies than it says about software developers who can write software for those CPUs. Then again, look up the RISC vs. CISC debates about CPU design and you might be surprised about CPU complexity as well.

      Otherwise, most of the CPU complexity that currently shows up is due to the fact that the CPU speed far outstrips the memory bus speed, thus all of the concern about "local" memory caches and pipelined instruction ordering. If you could create a much faster memory bus, CPU designs could be simplified considerably from a software developer POV.

      Of course we are still living with the effects of the 4004 design architecture that lives on with the laptop I'm using right now (and is opcode compatible with the 4004 instruction set still capable of being used as a strict sub-set of the opcodes used by my laptop's CPU). That is another reason for much of the added complexity in CPU architecture design, as few if any CPU designers want to abandon the software developed for earlier generations of CPUs as a way to promote their new design. Instead, they tinker on the edges and keep piling new instructions onto the existing heap of instructions and keep making the CPU more and more complex as a new generation of designers is in charge.

    14. Re:Assembly == SLOW ; JAVA == FAST! by pigiron · · Score: 1

      As long as it is backwards compatible with the 8008 instruction set I'll be happy!

    15. Re:Assembly == SLOW ; JAVA == FAST! by meerling · · Score: 1

      I sure hope you're being sarcastic, but the ignorance among people these days, I can't be sure.
      Assembly is basically machine language with mnemonics so it's easier for the human to write and can be compiled to run on different processors.
      C is a compiled language that is even easier to use for humans, but it has gone out another level of abstraction so something closer to the metal, aka assembly, can out perform it easily if well written. (Crap code is crap no matter what it's written in.)
      Java is an interpreted language. It's even further away than any compiled language. It goes through a program that translates it when you run it. Kind of like Basic does. So it has a LOT more crap between it and what the machine actually runs. Again, any cases of Java running faster than C is the programmers fault.

      Let's put it this way, it's like having a button in a room that you want an intern to press.
      The Assembly language intern is in the room and will press it the moment you call him and tell him.
      The C intern is at the door of the room, and is waiting for that call as well.
      The Java intern is sitting on your lap, but still won't do anything until you call, at which point he calls his brother, who then has to run down to wherever the room is before he can even see the button much less press it.

      Yes, Assembly and C are both compiling languages, but Assembly has the potential advantage since it's a lot closer to the final product for pure speed.
      (I said 'potential' because the programmer can screw up anything in a program.)
      As to Java, in many ways it's a version of C that has an interpreter.

      Now of course, we could try to explain compilers and interpreters and pcode, and a lot of other things to you, but if you weren't making a joke, you aren't even close to being ready for any of that.

      In the ancient days, we actually made programs in Basic that ran faster than other peoples C programs. That's because we 'cheated' and inserted hand tuned machine code to handle the usually slow parts. We also wrote a Basic to Machine code compiler that allowed you to choose between speed, resources, or a balanced output. Of course, back then the computers were much more limited and 8k ram was considered good. No way in any hell I'm signing on for a project like that these days!

    16. Re:Assembly == SLOW ; JAVA == FAST! by Anonymous Coward · · Score: 0

      What a dumb analogy

    17. Re:Assembly == SLOW ; JAVA == FAST! by PRMan · · Score: 3, Interesting

      Yes, you might be surprised, since Borland Delphi is often the most efficient high-level compiler for PCs. It's not that useful anymore (because Pascal has fallen out of favor), but it has unbelievably good optimizers.

      --
      Peter predicted that you would "deliberately forget" creation 2000 years ago...
    18. Re:Assembly == SLOW ; JAVA == FAST! by Anonymous Coward · · Score: 0

      That says more about lousy CPU architecture design and incredible inefficiencies...

      It's actually the opposite.
      The architectures (at least away from x86) are pretty good now. x86 still blows chunks and always will.
      The big issue with compilers vs. assembly is legacy systems. On the desktop every new CPU needs to run old code faster. If it doesn't it's a failure; P4 for example. The CPUs themselvs are getting much better at executing shitty code streams making much of the optimization process unnecessary. If you know what you're doing you can still hand craft instruction streams that the CPU will execute faster but as I said in an earlier post eerything is memory bandwidth bound now anyway. Fix your memory accesses and your code runs better.

    19. Re:Assembly == SLOW ; JAVA == FAST! by Immerman · · Score: 3, Informative

      Can fit in cache != will be in cache. On a modern multi-GB system the memory paging index alone is going to dwarf the size of this OS's code. Then there' all the rest of the OS data, plus the even more frequently used application code and data. Certainly shrinking the OS code size drastically will help free up more cache space for other uses, and the most heavily used parts may be able to remain in the cache most of the time, but it's almost a guarantee that most of the time most of the OS code won't be in the cache.

      --
      --- Most topics have many sides worth arguing, allow me to take one opposite you.
    20. Re:Assembly == SLOW ; JAVA == FAST! by gbjbaanb · · Score: 1

      it also says a lot about lousy high-level languages layers on layers in the quest to make developers more productive.

      You can code C and get good assembler out of it that is also efficient and fast; or you can code a script language that will not produce decent assembler but will let you code things a lot quicker. I think there's probably a sweet spot between these two extremes but it will shift depending on your work - some people will want the extra power of C++ that still gives you good assembler, while others will go for C# or Java that gives you good productivity.

    21. Re:Assembly == SLOW ; JAVA == FAST! by Arker · · Score: 1

      "Yeah, outside a few rather narrow cases, modern CPUs have just gotten too complicated to write efficient assembly for."

      You say this as if there were some other way. But when you code in a higher level language, the compiler mechanically translates what you wrote into assembly before handing it off to the assembler to actually generate the object anyway. Compilers have certainly seen a lot of improvement but compiler generated assembler code still tends to be awful, and a good assembler programmer will always be able to beat it if given a chance.

      I suspect what has really happened is simply that employers are heavily biased towards cheap and quick, and assembler isnt optimal there. And that in turn has resulted in fewer people learning assembler, making it even harder and more expensive to do things that way, sort of a vicious circle.

      --
      =-=-=-=-=-=-=-=-=-=-=-=-=-=-
      Friends don't let friends enable ecmascript.
    22. Re:Assembly == SLOW ; JAVA == FAST! by Anonymous Coward · · Score: 0

      You jest, but wikipedia says it will boot in five seconds on a 90 mHz Pentium FROM A FLOPPY. Is that fast enough for you, javaboy?

      On the next SAT tests:
      Java is to C or Assembly as a Floppy is to a Hard Drive.
      [ ] true
      [ ] false
      [x] what is a floppy?
      [ ] I want some of what you're having

    23. Re:Assembly == SLOW ; JAVA == FAST! by LynnwoodRooster · · Score: 5, Funny

      He's using it correctly. Remember the Programmer's Mantra: "It is by caffeine alone I set my mind in motion. It is by the beans of Java that thoughts acquire speed, the hands acquire shakes, the shakes become a warning. It is by caffeine alone I set my mind in motion."

      --
      Browsing at +1 - no ACs, I ignore their posts. So refreshing!
    24. Re:Assembly == SLOW ; JAVA == FAST! by davester666 · · Score: 1

      Well, the more coffee you drink, the slower everybody else seems, so obviously you are going faster.

      It works the same with computers. The more Java you throw at them, the slower everything else seems.

      --
      Sleep your way to a whiter smile...date a dentist!
    25. Re:Assembly == SLOW ; JAVA == FAST! by MXB2001 · · Score: 1

      I run DOS 7.1 on a '99 with 128 MB RAM. That's 1 MB for DOS and 127 for extended memory... :)

      --
      01/01/01
    26. Re:Assembly == SLOW ; JAVA == FAST! by Anonymous Coward · · Score: 0

      Bo Ard so bored the Board Board, they bored a bore through the floorboard, clear to Boring, Oregon.

    27. Re:Assembly == SLOW ; JAVA == FAST! by jhumkey · · Score: 1

      Excellent point. I keep saying we should ask "Am I choosing a language for the 1 hr project, or the 10 year project?"
      If its the 1 hr project (lets say to port data from one proprietary DB format to another) . . . write it in anything, Java, C, Haskell, APL . . . I don't care. You need it quick, not efficient, then will throw it away.
      But if we're going to be Mostly Running it for 20 years (and less so modifying it) . . . like say for an OS . . . then . . . efficiency beats all. (Doesn't eliminate expand-ability and maintainability . . . but beats them to first place consideration.)
      And, under ideal circumstances . . . its gonna be hard to beat Assembler. (Slower to market . . . perhaps . . . but faster for you the next 20 years as you run it.)

      --
      No, I don't remember your name. But the memory mapped screen on a TRS80 from 1977 is from 15360 to 16383 if that helps.
    28. Re:Assembly == SLOW ; JAVA == FAST! by westlake · · Score: 1

      The other was to use "understandable" words that supposedly non-programmers could at least in theory be able to read. It is debatable if COBOL actually met those goals.

      Common Business-Oriented Language

      The goal was a program that could be read and audited by corporate accountants and integrated into systems and practices that in some cases dated back centuries.

    29. Re:Assembly == SLOW ; JAVA == FAST! by slack_justyb · · Score: 1

      What you speak of is a direct consequence of Intel holding its monopoly over everything. So while there may be a slight technical challenge, there is a much larger political challenge.

    30. Re:Assembly == SLOW ; JAVA == FAST! by neurojab · · Score: 2

      And, under ideal circumstances . . . its gonna be hard to beat Assembler. (Slower to market . . . perhaps . . . but faster for you the next 20 years as you run it.)

      You may be right, but I wouldn't bet on that. First of all, it's not unheard of for a CPU architecture to die in 20 years, but that aside: It would be interesting to take an x86 assembler program written 20 years ago and run it on modern hardware, then perform the same experiment with a C program recompiled with a modern compiler.

      The 20 year old assembly program would be optimized for a 20 year old CPU architecture (and essentially running in backward compatibility mode), whereas the C program would be optimized for the current architecture. I'd wager you'd see far greater improvement moving to the modern CPU in the C program. Whether it would be faster than the assembly program would depend on what it did, but I would think that in many cases the C program would be faster, even if the assembly program smoked it 20 years ago.

    31. Re:Assembly == SLOW ; JAVA == FAST! by LWATCDR · · Score: 1

      Even if discount the nasty ISA of the x86 there is still the problem of instruction scheduling. I would love to see some benchmarks of minuetOS vs say Linux.What an OS is written in is less import than performance.

      --
      See my blog http://ilovecookes.blogspot.com/ for light hearted technical information.
    32. Re:Assembly == SLOW ; JAVA == FAST! by nogginthenog · · Score: 1

      My 7Mhz Amiga 500 would boot up pretty fast from a floppy, and the OS was written in a mixture of C, Assembler and BCPL.

    33. Re:Assembly == SLOW ; JAVA == FAST! by Teancum · · Score: 1

      The other was to use "understandable" words that supposedly non-programmers could at least in theory be able to read. It is debatable if COBOL actually met those goals.

      Common Business-Oriented Language

      The goal was a program that could be read and audited by corporate accountants and integrated into systems and practices that in some cases dated back centuries.

      It was also so non-programmer managers could at least pick up a piece of code and be able to read it with at least something resembling some understanding of what was being written. Having something like:

      MULTIPLY SIX BY PI GIVING RESULT

      is certainly much easier to read than

      MOV 3.14159,C
      MOV 6,X
      MUL X,C
      MOV C,$0ADB

      although the C equivalent of:

      return 6 * PI

      certainly seems even easier.

      My point though is the design goals of high level languages has many primary goals, and the issues of compiler efficiency is very much secondary or even tertiary in terms of what it is supposed to be accomplishing. Often those goals are at substantial odds against producing efficient code in the first place, in terms of being executed quickly on the target CPU.

    34. Re:Assembly == SLOW ; JAVA == FAST! by Anonymous Coward · · Score: 0

      So you want the Java Media Desktop http://en.wikipedia.org/wiki/Java_Desktop_System, Sun's go you covered, without a hint of irony even.

    35. Re:Assembly == SLOW ; JAVA == FAST! by cfalcon · · Score: 0

      WHERE ARE MY MOD POINTS

    36. Re:Assembly == SLOW ; JAVA == FAST! by Teancum · · Score: 1

      I would dare you to take a 20 year old program in any language and have it run successfully on any current computer without having to do some substantial tweaking or putting that computer into some sort of historical mode of operation. In most cases I would dare you to find the source code for that 20 year old software as well, as my experience in such situations is that binaries alone are what survives. Most examples I can think of also run on 20 year old hardware (or at least the basic hardware architecture is 20+ years old too).

      Come to think of it, I was developing software in Windows 3.1.1 for Workgroups about 20 years ago. I actually do have some of that software sitting around on some very old CD-ROMs of that software too, and some fragments of the source code that I wrote too. Getting it to run is a real challenge, and the default installer program most certainly doesn't work as I've had to tweak things just to get it to work at all in Windows XP (I won't even try Windows 8).

      Yeah, assuming that the compiler doesn't barf out with some of the compiler flags, exceptions, API library calls, or other various problems that would come from trying to recompile that old software, you would most certainly be able to get a modern compiler to be able to target the current generation of CPU architecture and do a better job as opposed to simply running those 20 year old binaries. It may be possible to recompile some of Linus Torvalds' original source code for the first version of Linux too, but just imagine the problems you would face trying to get that to actually run?

      No doubt there are some standard libraries of code that are in core operating systems that have stood the test of time and work much better in current generations of compilers, but I dare say you are also comparing apples and oranges here too. In many cases, those libraries were in fact the test cases which the compilers were built around, so of course they would be able to keep compiling some of those older code examples. Regardless, all of those examples, inline assembly inserted into the middle of a C program, and other examples of older code would all have some significant and continued maintenance done over the past couple decades or it would be treated as abandonware and become a major engineering effort just to get it recompiled in the first place.

    37. Re:Assembly == SLOW ; JAVA == FAST! by Guy+Harris · · Score: 2

      Of course we are still living with the effects of the 4004 design architecture that lives on with the laptop I'm using right now (and is opcode compatible with the 4004 instruction set still capable of being used as a strict sub-set of the opcodes used by my laptop's CPU).

      Well, you have a crappy laptop then. Most laptops out there have a CPU with an instruction set such that assembler-language code for the Intel 8080 could be mechanically translated to assembler-language code for that instruction set (although the machine codes were not compatible), although the instruction set in current CPUs have been at least extended significantly to a 32-bit version and, in most cases, to a 64-bit version.

      (I.e., you've confused the 4-bit 4004 with the 8-bit 8080 and you've confused "similar instruction sets to the extent that you can mechanically translate assembler-language code" with "superset of the same instruction set".)

    38. Re:Assembly == SLOW ; JAVA == FAST! by sjames · · Score: 1

      I would say that COBOL fell short of "anyone can program" by a wide margin, mostly because even if you could just describe the algorithm in detail in natural language, most people just don't have the mindset necessary for the task. Even with an expert system asking questions for clarification, many would be reduced to silently waving their hands in frustration unable to describe the low level details at all.

      OTOH, it was a lot more comprehensible to a lot more programmers (or potential programmers) than assembly language (which had only recently replaced patch cords and plug boards). Unfortunately, as an early attempt at a higher level language, it gets in the way of a good programmer almost as much as it helps, but as I said it was a very early effort and is to be commended for it's accomplishments however limited.

    39. Re:Assembly == SLOW ; JAVA == FAST! by TangoMargarine · · Score: 1

      Or somebody could work on a compiler to efficiently convert a high-level language into something lower that already maps well to assembly...

      --
      Unity? Screw that: XFCE. Slashdot Beta? Screw that: SoylentNews. Australis? Screw that: Pale Moon. UX developers DIAF
    40. Re:Assembly == SLOW ; JAVA == FAST! by TangoMargarine · · Score: 1

      So compared to Java, basically assembly, assembly, and more assembly.

      --
      Unity? Screw that: XFCE. Slashdot Beta? Screw that: SoylentNews. Australis? Screw that: Pale Moon. UX developers DIAF
    41. Re:Assembly == SLOW ; JAVA == FAST! by Miamicanes · · Score: 1

      The P4 was epic fail across the board... it was slower at old code, and STILL slower with new code. Even if you hand-tweaked code specifically for Netburst architecture, random spew running on any PIII would toast the best optimized code crawling on a P4.

      The Pentium 4 (and Netburst architecture) had exactly one purpose: cheap gigahertz for Intel's marketing department to advertise. It's the reason why a 1.6 GHz Pentium M (which was for all intents and purposes, a 1.6GHz Pentium III Xeon with hyperthreading and power management) completely toasted even 3GHz Pentium 4 CPUs, and a big part of the reason why AMD completely spanked Intel for a couple of years despite having CPUs that were half the nominal speed of Intel's.

      The Pentium 4 will forever be remembered as an unloved artifact of Intel's descent into Microsoft-like insanity. Fortunately, we had AMD standing by to give us a consequence-free superior alternative, so Intel had no choice but to throw in the towel on Netburst and become sane again quickly. Unfortunately, OS X is tied to Apple's overpriced hardware, and Linux is far from being an effortless & transparent alternative to Windows (*), so the best we can hope for is that Windows 8.1 will be followed by Windows 9 and Windows 7XPE (available in Professional and Enterprise versions only), with 7's UI, but Windows 8's performance improvements backported, and and Metro just overlaid on top of IE12.

      (*) Just to name one issue that's always annoyed me with Linux... its mouse ballistics. No, seriously. Regardless of what I've tried, it's just never seemed *right* compared to Windows. It doesn't matter which mouse I use, or what I set its parameters to be... I just can't precisely replicate Windows mouse ballistics under Linux, and always feel like I'm fighting with the mouse.

    42. Re:Assembly == SLOW ; JAVA == FAST! by Anonymous Coward · · Score: 0

      Yes, I am going to listen to someone with the name "Tea 'n' Cum".

    43. Re:Assembly == SLOW ; JAVA == FAST! by Miamicanes · · Score: 1

      Well... that depends. A compiler could theoretically do a better job of precisely applying memory-barrier instructions and pre-optimizing code for a specific CPU to maximize its ability to run from cache. In reality, this is a use case that almost never applies, because the only time anybody allows the compiler to hard-optimize code enough for it to matter is when they're trying to benchmark a new Intel CPU using Intel's compiler and allowing it to push that one specific CPU as hard as it can possibly be pushed (even if the same optimizations would be harmful to code performance on other models).

      Likewise, a lot of compiler optimizations do things that would be unmaintainable and ugly in assembly, like unrolling loops and generating spaghetti code that caches well, but would be unreadable to a human.

      The one thing compilers have always sucked at, though, is compact code. And oddly, that's starting to matter now, even though we have gigabytes of ram. Relatively speaking, DDR3 system ram is almost as slow relative to L1 cache as magnetic tape was relative to SRAM back in the 70s. The hit from having to go out and fetch bytes from main system RAM is now HUGE. Speculative execution and multiple cores & pipelines help, but only in situations where the computer is busy trying to do a dozen things at once anyway. Do something with a single core that involves lots of random-access ram fetching, and even an i7 will slow to a crawl.

      Now... in theory... it might be possible to hand-tweak a build of MenuetOS for a specific processor like the i7, using assembly opcodes almost nobody who isn't a compiler-writer even knows exist to semi-deterministically set up execution from the 4 cores, laying out the code and data so it can all run entirely from cache. And maybe even a chunk of the OS executing directly on the GPU. If someone could pull off a stunt like that... good god. Your 3GHz i7 would execute with the performance of a theoretical 16GHz i7, once you got it tweaked to the point where everything ran 100% out of cache and never had to wait for slow main memory access.

    44. Re:Assembly == SLOW ; JAVA == FAST! by maxwell+demon · · Score: 1

      The point of high level languages is to improve the productivity of software developers

      That is one point of high level languages. Another point is that you don't have to rewrite your whole code from scratch just because you're using a different processor on your next machine.

      --
      The Tao of math: The numbers you can count are not the real numbers.
    45. Re:Assembly == SLOW ; JAVA == FAST! by maxwell+demon · · Score: 1

      It would be interesting to take an x86 assembler program written 20 years ago and run it on modern hardware, then perform the same experiment with a C program recompiled with a modern compiler.

      I bet the C program from 20 years ago would have some micro-optimizations which back then saved a few cycles, but which obfuscate the code for modern optimizers, so that the tweaked code is actually slower than straightforward code.

      --
      The Tao of math: The numbers you can count are not the real numbers.
    46. Re:Assembly == SLOW ; JAVA == FAST! by dbIII · · Score: 2

      The P4 was epic fail across the board

      It was so bad that I had a 70 year old former transmission systems electrical engineer (so nothing below thousands of volts) rant at me for hours about how bad it was when it came out. When a guy who graduated from University before the transistor went on sale can see a dozen holes in microprocessor design then you've got a problem.
      I really should retire the last netburst machine I've got but it has a lot of drive bays and freebsd can still do stuff with it.

    47. Re:Assembly == SLOW ; JAVA == FAST! by flargleblarg · · Score: 1

      I would dare you to take a 20 year old program in any language and have it run successfully on any current computer without having to do some substantial tweaking or putting that computer into some sort of historical mode of operation.

      10 PRINT "HELLO, WORLD!"
      20 END
      RUN
      HELLO, WORLD!

      Yup, still works without any tweaking!

    48. Re:Assembly == SLOW ; JAVA == FAST! by dbIII · · Score: 1

      I would dare you to take a 20 year old program in any language and have it run successfully on any current computer without having to do some substantial tweaking or putting that computer into some sort of historical mode of operation.

      The old *nix "xv" image viewer still works if it's a static binary from 20 years ago. An ex-IBM guy I know mentioned some even older MSDOS game called "Alley Cat" that works on 32bit win7 (not sure about Win8).

    49. Re:Assembly == SLOW ; JAVA == FAST! by grumpyman · · Score: 1

      As an academic exercise I in fact did implemented a rudimentary java interpreter in java way back in school when it was 1.0 lol.

    50. Re:Assembly == SLOW ; JAVA == FAST! by thestuckmud · · Score: 2

      If your C is faster than your Assembly, that's because your Assembly is crap.

      You are kidding yourself if you think you can write programs in assembler that run faster than the equivalent in C. Look at what my compiler generates for the C statement "return x/372;" with 64 bit ints on x64:

      movslq %edi, %rax
      imulq $738919105, %rax, %rax
      movq %rax, %rcx
      shrq $63, %rcx
      sarq $38, %rax
      addl %ecx, %eax
      popq %rbp
      ret

      Your only practical approach as a human writing this in assembler is to use the slower 64 bit divide instruction. Puzzling out optimizations like this is a job much better suited for a the code generator in a compiler.

      This is just one example among many arithmetic tricks of the trade. Register allocation and loop unrolling are two more low level optimizations that are no fun. At least not for me. I'd rather write the program in C, profile it, optimize my algorithms, and only then consider rewriting inner loops in assembler. Actually, I'd rather write the program in a proper modern programming language, and speed up its inner loops by rewriting them in C/assembler.

    51. Re:Assembly == SLOW ; JAVA == FAST! by Anonymous Coward · · Score: 0

      Yeah, outside a few rather narrow cases, modern CPUs have just gotten too complicated to write efficient assembly for.

      That says more about lousy CPU architecture design with bloat and incredible inefficiencies than it says about software developers who can write software for those CPUs.

      Actually, you're both full of shit. Outside of vector extensions, popular modern CPUs execute much the same instruction set as they did 10 or 20 years ago (notable exception / new development: ARM64). The only things which have changed, from a programmer's point of view, are cache hierarchies, execution timings, prediction miss penalties, etc. And for the prospective assembly hacker, in a sense things are better than they ever have been: the modern CPUs (particularly Intel's) are so good at doing scheduling that mostly what you need to do is figure out a minimal set of instructions with a minimal and properly blocked cache footprint and minimal register spills. The CPU will usually take care of the rest. It's no longer as necessary to understand every part of the pipeline in detail to get close to max theoretical throughput.

      Of course we are still living with the effects of the 4004 design architecture that lives on with the laptop I'm using right now (and is opcode compatible with the 4004 instruction set still capable of being used as a strict sub-set of the opcodes used by my laptop's CPU).

      The idea that the x86 is descended from the 4004 and that this influence shows up in any part of its design is nonsense. I suppose you're believing that because Intel named its early CPUs 4004, 8008, 8080, 8085, and 8086 (the last being the first x86 CPU), there must be a very close family relationship between them all? In truth, you can make three groups out of those: the 4004 (the 4-bitter) by itself, the 8008/8080/8085 (8-bitters), and the 8086 (16-bit).

      Even just a little bit of wikipedia'ing will tell you that the 8008 was not a derivative of the 4004. It was a separate project which actually began before the 4004 project. And if the 4004 had any influence on x86, you'd expect x86 to have at least a trace left over of the 4004's 4-bit (nybble) word size. It has none; like all modern CPUs the x86 is a byte-addressed machine.

      As for the relationship between the 8-bit and 16-bit groups, there is one, but it's not as close as you claim. There was no binary compatibility; 8086 machine code (opcodes etc) was a new design. 8086 was designed to be (very) loosely compatible at the assembly source code level. It wasn't even perfectly compatible at that level, just designed such that you could run a mechanical translator program on your 8008/8080/8085 source and it would spit out valid 8086 assembly, which you then might have to tweak a bit to get a working program. Also, this was more a convenience feature than something you'd want to rely on: the translated code would use the 8086 as if it were only an 8-bit CPU, so it was seldom anything like optimal.

      (Now, you want an example of how legacy does actually show up in x86? Look at the assembly-visible register names. The 8086 has a name for each 8-bit segment of its 16-bit registers, and the lower halves are the same as 8008/8080/8085 register names.)

    52. Re:Assembly == SLOW ; JAVA == FAST! by Teancum · · Score: 2

      That is a terrible example. Besides, if you want to do that in something like Visual BASIC it would be more like:

      MsgBox("Hello, World!")

      or something similar. Like I said, it would need to be seriously updated if you are going to be using current compilers. Indeed most versions of BASIC that I've seen that aren't historic compilers, hence have also been optimized to be running on the current generation of computers, don't even use the PRINT command.

      As I said, it would need some substantial tweaking if you are using the current generation of compilers. If you are using compilers written that targeted the machines of 30 years ago, yes that might still work (again putting the computer into a historic backward compatible mode too). Then again, the argument in the GP post would also be rendered invalid because the compiler would be targeting that same kind of CPU architecture that he was criticizing the hand generated assembly was targeting.

      As I said elsewhere in this general thread about MenuetOS, compilers and assemblers which targeted the 4004 CPU still work at the opcode level with the current generation of Intel (and compatible) chips as well as several other offshoots. That is hardly optimized for the current generation of CPUs though.

    53. Re:Assembly == SLOW ; JAVA == FAST! by Teancum · · Score: 1

      The old *nix "xv" image viewer still works if it's a static binary from 20 years ago. An ex-IBM guy I know mentioned some even older MSDOS game called "Alley Cat" that works on 32bit win7 (not sure about Win8).

      MS-DOS games are run under a virtual environment that tries to mimic DOS and is what I call putting the computer into an historic mode of some sort. It is a "walled garden" where that software is not really running on the native hardware, and MS-DOS API calls as well as "standard" (as much as existed at the time) practices for I/O are intercepted and routed through the Windows drivers instead in a software sleight of hand. Yes, it works, but that software does not run natively within Windows 7. That virtual environment of course has limitations.

      Furthermore, you can simply use VMware or something similar to create a virtual environment for most computers. I've seen Atari 2600 games (the original console made by Atari in the 1970's) run in Windows and even USB versions of the original game controllers if you want to go for authenticity.... and it even slows down the CPU cycles so the games play at "normal speed" of 1 MhZ CPU clock rate that they were designed for. I've also seen a VAX and PDP-11 emulator running on a PC, not that software written for those computers would even remotely be considered targeted for modern CPUs.

      I stand by what I wrote above. Source code written for computers of 20 years ago will not work with the current generation of compilers without some significant tweaking and updating of the code. It won't be impossible and the core algorithms might even be worth hanging onto, but there still will be some major differences (likely with the I/O if anything). It will also look incredibly dated even if you get it to run.

    54. Re:Assembly == SLOW ; JAVA == FAST! by Phoghat · · Score: 1

      Where are my goddam moderator points when I could really use them

      --
      Think of how stupid the average person is, and realize half of them are stupider than that.
    55. Re:Assembly == SLOW ; JAVA == FAST! by Mr+Z · · Score: 1

      I'm not sure why you think x86 is at all opcode compatible with the 4004. It's not even opcode compatible with the 8085. (You could translate 8085 code to 8086 with a special translator, but it wasn't guaranteed to be perfect.) The 4004 had a very weird instruction set, actually. Probably had something to do with the fact that you had to manually manage the memory bus and chip selects from the CPU, as opposed to more generic memory busses found on, well, just about anything outside the microcontroller world that talks to a JEDEC memory.

      Otherwise, most of the CPU complexity that currently shows up is due to the fact that the CPU speed far outstrips the memory bus speed, thus all of the concern about "local" memory caches and pipelined instruction ordering. If you could create a much faster memory bus, CPU designs could be simplified considerably from a software developer POV.

      This is the infamous memory wall, and lets face it, no processor vendor has figured out how to bypass physics and "just make memory faster." The problem was identified as far back in the 1940s, long before Intel even existed or Shockley's team at Bell Labs had invented their transistor. Consider this quote from Von Neumann himself:

      Ideally one would desire an indefinitely large memory capacity such that any particular ⦠word would be immediately available. ⦠We are ⦠forced to recognize the possibility of constructing a hierarchy of memories, each of which has greater capacity than the preceding but which is less quickly accessible.

      A. W. Burks, H. H. Goldstine, and J. von Neumann
      Preliminary Discussion of the Logical Design of an Electronic Computing Instrument (1946)

      But hey, I'm sure you've got some ideas. Why not get some VC money and make the next processor that will beat them all?

    56. Re:Assembly == SLOW ; JAVA == FAST! by Mr+Z · · Score: 1

      Ok, maybe not 20 years old, but 17 years old. Software I wrote in 1996 is still used today to verify chips built in the team I'm in at work. And that code compiles just fine. I haven't developed actively on it in about 14 years. No substantial tweaks to keep it current, either. I don't think it will compile as a 64-bit executable, but given that even Firefox is available as a 32-bit executable by default tells me that that's not a "historical" mode.

      I was speaking with a team at work. They're talking about finally replacing some 30+ year old code in their code base with more modular, modern code. Sure, the whole package around it has continued to evolve, but some pieces date back to the first Reagan Administration. High level languages made that sort of continuity possible.

      Now granted, the team whose code I'm referring to is a compiler team. Maybe, just maybe, they put more faith in compiled high level languages than your average programmer. ;-) But, their work on high level and low level optimization has paid off again and again. We have a kick ass compiler, and I say that as a hard-core assembly programmer whose job was to set the bar them. (I don't expect a compiler to beat me on assembly code I spent a month on. But, I expect a programmer using C/C++ with intrinsics and directives to get to 95% faster than I could in hand-coded assembly. That last 5% is what we call "diminishing returns," folks.)

    57. Re:Assembly == SLOW ; JAVA == FAST! by Mr+Z · · Score: 1

      Your argument only makes sense if you fix the target platform, compiler and compiler options for the comparison. In fact, it's trivially provably correct: If the compiler beats my assembly code, I can simply replace my own assembly code with the assembly code the compiler generated and force a tie.

      However, that misses the point: I can write the fastest possible assembly for a given platform, but it might not be the fastest way to do something on a different (but compatible) platform. But the C code, without modification, could potentially beat my unmodified assembly code when compiled for that other platform. The compiler has the flexibility to tune its output for the target, while my assembly code is fixed for one target. And if you include platforms with a different underlying assembly language, the C code wins by default because my assembly code doesn't even run.

    58. Re:Assembly == SLOW ; JAVA == FAST! by Mr+Z · · Score: 1

      And probably the bigger point: The compiler will apply its smarts to the entire program. You're likely to not give a crap outside the few most important pieces. When you look at code quality across the entire application, who do you think will win?

    59. Re:Assembly == SLOW ; JAVA == FAST! by flargleblarg · · Score: 1

      That is a terrible example.

      It was meant tongue-in-cheeck.

    60. Re:Assembly == SLOW ; JAVA == FAST! by flargleblarg · · Score: 1

      s/cheeck/cheek/ Too much coffee tonight; forgot how to English properly.

    61. Re:Assembly == SLOW ; JAVA == FAST! by mister_handy · · Score: 1

      Yo dawg, I heard you liked Java...

    62. Re:Assembly == SLOW ; JAVA == FAST! by RockDoctor · · Score: 1

      Yeah, outside a few rather narrow cases, modern CPUs have just gotten too complicated to write efficient assembly for.

      For general purpose CPUs, that may be true. For more specialised devices (possibly GPUs, other application-specific processors such as DSPs ... and lots of other cases), then the reduced complexity of the instruction sets may well reverse the equation.

      --
      Birds are not dinosaur descendants;birds are dinosaurs, for all useful meanings of "birds", "are" and "dinosaurs"
    63. Re:Assembly == SLOW ; JAVA == FAST! by Amiralul · · Score: 1

      Knock-knock.
      Who's there?
      (pause for 5 seconds)
      Java!

    64. Re:Assembly == SLOW ; JAVA == FAST! by gbjbaanb · · Score: 1

      not really possible - the point of such high level languages is that the levels of abstraction involved in such things are quite large. So to reduce this to something that can be turned into efficient assembly requires the abstractions be simplified, which effectively means turning the high level language into a lower level one.

      Its just another of life's compromises.

    65. Re:Assembly == SLOW ; JAVA == FAST! by TangoMargarine · · Score: 1

      Well, it all gets translated down to machine code in the end, so obviously it's feasible. I never said it would be easy...

      --
      Unity? Screw that: XFCE. Slashdot Beta? Screw that: SoylentNews. Australis? Screw that: Pale Moon. UX developers DIAF
    66. Re:Assembly == SLOW ; JAVA == FAST! by Anonymous Coward · · Score: 0

      You jest, but wikipedia says it will boot in five seconds on a 90 mHz Pentium FROM A FLOPPY. Is that fast enough for you, javaboy?

      Of course finding a machine with a FLOPPY will take MUCH MUCH Longer.

    67. Re:Assembly == SLOW ; JAVA == FAST! by Unknown+Lamer · · Score: 1

      You've never used Common Lisp, eh? One of the great parts of the language is that you can just grab 20 or 30 year old code off of the Net and have it Just Work (tm).

      Of course, that might be because Common Lisp was 40 years ahead of its time.

      --

      HAL 7000, fewer features than the HAL 9000, but just as homicidal!
    68. Re:Assembly == SLOW ; JAVA == FAST! by Anonymous Coward · · Score: 0

      > Of course, that might be because Common Lisp was 40 years ahead of its time.

      Or, it might be because Common Lisp is so arcane, nobody has successfully created any variants!

  2. Gotta ask ! by amalcolm · · Score: 1

    Why?

    --
    Time for bed, said Zebedee - boing
    1. Re:Gotta ask ! by Anonymous Coward · · Score: 0, Insightful

      Because this fool thinks he can write more efficient assembly code than decades-of-practice optimizing compilers can generate.

    2. Re:Gotta ask ! by elfprince13 · · Score: 5, Insightful

      Because
      * It's fun?
      * They can?
      * They want to?
      * To learn something?


      I'm sure there are a few more. Does anyone have not-boring questions?

    3. Re:Gotta ask ! by NotFamous · · Score: 0

      Gotta answer: 'Cause.

      --
      Some settling may occur during posting.
    4. Re:Gotta ask ! by Anonymous Coward · · Score: 0

      Boredom?

    5. Re:Gotta ask ! by Anonymous Coward · · Score: 0

      Everyone needs a hobby.

      There's no other explanation.

    6. Re:Gotta ask ! by jimbodude · · Score: 1

      Why not?! The fact that it fits on a diskette means that a lot of bloat must have been cut out, leaving functionality. This means faster (and potentially better) software that uses the system's resources more efficiently.

    7. Re:Gotta ask ! by pmontra · · Score: 1

      To learn new things? Learning is stuff that matters.

    8. Re:Gotta ask ! by SJHillman · · Score: 0

      Why not?

      If we asked Why? about every project out there, software and otherwise, we'd be stuck with a whole lot of unanswered questions.

    9. Re:Gotta ask ! by poet · · Score: 1

      Outside of the hobby aspect of it, there could be a real future in lower end devices.

      Consider the resources that Android takes up. If you have something that is this small, efficient and presumably stable and you need to build out a lot of very small factor devices (phones, ereaders, tablets, medical equipment) something like this would be a very good thing.

      --
      Get your PostgreSQL here: http://www.commandprompt.com/
    10. Re:Gotta ask ! by Anonymous Coward · · Score: 2, Insightful

      compilers can never optimise better than a human, if you disagree you havent witnessed the demoscene.

    11. Re:Gotta ask ! by SJHillman · · Score: 1

      And he's probably right, assuming he's a reasonably skilled coder.

      It's the difference between a factory-made mass-produced "good enough for most uses" product and an artisan-made hand-crafted "best of the best" product.

    12. Re:Gotta ask ! by SJHillman · · Score: 2

      There's already a pretty big market of embedded devices running Linux or FreeDOS... and who's to say that another competitor couldn't offer yet another, better option?

    13. Re:Gotta ask ! by aitikin · · Score: 5, Insightful

      Why would someone want to do a rewrite of Minix 20 some odd years ago?

      Hello everybody out there using minix -

      I’m doing a (free) operating system (just a hobby, won’t be big and professional like gnu) for 386(486) AT clones. This has been brewing since april, and is starting to get ready. I’d like any feedback on things people like/dislike in minix, as my OS resembles it somewhat (same physical layout of the file-system (due to practical reasons) among other things).

      I’ve currently ported bash(1.08) and gcc(1.40), and things seem to work. This implies that I’ll get something practical within a few months, and I’d like to know what features most people would want. Any suggestions are welcome, but I won’t promise I’ll implement them

      --
      "Don't meddle in the affairs of a patent dragon, for thou art tasty and good with ketchup." ~ohcrapitssteve
    14. Re:Gotta ask ! by Horshu · · Score: 1

      Read Michael Abrash.

    15. Re:Gotta ask ! by Anonymous Coward · · Score: 0

      No, maybe it's just fun for him. What the hell is wrong with that?

    16. Re:Gotta ask ! by amalcolm · · Score: 1

      Don't get me wrong ... I think it's amazing that someone had the stamina to take the project so far. I do wonder if you really need to go THAT far to prove a point or learn sufficient about hand coding in assembler. Each to his own, I guess

      --
      Time for bed, said Zebedee - boing
    17. Re:Gotta ask ! by plopez · · Score: 4, Funny

      Masochism?

      --
      putting the 'B' in LGBTQ+
    18. Re:Gotta ask ! by Anonymous Coward · · Score: 1

      Because

      * It's fun?

      * They can?

      * They want to?

      * To learn something?

      Sounds like a rationale for doing drugs. Or having sex. Not sure which of those two /.ers get to experience.

    19. Re:Gotta ask ! by Bill_the_Engineer · · Score: 1

      Why not? Assembly programming is a skill and for some an art. It's like asking a sculptor why he does what he does. It's not like we need to justify any project.

      --
      These comments are my own and do not necessarily reflect the views or opinions of my employer or colleagues...
    20. Re:Gotta ask ! by SuricouRaven · · Score: 5, Insightful

      Compilers can never optimize better than the *best* humans, operating without time constraints. Very few programmers have that level of skill, or the time to spend on the task. That's why optimizing compilers were invented.

    21. Re:Gotta ask ! by Anonymous Coward · · Score: 1

      Oh, come on. CPU and GPU speeds have for years already been such that demos just aren't impressive to spectators anymore. They may be artistic but nobody looks at a PC demo anymore and wonders how the fuck they managed to squeeze so much out of the hardware when a fucking visualization plugin for a media player can look equally sophisticated when it uses physics acceleration and just acts as cool shit on the screen when you happen to glance that way whilst listening to music and doing something else.

    22. Re:Gotta ask ! by roc97007 · · Score: 5, Insightful

      *Because someone should remember how to do this?

      --
      Oliver's law of assumed responsibility: If you're seen fixing it, you will be blamed for breaking it.
    23. Re:Gotta ask ! by ShieldW0lf · · Score: 1

      So they're easier to carry, there is no good reason and because you have no choice in the matter, respectively.

      --
      -1 Uncomfortable Truth
    24. Re:Gotta ask ! by Anonymous Coward · · Score: 0

      Why? WHY? In a world where http://en.wikipedia.org/wiki/AAlib, ttyquake, http://www.jfedor.org/aaquake2/, and aalib output for mplayer (http://www.mplayerhq.hu/DOCS/HTML/en/aalib.html) exist, you question the existence of a mere operating system?

    25. Re:Gotta ask ! by fisted · · Score: 2
      because

      cc -x c - <<'X' && ls -l a.out
      #include <stdio.h>

      int
      main(void)
      {
      printf("hello world\n");
      }
      X

      -rwxr-xr-x 1 fisted users 7318 Nov 15 17:25 a.out*

    26. Re:Gotta ask ! by Anonymous Coward · · Score: 1

      No it isn't. That point of view was valid in the 80s. It's complete nonsense now. Unless assembly language magically makes your caches bigger or your memory faster it matters not one iota whether you spend 3 or 4 cycles performing some calculation. Fast code now means cache-aware code, and you ain't gonna be writing your best cache-aware code if you're also pissing around doing register colouring and instruction scheduling "perfectly" instead of 99% perfectly like a compiler does, so you can spend 199 cycles waiting for memory instead of 198.

    27. Re:Gotta ask ! by arfonrg · · Score: 1

      You've never seen my Assembly... You would take that statement back!

      --
      Your thin skin doesn't make me a troll
    28. Re:Gotta ask ! by jythie · · Score: 5, Interesting

      I would argue that as CPUs get more complex and programs get larger, we have probably passed the point where even the best humans can optimize better in general cases. Short contained tasks sure, but even with infinite time humans have limits on how much they can keep track of in their heads. As the tasks get bigger and bigger one relies more and more on notes and whiteboards and other tools, at which point one is basically just implementing an optimized compiler from scratch and calling it 'by hand'.

    29. Re:Gotta ask ! by fisted · · Score: 2

      It's written in portable assembly, right?

    30. Re:Gotta ask ! by clarkkent09 · · Score: 1

      They better get it perfect the first time cause this thing will be impossible to maintain for anybody else and possibly for the original developers too. Forget it, there is no practical use for it, it's just a hobby (not that that's a bad thing).

      --
      Negative moral value of force outweighs the positive value of good intentions.
    31. Re:Gotta ask ! by Java+Pimp · · Score: 5, Funny

      Neither. That's why we write things in assembly.

      --
      Ascalante: Your bride is over 3,000 years old.
      Kull: She told me she was 19!
    32. Re:Gotta ask ! by Anonymous Coward · · Score: 0

      There's such a thing as premature optimisation ...

    33. Re: Gotta ask ! by stokessd · · Score: 1

      And security, who is going to write malware for that? Iran needs this controlling the centrifuges.

    34. Re:Gotta ask ! by Anonymous Coward · · Score: 0

      Why not?!

      The fact that it fits on a diskette means that a lot of bloat must have been cut out, leaving functionality. This means faster (and potentially better) software that uses the system's resources more efficiently.

      Do you mean that the system can wait for user input more efficiently? Since it's not like there's an abundance of resource-hungry applications for this OS that would benefit from it. And unless he develops a compiler which can compile apps written for a more popular platform as-is, there never will be. In theory you have a point but in practice it's like saying that cleaning railroad tracks by hand makes trains more energy-efficient. True but the more cost-efficient solution to get more performance is to pay for better hardware and not the man months the work takes.

    35. Re:Gotta ask ! by Anonymous Coward · · Score: 0

      The question is whether these small, cheap devices that presumably are not powerful enough to use something like OpenWRT would actually use a x86-compatible chip as opposed to, say, PIC or AVR.

    36. Re:Gotta ask ! by ebh · · Score: 1

      SWEET16

    37. Re:Gotta ask ! by tlhIngan · · Score: 1

      Consider the resources that Android takes up. If you have something that is this small, efficient and presumably stable and you need to build out a lot of very small factor devices (phones, ereaders, tablets, medical equipment) something like this would be a very good thing.

      The issue is though that powerful CPUs are getting really cheap. Devices that don't need such power are finding themselves embedded GHz-class processors because that's the lowest end available that has sufficient power.

      There's a gap between the 8-bit microcontrollers and the GHz-class processors these days, and it's widening - mostly because the cheapest SoCs are sporting high end cores and interfacing with really cheap RAM. Cheap enough that the mid-range ARM9s and ARM11 cores didn't save you a whole lot of money, and pretty much got squeezed out of the market.

      Really. Check out the processors in the eReaders these days - they're easily hitting 800-1GHz in speed just to drive the e-ink display because that's the most cost-effective SoC. And they're swimming in 256MB+ in RAM, and really, the entire functionality takes just a tiny fraction of available resources.

      Ditto with TVs - when the video processing SoC sports quad cores and all that, tossing in "smart tv" features is trivial because the power is there and there are few more moderate video processors.

    38. Re:Gotta ask ! by Anonymous Coward · · Score: 0

      I'm a Sadist, you insensitive clod! A masochist could never accomplish anything worthwhile in assembly language.

    39. Re:Gotta ask ! by elfprince13 · · Score: 1

      Yeah, that too.

    40. Re:Gotta ask ! by Anonymous Coward · · Score: 1

      Big O motherfucker do you speak it!?

    41. Re:Gotta ask ! by RabidReindeer · · Score: 4, Interesting

      Back when I first started, compilers were pretty stupid and basically did a 1-to-1 translation of source code to sequences of assembly language. It didn't take much to do better simply coding assembler by hand.

      Somewhere about the mid 1980s that stopped being true. The IBM mainframe Pascal/VS compiler generated heavily-optimized code. It was sufficiently clever in its use of machine resources that it was on par with hand optimization.

      The clincher, however, was that it could do this job in seconds, whereas hand-coding would take hours. And if you made significant changes to the algorithms you were coding, it would re-optimize each time. It would have been a total rewrite to get code that tight by hand. And even though we didn't have the insane time constraints that modern-day projects typically have, we didn't have enough time to make it worth doing that even to save expensive mainframe CPU cycles.

    42. Re:Gotta ask ! by Anonymous Coward · · Score: 0

      Yes, if this were 1993 and there was no such thing as a GPU, this would use the system's resources marginally more efficiently.

      As it is with this and most other niche operating systems, the major compute resource is completely idle while the CPU spends a huge proportion of its time performing dumb-as-bricks blit operations just to get a GUI to display.

      But I'm sure it has the fastest idle loop in history.

    43. Re:Gotta ask ! by minstrelmike · · Score: 1

      Like with entropy, the savings just get moved.
      Now you've got to spend days trying to find a disk drive.

      The researchers plan to add networking capability within the next 13 years, once they decide it's not just a temporary fad.

    44. Re: Gotta ask ! by Anonymous Coward · · Score: 0

      Some of us write code for processors with 512 bytes of program memory and 32 bytes of data memory. Self contained complete processors that cost a few cents each in volume.

      No we don't code it in c++.

    45. Re:Gotta ask ! by Anonymous Coward · · Score: 0

      or restoring old cars, or hand crafted wood or metal work or really basically any hobby.

    46. Re:Gotta ask ! by dfghjk · · Score: 1

      That is NOT why optimizing compilers were invented.

    47. Re:Gotta ask ! by segmond · · Score: 2

      Yes they can. Try making use of a CPU with 8 cores and writing your threaded application in assembly. Someone with a compiler in a higher level language will kick your ass back and forth. The simpler the arguement the truth your argument holds, but as CPUs get more complex. Nope! Look at how difficult game programmers found it to program for the PS3 Cell architecture. Try having them write an entire game in assembly. Ha!

      --
      ------ Curiosity killed the cat. {satisfaction brought it back | it didn't die ignorant | lack of it is killing mankind
    48. Re:Gotta ask ! by Peter+Simpson · · Score: 5, Funny

      Because * It's fun? * They can? * They want to? * To learn something? I'm sure there are a few more. Does anyone have not-boring questions?

      * he's following in the great Finnish tradition of writing your own OS... :-)

    49. Re:Gotta ask ! by umghhh · · Score: 1

      there is a point at which a thing is small enough to cause problem with transport as you have to attach it tosomething so that the flow of air does not bring the fucker away.

    50. Re:Gotta ask ! by Ngarrang · · Score: 1

      Why not? We have Windows Notepad, so why the need for anything other text editor? We have Microsoft Word, so why code ABIword? Why not create an entirely new OS in assembly? Because it can be done. We climb mountains for no better reason that because it is there.

      --
      Bearded Dragon
    51. Re:Gotta ask ! by war4peace · · Score: 2

      I have to agree on that. While I always thought ASM is great, its greatness isn't universal. At any rate, *this* language will be better than *that* language for *this* specific task/project.

      e.g. industrial robot programming, where you need to obtain maximum of speed and precision fit within minimum output size (e.g. 4 KB of storage, be it ROM, EEPROM, whatever) - that's where ASM shines. On the other hand, if you want to build an operating system, ASM will be better in less than 10% of the entirety of the OS; everything else is more efficient to build in a higher level programming language. That's because you have to consider time spent programming the stuff versus overall savings (time saved).

      --
      ...gis sdrawkcab (usually not responding to ACs; don't bother posting as AC)
    52. Re:Gotta ask ! by VortexCortex · · Score: 5, Interesting

      Why?

      Well, I'm not well versed with the MenuetOS, but I've written a few toy OSs; Particular of interest to me is 16bit x86 which retains memory segmentation, and via other modes of operation (such as Unreal Mode enabled via addressing line 20) one can escape the 640K and/or 1MB limit whilst retaining other hardware features. Why go low level? Because programming paradigms are platform dependent. C is a product of its Von Neumann environment, and the dialog back and forth between hardware and software designers over the years has shaped our current methodology and hardware feature-set -- sometimes for the worse, IMO. E.g.: When we sacrificed a whole register and its memory segmentation capabilities to the RAM gods we made position independent code far more inefficient, and things like coroutines, stack smashing protections, multi-dimensional V-Tables for stateful OOP (eg: methods that change functionality depending on an object's "state" field), separate stacks for code pointers and parameter data, heap code pointer isolation, etc. more difficult (or near impossible) to accomplish. Instead of ASM I use a low level compilable and interpretable bytecode language for writing my OSs, and have multiple functional C compilers implemented atop the byte-code language in order to utilize existing hardware drivers -- However, I frequently dive into the machine specific ASM in order to implement and explore new features.

      I started doing hobby OS work for fun, but after reading Ken Thompson's On Trusting Trust ACM acceptance "presentation" I decided that it would be a worthwhile project to create and maintain a few machines isolated from the rest of the world which are bootstrapped and programmed entirely by me. I now use them to write my memoirs and for teaching children how to code and build custom hardware and robotics -- The parallel port is very simple to utilize without a massive OS like GNU/Linux in the way...

      The better question is why would anyone attempt to implement a POSIX OS today? We have working implementations. That feature set is proven. If we want to make advancements in OSs and hardware architectures we'll have to try doing things in different ways. Some of my OSs are cross platform; In one all programs are compiled down to the bytecode form by the VM ASM, or C compilers. The OS itself translates byte-code into machine code ON INSTALLATION, and gives the option to instead interpret a program if its untrusted (or in development, or self modifying) to contain it in an actual sandbox. On 32 bit x86 with more than one bit worth of execution privileges I'm able to enforce at the hardware level something akin to kernel mode at the application level for applications to isolate themselves from possibly untrusted plugins, and allow transparent lazy linking with emulated bytecode modules and optional JIT translation.

      For me the aim isn't to replace GNU/Linux or any mainstream OS. The aim is to explore unexplored problem spaces with the hope that any useful techniques may find their way into mainstream usage. Consider Google's NACL and LLVM. I'm not saying experimental OS projects which pre-date them are responsible for their current capability to compile C into cross platform bytecode and compile it into machine code, but us hobby OS folks HAVE been doing just that for longer than their projects have existed. Our experimental niche OS endeavours occasionally blaze the trail towards new features in mainstream hardware and software. Eg: I'm hoping for code pointer isolation and buffer overrun prevention via dual stack architecture, and for the ARM folks to give us more that 1 bit of privilege level so that secure designs other than Monolithic Kernels can be implemented...

      To the other commenter above who thinks "decades-of-practice" will allow optimizing compilers to utilize hardware features that are forbidden or don't exist: Ugh, no. I have decades of experience writing ASM and can write or generate much smaller & more efficient position inde

    53. Re:Gotta ask ! by Anonymous Coward · · Score: 0

      Sadism too?

    54. Re: Gotta ask ! by Immerman · · Score: 1

      >No we don't code it in c++.

      Damn straight, something that basic requires... BASIC. (sorry flash-backs to dabbling with BASIC-stamp based robotics in college)

      --
      --- Most topics have many sides worth arguing, allow me to take one opposite you.
    55. Re:Gotta ask ! by Anonymous Coward · · Score: 0

      You mean C code?

    56. Re:Gotta ask ! by Anonymous Coward · · Score: 1

      Nope. Former PS3 SPU assembly programmer here. It takes skills and an attention detail. I've written great gouts SPU assembly. The SPU is a crappy architecture for sure, but I've done 5+ SPU coordinated assembly code.

    57. Re:Gotta ask ! by Megol · · Score: 0

      Bullshit. Thinking that caches are the only thing that matters just indicates that you are clueless when it comes to optimization (and most likely much more too). But also when it comes to caching assembly language programmers tend to generate tighter code leading to less instruction cache misses.

      Most instruction scheduling is done by the processor, it's a "new" thing called OoO or out of order execution. The rest is trivial.

      Register coloring is a funny way to describe register allocation, normally a coloring algorithm isn't used by assembly language programmers as it just isn't useful. Register allocation is needed yes however a linear scan algorithm combined with (learned) heuristics is probably closer to what real programmers use. The performance difference is in the noise anyway. BTW standard register coloring isn't optimal for x86.

    58. Re:Gotta ask ! by jythie · · Score: 1

      *nod* and often when one is developing such industrial applications, the CPUs themselves are simpler and more predictable in design. This is esp the case when you are working on stuff that actually needs to count cycles for real time behaviors.

    59. Re:Gotta ask ! by dargaud · · Score: 1

      xplain to me how a human can optimize by hand a 70-stage execution pipeline with branch predictions ? Impossible. On the other hand the compiler has the specs of the processor and knows how many nops to place between instructions.

      --
      Non-Linux Penguins ?
    60. Re:Gotta ask ! by EETech1 · · Score: 1

      Aren't they all:
      JMP PC-1
      ?

    61. Re:Gotta ask ! by Anonymous Coward · · Score: 0

      I got it on good authority that some of us occasionally do both.

    62. Re:Gotta ask ! by Anonymous Coward · · Score: 0

      He said learning...

    63. Re:Gotta ask ! by Megol · · Score: 0

      "Xplain" to us all which processor have a 70 stage execution pipeline and requires nops? I sure don't know of any.

    64. Re:Gotta ask ! by Anonymous Coward · · Score: 0

      Because they have spent 13 years on it. There was little value brought by extra efficiency of this time consuming process 10 years ago, today there is none (other than the personal enjoyment they get from doing it). Sure it is compact, but compared to a modern OS, it does virtually nothing.

    65. Re:Gotta ask ! by Anonymous Coward · · Score: 0

      You just attach it to other useful things, so a decrease in size enables you to increase the utility.

    66. Re:Gotta ask ! by varmfskii · · Score: 1

      Statically link that and see how much worse it becomes.

    67. Re:Gotta ask ! by Anonymous Coward · · Score: 0

      Compilers can never optimize better than the *best* humans, operating without time constraints.

      On one hand a retard could beat a good compiler by endless trial and error, on the other hand a compiler could be written to do the same running in an endless compile/test loop.

    68. Re:Gotta ask ! by unixisc · · Score: 1

      Another question I have is 'which'? Would the entire x86 instruction set be supported? For the x64, which ones would be? After all, Intel adds a few instructions depending on the processor generation, so for the closed source x64, which one would it be?

    69. Re:Gotta ask ! by Crimey+McBiggles · · Score: 1

      Oh snap! (for the uninformed, this is a reference to how Linux came to be).

      --
      Crimey
    70. Re:Gotta ask ! by fisted · · Score: 1

      *mutters something about the C Abstract Machine*

    71. Re:Gotta ask ! by TangoMargarine · · Score: 1

      because you have no choice in the matter

      Some philosophy gives suicide as the other side of the choice.

      http://en.wikipedia.org/wiki/Absurdism

      --
      Unity? Screw that: XFCE. Slashdot Beta? Screw that: SoylentNews. Australis? Screw that: Pale Moon. UX developers DIAF
    72. Re:Gotta ask ! by maxwell+demon · · Score: 1

      Compilers can never optimize better than the *best* humans, operating without time constraints.

      Well, at least the "working without time constraints" part seems to apply here. Although I guess if you were to tolerate compile times measured in days per source file, compilers could also do much better optimizations ...

      --
      The Tao of math: The numbers you can count are not the real numbers.
    73. Re:Gotta ask ! by Anonymous Coward · · Score: 0

      Michael Abrash is brilliant, but a lot of what he wrote about optimization is dated now. For one thing, you don't have exclusive control of the machine. For another, the CPU speeds have increased so much that the difference is often negligible. An optimization that might have cut execution time from 5 seconds to 1 second in 1995 may now be a difference of a millisecond vs. half a millisecond.

      Still, he has some timeless wisdom to offer.

      1) the best optimizer is between your ears - find a better algorithm before hand-coding assembly.
      2) know where optimization is most effective and optimize the bottlenecks out
      3) know when to stop - if further optimization would be pointless (i.e. unnoticeable to the user) then don't bother

    74. Re:Gotta ask ! by dbIII · · Score: 1

      Try making use of a CPU with 8 cores and writing your threaded application in assembly

      No point bringing that up, it seems like 95% of all programmers can't write a threaded application in anything (including ones young enough to have grown up with a dual core handheld Nintento game). Multiple CPUs are ubiquitous but so many progammers are acting like it's still 1992.

    75. Re:Gotta ask ! by dbIII · · Score: 1

      Really. Check out the processors in the eReaders these days

      If they are doing anything with PDF they need all that grunt. The "entire functionality" takes everything it's got and still shows the user a bit of lag every now and again. For plain text and simple epub the first generation of ereaders is still plenty.

    76. Re:Gotta ask ! by c0lo · · Score: 1

      The true masochist codes in Malbolge.

      --
      Questions raise, answers kill. Raise questions to stay alive.
    77. Re:Gotta ask ! by Anonymous Coward · · Score: 0

      Polly: "What't the point in being alive?"
      Basil: "Beats me... stuck with it, I guess."

    78. Re:Gotta ask ! by Anonymous Coward · · Score: 0

      I think you've got that backwards... a lot of functionality was cut out, leaving room for an idiot who refuses to acknowledge that the compilers are way better than he is. He needs to have a good cry and get over it.

    79. Re:Gotta ask ! by Anonymous Coward · · Score: 0

      Yet another contradiction from the religious fuckers!
      "God gave you free will!"
      "You will spend eternity in heaven or hell!"
      Where's the choice to cease existing? Obviously, either there is no free will, or there is no "life after death". Life before death is much cooler, anyway.

    80. Re:Gotta ask ! by Anonymous Coward · · Score: 0

      Probably the Shitanium. All dose NOPs! All dose hamboigahs!

    81. Re:Gotta ask ! by ShieldW0lf · · Score: 1

      because you have no choice in the matter

      Some philosophy gives suicide as the other side of the choice.

      http://en.wikipedia.org/wiki/Absurdism

      "A live body and a dead body contain the same number of particles. Structurally, there's no discernible difference. Life and death are unquantifiable abstracts. Why should I be concerned?"

      --
      -1 Uncomfortable Truth
    82. Re:Gotta ask ! by Anonymous Coward · · Score: 0

      qubes-os.org/

    83. Re:Gotta ask ! by Anonymous Coward · · Score: 0

      Depends on how you define efficient. I don't know a single assembler geek that can't shave code to be smaller and faster than compiled.

      Still, thirteen years is pretty inefficient. Bordering on self-abuse. In both senses of that phrase.

    84. Re:Gotta ask ! by Man+Eating+Duck · · Score: 1

      Compilers can never optimize better than the *best* humans, operating without time constraints. Very few programmers have that level of skill, or the time to spend on the task. That's why optimizing compilers were invented.

      And even most PC demos today are coded in high-level languages like C++. The guys writing space-constrained demos (64K and less) will turn to assembly. But on the PC you generally can't beat the compiler performance-wise, and in the few cases where you might have squeezed out a couple of percents better performance your time will be better spent polishing your effects.

      Source: I discussed this with one of the coders in Andromeda, who has experience both from the Amiga and PC scene.

      --
      Are you a grammar Nazi? I'm trying to improve my English; please correct my errors! :)
  3. Technically everything is written in assembly by Anonymous Coward · · Score: 0

    We just trust that compilers know what they're doing.

    1. Re:Technically everything is written in assembly by Anonymous Coward · · Score: 0

      By that technicality, it's actually written in machine code, not assembly

    2. Re:Technically everything is written in assembly by Anonymous Coward · · Score: 0

      Naah, on modern CPUs it's written in Microcode...

    3. Re:Technically everything is written in assembly by Anonymous Coward · · Score: 0

      Technically everything is written in assembly

      It's been decades since I've seen a compiler which went through an assembly language stage.

      By that technicality, it's actually written in machine code, not assembly

      Correct.

      Naah, on modern CPUs it's written in Microcode...

      Also correct.

      In the end it's all NAND gates.

    4. Re:Technically everything is written in assembly by Anonymous Coward · · Score: 0

      It's been decades since I've seen a compiler which went through an assembly language stage.

      You haven't seen GCC in decades?
      > gcc -v tmp.c
      [snip]
      c:/devel/mingw-w64/bin/../libexec/gcc/x86_64-w64-mingw32/4.7.1/cc1.exe ... -o ...\Temp\ccQPcuzk.s
      [snip]
      c:/devel/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../../../../x86_64-w64-mingw32/bin/as.exe ... -o ...\Temp\ccE9vXJY.o ...\Temp\ccQPcuzk.s
      [snip]
      c:/devel/mingw-w64/bin/../libexec/gcc/x86_64-w64-mingw32/4.7.1/collect2.exe ...

    5. Re:Technically everything is written in assembly by maxwell+demon · · Score: 1

      In the end it's all NAND gates.

      Of course that's barely the end. NAND gates are made of transistors and resistors.
      But in the end, it's all nothing but quarks and electrons, bound together and moving in various combinations and patterns, interacting via strong force (gluons) and electromagnetic force (photons).

      --
      The Tao of math: The numbers you can count are not the real numbers.
    6. Re:Technically everything is written in assembly by Ford+Prefect · · Score: 1

      But in the end, it's all nothing but quarks and electrons, bound together and moving in various combinations and patterns, interacting via strong force (gluons) and electromagnetic force (photons).

      Actually, below that it's mostly Perl.

      --
      Tedious Bloggy Stuff - hooray?
    7. Re:Technically everything is written in assembly by jeremyp · · Score: 1

      I've read the whole thread and this is the first post off which I can legitimately hang an obligatory XKCD reference.

      --
      All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
  4. Finally a fast OS by Anonymous Coward · · Score: 1

    Now can I run Firefox on it to play online games while playing zeroconf-shared music?

  5. That's not the most important thing by Anonymous Coward · · Score: 5, Funny

    So before 1.0 we need to improve the existing code and make sure everything is working fine. ... The main thing for 1.0 is to have all application groups available

    Nah, main thing is to find a working floppy disk and drive.

    1. Re:That's not the most important thing by ihtoit · · Score: 1

      I have a (n opened) box of virgin Verbatims and two Dell USB floppy drives (not to mention a Mitubishi IDE LS-120 which also reads floppies!), somewhere around I've also got a still shrinkwrapped box of 20 Sony DSHD disks.

      --
      Political debates have me rolling my eyes so much I think I got optical whiplash. I should sue. - Foamy The Squirrel
    2. Re:That's not the most important thing by HoldmyCauls · · Score: 4, Informative

      Just tried it in Virtualbox, and it has made strides since I last tried it some years ago. Some notes:
      Select "Other/Unknown (64-bit)" in the Operating System type drop-down, unless you specifically download the 32-bit version.
      Add a floppy controller and add the image as a floppy disk attached to that. Delete the other controllers that are present by default, unless you have a specific reason not to (like listening to your outdated music on disc from within MenuetOS, or loading a WAD or PAK file for Doom/Quake).
      Does not work with my work MacBook's iSight camera (afaict).
      Boots in 5 seconds, and I'm thinking of ways to demonstrate it to students at the schools where I work.

      --
      Emacs: for people who just never know when to :q!
    3. Re:That's not the most important thing by drinkypoo · · Score: 1

      I keep an LS120 in my desktop PC just in case. Guess how many times I've used it.

      I did use the Sony USB floppy once. So I consider that two dollars well spent at a yard sale

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    4. Re:That's not the most important thing by roc97007 · · Score: 1

      Apparently my company still stocks floppy disks. There's still a bunch in the supply cupboard, even though you can search all the cubes on this floor and not find a single drive. Someone really needs to update the order inventory.

      --
      Oliver's law of assumed responsibility: If you're seen fixing it, you will be blamed for breaking it.
    5. Re:That's not the most important thing by Anonymous Coward · · Score: 0

      but does it come with reversi?

    6. Re:That's not the most important thing by medv4380 · · Score: 1

      I'm not even sure if my Motherboard will accept a Floppy drive, or do I have to go looking to see if anyone makes SATA floppy drives.

    7. Re:That's not the most important thing by ihtoit · · Score: 1

      got a pile of tape drives as well, they've come in useful (you'd be surprised at the number of people who have tapes but somewhere along the way they've "lost" the hardware...). One I wouldn't mind getting my stickies on is a PlusDeck MK.I - the IDE model, which had a high speed option (read/write a C60, both sides at once, in about 90 seconds!). I don't know why they dropped the high speed option for the II or record facility on the IIc... but for now, I'm making do with an ever dwindling supply of portable cassette decks as I burn through them ripping my mixtapes and conference audios (I got bloody millions of 'em!).

      --
      Political debates have me rolling my eyes so much I think I got optical whiplash. I should sue. - Foamy The Squirrel
    8. Re:That's not the most important thing by Immerman · · Score: 1

      Show some consideration!

      Sure they haven't been used in years, but do you have any idea how much paperwork has to be filed in order to throw out those perfectly good floppy discs?

      --
      --- Most topics have many sides worth arguing, allow me to take one opposite you.
    9. Re:That's not the most important thing by roc97007 · · Score: 1

      Yes. Probably the easiest solution would be for someone to steal them. Except that nobody wants them.

      --
      Oliver's law of assumed responsibility: If you're seen fixing it, you will be blamed for breaking it.
    10. Re:That's not the most important thing by dbIII · · Score: 1

      A USB one set me back a full $19 two months ago and I've got about twenty ordinary floppy drives on my workbench. Finding a new motherboard with the interface could be a bit tricky though. Software can throw up some challenges, in linux the floppy disk driver module doesn't load by default these days so last time I had to read a disk in for someone I ended up looking up how to do it (though it was utterly obvious in hindsight - the module name is "floppy").

  6. Cool! by elfprince13 · · Score: 1

    I've been watching this project for ages, and I'm excited to see it slowly maturing. Quite a bit of fun to play with if you have some time to kill.

    1. Re:Cool! by Lawrence_Bird · · Score: 2

      Likewise.. and it illustrates just how bloated "modern" OS have become. Then again, the generally accepted definition of "OS" seems to have changed to include things such as desktop and window managers.

    2. Re:Cool! by i+kan+reed · · Score: 3, Insightful

      People want their operating system to let them operate their computer. Conveniently. You can certainly still get command-line-only linux distros if you care, and you're the kind of technology specialist who might get utility out of that.

    3. Re:Cool! by SuricouRaven · · Score: 1

      And an ever-growing array of utility software. What OS is complete without a media player, web browser and Minesweeper?

    4. Re:Cool! by elfprince13 · · Score: 4, Insightful

      And most command-line-only Linux distros are still several orders of magnitude larger than Menuet, which actually has a graphical UI. ;)

    5. Re:Cool! by shaitand · · Score: 1

      Some of us remember the operating system being the software that operates the system, not the software that lets YOU operate the system. Back in the day of monolithic kernels being the norm the kernel WAS the OS. The shell (graphical or cli) was just an application that utilized the operating system.

      People have gotten so used to the idea of a computer being a general purpose machine they've forgotten that you could just run a kernel and application set that requires no human interaction software at all. For instance a cluster node that dynamically grabs it's parameters from the network on boot. Or a wrist watch, or an alarm clock, or a washing machine.

    6. Re:Cool! by Lawrence_Bird · · Score: 1

      Thank you for a better explanation of what I was alluding to.

    7. Re:Cool! by i+kan+reed · · Score: 1

      Without basic tools to do so, how are you going to get software on your Operating System? Could we automatically boot to floppy like an Apple ][? What do you even want?

    8. Re:Cool! by Anonymous Coward · · Score: 0

      Indeed, people have completely forgotten. Which is why we don't have HPC clusters, wristwatches, alarm clocks and washing machines anymore, and only ever see PCs....

      Point being, who is the "people" you speak of? Engineers know and use as appropriate.

      The rest of computer users didn't forget. They simply used to not use computers.

    9. Re:Cool! by shaitand · · Score: 1

      "Without basic tools to do so, how are you going to get software on your Operating System?"

      You'd likely build an image with a more general purpose system that had tools on it then flash or network boot. The question would make more sense if I was building something rather than pointing out that the term "operating system" used to refer to a basic system that managed resources to simply programming (the operating system) rather than the more modern idea that an "operating system" is the software set that allows a human to operate the computer.

      It's even more confusing because operating a computer back in the day was often synonymous with programming one.

    10. Re:Cool! by shaitand · · Score: 1

      "Point being, who is the "people" you speak of? Engineers know and use as appropriate."

      Fair enough and a computer engineering course on operating system design is going to teach design principles for a kernel. But the general population, even the general technical population, certainly isn't using the word this way. It's at the core of the whole Linux vs GNU/Linux debate.

      As hardware becomes more and more powerful even wristwatches, alarm clocks, and washing machines are often running cli interfaces now. So the concept gets more and more difficult to explain.

  7. I can beat that by Anonymous Coward · · Score: 0

    I was running GEOS on my C64 25 years ago! Last time I checked, it was all written in assembler, and it was an OS.

    1. Re:I can beat that by SJHillman · · Score: 1

      But did it support USB, TV tuners, and webcams?

    2. Re:I can beat that by NonUniqueNickname · · Score: 4, Funny

      But did it support USB, TV tuners, and webcams?

      Yes it did! GEOS supported all the existing USB TV tuners and webcams of its time.

    3. Re:I can beat that by Anonymous Coward · · Score: 0

      Did UNIX in 1986? I guess that means it wasn't an OS.

    4. Re:I can beat that by arfonrg · · Score: 1

      +1 Virtual Mod point to parent

      --
      Your thin skin doesn't make me a troll
    5. Re:I can beat that by SJHillman · · Score: 1

      I never said it wasn't an OS, I was just pointing out one of the things that would make this more of an accomplishment.

    6. Re:I can beat that by Anonymous Coward · · Score: 0

      "this" what? GEOS?

  8. In theory this could be awesome by Anonymous Coward · · Score: 0

    .. assuming that they could bring it up to par with modern operating systems (which of course is a gigantic leap of faith) .. in theory it could be the leanest OS EVER created.

    1. Re:In theory this could be awesome by SJHillman · · Score: 2

      A lot of the bloat in modern OSes comes from having to support a wide range of hardware - it's one of the reasons Linux can scale down to run on a tiny embedded system if you strip out that hardware support and other unneeded features (such as a fancy UI). You might even find that it doesn't scale well onto higher-end systems.

  9. Not open source by Anonymous Coward · · Score: 1

    Well 32 bit is but 64 bit isn't... Lame.

    1. Re:Not open source by TheRealMindChild · · Score: 1

      It was written in assembly. Decompile it. BAM, source code

      --

      "When life gives you lemons, don't make lemonade. Make life take the lemons back!" -- Cave Johnson
    2. Re:Not Open Source by jones_supa · · Score: 1

      The original source code is still probably "more open source" as it has appropriate names of labels, comments, and other stuff.

    3. Re:NOT OPEN SOURCE by Anonymous Coward · · Score: 1

      How can there be a non-open-source ASSEMBLY program? It is not like they will use an optimizing assembler?

    4. Re:Not open source by grumbel · · Score: 2

      Against the license:

      Menuet64 Copyright (c) 2005-2013 Ville Turjanmaa

      1) Free for personal and educational use.
      2) Contact menuetos.net for commercial use.
      3) Redistribution, reverse engineering, disassembly or decompilation
            prohibited without permission from the copyright holders.

      [...]

    5. Re:Not open source by nurb432 · · Score: 1

      Having the source isn't the same as it being open.

      You can steal the source to windows.. but that doesn't change the fact its closed source. Its a licensing issue, not availability.

      --
      ---- Booth was a patriot ----
    6. Re:NOT OPEN SOURCE by maxwell+demon · · Score: 1

      By the license explicitly disallowing to disassemble the machine code.

      --
      The Tao of math: The numbers you can count are not the real numbers.
    7. Re:Not open source by jeremyp · · Score: 1

      Well just get the 32 bit version and recompile it for 64 bit.... .... oh, wait...

      --
      All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
  10. Seriously, 13 years? by Anonymous Coward · · Score: 0, Funny

    Microsoft, Apple and Google update their OS about every year or two. If MenuetOS took 13 years to get to version 1.0, how long would it take them to release a bug fix? Is there a guarantee of a hot fix in 7 years or your money back?

    1. Re:Seriously, 13 years? by lil_DXL · · Score: 0

      It's an open source project, all it takes to speed up development is that more people get involved in it. Almost all of the code of MenuetOS was written by the same guy (who also holds a regular job, according to google), that's the main reason why it took so long. The C compiler included is also the work of a single programmer... guess we could call this kind of software as "vanity software"

    2. Re:Seriously, 13 years? by Anonymous Coward · · Score: 0

      Agreed. It astounds me that a hobby project doesn't have the resources to match the deadlines of corporations worth hundreds of billions of dollars.

    3. Re:Seriously, 13 years? by Anonymous Coward · · Score: 0

      Well, the credits only lists 5 people.(one of them only wrote the floppy driver) And I doubt it's a full time job for any of them.

    4. Re:Seriously, 13 years? by Anonymous Coward · · Score: 0

      Is there a guarantee of a hot fix in 7 years or your money back?

      Yes, you can get a full refund of the purchase price.

  11. Potential uses? by Anonymous Coward · · Score: 0

    What could I potentially use this sort of OS for? In what environment would it be pretty handy to have? Or is this a sort of a cool kids thing where it exists just because it can?

    1. Re:Potential uses? by SuricouRaven · · Score: 1

      Embarrassing the creators of all the OSs that take five minutes to reach desktop.

  12. still around? by Anonymous Coward · · Score: 0

    I thought this thing was done years ago. Good to see it going though and a great example that modern operating systems don't have to be written in C.

  13. Does it run on Raspberry pi? by Anonymous Coward · · Score: 0

    hmmm probably not... x86...

  14. This is cool but... by Anonymous Coward · · Score: 1

    It is entirely a 'cause we can project. It is a misnomer that assembler is faster than C code in practice. Most compilers and optimizers can take advantage of modern hardware's (i.e. x86's) continuing changing architecture. Things that were fast on core2duo may be slower on core i7, and they may have introduced new operations to do XYZ faster still.

    Not to mention that securing asm is a nightmare, very very time consuming. Even their '13 years' isn't enough.

    1. Re:This is cool but... by Wootery · · Score: 1

      Not to mention that securing asm is a nightmare, very very time consuming. Even their '13 years' isn't enough.

      Indeed, but C doesn't have a great track-record either.

      I suspect Menuet's minimalism would be a great point in their favour when it comes to security. I doubt security is that high up their list though. Not to mention that practically speaking, they're not worth anyone's time to attack.

  15. Assembly language by Anonymous Coward · · Score: 0

    funny, I was just reading about high level assembly, Art of Assembly Language http://www.plantation-productions.com/Webster/

    Nice to see some geeks are still experimenting with assembly language. I haven't heard much about assembly language since I have graduated from college about 10 years ago. Thanks for posting the link.

  16. Lame by plopez · · Score: 2

    Real Programmers write assembly language operating systems on punch cards.

    --
    putting the 'B' in LGBTQ+
    1. Re:Lame by roc97007 · · Score: 1

      It's been awhile, but I thought we wrote Fortran on punch cards. It's possible my memory is going.

      --
      Oliver's law of assumed responsibility: If you're seen fixing it, you will be blamed for breaking it.
    2. Re:Lame by lil_DXL · · Score: 2

      Real programmers use a magnetized needle and a steady hand

    3. Re:Lame by laejoh · · Score: 1

      Maybe they do now, in this decadent era of Lite beer, hand calculators, and “user-friendly” software but back in the Good Old Days, when the term “software” sounded funny and Real Computers were made out of drums and vacuum tubes, Real Programmers wrote in machine code. Not FORTRAN. Not RATFOR. Not, even, assembly language. Machine Code. Raw, unadorned, inscrutable hexadecimal numbers. Directly!

    4. Re:Lame by Anonymous Coward · · Score: 0

      Assembly and punch cards are for sissies. I used to write bit codes and burn them into PROMs using toggle switches. Very straight forward: set address bus with a row of toggles, set data bus with another row of toggles and push a button to burn the word into the PROM. If you make a mistake, just throw the PROM into the trash can and start with a new one from the beginning. Those were the good old times! Teaches you to write compact code and not make any mistakes.

    5. Re:Lame by minstrelmike · · Score: 1

      headline: Buggy Whip 2.0 released.

    6. Re:Lame by gaudior · · Score: 1

      Hexadecimal?! Luxury! We had to code ones and zeros, on clay tablets.

    7. Re:Lame by Anonymous Coward · · Score: 0

      Real programmers use butterflies. http://xkcd.com/378/

    8. Re: Lame by Anonymous Coward · · Score: 0

      Real programmers write machine code with diode arrays, wire cutters, and solder.

    9. Re:Lame by Capt.DrumkenBum · · Score: 1

      You had zeroes?!?!?!?!?
      We had to substitute the letter O

      --
      If I were God, wouldn't I protect my churches from acts of me?
    10. Re:Lame by Bacon+Bits · · Score: 2

      Real programmers engineer trees to grow punch cards with self-evolving code already punched on them.

      I suppose this means that, yes, God is a real programmer. I think that makes perfect sense. The source code for everything is perfectly available (MIT license), but there's no documentation and there are no comments in the code at all. In particular, the build environment is completely left as an exercise for the user. The original developer has been so silent for so long he clearly considers the code "mature" and is no longer considering enhancement requests or bug fixes... they all get marked WONTFIX with the comment "working as designed". Unfortunately the original code is extremely convoluted and seems deliberately obfuscated, so it's not really possible to fix the numerous bugs and errors in the system even if a build environment can be replicated.

      Worst of all is the toolchains used... it's like the worst case of "not invented here" and "feature creep" ever. Space-time and matter-energy libraries reference each other recursively to create the atomic system, and then he uses that to create biology programs that are self-replicating and self-evolving, which in turn have their own applications. No wonder reality is so screwed up. It's worse than that Linux VM running in JavaScript.

      --
      The road to tyranny has always been paved with claims of necessity.
    11. Re:Lame by Anonymous Coward · · Score: 0

      I prefer cosmic rays, less risk of stabbing myself with the needle

    12. Re:Lame by maxwell+demon · · Score: 1

      You had clay tablets? Luxury. We had to carve ours in stone.

      --
      The Tao of math: The numbers you can count are not the real numbers.
    13. Re:Lame by dbIII · · Score: 1

      I always find this sort of chest beating amusing since I was mucking about with the 6502 and Z80 for about three years with machine code before I even got access to a compiler. Even now I still have a lasting impression that an assembler makes everything so much easier.

    14. Re:Lame by Anonymous Coward · · Score: 0

      We used Haskell on ours.

  17. More modern programming language? by Anonymous Coward · · Score: 0

    Does the OS come with a more modern application programming language than assembler, such as Forth? I'd like to use it, but fear of having to learn assembler keeps me away from it. So it would be good to have a modern programming language such as a nicely threaded Forth interpreter or a simple LISP system implemented on top of this ... for the rest of us, who are afraid of assembler.

    1. Re:More modern programming language? by roc97007 · · Score: 1

      Assembler really isn't that hard. My first three years as a programmer were assembly language only for embedded applications. It's like anything else -- you memorize stuff and after awhile you see every problem as a list of assembly instructions. Later, using C seemed like cheating, in a way.

      --
      Oliver's law of assumed responsibility: If you're seen fixing it, you will be blamed for breaking it.
    2. Re:More modern programming language? by Anonymous Coward · · Score: 0

      I actually liked assembly better than C. There were fewer commands to remember, and you just had to keep track of everything. It actually ran very fast on my old computer as well.

      Apple should be hiring a bunch of assembly programmers and rewriting some code in assembly for better performance...

  18. Gotta ask ! by Anonymous Coward · · Score: 0

    Why bother making electronics small?
    Why bother looking for dark matter?
    Why bother existing?

    Why? Because the universe exists, that is why.

  19. Pointless? by lil_DXL · · Score: 2, Insightful

    "Pointless" as a tag? Really? Is this Slashdot at all?

    1. Re:Pointless? by Anonymous Coward · · Score: 0

      Is this Slashdot at all?

      Yes, but not as you know it.

  20. I wonder ... by PPH · · Score: 1

    ... how many developers cheated. Coded their module in C or C++ and ran it through gcc with the -S switch.

    --
    Have gnu, will travel.
    1. Re:I wonder ... by DigitAl56K · · Score: 1

      I wouldn't consider comparing a manually written routine to what GCC outputs cheating. If you have an optimizing compiler available to you, why not learn its tricks so that you can write better code yourself?

    2. Re:I wonder ... by GodfatherofSoul · · Score: 1

      I have no knowledge, but I'd imagine the optimizations from a compiler would have a tell-tale signature.

      --
      I swear to God...I swear to God! That is NOT how you treat your human!
  21. Not Open Source by Anonymous Coward · · Score: 1

    MenuetOS isn't open source. The web page mentions the (dead?) 32bit version is GPL, but the 64bit version is release under a non-free license:
    http://www.menuetos.net/m64l.txt

  22. Changing definition of Kernel by canadiannomad · · Score: 2

    If we are starting to believe that the core of an operating system should include a full GUI, video and mp3 playback, audio, USB, network, etc. for the least possible battery use, then this is a really cool way to go.

    Why waste the resources? Just cause we can?

    If we are to rethink what a basic operating system of today ought to have right out of the box from the first nanosecond, then I'm sure there is a lot of reengineering that would happen to any Linux or Windows kernel.

    --
    Hmm, the humour and sarcasm seem to have been be lost on you.
    1. Re:Changing definition of Kernel by Anonymous Coward · · Score: 1

      What's all this "we" stuff? You haven't done anything.

    2. Re:Changing definition of Kernel by canadiannomad · · Score: 1

      Touché

      --
      Hmm, the humour and sarcasm seem to have been be lost on you.
    3. Re:Changing definition of Kernel by Bite+The+Pillow · · Score: 1

      This is not a kernel, nor is it the core of an operating system. This is a full operating system which supplies what you need, out of the box, to accomplish stuff. The kernel plus the core plus bundled stuff. That's what comes with MenuetOS.

      This has nothing to do with defining a basic operating system. This is making one smaller so it gets out of the way of the stuff you want to run - including the stuff bundled with the OS.

    4. Re:Changing definition of Kernel by canadiannomad · · Score: 1

      Fair enough, I assume that comes out of my lack of understanding about how MenuetOS is designed/architected. I kinda assumed it was kinda monolithic in its assembled form... I am probably wrong on that point.

      --
      Hmm, the humour and sarcasm seem to have been be lost on you.
  23. so.... by smash · · Score: 1

    "With other operating systems it could take weeks to get to know to internal workings of the OS. In MenuetOS you simply could draw a pixel anywhere on the screen if you wanted to without worrying about device contexts and bitmaps etc." It's good for prototyping, he adds.

    i.e., from the sounds of it, it is not multi user, and everything runs with superuser privileges. It is written entirely in assembly language which adds another level of complexity for the programmer to deal with.

    Whilst it sounds like an interesting research project, and is no doubt likely to be quite a lot faster than any other multi-user OS, those are some MASSIVE trade-offs, especially with regards to security and stability.

    --
    I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
    1. Re:so.... by smash · · Score: 1

      and just on that.... you can increase speed by throwing hardware at the problem. you can't increase security or stability by doing that.

      --
      I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
    2. Re:so.... by Anonymous Coward · · Score: 0

      Perhaps not, if you take into account that the vast majority of all OS users do all of their daily tasks from one account, which also happens to be the administrator account ...

    3. Re:so.... by unixisc · · Score: 1

      Re-reading the Menuet page, I'm not sure how much is multi-user tied to multi-processing, multi-threading or pre-emptive multitasking, but MenuetOS has the latter 3. They also mention ring3 protection.

    4. Re:so.... by unixisc · · Score: 1

      At home, I have different user accounts for different family members. There are times I've even given myself different user accounts w/ different privilege levels, depending on what I need where.

    5. Re:so.... by maxwell+demon · · Score: 1

      and just on that.... you can increase speed by throwing hardware at the problem. you can't increase security or stability by doing that.

      That's not true. If you throw a big hammer (obviously hardware) at your system, you can make it very secure. Well, it won't work any more, but it is well known that only a switched-off system can be perfectly secure, and the hammer treatment ensures that the system will never be switched on again.

      --
      The Tao of math: The numbers you can count are not the real numbers.
  24. Might actually be the case by PhrostyMcByte · · Score: 4, Insightful

    I know you're joking, but when you write straight up assembly all the optimizations are up to you, and the fastest way to schedule instructions can change a lot between CPUs. While it probably isn't awful slow, it's also probably not as fast as a compiler-optimized C-based equivalent would be, and maybe even a Java one.

    1. Re:Might actually be the case by CastrTroy · · Score: 4, Insightful

      Very much agree with this. The compilers, for the most part, are smarter than people at optimizing code. There is almost no reason to write code in assembly anymore, other than "because we can", which is a fine reason for a "fun" project. However I wouldn't write assembly if I was trying to run a business. Java has the added advantage that it uses Just-In-Time compiling, so there's a lot of cases where Java, or .Net or any other language that uses an intermediate byte-code and actually outperform C.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    2. Re:Might actually be the case by Em+Adespoton · · Score: 1

      There's another reason for this too... today's CPUs are designed to recognize some standard compiler instruction chains and shortcut them -- so if you hand-code those instructions, the CPU will have to take your instructions literally, whereas if you use the manufacturer's compiler (or a common compiler such as provided by GNU or MS), the CPU will often recognize the expensive routines and optimize them for you in the pipeline.

      That said, if the assembler actually knows the cpu they're targeting, they can take advantage of these pipeline shortcuts as well. But it won't be portable unless they duplicate a lot of the logic that goes into compilers in the first place -- at which point, you're adding an extra layer that's going to take more time/space.

    3. Re:Might actually be the case by NewWorldDan · · Score: 5, Interesting

      Back when I was trying to write games, 20 years ago, I figured out pretty quickly to write the important parts in assembly and the rest in C. But not before I wrote a full screen graphics editor in assembly. That was about 1200 lines of awesomeness that took me about 7 months to write. Fortunately, most of the graphic work carried over to the main game itself. Recently, I did a recreation of that work in C#. What took me over 2 years to do in 1994-95 took me a weekend to do now. My how times have changed.

    4. Re:Might actually be the case by Joce640k · · Score: 1

      Very much agree with this. The compilers, for the most part, are smarter than people at optimizing code.

      I wouldn't say they were smarter than good assembly programmers but they do a good enough job and they allow you to refactor your code much more easily than when you use assembly language.

      Tweaking your code and data structures can give more of a speed boost than having tight inner loops but assembly language makes it very difficult to fiddle with code in this way. The equivalent of changing a couple of lines in a C++ header file on a large program might create a week's work in assembler.

      --
      No sig today...
    5. Re:Might actually be the case by Anonymous Coward · · Score: 5, Insightful

      As someone who has spent a lot of time optimizing assembly code (17 years in the games industry) I can tell you this:
      As the number of CPU registers increases it gets harder to beat the compiler. It's not too hard to better x86 compiler output. It's pretty difficult to improve PPC code.
      What assembly optimization gives you is a significantly better understanding of the data flow. Since all CPUs are memory bandwidth bound now knowing where the memory accesses are allows you to restructure the data to make the algorithm more efficient. You also must understand what the compiler is doing to your code so that you can make in access your data as efficiently as possible.
      To conclude, you can beat any compiler by hand, so long as you have more information then the compiler has.

    6. Re:Might actually be the case by Anonymous Coward · · Score: 5, Informative

      Three points:

      1) Compilers vs Humans
      You have to start by doing an apples-to-apples comparison. Yes, many developers these days are ignorant of low level details about assembly language, and would therefore not produce assembly code that is as good as what comes out of a compiler. But that is because the compiler isn't built by your standard run-of-the-mill code monkey. They are built by people who truly understand the issues involved in creating good assembly language. So you need to compare assembly created by a compiler vs assembly created by someone who is at least as skilled as the people who created the compiler. In such a comparison, the humans will generate more efficient code. It will take them much longer (which is one of the two reasons why we have compilers and high-level languages), but they will generate better code.

      2) Why write assembly language
      No, one does not write assembly language for "fun" - there are specific business reasons to do so. Replacing inner loops in performance-critical loops with hand-coded assembly language is a common example. Most major database companies have a group of coders whose jobs are to go into those performance-critical sections and hand tune the assembly language. Would I try to write a GUI using assembly language? No, because it simply isn't that performance sensitive. Choose the tool that fills your needs. Religion about tools is just silly.

      3) Out-perform C
      No. Given coders of equal skill, all of the common high-level languages (Java, C, C++, etc) are identical in terms of CPU-intensive performance. That's because the issue is more one of selecting the correct algorithms and then coding them in a sane manner. It is demonstrable that Java can *never* be more efficient than a corresponding C program because one could always write a C program that is nothing more than a replacement for the standard Java JVM (might be a lot of code, but it can be done).

      The place that one starts to see differences in performance is in the handling of large data sets. Efficiently managing large data sets has much more to do with management of memory. Page faults, TLB cache misses, etc have significant performance impacts when one is working on large data sets. Java works very hard to deny the developer any control over how data is placed in memory, which leaves one with few options in terms of managing locality and other CPU-centric issues related to accessing memory. C/C++ gives one very direct control over the placement and access of objects in memory, hence providing a skilled developer the tools necessary to exploit the characteristics of the CPU-CACHE-RAM interaction. It is laborious, to be sure, but C/C++ allows for that level of control.

      So it all boils down to what one is implementing. If I were implementing a desktop application, I would probably use Java. The performance demands related to memory management are typically not very great and Java's simpler memory management paradigm streamlines the development of such applications (not to mention the possibility at least of having one implementation that runs on multiple platforms). If I were implementing a high volume data management platform, I would use C++ because the fine grain control of memory management provides me the necessary tools to optimize the data-intensive performance.

    7. Re:Might actually be the case by NJRoadfan · · Score: 1

      Try telling that to Steve Gibson....

    8. Re:Might actually be the case by Anonymous Coward · · Score: 0

      I have never seen a case where Java outperforms C... Ever.

    9. Re:Might actually be the case by Anonymous Coward · · Score: 0

      Compilers written by people are never smarter than "people". They are smarter than a "person". This is because the compiler represents the accumulated progress of all of the people that have worked in its creation.

      This also means that a new, unknown optimization might be discoverable by a person that can, for a time, make that person's code faster than a compiler's. Then that person should add it to the compiler, allowing everyone's code to be faster. In theory.

    10. Re:Might actually be the case by Megol · · Score: 2, Informative

      There's another reason for this too... today's CPUs are designed to recognize some standard compiler instruction chains and shortcut them -- so if you hand-code those instructions, the CPU will have to take your instructions literally, whereas if you use the manufacturer's compiler (or a common compiler such as provided by GNU or MS), the CPU will often recognize the expensive routines and optimize them for you in the pipeline.

      That said, if the assembler actually knows the cpu they're targeting, they can take advantage of these pipeline shortcuts as well. But it won't be portable unless they duplicate a lot of the logic that goes into compilers in the first place -- at which point, you're adding an extra layer that's going to take more time/space.

      I think you are mistaken here. Yes some Intel processors optimize some instruction patterns however those same patterns are those that are used by assembly language programmers too. Some examples of this is fusing together some comparison instructions followed by a conditional branch. Any assembly programmer not using that pattern isn't optimizing for performance either by ignorance or intention (=size optimization). Now these patterns have been used since the Pentium Pro was released so it isn't a recent change.

      Somewhat more esoteric is the detection and special handling of CALL x; x: POP EAX type patterns. Here one calls the next instruction (labeled x here) causing the processor to push the return address onto the stack which then is then stored into the EAX register by the POP instruction. Intel processors detect this pattern and avoids treating it as a branch instruction leading to faster execution.

      Other than those two examples I can't recall anything not exposed to assembly language programmers - in fact those kind of rewrites _are_ exposed to programmers if they'd bothered to read the manuals.

    11. Re:Might actually be the case by PRMan · · Score: 1

      I have. It's very simple. Because of JIT, a Java or .Net compiler can optimize more easily for multiple CPUs or additional instruction sets (such as 3DNow/MMX) and also to use all the registers in 64 bit automatically but store in the heap or stack on 32-bit. All of that would be difficult to do in a single C program and could easily lead to the Java or .NET program outperforming C.

      --
      Peter predicted that you would "deliberately forget" creation 2000 years ago...
    12. Re:Might actually be the case by Arker · · Score: 3, Insightful

      "The compilers, for the most part, are smarter than people at optimizing code."

      No, they emphatically are not. No computer algorithm is any smarter than the people that wrote it (in fact it's always going to be dumber.) If the compiler is better than YOU are at optimizing code, that may well be true and understandable - presumably optimising assembler is not your specialty, after all.

      But a competent assembler specialist (someone in the same league, skillwise, with the guys that write the compiler) will beat the hell out of any compiler ever made. There just is no question. He knows every technique the compiler knows, but he is better equipped to know when and where to use them.

      Compilers serve many valid purposes. They allow less skilled programmers to still produce a usable product. They allow more skilled programmers to produce a usable product more quickly. They facilitate portability. Plenty of good reasons for them to exist and be used. But beating a competent human at optimisation tasks is not one of them.

      "Java has the added advantage that it uses Just-In-Time compiling, so there's a lot of cases where Java, or .Net or any other language that uses an intermediate byte-code and actually outperform C."

      I know a lot of people think this, but it's nonsense, as a moments reflection should make clear.

      I have no doubt that a poor coder might find JIT improves the performance of his code, but that really doesnt justify the assertion. You would need to show that JIT can actually beat a well written C program, and it wont. It cannot. Absolute worst case, if he has to, the C coder could simply implement a VM and JIT in his program and achieve the same results - and that is a tie. C cannot possibly lose that comparison, the worst it could possibly do is tie.

      --
      =-=-=-=-=-=-=-=-=-=-=-=-=-=-
      Friends don't let friends enable ecmascript.
    13. Re:Might actually be the case by Anonymous Coward · · Score: 0

      2) Why write assembly language
      No, one does not write assembly language for "fun"

      Yes, I do write asm for fun.

    14. Re:Might actually be the case by Anonymous Coward · · Score: 0

      JIT, profiling, etc. are cheating. I.e., it proves compiler did not understand enough to generate good code until it measured the execution.

    15. Re:Might actually be the case by Anonymous Coward · · Score: 0

      It is demonstrable that Java can *never* be more efficient than a corresponding C program because one could always write a C program that is nothing more than a replacement for the standard Java JVM

      [citation needed]
      Ever heard of JIT compiler and run-time profiling/optimization? C doesn't optimize past the compiler (or link-time optimizer). Java does it at runtime, so it can include all static analysis C does and then more.

    16. Re:Might actually be the case by Anonymous Coward · · Score: 2, Insightful

      By your logic, a chess engine could not be better than the best human chess players, but the opposite is true.

    17. Re:Might actually be the case by Anonymous Coward · · Score: 0

      I have. It's very simple. Because of JIT, a Java or .Net compiler can optimize more easily for multiple CPUs or additional instruction sets (such as 3DNow/MMX) and also to use all the registers in 64 bit automatically but store in the heap or stack on 32-bit. All of that would be difficult to do in a single C program and could easily lead to the Java or .NET program outperforming C.

      But... but... GENTOO!

    18. Re:Might actually be the case by WaffleMonster · · Score: 2

      There is almost no reason to write code in assembly anymore, other than "because we can", which is a fine reason for a "fun" project. However I wouldn't write assembly if I was trying to run a business. Java has the added advantage that it uses Just-In-Time compiling, so there's a lot of cases where Java, or .Net or any other language that uses an intermediate byte-code and actually outperform C.

      I keep hearing the arguments but I don't see the fruits. I expect Java and .Net apps to run slow and take up irrational amounts of memory for what they do and I am rarely disappointed. I expect the handful of ASM function libraries we use to significantly outperform c code and they always do.

      If these high level languages are so great where are the commensurate outcomes in real life? Where are the cutting edge Java and .Net games? Browsers? Operating systems?

      In cases where the developers time is worth substantially less than outcomes where reliability and performance are required why is the market not running to high level languages if the compiler is king?

    19. Re:Might actually be the case by Anonymous Coward · · Score: 0

      It is simple a matter of formula.

      x = time to compile C
      y = time to run C

      z = time to compile jit
      x' = time to jit java/net/python (usually happens once per code run sometimes many if something changes)
      y' = time to run java/net/python

      if y > x' +y' then yes you will out perform

      x and z never really enter into the picture as those are a one time function done by the developer or at first runtime (depending on your language and its runtime environment).

      Now if x'+y' is less than y that means one of two things. Either my C compiler stinks. Or the java code has more information. Or both.

      All of that would be difficult to do in a single C program
      Utter hogwash. Your compiler is not good enough then. For example the intel msvc compiler is known to emit two code paths. One for intel cpus and one for other cpus. This means at runtime the path of code can change. Usually by the use of lookup/jump tables. It is trivial to lookup a cpu model. What you do with that information is different and could easily be baked into a C program. It is usually time and memory constraints that limit you doing this. Even with JIT you basically are doing many mini compiles and just emitting the correct cpu set for your cpu.

      Java is just a language. As is C. I could in theory write a JIT C. That does not mean JIT is better. It is just a way of shipping more portable os agnostic items (in theory, practice has shown differently).

      Most good optimization comes from picking better algs than fiddling the compiler settings. Fiddling the compiler settings (jit vs static run is just a variation of that) usually only yields 3-10% performance. For example ASM tuning is usually just picking better instructions than the compiler did and picking a better scheduling of them. You tweaked the algorithm.

      This AC put it best http://tech.slashdot.org/comments.pl?sid=4449941&cid=45434751 In practice it is more about scheduling of scarce resources and finding ways to move it into parallel steps as much as possible.

    20. Re: Might actually be the case by Anonymous Coward · · Score: 0

      Bah! C/C++ = fail. Assembly is for pussies. Why not write in native machine code like the rest of us men!

    21. Re: Might actually be the case by Anonymous Coward · · Score: 0

      Bazinga!

    22. Re:Might actually be the case by TangoMargarine · · Score: 1

      I should really get back on top of that "assembly scripting" project I was making for fun, if for no other reason than to watch programmers' eyes twitch when I mention it.

      --
      Unity? Screw that: XFCE. Slashdot Beta? Screw that: SoylentNews. Australis? Screw that: Pale Moon. UX developers DIAF
    23. Re:Might actually be the case by Arker · · Score: 1

      Chess is of course a slightly different situation.

      The chess algorithm cannot literally be 'smarter' than the people that wrote it (they are perfectly capable of doing the same thing it does) but a computer can still execute that algorithm faster - it can do calculations that would take the human days to accomplish in seconds. In time to actually use those calculations to choose a move.

      Similarly, a compiler can produce reasonably optimised output MUCH faster than a human programmer. Never denied it.

      --
      =-=-=-=-=-=-=-=-=-=-=-=-=-=-
      Friends don't let friends enable ecmascript.
    24. Re:Might actually be the case by Bite+The+Pillow · · Score: 1

      Why are you arguing about speed when the project goals are about having a small OS with few layers?

      The goal is to have your code go fast due to minimal layers, and apparently to have an ASM-friendly environment. The entire design could be accomplished in C, but it is in ASM because people who write an ASM friendly OS from scratch are probably interested in writing ASM.

      Once you have a C library and can compile things like Quake (screenshots are on the homepage), equivalent code should run faster on MenuetOS compared with Linux or Windows. It's not guaranteed, because you can customize your OS to some extent. But to generalize, most things should respond more quickly on Menuet than an equivalent OS without code changes.

      Faster is a side effect of design, and language choice is a side effect of the OS purpose.

    25. Re:Might actually be the case by Anonymous Coward · · Score: 0

      1 million plus this.

    26. Re:Might actually be the case by Anonymous Coward · · Score: 0

      Assembly language programming is fun and forces you to stretch your mind. At university I developed a 32KB operating system on a single 2.88MB diskette using nothing more than pencil, paper, and MS-DOS DEBUG. It was an interpreted operating system with a small kernel and interpreter written in assembly language.

    27. Re:Might actually be the case by dbIII · · Score: 2

      I would argue instead that the compilers are more patient than people. They put in the optimisation work that most people don't put in the time to do. That is why the first rough shot at doing something without careful planning can end up with code that is slower than something written in a higher level language and compiled.

    28. Re:Might actually be the case by Anonymous Coward · · Score: 0

      Would you care to substantiate those claims that somehow JIT compilers generate faster code that traditional compilers? I've NEVER see C# or Java code run faster than native C. NEVER.

    29. Re:Might actually be the case by Anonymous Coward · · Score: 0

      Absolute worst case, if he has to, the C coder could simply implement a VM and JIT in his program and achieve the same results - and that is a tie. C cannot possibly lose that comparison, the worst it could possibly do is tie.

      Then the win would go to java by far in that case as development time for the c program would so far exceed java that the java program would likely have ceased to be useful for busines purposes before the c program even was in a usable state. We're talking about writing equivalent programs here, writing a VM from scratch to execute code to find the first 2000 prime numbers vs writing a java application to find the first 2000 prime numbers is going to see the java program completing its operation well before the actual code to run on the new vm is even started on. Apples and oranges here says yes a JIT'd java program may very well outperform an equivalent C program when it is being written for unknown hardware where compile time optimizations could help.

    30. Re:Might actually be the case by cryptizard · · Score: 1

      But that is the same situation you have with compilers. Making the most optimized assembly code involves complex calculations of instruction scheduling which a computer can do much better than a human. It is the same reason the people at Intel don't hand-code circuits any more: computers can do the computational intensive work of optimizing it better.

    31. Re:Might actually be the case by Anonymous Coward · · Score: 0

      "No computer algorithm is any smarter than the people that wrote it (in fact it's always going to be dumber.) If the compiler is better than YOU are at optimizing code, that may well be true and understandable - presumably optimising assembler is not your specialty, after all.

      But a competent assembler specialist (someone in the same league, skillwise, with the guys that write the compiler) will beat the hell out of any compiler ever made. There just is no question. He knows every technique the compiler knows, but he is better equipped to know when and where to use them..

      Quantity has a quality all it's own. You're smarter than a programmable calculator, but a programmable calculator is going to to be able to do large calculations faster than you can. Find the 100th prime number that ends with 23? You'll be there for a long time

      A similar thing enters in programming. The machine can think about optimizations for a _lot_ longer than you can. It's not just about "smart", its about who can work the longest, who makes the fewest stupid mistakes due to attention lapse, and who can keep track of the most detail. Machines (compilers) are good at all those things.

    32. Re:Might actually be the case by flugi · · Score: 1

      Note that in your first statement, you are reacting to this:

      "The compilers, for the most part, are smarter than people at optimizing code."

      And then you say:
      "But a competent assembler specialist (someone in the same league, skillwise, with the guys that write the compiler)[...]"

      Put it together: there are a whole lot of programmers, and there are a handful of skilled assembler specialists. So if you take a random coder, and force him to code in assembly, your chances to gain performance is damn small.

      Although you are trivially right about the skilled people, the statement you answered was not about them, that's why it says "for the most part".

      There is a common misconception which says "if it is too slow, code it in assembly", which should sound like "if it is too slow, learn CPU tweaking for two decades, and then code it in assembly" :) In the old 8bit or 8086 days, without SSE+FPU, pipelines, cache coherence and branch predictors, assembly coding was a pretty straightforward business, the coder could do nice things by keeping things in registers, and knowing basic idioms as XOR AX AX, and in the same time compilers were tuned to create the binary fast, there were little time for optimization. Basic knowledge was enough to create faster code than compiler.

    33. Re:Might actually be the case by Grishnakh · · Score: 1

      Why would it not be possible for a C or C++ compiler to do the same thing? The multiple CPU thing could be a problem since C/C++-compiled code typically isn't targeted at a specific system, but it certainly could be specified, couldn't it? And for additional instruction sets, that's been common for ages; with gcc, it's always been possible to optimize for specific CPUs, not just i386. And with the multiple-CPU thing, isn't the OS supposed to handle scheduling of processes and threads automatically anyway, taking advantage of extra cores?

  25. 13 Years to 1.0? by Anonymous Coward · · Score: 3, Funny

    So obviously their development cycle is much faster than HURD!

    1. Re:13 Years to 1.0? by Anonymous Coward · · Score: 0

      Almost as fast as Duke Nukem Forever. Hopefully it turns out better.

  26. JUST SO YOU KNOW: !! MS-DOS: ASM - AMIGA: C by Anonymous Coward · · Score: 0

    And we all know how much better one was over the other !!

    I will not digress to the "asm coders spend time with bits not algorithms" !!

    I will not digress to the "asm coders cannot flip a switch and update the binary for a new CPU" !!

    I am not now nor have I ever been a member of the communist party !! Not that there is anything wrong with that !! Like being gay !! That is the way your cards were dealt !!

  27. The only Secure OS.. by Anonymous Coward · · Score: 0

    At least,there is a guarantee that this OS will be secure and without any backdoor. Simply because there is no compiler to inject it, so no chance for nasty hidden traps. Who knows, maybe in the following years this OS will became the only secure OS at all....

    1. Re:The only Secure OS.. by Thiez · · Score: 1

      Not this compiler-inserted backdoor crap again... Look, an assembler could insert a backdoor as well. And any of the developers could insert a backdoor. Did you read the entire source code? Even if you did, do you think you could find a cleverly hidden backdoor?

      Besides, all you need to do to get rid of the hidden compiler backdoor (assuming there is one) is write your own compiler, use it to compile the suspected compiler, then use the generated compiler to compile itself, and presto, the backdoor is gone. Writing an interpreter instead of a compiler is also an option. Since you only need to do this whole process once, your compiler doesn't need to do any smart optimization and it's acceptable for the whole process to take some time (a week? a month? who cares).

  28. NOT OPEN SOURCE by Khyber · · Score: 5, Funny

    "MenuetOS is an open source"

    Not the x64 version, which is the version that's actually worth a shit.

    --
    Still waiting on Serviscope_minor to wake up to fucking reality and realize that Jessica Price isn't going to fuck him.
  29. Why do it? by GodfatherofSoul · · Score: 1

    Because assembly programming is really fun. It's challenging and it's a pretty unique experience for most of us who rarely touch systems at that low a level.

    --
    I swear to God...I swear to God! That is NOT how you treat your human!
    1. Re:Why do it? by PuckSR · · Score: 2

      Well, technically we all "touch" systems at this level, we just don't realize we are doing it. Learning/Using Assembly is like learning/using arithmetic instead of using a calculator. It is very handy and gives you a core appreciation for what is happening in complex problems, however most professionals just plug it into a computer rather than do it because it becomes too cumbersome at a certain level.

    2. Re:Why do it? by GodfatherofSoul · · Score: 2

      Well, "technically" I dabble in electrical engineering every time I flip on a light switch. I think my point was pretty clear.

      --
      I swear to God...I swear to God! That is NOT how you treat your human!
  30. What a... by wonderboss · · Score: 1, Funny

    What a senseless waist of human life.

    --
    more cowbell
    1. Re:What a... by Anonymous Coward · · Score: 0

      I bet his waist is more sexy than yours.
      (You show first.)

    2. Re:What a... by diegobolanos · · Score: 1

      Everybody is free to do what he/she thinks is worth for. I do agree with you that this effort is stupid, because from college we experience that assembly code ("real control" of the machine) can be faster an more efficient. But at a very very (f*****g) very high cost. I can think of this guys 13 years ago thinking like: "Dude, I can't live thinking that people don't know that assembly code can run better than anything, I will spend any time is necessary to prove it". Sad thing is they are trying to prove something we all know.

    3. Re:What a... by Anonymous Coward · · Score: 0

      "waist"... LOL.

      American?

    4. Re:What a... by Dystopian+Rebel · · Score: 1

      a senseless waist of human life

      Kardashian is working on this too?

      --
      Rich And Stupid is not so bad as Working For Rich And Stupid.
    5. Re:What a... by wonderboss · · Score: 1
      --
      more cowbell
  31. Those crazy Finns and their Operating Systems by Anonymous Coward · · Score: 0

    Who knows what they do next!

    1. Re:Those crazy Finns and their Operating Systems by jones_supa · · Score: 1

      Yup. I guess it deserves a mention that just like Linux, MenuetOS also comes from Finland and is lead by a guy called Ville Turjanmaa.

    2. Re:Those crazy Finns and their Operating Systems by Anonymous Coward · · Score: 0

      Who knows what they do next!

      Write an OS in BrainFuck?

  32. steve gibson born again? by Anonymous Coward · · Score: 0

    This reminds me of GRC, Steve Gibson's company that produced disk utilities for recovering data and IIRC possibly even fixing broken pre-IDE disk drives. He boasted that all his software was written in super fast assembly language for maximum performance!!!

  33. Comment removed by account_deleted · · Score: 1

    Comment removed based on user account deletion

  34. real gain by diegobolanos · · Score: 1

    It all depends in the definition of "performance" that you want to establish. If performance for this projects means just "raw machine cycles used in specific task", then yes we all know assembly will outperform anything (given you have huge amounts of resources, like time and money) BUT if you define performance also by "results obtain VS resources spend" then you will never win using assembly code.

  35. LincolnLogOS, an OS written entirely in linoln log by selectspec · · Score: 1

    LincolnLogOS is an open source, GUI-equipped, wooden operating system written entirely in Lincoln Logs that can fit on any play room floor (if you have one big enough). I originally spoke to its developers in 2009. Recently I had a chance to catch up with them to chat about what's changed and what needs to be done before the OS hits version 1.0 after 13 years of work. The system's creator, Ville Turjanmaa, says, 'Timeframe is secondary. It's more important is to have a complete and working set of features and applications. Sometimes a specific time limit rushes application development to the point of delivering incomplete forts and buildings, which we want to avoid. ... We support USB devices, such storages, printers, webcams and digital TV tuners, and have basic network clients and servers. So before 1.0 we need to improve the existing forts and buildings and make sure everything is working fine. ... The main thing for 1.0 is to have all application groups available.

    --

    Someone you trust is one of us.

  36. yes change it by globaljustin · · Score: 0

    the core of an operating system should include a full GUI, video and mp3 playback, audio, USB, network, etc. for the least possible battery use

    thank you...

    i imagine some of the commeters above freaking out when they read that statement...I admit I learn alot from reading the 'assembly sucks C is better' but the context of the discussion is *exactly* the kind of purely theoretical, ignore the user abstract computing model that causes our industry so much trouble. Its the tendency for programmers to ignore the *user* in the equation completely b/c humans have too much complexity and uncertainty (for the nerd mind)

    it the core problem of our industry, IMHO

    let me repeat...I *love* the /.'ers who obviously know what they are talking about who, on comments for stories like this, debate the most abstract minutiae of coding for *efficientcy*

    but it becomes a Moebius Downward Spiral of rhetoric at some point...i say have the discussions, but always remember that the human part of the equation is **the only reason the computer exists** up above there's actually a comment above where the guy talks about how 'true computing' doesn't even have a user! WTF

    think about what MenuetOS will allow the **user** to do....and on what machine....

    this OS concept, the concept that an OS Kernal should be built from the ground up for ***how the user will use it*** is the way to the future for our industry.

    --
    Thank you Dave Raggett
  37. Choose your own adventure, drinkypoo by Cajun+Hell · · Score: 5, Funny

    Guess how many times I've used it.

    "Help! Help!" she cried.

    Most of them all just walked by, ignoring her. She might be jaw-droppingly gorgeous 36-24-36 redhead with pouty lips in a light dress, but she was clearly crazy, waving that weird plastic thing around. "You!" she urgently growled, as she seized a suited man's lapels. "Can you help me read this? It's the only copy!" This looked like a successful man, so surely he could afford a decent computer, right?

    He blushed. He wanted her, and maybe could use it to get her back to his place, but the lie would eventually come out. And this woman had just the sort of sincere bearing, that he knew the lie would be punished, not accepted. He sighed. He glanced at the disc again, just to make sure what he was seeing, and sighed. "No. Sorry. What is that, anyway?"

    She let go, and cast her glance around the crowd.

    And that's when it happened: Drinkypoo. The moment she saw him, she knew. This was the one. She didn't even have to ask, because she knew. But she decided to ask anyway, so that he could have the pleasure of saying yes and offering to help. It would be the first of many pleasures that he would experience.

    "Can you read it? There are some really important files from the 1990s on here. I've got to have them. I'll do anything, Drinkypoo. Anything."

    There was a time when Drinkypoo would have grinned nervously, or asked followup questions. But by now, he knew the story. He didn't want to hear the story anymore; he just wanted the reward. Drinkypoo didn't so much as even glance at the disk. Why so many unbelievable hot women always had invested in LS120s and floppies to store their critical records, he didn't know. Maybe some freak effect of a one-shot Imation advertising campaign, long ago. No one even really knew why, for sure; they just knew that a shitload of the drives had somehow ended up in the possession of that demographic.

    He squinted and recalled his depleted inventory. That blonde with the 1.4MB floppy from two nights ago. "Got to stop at the drugstore on the way. C'mon," he replied. She stuffed the disc into her purse for safekeeping and they walked to his car.

    Half an hour later, at his place, she sat on the couch, nervously clutching her purse containing the precious disc. Drinkypoo sauntered over, and held out the glass of rye bourbon on ice. "Here, relax. Everything's going to be okay." She sighed with relief, set her purse upon the coffee table, accepted the glass and sipped. "Thanks."

    "You can't imagine what this means to me," (though Drinkypoo actually knew very well), "I need those files so badly." She reached for his belt buckle for a brief moment, but paused. "First things first, though, I suppose."

    Drinkpoo shrugged. What did it matter to him? It would all work out the same. This was going to be fun no matter which order things occured. "Sure." He walked over to the computer desk and nudged the mouse, waking it up from sleep, casting monitor light across the room. "Let's have the disc."

    She smiled, and reached into her purse, pulling out a .."

    [CHOOSE YOUR OWN ADVENTURE:

    1) .. gun.

    2) .. Zip or Jaz disc.

    3) .. 3.5" floppy or LS120 disc. (Drinkypoo, it will cost you 0.01 BTC for me to write this version.)

    ]

    --
    "Believe me!" -- Donald Trump
    1. Re:Choose your own adventure, drinkypoo by TangoMargarine · · Score: 1

      You, sir, just made me glad that I'm still reading Slashdot.

      --
      Unity? Screw that: XFCE. Slashdot Beta? Screw that: SoylentNews. Australis? Screw that: Pale Moon. UX developers DIAF
    2. Re:Choose your own adventure, drinkypoo by der_pinchy · · Score: 0
    3. Re:Choose your own adventure, drinkypoo by maxwell+demon · · Score: 1

      I'm for option 4: A 5.25" disk. You know, the ones which actually were floppy.

      --
      The Tao of math: The numbers you can count are not the real numbers.
    4. Re:Choose your own adventure, drinkypoo by Anonymous Coward · · Score: 0

      He squinted and recalled his depleted inventory. That blonde with the 1.4MB floppy from two nights ago. "Got to stop at the drugstore on the way.

      IT'S 1.44 MB YOU INSENSITIVE CLOD!

    5. Re:Choose your own adventure, drinkypoo by Anonymous Coward · · Score: 0

      I choose 2) .. Zip or Jaz disc.

    6. Re:Choose your own adventure, drinkypoo by jeremyp · · Score: 1

      Please let it be a DLT cartridge

      --
      All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
    7. Re:Choose your own adventure, drinkypoo by Anonymous Coward · · Score: 0

      Ah, the Jaz disc, because sometimes Zip wasn't enough fun.
      You missed Syquest though. You shouldn't forget Syquest.

  38. Open source? by CurryCamel · · Score: 1

    From the license: http://www.menuetos.net/m64l.txt

    1) Free for personal and educational use.
    2) Contact menuetos.net for commercial use.
    3) Redistribution, reverse engineering, disassembly or decompilation
          prohibited without permission from the copyright holders.

    For an OpenSource OS written in assembly, that 3rd clause is a bit strange.

    (yes, yes, I did notice that the 32bit version is more traditionally open-source-licensed...)

    1. Re:Open source? by unixisc · · Score: 1

      I noticed that the 32-bit version is under GPL2. Did they consciously decide that GPL2 was preferable, or did they just not get to update the license to GPL3?

      Another thing - the whole idea of GPL & open source is that one can see the source code, but if the source code is in assembly, that typically gives one no information about why things are happening e.g. why do we move the contents of register A to B, or why do we push & then pop a stack. In higher level languages, it would be more obvious that one is creating a new Window, but that would not be obvious here. So what's the point of applying an FOSS license to something that might as well have been coded in machine language?

    2. Re:Open source? by Anonymous Coward · · Score: 0

      There are such things as "comments", "meaningful labels" and "macros with descriptive names" in Assembly sources which are generally missing from machine code.
      Something like this might be not very useful:
      mov ebx, [4001024h]
      push ebx
      push dword 0
      mov eax, [400102ch]
      sub eax, ebx
      push eax
      push dword [4001020h]
      push dword 123h
      int 40h

      But this just might:
      ; Window origin and extents
      mov ebx, [leftPane.x]
      push ebx
      push dword 0
      mov eax, [rightPane.x] ; Fill all space to the left
      sub eax, ebx
      push eax
      push dword [paneHeight]
      SYSCALL GUI_CREATEWINDOW

  39. Asm faster despite architecture changes ... by perpenso · · Score: 1

    I know for a fact that my C code is faster than my Assembly code... since the time I lost track of all CPU pipelining and stuff, while compilers only got better at optimizing. When they release version 1.0, it will probably have to be run on a emulator, perhaps in a quantum computer.

    Some assembly code that I wrote was faster than C from current compilers over several major architectural changes of x86. The percentage by which they were faster decreased, yet after 3 architecture changes I was still 10% faster with the original assembly.

    The key to writing good assembly code is not trying to out-compile the compiler, that is a newbie thing to do. The key is to leverage knowledge that can not be transmitted to the compiler, can not be expressed in C.

    1. Re:Asm faster despite architecture changes ... by Jorl17 · · Score: 1

      Could you elaborate on that kind of knowledge? I'm genuinely interested.

      --
      Have you heard about SoylentNews?
    2. Re:Asm faster despite architecture changes ... by perpenso · · Score: 1

      These may be dated. Don't solve a problem only in asm, solve it in C and asm. Compare the two again whenever a cpu architecture or a compiler has a major update. Plus you want the C so you can port the code to a different architecture. That said ...

      You might know your data is organized in a way that makes SIMD instructions helpful. Even if a compiler supports vectorization it will be somewhat limited in what it can do compared to the assembly programmer. A compiler may offer intrinsics but when doing so you are really programming at the assembly level not the C level, the intrinsics are pretty much a shorthand for inline assembly.

      Wanting a function to return multiple values, trivial in assembly where multiple registers can be used. C requires memory variables.

      Dealing with arithmetic overflow, trivial in assembly. Undefined in C.

      Fixed point math where the source operands are of different sizes than the result of the operation, trivial in x86 assembly. C wants everything to be the same size.

      There may be compiler specific extensions for some of these but they generally don't compare well with assembly.

  40. written entirely in assembly by rossdee · · Score: 1

    Not very portable then

    1. Re:written entirely in assembly by unixisc · · Score: 1

      Would have been an issue 10 years ago, but today, except for ARM & Power, everything else is all but dead. Besides, optimizing an OS using the latest instructions in x64 sounds interesting (granted, that part is closed source - for now at least)

  41. If this was a Richard Stallman Project by Anonymous Coward · · Score: 0

    "So that I can continue to use computers without dishonor, I have decided to put together a sufficient body of assembly-only software so that I will be able to get along without any software that is compiled."

    (As always, though, bathing is optional.)

    1. Re:If this was a Richard Stallman Project by unixisc · · Score: 1

      I doubt that he would approve, given his opposition to intermediate formats like Bytecode, ANDF or object code. Assembly code would be just as problematic.

    2. Re:If this was a Richard Stallman Project by Anonymous Coward · · Score: 0

      Perhaps you're thinking of object code. Assembly code, in contrast, is source code. I thought he was all in favor of source code, as long as it's open (er, excuse me, "free".)

  42. Efficient assembly is still quite doable ... by perpenso · · Score: 3, Interesting
    Let me start off by saying I started with assembly on the Apple II. I always liked assembly, I always like seeing things at the architectural level. I've written a bit of assembly over the years for various CPUs. Every once in a while I write some assembly code to better learn a new CPU and sometimes just for fun. Strange ... yeah, I will admit that.

    That said, I rarely use assembly in professional software development situations when targeting computers and mobile devices. Before addressing your comment let me add one more thing. Learning assembly is important with respect to making you a better C programmer. I'm not talking about understanding the asm code you see in the debugger. I really am referring to writing C code. C code can be written in architecturally specific manners. The code is still portable, yet more efficient only on a specific architecture. Understanding the architecture and assembly language can allow you to write more efficient C code.

    Yeah, outside a few rather narrow cases, ...

    That is nothing new, this has been true for decades. You have to go back to Apple II and Commodore 64 days to find a timeframe where assembly was appropriate for general purpose software development. I'm referring to computers, not micro controllers and other such environments.

    ... modern CPUs have just gotten too complicated to write efficient assembly for.

    This is absolutely false. The key to writing good assembly code is not trying to out-compile the compiler, that is a newbie thing to do. The key is to leverage knowledge that can not be transmitted to the compiler, can not be expressed in C. This is where the real win is, this is where assembly can still beat C even after a couple of architectural upgrades.

    1. Re:Efficient assembly is still quite doable ... by Anonymous Coward · · Score: 0

      I always liked assembly, I always like seeing things at the architectural level.

      I'm not sure what level of "architecture" you are talking about. An assembly language usually reveals relatively little about the architecture underlying the CPUs that execute the code generated by the assembler. In a brand new CPU architecture when there were no instruction set compatibility requirements, the instruction set may hint at the underlying CPU architecture to someone who is knowledgeable about CPU architectures. However, as technology changes and compatibility requirements are introduced, the link becomes more and more tenuous.

      An instruction set is to a CPU as the user's manual is to a car.

    2. Re:Efficient assembly is still quite doable ... by perpenso · · Score: 2

      I always liked assembly, I always like seeing things at the architectural level.

      I'm not sure what level of "architecture" you are talking about. An assembly language usually reveals relatively little about the architecture underlying the CPUs that execute the code generated by the assembler.

      That is a very modern x86 centric view. Even so we still have an "instruction set architecture" (ISA) in the modern x86 case. This ISA limits the underlying hardware architecture's (micro-ops) view of the software's intent. We still have the case where optimizing at the ISA level can also improve performance at the micro-op level. Furthermore understanding the underlying micro-op architecture can help to write more efficient code at the ISA or C level. This level is not documented but a little is known about it. More importantly the architecture of a CPU is not limited to the micro-ops. We still have caching and other things to consider.

    3. Re:Efficient assembly is still quite doable ... by Guy+Harris · · Score: 1

      Even so we still have an "instruction set architecture" (ISA) in the modern x86 case. This ISA limits the underlying hardware architecture's (micro-ops) view of the software's intent. We still have the case where optimizing at the ISA level can also improve performance at the micro-op level. Furthermore understanding the underlying micro-op architecture can help to write more efficient code at the ISA or C level. This level is not documented

      ...and it can (and, I suspect, does) differ from one generation of x86 processor to another.

    4. Re:Efficient assembly is still quite doable ... by perpenso · · Score: 1

      Even so we still have an "instruction set architecture" (ISA) in the modern x86 case. This ISA limits the underlying hardware architecture's (micro-ops) view of the software's intent. We still have the case where optimizing at the ISA level can also improve performance at the micro-op level. Furthermore understanding the underlying micro-op architecture can help to write more efficient code at the ISA or C level. This level is not documented

      ...and it can (and, I suspect, does) differ from one generation of x86 processor to another.

      Yes, but while the percentage of improvement may have decreased the originally assembly language was still faster after three cpu generations. At least in the last major piece of assembly that I wrote. At each new cpu generation, and compiler upgrade, I would retest the c and asm implementations.

      Even *if* the asm implementation had gotten slower than the c implementation after three cpu generations it may still have been the way to go. Apps are sometimes optimized for the minimum system requirements not the latest and greatest hardware.

    5. Re:Efficient assembly is still quite doable ... by Mr+Z · · Score: 1

      I personally find it more valuable to periodically examine the compiler output, and understand if there are particular idioms in my code which lead to bad code generation. For example, when I'm constructing a particular set of abstractions (say, a C++ template library), can the compiler peel them back and give me efficient code?

      I still write assembly code when I need to (especially on small embedded systems, or on the Intellivision), but most of the time I just don't have the time. Also, most code's performance just doesn't matter. My time truly is the limited resource. I've had to learn that perfect is the enemy of good, and so to pick my battles wisely.

      MenuetOS is impressive, but I doubt I would ever be able to use it, because I won't ever have the subset of peripherals, motherboards, etc. required to run it. And, because its development is entirely in assembly code, I suspect hardware will continue to change faster than it does.

      I remember the last time I bet on an assembly-written horse (WordPerfect). It was the fastest, it was solid, and it got trumped, hard, when the world changed faster than it could.

  43. I just had a thinko... by knarf · · Score: 1

    Great, I thought, a lightweight, compact OS complete with GUI that strives to be fast, secure and robust. I know just the application for something like that: mobile terminals! Just port it and...

      [pop]

    Ahw shucks, it is written in x86 assembly. Porting it essentially comes down to rewriting the thing. Yes, you could machine-port the thing, ending up with code constructions which work great on x86, not so much on arm. A compiler would produce better assembly from C source than that.

    --
    --frank[at]unternet.org
    1. Re:I just had a thinko... by unixisc · · Score: 1

      If that's what you need, why not just use something like Minix? Yeah, that too is x86 only right now and being developed on ARM, but since it's written in C, one can independently try porting it to whatever other platform there is that may work for one. What CPUs did you have in mind?

  44. alt.religion.emacs begs to differ by Anonymous Coward · · Score: 0

    Religion about tools is just silly.

    Smite him, minions!

  45. Giving the compiler hints can be useful ... by perpenso · · Score: 2

    The worst choice in C is to think you need to help the compiler optimize. Seriously, the compiler doesn't care at all whether you write x = x << 1; x += x; or x *= 2; it sees them all the same, so code the one that makes sense in context.

    Historically helping the compiler, giving it hints, is in fact a good way to get superior code out of a compiler. For example consider 4x4 matrix multiplication. Do you use nested loops or just unroll it manually? Compilers tend not to fully unroll all the nested loops. The compiler may do better scheduling on fully unrolled non-looping code. Do you create temporary variables to preload a row or column, or do you just access each variable in memory directly? The former may generate better code on a RISC architecture and the later on a CISC architecture. These are the sort of things I think of when referring to helping the compiler, giving it hints. When that mythical smart compiler arrives that is able to figure out the preceding on its own, it will simply ignore your hints, the hints will do no harm. Until this mythical compiler arrives, the hints may help.

    BTW, I agree with your sentiment in the context of the example you offer. Besides being useless, I've also seen people introduce bugs by making such "optimizations". Replaced the subexpression "x * 2" with "x << 1" in a larger expression and you may have changed the order of evaluation of the overall expression and are doing an erroneous calculation. "<<" has a different operator precedence that "*".

    1. Re:Giving the compiler hints can be useful ... by Anonymous Coward · · Score: 0

      I used to think that too, but I'm not so sure now, with things like loop reordering for better locality of reference and auto-vectorization I'm inclined to try and have good data layouts and let the compiler deal with the details.

    2. Re:Giving the compiler hints can be useful ... by Mr+Z · · Score: 1

      For example consider 4x4 matrix multiplication. Do you use nested loops or just unroll it manually? Compilers tend not to fully unroll all the nested loops. The compiler may do better scheduling on fully unrolled non-looping code.

      Ironically, a vectorizing compiler would prefer you give it the loops instead. If you gave it any hints at all, it should be regarding pointer aliasing (ie. the C99 restrict keyword, for example), pointer alignment and minimum trip counts if any of the loops have variable trip counts. Manually unrolling makes its job much, much harder, usually.

      Do you create temporary variables to preload a row or column, or do you just access each variable in memory directly? The former may generate better code on a RISC architecture and the later on a CISC architecture.

      If you provide good pointer aliasing qualifiers, I'd hope both produce about the same regardless of CISC or RISC with modern compilers, instruction schedulers and register allocators.

      These are the sort of things I think of when referring to helping the compiler, giving it hints. When that mythical smart compiler arrives that is able to figure out the preceding on its own, it will simply ignore your hints, the hints will do no harm. Until this mythical compiler arrives, the hints may help.

      When was the last time you used the register keyword in C and it had a meaningful effect? Depending on which aspect of the code you consider, the "mythical" compiler you refer to may be less mythical than you think.

      Look up the history of the Stepanov Benchmark as it applies to C++ programs, for example. It was once a hot topic among C++ compiler writers, because it exposed how awful C++ abstractions were to run time. Now most compilers ace it, sometimes producing faster code with the C++ abstractions than the C baseline they're measured against.

  46. I hope it's faster now than it used to be. by speckman · · Score: 1

    I experimented with this several years ago, and I was surprised at how slow it was. Hopefully this has improved. It was written in asm, which should be fast, of course, but it seemed like they erased all of those gains with klunky system/gui stuff. Nevertheless, very exciting!

  47. QNX? by cryoknight · · Score: 0

    Anyone remember the QNX Floppy OS
    http://www.youtube.com/watch?v=K_VlI6IBEJ0 -- They released this in 1999

    They've been making incredibly compact embedded OS's for years, that should really be what the mobile phones use.

    Congrats to the Menuet peeps for making a more modern OS that compact!

    1. Re:QNX? by unixisc · · Score: 1

      You might want to check Blackberry - they use QNX as their OS. It's also the basis of Cisco's IOS

    2. Re:QNX? by laptop006 · · Score: 1

      It's only the core of IOS-XR, and in fact will be gone in the next release (which will share a Linux core with NX-OS and IOS-XE)

      --
      /* FUCK - The F-word is here so that you can grep for it */
  48. Privilege levels in MinuetOS? by unixisc · · Score: 1

    Can't people program for Ring0-3 in assembly? I dunno about MinuetOS, but if they did, couldn't they have allowed various privilege levels for the different parts of code that were written? Use Ring0 only for a handful of routines, put the rest of the kernel stuff into ring 1, device drivers into ring 2 and other userland in ring 3??

  49. Floppy Disk? by Cloudy+Wheat+Beer · · Score: 1

    What is this "floppy disk" mentioned in the summary? It sounds weird, a disk thats floppy? how odd.

  50. Assembly has very little advantage any more by AaronW · · Score: 4, Insightful

    As someone who writes bootloaders using both C and assembly language there really is very little advantage to using assembly any more. The C compiler gnerates very good assembly code at this point that is very compact if the right parameters are used. At this point it is difficult to exceed what the compiler does in terms of code density and it's a hell of a lot easier and faster to maintain C code than assembly.

    In my last bootloader I had to fit a MMC/SD bootloader in under 8K. In that space all of the assembly code fits in the first sector along with the partition table. The assembly code sets up the stack and does some basic CPU configuration and contains the serial port routines just because I had plenty of space. The rest of the bootloader contains all of the SD/MMC driver, FAT16/32 support, CRC32 and more. Note that this is MIPS64 code. The bootloader is able to load the next stage bootloader from a file off of a bootable partition from the root directory, validate it, load a failsafe bootloader if the validation fails and launch the next bootloader, all in under 8K. Having disassembled the output using objdump the compiled code is often better than hand coded assembly since the compiler can often find a smaller sequence of instructions. Not only that, but the compiler can order the instructions better for performance since it knows the CPU pipeline quite well.

    You don't need to write in assembly for something to be small, just don't throw in a bunch of unneeded crap.

    -Aaron

    --
    This post is encrypted twice with ROT-13. Documenting or attempting to crack this encryption is illegal.
  51. The one OS that doesn't have an NSA backdoor? by Larry_Dillon · · Score: 1

    Seriously, I tried Menuet a few years ago. It's crazy fast on even ancient hardware.

    It just needs a couple of killer apps.

    --
    Competition Good, Monopoly Bad.
  52. Impressive by Anonymous Coward · · Score: 0

    I am posting this comment using the MenuetOS
    browser (running on VirtualBos). It is amazing
    that it fits on a 1.44MB floppy image.

    1. Re:Impressive by Bob+Fr · · Score: 1

      Oops - didn't mean to be anonymous. (Is there a way to edit my original comment to remove the anonymity)?

    2. Re:Impressive by Bob+Fr · · Score: 1

      OK -- replied to the wrong post and can't fix it. So much for trying to figure out this UI.

  53. Blablabla my code is faster than yours by Anonymous Coward · · Score: 0

    If you consider it efficient to write anything in assembly it can only mean one of 2 things :

      your code is executed billions of times daily. hence the ratio (timeSpentRunning*users / timeTowrite) is so huge that it is worth spending a huge amount of time writing in assmebly.

      OR your time is worth shit. i.e : machine time is worth more than your time. Personnaly I write code than runs on anything from PC to clusters and I have never encoutered a case where writing in assembly would be economically sensible (over C\C++ + python + java + whatever). this case exist, but they are rare.

      TL;DR : Interesting project for many reasons and i'm sure they have a lot of fun. Doesn't mean assembly zealots are right when they say it is "efficient" to write assembly code.

  54. IBM OS for mainframes was 100% assembly language . by porky_pig_jr · · Score: 1

    for a long time, till they came up with PL/S. The typical mainframe environment was COBOL or PL/I for application programming, assembly language for system and utilities.

  55. Portability by manu0601 · · Score: 1

    Writing code in assembly means giving up on portability. Is it wise to bet on x86 in 2013?

    We have to remember that in the early ages, Unix had its success because it was written at 98% in a high level language, which was an innovation at that time

  56. Personal definitions don't matter by dbIII · · Score: 1

    Sorry kid, the "beige box is the hard drive" bullshit doesn't trump what's in the technical dictionaries or the textbooks.
    Microsoft LOST when they tried to convince the Judge that a web browser was part of an operating system instead of a userspace application but PR and opportunism has succeeded in convincing a pile of "beige box is the hard drive" losers that gut feel trumps accepted definitions.

  57. insert condescending statment also i hate M$ by globaljustin · · Score: 1

    'sorry kid'?

    listen old timer, i don't think we disagree on anything...this isnt' about some antitrust lawsuit where M$ used some bullshit argument

    i hate M$....don't bitch at me for shit Microsoft did

    --
    Thank you Dave Raggett
  58. Here is why by dbIII · · Score: 1

    You are using Microsoft's definition that the Judge rejected instead of the textbook one. You have swallowed the bullshit argument and are attempting to propagate it. That is why I am being condescending, because by using a "personal definition" you are clearly only pretending to know what you are writing about and doing it badly enough that it's obvious that you do not. Thus a communications failure since it's mindless noise just pretending to be signal.

  59. I disprove you every day by dbIII · · Score: 1

    In my workplace we run a suite of geophysics programs of which many parts are compiled from source code that has not been touched for twenty years.

  60. show me by globaljustin · · Score: 1

    You are using Microsoft's definition that the Judge rejected instead of the textbook one

    bullshit...put up or shut up

    I want links **to both** the M$ judge and the 'textbook one'

    Links to both and then copy my original comment...when you lay out all three side by side, then list where mine is like the 'judge's' then we can talk

    otherwise you haven't made any evidence for a claim & this conversation is past over...you're projecting your hate of M$ on me dumbass...i'm on your side

    don't expect a response unless you post links to both things you are comparing my comment to

    --
    Thank you Dave Raggett
  61. Modern OS Development by Anonymous Coward · · Score: 0

    It is a crazy thing to do, because assembly is so close to the hardware, and code generators can be so efficient, but look at all the OS development being done today, mostly it's a version of Linux, Unix or Windows. Even Apple is based on Unix. There are some specialized OSs, like cell phones.

  62. ...it felt like Flynn by DrStoooopid · · Score: 1

    ...yes, it was definitely Flynn. ...END OF LINE.

    --
    There are 2 groups of people you can make fun of on the Internet without fear of attack. The illiterate, and the Amish.
  63. Artisinal or Paleo OS? by Anonymous Coward · · Score: 0

    I can't help but be amused though more by the comments.It's as if no one remembers the feat of moving beyond assembly language in the 60's and 70's.

  64. You mean you've never heard of it? by dbIII · · Score: 1

    It's got nothing to do with "hate of MS" but is instead a parallel example of this bullshit "beige box is the hard drive" shit with personal definitions based on gut feel.
    Why should I reply with links to someone who is just making up their own personal definitions anyway, it's not going to stop you doing it and get you looking up the textbook definition instead is it?

    Also, how can you possibly have never heard of MS declaring that a web browser was an integral part of the OS and the Judge telling them to fuck off with that stupid lie (at length and with more civil words) - you are on a site like this so you would have heard of it so why should I bother tracking down a link to something you've already heard about?

    1. Re:You mean you've never heard of it? by Anonymous Coward · · Score: 0

      That guy very much reminds me of APK! I'm scared...