pronounced "comma" (or [short pause])
compiles down to c++ lmaoo (AKA the compiler has a dependency on clang++ existing and working)
no comments. to use comments, use the ,md variant.
don't forget to end your statements with . or !
constants dont exist. sorry :p
a sign = 1.
a,= 2.
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 are implicit and postfix.
1, 2 yeah doubled.
Control flow is labeled, and ends with the label backwards.
aboveone a > 1?
a,= a doubled.
:a < 1?
a,= a plus 1.
:
a,= a minus 1.
enoevoba.
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.
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
some texttt = "hello chat
".
some putsnoln.
you can use ' to specify that the next character is a character literal.
character chacha = 'a.
newline chacha = '
.
omega chacha = 'Ω.
character, newline, omega putsnoln.
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).
oneandahalfinasign sign = -> oneandahalf sign.
"1 5: ", oneandahalfinasign, '
putsnoln.
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.
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)
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.
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/readmehello.,, 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.