What do you want?

This is a discussion on What do you want? within the A Brief History of Cprogramming.com forums, part of the Community Boards category; As you can probably tell from my sig, I'm making a programming language. Its been 3 years in the planning ...

  1. #1
    Registered User
    Join Date
    Jan 2003
    Posts
    648

    What do you want?

    As you can probably tell from my sig, I'm making a programming language. Its been 3 years in the planning and we have megabytes of test code and documents, etc.

    This summer, we plan to really get started on it. That is, really start and program the real thing. But before, I want to make sure that everything is in from square one. What would you like to see in a scripting/programming language? What features would really interest you?

    Right now, it has simple integration to web pages, integrated vectors/matrix/maps, nice versioning support, integration to native C/C++, and a small but complete standard library. The libraries have everything you would ever need but be small enough to grasp. I mean, the .NET and Java class libraries are enourmous and most classes rarely find any use in real programs.

    Most of the information on the site is really old, however. The syntax file is really complicated and incomplete. A new, simple one is being made (with slightly new syntax). So, you really can't see much about spark but you can sure post little code snipplets that you wish could do something for you / actually work. For example:

    I always wished I could replace words in strings like this:
    Code:
    string desc = "I am a yellow object.";
    desc[7..13] = "blue";
    // desc == "I am a blue object."
    Btw, since spark supports advanced array features, that is possible. Just like this:

    Code:
    float grades[string][3] = {
    	{ "tom", { 94, 78, 85 } },
    	{ "bob", { 87, 91, 93 } },
    	{ "joe", { 64, 75, 46 } }
    };
    
    // prints out all the grades for bob
    foreach (float g; grades["bob"])
    	out.println("grade : {0}", g);
    There are a TON of more features unseen or unused often that are in spark and are being written down right now. But we're always looking for new ideas....

  2. #2
    Its not rocket science vasanth's Avatar
    Join Date
    Jan 2002
    Posts
    1,683
    So is this a scripting language that will generate HTML on the fly like ASP, PHP etc or is it a compiler which will produce an executable....

  3. #3
    Registered User
    Join Date
    Jan 2003
    Posts
    648
    Its a multi-use language meaning that it will act both like PHP and create executables and libraries. They all need the interpreter/JIT runtime though. Its main orientation, however, is simplicity for development on the web.

  4. #4
    Registered User
    Join Date
    Jul 2002
    Posts
    913
    how about you do something like java that will work with standard c.

    if you do it right you would only have to right the base and everything else would be re-compiled. that would be awsome, i dont want to learn java!!! and make sure to do it before i try to ap, and make sure its a test!

  5. #5
    CS Author and Instructor
    Join Date
    Sep 2002
    Posts
    511
    Speedy5, why do you want to do this?
    Also, do you plan to have documentation with your language.

    This would possibly make a good PhD dissertation.
    Mr. C: Author and Instructor

  6. #6
    Registered User
    Join Date
    Jan 2003
    Posts
    648
    Why? Because we want to. Some people make games, other people make webpages, we want to make a new language. There are reasons though. For web development you have only a handfull of choices for server-side scripting: Both jsp and asp.net are mindboggling huge, too complex for simple stuff. Php isn't to everyone's tastes, the syntax and its organization is horrible. So another, "in the middle" language would have a great spot in it all. And this doesn't just apply to web dev. If a new programmer wants just to make a simple timer program, he would have to write loads of C++, learn a whole framework with .net, write his GUI in Java, etc. Spark would be in the middle consisting of only a few dozen classes that do everything that you really need.

    The language would of course have documentation. In fact, there is some already on the site although most of it is really, really outdated. New documentation is currently being written. We like to plan before we actually code the beast.

  7. #7
    Rad gcn_zelda's Avatar
    Join Date
    Mar 2003
    Posts
    942
    PHP isn't bad, though. It does what you need. So spark is web-oriented?

  8. #8
    Registered User
    Join Date
    Jan 2003
    Posts
    648
    Spark is desgined for the web but it can also be a normal language (like C#). Here's some sample web code:
    Code:
    <html>
      <body>
    #   int x = 2;
    #   if (x == 5)
          Thats my favorite number!
    #   else
          Hmmm, I don't like the number ## x ## too much.
      </body>
    </html>
    The # designates a full code line, the ## ... ## designates an inline expression that will be printed out to the output. To print from a full code line, you can use the default stream out.print() or ## ... ##. Just like code, if you want to have multiple lines for a specific block, you need to use { ... }. This example, only had one line each so we don't have to use curly braces.
    Last edited by Speedy5; 06-28-2003 at 07:07 PM.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21