Posted: Wed Apr 30, 2008 2:19 pm Post subject: Languages written in their own langauge
Hello again
My questions may start to get a little more technical. This one is regarding the source code used to write a language.
Do you care if a language can write itself? Forth is written in Forth. C is written in C with a little bit of native chip assembler. Not too many other languages have this as native feature. Note; any Turing Complete language can be used to write itself, but I'm discussing a feature of the language more native than creating machine code in a scripting language and pretending that that is a self boot image. Ignore the whole machine code or assembler to boot strap an initial executable that can then be tossed away issue.
If you do care, (or think it's neat if not all that useful in day to day coding), would you target PE-COFF or ELF if you were writing a language from scratch?
Me; I'm a little leary of PE-COFF and the whole proprietary nature of MS, but the target audience is orders of magnitudes larger. Are you bothered by such issues? Should a language destined for self bootable image writing start out closely linked to an OS or link formats used? Would a language that had a feature of creating self bootable images be a reason for you to check it out?
Within all those questions, the main one of interest to me today is PE-COFF or ELF. But I'd also like your feedback on the more cerebral questions as well.
Thanks once again.
Sponsor Sponsor
wtd
Posted: Wed Apr 30, 2008 3:25 pm Post subject: RE:Languages written in their own langauge
Just a few: Lisp, Forth, Pascal, Delphi, C, Modula-2, Oberon, Smalltalk, OCaml, and FreeBASIC.
btiffin
Posted: Wed Apr 30, 2008 5:37 pm Post subject: Re: RE:Languages written in their own langauge
wtd @ Wed Apr 30, 2008 3:25 pm wrote:
Just a few: Lisp, Forth, Pascal, Delphi, C, Modula-2, Oberon, Smalltalk, OCaml, and FreeBASIC.
Ok you got me. But I hope you see where I'm going with this question. As before, any Turing Complete language is capable, but I'm curious about whether up and coming coders care about such issues. Most of the languages I use on a regular basis except GForth, ship with (or are built from) C sources. Niklaus Wirth really is a shiny example of a designer that built this type of capability into most of his creations. And yes you are correct, it may not be as rare as I hinted at. Though I've never seen a Pascal written in Pascal; now you've made me curious to go look.
Cheers
wtd
Posted: Thu May 01, 2008 12:00 am Post subject: RE:Languages written in their own langauge
Language designers who really like their language tend to prefer to use it to build their language.
btiffin
Posted: Thu May 01, 2008 12:40 am Post subject: Re: RE:Languages written in their own langauge
wtd @ Thu May 01, 2008 12:00 am wrote:
Language designers who really like their language tend to prefer to use it to build their language.
Umm, not that I like to temp fate and argue with a compsci god, but I'll disagree. My heroes Carl, Guido, Larry, Matz, Bertrand, Ralph, ..., all love their designs, but still use C to pump out binaries. John and Chuck are notable exceptions along with Niklaus. Does James have a Java that drives Java yet? I know he wants to, but got stuck in a sandbox last I heard (a long time ago, I'll admit). No idea what drives the Digitalmars D compiler, but I'd bet Walter wants it in D sooner than later.
To be honest, one of the things I learnt about computer science a long time ago; I haven't got a clue when it comes to the depth and breadth of the field.
Keep up the good works wtd; I like to be kept on my toes and honest when I post here. Especially when impressionable youth are at risk of potentially believing the ramblings of an old guy.
Main question still stands PE-COFF or ELF?
Cheers
Clayton
Posted: Thu May 01, 2008 7:38 am Post subject: RE:Languages written in their own langauge
I think you'll find wtd to not be "today's youth", though it's hard to say not knowing how old you are
btiffin
Posted: Thu May 01, 2008 9:53 am Post subject: Re: RE:Languages written in their own langauge
Clayton @ Thu May 01, 2008 7:38 am wrote:
I think you'll find wtd to not be "today's youth", though it's hard to say not knowing how old you are
Sorry, I'm not worried about corrupting or misleading wtd, I can tell he has an excellent grasp of the compsci reality. And that, not overly common, human ability to see through fud and incorrect or mis information.
Just so everyone knows. I'm 44 going on 80. Spent most of my young days working in Forth on Digital Vax hardware running OpenVMS, and ignored most of the personal computer and web trends through the 80, 90s. Then I dropped out of coding from 2001 till just last year, so I completely ignored the trends of the first half of the 00s. I sold work boots/army surplus and pounded nails for those years. I'm still playing catch up. Much to learn and compsci.ca has been a great place for me and my curiosity. And I'll apologize, I may be posting misinformation as I catch up - but I'll add, never on purpose, just by ignorance. And I don't mind being corrected. I would prefer that over someone taking what I spew as valid when it is not.
Oh yeah, and I overuse smilies ... just so everyone knows I'm more clown than judge or jury. Compsci is a serious business, but it is also way fun.
Still stands. Opinions on PE-COFF or ELF?
Cheers.
wtd
Posted: Thu May 01, 2008 11:39 am Post subject: RE:Languages written in their own langauge
Binary formats are, for 99.99999% of the computing world these days irrelevant. In other words... I have no opinion either way as long as it all works correctly.
You are older than I, and by more than I am older than most of the others here.
Sponsor Sponsor
btiffin
Posted: Thu May 01, 2008 2:50 pm Post subject: Re: RE:Languages written in their own langauge
wtd @ Thu May 01, 2008 11:39 am wrote:
Binary formats are, for 99.99999% of the computing world these days irrelevant. In other words... I have no opinion either way as long as it all works correctly.
Thanks muchly; that's just the kind of statement of opinion I was hoping for.
wtd @ Thu May 01, 2008 11:39 am wrote:
You are older than I, and by more than I am older than most of the others here.
Yep. Old Guy. Here more to play catch up on on the nice things I missed out on over the last 6 years. Well that, and to satisfy my curiosities about the up and comers and general computer science trends. Hope people here don't mind too too much.
Cheers
shaon
Posted: Sat May 24, 2008 11:12 am Post subject: Re: Languages written in their own langauge
What about java? what is java written in?
btiffin
Posted: Sat May 24, 2008 11:58 am Post subject: RE:Languages written in their own langauge
Last I looked, the JVM's are ANSI C and the frontend compilers are Java. Sun's implementation anyway. gcj, being part of gcc is mostly C and CC source files but I don't keep up with these things. Things have stabilized so much over the last 5 years that binary packages are just easier to deal with than the source tar balls.
There is something about GNU Java moving to an Eclipse frontend. So it's all just bloat to me.
C is a good language to know. imho, it is the grandaddy of pretty much everything cool in computing now-a-days. Even my favourite, REBOL, is written in C. But (and the reason for the thread in the first place) my second favourite, polyForth, is written in polyForth.
Cheers
michaelp
Posted: Sat May 24, 2008 1:47 pm Post subject: RE:Languages written in their own langauge
I'm just wondering: How can you write a language in its own language?
Tony
Posted: Sat May 24, 2008 1:57 pm Post subject: RE:Languages written in their own langauge
Same way you write a language in any other language.
Assuming there exists a language Foo with a compiler for it written in C.
You write the code in Foo, for the compiler for Foo. You create your new compiler same as you would have any other Foo program. Then use this new compiler to compile itself. And BAM! You no longer need the compiler written in C.
Posted: Sat May 24, 2008 11:33 pm Post subject: RE:Languages written in their own langauge
And then there's the libraries, which is a big part of a language itself. Java's library is mostly written in Java, and you can the source for all packages if you unzip the 'src' file in the install directory. There are some complex and super basic methods that are native, though. At lot of Object's methods are native (through JNI, which is still part of the language I guess )
Dan
Posted: Sun May 25, 2008 7:52 am Post subject: Re: RE:Languages written in their own langauge
michaelp @ 24th May 2008, 1:47 pm wrote:
I'm just wondering: How can you write a language in its own language?