New on Forem: "Introducing AXE Lang" by Sahith Karra

Sahith Karra has published a new article on Forem:

I hope you enjoy reading it.

1 Like

hosted in Julia, designed for rapid development and educational use

This journey began in CSC 430: Programming Languages, where I explored the fascinating world of parsers and interpreters, ultimately implementing my first programming language.

It took my multiple iterations in hosting languages before I landed on Julia as the best bet to host my programming language.

It sort of works, after installation, seems to be just a school project, not terribly innovative (though an achievement for a student), while intriguing that Julia is used to implement it, i.e. with:

shell> julia ./src/main.jl
WARNING: replacing module Main.
Hello World!
Welcome to AXE-Lang

For some reason it’s kind of slow, i.e. has a delay before that Hello world! line.

Julia is just the implementation language, anything else could have been chosen, it’s a language, not a library meant to be used from Julia, for Julia programs, though you can install and run it from Julia (or really the shell…), while not with Pkg add:

shell> git clone https://github.com/sahkar/axe-lang

This then doesn't work:
shell> axe-lang/run.sh

since you first need:
shell> cd axe-lang/

shell> ./run.sh
Python is installed.
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: streamlit==1.41.1 in /home/pharaldsson/.local/lib/python3.10/site-packages (from -r requirements.txt (line 1)) (1.41.1)
...
Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.8.2->pandas<3,>=1.4.0->streamlit==1.41.1->-r requirements.txt (line 1)) (1.16.0)

      👋 Welcome to Streamlit!

      If you’d like to receive helpful onboarding emails, news, offers, promotions,
      and the occasional swag, please enter your email address below. Otherwise,
      leave this field blank.

      Email:  2025-01-08 13:48:03.065 
   Resolving package versions...
  No Changes to `~/.julia/environments/pyjuliapkg/Project.toml`
  No Changes to `~/.julia/environments/pyjuliapkg/Manifest.toml`
INFO:     Started server process [2359222]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)

That’s the part that doesn’t work for me, a little more than half the project is in Python, seemingly for a web-based REPL to the language, and the web server starts, I just get:

detail	"Not Found"

when accessing that URL, while it’s running. The problem is likely only on the Python/streamlit side, and I’ll not look much into figuring out why it doesn’t work.

The first time around when I ran ./run.sh it was seemingly hanging, so I did CTRL-C, I was fearing OOM. So maybe I just partially broke the installation… Installing is a separate dir didn’t solve the problem.

1 Like