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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
|
extends /layout.pug
block title
| Clean resources
block content
p This is an incomplete list of resources that may be helpful when you use the #[a(href="http://clean.cs.ru.nl") Clean] programming language.
mixin item(url, name, desc)
li
if desc
| #[a(href=url)= name]:
|
=desc
else if attributes.year
=attributes.year
| :
| #[a(href=url)= name]
else
| #[a(href=url)= name]
mixin githubItem(user, repo, desc)
+item('https://github.com/' + user + '/' + repo, user + '/' + repo, desc)&attributes(attributes)
mixin gitlabItem(user, repo, desc)
+item('https://gitlab.science.ru.nl/' + user + '/' + repo, user + '/' + repo, desc)&attributes(attributes)
mixin svnItem(repo, desc)
+item('https://svn.cs.ru.nl/repos/' + repo, repo, desc)&attributes(attributes)
h2(id="tools") #[a(href="#tools") #] Tools & auxiliaries
ul
+item('https://cloogle.org', 'Cloogle', 'search engine')
+gitlabItem('cloogle', 'cloogle-tags', 'tagfile generator')
+gitlabItem('cstaps', 'iClean', 'interactive shell')
+gitlabItem('cstaps', 'iclm', 'clm with automatic error handling')
+item('https://gitlab.science.ru.nl/cstaps/clean-rts-cheat-sheet', 'cstaps/clean-rts-cheat-sheet', 'cheat sheets for the run-time system')
h2(id="plugins") #[a(href="#plugins") #] Syntax highlighting, editor plugins, etc.
ul
+gitlabItem('cstaps', 'vim-clean', 'Vim syntax highlighting and extra functions')
+gitlabItem('cloogle', 'clean-highlighter', 'standalone JavaScript highlighter')
+githubItem('hayeb', 'SublimeCloogle', 'Sublime Text 3 Cloogle frontend')
+githubItem('isagalaev', 'highlight.js', 'generic JavaScript highlighter with rudimentary Clean support')
+githubItem('matheusamazonas', 'sublime3_clean', 'Sublime Text 3 syntax highlighting')
+item('https://pypi.python.org/pypi/pygments-lexer-clean', 'pygments-lexer-clean', 'Pygments lexer (Python, minted in TeX)')
+githubItem('timjs', 'atom-language-clean', 'Atom highlighting support')
+githubItem('W95Psp', 'CleanForVSCode', 'an extension for VSCode')
h2(id="distributions") #[a(href="#distributions") #] Distributions
ul
+item('https://ftp.cs.ru.nl/Clean/builds/', 'ftp.cs.ru.nl/Clean/builds/', 'official nightlies')
+item('https://hub.docker.com/r/camilstaps/clean', 'camilstaps/clean', 'Docker images')
+item('https://files.martlubbers.net/clean/', 'files.martlubbers.net/clean', 'nightlies with memory')
+item('https://ftp.cs.ru.nl/Clean/Clean24/', 'ftp.cs.ru.nl/Clean/Clean24', 'the official Clean 2.4 distribution')
+item('https://ftp.cs.ru.nl/Clean/Clean30/', 'ftp.cs.ru.nl/Clean/Clean30', 'the official Clean 3.0 distribution')
+item('https://ftp.cs.ru.nl/Clean/nightly/', 'ftp.cs.ru.nl/Clean/nightly', 'some older iTasks distributions')
h2(id="official-repos") #[a(href="#official-repos") #] Official repositories
p These repositories can be browsed at #[a(href="https://svn.camilstaps.nl") svn.camilstaps.nl].
ul
+item('https://gitlab.science.ru.nl/clean-and-itasks', 'clean-and-itasks', 'Radboud gitlab group with libraries')
+item('https://gitlab.science.ru.nl/clean-compiler-and-rts', 'clean-compiler-and-rts', 'Radboud gitlab group with the compiler, code generator, and other core tools')
+svnItem('clean-dynamic-system', 'the dynamics linker and other related tools and libraries')
+svnItem('clean-ide', 'the IDE, cpm')
+svnItem('clean-libraries', 'StdEnv, StdLib, Generics, TCPIP, ArgEnv, Directory, ObjectIO, Hilde, and many others')
+svnItem('clean-tools', 'clm, elf_linker, htoclean')
h2(id="abc") #[a(href="#abc") #] The ABC machine
p
| The ABC machine is the abstract machine for which the Clean #[em compiler] generates code.
| The #[em code generator] can generate actual machine code from ABC code for various platforms.
| For people working on a low level with Clean, it can be useful to implement parts of an application in ABC (through #[a(href="https://cloogle.org/#exact%20code") #[code code { ... }]] blocks)
| It is also a convenient target language if you are implementing a compiler, because it is still relatively high level and has a code generator that optimises a lot of inefficient ABC code away.
p If you are looking into the ABC machine, the following things may be helpful:
ul
li
p
| The ABC machine was originally described by Pieter Koopman in his 1990 dissertation #[em Functional Programs as Executable Specifications] (Meppel).
| For a port of the original #[em Miranda] implementation to Clean, see #[a(href="https://gitlab.science.ru.nl/cstaps/ABCMachine/") cstaps/ABCMachine].
| While this dissertation is useful to get an overview of the design of the abstract machine, it cannot be used as a reference for present-day ABC code.
li
p
| For an overview of all ABC instructions, search for #[code put_instructions_in_table] in #[a(href="https://gitlab.science.ru.nl/clean-compiler-and-rts/code-generator/blob/master/cginput.c") #[code cginput.c]].
| The instructions are implemented in #[code cgcode.c] and #[code cginstructions.c] of the same repository.
| However, the implementation is at times hard to read and sometimes it is easier to look at the implementation in the ABC interpreter described below.
li
p
| #[a(href="https://cloogle.org") Cloogle] has documentation for some ABC instructions.
| The documentation is generated from #[a(href="https://gitlab.science.ru.nl/cloogle/cloogle-org/blob/master/backend/Builtin/ABC.icl") #[code backend/Builtin/ABC.icl]].
| There is a #[a(href="https://gitlab.science.ru.nl/cloogle/cloogle-org/blob/master/util/genabcdoc.icl") #[code genabcdoc]] tool that can generate all ABC documentation in one webpage.
| Pull requests for missing instructions are very welcome.
li
p
| There is an #[a(href="https://gitlab.science.ru.nl/cstaps/abc-interpreter") ABC interpreter] written in C.
| The implementation of the instructions can be found in #[code /src/interpret_instructions.h].
| This is probably the most useful reference for the semantics of ABC instructions.
p
| The repository also includes an interactive graphical debugger for the ABC machine, inspired by `gdb`.
| This is the #[code debug] program found in #[code /src].
| You first need to generate bytecode from the ABC code using the workflow described in #[a(href="https://gitlab.science.ru.nl/cstaps/abc-interpreter/blob/master/doc/tools.md") #[code doc/tools.md]].
| For help on the interface of #[code debug], press #[kbd ?] when you are in the GUI.
p
| For performance reasons, this interpreter has a larger instruction set than the actual ABC machine.
| You can optimise 'common' ABC code to 'optimised' ABC code using the #[code abcopt] tool in the same repository.
| The interpreter should however also work with unoptimised ABC code.
li
p If you get stuck, ask the maintainer of the #[a(href="https://gitlab.science.ru.nl/cstaps/abc-interpreter") ABC interpreter] or the #[a(href="https://gitlab.science.ru.nl/clean-compiler-and-rts/code-generator") code generator] for help.
h2(id="homework") #[a(href="#homework") #] Homework
p
strong(style="color:red;") NB:
| While not all of these repositories have #[strong(style="color:red;") licenses],
| copying from any of them without giving proper attribution constitutes #[strong(style="color:red;") plagiarism] in a university context.
| This list is provided here for inspiration only.
ul
li
strong Radboud: Functional Programming 1/2 (pre-Haskell); Functional Programming for Artificial Intelligence students
ul
+githubItem('MarkVink', 'Functioneel-Programmeren')(year='2013-14')
+item('https://git.camilstaps.nl/university/NWI-IBC029-30-Functioneel-Programmeren.git/', 'NWI-IBC029-30-Functioneel-Programmeren')(year='2014-15')
+githubItem('BaantjerKok', 'CleanTheClean')(year='2016-17')
+githubItem('HazeNebula', 'Functional-Programming-Clean')(year='2016-17')
li
strong Radboud: SoccerFun
ul
+githubItem('camilstaps', 'SoccerFunTeam')(year='2014-15')
+githubItem('ErinvanderVeen', 'Team-SMonad')(year='2015-16')
li
strong Radboud: Advanced Programming
ul
+githubItem('m4de', 'Advanced-Programming')(year='2014-15')
+githubItem('Jaxan', 'advanced-programming')(year='2014-15')
+githubItem('alexfedotov', 'advanced-programming-2015')(year='2015-16')
+githubItem('dopefishh', 'ap2015')(year='2015-16')
+githubItem('Dryopes', 'Advanced-Programming')(year='2016-17')
+githubItem('digideskio', 'advanced-programming-course')(year='2017-18')
+githubItem('lnkuiper', 'Advanced-Programming')(year='2017-18')
+item('https://git.camilstaps.nl/university/NWI-I00032-Advanced-Programming.git', 'NWI-I00032-Advanced-Programming')(year='2017-18')
li
strong Radboud: Compiler Construction
ul
+githubItem('jangroothuijse', 'CompilerConstruction')(year='2012-13')
+githubItem('dopefishh', 'cc1516')(year='2015-16')
li
strong Eötvös Loránd
ul
+githubItem('ordogfioka', 'Clean')(year='2016-17')
+githubItem('thookes', 'clean')(year='2016-17')
+githubItem('tomeeeS', 'clean-bead1')(year='2017-18')
|