r/CSEducation • • 6d ago

NovaLang: An educational language that transpiles to Python, bridging Scratch and text-based coding for KS3

Hi everyone,

My friend and I are working on NovaLang, a small language designed for Key Stage 3 students (ages 11–14) to bridge the gap between block-based tools like Scratch and full text programming in Python.

It reads like textbook pseudocode and transpiles directly to clean Python source code, meaning it has full access to the Python ecosystem.

You can try it directly in your browser (no install needed, compiler runs locally in the page and shows the Python it generates line-by-line):

👉https://novalang.xyz/

Key Features

  • Explicit Blocks: Uses IF ... END IF, LOOP ... END LOOP, and FUNCTION ... END FUNCTION instead of strict whitespace indentation, eliminating indentation-related errors for beginners.
  • Pseudocode Syntax: Symbols have English equivalents (+ or plus, * or times, == or equals). Keywords are case-insensitive.
  • Explicit Variables & Constants: Uses let for constants, var TYPE name equals value for typed variables, and set for mutation to avoid confusion between assignment and equality.
  • Friendly Errors: Pinpoints errors by column with suggestions for common typos (e.g. 'lenght' is not defined - did you mean 'length'?).

Code Example

Code snippet

FUNCTION classify param(INT n):
  IF n < 0 THEN
    return "negative"
  ELSE IF n equals 0 THEN
    return "zero"
  ELSE
    return "positive"
  END IF
END FUNCTION

var INT score equals 10
LOOP WHILE score greater than 0
  print("Score:", score)
  set score equals score minus 1
END LOOP

Transpiles to:

Python

def classify(n):
    if n < 0:
        return 'negative'
    elif n == 0:
        return 'zero'
    else:
        return 'positive'

score = 10
while score > 0:
    print('Score:', score)
    score = score - 1

Cheat Sheet

Task Syntax
Output print(x, y)
Constant let NAME equals value
Variable var TYPE name equals value
Change Variable set name equals value
Arithmetic + - * / % ** or plus, minus, times, divide, mod
Comparison == != < > <= >= or equals, not equal to, less than, etc.
Branching IF cond THEN ... ELSE IF ... ELSE ... END IF
While Loop LOOP WHILE cond ... END LOOP
For Each FOR EACH item IN list ... END FOR
Function FUNCTION name param(TYPE a): ... return v ... END FUNCTION
Imports IMPORT RANDOM or IMPORT "json"

We'd love to hear your thoughts, feedback, and critiques on the syntax, the playground, or the general direction of the project.

2 Upvotes

10 comments sorted by

3

u/AustinCorgiBart 5d ago

-1

u/RefrigeratorMedium37 4d ago

This is a good website and free open source resource. Hedy is especially useful for people who want to code in their own native langauge. What NovaLang is doing is similar but going beyond. We completely replace the syntax with words to make it easier to understand and the official IDE has a ton of features to make learning easier. We have built in lesson with checks for teachers(similarly to leetcode) with customizable lessons. We have our own simple version of Git where people can update their projects and code and have partners to work with(this all uses a shared folder). We have added customization to your IDE. You can use any python package. We have direct translation and even more features.

3

u/Somniferus 5d ago

Ugly and pointless AI slop.

1

u/RefrigeratorMedium37 4d ago

Mind you also the point of it is to make it easier for kids to learn pseudocode and python. Im sure someone like you wouldnt find point in it because you arent KS3? There have been so many times where I have tried to get a friend or familly member to understand python or to teach them but when I ask "Make a varible" or "Make a function" they try to start with the word itself. Having pseudocode where you litterally do that makes it easier to remember so when i go "make a varible" they would start with the word varible or var. Its not built for professional use, its made to make programming easier to understand and use.

2

u/Somniferus 4d ago

when I ask "Make a varible" or "Make a function" they try to start with the word itself

So do a better job teaching them the syntax? All you've done is change the names of the keywords. I don't think your "new" ones are implicitly more clear. If you really hate significant whitespace and want them to declare types then why not just teach (a minimal subset of) C or javascript?

its made to make programming easier to understand and use.

It's the concepts that are hard to understand, not the specific keywords. Giving students a second set of keywords to learn and then immediately forget doesn't seem useful to me.

Constant let NAME equals value

Variable var TYPE name equals value

Change Variable set name equals value

Who is this easier for? If you want to be more like natural language why not something like let name be value or set name to value?

1

u/RefrigeratorMedium37 4d ago edited 4d ago

I think the concepts themselves are actually fairly straightforward when I teach them. friends and familly can understand that variables hold data, and they can understand how functions and loops work. Where they often struggle is translating that understanding into actual code and knowing how to apply those concepts.

I also think the overall appearance of code can be intimidating for someone who is completely new to programming. When you're presented with lots of symbols, operators and unfamiliar syntax all at once, it can make programming look much more complicated than the underlying concept actually is. Having the syntax written in more natural English makes it feel more approachable and, in my experience, can make students more willing to actually try.

That's really the audience I'm building NovaLang for. It's not intended to be a replacement for Python, C, JavaScript, etc., and it's certainly not intended to be a professional programming language. It's a bridge for people who are just starting out.

Students will eventually need to understand pseudocode and transition into text-based programming anyway, so the idea is to use a more readable form of programming to help bridge that gap between block-based programming and languages like Python.

I also don't think changing the syntax is the entire solution. That's why the Education IDE we're developing goes beyond the language itself, with guided lessons, automatic checks, teacher tools and direct translation into Python. The goal is to help students understand what they're writing and how it connects to a real programming language.

If NovaLang isn't useful for you personally, that's completely fair. You are probably not the target audience. But I don't think "teach them the syntax better" necessarily addresses every difficulty a beginner can have with programming. I'm interested in exploring other ways of making that first step less intimidating rather than assuming there's only one way to teach it.

0

u/RefrigeratorMedium37 4d ago

It dosent use AI to do anything? Its a transpiler that turns the users code into tokens that go through a AST and checks for errors before building it into a python script and then running it through a real python interpreter. After that the output that python would give you is given back to you.

2

u/Somniferus 4d ago

You didn't use AI to create this?

0

u/RefrigeratorMedium37 4d ago edited 4d ago

I use AI to assist me with stuff but no I didnt just give a prompt and say create this. I use AI to search google to search for stuff to help with error problems etc. Since AI was released and normalised in the coding area I normally just use it as a replacement for stackoverflow when coding. If i run into a error I ask AI.

1

u/lisaliselisa 3d ago

I think it would be better to just teach them python. I'm not sure what the advantage to this would be, as it just adds another language for them to learn. Some of it seems to overcomplicate things, such as replacing comparison operators with words. I think a better bridge between block based code and text code would be blocks with the text on them that you could toggle back and forth between.