New programming lang.

Programming, for all ages and all languages.
User avatar
mathematician
Member
Member
Posts: 437
Joined: Fri Dec 15, 2006 5:26 pm
Location: Church Stretton Uk

Post by mathematician »

bloodhound23 wrote:Before I give this a go, do you not realize that I can just disassemble this and look at the asm version?
That had occurred to me, but, since you are eschewing assembly language, that would be cheating wouldn't it?
User avatar
bewing
Member
Member
Posts: 1401
Joined: Wed Feb 07, 2007 1:45 pm
Location: Eugene, OR, US

Post by bewing »

I am also very strongly tempted to create my own language. K&R C was quite nice. But ANSI mangled the language when they got their ugly mitts on it. What I am tempted to do is (in some sense) to recreate K&R C -- but then take it in the opposite direction of ANSI C, to its logical extreme.

The reason I think I can get away with this, is that I am probably going to be starting my own company in the fairly near future, to do manufacturing and prototyping. I will need to hire a programmer or two. And, as the boss, I can insist that my programmers work in my language. And even if all my source code gets dumped all over the web, it will still be completely proprietary, because nobody but me will have the compiler.

But please, 250MB of source code for GCC? If that's what it takes to compile C++ code, then there is a serious problem with that language.
User avatar
bloodhound23
Member
Member
Posts: 115
Joined: Wed Jan 23, 2008 7:13 pm
Contact:

Post by bloodhound23 »

mathematician wrote:
bloodhound23 wrote:Before I give this a go, do you not realize that I can just disassemble this and look at the asm version?
That had occurred to me, but, since you are eschewing assembly language, that would be cheating wouldn't it?
mathematician: you're on, it's late at the moment though so...
I thought I wasn't thinking, I thought wrong.
niteice
Member
Member
Posts: 59
Joined: Tue Oct 03, 2006 3:49 pm

Post by niteice »

bewing wrote:But please, 250MB of source code for GCC? If that's what it takes to compile C++ code, then there is a serious problem with that language.
You get a lot in there:
  • (Objective-)C
    (Objective-)C++
    Ada
    Fortran
    Java
and that's just languages. Let's not forget:
  • C preprocessor
    libffi
    several libraries (most of which are easily reusable)
    standard libraries/runtimes for all of the above languages
The C++ code itself isn't that huge.
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Post by Brynet-Inc »

bewing wrote:But please, 250MB of source code for GCC? If that's what it takes to compile C++ code, then there is a serious problem with that language.
To be fair, gcc-core-4.2.2.tar.bz2 is 18657 KB.. and that's the C compiler.. gcc-4.2.2.tar.bz2 includes the ada/fortran/C++/java and objective-C compilers. (Plus test suites for each of those..).

GCC does stand for GNU Compiler Collection after all.. ;)

The BSD's are working on reviving the old PCC compiler, (It was the one they used before switching to GCC...) - It's only 300 KB or so..
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
User avatar
binutils
Member
Member
Posts: 214
Joined: Thu Apr 05, 2007 6:07 am

Post by binutils »

bewing wrote:I am also very strongly tempted to create my own language. K&R C was quite nice. But ANSI mangled the language when they got their ugly mitts on it. What I am tempted to do is (in some sense) to recreate K&R C -- but then take it in the opposite direction of ANSI C, to its logical extreme.

The reason I think I can get away with this, is that I am probably going to be starting my own company in the fairly near future, to do manufacturing and prototyping. I will need to hire a programmer or two. And, as the boss, I can insist that my programmers work in my language. And even if all my source code gets dumped all over the web, it will still be completely proprietary, because nobody but me will have the compiler.

But please, 250MB of source code for GCC? If that's what it takes to compile C++ code, then there is a serious problem with that language.
size:
http://fabrice.bellard.free.fr/tcc/

style:
http://plan9.bell-labs.com/magic/man2html/1/2c

HTH

--
PS: btw, no c++ is there.
User avatar
bloodhound23
Member
Member
Posts: 115
Joined: Wed Jan 23, 2008 7:13 pm
Contact:

Post by bloodhound23 »

I restarted in C and asm using GRUB as my bootloader. I'll write my bootloader sometime in the future.
mathematician: your off
I thought I wasn't thinking, I thought wrong.
User avatar
Jef
Member
Member
Posts: 112
Joined: Tue Jan 08, 2008 7:25 am
Location: Greece
Contact:

Post by Jef »

I miss the point....
What is that make your language spacial for creating an OS ?

btw, is there a C compiler that not uses windows libraries and outputs a native executable (like old .com files) ?
I mean like compiling with nasm assembler.
Keep coding...
...the sky is the limit

AsteriOS project: http://www.mindfields.gr/main/index.php ... &Itemid=27
User avatar
Alboin
Member
Member
Posts: 1466
Joined: Thu Jan 04, 2007 3:29 pm
Location: Noricum and Pannonia

Post by Alboin »

Jef wrote:btw, is there a C compiler that not uses windows libraries and outputs a native executable (like old .com files) ?
I mean like compiling with nasm assembler.
Nwcc can produce output for various assemblers. (fasm, nasm, yasm.)
C8H10N4O2 | #446691 | Trust the nodes.
User avatar
inflater
Member
Member
Posts: 1309
Joined: Thu Sep 28, 2006 10:32 am
Location: Slovakia
Contact:

Post by inflater »

Alboin wrote:Nwcc can produce output for various assemblers. (fasm,...)
You really think so? There is no such thing as "output" in FASM, except the final application. You can't link any object file in fasm. ;)

Regards
inflater
My web site: http://inflater.wz.cz (Slovak)
Derrick operating system: http://derrick.xf.cz (Slovak and English :P)
User avatar
Alboin
Member
Member
Posts: 1466
Joined: Thu Jan 04, 2007 3:29 pm
Location: Noricum and Pannonia

Post by Alboin »

inflater wrote:
Alboin wrote:Nwcc can produce output for various assemblers. (fasm,...)
You really think so? There is no such thing as "output" in FASM, except the final application. You can't link any object file in fasm. ;)
My bad, you're correct. There is no fasm back end. (yasm, nasm, and gas.)

Note, however, that by 'output', I meant assembly language output. So, I don't see why a fasm back end wouldn't be possible.
C8H10N4O2 | #446691 | Trust the nodes.
User avatar
bloodhound23
Member
Member
Posts: 115
Joined: Wed Jan 23, 2008 7:13 pm
Contact:

Post by bloodhound23 »

now just gas assembler. :D
I thought I wasn't thinking, I thought wrong.
User avatar
bloodhound23
Member
Member
Posts: 115
Joined: Wed Jan 23, 2008 7:13 pm
Contact:

Post by bloodhound23 »

fasm actually :D :D
I thought I wasn't thinking, I thought wrong.
User avatar
bloodhound23
Member
Member
Posts: 115
Joined: Wed Jan 23, 2008 7:13 pm
Contact:

Post by bloodhound23 »

in a custom assembler actually, I shall call it mokasm. :D :D
yeah I changed my mind a lot, but I swear this is the last time I do it. If I'm not going to create a compiler I might as well make an assembler(it's a little simpler)
I thought I wasn't thinking, I thought wrong.
User avatar
djtrickdog
Member
Member
Posts: 39
Joined: Sat Dec 15, 2007 7:36 pm

Post by djtrickdog »

better yet, you should make a C/C++/ASM based programming tool that bundles important codes together to make OS development Super fast. Example is to use one line of code say "Set_Pmode(parimeters)" would set your os into protected mode. That would all be front end but behind the scene they are actually writing the actual "long" code.

With this OS development would fly
Post Reply