-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
128 lines (84 loc) · 3.65 KB
/
README
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
Burdock
=======
Programming language design and implementation learning project.
Invented motivation
-------------------
If this was a project to realistically produce a programming language
that was widely used, this would be the context of why it exists.
Target use cases
* implementing and maintaining non trivial automated test frameworks
including reports
* benchmarking and profiling data reports/analysis tools
* implementing and maintaining other kinds of automation for complex
software product dev and maintenance, and for demos, solutions
architecture
* build scripts
* most of the "scripting" things you might also use bash or python for
Not designed to be good at implementing the stuff that existing low
level languages such as C++/Rust do well, designed for a only a subset
of the appropriate use cases of e.g. F#, Ocaml, Haskell, isn't aimed
at Javascript backends/platforms.
Hypotheses
* it's realistic to ask most devs, devops, qa, sales engineers,
solutions architects, etc. to pick up Bash or Python, and write and
maintain scripts in them
* it's not realistic to ask them to use any existing functional
programming language unless they already know one well - which is
approximately 0% of the above groups
* a mythical typed functional programming language which is as
accessible and usable as Python would have huge advantages over
something like Python or Bash in these scenarios, and it can be
fairly conservative as far as typed functional programming languages
go and easily achieve these advantages
* a language can be very successful with a culture of using existing
code in various languages instead of focusing on rewriting what
already exists that's good enough/ not where the biggest ROI
is
* compromising on a more beginner oriented syntax based on Pyret is
worth it over something based on e.g. Haskell or Ocaml
Plus a provisional principle: not for or against the language evolving
to support more advanced features in principle (e.g. HKT, effects,
metaprogramming), but this should never be at the expense of
beginner/new user experience aspects such as being able to write
useful programs without type checking.
Target language sketch
----------------------
Takes a lot of inspiration from Pyret, particularly the
syntax. Implemented in Haskell.
* functional
* types + unityped
* FFI for Haskell, Python, C
* run exes, "shell FFI"
* Erlang inspired concurrency features
* relational theory inspired features
* automated testing made very easy
* strong focus on ergonomics, an analogy - the left-handed oil test:
https://www.youtube.com/watch?v=w08XDXjJhsQ&t=127s
Try it out
----------
[currently broken, fix eta Q1 2024]
Install ghc and cabal-install, ghcup is recommended for this, https://www.haskell.org/ghcup/
Update cabal-install package list:
> cabal update
Get the source from github https://github.com/JakeWheat/burdock/
> git clone https://github.com/JakeWheat/burdock.git
Or download the zip file from the green "Code" drop down and unzip it.
Build the interpreter:
> cd burdock
> ./build _build/burdock
Run a script after building:
> _build/burdock examples/ahoy.bur
Ahoy world!
You can copy/link the burdock exe to somewhere in your path and use "#!/usr/bin/env burdock" at the top of your script.
Run the system tests:
> ./build test
Examples
--------
TODO: proper examples, for now there are some files here
* <https://github.com/JakeWheat/burdock/blob/master/examples/>
* <https://github.com/JakeWheat/burdock/blob/master/src/burdock/tests/>
* <https://github.com/JakeWheat/burdock/blob/master/src/burdock/built-ins/>
Links
-----
Github: https://github.com/JakeWheat/burdock/
Contact: [email protected]