New programming language. Anyone done it before?

Discussion in 'Programming & Software Development' started by foxmulder881, Sep 15, 2012.

  1. foxmulder881

    foxmulder881 Member

    Joined:
    Nov 17, 2004
    Messages:
    5,884
    Location:
    Gold Coast, QLD OS:Linux
    I have been developing my own programming language for several months now. I am just wondering whether anyone else has any experience taking on such a task?
     
  2. adante

    adante Member

    Joined:
    Sep 14, 2003
    Messages:
    494
    Location:
    Brisbane Nth
    I've fiddled with DSL's a little but most of the time it has been looking at creating API's/wrapper code to repurpose existing languages.

    The reason I've done that is because I think developing your own language is pretty hard*.

    I'm curious what your experience with this is though - I think it will be a pretty good indicator of whether you are making the next Scala or VBA.

    *exact hardness correlates to purpose of language
     
  3. OP
    OP
    foxmulder881

    foxmulder881 Member

    Joined:
    Nov 17, 2004
    Messages:
    5,884
    Location:
    Gold Coast, QLD OS:Linux
    I don't know whether I would describe it as hard, but more complicated. It's difficult to release what's sitting there in your head and put it into actual code. And especially code in a language that does not yet exist. And then you think ahead of what needs to be done, building a compiler and possible a translator of some sorts. Or possibly any required GUI stuff. Yep, complicated.

    Regardless, I'm pressing ahead and doing what I can and learning as I go along and when I get on a role, I actually enjoy myself.
     
  4. asher001

    asher001 Member

    Joined:
    Nov 6, 2010
    Messages:
    311
    I'd like to know more.

    What are you including in the language that will differentiate it from alternatives?
     
  5. SLATYE

    SLATYE SLATYE, not SLAYTE

    Joined:
    Nov 11, 2002
    Messages:
    26,858
    Location:
    Canberra
    I've done a few CPUs in Verilog that have custom instruction sets, but they've been very basic (on the order of 16 - 64 instructions). Obviously there's a language associated with them, but it tends to be what makes sense from a hardware point of view rather than what will make them easy to program.

    On the other hand, it's often good fun to see what you can implement in a very simple language with very limited capabilities.
     
    Last edited: Sep 15, 2012
  6. adante

    adante Member

    Joined:
    Sep 14, 2003
    Messages:
    494
    Location:
    Brisbane Nth
    I guess I tend to bundle things which are 'complicated' or 'difficult' as 'hard'. Not sure if we are mincing terms but I'd agree that designing and implementing a programming language is complicated and difficult (and to me at least, hard).

    Good luck. Gotta admit I'm curious as to what your'e doing.
     
  7. gcflora

    gcflora Member

    Joined:
    Jun 22, 2012
    Messages:
    665
  8. OP
    OP
    foxmulder881

    foxmulder881 Member

    Joined:
    Nov 17, 2004
    Messages:
    5,884
    Location:
    Gold Coast, QLD OS:Linux
  9. OP
    OP
    foxmulder881

    foxmulder881 Member

    Joined:
    Nov 17, 2004
    Messages:
    5,884
    Location:
    Gold Coast, QLD OS:Linux
    Taken from the Facebook page:

    Exactly this! Have you ever heard anyone complain that they think programming is too complicated? I have. Too many times. My language is designed so that once the reader knows the basics of the syntax, they can update to the language syntax and recompile as required. Therefore, increasing the capability of Simple Dictionary Language.
     
  10. Kataton1c

    Kataton1c Member

    Joined:
    May 1, 2002
    Messages:
    1,466
    Location:
    Adelaide
    My friend created his own assembly language called 'FastLogic'.

    He then used it to create a basic operating system.

    With all the programmers you'll meet in your entire lifetime, he'll be in the top 2. I say top 2 because it would be unfair to say number 1.

    You just need a clear goal and purpose for your language.
     
  11. zach

    zach (Banned or Deleted)

    Joined:
    May 1, 2009
    Messages:
    3,614
    Location:
    chermside.bris.qld.au:80
    Curious if you've got a solid codebase up, what license?

    I've only ever read a few articles on writing a compiler (ASTs etc) and it is really interesting stuff.
     
  12. OP
    OP
    foxmulder881

    foxmulder881 Member

    Joined:
    Nov 17, 2004
    Messages:
    5,884
    Location:
    Gold Coast, QLD OS:Linux
    Researching a few license as we speak. So I am yet to decide. I have all the paperwork printed, so I just have to get the time to sit down and read it all and note the differences between them. I have narrowed it down to four choices.
     
  13. slaytanic

    slaytanic Member

    Joined:
    Sep 11, 2002
    Messages:
    399
    Location:
    Sydney
  14. cyclonite

    cyclonite Member

    Joined:
    Mar 7, 2002
    Messages:
    824
    Location:
    NSW 2009
    You can make your life a bit easier by targeting something more generic and higher level like the JVM or .NET IL.

    Any decent computer science degree will include a compilers course. That's where I got most of my experience. But the fun and interesting parts aren't into writing the lexer, parser, etc. but rather the optimisations and language features.
     
  15. OP
    OP
    foxmulder881

    foxmulder881 Member

    Joined:
    Nov 17, 2004
    Messages:
    5,884
    Location:
    Gold Coast, QLD OS:Linux
    Bookmarked for later. Thanks. ;-)
     
  16. adante

    adante Member

    Joined:
    Sep 14, 2003
    Messages:
    494
    Location:
    Brisbane Nth
    So side-topic but can anybody recommend some resources for parsing?

    This sounds pretty wacky. For assembly language I thought the nature of the CPU essentially determined the language?
     
  17. xsive

    xsive Member

    Joined:
    Jun 29, 2001
    Messages:
    4,343
    I'm not sure what a "dictionary-based syntax" is but nailing down an unambiguous Turing complete grammar sounds pretty complicated to me. Yet you say users should be able to change the grammar on a whim? In order to make things less complicated?

    Huh? :confused:
     
    Last edited: Sep 26, 2012
  18. Shimmy

    Shimmy Member

    Joined:
    Aug 28, 2002
    Messages:
    1,126
    Location:
    Melb, CBD.
    Could you give us a code example of what you had planned? Like a hello world?

    It sounds like you're trying to actually implement functioning pseudocode. Is it a compiled or interpreted language?
     
  19. Taceo Corpus

    Taceo Corpus Member

    Joined:
    Sep 19, 2005
    Messages:
    3,253
    Location:
    Tokyo
    This. It sounds absolutely impractical. :sick:
     
  20. OP
    OP
    foxmulder881

    foxmulder881 Member

    Joined:
    Nov 17, 2004
    Messages:
    5,884
    Location:
    Gold Coast, QLD OS:Linux
    This will make absolutely no sense to anyone other than myself, but here you go:

    Code:
    <run> : ;execute #exact#; :: ;327211679
     

Share This Page

Advertisement: