I like Python. A lot, actually. It is hard to argue against it: Python dominates data science, AI, and a large part of backend development.
But I am also a C++ developer, and over the last year I built my own interpreter: jdBasic.
Not as a Python replacement, but as an experiment in a different direction.
The question behind it was simple:
What happens if you design a language and an interpreter purely around reducing friction during everyday development and experimentation?
This article is not about hype. It is about very practical trade-offs.
Motivation: The Hidden Cost of “Just Import a Library”
Python’s strength is its ecosystem. At the same time, that ecosystem introduces a constant overhead:
- virtual environments
- package management
- imports for even small tasks
- tooling setup before you can actually think
That cost is usually acceptable. Sometimes it is not.
jdBasic explores a different idea:
Bake common, complex operations directly into the language instead of outsourcing them to libraries.
1. The "Always-Open" Utility Console
One of the most common interruptions in development is context switching.
- open a terminal
- start a REPL
- import something
- run a quick check
- close everything again
jdBasic is small and fast enough that I simply keep it open all day. It works like a scratchpad.
Need to check if a text block fits in a 500-char database field?
? LEN("paste the massive string here...")
Quick hex arithmetic:
? $FF * 2
No setup, no imports, no ceremony.
2. Unique Random Numbers Without Loops
Generating something like “6 out of 49” sounds trivial, but in many languages it immediately leads to loops or helper libraries.
jdBasic supports APL-style vector operations.
That means you can treat numbers like a deck of cards:
- generate 1..49
- shuffle the sequence
- take the first 6 elements
' IOTA(49, 1) generates 1..49, SHUFFLE randomizes, TAKE gets the first 6
PRINT TAKE(6, SHUFFLE(IOTA(49, 1)))
' Output: [12 4 49 33 1 18]
No loops, no duplicate checks, no additional code.
3. ASCII Visualization in a Single Statement
In Python, visualization usually means installing and configuring libraries like matplotlib or pandas.
jdBasic takes a different approach:
2D arrays and string matrices are native data types.
This makes it possible to calculate and render ASCII charts directly in the console.
The following example is a complete biorhythm chart (physical, emotional, intellectual) rendered in one statement:
' One-liner Biorhythm Chart
BD="1967-10-21":W=41:H=21:D=DATEDIFF("D",CVDATE(BD),NOW()):X=D-W/2+IOTA(W):C=RESHAPE([" "],[H,W]):PY=INT((SIN(2*PI*X/23)+1)*((H-1)/2)):EY=INT((SIN(2*PI*X/28)+1)*((H-1)/2)):IY=INT((SIN(2*PI*X/33)+1)*((H-1)/2)):C[H/2,IOTA(W)-1]="-":C[IOTA(H)-1,INT(W/2)]="|":C[PY,IOTA(W)-1]="P":C[EY,IOTA(W)-1]="E":C[IY,IOTA(W)-1]="I":PRINT "Biorhythm for " + BD:PRINT FRMV$(C)
It calculates the sine waves for three different cycles, maps them to a 2D grid, overlays axes, and prints the result—all without a single external library or loop.
It returns to the roots of the 8-bit era: the computer is a calculator that is always ready.
4. Persistent Workspaces
In Python, a REPL session is temporary.
Once you close it, everything is gone unless you explicitly serialize your state.
jdBasic reintroduces an old idea: persistent workspaces.
SAVEWS "debugging_session"
The next morning, I open my console and type:
LOADWS "debugging_session"
Variables, functions, objects, history – everything is restored.
I use this constantly for long-running investigations:
- one workspace for database analysis
- one for AI experiments
- one for automation tasks
5. Working with Corporate Data (MS Access, ADODB)
Enterprise environments often come with “unfashionable” data sources.
MS Access databases are a good example.
In Python, this usually means:
- ODBC drivers
- pyodbc
- platform-specific setup
jdBasic uses COM and ADODB directly, without external libraries.
I keep a workspace called "SQL_Console" that contains a simple 150-line script (acct.jdb). It wraps the complexity of ADO into a simple REPL.
The Implementation (Simplified):
' Connect to Access without external libraries
conn = CREATEOBJECT("ADODB.Connection")
conn.Open("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=Orders.accdb")
' Execute SQL and get results
rs = CREATEOBJECT("ADODB.Recordset")
rs.Open("SELECT * FROM Orders", conn)
' Print results
DO WHILE NOT rs.EOF
PRINT rs.Fields("Customer").Value; " | "; rs.Fields("Amount").Value
rs.MoveNext()
LOOP
Because I save this in a workspace, I never re-type the connection string. I just load SQL_Console and fire queries:
ExecuteSQL "SELECT * FROM Users WHERE ID=5"
It returns a formatted Map or Array immediately.
Because this lives in a workspace, I never reconfigure it.
I just load it and run queries.
6. Desktop Automation: Controlling Windows Native Apps
Automating Windows applications used to be easy in the VB6 era.
In Python, it is possible, but often feels bolted on.
In jdBasic, COM automation is a core language feature.
' Launching Microsoft Word...
wordApp = CREATEOBJECT("Word.Application")
wordApp.Visible = TRUE
doc = wordApp.Documents.Add()
' Select text and format it via COM
sel = wordApp.Selection
sel.Font.Name = "Segoe UI"
sel.Style = -2 ' wdStyleHeading1
sel.TypeText "My Generated Doc"
7. Vector Math Without NumPy
In Python, element-wise math requires NumPy.
Python:
import numpy as np
V = np.array([10, 20, 30, 40])
print(V * 2)
jdBasic:
In jdBasic, arrays are first-class citizens. The interpreter knows how to handle math on collections natively.
V = [10, 20, 30, 40]
PRINT "V * 2: "; V * 2
' Output: [20 40 60 80]
There are no imports. No pip install. The interpreter understands what you mean.
8. Learning AI with Transparent Tensors
For production AI, Python frameworks are unbeatable.
For learning how things actually work internally, they can be opaque.
jdBasic has a built-in Tensor type with automatic differentiation.
Gradients are explicit and inspectable.
' Built-in Autodiff
A = TENSOR.FROM([[1, 2], [3, 4]])
B = TENSOR.FROM([[5, 6], [7, 8]])
' Matrix Multiplication
C = TENSOR.MATMUL(A, B)
' Calculate Gradients
TENSOR.BACKWARD C
PRINT "Gradient of A:"; TENSOR.TOARRAY(A.grad)
This is not about performance.
It is about understanding.
9. Micro-Services Without a Framework
In Python, even a small HTTP API usually involves a framework.
jdBasic includes an HTTP server as a language feature.
FUNC HandleApi(request)
response = {
"status": "ok",
"server_time": NOW()
}
RETURN response
ENDFUNC
HTTP.SERVER.ON_POST "/api/info", "HandleApi"
HTTP.SERVER.START(8080)
Define a function, return a map, get JSON.
The Verdict: Ecosystem vs. Immediacy
This is not a “Python vs. BASIC” argument.
It is about choosing where you want to pay the cost.
| Feature | jdBasic | Python |
|---|---|---|
| Session State | Native | Manual |
| Vector Math | Built-in | NumPy |
| Automation | Native COM / ADODB support. |
pyodbc / pywin32. |
| Setup | Single executable | Virtual envs, pip, package management. |
For production systems and large teams: Python is the right choice.
For an always-on, persistent, low-friction development console:
sometimes, my jdBasic interpreter is surprisingly effective.
Basic never really disappeared :-)
You can explore the interpreter's source code, dive into the documentation, and see more examples over at the official GitHub repository: jdBasic
You can try the main features online at: jdBasic
Top comments (0)