-
Notifications
You must be signed in to change notification settings - Fork 9
/
Changelog
218 lines (176 loc) · 7.09 KB
/
Changelog
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
v0.3.0
+ Alias of v0.2.23
+ v0.2.23 had enough changes to warrant a big version number bump
v0.2.23
+ Wooe, so many improvements I can't even list them all.
+ Awesome dev environment! Automatically sync UI with file on every save.
v0.2.22
+ Allow for keywords to be XML attribute names
+ Add --normalize.css=false and minify=true commandline options
+ text module with text.trim
+ Implement != and ! comparative operators
+ Rename filter module to list, and make it list.filter
v0.2.21
+ Hash-expand xml attributes a la <div #{ class:'clickable', onclick:handler() { ... }} />
+ New tap modules
+ Back to using npm node modules instead of git...
v0.2.20
+ Add support for automatic less preprocessing of <link ref="stylesheet/less" ... /> elements
+ Add support for stylus
+ Automatically detect that less or stylus is required, and install them dynamically at runtime if needed
+ Handler event arguments are now cancelable
+ Allow for commas between XML attributes, e.g. <div foo="bar", cat="qwe"/>
+ Remove need for `let` in front of declarations. Now it's just `foo = "bar"`
v0.2.19
+ Disabled minification for now
+ Add -v/--version flags
v0.2.18
+ Allow for `foo is "image"` as a shorthand for `foo is = "image"`
+ Inline all stylesheets with static hrefs as a <style> tag in the header
+ Minify the CSS of inlined style tags using clean-css
v0.2.17
+ Variable declarations require a value (let foo is no longer valid, must to let foo = null)
+ implement json module
+ add an instagram example app
+ add access to npm node_modules with the require() statement in inline javascript code
+ implement xhr module
v0.2.16
+ Fix broken v0.2.15 build
v0.2.15
+ Use `let` instead of `var` for variable declarations
+ allow for comma-seperated declarations (e.g. let foo = 1, bar = 2)
+ new mutation statement syntax - instead of foo.bar.set(2), you say foo.bar set: 2
v0.2.14
+ inline statically referenced stylesheets
+ remove parentheseses around the conditinoal of if, for and switch statements.
v0.2.13
+ test new packaging system
v0.2.12
+ handler and function code now runs procedurally. Only template code is reactive and functional. However, functions are still truly functional (no side effects).
+ control flow statements parse and compile correctly in templates, handler and functions.
+ todomvc example app fully functional: http://marcuswest.in/fun/todo-mvc.html
+ lots and lots of other improvements :)
...
v0.2.7
+ Unit tests for parser, resolver, compiler and runtime library
+ Proper JS bridge: <script jsVar=funVar> ... jsVar.set(...) </script>
+ Mouse module
+ Styles with dynamic values: <div id="output1" style={ background:'red', width:100, height:100, position:"absolute", top:Mouse.y, left:Mouse.x }/>
+ Object literal emission
+ Variables are now dynamically typed, and expression type-evaluated at runtime
v0.2.6
+ npm install works again
v0.2.5
+ Fix parsing of empty XML tags
+ Add parser and resolver test cases for XML
+ examples/chat.fun works again :)
v0.2.4
+ operator presedence in parser
+ parser unit tests for if statements, composite expressions, and operator presedence
+ use latest fin
+ use latest std
+ first resolver tests
+ first compiler tests
+ moved all js files into /lib
v0.2.3
+ Parser improvements
+ Local expressions are now Local item properties, e.g. let name = "marcus" name.set("marcus westin")
+ Unit testing using nodeunit - a bunch of test cases added for the parser!
v0.2.2
+ File cleanup
+ Upgrade to fin v0.2.11
v0.2.1
+ Fix if/else statement parsing
v0.2.0
+ Publish fun with npm
+ Significantly improved parsing
+ Use latest fin
v0.1.0
+ First versioned version of fun. Lots of stuff works, lots of stuff is hacky, lots of stuff to be done.
TODOs and Roadmap
Get involved - complete a task :)
All expressions should have type:EXPRESSION | INVOCATION | COMPOSITE - each expression should also have a valueType. An alias has the type of what its aliasing. An invocable's signature's argument has the type of what is passed in. A composite has the type of its left operand(?).
--------------
Fix prefixes.
-3
and
displayNumber(-2)
work, but
for (number in [1,2,3]) { displayNumber(-number) }
does not, nor does
-number
--------------
- Add valueType to each AST with a value
- Make chat.fun derive global.messages and message.text from the declared classes rather than syntactically
- Add enum type?
enum State {
1 happiness
2 sadness
3 giddiness
}
let aState = new State(1)
switch(aState) {
case State.happiness:
case State.sadness:
}
<button>"switch state"</button onclick=handler() { aState.set(State.sadness) }>
- "Write apps"
1) write an app
2) write another one
3) tell the world about them
- "Template arguments"
1) Pass in arguments to template invocations
X let aTemplate = template(item) { "Hello " item.name }
X let anotherTemplate = template(name) { "Hello " name }
aTemplate(@1)
aTemplate("world")
- "Handler arguments"
1) Pass in arguments to handler invocations
let removeFriend = handler(user, friend) {
user.friends.remove(friend)
}
for (friend in user.friends) {
<button>"remove"</button onclick=removeFriend(user, friend)>
}
- "thefunlanguage.com"
X 1) just put something up there
2) run server in browser for demos
3) in-browser editor for demos
4) list engines
5) technical docs
6) add just-compile option to fun, so that you can get a static version of webpages that don't use the Global keyword
- "Custom events"
1) allow for custom events other than XML elements' "on*" events, e.g.
App.onLoad = handler() { ... }
// or
App.onLoad(handler() { ... })
// or
App.onLoad.add(handler() { ... })
2) Implement some, e.g
Global.onConnect = handler() { ... }
Global.onDisconnect = handler() { ... }
- Allow for unary operators !, -, + at the beginning of conditional composite statements
- "Type checking"
X 1) Tags with data should have the dataType attribute <input data=Local.x dataType="number" />
2) Tags should have custom implementations, that declare what types of data they accept
3) The data should infer its type of the dataType attribute, and should default to "text"
4) Template and handler arguments need to have a type associated with them
5) MIGRATE all type checking from the parser to the resolver. Right now the parser is selective about what type of
value can be where. The resolver should do all of that checking.
- "List/Range literals (and list comprehensions?)"
See examples/for_loop_literal.fun
1) Implement list literals (e.g. for (number in [1,2,3]) { ... })
2) Implement ranges (e.g. for (number in [1..10]) { ... })
3) Investigate list comprehension - are they useful for fun?
- "Fun Engines"
1) separate out the persistence and the storage engines from each other
2) a mysqpl persistence engine
3) a 0mq pubsub engine
4) a couchdb persistence engine
5) a couchdb pubsub engine (changes api)
- "Type-safe item creation"
1) Whenever an item gets created, ensure that all item properties that are used elsewhere
are properly initialized, and that no properties that are not used are initialized
BUGS
- "Relative file imports"
file imports are relative to the process directory but should be relative to the file's directory