Announcement

Collapse
No announcement yet.

New Language

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • New Language

    I am currently designing a multi-tasking programming language. Called "Phava" It will be slightly based on the C programming language. It will compile the same, run the same, and will have some of the same syntax. I will show you a bit of syntax for defining functions, calling them, some simple programs, etc.

    Comments are printed like this.

    Code:
    <This is a comment!
    With the symbol at the beginning.

    Before you can do anything i must explain something to you. Before you call any functions you must set the correct directory first! Example: The directory you must set to print output onto the screen is directory (string).
    Heres a code example:

    Code:
    set >> directory(string)
    The "string" directory lets you print text onto the screen. and so on with math and different things. Example:If you wanted to add something or multiply it etc. then you would use (number) directory. Example:

    Code:
    set >> directory(number)

    In Phava you have to define functions before you can use them, which is printed like this.

    Code:
    define function >> (printf)
    Where "int" is the type of function, and "netvalue" is the name of the function.

    Then to use the function would be printed like this.

    Code:
    call function >>

    Now here is a very simple "Hello, World!" program.

    Code:
    set >> directory (String)
    main()
    {
    define function >> (printf)
    call function >> printf ("Hello, World!")
    sleep "5000"
    }
    Here is a very simple adding program which really has absolutly no use at all except to show you how the (number) driectory is used.
    Heres the code example:

    Code:
    set >> directory(string)
    set >> directory(number)
    main()
    define function >> (printf)
    define function >> (int)
    call function >> printf("Can you add 2+2?")
    call function >> int "2+2" = sum
    call function >> printf(sum)
    sleep "5000"
    }
    This program prints the sum of 2+2 onto the screen along with "Can you add 2+2"
    In "Phava" here are the symbol meanings...

    + :Add
    = :Equals
    * :Multiply
    / :Divide
    - :Subtract

    Heres another program that envolves "input"

    Code:
    set >> directory(string)
    main()
    {
    define function >> (printf)
    define function >> (input)
    call function >> input = age("How old are you?")
    If age => 18 then 
    call function >> printf("You are legally aloud to vote, congrats!")
    else 
    call function >> printf("I'm sorry, you are not able to vote!")
    sleep "5000"
    }
    This is all for now and dont hold your breath on this one because the chances of me accually creating and finishing this Programming Language are so slim that i have trouble even saying it but hey, its fun.
    Plz reply and tell me what you think. I did not comment in my code but feel free to do so.

    -Nebula

  • #2
    That looks exactly like POL or Sphere(Programming languages used for a popular MMORPG)
    -Ridirich

    "When you're called upon to do anything, and you're not ready to do it, then you've failed."

    Commander W.H. Hamilton

    Comment


    • #3
      Well as i said this will have alot of the same functions, syntax, etc as C but will be used differently.

      Comment


      • #4
        Also, if you want the long tutorial i wrote on how to start out in Phava for people with minimal or no programing backround then drop me an e-mail at fridout@att.net

        Again i cant stress this enough, This language is not done, nor will it be for a while, if ever. But i am still creating syntax and functions, etc. So just bear with me.

        Comment


        • #5
          Yep, as I thought...this language is the same. I honestly see very little differance.
          -Ridirich

          "When you're called upon to do anything, and you're not ready to do it, then you've failed."

          Commander W.H. Hamilton

          Comment


          • #6
            What do you mean the same? As C? or what? Let me rephrase what i said earlier, "It will be based off C" Sry for the misunderstanding.

            Comment


            • #7
              HA. I've never even heard of POL... And it dosnt look the same to me

              I based this language off of C not POL, or w/e it is. As you can see alot of the syntax is similar if not the same as C syntax.

              Heres a "Hello, World!" program in C:

              Code:
              main()
              {
              printf("Hello, World!")
              return 0;
              }
              Heres the same program but in Phava:

              Code:
              set >> directory(string)
              main()
              {
              define function >> (printf)
              call function >> printf("Hello, World!")
              sleep "5000"
              }
              As you can see it uses all the same factors as C but different syntax...

              Comment


              • #8
                And are you writing a scanner/FSM parser for this language (or having lexx/yacc write them for you)? Going to write a compiler that works on the AVL trees your FSM parser spits out? Or are these concepts entirely foreign to you?

                When you said "multi-tasking programming language" I assumed you wanted a concurrent programming language like Occam, but I'm not seeing anything like that here.

                Your sleep function takes a string as an argument? Function arguments aren't parenthesized? Are you doing an implicit conversion from a string to an integer? If so, then your language is weakly typed? That's absolutely nothing like C.

                Designing a language is hard. Very few have done it properly. And why are you touting C-like syntax when the syntax seems to deviate considerably from C (even more so than Java)
                45 5F E1 04 22 CA 29 C4 93 3F 95 05 2B 79 2A B0
                45 5F E1 04 22 CA 29 C4 93 3F 95 05 2B 79 2A B1
                [ redacted ]

                Comment


                • #9
                  Originally posted by bascule
                  And are you writing a scanner/FSM parser for this language (or having lexx/yacc write them for you)? Going to write a compiler that works on the AVL trees your FSM parser spits out? Or are these concepts entirely foreign to you?

                  When you said "multi-tasking programming language" I assumed you wanted a concurrent programming language like Occam, but I'm not seeing anything like that here.

                  Your sleep function takes a string as an argument? Function arguments aren't parenthesized? Are you doing an implicit conversion from a string to an integer? If so, then your language is weakly typed? That's absolutely nothing like C.

                  Designing a language is hard. Very few have done it properly. And why are you touting C-like syntax when the syntax seems to deviate considerably from C (even more so than Java)
                  Jeez, Bascule. I think you just made the poor kid's brain explode.
                  The dude abides.

                  Comment


                  • #10
                    Originally posted by bascule
                    When you said "multi-tasking programming language" I assumed you wanted a concurrent programming language like Occam, but I'm not seeing anything like that here.
                    I, too, was confused on this point. If Nebula is really attempting to develop a "clustering" language, the Erlang and Linda languages may provide some inspiration. My primary question, though, is what does your language strive to do that others do not?

                    Comment


                    • #11
                      Well Voltage, thats what i was really trying to accomplish here. Make a language type that no other has done before. But i cant think of any thast have not already been taken. So it thought of multi-tasking language, the language can be used for several different uses. But why would you need to do that?
                      Just learn another language. If you have any advice! plz i'm in need of it badly. I just kinda winged this just for fun but now i've kinda gotten serious about it.

                      Comment


                      • #12
                        Yeah. I have some advice. Build a compiler for something like pascal or C or some partial version of either that is LL1 or LL2 happy. For speed, but limited to ASCII, go with FSM through char-based tables, and work through recrusive descent parsing. If you want interoperability and long-term support instead, consider lex/yacc. Either path will be a learning experience.

                        When you understand what is required to build all of the parts from compiler to assembler, then you can see what it takes to write your own language.

                        I do not see any value in your language for me. If I want to program in C, then I have the benefit of existing compilers with TONS of optimization options, and more users using compilers to decrease the chance of bugs being found in the compiler. I have plenty of profiling tools to examine any built code to better consider what kinds of data structures or changes in code could be included to make the application more efficient.

                        The language market exists with grounds of contention. Other languages "got there first" and occupy different grounds of contention. For your language to succeed, you will need to have much more than a language equal to those in your target niche.

                        Ignoring other differences between offense and defense, some suggest the attacker has 3x the number of troops when taking a ground of contention. Other suggest up to 10x, and still others suggest it is not wise to try, but to choose another location for battle.

                        Will your language be 10 times better than anything else in your target niche?

                        Exception that proves the rule: Java (tee hee) ]:>

                        Comment


                        • #13
                          Whaty Whaty...?

                          When you post advice plz keep in mind, my pea sized intellect.

                          Comment


                          • #14
                            Originally posted by Nebula
                            Whaty Whaty...?

                            When you post advice plz keep in mind, my pea sized intellect.
                            The words/phrases that do not make sense are ideal for you to include in a search on google. If you include, "book," as part of that search, you may find books with details to expand the hints offered in this thread.

                            Complex ideas can be well compressed through selective choice of words. It is the duty of your own decompression system to convert words to ideas or thoughts. Education is a good thing. Upgrade your personal decompression system.

                            Invest in time and work to make this happen or don't-- it does not matter to me.

                            Comment


                            • #15
                              Hey guys just forget it...This was just a gag and it hought i might be able to do it but perhaps when i understand programming better. This was just for fun but thnx for all the support and advice on the matter. I will continue to work on it but not as intensly.

                              Comment

                              Working...
                              X