Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of lazy stream astraction in JS #9

Open
wants to merge 210 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
210 commits
Select commit Hold shift + click to select a range
a16a82b
Implement somewhat more classical, lazy stream pattern with head and …
Gozala Oct 17, 2011
fc85eda
Fix bug in filter, wrong callback was used.
Gozala Oct 21, 2011
4671d0c
Use more consistent naming convention.
Gozala Oct 21, 2011
4aff3de
Implement delay helper function to asyncify streams when necessary.
Gozala Oct 21, 2011
a983930
Update test utils to use new stream API.
Gozala Oct 21, 2011
0d65bc2
Update map tests.
Gozala Oct 21, 2011
2fdca66
Update filter tests.
Gozala Oct 21, 2011
d229d81
Update list tests.
Gozala Oct 21, 2011
dc52b9b
Rearrange few functions.
Gozala Oct 21, 2011
84e5ee7
Create tests for take.
Gozala Oct 21, 2011
7fc9dd9
Fix implementation of head.
Gozala Oct 21, 2011
38a3f31
Update head tests.
Gozala Oct 21, 2011
6abc2e3
Update documentation of take.
Gozala Oct 21, 2011
effe6dc
Fix bug in tail implementation.
Gozala Oct 21, 2011
2842f07
Update tail tests.
Gozala Oct 21, 2011
7600fdb
Simplify implementation of take.
Gozala Oct 21, 2011
571d20a
Implement drop.
Gozala Oct 21, 2011
8a1b79a
Implement tests for drop.
Gozala Oct 21, 2011
6aab25a
Add tests for map with multiple stream sources.
Gozala Oct 21, 2011
8a837e1
Fix few typos in take tests.
Gozala Oct 21, 2011
132e60d
Update zip tests.
Gozala Oct 21, 2011
4c791e0
Implement append that has no side-effects.
Gozala Oct 21, 2011
e29dfda
Update append tests.
Gozala Oct 21, 2011
d964841
Simplify implementation of flatten.
Gozala Oct 21, 2011
ddfd815
Replace join tests with flatten tests (before flatten used to be call…
Gozala Oct 21, 2011
6f85484
Add documentation to the delay.
Gozala Oct 21, 2011
f0207c3
Implement basic stream assembler function and iterate stream assembler.
Gozala Oct 21, 2011
217c365
Remove loop and add repeat instead.
Gozala Oct 21, 2011
d8164c4
Remove obsolete tests and rename existing ones.
Gozala Oct 21, 2011
9d05988
Disable non up 2 date tests.
Gozala Oct 21, 2011
ea81267
fix package.json
Gozala Oct 21, 2011
f9537a5
Move some of functionality to the experimental.
Gozala Oct 23, 2011
6f18312
Implement saner mix & helper promise API.
Gozala Oct 23, 2011
cf26023
Add tests for mix.
Gozala Oct 23, 2011
dd29b31
Implement simple but powerful merge.
Gozala Oct 24, 2011
3074e4a
Update & enable merge tests.
Gozala Oct 24, 2011
f0db006
Fix typo it mix tests.
Gozala Oct 24, 2011
51fcdad
Make sure take does not reads from tail unless it needs to.
Gozala Oct 24, 2011
ab53b51
Simplify implementation of hub.
Gozala Oct 24, 2011
cd4600e
Update hub tests.
Gozala Oct 24, 2011
b4f7a7c
Implement deliver to be used with promises, to avoid dependency on in…
Gozala Oct 24, 2011
2dc4d37
Simplify lazy by using promises.
Gozala Oct 24, 2011
f1ba8c1
Update & enable tests for lazy.
Gozala Oct 24, 2011
256bd93
Move futures to the experimental module.
Gozala Oct 24, 2011
87d2de7
Adding tests for repeat.
Gozala Oct 24, 2011
14a9d16
Implement tests for iterate.
Gozala Oct 24, 2011
d3526b9
Refine some experimental streams.
Gozala Oct 24, 2011
3c6c433
add travis config
Gozala Nov 18, 2011
b290d80
Adding build indicator.
Gozala Nov 18, 2011
61c1f24
Implement API for handling errors.
Gozala Jan 7, 2012
493da49
Experiment with alternative prototype based API.
Gozala Jan 9, 2012
c191315
Implement laziness via `alter` method
Gozala Jan 10, 2012
4eeffeb
Convert all implementations to the prototype based.
Gozala Jan 10, 2012
e86cab5
Reuse same promise abstraction instead of creating a new potential so…
Gozala Jan 10, 2012
69f5172
Allow fulfilling promises only with streams that have a tail.
Gozala Jan 10, 2012
23e4383
Rename confusing `Stream.tail` to `Stream.lazy`
Gozala Jan 10, 2012
f7a1472
Fix bug in delay.
Gozala Jan 10, 2012
3d27ea9
Verify that `on` has `stop` callback as well before calling it.
Gozala Jan 10, 2012
5403715
Convert `print` to a stream method.
Gozala Jan 10, 2012
315b945
Fix `lazy` so that it lazily caches values.
Gozala Jan 10, 2012
43d491b
Write tests for stream constructors.
Gozala Jan 14, 2012
ad54dd5
Improve assert dsl.
Gozala Jan 14, 2012
01f4cdd
Update test for stream iterate & repeat constructors.
Gozala Jan 14, 2012
c49466b
Implement Stream error constructor.
Gozala Jan 14, 2012
6c85265
Fix error in stream error handling.
Gozala Jan 14, 2012
64d2e8a
Move definition of map function.
Gozala Jan 14, 2012
0f8a2d2
Update take tests and implement argument default.
Gozala Jan 14, 2012
1193e69
Implement drop default argument & update tests.
Gozala Jan 14, 2012
c29f8fd
Update map tests.
Gozala Jan 14, 2012
f8d966f
Update filter tests.
Gozala Jan 14, 2012
0693e98
Update append tests.
Gozala Jan 14, 2012
755acb6
Update flatten tests.
Gozala Jan 14, 2012
5326317
Support parallel tasks in expect to track event loop for example.
Gozala Jan 17, 2012
7ac855f
Update test for lazy.
Gozala Jan 17, 2012
cf0a507
Support error reporting in print.
Gozala Jan 17, 2012
858f930
Fix lazy to support error caching.
Gozala Jan 17, 2012
44fcf81
Remove old promise implementation.
Gozala Jan 18, 2012
67d4a65
Refine promises pattern used.
Gozala Jan 18, 2012
c49bc59
Simplify implementation of `alter`.
Gozala Jan 18, 2012
de4ebe2
Implement repeat and empty with new promise pattern.
Gozala Jan 18, 2012
256283a
Use `constructor` instead of `Stream` function and pass `this` to the…
Gozala Jan 18, 2012
01e51dd
Lot's of documentation updates.
Gozala Jan 18, 2012
969ee9f
Disable tests that require update.
Gozala Jan 18, 2012
d9c6a32
Update mix tests.
Gozala Jan 18, 2012
275d23f
Update test for merge.
Gozala Jan 18, 2012
7f4020d
Update implementation of zip.
Gozala Jan 18, 2012
e585297
Update tests for zip.
Gozala Jan 18, 2012
bdf1e14
Remove useless line breaks.
Gozala Jan 20, 2012
c796e31
Simplify Stream.promise API.
Gozala Jan 20, 2012
892469c
Make sure asserts run async.
Gozala Jan 20, 2012
f80cf11
error is delivered async.
Gozala Jan 20, 2012
633eff7
Add dependency on `repl-utils` and update `test` dependency.
Gozala Jan 20, 2012
99025e6
Enable updated tests.
Gozala Jan 20, 2012
419b925
Modify assert function to only rely only on frozen `then` interface.
Gozala Jan 20, 2012
6eb5907
In #test pass #assert to a `then` callback.
Gozala Jan 20, 2012
5699a5d
Refactor `alter` method to side-effect free function.
Gozala Jan 20, 2012
59a036c
Implement tests for alter.
Gozala Jan 20, 2012
f09f4d2
Implement `revise` function which is just like `alter` with a differe…
Gozala Jan 20, 2012
24e0052
Add `revise` tests.
Gozala Jan 20, 2012
5a696fb
Refactor `map` method to side-effect free function.
Gozala Jan 20, 2012
df7df3a
Refactor `print` as side effect free function.
Gozala Jan 20, 2012
0508997
Refactor `delay` method to pure function.
Gozala Jan 20, 2012
6ba372e
Update map tests.
Gozala Jan 20, 2012
27f8d84
Update take testes.
Gozala Jan 20, 2012
9887c75
Implement `take` method as propetry
Gozala Jan 20, 2012
6b214eb
Refactor `filter` method to a pure funciton.
Gozala Jan 20, 2012
abb7bf4
Implement `reducer` utility function wrapper.
Gozala Jan 20, 2012
e4ad863
Implement `append` and `append.all` functions.
Gozala Jan 21, 2012
ef89696
Update append tests.
Gozala Jan 21, 2012
d050f0b
Update filter documentation.
Gozala Jan 21, 2012
496a836
Update filter tests.
Gozala Jan 21, 2012
fa5880f
Factor `drop` method to a pure funciton.
Gozala Jan 21, 2012
e68d2f1
Update `drop` tests.
Gozala Jan 21, 2012
ccc9eb1
Implement `take.while` function.
Gozala Jan 21, 2012
2d5f0fe
Add `take.while` tests.
Gozala Jan 21, 2012
2a21321
Implement `drop.while` function.
Gozala Jan 21, 2012
9133193
Implement tests for `drop.while` function.
Gozala Jan 21, 2012
7415f58
Fix error in print definition.
Gozala Jan 21, 2012
5774153
Refactor `flatten` method to pure function.
Gozala Jan 21, 2012
ef8a93d
Update `flatten` tests.
Gozala Jan 21, 2012
e2fc8a0
Implement `capture` and alias `streamer.catch` for opt-in error handl…
Gozala Jan 21, 2012
ae64324
Implement test for `capture`.
Gozala Jan 21, 2012
74eb9d7
Refactor `mix` method into a pure functions `mix` and `mix.all`.
Gozala Jan 21, 2012
6804a02
Update mix tests.
Gozala Jan 21, 2012
1bbb818
Remove handle in favor of `capture`.
Gozala Jan 21, 2012
141cecd
Provide fallback value to append if called with one argument only.
Gozala Jan 21, 2012
c675ec3
Fix typo in append documentation.
Gozala Jan 21, 2012
4aaf027
Refactor method `merge` to a `pure` function.
Gozala Jan 21, 2012
7e361c4
Update merge tests.
Gozala Jan 21, 2012
90331f1
Update implementation of repeat.
Gozala Jan 21, 2012
90a0f6c
update tests for repeat.
Gozala Jan 21, 2012
6f9a57e
Update implementation of iterate.
Gozala Jan 21, 2012
64ee804
Update tests for `iterate`.
Gozala Jan 21, 2012
0b2514b
Rename elements everywhere to items.
Gozala Jan 21, 2012
ed279d4
Refactor `lazy` method to a pure function.
Gozala Jan 21, 2012
f075581
Update tests for `lazy`.
Gozala Jan 21, 2012
58d3990
Refactor `zip` method to a pure function.
Gozala Jan 21, 2012
4d2568f
Update tests for zip.
Gozala Jan 21, 2012
0098577
Adding more tests to a complete list.
Gozala Jan 21, 2012
6fe3100
Simplify promise pattern being used.
Gozala Jan 21, 2012
6254f35
Simplify promise pattern even further.
Gozala Jan 21, 2012
e3a594a
Improve some documentation.
Gozala Jan 21, 2012
12b9adc
Rename revise to edit.
Gozala Jan 21, 2012
a301a63
Remove commented out zip and zipmap functions.
Gozala Jan 21, 2012
1a50249
Redefine and explain purpose of internal function.
Gozala Jan 21, 2012
59837ff
Implement utility function unzip.
Gozala Jan 21, 2012
8b2d80d
Implement zip.all to zip multiple streams.
Gozala Jan 21, 2012
137100d
Update tests for zip.all
Gozala Jan 21, 2012
07a99d8
Implement map.all for mapping multiple streams at a time.
Gozala Jan 21, 2012
ec1a3c7
Refactor zipmap tests to `map.all` tests.
Gozala Jan 21, 2012
25a3ebc
Remove unused utils in tests.
Gozala Jan 21, 2012
2cdd5e8
Simplify `zip.all` implementation.
Gozala Jan 21, 2012
420a8df
Rename Stream.defer to Promise.defer
Gozala Jan 26, 2012
20f8bd0
Improve documentation for future.
Gozala Jan 26, 2012
3490fa6
Improve documentation for promise.
Gozala Jan 26, 2012
2307fdd
Update documentation to use new APIs.
Gozala Jan 26, 2012
4300838
Remove `on` method.
Gozala Jan 26, 2012
f255344
Remove `hub` API.
Gozala Jan 26, 2012
75d0235
Implement `each` as replacement for previously existing `on`.
Gozala Jan 26, 2012
2dd785e
Implement (fabjs) like chaining API.
Gozala Jan 26, 2012
dafb519
Document reducer util function.
Gozala Jan 26, 2012
85596f4
Export internal util function via `utils` object.
Gozala Jan 26, 2012
fdb52a6
No longer use `this` pseudo variable.
Gozala Jan 26, 2012
9b21cda
Choose better function names for map.all, zip.all, drop.while, take.w…
Gozala Jan 26, 2012
38b0ee4
Imply expected argument order when using `run` in non-standard (strea…
Gozala Jan 26, 2012
90a5f50
Update some out of dated docs.
Gozala Jan 26, 2012
172785d
Implement `tail`.
Gozala Jan 26, 2012
2d9c637
Implement head / first.
Gozala Jan 26, 2012
885550f
Update head tests.
Gozala Jan 26, 2012
84f5b51
Update tail / rest tests.
Gozala Jan 26, 2012
7128b68
Remove `hub` tests.
Gozala Jan 26, 2012
ded6b59
Remove all no longer relevant experiments.
Gozala Jan 26, 2012
8f29cba
Refine promise API.
Gozala Jan 26, 2012
a51572f
Make sure Promise is defined before exporting it.
Gozala Jan 26, 2012
3bba8d9
Move definition of run to the top of the file so that access to `run.…
Gozala Jan 26, 2012
325f8fe
rename internal `run` function to `runner` in order to avoid conflict…
Gozala Jan 26, 2012
0890614
Add tests for `run` chaining API.
Gozala Jan 26, 2012
431481c
Implement finalize providing equivalent of `finally` block.
Gozala Jan 26, 2012
21cfc73
Implement tests for `finalize`.
Gozala Jan 26, 2012
fc3e8c0
Include run tests into complete set of tests.
Gozala Jan 26, 2012
c538299
Implement attempt as an experimental API.
Gozala Jan 26, 2012
94f0f20
Implement tests for `attempt`.
Gozala Jan 26, 2012
257bfcf
Include but disable tests for experimental `attempt` API
Gozala Jan 26, 2012
9905050
Simplify implementation of alter.
Gozala Jan 31, 2012
004d551
Implement reduce.
Gozala Feb 6, 2012
1849dfe
change run.index property key to match the protocol library.
Gozala Feb 6, 2012
4d822d2
Update promise library.
Gozala Feb 6, 2012
e90007d
observers added at resolution were not iterated via forEach, switchin…
Gozala Feb 6, 2012
b6d5efe
Make streams lazy by default (this also makes them side-effect free)
Gozala Feb 6, 2012
76e1fe0
Adding tests for delay.
Gozala Feb 6, 2012
4e8ded4
Simplify implementation of fibs.
Gozala Feb 6, 2012
3193c94
Update tests for reduce.
Gozala Feb 6, 2012
17ef6c8
Add documentation to reduce.
Gozala Feb 6, 2012
c5656c3
Fix error in map tests.
Gozala Feb 6, 2012
3628cde
Add reduce to the complete test set.
Gozala Feb 6, 2012
75f10b1
Change semantics of `finalize` to make errors propagate, as they can …
Gozala Feb 11, 2012
8bc8e3e
Make print even lazier so that first item is not lost when repl is bu…
Gozala Feb 15, 2012
7eebcea
Iterate on idea of queues.
Gozala Feb 15, 2012
b589034
Simplify implementation of print.
Gozala Feb 16, 2012
f3559ea
Implement `Queue` and `Channel`.
Gozala Feb 16, 2012
e686b99
simplify implementation of slice & unzip.
Gozala Feb 16, 2012
a8d49b3
Use slice everywhere instead of Array.prototype.slice
Gozala Feb 16, 2012
0229ae2
Remove lazy as streams are lazy anyway.
Gozala Feb 16, 2012
5e57477
Update implementation to better cover cases of early close.
Gozala Feb 17, 2012
5db6af0
Move queue into separate module pushy and add tests.
Gozala Feb 17, 2012
fe9abe3
Move channel.
Gozala Feb 17, 2012
617a16b
Add channel tests.
Gozala Feb 17, 2012
9778b4e
do not need to defer runAsserts.
Gozala Feb 17, 2012
2f356fd
Improve comments for promise API functions and support optional `prot…
Gozala Feb 20, 2012
3d2fa1a
implement expand function
Gozala Jun 13, 2012
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: node_js
node_js:
- 0.4
- 0.5
- 0.6
2 changes: 2 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# streamer #

[![Build Status](https://secure.travis-ci.org/Gozala/streamer.png)](http://travis-ci.org/Gozala/streamer)

In computing, the term [stream] is used in a number of ways, in all cases
referring to a sequence of elements made available over time.

Expand Down