The web in a box - a next generation web framework for the Perl programming language

IRC log for #mojo, 2014-08-02

| Channels | #mojo index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:06 sri are there other option-ish headers that have a quoted first value?
00:13 sugar_ joined #mojo
00:27 sri https://gist.github.com/e28bc3f7f9c5f82f22d7 # full patch with tests
00:28 * sri pokes jberger, batman, tempire, marcus and crab
00:28 jnbek hey!!! that was my belly!!
00:28 jnbek ;-)
00:28 * sri pokes jnbek
00:28 jnbek O_O
00:30 sri https://gist.github.com/3bbc4c20fa1f4aaec11f # another try... my terminal did funny things to the last diff
00:33 sri Link headers are really a pita to parse... so i think there might be quite a bit of value in this
00:37 sri only thing i'm unsure about it how to extend split_header
00:38 sri it could also take a callback as last argument that gets invoked whenever a new comma separated segment starts
00:38 sri then you chop off what you need and return a pair for values
00:41 sri yea, think that's what i'm going with actually
00:41 d4rkie joined #mojo
00:45 dvinciguerra joined #mojo
00:58 good_news_everyon joined #mojo
00:58 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/TQO_oA
00:58 good_news_everyon mojo/master 06a458e Sebastian Riedel: added support for web linking
00:58 good_news_everyon left #mojo
00:58 sri ok, that's actually not too bad :)
00:59 d4rkie joined #mojo
01:00 woz joined #mojo
01:03 good_news_everyon joined #mojo
01:03 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/VmHhzw
01:03 good_news_everyon mojo/master 95c222f Sebastian Riedel: more link tests
01:03 good_news_everyon left #mojo
01:18 good_news_everyon joined #mojo
01:18 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/BvRMsw
01:18 good_news_everyon mojo/master fb1d3ae Sebastian Riedel: improved url_escape performance slightly
01:18 good_news_everyon left #mojo
01:24 good_news_everyon joined #mojo
01:24 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/OYALmg
01:24 good_news_everyon mojo/master 4b01d87 Sebastian Riedel: no need to create a closure every time
01:24 good_news_everyon left #mojo
01:40 klapperl_ joined #mojo
01:53 KCL joined #mojo
02:02 woz joined #mojo
02:13 noganex_ joined #mojo
02:33 woz joined #mojo
02:51 jberger_ sri: could you just use state rather than factoring out a function to reference?
02:52 jberger_ re: 4b01d87
03:17 D4RK-PH0ENiX joined #mojo
03:29 basic6 joined #mojo
03:34 woz joined #mojo
03:45 jnbek so sri just out of curiosity, whaat was your main inspriation for starting Mojolicious? The effort is phenominal... and the sheer lack of dependencies is mind bloggling for everything it does..
03:45 jnbek and given everything it does, it's still fast as an F22 Raptor...
03:49 voegelas joined #mojo
04:24 dvinciguerra joined #mojo
04:35 irq joined #mojo
04:39 woz joined #mojo
04:43 Vandal joined #mojo
05:12 bobkare joined #mojo
05:41 woz joined #mojo
05:45 jberger_ jnbek: sri also wrote catalyst, Mojo was originally a new set of internals for it
05:46 jberger_ When it was decided that it was too radical of a change, the project continued on its own
05:52 jberger_ Btw the Mojo namespace is intended as a reusable set of classes which in concept could be used as a basis for other frameworks
05:52 jberger_ Mojolicious is built on those
05:54 jberger_ If you look, the Mojolicious namespace is actually rather small
05:54 jberger_ http://mojolicio.us/perldoc#REFERENCE
05:56 jberger_ Even smaller if you ignore the commands and pluggins
06:28 berov joined #mojo
06:43 ryozi joined #mojo
06:46 woz joined #mojo
07:10 dod joined #mojo
07:50 woz joined #mojo
08:01 tempire interesting
08:02 * tempire has never used link headers
08:06 _eugen joined #mojo
08:14 mire__ joined #mojo
08:21 sh4 joined #mojo
08:37 basiliscos joined #mojo
08:54 woz joined #mojo
09:00 Eke- joined #mojo
09:22 punter joined #mojo
09:45 mr-fooba_ joined #mojo
09:52 preaction left #mojo
09:55 preaction_ joined #mojo
09:55 woz joined #mojo
10:03 preaction joined #mojo
10:33 sri jnbek: what jberger said
10:35 sri jberger: sure, state would work, but why would i? Oo
10:35 neyasov joined #mojo
10:43 noganex joined #mojo
10:57 woz joined #mojo
11:13 sri tempire: i like Link headers for json apis
11:24 sri this is where i got the idea http://docs.python-requests.org/en/latest/user/advanced/#link-headers
11:24 sri riak uses Link headers to build graphs from stored objects
11:26 sri oh, you can use Link headers for prefetching too, that's neat https://developer.mozilla.org/en-US/docs/Web/HTTP/Link_prefetching_FAQ
11:27 sri Link: </images/big.jpeg>; rel=prefetch
11:31 sri but it's true that Link headers are not widely used yet... biggest api using them would be github https://developer.github.com/v3/
11:31 sri so, i'm not sure if having a links method is really worth it
11:32 sri but i'd like to at least keep supporting them with Mojo::Util::split_header, so you can tokenize them easily
11:42 sri hmm, i guess i can golf it down a bit... the method gets rather cheap
11:43 good_news_everyon joined #mojo
11:43 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/gC9Dfg
11:43 good_news_everyon mojo/master aa003af Sebastian Riedel: small optimizations
11:43 good_news_everyon left #mojo
11:43 sri cost went down to 5 lines
11:44 sri no wait 6... with the _link function
11:49 good_news_everyon joined #mojo
11:49 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/CNBzog
11:49 good_news_everyon mojo/master f6f52e3 Sebastian Riedel: more realistic split_header tests
11:49 good_news_everyon left #mojo
12:01 woz joined #mojo
12:02 good_news_everyon joined #mojo
12:02 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/hQ1P6Q
12:02 good_news_everyon mojo/master 373d29a Sebastian Riedel: more split_header tests
12:02 good_news_everyon left #mojo
12:06 dvinciguerra joined #mojo
12:15 sri hmm, there's a draft for LINK/UNLINK methods too http://tools.ietf.org/html/draft-snell-link-method-10
12:16 sri that would mean Link headers in requests
12:24 mire__ joined #mojo
12:29 good_news_everyon joined #mojo
12:29 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/JvhShg
12:29 good_news_everyon mojo/master b5c4de2 Sebastian Riedel: removed links method again from Mojo::Message
12:29 good_news_everyon left #mojo
12:29 sri but i want to keep the callback argument for Mojo::Util::split_header
12:55 good_news_everyon joined #mojo
12:55 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/kI9qiA
12:55 good_news_everyon mojo/master c66abec Sebastian Riedel: fixed split_header example
12:55 good_news_everyon left #mojo
13:03 woz joined #mojo
13:06 jalie joined #mojo
13:07 janliesendahl_ joined #mojo
13:32 jalie joined #mojo
13:32 janliesendahl_ joined #mojo
13:35 jalie joined #mojo
13:35 janliesendahl_ joined #mojo
13:36 jalie joined #mojo
13:36 janliesendahl_ joined #mojo
13:37 jalie joined #mojo
13:37 janliesendahl_ joined #mojo
13:46 Kripton joined #mojo
13:53 KCL_ joined #mojo
13:59 basiliscos joined #mojo
14:02 ladnaV joined #mojo
14:07 woz joined #mojo
14:08 Vandal joined #mojo
14:13 zivester joined #mojo
14:34 ladnaV joined #mojo
14:38 Vandal joined #mojo
14:59 irq joined #mojo
15:09 woz joined #mojo
15:17 bobkare joined #mojo
15:34 bobkare joined #mojo
15:35 dj_goku joined #mojo
15:38 dj_goku so while testing json responses, I want to do something like this: $t->get_ok('/route/1.json')->json_like({id => qr/^\d+$/, some_other_value => 'string'}
15:53 marty joined #mojo
15:55 jberger_ dj_goku: that's two method calls
15:59 jberger_ dj_goku: to do anything more interesting, extract the data structure and use this : https://metacpan.org/pod/Test::Deep
16:13 woz joined #mojo
16:24 sri i guess the links api i proposed earlier doesn't work so well anyway
16:24 sri since rel values are not unique
16:24 sri you may have a dozen rel=prefetch
16:26 sri and this is a lot less nice to work with https://gist.github.com/anonymous/efb65dc3a77e5c83412b
16:29 sri guess i should be removing the optional callback from Mojo::Util::split_header too :(
16:29 dj_goku jberger_: yeah that is what I was thinking was the way I would have to do it.
16:30 sujithm joined #mojo
16:38 dj_goku jberger_: is it acceptable to use $t->tx->res->body after the call?
16:38 dj_goku then just test that deeply?
16:40 dj_goku really the only reason I am needing this is to validate that the primary key column is a number.
16:40 dj_goku so to get around it at the moment I am deleting and recreating the db every run.
16:41 sujithm joined #mojo
16:42 dod joined #mojo
16:46 good_news_everyon joined #mojo
16:46 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/XOWeAA
16:46 good_news_everyon mojo/master fdd6c57 Sebastian Riedel: removed optional callback from split_header again
16:46 good_news_everyon left #mojo
16:46 sri and we are back to not being able to parse Link headers
16:51 sujithm joined #mojo
16:56 mire__ joined #mojo
17:15 woz joined #mojo
17:20 jberger_ dj_goku: sure or ->res->json
17:28 dod joined #mojo
17:38 sujithm joined #mojo
17:39 dj_goku jberger_: cool!
17:56 dod joined #mojo
17:57 good_news_everyon joined #mojo
17:57 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/aoDBVw
17:57 good_news_everyon mojo/master 363eeb8 Sebastian Riedel: list content generators
17:57 good_news_everyon left #mojo
18:00 davido_ joined #mojo
18:09 tempire lulz
18:09 tempire always a roller coaster die
18:09 tempire *ride
18:09 * tempire hangs on
18:12 marcus_ wow mom wow
18:19 woz joined #mojo
18:34 sri aww... did i miss the roller coaster? :/
18:35 sri tempire: RTFM! ;p http://mojolicio.us/perldoc/Mojolicious#CORE-DEVELOPERS
18:36 sri (re jberger tweet)
18:36 tempire I always question whether people receive their cpan mail
18:36 tempire BUT FINE
18:36 tempire :)
18:39 woz joined #mojo
18:45 jberger_ That's quite a Freudian slip "roller coaster die"
18:46 jberger_ Also, i have no idea if i get my cpan email
18:51 jberger_ Hey if anyone is in the Chicago and nw area, I'm going to go to this on Saturday and work on mojo things http://www.meetup.com/Side-Project-Saturdays-Hack-together/events/198016872/?hidePromoBar=true
18:51 jberger_ Might be a bit of a hike from Madison, but its the right side of Chicago at least
18:54 ua_ joined #mojo
18:58 marcus_ +1 on what's already going to be released, I suppose :)
18:59 jberger_ marcus_:?
18:59 marcus_ the links patch?
19:00 marcus_ oh, it's out again?
19:01 marcus_ ah, reached the end of scrollback now.
19:02 jberger_ Oh ok
19:08 sri sad truth is nobody cares about the Link header
19:09 sri i'd still like to keep the ability to at least tokenize Link headers with split_header, but can't justify it if it's not used in core somehow
19:10 marcus_ sri: there are some apis that use the link header afaik
19:10 sri there's github and riak
19:10 sri that's about it
19:11 sri i think the reason is how shitty the header is to parse, all implementations i found didn't actually work right
19:13 jberger_ These are the kind of things an http2 spec ought to address
19:13 sri requests.py just ignores urls with comma or semicolon, or multiple links with the same relationship type
19:13 sri jberger: you'd think, but that stuff is not even discussed
19:14 sri http/2 could have fixed sessions
19:14 marcus_ would have been nice.
19:14 sri but that doesn't save google any money
19:15 jberger_ :-/
19:18 sri actually i'm surprised google is not a CA yet, all those http2 certs are a potential gold mine
19:18 sri i bet that will come with the domain business that's in closed beta currently
19:25 tempire mojoexample has been updated to use cpanfile and carton
19:27 marcus_ I'm running Linux on my Macbook  Pro now - And I really like it.
19:28 sri WHY?!
19:29 sri actually i've been thinking about trying it too, since i'm not very dependent on os x anymore
19:29 marcus_ because i3
19:30 marcus_ tiling window managers and working spaces are pretty great
19:31 marcus_ and in general it feels much faster and less bloated
19:32 marcus_ font rendering is slightly worse tho, I guess.
19:34 marcus_ Also, I'm still looking for a decent Twitter client.
19:35 lipizzan joined #mojo
19:36 sri guess i would miss pixelmator and sketch
19:37 marcus_ I do have a dualboot setup,  because I still do XCode for work, and because Lightroom.
19:51 sri that's cheating
19:51 denis_boyun joined #mojo
20:04 marcus_ sri: I feel sad when I have to boot into osx tho, which is a good sign I think.
20:05 neyasov_ joined #mojo
20:10 komodo joined #mojo
20:16 denis_boyun joined #mojo
20:22 * batman is on vacation.
20:22 batman No idea about Link headers, so I vote +0 if it comes up again.
20:23 batman Stay cool. (It's super hot here)
20:36 good_news_everyon joined #mojo
20:36 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/fP94fQ
20:36 good_news_everyon mojo/master 0101346 Sebastian Riedel: fixed memory leak in Mojo::IOLoop::Client
20:36 good_news_everyon left #mojo
20:39 sri oopsie
20:46 komodo I'm trying to get a page serve timer in my template but it seems to be updating my start_time at the end of the request instead of the beginning: http://pastebin.com/aJYuEvFi
20:48 komodo so what it ends up outputting is the time since the end of the previous request, since it isn't updating until the end
20:49 shadowpaste "dj_goku" at 217.168.150.38 pasted "Simple GET/POST '/customers' route." (33 lines) at http://paste.scsys.co.uk/412197
20:51 dj_goku so the above paste ^^^^. I would like some input on any possible changes. It works, just this is my first REST api.
21:19 dj_goku joined #mojo
21:24 woz joined #mojo
21:54 good_news_everyon joined #mojo
21:54 good_news_everyon [mojo] kraih tagged v5.24 at f5264db: http://git.io/2wQ7jQ
21:54 good_news_everyon left #mojo
21:55 woz joined #mojo
21:56 good_news_everyon joined #mojo
21:56 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/Yf-ojg
21:56 good_news_everyon mojo/master 334f4b7 Sebastian Riedel: bump version
21:56 good_news_everyon left #mojo
22:13 bodgix joined #mojo
22:17 acidblue joined #mojo
22:20 acidblue why does "./myapp.pl test" give 'permission denied' even when I do sudo??
22:21 Adura chmod issues?
22:21 acidblue it's chmod with 644
22:22 acidblue but im using 'sudo"
22:22 Adura Should be 755, it's executed.
22:22 acidblue following th 'Growing' guide on the mojo web site
22:23 lb $ chmod 744 myapp.pl
22:23 Adura Guess there's an assumption of *nix usage-ness.
22:23 lb not to the tee :)
22:23 acidblue nope iwas wrong it is 755
22:24 Adura Put perl in front of it, then.
22:25 acidblue doh!, yes putting perl works
22:25 acidblue tanx
22:26 Adura Oh, you didn't put a shebang.
22:28 acidblue yes i did
22:28 Adura Confusing.
22:28 purl i think confusing is there is also a SHA1 that isn't core, IIRC
22:28 acidblue I always put the shebang
22:30 woz joined #mojo
22:46 jnbek joined #mojo
23:13 woz joined #mojo
23:17 sugar_ joined #mojo
23:19 acidblue anybody else have problems with the 'Growing tut from the Docs??
23:20 acidblue Getting this error:  Can't locate object method "check" via package "Mojolicious::Lite"
23:21 acidblue Offending code:  return $c->render unless $c->users->check($user, $pass);
23:43 lb that would work if you've put a check method in MyUsers.pm
23:43 lb in fact, why is users returning a Mojolicious::Lite object, you've not followed the example
23:48 woz joined #mojo

| Channels | #mojo index | Today | | Search | Google Search | Plain-Text | summary