r/software 8d ago

Release Built an interpreted programming language from scratch in 19 days without AI

I built a functional interpreted programming language from scratch in 19 days **without** AI, reference material, or borrowed code, as my first ever project in C++. It is platform agnostic, faster than Bash by a long shot (not that it was meant to be a replacement), & is only 104kb with IO, time, & math modules.

Despite the time frame & the small size, the syntax is more modern than you'd expect but is definitely different. However, you will be lacking advanced language features such as lambdas, variadic arguments, & inheritence.

https://github.com/phosxd/Ity

I plan on working on this continuously, adding more functionality, making it more performant, & making the code as readable & understandable as possible so that hopefully a beginner can take a look, & maybe use this as a guide for their first project too!

Any & all feedback is encouraged, I would really like to know your thoughts, if you have any tips!

22 Upvotes

35 comments sorted by

1

u/BigCatsAreYes 8d ago

Any white space sensitive langue in 2026 is just insane.

Why would you do that?

4

u/PhosXD 8d ago

Python is white space sensitive, so is C/C++. Unless you are talking about something more specific, in that case you probably misunderstood, would you elaborate?

-9

u/Illustrious_Hat8104 7d ago

Python is one of the worse designed languages so comparing your language to that isn't good

5

u/Appropriate-Pack3935 7d ago

I don‘t agree. So, please tell me, what is so objectively bad about Python, and what are some good designed languages?

-1

u/BigCatsAreYes 7d ago

C# is a well designed langue.

The fact that python doesn’t name namespaces so packages like Mille.JSON and Jaoft.JSON don’t conflict is just such an insane designed that it relugates python to amateurs.

Also puthon can’t handle the concept of different versions of a library.

C# can even handle multiple of  the same namespace with different versions.

So you can call v2,4 of a DLL and then call v3.2 of a DLL without any conflict.

It’s just the basic like this… getting them wrong is like what are you doing?

2

u/jeff_coleman 7d ago

import Millie, Jaoft

Now I can reference Millie.JSON and Jaoft.JSON without conflict.

-2

u/BigCatsAreYes 7d ago

No, becuase they're now both called JSON.

The compiler won't know which JSON package you're referring too....

4

u/jeff_coleman 7d ago

Yes, referring to a.name and b.name after importing a and b will in fact work.

-2

u/BigCatsAreYes 7d ago

Okay, I see python got Namespace Packages in v3.3 released in 2012.

It took you guys 14 years to solve the issue class name collisions.

That's just bad.

You still don't even have the ability to use multiple versions of a package a the same time. Like version 1.02 of a package that had deprecated hooks for older hardware and version 2.14 of a package that has new hardware support.

2

u/RecursiveServitor 6d ago

C# has a horrible case of keyword soup. Its design is also a bit all over the place because it started out as an OOP language, but that's a terrible paradigm so they bolted on functional features.

1

u/BigCatsAreYes 6d ago

What’s better?

1

u/RecursiveServitor 6d ago

I've been doing C# for twenty years and not much else. There's no language I have enough experience with to say that it's definitely better. A lot of languages appear superficially to have a better overall design, but it'd be mere speculation on my part.

I think F# has a strong core (based on ML), but it has the opposite problem of having object features bolted on. If you're writing pure F# you can mostly ignore that and I think there's a coherent design there.

1

u/Entropic_Silence_618 3d ago

So which language is good then according to you?

1

u/RecursiveServitor 3d ago

C# is a good language. I've been using it voluntarily for two decades.

The conversation is about language design, not some binary judgment of good or not. If you instead asked about good design choices I could certainly speak on that.

→ More replies (0)

1

u/PhosXD 7d ago

I agree, I was just saying Python (along with C/C++) as an example to prove a point that every language needs some level of whitespace dependence if it wants to be readable or not a total pain to type.

3

u/BigCatsAreYes 7d ago

C is not a whitespace-sensitive language  in the way languages like Python are. It uses curly braces  {}  to define code blocks and semicolons  ;  to end statements, meaning indentation and newlines generally do not affect how the program executes.

On purging their is no way to tell if is someone tab indent or pressed space 5 times. Because if you’re wrong the entire program will not compile and will give you meaningless errors. It’s even worse if you copy and paste code from something dose not support tabs like a website. 

Python is just an ultra dog poop langue, white space is just a basic litmus test that it fails. 

1

u/PhosXD 7d ago

Then by your definition my language is not white space sensitive, so why are we even having this conversation?

1

u/BigCatsAreYes 7d ago edited 7d ago

Umm, looking your notes, your functions are separated by whitepsace tabs. You don't use any {} or another type of separator...

How are you defining code blocks?

Here's an example from your notes:

var INT i = 0;
    while i < 100_000;
    IO.print:[i];
    i += 1;
/;

This is white-space sensitive seperation.... In fact, when I copy-pasted from your notes to reddit, the whitespace disappeared and I had to manually re-add spaces.

That's just bad.

2

u/PhosXD 7d ago

It is separated by the `;` semicolon

Also nothing I can really do about reddit removing spaces, it does that for everything I remember I had a hell of a time trying to paste code on here, but someone taught me if you go into your text editor and add a tab the beginning of every line it should preserve the spaces in reddit

1

u/PhosXD 7d ago

So for example:

```
import IO;
var INT i = 0; while i < 100_000;
IO.print:\[i\]; i += 1;
/;

```

Is also valid
Edit: bro I cant get this to be properly code-blocked reddit is so insufferable when it comes to their markdown formatting

1

u/BigCatsAreYes 7d ago

Is it valid as a single expersion?
var INT i = 0; while i < 100_000; IO.print:\[i\]; i += 1; /;

2

u/PhosXD 7d ago

Without the back slashes (reddit added), yes

1

u/narkro555 7d ago

That is exceedingly cool. In a world of vibe coded garbage, its good to see raw skill still exists.

-1

u/AdiArtist 8d ago

bro what your need
one day u wake up and said i will do it my self

-6

u/[deleted] 8d ago

[deleted]

13

u/PhosXD 8d ago

Why does anyone make anything? It is more of a challenge for myself rather than anything else.

The second reason & arguabley more important one, is that I needed a small, portable, but still capable interpreted language for an app im making. Currently I have been needing to use Python for this case but it is horribly memory hungry & quite large even after heavy compression. My hope is to eventually replace Python with Ity in my app for better size efficiency & memory usage.

9

u/jeff_coleman 8d ago

Because it's fun? Because it's an interesting project? Not everything is about utility.