Skip to content

Commit

Permalink
Uses Poll as the primary type (#103)
Browse files Browse the repository at this point in the history
Deku now uses Poll + hot events as its primary architectural type. This makes its effect system more predictable and less prone to extraneous dangling effects, especially for games with an event loop.
  • Loading branch information
Mike Solomon authored Aug 24, 2023
1 parent 9b23938 commit 22d4756
Show file tree
Hide file tree
Showing 86 changed files with 6,060 additions and 8,163 deletions.
90 changes: 0 additions & 90 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,100 +12,10 @@ jobs:
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Cache purescript dependencies
uses: actions/cache@v2
with:
path: |
~/.npm
.spago
${{ env.spago_global_cache }}
output
key: >-
${{ hashFiles('package-lock.json') }}-
${{ hashFiles('spago.dhall') }}-
${{ hashFiles('packages.dhall') }}-
${{ hashFiles('test.dhall') }}-
${{ hashFiles('examples.dhall') }}
- name: Install dependencies
run: npm ci
- name: Test
run: npm t
- name: Spago build examples
run: npm run build:examples
# - name: Build make
# run: npx spago -x examples.dhall bundle-app --main Deku.Example.Docs.Static.Build --to examples/docs/Static/make.mjs --platform node
# - name: Build hydration
# run: npx spago -x examples.dhall bundle-module --main Deku.Example.Docs.Static.Live --to examples/docs/Static/bundle.js --minify
# - name: Make index.html for netlify
# run: |
# cd examples/docs/Static
# mkdir -p intro
# echo '{"page":"Intro","slug":"/","top":true}' > config.json
# node make.mjs config.json > index.html
# mkdir -p hello
# echo '{"page":"HelloWorld","slug":"/","top":false}' > config.json
# node make.mjs config.json > hello/index.html
# mkdir -p simple
# echo '{"page":"SimpleComponent","slug":"/","top":false}' > config.json
# node make.mjs config.json > simple/index.html
# mkdir -p pursx1
# echo '{"page":"PURSX1","slug":"/","top":false}' > config.json
# node make.mjs config.json > pursx1/index.html
# mkdir -p pursx2
# echo '{"page":"PURSX2","slug":"/","top":false}' > config.json
# node make.mjs config.json > pursx2/index.html
# mkdir -p events1
# echo '{"page":"Events","slug":"/","top":false}' > config.json
# node make.mjs config.json > events1/index.html
# mkdir -p effects
# echo '{"page":"Effects","slug":"/","top":false}' > config.json
# node make.mjs config.json > effects/index.html
# mkdir -p events2
# echo '{"page":"Events2","slug":"/","top":false}' > config.json
# node make.mjs config.json > events2/index.html
# mkdir -p portals
# echo '{"page":"Portals","slug":"/","top":false}' > config.json
# node make.mjs config.json > portals/index.html
# mkdir -p ssr
# echo '{"page":"SSR","slug":"/","top":false}' > config.json
# node make.mjs config.json > ssr/index.html
# cd ../../..
# - name: deploy to netlify
# run: NETLIFY_SITE_ID=${{ secrets.NETLIFY_SITE_ID }} NETLIFY_AUTH_TOKEN=${{ secrets.NETLIFY_AUTH_TOKEN }} netlify deploy --dir=./examples/docs/Static --prod
# - name: Make index.html for github
# run: |
# cd examples/docs/Static
# mkdir -p intro
# echo '{"page":"Intro","slug":"/purescript-deku/","top":true}' > config.json
# node make.mjs config.json > index.html
# mkdir -p hello
# echo '{"page":"HelloWorld","slug":"/purescript-deku/","top":false}' > config.json
# node make.mjs config.json > hello/index.html
# mkdir -p simple
# echo '{"page":"SimpleComponent","slug":"/purescript-deku/","top":false}' > config.json
# node make.mjs config.json > simple/index.html
# mkdir -p pursx1
# echo '{"page":"PURSX1","slug":"/purescript-deku/","top":false}' > config.json
# node make.mjs config.json > pursx1/index.html
# mkdir -p pursx2
# echo '{"page":"PURSX2","slug":"/purescript-deku/","top":false}' > config.json
# node make.mjs config.json > pursx2/index.html
# mkdir -p events1
# echo '{"page":"Events","slug":"/purescript-deku/","top":false}' > config.json
# node make.mjs config.json > events1/index.html
# mkdir -p effects
# echo '{"page":"Effects","slug":"/purescript-deku/","top":false}' > config.json
# node make.mjs config.json > effects/index.html
# mkdir -p events2
# echo '{"page":"Events2","slug":"/purescript-deku/","top":false}' > config.json
# node make.mjs config.json > events2/index.html
# mkdir -p portals
# echo '{"page":"Portals","slug":"/purescript-deku/","top":false}' > config.json
# node make.mjs config.json > portals/index.html
# mkdir -p ssr
# echo '{"page":"SSR","slug":"/purescript-deku/","top":false}' > config.json
# node make.mjs config.json > ssr/index.html
# cd ../../..
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
Expand Down
24 changes: 0 additions & 24 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,7 @@ jobs:
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Cache purescript dependencies
uses: actions/cache@v2
with:
path: |
~/.npm
.spago
${{ env.spago_global_cache }}
output
key: >-
${{ hashFiles('package-lock.json') }}-
${{ hashFiles('spago.dhall') }}-
${{ hashFiles('packages.dhall') }}-
${{ hashFiles('test.dhall') }}-
${{ hashFiles('examples.dhall') }}
- name: Install dependencies
run: npm ci
- name: Build examples
run: npm run build:examples
- name: Test
run: npm t
- name: Build test
run: npm run build:test
# perf test runs locally but hangs on gh actions
# inspect why at some point
# - name: Bunlde performance
# run: npm run bundle:performance
# - name: Test performance
# run: npm run test:performance
8 changes: 0 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,6 @@
/.psa*
/.spago
/output-es/
/examples/docs/Examples.js
/examples/docs/Examples.purs
/examples/**/index.js
/examples/**/bundle.js
/examples/**/main.js
/examples/**/make.mjs
/examples/**/config.json
/examples/docs/Static/**.html
packages.json
.venv
/test-results/
Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [0.2.2] - 2022-04-11

- Updates event and behavior libraries.
- Updates event and poll libraries.

## [0.2.1] - 2022-04-08

Expand Down Expand Up @@ -295,7 +295,7 @@ Fixes the sorting algorithm on insert of subgraphs.

### Added

- Exposes the DOM API via a FRP Behavior by using induction on existentially-quantified and linearly-typed indexed cofree comonads that act as kan-extended natural transformations over embedded universal morphisms.
- Exposes the DOM API via a FRP Poll by using induction on existentially-quantified and linearly-typed indexed cofree comonads that act as kan-extended natural transformations over embedded universal morphisms.
- A README.
- A CHANGELOG.
- Several tests.
Expand Down
27 changes: 0 additions & 27 deletions article/Behavior.purs

This file was deleted.

30 changes: 0 additions & 30 deletions article/Filtering.purs

This file was deleted.

63 changes: 0 additions & 63 deletions article/Fix.purs

This file was deleted.

48 changes: 0 additions & 48 deletions article/Fold.purs

This file was deleted.

33 changes: 0 additions & 33 deletions article/Intro.purs

This file was deleted.

Loading

0 comments on commit 22d4756

Please sign in to comment.