Some language not implemented in C?

Discussion in 'C Programming' started by neoedmund, Mar 6, 2009.

  1. neoedmund

    neoedmund Guest

    I found most other languages are implemented in C, such as Java,
    Python, etc...
    could you give me something not?
    neoedmund, Mar 6, 2009
    #1
    1. Advertising

  2. neoedmund

    neoedmund Guest

    On Mar 6, 6:17 pm, neoedmund <> wrote:
    > I found most other languages are implemented in C, such as Java,
    > Python, etc...
    > could you give me something not?


    other than "asm" and "cpu hex code"
    neoedmund, Mar 6, 2009
    #2
    1. Advertising

  3. neoedmund

    user923005 Guest

    On Mar 6, 1:17 am, neoedmund <> wrote:
    > I found most other languages are implemented in C, such as Java,
    > Python, etc...
    > could you give me something not?


    Languages can be implemented in any language.
    For instance, you can get the Gold Parser Generator, get a Gold
    grammar, and then generate the language parser in any supported
    language:
    ANSI C
    Assembly - Intel x86
    C#
    C++
    D
    Delphi
    Java
    Pascal
    Python
    Visual Basic
    Visual Basic .NET
    All .NET languages
    All ActiveX languages

    So the burning question is:
    Why is C used a lot to build compilers?
    The answer is because C is pretty much a portable assembler (some
    might call it 'PASM' but that would probably just generate command
    line driven trash). Anyway, since optimizing C compilers tend to
    generate snazzy assembly language for lots and lots of target systems,
    it is a natural choice. However, to answer your original question, I
    have used a Pascal compiler that was written in Pascal. Sounds
    recursive, but it's not. C compilers are usually written in C also.
    user923005, Mar 6, 2009
    #3
  4. neoedmund

    Chris Dollin Guest

    neoedmund wrote:

    > I found most other languages are implemented in C, such as Java,
    > Python, etc...
    > could you give me something not?


    Pop11, Prolog, Standard ML, and Common Lisp all have not-implemented-in-C
    implementations.

    Many SmallTalks.

    BBC Basic.

    Algol W.

    Algol 68.

    --
    RIP Ian Carr, 21-Apr-1933 -- 25-Feb-2009 /Things Past/

    Hewlett-Packard Limited registered no:
    registered office: Cain Road, Bracknell, Berks RG12 1HN 690597 England
    Chris Dollin, Mar 6, 2009
    #4
  5. neoedmund

    Guest

    On 6 Mar, 09:17, neoedmund <> wrote:
    > I found most other languages are implemented in C, such as Java,
    > Python, etc...
    > could you give me something not?


    How about Java?

    A Java Virtual Machine - the thing that interprets compiled Java
    bytecode - does not need to be implemented in C, and there are
    implementations which are not written in C. See (e.g.) http://jikesrvm.org/

    Java compilers - which read Java language source and generate bytecode
    - are commonly written in Java. One exception is the jikes java
    compiler which is implemented in C++.
    , Mar 6, 2009
    #5
  6. neoedmund

    Bartc Guest

    neoedmund wrote:
    > I found most other languages are implemented in C, such as Java,
    > Python, etc...
    > could you give me something not?


    What do you have against C?


    --
    Bartc
    Bartc, Mar 6, 2009
    #6
  7. neoedmund

    Mark Wooding Guest

    neoedmund <> writes:

    > I found most other languages are implemented in C, such as Java,
    > Python, etc...
    > could you give me something not?


    Many compilers are written in the language they compile. Many Lisp and
    Scheme implementations are like this, as is the Glasgow Haskell
    Compiler, Standard ML of New Jersey, and so on. I'm pretty sure Sun's
    Java compiler is written in Java too.

    C tends to get used to write the runtime systems for these languages --
    providing garbage collection and other low-level services -- because
    it's more portable than assembler and still low-level enough to do the
    job. There are exceptions, however.

    For example, the entire runtime system for the famous T compiler (a
    highly optimizing native-code compiler for a dialect of Scheme) was
    itself written in T -- including the garbage collector, which was
    carefully constructed using deep knowledge of the compiler's behaviour
    so as not to allocate any objects on the heap while it was running.

    The Armed Bear Common Lisp system is implemented in a mixture of Java
    and Lisp; most of the runtime system is written in Java, including the
    interpreter, but the compiler (targetting JVM bytecodes) is written in
    Lisp, as is much of the library.

    The Squeak Smalltalk system is entirely written in Smalltalk, including
    the runtime system. The runtime is actually written using a subset of
    Smalltalk which is, I believe, compiled into C and thence to native
    code. But there's no reason in principle why it couldn't be compiled
    directly to assembler or native code.

    -- [mdw]
    Mark Wooding, Mar 6, 2009
    #7
  8. neoedmund

    Gene Guest

    On Mar 6, 4:17 am, neoedmund <> wrote:
    > I found most other languages are implemented in C, such as Java,
    > Python, etc...
    > could you give me something not?


    The GNAT Ada compiler is implemented in Ada. (There is a bit of C to
    connect libraries and runtime support.)
    Gene, Mar 6, 2009
    #8
  9. neoedmund

    Guest

    On Mar 6, 8:38 am, Mark Wooding <> wrote:
    > neoedmund <> writes:
    > > I found most other languages are implemented in C, such as Java,
    > > Python, etc...
    > > could you give me something not?

    >
    > Many compilers are written in the language they compile.  Many Lisp and
    > Scheme implementations are like this, as is the Glasgow Haskell
    > Compiler, Standard ML of New Jersey, and so on.  I'm pretty sure Sun's
    > Java compiler is written in Java too.



    I'm not sure exactly how you meant "many," but only a very small
    fraction of compilers in existence are self-hosted, although that's
    not an inconsequential total number, and they're highly represented in
    the set of compilers people commonly use. The vast majority are for
    small languages that are utterly unsuited to hosting a compiler. And
    even for many languages that nominally implement the same language
    they're written in, they cannot self host because the target platform
    is utterly incapable of running that big a program.

    But to the OP: I've also seen Cobol, Basic and Fortran compilers
    written in their respective languages, not that I'd really recommend
    any of those languages for compiler writing.

    A compiler is a fairly ordinary program, and should be written in a
    language that makes it easy to write, deploy, support, etc.
    , Mar 6, 2009
    #9
  10. neoedmund

    Sjouke Burry Guest

    neoedmund wrote:
    > I found most other languages are implemented in C, such as Java,
    > Python, etc...
    > could you give me something not?

    English,Latin,...............etc
    Sjouke Burry, Mar 7, 2009
    #10
  11. In article <> Gene <> writes:
    > On Mar 6, 4:17=A0am, neoedmund <> wrote:
    > > I found most other languages are implemented in C, such as Java,
    > > Python, etc...
    > > could you give me something not?

    >
    > The GNAT Ada compiler is implemented in Ada. (There is a bit of C to
    > connect libraries and runtime support.)


    The CDC Algol 68 compiler was implemented in SIMPL. But I know of an
    Algol 60 compiler implemented in C. Strange, as C postdates Algol 60
    by quite a bit ;-).

    I know for sure that Python was implemented in C because that was at that
    time about the only compiler available on the machines on which Python was
    first implemented. Doing the same thing in Fortran would have been insane.
    But if Guido reads this he probably can give particulars ;-). (I disremember
    on which machine actually the first version of Python was developed, but it
    must have been not much more than 100 meters from my workplace.)

    It is only because C is as a programming language so widely available.
    --
    dik t. winter, cwi, science park 123, 1098 xg amsterdam, nederland, +31205924131
    home: bovenover 215, 1025 jn amsterdam, nederland; http://www.cwi.nl/~dik/
    Dik T. Winter, Mar 7, 2009
    #11
  12. neoedmund

    Stefan Ram Guest

    Marek Kubica <> writes:
    >the Java compiler is written in Java.


    This might be true. On a web page, someone claims that the
    JVM was written in C:

    »The core of the JVM is written in C«

    http://x86.sun.com/thread.jspa?threadID=5343144&messageID=10482888

    Parts of the JVM might be written in Java, but I find:

    ..\j2se\src\share\back\ArrayReferenceImpl.c
    ..\j2se\src\share\back\ArrayTypeImpl.c
    ..\j2se\src\share\back\bag.c
    ..\j2se\src\share\back\ClassLoaderReferenceImpl.c
    ..\j2se\src\share\back\ClassObjectReferenceImpl.c
    ..\j2se\src\share\back\classTrack.c
    ..\j2se\src\share\back\ClassTypeImpl.c
    ..\j2se\src\share\back\commonRef.c
    ..\j2se\src\share\back\debugDispatch.c
    ..\j2se\src\share\back\debugInit.c
    ..\j2se\src\share\back\debugLoop.c
    ..\j2se\src\share\back\error_messages.c
    ..\j2se\src\share\back\eventFilter.c
    ..\j2se\src\share\back\eventHandler.c
    ..\j2se\src\share\back\eventHelper.c
    ..\j2se\src\share\back\EventRequestImpl.c
    ..\j2se\src\share\back\FieldImpl.c
    ..\j2se\src\share\back\FrameID.c
    ..\j2se\src\share\back\inStream.c
    ..\j2se\src\share\back\invoker.c
    ..\j2se\src\share\back\log_messages.c
    ..\j2se\src\share\back\MethodImpl.c
    ..\j2se\src\share\back\ObjectReferenceImpl.c
    ..\j2se\src\share\back\outStream.c
    ..\j2se\src\share\back\ReferenceTypeImpl.c
    ..\j2se\src\share\back\SDE.c
    ..\j2se\src\share\back\StackFrameImpl.c
    ..\j2se\src\share\back\standardHandlers.c
    ..\j2se\src\share\back\stepControl.c
    ..\j2se\src\share\back\stream.c
    ..\j2se\src\share\back\StringReferenceImpl.c
    ..\j2se\src\share\back\threadControl.c
    ..\j2se\src\share\back\ThreadGroupReferenceImpl.c
    ..\j2se\src\share\back\ThreadReferenceImpl.c
    ..\j2se\src\share\back\transport.c
    ..\j2se\src\share\back\util.c
    ..\j2se\src\share\back\VirtualMachineImpl.c

    Also, parts of the J2SE standard library are written in C.

    »Here's the thing: C is everywhere. Recently Tim Bray made
    basically the same point; all the major operating systems,
    all the high-level language runtimes, all the databases,
    and all major productivity applications are written in C.«

    http://girtby.net/archives/2008/08/23/in-defence-of-c/

    »=head2 What language is Parrot written in?

    C.

    =head2 For the love of God, man, why?!?!?!?

    Because it's the best we've got.«

    http://search.cpan.org/src/SFINK/parrot-0.0.11.2/docs/faq.pod

    »C overwhelmingly proved the most popular programming
    language for thousands of new open-source projects in
    2008, according to license tracker Black Duck Software.

    The company, which monitors 180,000 projects on nearly
    4,000 sites, said almost half - 47 per cent - of new
    projects last year used C. Black Duck said 17,000 new
    open-source projects were created in total. Next in
    popularity after C came Java, with 28 per cent.«

    http://www.theregister.co.uk/2009/01/21/open_source_projects_08/

    Regarding the last quote: I am afraid that they have added the
    numbers for C, C++ and C# together and are referring to this
    as »C«.
    Stefan Ram, Mar 8, 2009
    #12
  13. neoedmund

    Richard Bos Guest

    "Dik T. Winter" <> wrote:

    > > On Mar 6, 4:17=A0am, neoedmund <> wrote:
    > > > I found most other languages are implemented in C, such as Java,
    > > > Python, etc...


    > The CDC Algol 68 compiler was implemented in SIMPL. But I know of an
    > Algol 60 compiler implemented in C.


    > I know for sure that Python was implemented in C


    > It is only because C is as a programming language so widely available.


    That's probably one of the main reasons, but I would be surprised if a
    perception of C as an efficient language is also an argument, in many
    cases. (I don't claim that the argument is correct, nor that it is
    wrong; merely that it is made.)

    Richard
    Richard Bos, Mar 11, 2009
    #13
  14. In article <4all.nl> writes:
    > "Dik T. Winter" <> wrote:

    ....
    > > The CDC Algol 68 compiler was implemented in SIMPL. But I know of an
    > > Algol 60 compiler implemented in C.

    >
    > > I know for sure that Python was implemented in C

    >
    > > It is only because C is as a programming language so widely available.

    >
    > That's probably one of the main reasons, but I would be surprised if a
    > perception of C as an efficient language is also an argument, in many
    > cases. (I don't claim that the argument is correct, nor that it is
    > wrong; merely that it is made.)


    It is made indeed, and is (or at least was) wrong on a number of systems.
    I know for sure that Python was implemented in C because the precursors
    of it (B and ABC) and the first versions were implemented on machines where
    C was the only viable compiler. If these were developed on the CDC we were
    also using, C would certainly *not* have been the first implementation
    language. Efficiency was certainly *not* a reason.

    On the CDC systems Algol 68 was written in SIMPL, not in Pascal (the most
    efficient language), nor in Fortran (the next efficient language). One of
    the reasons here was that SIMPL (*) was the most suitable language to do it
    in.
    --
    * SIMPLE was a derivate of IMPL, which in turn was a derivate of JOVIAL which
    was based on Algol 58, which never was a language on its own, only on paper.
    --
    dik t. winter, cwi, science park 123, 1098 xg amsterdam, nederland, +31205924131
    home: bovenover 215, 1025 jn amsterdam, nederland; http://www.cwi.nl/~dik/
    Dik T. Winter, Mar 12, 2009
    #14
  15. neoedmund

    Richard Bos Guest

    "Dik T. Winter" <> wrote:

    > In article <4all.nl> writes:
    > > "Dik T. Winter" <> wrote:

    > ...
    > > > The CDC Algol 68 compiler was implemented in SIMPL. But I know of an
    > > > Algol 60 compiler implemented in C.

    > >
    > > > I know for sure that Python was implemented in C

    > >
    > > > It is only because C is as a programming language so widely available.

    > >
    > > That's probably one of the main reasons, but I would be surprised if a
    > > perception of C as an efficient language is also an argument, in many
    > > cases. (I don't claim that the argument is correct, nor that it is
    > > wrong; merely that it is made.)

    >
    > It is made indeed, and is (or at least was) wrong on a number of systems.


    Of course it is often wrong. Nevertheless, it is often used as an
    argument to write <whatever> in C.

    > I know for sure that Python was implemented in C because the precursors
    > of it (B and ABC)


    *Brrrrr*

    I have an MS-DOS implementation of that. It is _creatively_ ghodahwful.

    > On the CDC systems Algol 68 was written in SIMPL, not in Pascal (the most
    > efficient language), nor in Fortran (the next efficient language). One of
    > the reasons here was that SIMPL (*) was the most suitable language to do it
    > in.
    > --
    > * SIMPLE was a derivate of IMPL, which in turn was a derivate of JOVIAL which
    > was based on Algol 58, which never was a language on its own, only on paper.


    Are you sure that that history, and the issuant emotions, were not of
    some influence in the decision of what was "suitable"?

    Richard
    Richard Bos, Mar 12, 2009
    #15
  16. In article <4all.nl> writes:
    > "Dik T. Winter" <> wrote:

    ....
    > > On the CDC systems Algol 68 was written in SIMPL, not in Pascal (the most
    > > efficient language), nor in Fortran (the next efficient language). One of
    > > the reasons here was that SIMPL (*) was the most suitable language to do it
    > > in.
    > > --
    > > * SIMPL was a derivate of IMPL, which in turn was a derivate of JOVIAL
    > > which was based on Algol 58, which never was a language on its own, only
    > > on paper.

    >
    > Are you sure that that history, and the issuant emotions, were not of
    > some influence in the decision of what was "suitable"?


    I am quite sure of it, for some reasons. Many CDC compilers were implemented
    in SIMPL, which ultimately was nothing more than a glorified assembler. One
    of those was the Fortran compiler.
    --
    dik t. winter, cwi, science park 123, 1098 xg amsterdam, nederland, +31205924131
    home: bovenover 215, 1025 jn amsterdam, nederland; http://www.cwi.nl/~dik/
    Dik T. Winter, Mar 13, 2009
    #16
  17. neoedmund

    Andy Wang Guest

    Jython is not written in C.
    --
    Everything is possible!
    Andy Wang, May 21, 2009
    #17
  18. In article <>, Andy Wang <> wrote:
    >
    >Jython is not written in C.


    1) What is "Jython"?
    2) What is it written in?
    Kenny McCormack, May 21, 2009
    #18
  19. neoedmund

    Nigel Guest

    On May 21, 7:58 am, (Kenny McCormack)
    wrote:
    > In article <>, Andy Wang  <> wrote:
    >
    >
    >
    > >Jython is not written in C.

    >
    > 1) What is "Jython"?
    > 2) What is it written in?


    Would it hurt to use google?
    Nigel, May 21, 2009
    #19
  20. neoedmund

    Nigel Guest

    On May 21, 11:00 am, Richard Heathfield <> wrote:

    > Note, too, that the first implementation of C was not originally
    > written in C.
    >
    > --
    > Richard Heathfield <http://www.cpax.org.uk>
    > Email: -http://www. +rjh@
    > Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
    > "Usenet is a strange place" - dmr 29 July 1999


    Right, I couldn't have guessed. ;-)
    Nigel, May 21, 2009
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Quest Master
    Replies:
    33
    Views:
    854
    Cameron Laird
    Jan 27, 2005
  2. Replies:
    0
    Views:
    283
  3. Keith Thompson

    Re: Some language not implemented in C?

    Keith Thompson, May 29, 2009, in forum: C Programming
    Replies:
    5
    Views:
    262
    Richard Bos
    Jun 1, 2009
  4. Good Night Moon
    Replies:
    9
    Views:
    265
    Rick DeNatale
    Jul 25, 2007
  5. inetquestion
    Replies:
    0
    Views:
    140
    inetquestion
    May 6, 2009
Loading...

Share This Page