Comments (5)
I think some statements (like requiring core.match) are omitted on the slides for the sake of brevity.
I'm checking the problem with exception now.
from otplike.
Do you know of an Erlang example that is fairly complex, but not very complex, that I can "port" to otplike? I need to understand how to use otplike for my current project, and starting with a well understood Erlang example might be a good approach. Of course, I would contribute the port to the otplike project when I get it working.
I'd probably need to ask you questions along the way. Is creating issues the way you would like me to ask questions?
from otplike.
Is creating issues the way you would like me to ask questions?
Yes, it would be very nice of you! It also makes it easier for others to find answers to the questions that have already been asked.
from otplike.
The problem with the example is here:
(gs/start-ns [])
gen-server
can only be started by another process. It must be added to the docstring of gen-server/start
. The reason why gen-server
must be started by another process is that according to OTP principles gen-server
must treat exit message from the parent process in a special way.
Exception with the reason "noproc" means that caller is supposed to be a process.
The problem can be fixed by wrapping the last let
statement into a spawned function like this:
(process/spawn
(process/proc-fn []
(let [[_ server] (gs/start-ns [])]
(println "2 + 3 = " (add server 2 3)))))
We'll think about fixing this slide.
from otplike.
Do you know of an Erlang example that is fairly complex, but not very complex, that I can "port" to otplike?
I think of examples from the learnyousomeerlang book. Every chapter has one or more good examples supplementing explanation of a concept. I would started from examples given in this chapter. The book is also useful because it guides you step by step through the OTP principles.
from otplike.
Related Issues (20)
- Using receive In A Helper Function HOT 2
- Simple Logging System HOT 2
- Example: otplike Logging System HOT 2
- Require :reload-all Question HOT 2
- java.lang.NullPointerException during fn call in process/spawn HOT 2
- Don't allow parallel receive from process' inbox HOT 1
- Selective receive HOT 1
- Example application for otplike with app restart feature HOT 1
- supervisor/which-children
- map async value HOT 1
- Fix supervisor's :period property units
- Special processes running on the agents thread pool
- Initial application module/behaviour
- spawn-opt doesn't throw exception when process name is already registered HOT 1
- supervisor must react on :shutdown exit reason
- Add gen-server/stop fn
- protocols for swapping out core.async and core.match? HOT 20
- Handling backpressure HOT 2
- circuit-breaker-like supervision? HOT 4
- A default circuit-breaker implementation
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 otplike.