Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
947744f
list functions in AS, inspired by SML Basis library
matthewhammer Feb 4, 2019
b97eb67
done with SML basis List module; starting streams (aka lazy lists)
matthewhammer Feb 4, 2019
2012f69
readme stub
matthewhammer Feb 4, 2019
35cf9aa
nits
matthewhammer Feb 4, 2019
5a470d7
a stream function: mapfilter
matthewhammer Feb 4, 2019
e3da12b
another stream function: map
matthewhammer Feb 4, 2019
6c9ad8e
stream function 'merge'
matthewhammer Feb 4, 2019
4686876
nits; typos
matthewhammer Feb 5, 2019
4d3f864
address feedback from Andreas
matthewhammer Feb 5, 2019
1a83957
fix type error, with Andreas's help
matthewhammer Feb 5, 2019
0ebde57
fix type error, with Andreas's help
matthewhammer Feb 5, 2019
6e1f251
Merge branch 'collections' of github.com:dfinity-lab/actorscript into…
matthewhammer Feb 5, 2019
2b682e3
update readme
matthewhammer Feb 5, 2019
5a9149f
starting hashtrie; many loose ends remain
matthewhammer Feb 6, 2019
c8629f5
hashtrie construction operations; everything needs testing now
matthewhammer Feb 6, 2019
d4f9e91
minor: md formatting
matthewhammer Feb 6, 2019
5c25eed
minor: typo
matthewhammer Feb 6, 2019
a978eb7
minor
matthewhammer Feb 7, 2019
06b19fe
encode functional sets as hashtries; run a baby test, encoding hashes…
matthewhammer Feb 12, 2019
95f41e4
hashtrie: debugging reveals some bugs
matthewhammer Feb 12, 2019
415d631
hashtries: simple tests on sets pass; tests insertion & membership
matthewhammer Feb 12, 2019
9236308
hashtries: finish little tests on sets; fix typo
matthewhammer Feb 12, 2019
829003a
hashtrie: more emulation of sum types (see AST-42)
matthewhammer Feb 19, 2019
5c36751
squash! hashtrie: more emulation of sum types (see AST-42)
matthewhammer Feb 19, 2019
2354ec7
simple merge on hash tries; union on sets
matthewhammer Feb 20, 2019
0ed35ee
minor: update issue link
matthewhammer Feb 20, 2019
6ff2bf8
hash tries: conj, disj; sets: intersect
matthewhammer Feb 21, 2019
a4d439a
hashtrie: debugging conj and disj; disj has bugs
matthewhammer Feb 21, 2019
30ea11b
hashtrie: debug disj; write+test setCard, setEq
matthewhammer Feb 21, 2019
5ddfcbb
hashtrie: filter
matthewhammer Feb 22, 2019
3a3524b
hashtrie: mapFilter
matthewhammer Feb 22, 2019
ebc656a
hashtrie: fold, exists, forall
matthewhammer Feb 22, 2019
12a7c2f
minor: doc disj
matthewhammer Feb 22, 2019
0479534
hashtrie: update TODOs
matthewhammer Feb 22, 2019
b88e245
Merge remote-tracking branch 'origin' into collection-modules
matthewhammer Mar 6, 2019
06700be
package list functions into a record, in lieu of modules; cleanup
matthewhammer Mar 6, 2019
3307685
Trie and Set modules; Makefile for regression tests
matthewhammer Mar 6, 2019
3ce9f33
further decomposition of modules
matthewhammer Mar 6, 2019
6bdb6d5
file rename
matthewhammer Mar 6, 2019
dabdab4
clean up
matthewhammer Mar 6, 2019
7c1fde4
fix typo
matthewhammer Mar 6, 2019
646d903
minor: remove confusing comments
matthewhammer Mar 6, 2019
fca20a9
rough draft of Produce Exchange, skeleton
matthewhammer Mar 7, 2019
52fd3a3
Makefile avoids re-running asc
matthewhammer Mar 7, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions samples/collections/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
ASC=../../src/asc
MODULE_NAME="\x1b[1;32mModule:\x1b[1;34m"
BEGIN="\x1b[0;1mBegin...\x1b[0m"
DONE="\x1b[1mDone.\n---------------------------------------------------\x1b[0m"

.PHONY: default all clean

default: all

all: \
List.out \
ListTest.out \
Trie.out \
Set.out \
SetDb.out \
SetDbTest.out \
ProduceExchange.out \

clean:
rm -f *.out

List.out: list.as
@echo $(MODULE_NAME) $(basename $@)
@echo $(BEGIN)
$(ASC) -r $^ > $@
@echo $(DONE)

ListTest.out: list.as listTest.as
@echo $(MODULE_NAME) $(basename $@)
@echo $(BEGIN)
$(ASC) -r $^ > $@
@echo $(DONE)

Trie.out: list.as trie.as
@echo $(MODULE_NAME) $(basename $@)
@echo $(BEGIN)
$(ASC) -r $^ > $@
@echo $(DONE)

Set.out: list.as trie.as set.as
@echo $(MODULE_NAME) $(basename $@)
@echo $(BEGIN)
$(ASC) -r $^ > $@
@echo $(DONE)

SetDb.out: list.as trie.as set.as setDb.as
@echo $(MODULE_NAME) $(basename $@)
@echo $(BEGIN)
$(ASC) -r $^ > $@
@echo $(DONE)

SetDbTest.out: list.as trie.as set.as setDb.as setDbTest.as
@echo $(MODULE_NAME) $(basename $@)
@echo $(BEGIN)
$(ASC) -r $^ > $@
@echo $(DONE)

ProduceExchange.out: list.as trie.as produceExchange.as
@echo $(MODULE_NAME) $(basename $@)
@echo $(BEGIN)
$(ASC) -r $^ > $@
@echo $(DONE)
20 changes: 20 additions & 0 deletions samples/collections/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[See #127](https://github.com/dfinity-lab/actorscript/issues/127)

Critical modules
==================
- [x] **List**: See [`List` module from SML Basis library](http://sml-family.org/Basis/list.html).
- [x] **Hashtrie**: Persistent maps, as functional hash tries.
- [x] **Set**: Persistent sets, based directly on persistent maps.
- [ ] **Hashtable**: Mutable maps, as imperative hash tables.

Secondary modules
==================
These modules _may_ be useful in the collections library:
- [ ] **Stream**: Type def done; most operations are pending...

Other modules
==================
These modules are merely exercises (toys/examples), and _not_ essential to the collections library:
- [ ] **Thunk**: Type def and some operations are done.


Loading