Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/siraben/vpl
VPL (Visual Programming Language) is an educational Turtle language using Haskell and Gloss
https://github.com/siraben/vpl
educational gloss haskell interpreter monad-transformers
Last synced: 3 months ago
JSON representation
VPL (Visual Programming Language) is an educational Turtle language using Haskell and Gloss
- Host: GitHub
- URL: https://github.com/siraben/vpl
- Owner: siraben
- License: mit
- Created: 2019-11-02T20:10:12.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-15T01:04:40.000Z (about 2 years ago)
- Last Synced: 2024-10-08T14:20:30.733Z (4 months ago)
- Topics: educational, gloss, haskell, interpreter, monad-transformers
- Language: Haskell
- Homepage:
- Size: 682 KB
- Stars: 3
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# VPL (Visual Programming Language)
![Vandyhacks logo](vandyhacks.png)VPL is a language initially developed at VandyHacks 2019, aiming to be
a _LOGO_-like language for the 21st century.## Features
- Haskell-like syntax, using Unicode characters `○●↻↺↑` for base
commands
- Lexical scoping
- Control constructs
- Bounded loops with `loop`
- `if` statements
- Procedures can be defined that take several numerical argument, and
must be called with the correct number of arguments
- A `main` procedure must be defined to run a VPL program## Sample
```haskell
-- Go forward: ↑
-- Clockwise, anti-clockwise rotation: ↻ ↺
-- Pen up, pen down: ○ ●right = [ ↻ 90 ]
left = [ ↺ 90 ]
-- Draw a square
□ n = [ loop 4 [↑ n, right]]
-- Draw a triangle
△ n = [ ↻ 30, ↑ n, ↻ 120, ↑ n, ↻ 120, ↑ n, right ]
main = [ ●, △ 60, □ 60, right, □ 70, right, □ 80, ↑ 150,
loop 100 [↑ 50, ↻ 59]]
```The above code generates the following image:
![Sample image](sample.png)