This would have been cleaner with Moonscript: https://github.com/leafo/moonscript
Zedshaw/Tir
31–39 of 39 posts
Re: Zedshaw/Tir
#32I would be nice to see Zed created a framework in Python. I am not happy with any of the existing ones.
Re: Zedshaw/Tir
#33Warning folks: Since I've been working on my books I haven't had time to hack on this lately. I will be picking it back up when I have a break from the books to code up a few ideas I have.
Re: Zedshaw/Tir
#34I'm really excited about async programming in what Zed dubs the "natural style": using coroutines to suspend and resume processing at points where input is needed. Can this eliminate the callback hell that plagues the explicitly async frameworks (node.js, jquery, twisted, etc)? But what about the downside? Now your handler is stateful and the language runtime is taking care of suspend / resume of the handler code. Ca…
Scaling isn't so much the problem, since you can do various things to keep users on specific servers. In my setup, I also solve a lot of the state issues since there isn't a single state for the entire app, but instead for each process that runs a small part of the app. That means you can scale and change up the application easier if you need without impacting the other parts. The real problem with coroutines for sto…
You might design the interactions to be brief, but how do you actually enforce that when you need to upgrade or reclaim resources?
To make this more concrete, suppose you have a shopping cart. Sure it probably only takes most people 5 minutes to check out from start to finish, but what about the stragglers? Do you have a nice way of timing out the coroutine handler due to inactivity, and saving off state when that happens?
Or do you just solve it the HN way ("Unknown or expired link," hmm what does that even mean).
Re: Zedshaw/Tir
#35So....this has been posted about a few times in the past ( http://www.hnsearch.com/search#request/all&q=tir ). Where's the news here?
Thus, a large subset of us can discover and discuss an article after multiple postings.
Re: Zedshaw/Tir
#36Re: Zedshaw/Tir
#37Warning folks: Since I've been working on my books I haven't had time to hack on this lately. I will be picking it back up when I have a break from the books to code up a few ideas I have.
I know this is off topic but are there plans for a learn lua the hard way.
Re: Zedshaw/Tir
#38I'm really excited about async programming in what Zed dubs the "natural style": using coroutines to suspend and resume processing at points where input is needed. Can this eliminate the callback hell that plagues the explicitly async frameworks (node.js, jquery, twisted, etc)? But what about the downside? Now your handler is stateful and the language runtime is taking care of suspend / resume of the handler code. Ca…
Re: Zedshaw/Tir
#39I would be nice to see Zed created a framework in Python. I am not happy with any of the existing ones.
Have a look at Nagare - http://www.nagare.org/
Python Stackless is used to take continuations and also to serialize all the states, which can be stored, by configuration, in memory or to an external Memcached server. With the later setting, all the continuations can freely migrate across the machines of a cluster.