Overview of VCSSL

Since this is a quick guide, I'll skip the formal introduction and jump straight into a brief overview of VCSSL.

This section is written from a developer's perspective, with a candid and subjective tone -- no detached or objective narration here.

- Table of Contents -

General Direction of the Language

Let me start with something a bit sudden: many calculator apps -- and even physical calculators or pocket computers -- support some form of programming for defining functions or automating tasks.

Now, this is just my personal take, but I think programming languages for calculators tend to require the following traits:

Low learning cost
→ People are unlikely to spend a lot of time learning a language just for a calculator.
Ability to write short snippets easily
→ Focus on compact computation rather than large-scale development.
Lightweight implementation/specs
→ Easy to develop, embed, and port the interpreter.
Decent numeric performance
→ It should at least handle basic numeric workloads efficiently.

VCSSL was originally developed as a language for such calculator software. In other words, it wasn't born from some novel language paradigm or abstract theory -- it was shaped directly by practical demands like the ones above.

The core development concept of VCSSL can be summarized like this:

Low Learning Cost
* Standard C-style syntax, mainly targeting users in the numerical computing field.
* Avoid unique or idiosyncratic syntax as much as possible.
Writing Short Calculation Code Easily
* Simplified syntax, even compared to other C-style languages.
* Statically typed, but with relaxed rules.
* Standard library focused on supporting quick and simple tasks.
Compact Implementation and Specification
* Only three control structures: "if" (and "if-else"), "for", and "while".
* Five primitive types: "int", "float" (i.e., "double"), "complex", "string", and "bool".
* Not object-oriented; doesn't follow large-scale paradigms.
* No references or pointers; everything, including arrays, is a value type. No garbage collection.
Numeric Computation Performance
* Double-precision performance: 10s to 100 MFLOPS (original goal -- modern versions are faster).
* Fast dynamic evaluation (eval).

The emphasis on "low learning cost" comes first for a reason -- it was the most important point back when VCSSL was intended just for calculators. Many calculators use simple BASIC-style languages for this reason. But I really wanted VCSSL to support C/C++ users in numerical fields, so I chose C-style syntax.

At the same time, I tried to keep the syntax as standard-looking and non-weird as possible, even within the C family. That said, compared to BASIC -- which is designed for simplicity and ease of use -- C tends to be more general-purpose and can lead to more verbose or complex code. So, to make VCSSL suitable for quick, compact scripting, I had to consider how much flexibility (like that found in other C-style scripting languages) would be necessary.

In the end, it was a balancing act. Here's what it looks like (yep, here's FizzBuzz):


// nput (string return value automatically converted to int on assignment)
int n = input("Upper limit (integer):");

// for loop
for(int i=1; i<=n; i++) {

    // if and else-if
    if(i%3 == 0 && i%5 == 0) {
        println("FizzBuzz,");  // Output
    } else if(i%3 == 0) {
        println("Fizz,");
    } else if(i%5 == 0) {
        println("Buzz,");
    } else {
        println(i + ",");  // Concatenating strings and numbers
    }
}
FizzBazz.vcssl

As you can see, VCSSL is fairly conservative even among C-style scripting languages. At a glance, it probably looks like "a sort of C-like language that runs on calculator apps," doesn't it?

Sure, not using actual C means users can't reuse their C knowledge directly. But if the language is simple enough that reading a short guide like this one is all it takes to get started -- even for those with no programming experience -- then I'd say the benefits outweigh the tradeoffs.

Features of the Standard Library

Now, switching gears a bit: when it comes to the standard library, VCSSL actually supports a reasonable level of general functionality.

While it's not meant for advanced applications, it does support GUI and 2D/3D graphics, making it easy to work with visual output. You can even build simple GUI tools with it -- not just calculation and visualization tasks.

Side note: You might be thinking this goes against the original minimalist concept, but I've tried to keep the syntax and code requirements as light as possible. These features are only loaded and used when needed, so the core simplicity stays intact.
(That said, expanding the runtime like this did increase its size, which is one reason Vnano was later introduced -- more on that in a bit.)

As for why I added graphics features at all -- that's because I've done a fair bit of numerical computation myself, and honestly, I just kept wishing it were easier to visualize data and simulation results.

Even in mostly computation-focused scenarios, there are plenty of times when you want some kind of drawing or animation output. C and C++ are fast, sure -- but those kinds of tasks can be a real pain in them.

So, with VCSSL's C-style syntax and lightweight focus, I figured that if I could support basic GUI and visualization in a simple way, it could be quite handy -- not for heavy processing, of course, but for lightweight visualization, simulations, or GUI settings for numerical tools.

That's why, when VCSSL evolved from being a calculator-only language (v1.0) into a standalone scripting language (v2.0), I expanded its features in that direction.

You can check out actual programs built with VCSSL's standard features in the Code Archive on the official site.
Here are a few examples:

3D Graph Animation from Sequential Files
3D Graph Animation from Sequential Files
A visualization tool that creates animated 3D graphs from sequential data files. It also supports exporting the animation as image sequences.

Interference of Circular Waves
Interference of Circular Waves
A simulator that visualizes the interference between two circular waves using 3D animation.

Solution Curves of the Lorenz Equations
Solution Curves of the Lorenz Equations
A numerical solver for the Lorenz equations, featuring a GUI for parameter manipulation.

RGB/Color Code Converter and Display Tool
RGB/Color Code Converter and Display Tool
A GUI app for converting between RGB values and hex color codes, and displaying the resulting color.

Vnano: A Subset for Embedding

Now let's talk briefly about Vnano, a subset of VCSSL.

Vnano Logo

To be honest, Vnano follows pretty much the same concept as VCSSL's early days. As mentioned before, it's a compact, C-style language designed to run inside calculator-like environments.

Over time, VCSSL evolved to support more general use cases. It expanded in functionality to become a standalone language -- not just something you embed in other tools -- because its original scope was simply too narrow.

But of course, that came with a cost: the runtime got bigger. It drifted a bit from the original goals of being easy to implement, embed, and port.

So I went back to those roots and built Vnano (VCSSL nano) -- a slimmed-down, refocused version of VCSSL, optimized for embedding.

It's open source, and anyone can integrate it into their own software. You'll find integration guides and more on the official site:

Vnano only drops features -- it doesn't change the syntax itself significantly. So unless otherwise noted, everything in this guide applies to both VCSSL and Vnano.

Note: Just to be accurate: Some syntax-level features are missing in Vnano, so interpretation may differ slightly depending on the code.

Next time, we'll write and run an actual VCSSL program and perform some basic input/output.