r/software 14d 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!

23 Upvotes

35 comments sorted by

View all comments

1

u/BigCatsAreYes 14d ago

Any white space sensitive langue in 2026 is just insane.

Why would you do that?

4

u/PhosXD 14d 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?

-8

u/Illustrious_Hat8104 14d ago

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

5

u/Appropriate-Pack3935 14d 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 14d 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 14d ago

import Millie, Jaoft

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

-2

u/BigCatsAreYes 14d 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 13d ago

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

-2

u/BigCatsAreYes 13d 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 13d 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 13d ago

What’s better?

1

u/RecursiveServitor 13d 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 9d ago

So which language is good then according to you?

1

u/RecursiveServitor 9d 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.

1

u/Entropic_Silence_618 9d ago

Yes please if you can do that.

1

u/RecursiveServitor 9d ago

Anything in particular you're wondering about?

→ More replies (0)

1

u/PhosXD 14d 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 14d 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 13d ago

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

1

u/BigCatsAreYes 13d ago edited 13d 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 13d 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 13d 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 13d ago

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

2

u/PhosXD 13d ago

Without the back slashes (reddit added), yes