Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-8081-

Is there any OS not written in C?

Name: Anonymous 2009-03-21 6:29

Name: Anonymous 2009-03-21 6:42

Google to fucking hard for you? How about Windows(C++) and Mac OS X(Objective C) for a start.Note that these are not, in fact, C. Then you have shit like es(javascript) and MinuetOS(asm)

Name: Anonymous 2009-03-21 6:47

Name: Anonymous 2009-03-21 6:51

>>3
I jizzed all over my morning cup of coffee.

Name: Anonymous 2009-03-21 6:58

>>2

Are you retarded? Windows and Mac OS X are both written in C.

The Mac OS X API is written in Objective C, not the fucking OS itself.

And the Windows API isn't even written in C++, let alone the OS, what the fuck are you on about?

Name: Anonymous 2009-03-21 7:00

windows is written in ASM dumbfucks .

Name: Anonymous 2009-03-21 7:06

>>6
C++

Name: Anonymous 2009-03-21 9:02

Genera
Open Genera

Name: Anonymous 2009-03-21 9:05

JX
Java OS

Name: Anonymous 2009-03-21 9:05

>>2
Windows is not coded in C++. It does have non-kernel mode components coded in C++, however a few kernel mode parts are linked with libraries developed in c++. The Windows NT Kernel is coded in C, but the design is object oriented. What does this mean? You have simple C APIs working on system objects(for example represented by a handle, to which an internal data structure corresponds).

>>6
No, at least not WinNT+. DOS and Win31, Win9x series had large parts in asm, while NT has just a few minimal parts written in asm where special instructions were needed (for interfacing with special CPU or hardware facilities) or really speed critical sections.

>>7
It has a lot of C++ parts outside of the kernel, COM/OLE is heavily C++ based internally, lots of usermode GUI stuff is written in C++ and various services are written in C++.

Name: Anonymous 2009-03-21 9:18

The BeOS API layer uses C++, although the OS itself used mostly C and assembly.

Mac OS, back when it carried the rather boring name "System Software", was written in Pascal.

NeXTSTEP uses Objective-C for nearly everything.

And for some truly arcane stuff, take a look at http://www.colorforth.com/

Name: Anonymous 2009-03-21 10:29

>>11
Mac OS, back when it carried the rather boring name "System Software", was written in Pascal.
Fuuuck. You beat me to it.

NeXTSTEP always had a kernel written in plain C, though. Hax OS X still does.

Name: Anonymous 2009-03-21 10:35

>>12
Are you sure about that? I was under the impression that Next was all ObjC, and OS X's kernel was written in C because that part was taken from BSD.

I could be wrong though, I never really looked at it much. Stopped caring about Macs after the whole BeOS thing.

Name: Anonymous 2009-03-21 10:42

>>6
Hax my anus

Name: Anonymous 2009-03-21 10:43

Haven't we done this like then times already?

Name: Anonymous 2009-03-21 10:49

>>13
The Mach kernel was definitely not Objective-C, but apparently drivers could be written in it (they ran in separate Mach servers etc.)

In OS X, IOKit drivers are written in Embedded C++, because when they started the whole thing C++ compilers sucked and using only a subset seemed a reasonable way to go. This decision is now seen as shortsighted, but on the other hand Embedded C++ leaves out most of the nasty bits that only machobullshit wannabe-übercoders love.

The eCos realtime OS is written in C++ and I bet that a lot more specialized or niche operating systems are too. Desktop OSes all have their roots in old C OSes and retooling them just isn't worth the trouble.

Name: Anonymous 2009-03-21 11:14

Name: Anonymous 2009-03-21 11:49

>>13
NeXTSTEP has always used Mach and BSD.

Name: Anonymous 2009-03-21 11:57

>>18
Apparently that is the case. I will now hax my own anus as penance for my erroneous statement.

Name: Anonymous 2009-03-21 11:59

Name: Anonymous 2009-03-21 12:04

>>20
Unfinished and abaondoned Sourceforge projects don't count.

Name: Anonymous 2009-03-21 12:07

>>About the Author
>>
>>Perl OS was created by Daniil Kulchenko. He is 11 years old and owns several large open-source projects. He can be contacted at dkulchenko@yahoo.com.

Name: !MILKRIBS4k 2009-03-21 12:11

I tried to make a operating system in QBASIC once

Name: Anonymous 2009-03-21 13:55

Singularity is written in C#.

Name: Anonymous 2009-03-21 14:32

Name: Anonymous 2009-03-21 14:48

>>20-23
Fucking script kiddies, gtfo my /prog/.

Name: Anonymous 2009-03-21 16:36

Name: Anonymous 2009-03-21 16:45

Plan9 also had some goofball assdickery underneath the hood of its OS.  They invented a language & compiling VM for it.

Name: Anonymous 2009-03-21 17:14

They invented a language & compiling VM for it.
that's not plan9.

Name: Anonymous 2009-03-21 17:35

>>22
I bet he wrote his own ANSI C compiler one year later.

Name: Anonymous 2009-03-21 19:08

http://www.codeplex.com/singularity

THE MICROSOFT VISUAL STUDIO 2008 .NET EXPRESS EDITION PROGRAMMING LANGUAGE

Name: Anonymous 2009-03-21 20:18

http://fxr.watson.org/fxr/source/?v=xnu-1228
browse code looks like c and sub-c++ for IOKIT
other kits are probably objC
xnu is the OS X kernel

Name: Anonymous 2009-03-21 20:19

>>32 some ASM too

Name: Anonymous 2009-03-21 20:27

Name: Anonymous 2009-03-21 20:46

>>29
Ah, you're right.  It's Inferno I was thinking of, the "next attempt" from the Plan9 people.

Name: Anonymous 2009-03-21 21:01

>>32
Read the fucking thread.  Nothing in kernel is objc.  Very little in non-GUI userland is objc.  Display server is not objc.  Objective-C is part of a convenience layer for application development.

Name: Anonymous 2009-03-21 22:37

>>36
Nobody cares what flavor of shit some Macfag toy OS is made from

Name: Anonymous 2009-03-21 22:47

>>37
Oh gosh, you put the word fag on the end of another word, I'm so offended.

Name: Anonymous 2009-03-21 22:48

>>38
Offendfag

Name: Anonymous 2009-03-21 22:49

>>37
You seem to have stumbled into the wrong board.  Go back to somewhere ignorance and poor taste are appreciated.

Name: Anonymous 2009-03-21 23:15

MS-DOS, FreeDOS (Asm)

Name: Anonymous 2009-03-21 23:28

>>37,39
Back to /b/ and/or /g/, please.

Name: Anonymous 2009-03-21 23:37

>>42
No tripcode, so it's probably /b/.

Name: Anonymous 2009-03-21 23:39

>>41
;/*
; *                      Microsoft Confidential
; *                      Copyright (C) Microsoft Corporation 1991
; *                      All Rights Reserved.
; */
/* convert an arbitrary based number to an integer */

#include <ctype.h>
#include "tools.h"

/* p points to characters, return -1 if no good characters found
 * and base is 2 <= base <= 16
 */
int ntoi (p, base)
char *p;
int base;
{
    register int i, c;
    flagType fFound;

    if (base < 2 || base > 16)
        return -1;
    i = 0;
    fFound = FALSE;
    while (c = *p++) {
        c = tolower (c);
        if (!isxdigit (c))
            break;
        if (c <= '9')
            c -= '0';
        else
            c -= 'a'-10;
        if (c >= base)
            break;
        i = i * base + c;
        fFound = TRUE;
        }
    if (fFound)
        return i;
    else
        return -1;
}

Name: Anonymous 2009-03-21 23:45

>>44
They have BBCODE on computers now.

Name: Anonymous 2009-03-21 23:51

>>45
>>44 used BBCODE. get a better browser.

Name: Anonymous 2009-03-22 0:02

>>44
Jesus Christ! Use [code][/code] tags! They're there for a reason.

IHBT

Name: Anonymous 2009-03-22 0:23

>>40
Poor taste? That would be any place where people defend Apple products.

Name: Anonymous 2009-03-22 0:27

Please don't feed the trolls

Name: Anonymous 2009-03-22 0:33

>>48
Apple's GUI has its flaws, but I prefer it over CDE, OpenWindows, or whatever the hell it is they include with Solaris these days.

Name: Anonymous 2009-03-22 0:39

whatever the hell it is they include with Solaris these days.
gnome.

>>47
look again.
there is a code tag there:
;/*
; *                      Microsoft Confidential
; *                      Copyright (C) Microsoft Corporation 1991
; *                      All Rights Reserved.
; */
/* convert an arbitrary based number to an integer */

#include <ctype.h>
#include "tools.h"

/* p points to characters, return -1 if no good characters found
 * and base is 2 <= base <= 16
 */
int ntoi (p, base)
char *p;
int base;
{
    register int i, c;
    flagType fFound;

    if (base < 2 || base > 16)
        return -1;
    i = 0;
    fFound = FALSE;
    while (c = *p++) {
        c = tolower (c);
        if (!isxdigit (c))
            break;
        if (c <= '9')
            c -= '0';
        else
            c -= 'a'-10;
        if (c >= base)
            break;
        i = i * base + c;
        fFound = TRUE;
        }
    if (fFound)
        return i;
    else
        return -1;
}

Name: Anonymous 2009-03-22 0:46

>>51
Needs more codes tags. IHBTA

Name: Anonymous 2009-03-22 0:46

>>52
*code

Name: Anonymous 2009-03-22 2:33

>>44
What has been seen cannot be unseen.
The viral nature of proprietary software has infected me.

Name: Anonymous 2009-03-22 3:20

Haiku is written in C++.

Name: Anonymous 2009-03-22 4:01

>>54
at least you're not required to distribute it now like you would be if it were that viral GNU diarrhea.

Name: Anonymous 2009-03-22 5:17

>>54
Never forget the concepts of fair use, trivial samples (a trivial hello world program, a trivial section of a larger work) and the fact that copyright only covers the specific implementation of an expression and not the expression itself.

Name: Anonymous 2009-03-22 11:09

>>57
The power of the imaginary property compels you.

Name: Anonymous 2009-03-22 12:04

Anything worth mentioning is written in C.

Which kinda blows because I have to deal with primitive C retardation when doing my operating systems course projects.

Name: Anonymous 2009-03-22 13:32

you cant write an OS in anything other than C because you need to bootstrap the system somehow

Name: Anonymous 2009-03-22 13:41

if you think C is primitive then drop out of school because you wont be able to take it in the real world

Name: Anonymous 2009-03-22 13:42

>>60
IHBT, but how does that limit the language used?

Name: Anonymous 2009-03-22 13:51

>>61
If you think C isn't primitive, you belong in the 1950s.

Name: Anonymous 2009-03-22 14:22

>>63
it isnt primitive, it gives the programmer all the tools he needs to do anything he wants. if you cant handle that, then youre a primitive programmar and should stick with ruby programmering on your rails

Name: Anonymous 2009-03-22 14:22

>>63
Protip: There was no C in the 1950s.

Name: Anonymous 2009-03-22 14:23

>>63
Protip: There was no C in the 1950s.

Name: Anonymous 2009-03-22 14:59

>>66
So they did not think C was primitive. >>63 is right, you know that?

Name: Anonymous 2009-03-22 16:46

>>64
It's primitive and doesn't even have usable macros.

>>65,66
No shit. The point is that C lacks basic features that predate it by decades.

Name: Anonymous 2009-03-22 16:53

>>68
I've been programming C since the early 80s and can safely say the macros work fine. Perhaps you should stick to programming toy programs in FIOC.

Name: Anonymous 2009-03-22 17:08

>>68
The point is that C lacks basic features that predate it by decades.
C was designed to be a minimalist language that was easily portable. Complain all you want that it lacks features, but it takes a long time for any feature to gain widespread adoption(see Garbage Collection) and why bother including non-mainstream features in a language that is designed to be as small as possible.

Name: Anonymous 2009-03-22 17:24

(see Garbage Collection)
See LISP

Name: Anonymous 2009-03-22 17:39

>>70
C could have at least included keyword arguments and useful macros (no, >>69, the macros do not work fine: there's no way to put logic in your code generation).

Name: Anonymous 2009-03-22 17:55

>>44
what.
why would they not just do this instead?
int ntoi(char *p, int base)
{ register int i = 0, fFound = 0;
  if(1 < base && base < 37)
    for(register int c;
        fFound |= (isdigit(c = tolower(*p++)) &&
                   (c -= c <= '9' ? '0' : 'a' - 10) < base);
        i = i * base + c);
  return fFound ? i : -1; }

Name: Anonymous 2009-03-22 17:58

((no, >>69, the macros do not work fine: there's no way to put logic in your code generation)
if you use gcc, there is.

Name: Anonymous 2009-03-22 18:32

>>74
If I used gcc, I would have two problems.

But explain yourself anyway.

Name: Anonymous 2009-03-22 19:11

>>75
#ifdef

Name: Anonymous 2009-03-22 19:30

>>76
I'm talking about proper meta-programming logic, not your mickey mouse conditional ifs.

Name: Anonymous 2009-03-22 19:33

>meta
Back to /b/, please

Name: Anonymous 2009-03-22 19:35

>>78

You don't know what meta means in this context, get the fuck off /prog/

Name: Anonymous 2009-03-22 19:40

>>76
Oh, wow. That's what you think code generation is?

Name: Anonymous 2009-03-22 20:29

>>79
Please don't feed the troll

Name: Anonymous 2009-03-22 21:55

>>72,79
enjoy your infinite compile times with your touring-complete macros.

Name: Anonymous 2009-03-22 22:07

>>82
What about my touring-complete macros?

Name: Anonymous 2009-03-22 22:08

>>83
enjoy them

Name: Anonymous 2009-03-22 22:09

>>84
I will, along with my job.

Name: Anonymous 2009-03-22 22:14

>>85
Sick burn, I literally saw the smoke from the of the thread list. Nice one

Name: Anonymous 2009-03-22 22:33

>>85
XDDD XFD LOOL ROLFLOL A GRAT BIG ONE XD

Name: Anonymous 2009-03-22 22:36

>>85
you enjoy writing java?

Name: Anonymous 2009-03-22 23:41

>>86-88
We are being trolled at the rate of an Ackermann function for which m = 5 and n is the independent variable.

Name: Anonymous 2009-03-23 1:51

>>79
meta in the context of macros
Sepples STL

Name: Anonymous 2009-03-23 1:59

>>89
We need a script to hide troll posts.

Name: Anonymous 2009-03-23 2:00

>>89
Jesus fuck I'm not sure I can handle that.

Name: Anonymous 2009-03-23 6:12

>>91
But then the room would be empty.

Name: Anonymous 2009-03-23 6:21

>>93
And thus, I would be enlightened.

Name: Anonymous 2010-02-08 13:24

bump

Name: Anonymous 2010-02-08 13:43

>>95
Now that you've bumped it, I feel compelled to respond to some posts:

>>60
Nonsense, you can write it in whatever language you want, as long as you extend the language to be able to emit lower-level code too (such as asm), or link to asm somehow. The usual idea when writing an OS in a language that was not originally meant to be used for such purposes is to simply extend it to have a low-level layer library, possibly something for emitting assembly code for the target platform, and preferably a native compiler for your language. Others have also tried doing this in another way: compile to bytecode, and make the VM that interpreters or JITs that bytecode, or even make a CPU(or program a microcoded CPU) whose machine code is the same as the bytecode. It's also true that some languages may be badly designed and unsuitable for OS design(I shudder at the thought of a PHP OS for example), but most well-designed languages should be usable with some extensions.
>>82
Well designed real macros aren't really that slow, and compile times tend to be reasonable, and unlike edit,compile&link languages, languages which have real macros usually allow you to dynamically recompile any function you want, which makes the cost considerably smaller. It also makes live patching of the OS, kernel or any application a painless procedure - no more bringing down the system to do updates.

Name: Anonymous 2010-02-08 15:07

or even make a CPU(or program a microcoded CPU) whose machine code is the same as the bytecode
This has been done with Java. All it is is a CPU with a super-CISC instruction set, if you think about it.

Name: Anonymous 2010-02-08 15:17

>>97
Yes, I've seen some Java CPUs, which are even open-source, and  the Lisp Machine CPUs which were microcoded, and source is also available.

Don't change these.
Name: Email:
Entire Thread Thread List