comma
Version, currently main branch1 version
- main branchlatestSep 17, 2023
github.com/esthedebeste/comma
,lang
Installation
# Add this to your shard.yml
dependencies:
comma:
github: esthedebeste/comma
branch: mainmain is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
1.9.2- License
- MIT
- Author
- esthedebeste
- Target
commafrom sorcerer/comma.cr
Dependencies
This version declares no dependencies.
README
,
pronounced "comma" (or [short pause])
compiles down to c++ lmaoo (AKA the compiler has a dependency on clang++ existing and working)
syntax
no comments. to use comments, use the ,md variant.
don't forget to end your statements with . or !
variables
constants dont exist. sorry :p
a sign = 1.
a,= 2.
functions
the last declared variable gets returned.
no variables being declared results in undefined behavior.
yeah a sign, b sign to sign.
added sign = a plus b.
haey.
doubled a sign to sign.
doubled sign = a times 2.
delbuod.
function calls
function calls are implicit and postfix.
1, 2 yeah doubled.
control flow
Control flow is labeled, and ends with the label backwards.
expression ? body : else_body
aboveone a > 1?
a,= a doubled.
:a < 1?
a,= a plus 1.
:
a,= a minus 1.
enoevoba.
chance literals
instead of using true and false, you can use yes, maybe, no, always, sometimes, and never.
alwayshas a runtime 100% chance of going into the conditional.sometimeshas a runtime 50% chance of going into the conditional.neverhas a runtime 0% chance of going into the conditional.- The runtime chance literals support arithmetic.
sometimes divided by 2has a 25% chance,never plus 0 2has a 20% chance, etc.
- The runtime chance literals support arithmetic.
yesis a compile-time version ofalways.maybeis a compile-time version ofsometimes.nois a compile-time version ofnever.
onceinawhile always divided by 3?
"yippee!!" putswithaln.
elihwaniecno.
looping
to loop, you can say again!. to cancel the loop, you can use not again!
basically a < 100?
a,= a doubled.
again!
yllacisab.
so always?
a,= a divided by two.
toolow a < 60?
so not again!
woloot.
again!
os.
"a: ", a, '
putsnoln.
for loops are fake and don't exist im afraid
string literals
some texttt = "hello chat
".
some putsnoln.
character literals
you can use ' to specify that the next character is a character literal.
character chacha = 'a.
newline chacha = '
.
omega chacha = 'Ω.
character, newline, omega putsnoln.
number literals
due to syntax and natural language ambiguity (some languages use commas before decimals, some use points) floating-point literals use spaces.
oneinavariable sign = one.
oneandahalf math small = 1 5.
There are convenience english sign-literals for 0 (zero), 1 (one), 2 (two), 3 (three), 4 (four), 5 (five), 6 (six), 7 (seven), 9 (nine), 10 (ten), and 100 (a hundred).
casting
oneandahalfinasign sign = -> oneandahalf sign.
"1 5: ", oneandahalfinasign, '
putsnoln.
operators
lets do a c++ to , mapping.
1 + 2->one plus two1 - 2->one minus twoabs(1 - 5)->five diff one4 / 2->four divided by two4 * 2->four times twopow(2, 5)->two to the power of five4 % 2->four modulo two2 * 5 + 1->two times five plus one2 * (5 + 1)->temporary_variable sign = five plus one. two times temporary_variable putswithaln.
types
LOL right. okay so basically to map some , types to c++ types:
sign->ptrdiff_tunsi->size_tsign six-four->int64_tunsi six-four->uint64_tsign three-two->int32_tunsi three-two->uint32_t
math small->floatmath big->doublechacha->wchar_ttexttt->std::wstring(todo: utf-32)
exporting
multiple files? we got you covered. to export something, prefix it with _. (top-level only for now)
sorcerer/a,:
_somevariable texttt = "haiiii :3 ".
_somefunction a texttt to texttt.
returnvalue texttt = a plus _somevariable.
noitcnufemos_.
sorcerer/b,:
_somevariable _somefunction putswithaln.
,md
a ,md file will only have sections delimited by ```, and ``` interpreted as code. this readme is a fully valid ,md file, for example. you can run it with
# make sure you have crystal installed by the way :p
shards build comma
./bin/comma ./readme.md -o ./bin/readme
./bin/readme
filenames
hello.,, hello, and hello,,,,,,,, are legal filenames.
the canonical way to use ,md is for example hello,md. hello.,md, hello.,.md, and hello.md are also permitted by the ,lang compiler.
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
main- Seen
- Sep 17, 2023
- Crystal
1.9.2- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/esthedebeste/comma
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 13, 2026
- Synced
- Aug 13, 2026
- Versions
- 1