View Full Version : What do you want?

06-27-2003, 06:18 PM
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:

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:

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....

06-28-2003, 12:01 AM
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....

06-28-2003, 07:18 AM
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.

06-28-2003, 12:59 PM
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!

Mister C
06-28-2003, 05:51 PM
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.

06-28-2003, 06:52 PM
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. :rolleyes:

06-28-2003, 06:59 PM
PHP isn't bad, though. It does what you need. So spark is web-oriented?

06-28-2003, 07:03 PM
Spark is desgined for the web but it can also be a normal language (like C#). Here's some sample web code:

# int x = 2;
# if (x == 5)
Thats my favorite number!
# else
Hmmm, I don't like the number ## x ## too much.

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.