Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wildlyinaccurate/hello-world
Hello, World! Is a programming language for writing hello world applications. And nothing else.
https://github.com/wildlyinaccurate/hello-world
Last synced: 5 days ago
JSON representation
Hello, World! Is a programming language for writing hello world applications. And nothing else.
- Host: GitHub
- URL: https://github.com/wildlyinaccurate/hello-world
- Owner: wildlyinaccurate
- License: mit
- Created: 2015-08-21T09:42:30.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-06-17T08:56:52.000Z (over 8 years ago)
- Last Synced: 2023-03-12T01:47:44.922Z (over 1 year ago)
- Language: Haskell
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hello, World!
[![Build Status](https://travis-ci.org/wildlyinaccurate/hello-world.svg?branch=master)](https://travis-ci.org/wildlyinaccurate/hello-world)
Hello, World! Is a programming language for writing hello world applications. And nothing else.
## Syntax
### Hello, World!
The
Hello, World!
token (two spaces, followed by the string "Hello, World!") will evaluate to the string `"Hello, World!"`. This token is represented internally as a `HelloVal`. Once the interpreter parses a `HelloVal`, it will not parse anything else.### Comments
Since everything after a `HelloVal` is ignored, it is possible to document your programs with comments like so:
```
Hello, World! This is a comment
Hello, World! This is another, slightly more interesting comment
Hello, World!
```The program above will output the following:
```
Hello, World!
Hello, World!
Hello, World!
```### Boolean Logic
You can implement simple boolean logic by utilising the fact that anything other than a `HelloVal` is an error.
```
Hello, World!
False
Hello, World! This will never be evaluated
```The above program will conveniently explode on the `False` statement, and output the following:
```
Hello, World!
Parse error at "your face" (line 1, column 1):
unexpected "F"
```## Installation
```
git clone https://github.com/wildlyinaccurate/hello-world.git
cd hello-world
caban sandbox init
cabal install
make
```## Usage
Hello, World! can be run as a REPL
```
$ ./bin/hello-world
hello=> Hello, World!
Hello, World!
hello=> Hello, World!
Parse error at "lisp" (line 1, column 1):
unexpected "H"
expecting " Hello, World!"
hello=> what even is this
Parse error at "lisp" (line 1, column 1):
unexpected "w"
expecting " Hello, World!"
```Or it can take programs directly
```
$ ./bin/hello-world ' Hello, World!'
Hello, World!
```## Why?
Shut your face.