-
-
Notifications
You must be signed in to change notification settings - Fork 84
/
scrapscript.scroll
33 lines (27 loc) · 958 Bytes
/
scrapscript.scroll
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import ../code/conceptPage.scroll
id scrapscript
name Scrapscript
appeared 2023
creators Taylor Troesh
tags pl
website https://scrapscript.org/
conceptDescription All programs are data, expressions are content-addressable "scraps".Scrapscript rejects traditional package-management. Instead, “scrapyards” combine features from Smalltalk, Hackage, IPFS, GitHub, and StackOverflow.
influencedBy haskell json elm roc hackage-pm
reference https://news.ycombinator.com/item?id=35712163
example
greet <| person:ron 3
. greet :: person -> text =
| :cowboy -> "howdy"
| :ron n -> "hi " ++ a ++ "ron" , a = text/repeat n "a"
| :parent :m -> "hey mom"
| :parent :f -> "greetings father"
| :friend n -> "yo" |> list/repeat n |> string/join " "
| :stranger "felicia" -> "bye"
| :stranger name -> "hello " ++ name
. person =
: cowboy
: ron int
: parent s , s = (: m : f)
: friend int
: stranger text
hasExpressions true