Skip to content

Commit cf82a3f

Browse files
committed
Update to version 0.0.6
1 parent b2b4530 commit cf82a3f

28 files changed

+463
-297
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# Version 0.0.6
2+
- Added basic construction syntax support.
3+
- Added `value?` native.
4+
- Improved some code formatting.
5+
- `number!` and `any-word!` are now located in `system/words`.
6+
- Added `and`, `or`, and `xor` operations for `typeset!`s.
7+
- `pair!`, `tuple!`, and `time!` no longer box their values (internal).
8+
9+
110
# Version 0.0.5
211
- Added `case` native.
312
- Added basic actions for `datatype!`.

FEATURES.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
|--------------------------|----------|--------|-------------|---------------|---------------|
1414
| `datatype!` | Y | NA | NA | Y | N |
1515
| `unset!` | Y | NA | N | N | N |
16-
| `none!` | Y | P* | Y | Y | P |
16+
| `none!` | Y | P | Y | Y | P |
1717
| `logic!` | Y | P* | N | Y | P |
1818
| `block!` | Y | Y | P | P** | P |
1919
| `paren!` | Y | Y | B | PB | PI |
@@ -42,7 +42,7 @@
4242
| `bitset!` | Y | NA | N | N | N |
4343
| `point!` | N | NA | N | N | N |
4444
| `object!` | Y | NA | P | Y | N |
45-
| `typeset!` | Y | NA | P | Y | N |
45+
| `typeset!` | Y | NA | P | Y | P |
4646
| `error!` | N | NA | N | N | N |
4747
| `vector!` | P | NA | N | N | PI |
4848
| `hash!` | P | NA | N | N | PI |
@@ -60,7 +60,7 @@
6060
| `image!` | N | NA | N | N | BI |
6161
| `money!` | P | B**** | N | N | N |
6262

63-
\* Construction syntax is currently not supported.
63+
\* Only basic construction syntax is currently supported.
6464

6565
\*\* Newlines are currently not preserved.
6666

@@ -139,7 +139,7 @@
139139
| `exp` | N |
140140
| `square-root` | N |
141141
| `construct` | N |
142-
| `value?` | N |
142+
| `value?` | Y |
143143
| `try` | N |
144144
| `uppercase` | N |
145145
| `lowercase` | N |

TODO.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@ TL;DR:
55

66
Finish very soon:
77
- Fix `to` (internal issue).
8-
- Add (at least basic) support for construction syntax.
98
- Fix refinements for natives and actions.
109
- Add support for `map!`, `binary!`, and `date!` literals.
11-
- Stop boxing compound natives such as `pair!` and `time!`.
1210
- Fix stringy types like `file!` and `tag!`.
1311

1412
Finish somewhat soon:
@@ -19,7 +17,7 @@ Finish somewhat soon:
1917
- Implement actions for more datatypes.
2018
- Allow including files (kinda already done?).
2119
- Add newline markers in blocks (will require rewriting many things).
22-
- Redo literally everything related to vectors.
20+
- Redo/reimplement literally everything related to vectors.
2321
- Vector docs: [here](https://github.com/red/red/wiki/%5BDOC%5D-Comparison-of-aggregate-values-%28block%21-vector%21-object%21-hash%21-map%21%29#vector)
2422
- Give functions custom contexts so that `self` can be used in a function inside an object/context.
2523
- Switch from using unions to interfaces for the type system.
@@ -68,4 +66,6 @@ Things already done:
6866
- `a: [none] a/1` should not return a `none!`.
6967
- Fix path stuff for other things supporting path access:
7068
- Fix path assignments that are longer than 2 values.
71-
- ~~`series!` actions such as `at` and `skip` should not copy the original `series!`.~~
69+
- ~~`series!` actions such as `at` and `skip` should not copy the original `series!`.~~
70+
- Add (at least basic) support for construction syntax.
71+
- Stop boxing compound natives such as `pair!` and `time!`.

core/functions.red

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@ also: func [
1313

1414
comment: func ["Consume but don't evaluate the next value" 'value][]
1515

16+
??: func [
17+
"Prints a word and the value it refers to (molded)"
18+
'value [word! path!]
19+
][
20+
prin mold :value
21+
prin ": "
22+
print either value? :value [mold get/any :value]["unset!"]
23+
]
24+
1625
probe: func [
1726
"Returns a value after printing its molded form"
1827
value [any-type!]

core/natives.red

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,7 @@ construct: make native! [[
615615
]
616616
construct
617617
]
618+
]
618619

619620
value?: make native! [[
620621
"Returns TRUE if the word has a value"
@@ -624,6 +625,7 @@ value?: make native! [[
624625
value_q
625626
]
626627

628+
TODO [
627629
try: make native! [[
628630
"Tries to DO a block and returns its value or an error"
629631
block [block!]

core/scalars.red

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Red []
22

3-
yes: on: true
4-
no: off: false
5-
none: none
3+
true: yes: on: #[true]
4+
false: no: off: #[false]
5+
none: #[none]
66

77
tab: #"^-"
88
cr: #"^M"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "red.js",
3-
"version": "0.0.5",
3+
"version": "0.0.6",
44
"description": "A web-based runtime for the Red programming language",
55
"main": "app.js",
66
"author": "theangryepicbanana",

0 commit comments

Comments
 (0)