Comments (6)
After most of Elmchemy's features stabilize and prove themselves in a longer run I will start thinking about redoing Elm runtime in BEAM, so that there are effect modules, and generally pattern for generating side-effects. I just feel like receive is a very controversial feature to put into the project, and I believe it's sacrificing what's the best in Elm
I'm sure we'll find another way to achieve that
from elchemy.
You could always support an after block by mandating it as part of the msg type like:
type Msg
= Msg String
| After Int
case receive of
Msg a -> 1
After 10 ->
Via the specially named message After
or so?
And it is not technically impure, purity in Erlang is per process, and given the same inputs to the same process at the same time in its life cycle it will always generate the same work. ^.^
from elchemy.
Wow. This is a very smart and hacky idea. But I definitely like that!
from elchemy.
Wow. This is a very smart and hacky idea. But I definitely like that!
The Elm syntax does not leave a lot of options open... ^.^;
from elchemy.
Because of the decisions on how to handle side effects and inherent impurity of receive construct, it won't ever be introduced to Elmchemy, and be possible to use only through special Elmchemy constructs for process message boxes
from elchemy.
Maybe instead you could emulate it like a 'subscription', when a message is received that matches a pattern then send it on? Unsure of how to 'start' a receive though, hmm... Would be much easier if an Elm 'program' was exactly a GenServer on the Elixir side...
from elchemy.
Related Issues (20)
- Write a prompt checking for newer versions of Elchemy when executing in a project
- New projects no longer work with current instructions HOT 2
- Bug: Clean makes init not able to work HOT 2
- Elchalyze HOT 3
- Document how to use meta/Plugins feature
- Update Elchemy init script to work with Erlang 21 and higher HOT 4
- Update Elchemy installation instructions in the Hackernoon tutorial HOT 1
- Prepare for Elm 0.19 HOT 6
- Redesign elchemy-live to work with new CDN and brand new Ellie design HOT 3
- Develop our own type checker HOT 6
- FFI Type checking broken with Elixir 1.7
- Warn users against usage with Elixir .1.7 HOT 1
- Disable `verify` macro in Elixir 1.7 HOT 1
- Test Elixir 1.7.1-1.8 compatibility HOT 14
- Your stance to Elm HOT 6
- Add custom type inference HOT 4
- slack invitation link not valid HOT 1
- Ellie can not delete characters HOT 4
- Evaluation of alternative front end implementation HOT 1
- Elchemy-live doesn't work HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elchemy.