News for hackers. Stuff that matters.
Re:C (Cbang) - A system oriented programming language by Arelius on Wednesday May 09, 2012 @01:15PM (#3949512)
Interesting that none of those systems are in active usage...

> Eventually all mainstream OS will have such type of languages and C will be legacy.

That's just speculation. Personally I have high hopes for languages with optional-only GC, and much stricter memory management principals. Ala, Rust.

Re:C (Cbang) - A system oriented programming language by pjmlp on Wednesday May 09, 2012 @01:28PM (#3949583)
Windows and Mac OS X are, and they are slowly incorporating such changes, as I mentioned.

Don't forget that UNIX was once upon a time a research operating system, and took a few decades to have industry impact.

New ideas take time to mature.

Re:C (Cbang) - A system oriented programming language by calloc on Wednesday May 09, 2012 @02:04PM (#3949768)
Objective-C isn't used in XNU the kernel that Mac OS X uses, Mach is a mixture of C and C++ (A subset of it actually, known as IOKit).
Re:C (Cbang) - A system oriented programming language by pjmlp on Wednesday May 09, 2012 @02:17PM (#3949816)
System programming is more than just the kernel.

I imagine that the kernel can easily compiled with the Objective-C or Objective-C++ compiler, if Apple so wishes.

Re:C (Cbang) - A system oriented programming language by kelnos on Thursday May 10, 2012 @08:46PM (#3956963)
You "imagine" incorrectly. A functioning Obj-C requirement requires a runtime. Currently that runtime (libobjc) is written in C, and it requires a C library to function. Yes, you can rewrite those portions to use only functions available in kernel-land, but it is by no means "easy" as you suggest.
Re:C (Cbang) - A system oriented programming language by pjmlp on Friday May 11, 2012 @02:48AM (#3958042)
This just goes to show you don't understand compilers.

All languages require runtimes, even C. The thing is that C as high level assembler it is, uses the operating system as its runtime.

The C language is also part of Objective-C, in a similar vein as C++ also supports most of the C89 features with small exceptions.

So it is possible to have the Objective-C runtime compiled using the C subset of Objective-C. This is known as compiler bootstrapping.

Re:C (Cbang) - A system oriented programming language by kelnos on Sunday May 13, 2012 @07:51PM (#3968802)
This just goes to show you don't understand compilers.

No, admittedly, I don't, at any more than a basic level. But you're still wrong.

Try compiling, linking, and running an ObjC program without the ObjC runtime. See how that fails. See how long it takes you to write a minimal runtime that can run your program in user-space, and then kernel-space. It won't be quick.

Try compiling, linking, and running a plain-vanilla C program without the "C runtime" (I guess you mean a combination of libc, libgcc, and crt.o, basically what you get when you pass -nostdlib -nostartfiles to gcc). Yep, that'll fail too. Then get it to compile and run anyway. Not that hard.

That's* the difference I'm talking about.

At the very least, kernels like Linux and Mach/Darwin already have kernel-friendly replacements for the libc functionality they commonly use. Doing something similar for ObjC would be time consuming. Certainly it isn't impossible, but note that I never said that: I merely pointed out it wasn't easy.

Re:C (Cbang) - A system oriented programming language by Arelius on Friday May 11, 2012 @01:20PM (#3960255)
C hardly requires it's runtime. Objective-C without the runtime is just C, if you write the runtime, GC, and other low-level system components in the C subset of Objective-C you are just writing the kernel in C.
Re:C (Cbang) - A system oriented programming language by pjmlp on Saturday May 12, 2012 @01:20AM (#3962858)
Technically you will be using the Objective-C compiler, so it is still Objective-C even if the syntax looks like C.

The same applies if you would be using the C subset of a C++ compiler.

Re:C (Cbang) - A system oriented programming language by Arelius on Saturday May 12, 2012 @01:50AM (#3962924)
This is in the original context of how all systems will be written in "GC enabled system programming languages". If the language is not GC enabled due to missing a runtime or w/e then the technicality isn't relevant.
Re:C (Cbang) - A system oriented programming language by pjmlp on Saturday May 12, 2012 @03:53AM (#3963158)
What is relevant, is that universities and some companies seem to have another opinion.

I am old enough to remember the days when UNIX and C were funny research projects. Look at them now.

So I leave you with a list of research projects for the boring days, when you don't have anything to read.

http://www-spin.cs.washington.edu/

http://www.oberon.ethz.ch/archives/systemsarchive/native_new

http://www.ocp.inf.ethz.ch/wiki/Documentation/Front

http://www.jnode.org/

http://www.jnode.org/node/175

http://programatica.cs.pdx.edu/House/

http://hasp.cs.pdx.edu/

http://research.microsoft.com/en-us/projects/singularity/

http://cosmos.codeplex.com/

http://www4.cs.fau.de/Projects/JX/

http://wiki.xomb.org/index.php?title=Main_Page

Re:C (Cbang) - A system oriented programming language by Arelius on Saturday May 12, 2012 @04:53AM (#3963264)
The problem, is that at the end of the day, some code somewhere is going to have to deal with resource allocation. Generally speaking with all the other fluff aside, an operating system, fundamentally manages and multiplexes resources. It's naive to think that resource management would be best done in a language with automatic GC. Somebody

I don't doubt that C is not the systems programming language of the future. But it's not going to be done in a system that's based around automatic GC either.

Re:C (Cbang) - A system oriented programming language by pjmlp on Saturday May 12, 2012 @05:39AM (#3963356)
Read the papers of proven work, instead of stating your beliefs.
Re:C (Cbang) - A system oriented programming language by Arelius on Sunday May 13, 2012 @01:53PM (#3967676)
You use the word proven as if it means something. The work you list is no more proven in terms of building production systems than any other research work.

Additionally, I find it interesting to note, that if you had in fact been very familiar with all the work you mention. You should actually have noted that many of these systems go through significant effort to sidestep the GC.

Re:C (Cbang) - A system oriented programming language by pjmlp on Monday May 14, 2012 @03:07AM (#3969838)
It is proven, because groups of people went through the effort of spending time and effort implementing those systems and used them for daily work as well.

It not just talk about some guys showing up papers at OS geek conferences.

The Oberon Native for example, was for long time the main operating system at the operating system research department at ETHZ. Most researchers used it as their daily OS for all tasks you can think of.

http://www.ethoberon.ethz.ch/WirthPubl/ProjectOberon.pdf

The GC was done at kernel level. Besides Oberon code, there is just a little bit of assembly for the device drivers and boot loader.

Re:C (Cbang) - A system oriented programming language by jff on Wednesday May 09, 2012 @02:11PM (#3949793)
> Interesting that none of those systems are in active usage...

That's a ridiculous dismissal to make; we live in a world where hand-written assembly is considered a badge of honor, where people prefer to patch up a 40-year-old dinosaur rather than make something new, where people to go ridiculous lengths to avoid using a mouse simply because Unix didn't have mouse support in 1973. Is it any wonder that we're not using anything better?

Re:C (Cbang) - A system oriented programming language by Arelius on Friday May 11, 2012 @02:51PM (#3960704)
> we live in a world where hand-written assembly is considered a badge of honor

Even in video games where this held true for longer, this is generally no longer the case.

> where people prefer to patch up a 40-year-old dinosaur rather than make something new

Also not true, Generally engineers prefer to make new things, The problem is that, creating new products from scratch to replace old ones ends up almost always being more effort than expected. Failure, is what causes patching the dinosaur the better approach, rather then engineering desires, Netscape is a classic example.

> where people to go ridiculous lengths to avoid using a mouse simply because Unix didn't have mouse support in 1973

I don't know what world you live in, because in the world I live in, computers with mice are much more popular than the alternative.

The fact that none of these systems are in usage is true, you can make excuses for them, but the fact of the matter is that there is a lot of smart people trying, and very little success. There is little evidence to support that this is a superior approach.