Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ftripier/spookyc
A compiler for the π Spooky π± programming language π»
https://github.com/ftripier/spookyc
boo fear ghost halloween memes novelty programming-language scary skeleton spooky surprise vampire ventriloquist-dolls werewolf
Last synced: 3 days ago
JSON representation
A compiler for the π Spooky π± programming language π»
- Host: GitHub
- URL: https://github.com/ftripier/spookyc
- Owner: ftripier
- License: mit
- Created: 2017-09-15T21:39:14.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-09T20:02:15.000Z (about 6 years ago)
- Last Synced: 2024-08-04T00:11:07.242Z (3 months ago)
- Topics: boo, fear, ghost, halloween, memes, novelty, programming-language, scary, skeleton, spooky, surprise, vampire, ventriloquist-dolls, werewolf
- Language: OCaml
- Homepage: http://spookylang.com/
- Size: 91.8 KB
- Stars: 148
- Watchers: 3
- Forks: 4
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-dev-fun - Spooky - The Programming Language of Fear π. (Esoteric languages)
README
# The Spooky Programming Language π»
At the bleeding edge of programming language research, theoreticians structure problems intractable for the retention of the mental contex of a single human mind into explicit semantics, their efforts weighted across the axis of expressiveness.
Among these computations determined too onerous for more affable turing machines, memory management has thrived in the zeitgeist, with such implementations as rust and ATS holding court upon many a Hacker News thread. Distributed systems are no less favored, with Erlang and Ponylang side projects blooming increasingly lush in Github's harvest season.
But there is one clade of computational semantics that remains too labyrinthine, too daring for the eye of even our most maverick programming language academics: writing spooky programs.
Until now.
Introducing:
_π The Spooky Programming Language π_
```
π» boo! πΏ π π
π€‘ spooky_listπ
spooky_list π± π« 1 π¬ 2.5 π¬ "uh oh skeletons" π¬ π π¬ π π¬ β°οΈ ππ
print_and_then_screamπΏ spooky_list ππ
π¬ β°οΈπ
β οΈ```
# The Programming Language of Fear π
Spookylang stands behind but one goal: to be the scariest programming language. Yes, I know, "What about Java 7?!" as you wheel around to high-five your coworker. Enough merriment.
In order to write Spookylang, our primary researcher first had to truly understand the meaning of fear. Failing to do that, our researcher instead proposed these language features:
### Spooky-Completeness π
Simply put, Spookylang is a procedural, mostly dynamically typed machine that can be programmed to execute any computable functions that take "scary" input and output "spooky" output. This property (henceforth referred to as Spooky completeness) is isomorphic to Turing completeness by way of the following reversible morphisms:
```
let n be any string
let π€‘ be any spooky string
let π be a scary wordN + π -> π€‘
π€‘ - π -> N
```To enforce this invariant, the Spookylang compiler provides I/O routines that crash upon being passed "non-scary" strings.
### Determining Scariness of Strings π
The problem of binary categorization of arbitrary input is well known to the artificial intelligence community. For our own purposes, we employed an "AI hardcoded list of regular expressions" that clusters strings according to the following policy:
![Artifical Intelligence Hardcoded List of Regexs](https://i.imgur.com/Jde71bT.png "SVM - Support Very Mhardcoded lists of regexs)")
### Vari(scary)ables πΉ
In a good program, variable names must be terse, but expressive.
In Spookylang they must also be scary, or your program won't compile.
### The Spookiest Emojis π±
There's nothing less scary than a keyword.
.. Except in Spookylang where all keywords are spooky emojis!
### Jump Scares π€‘
Surprise is a key element of being scared.
It will come as no surprise to you, then, that Spookylang employs the element of surprise in its mandate to spook. Not unlike MongoDB, the spookylang runtime will occasionally and unpredictably produce terrifying output.
# Building It π¬
The Spookylang compiler is written in WOAH!Caml, a dialect of OCaml wherein the programmer must be
1. Sweaty
2. Relatively new to OCaml
3. ScreamingIn order to protect our practitioners from the rank OCaml-building amateurity of our researchers we've provided a docker-based workflow. Provided you have a relatively modern version of docker installed, you may brace yourself against the overwhelming senselessness of fear and run `./docker-compile.sh examples/hell_world.spooky` to test out an example (the first time will run a bit slow due to building the docker image and the aforementioned OCaml-building amateurism - over 200 compiler warnings, sorry Jane Street!).
`docker-compile.sh` will build and persist a docker image dubbed `spookybox` (don't go in there!), and can be run on any spooky file you desire. This very repo helpfully contains a decent amount of source files in the `examples` subdirectory.
# Documentation isn't as scary as the other stuff
but is nonetheless included [here](docs/reference.md).
The world's scariest examples can be found in the examples directory.
# Test your mettle
Finally, something that isn't scary; we have tests! Run them with `docker-compose up`.