J# language: lexer -> parser -> AST -> bytecode -> VM
Project description
J# (J-sharp)
J# is a language project with a real execution pipeline:
source (.jsh) -> lexer -> parser -> AST -> bytecode -> VM
J# programs are not executed with Python eval/exec, and the runtime does not transpile J# source to Python/JS for execution.
Install
cd jsharp
python -m pip install -e .
If install is not available in your environment:
python jsh.py run examples/hello.jsh
Quick Start
Hello
python jsh.py run examples/hello.jsh
Web demo
python jsh.py run examples/web.jsh
Then open http://localhost:8080.
Dump and debug
python jsh.py dump examples/hello.jsh
python jsh.py run --debug examples/hello.jsh
CLI
python jsh.py run <file.jsh>python jsh.py run --debug <file.jsh>python jsh.py run --native <file.jsh>python jsh.py dump <file.jsh>python jsh.py build <file.jsh> -o out.jbc
If installed as a package, jsh is available as a console script.
Architecture (text diagram)
.jsh source
|
v
Lexer -> token stream
|
v
Parser -> AST
|
v
Compiler -> bytecode chunks (per function)
|
v
VM (stack + frames + globals)
Current Feature Set (v0.1)
- Function declarations and function literals
let, assignment,if/else,while,break,continue,return- Numbers, strings, bools, none
- Lists (
[1,2,3]), indexing (a[i]), indexed assignment (a[i] = x) - Calls, attribute access, short-circuit
&&/|| - Stdlib objects:
http,io,fs,json - Builtins:
print,len,div
Competitive Programming
Use the io module for fast buffered input/output.
examples/cp_sum.jshexamples/cp_minmax.jshexamples/cp_prefix_sum.jsh- Full guide:
docs/cp-guide.md
Native Runtime Path
python jsh.py build file.jsh -o file.jbcemits serialized bytecode.python jsh.py run --native file.jshcompiles to temp.jbcand executesjsh-nativewhen available.- If
jsh-nativeis unavailable, CLI prints guidance and falls back to Python VM execution. - Bytecode format spec:
docs/bytecode-spec.md
Roadmap Summary
Near-term goals:
- expand stdlib and diagnostics,
- strengthen Python/native runtime compatibility tests,
- keep web demo smooth in Python VM path,
- improve performance with targeted compiler/VM optimizations.
Detailed plans: docs/roadmap.md.
Project Docs
LANGUAGE_REFERENCE.mddocs/getting-started.mddocs/standard-library.mddocs/internals.mddocs/cp-guide.mddocs/bytecode-spec.mddocs/roadmap.md
Limitations (current)
- Closures/captures are intentionally disabled in v0.1 function literals.
- Native VM path is focused on CP/runtime core; Python VM remains the primary path for full web demo behavior.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jsharp-0.1.0.tar.gz.
File metadata
- Download URL: jsharp-0.1.0.tar.gz
- Upload date:
- Size: 25.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
490ee42aaec5edb0200d54c3daa2814c8c6760c83738dc9a573c44629ddbe2ff
|
|
| MD5 |
96bcaa7c7a189decb744774d63ae2980
|
|
| BLAKE2b-256 |
cd5b3d74c3d45f87f224b2700874fd9b1e27306172f36c42bb8c056e03e481ab
|
Provenance
The following attestation bundles were made for jsharp-0.1.0.tar.gz:
Publisher:
release-pypi.yml on JashMeep/JSharp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jsharp-0.1.0.tar.gz -
Subject digest:
490ee42aaec5edb0200d54c3daa2814c8c6760c83738dc9a573c44629ddbe2ff - Sigstore transparency entry: 973359368
- Sigstore integration time:
-
Permalink:
JashMeep/JSharp@d557a1b5385d21967f11b3533a1376d6032bef40 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/JashMeep
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@d557a1b5385d21967f11b3533a1376d6032bef40 -
Trigger Event:
push
-
Statement type:
File details
Details for the file jsharp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: jsharp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 25.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86702346c7992ce0c879fa7986d49cd9c160c0d1fdcec27a9b3dcc1091a38156
|
|
| MD5 |
b1ad856684fa0055d0b9708bf62e3ec5
|
|
| BLAKE2b-256 |
b370269fd35de3f43c70f3f9c615d3162ea6bd18fd007db93e357c863acbb1d6
|
Provenance
The following attestation bundles were made for jsharp-0.1.0-py3-none-any.whl:
Publisher:
release-pypi.yml on JashMeep/JSharp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jsharp-0.1.0-py3-none-any.whl -
Subject digest:
86702346c7992ce0c879fa7986d49cd9c160c0d1fdcec27a9b3dcc1091a38156 - Sigstore transparency entry: 973359370
- Sigstore integration time:
-
Permalink:
JashMeep/JSharp@d557a1b5385d21967f11b3533a1376d6032bef40 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/JashMeep
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@d557a1b5385d21967f11b3533a1376d6032bef40 -
Trigger Event:
push
-
Statement type: