2009 -- the year of November. <november-wiki.org> <github.com/viklund/november> <irclog.perlgeek.de/november-wiki> <nopaste.snit.ch>
Set by moderator on 24 July 2009.
04:50 mj41_ joined 06:32 arthur-_ joined 06:57 sri_kraih joined
eiro hello 07:19
zarah hi eiro
eiro i just read masak last post. does somemone have links to "Routes" and "Forest" project ? 07:20
(and "Astaire")
11:37 masak joined 12:10 sri_kraih joined 12:48 ruoso joined
arthur-_ hi 13:40
zarah oh hai arthur-_
masak arthur-_: \\o 13:44
there you are :)
arthur-_ masak: hi :) 13:45
masak ok, I'm writing a draft spec right now, encompassing that first example. 13:47
arthur-_: github.com/masak/web/blob/e9dbd6a93...staire.pod 13:54
zarah masak's link is also tinyurl.com/lbfu8g
masak more to come.
arthur-_ okay 13:56
masak: pull request sent 13:57
masak wow, cool! 13:58
masak checks
sri_kraih giggles 14:00
masak arthur-_: have you pushed your commits to github? I don't see any of your commits in the commit log. github.com/arthurwolf/web/commits/master
zarah masak's link is also tinyurl.com/mw8pex
sri_kraih github.com/kraih/mojo/blob/fe1673b8...us/Lite.pm # we have a very complete perlish sinatra implementation
zarah sri_kraih's link is also tinyurl.com/lm5by9
arthur-_ Created commit 9b2aea1: Test just to see if I get git right
2 files changed, 18 insertions(+), 0 deletions(-)
create mode 100644 lib/Astaire/Astaire.pm
create mode 100644 lib/Astaire/astaire.pl
masak arthur-_: right. commits are local. 14:01
arthur-_: you also need to push them.
arthur-_ oh
ok
masak arthur-_: this happens to us all. git is a bit different. :)
sri_kraih: oh hai. at some point, I think I'll have more questions for you about that scaffolding-vs-web-admin-thing distinction. 14:02
arthur-_ pushed and pull request
masak sri_kraih: cool about Mojolicious::Lite. I think we'll be able to be inspired by that.
arthur-_: looks good. I'll merge in Astaire.pm. 14:05
arthur-_ okay
masak the example astaire.pl will only clutter up the lib/ dir. it's better suited as a SYNOPSIS in the .pm file :)
arthur-_ ok 14:06
masak arthur-_: see if you can pull in my changes now. 14:07
14:11 szabgab joined
arthur-_ delete mode 100644 lib/Astaire/astaire.pl 14:11
create mode 100644 spec/astaire.pod
sounds like it worked
masak indeed. 14:14
arthur-_++
arthur-_ are macros implemented in rakudo ? 14:18
may help for syntaxic sugar on actions in controllers
masak no, macros are not implemented yet. 14:20
not sure they'll land in 2009.
arthur-_ oh ok 14:21
masak there's now more astaire spec to be had: github.com/masak/web/blob/bb07e9930...staire.pod 14:33
zarah masak's link is also tinyurl.com/nx9al6
arthur-_ masak: where is HTTP::Daemon ? 14:56
masak arthur-_: I recently deleted it from Web.pm, since it makes us think the wrong thoughts to have it there.
arthur-_ oh
masak arthur-_: it's here: gitorious.org/http-daemon/mainline/ 14:57
zarah masak's link is also tinyurl.com/nt59el
masak (also downloadable via proto)
arthur-_ if HTTP::Daemon what's right now ? ( like for Astaire ) 14:58
s/HTTP::Daemon/HTTP::Daemon is wrong/
masak what's right is leaving the web server hadnling to the Web.pm core. 14:59
arthur-_ ok
masak with that said, we should have some default (most likely HTTP::Daemon), and a way of changing that.
I'm not 100% clear on how this will work, so questions are welcome. :) 15:00
arthur-_ so i should just make astaire an object to be feeded to Web.pm
masak arthur-_: yes, exactly.
in general, every subproject in Web.pm makes use of the same convention -- the Rack one.
this also has the benefit of making them easy to test, since things following this convention can be used without a web server. 15:01
15:01 ruoso_ joined
masak this page explains it quite well: rack.rubyforge.org/doc/files/SPEC.html 15:02
zarah masak's link is also tinyurl.com/l594n7
masak it's also a perfect candidate for Web.pm's spec. maybe I'll tackle that one next. 15:03
arthur-_ okay but the "object to be fed to web.pm" approach doesn't stick with the actual spec ... 15:04
maybe with Astaire being a base class ...
but then I'm not sure we can keep the same declarative syntax ... 15:05
masak arthur-_: why wouldn't it? Sinatra is built on top of Rack...
arthur-_ yeah, maybe I should look into how that works ...
masak me too. :)
I've done it before, but it was some time ago.
arthur-_ masak: www.slideshare.net/benschwarz/sinat...re-1509268 , page 16, that's what I'm talking about 15:10
zarah arthur-_'s link is also tinyurl.com/nlsqgk
masak arthur-_: ah. looks sweet indeed. feel free to spec that. :) 15:12
arthur-_ problem is ... i see how to code the second, but not the first
ill look into that
masak the second what?
oh, you see how to code the example with the class inheritence, but not the one without? 15:13
I could say the same right now. I can go check right away how Sinatra does it if you want.
arthur-_ that would be great ( i'm not goot at reading rb ) 15:15
masak downloaded sinatra from github
15:16 szabgab joined
masak arthur-_: here's how they chuck things out to the main namespace: github.com/sinatra/sinatra/blob/8c6...e.rb#L1082 15:24
zarah masak's link is also tinyurl.com/ncn7w4
masak that can be done in Perl 6 (and Rakudo) too.
the remaining question is how they call the dispatcher after the main program has registered all routes. 15:25
arthur-_ looks a bit dirty … 15:41
masak ah, I think I found that too: github.com/sinatra/sinatra/blob/8c6...ain.rb#L25
zarah masak's link is also tinyurl.com/mhyx2r
arthur-_ but makes the syntax easier for end user ...
masak arthur-_: yes, that's the tradeoff.
as long as it's hidden in a library, I don't mind. 15:42
ok, I have to leave soon to secure some food.
arthur-_ ok 15:43
masak arthur-_: it's been a great day. welcome aboard!
arthur-_ masak: thanks !
masak I think we'll have a runnable Astaire shortly. let's say early next week.
16:43 szabgab joined 19:43 szabgab joined 20:47 szabgab joined