Zedshaw/Tir
11–20 of 39 posts
Re: Zedshaw/Tir
#12Re: Zedshaw/Tir
#13How is the state stored for "natural style" functions? Is this continuation style something that Lua supports natively?
Re: Zedshaw/Tir
#14Re: Zedshaw/Tir
#15No Core This isn't really a Tir feature, but do you hate when there's bugs in your core libraries and that guy who "owns" the broken library refuses to fix it? Me too, that's why Lua and LuaRocks are awesome. You get a tight core language that's completely described in_a_few_HTML_pages and then install all the platform libraries you need with LuaRocks. No more gatekeepers with Lua. "No more gatekeepers" seems to be a…
I've found that to be the case with Lua in general. The language is pretty easy to hack with, and so there's alot of wheel making. Lua has a mantra of "provide mechanisms, not policies", and since there's no formal class system, and multiple ways to define modules it's almost fragmented by design.
I think the designers are working on a better module system for the next release, or did that make it into 5.2?
Re: Zedshaw/Tir
#16I'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…
Sticky load balancing is the norm (http://continuity.tlt42.org/Performance_and_Scalability) but it means a running Coro/Continuation can remain in memory for quite a while (Seaside saves continuation (or it did) to disk after some idle time).
Still I love using these kind of libraries / frameworks especially for smaller web apps.
Some refs:
* See http://news.ycombinator.com/item?id=1686177
* Continuity (Perl Coro web library) - http://continuity.tlt42.org/ & https://metacpan.org/module/Continuity
* Seaside (Smalltalk Continuation based web framework) - http://www.seaside.st/
Re: Zedshaw/Tir
#17I'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…
The logical end to this road is continuation-based web servers. See http://docs.racket-lang.org/continue/index.html and my approach to the Arc challenge, https://gist.github.com/1304257
The interesting function which does all the work is:
(define (start req)
;; First, we get input from the user
;; Then, we pause for the link
;; Finally, we show what the user typed.
(let ([input (get-input-from-user)])
(pause-for-link)
(show-input input)))
Each of these calls - get-input-from-user, pause-for-link, and show-input sends a complete page back to the user and waits for them to click a link or submit a form request. It's a really smooth way of solving some problems.Re: Zedshaw/Tir
#18I would be nice to see Zed created a framework in Python. I am not happy with any of the existing ones.
Re: Zedshaw/Tir
#19I would be nice to see Zed created a framework in Python. I am not happy with any of the existing ones.