213 karma · joined July 19, 2015
> any `b` in the result list _must_ have come from applying the function to some `a` in the input list.
Since there exists no a in [], the quoted statement holds! I find that really beautiful :)
Interested readers should check out Agda and Theorems for free!
Am I reading this correctly? He's been doing this since 2013 and still wants to use the white hat card?
You don't have to look further than Bitcoin. The cost of producing Bitcoin is primarily the cost of wasted energy - how much energy should be wasted is determined algorithmically. Too low and you get arbitrage opportunities; too high and people stop mining.
Bitcoin pricing is not at all related to energy prices in the middle-to-long-run.
What that means is that the threshold would be about ten times lower if electricity prices were ten times higher globally.
As you can understand, this is a big big waste - which is why alternatives to proof of work are researched heavily.
One thing I didn't like with the approach of storing channel messages in the mailbox is that if you use the regular receive statement you might receive a message ment for the channel. In my work I had to be very careful and use selective receive all the time. My preferred solution is to give each actor multiple inboxes so that unrelated messages don't get conflated. I haven't had time to explore this yet but if you're interested in implementing it in Inko I'll be glad to help.
Channels are a great idea! What capabilities (send on channel/receive on channel) can you forward to other processes? As Cloud Haskell explain, in distributed systems we must not allow send on channel to be forwarded.
Regarding channels, both linear channels and mailbox types for unordered interactions are interesting ideas worth looking into.
Great project!
There's a lot of interesting work going on in this field so to save you some research I suggest looking through at least the related works section of my thesis (see profile).
For an overview of different actor models I prefer, see "43 years of actors: a taxonomy of actor models and their key properties" [1]. Agha's book [2] is also very good and I'd also like to recommend "Mixing Metaphors: Actors as Channels and Channels as Actors" [3].
[0]: http://lambda-the-ultimate.org/node/5208 [1]: http://soft.vub.ac.be/Publications/2016/vub-soft-tr-16-11.pd... [2]: https://dspace.mit.edu/handle/1721.1/6952 [3]: https://arxiv.org/abs/1611.06276
Personally I don't think Scala is the right tool for the job. Once we figure this out we should design a special purpose language - this is too complex to expose as a library (bad error messages etc.); and while we're experimenting I think Scala's type system is not expressive enough - we need dependent types.
I hope to see someone continue in my spirits but based on "mailbox types for unordered interactions".
Versioning, upgrading and errors are really difficult problems. I think it should be possible to do upgrades in a typed setting but it will not come easy. We'll need to start simple here, e.g. upgrades that don't change any types.
The related works section mention some languages that get fairly close to being actors with types (e.g. Pony), but you're right that we're not there yet.
The tricky thing is that we need types that evolve as messages are being sent - an actor might change behaviour when it receives a message. Academica is still figuring out the kinks of how to do that.
My work assigns a static type per actor and my conclusion is that that's decent - but quite annoying to program with and without the guarantee of deadlock freedom.
https://www.dropbox.com/s/lczrcqu2m9p6osv/Master_Thesis.pdf?...