Camelia, the Perl 6 bug

IRC log for #mojo, 2011-01-31

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

All times shown according to UTC.

Time Nick Message
00:01 janus left #mojo
00:07 forwardever sri: another small optimization
00:14 ka2u joined #mojo
00:30 forwardever left #mojo
00:31 * tempire tries limechat
00:31 * tempire thinks colloquy is prettier
00:32 tempire but that image preview is neat
00:33 tempire left #mojo
02:55 tempire joined #mojo
03:07 hidek_____ left #mojo
03:25 hidek joined #mojo
03:43 MisterHatt is there a 'simple' way to modify the HTTP headers on the rendered page? I saw the header condition plugin but that is more for changing routes based on input headers, looking for something that changes output headers tho
03:43 MisterHatt to signal a varnish cache on which pages to not cache etc
03:43 MisterHatt any ideas?
04:04 tholen42 joined #mojo
04:06 tl left #mojo
04:35 aiglenoir joined #mojo
05:24 crab dammit.
05:25 crab Mojo::JSON::encode won't encode my hashrefs properly if they're blessed because it checks that $ref eq 'HASH'.
05:25 crab guess i'll have to do some hackery to work around that.
05:27 perlrocks Twitter: ":) RT @kraih One more reason to get voting if you love #mojolicious! http://t.co/zeMQ9dv #perl" --sharifulin http://twitter.com/shariful​in/status/31946619872083968
05:42 su-bzero[A] left #mojo
05:43 yko left #mojo
05:46 kaare joined #mojo
05:48 alnewkirk left #mojo
05:48 alnewkirk joined #mojo
05:55 stereonaut joined #mojo
06:13 marcus tempire: Limechat is way saner, imo. Colloqoy does crazy shit.
06:18 marcus tempire: more themes at http://groups.google.com/gr​oup/limechatosx/web/themes
06:20 stereonaut left #mojo
06:22 ysyrota joined #mojo
06:44 Cside joined #mojo
06:44 ispy_ joined #mojo
06:44 Cside left #mojo
06:45 Cside joined #mojo
06:45 Cside left #mojo
06:48 Cside joined #mojo
06:49 Cside left #mojo
06:57 koban joined #mojo
07:15 baton8 joined #mojo
07:23 yko joined #mojo
07:27 Foxcool joined #mojo
07:33 crab how can i disable ALL of the fancy error handling blah?
07:34 crab because i'm tired of running "app test" and getting 42 pages of css and html when something breaks.
07:37 zipkid crab: create a not_found.html in your templates folder
07:37 crab it's 500s i'm worried about more than 404s.
07:38 zipkid ahso...
07:38 zipkid there are env vars that regulate debug output...
07:39 Christian joined #mojo
07:39 jwang left #mojo
07:39 Christian good morning
07:39 purl Lies!
07:41 crab only MOJO_LOG_LEVEL that i can see, which isn't relevant
07:42 yko left #mojo
07:42 yko_ joined #mojo
07:42 yko_ is now known as yko
07:42 crab zipkid: you know how when you die "x" in your code, mojo renders a nice exception screen? that's what Test::More prints the contents of, in "expected" vs. "got"
07:42 crab and that's what i'm trying to suppress (during testing, anyway, because otherwise it's nice)
07:43 zipkid hmm... i have no Mojo here at work now.... can't look up stuff...
07:43 zipkid :-( sry
07:44 crab you will be punished!
07:44 zipkid yes... i know...
07:44 esskar joined #mojo
07:51 su-bzero joined #mojo
07:57 marcus crab: I agree, we should fix a custom error template for tests
07:57 marcus reading the frigging stack trace page gets old fast
08:00 Alias left #mojo
08:01 breaker313 joined #mojo
08:11 otaviof left #mojo
08:17 sri moin
08:20 * yko waves
08:26 Alias joined #mojo
08:31 Foxcool left #mojo
08:38 sri crab: just change the mode
08:38 sri exception screen is bound to the development mode
08:49 GitHub15 joined #mojo
08:49 GitHub15 mojo: master Sebastian Riedel * fdedc2c (1 files in 1 dirs): tweaked routes some more - http://bit.ly/gFREsT
08:49 GitHub15 left #mojo
08:52 s0va left #mojo
08:57 AmeliePoulain joined #mojo
08:57 GitHub72 joined #mojo
08:57 GitHub72 mojo: master Sebastian Riedel * 6d8befc (2 files in 1 dirs): make sure automatic route names do not break existing applications - http://bit.ly/hCcKdN
08:57 GitHub72 left #mojo
08:58 sri marcus: thats what i meant
09:00 ispy_ left #mojo
09:32 crab so "MOJO_MODE=production ./app test" should work?
09:32 crab aha. it gives me a different blob of css and html.
09:40 Foxcool joined #mojo
09:54 sri but content matching is bad anyway
09:54 sri just use css selectors
10:11 crab sri: um, well, i'm testing text/plain responses
10:12 crab (how) can i write an exception handler that just returns the error message?
10:18 sri overload render_exception
10:19 spleenjack joined #mojo
10:23 su-bzero_ joined #mojo
10:23 su-bzero left #mojo
10:26 crab in each of my controllers? hum.
10:27 marcus make a controller base class?
10:29 crab marcus: yeah, i have one, but it's a bit more complicated than that: i have a G::Controller base class, and a G::Table derived controller, which things are expected to derive from. for testing, i have an application in t/testlib which includes some controllers derived from G::Controller and others from G::Table.
10:30 crab but it wouldn't be appropriate to override render_exception in G::Controller, and i don't see what i could do in t/ that would make it better.
10:30 Foxcool left #mojo
10:31 crab aha, i can load Mojolicious::Controller _first_ and then redefine Mojolicious::Controller::render_exception in my test app. fine.
10:32 marcus would be nice to get support for this into core render_exception
10:32 marcus if TEST_HARNESS is set or whatnot
10:32 marcus I guess Test::Mojo could monkeypatch Mojolicious::Controller, but it seems a bit nasty
10:32 sri would break quite a few core tests
10:33 marcus you test that render_exception outputs HTML in the core?
10:34 sri i test custom templates and stuff
10:34 sri tons of stuff
10:34 bart joined #mojo
10:34 aleksey joined #mojo
10:34 sri it is much more complicated than you might expect
10:34 marcus It usually is :)
10:35 sri i'm going to add something now that migth help though
10:35 marcus “It is more fun to talk with someone who doesn't use long, difficult words but rather short, easy words like "What about lunch?"”
10:36 marcus -- Winnie the Pooh
10:36 sri What about lunch?
10:36 marcus I could do lunch.
10:36 sri \o/
10:38 crab sri: what are you adding?
10:38 sri not sure yet, but it will make things easier ;p
10:39 crab heh
10:40 bart left #mojo
10:41 Foxcool joined #mojo
10:45 bart joined #mojo
10:48 sri crab: wait a minute, which version are you using anyway?
10:48 crab 1.0
10:48 sri ah
10:49 sri not_found is much more rare in 1.02
10:49 bart left #mojo
10:49 sri ops...
10:49 crab more rare? what?
10:49 sri we were talking about exceptions only, nevermind
10:50 sri no_found does not get rendered for non existing templates anymore
10:50 sri *+t
10:50 crab hmm. i installed 1.01 from CPAN and mojo version still says "you might want to update to 1.01"
10:50 sri already fixed
10:53 marcus =)
11:02 y0j left #mojo
11:08 spleenjack left #mojo
11:08 spleenjack1 joined #mojo
11:08 otaviof joined #mojo
11:11 gizzlon left #mojo
11:11 sri github bot is broken again :/
11:11 sri https://github.com/kraih/mojo/commit/d2​d234084ce93edb9bd05b6893698b813bc2b73a
11:12 sri you could now have an exception.testing.html.ep template
11:12 daviddelikat joined #mojo
11:13 daviddelikat1 left #mojo
11:13 crab Oh, very nice. thank you.
11:15 y0j joined #mojo
11:20 sri especially exception.production.html.ep should be rather convenient
11:20 sri since most people will likely stick with the built in development exceptions
11:23 marcus that is great
11:23 * marcus bows to sri
11:23 sri \o/
11:23 marcus modes ftw
11:25 marcus o/' YOU RECEIVE THE FEDERAL FUNDING / YOU CAN HAVE A HEFTY GRANT o/'
11:46 forwardever joined #mojo
11:56 Foxcool left #mojo
11:58 jzy joined #mojo
12:04 jzy so is this place usually this quiet?
12:05 marcus no
12:05 marcus usually girls dance on the table all night long
12:05 marcus but they are off tonight
12:06 jzy i guess everyone is waking up
12:06 jzy i just wanted to say i'm impressed with mojo so far
12:06 spleenjack1 left #mojo
12:06 marcus sri: ^^^ wakey wakey, praise coming in.
12:06 spleenjack1 joined #mojo
12:07 jzy damn, did someone already make a live feed with mojo?
12:07 sri ALL GLORY TO THE HYPNOTOAD!
12:07 Foxcool joined #mojo
12:09 jzy i found teh logz, all set
12:09 Meneldor joined #mojo
12:09 Meneldor left #mojo
12:10 marcus NOTORIOUS
12:10 purl i heard NOTORIOUS was one of uri's fave flix ever.
12:11 MojoGuest513 joined #mojo
12:11 MojoGuest513 From: http://news.ycombinator.com/item?id=1277067 (183 hits)
12:11 MojoGuest513 left #mojo
12:11 sri damn, the riak architecture is so nice
12:12 sri the new key filters in 0.14 are kinda neat
12:13 marcus yeah.
12:13 sri little complicated, but powerful
12:14 marcus maybe better to try to make riak easy than to try to make mongodb sane? ;)
12:14 MojoGuest97 joined #mojo
12:15 sri hehe
12:21 marcus left #mojo
12:21 marcus joined #mojo
12:21 marcus hawt
12:22 marcus purl: jerk it!
12:22 purl marcus: 1-800-URINE ISN'T EVEN SEVEN DDDDD OH JESUS YOU'RE SOAKING ME I CAN'T WEAR THESE CLOTHES TO WORK TOMORROW DUE TO YOUR WETTING THIS CLASS IS HARD
12:22 * sri wonders how to do geo stuff in riak
12:22 * sri reads up on geohash
12:22 * yko listens attentively to each word sri will tell now
12:23 sri jerk it!
12:23 purl sri: JESUS CHRIST LOVES A GOOD PUNCH TO THE HEAD (FROM TIME TO TIME) HE'S LOOPY LIKE THAT (OUR LORD AND SAVIOR)
12:24 marcus http://lists.basho.com/pipermail/riak-use​rs_lists.basho.com/2010-March/000805.html fun
12:24 marcus they basically say "use mongodb" :)
12:24 sri http://search.cpan.org/dis​t/Geo-Hash/lib/Geo/Hash.pm # this seems to be the answer
12:24 jzy left #mojo
12:24 sri i think you can use geo hashes as keys
12:24 sri and then filter
12:24 marcus says riak does not support ordered keys
12:25 sri 0.14 added key filtering
12:25 marcus then geo hash should maybe be able to do it
12:25 sri you can attach a javascript function
12:25 sri ye
12:26 jzy joined #mojo
12:29 sri it seems everybody is using geohash internally
12:31 forwardever sri: moved several methods from Routes class to Controller class, and tests seem to pass (e.g. _dispatch_controller, auto_render, _walk_stack), question is whether there might be a better class other than Controller to move these methods to
12:31 sri only auto_render would make sense there
12:32 sri Mojolicious::Routes::Dispatcher would maybe make sense, maybe
12:33 sri gain is rather limited though
12:33 sri the dispatcher code can already be ignored savely
12:33 sri just moving auto_render would have a small advantage
12:36 forwardever clear code, better separation of concerns
12:36 sri noble goal, but you are ignoring the risks
12:36 sri there are pretty much always side effects
12:36 sri breaking something can be devastating for our reputation
12:39 jzy left #mojo
12:40 forwardever better encapsulation means less side effects, it will be more and more difficult to implement as the project moves forward
12:42 jzy joined #mojo
12:43 jzy left #mojo
12:58 MojoGuest97 left #mojo
12:58 MojoGuest653 joined #mojo
13:01 MojoGuest653 left #mojo
13:02 stephan48 sri: but better breaking them now then later or? :)
13:03 sri umm no
13:03 sri right now is about the worst time
13:04 sri the thing we need most atm is stability
13:06 forwardever sri: what kind of side effects would you expect in case of moving methods one to one into a different class?
13:07 sri unexpected ones
13:07 stephan48 always nice :)
13:07 sri you can argue all day long, it doesn't change the fact that a mistake there would be fatal
13:09 sri i don't want to discourage you, just be very very careful
13:12 forwardever think that api changes are the ones that people don't like, maybe promote the cpan release as stable and the git version as dev would make most sense to me, right now, always use the lastest version is what people are expected, which makes such changes difficult, as there is no room for refactoring
13:13 moritz you can always refactor in a branch
13:13 sri that does not at all address the problem
13:13 sri yea
13:14 sri thats what we use git for
13:15 forwardever ye, but no way to let people test for unexpected side effects, that is what I mean
13:15 stereonaut joined #mojo
13:15 sri ?
13:15 sri thats exactly what the master repo on github is for
13:16 sri you can also announce your forks on the mailing list
13:16 sri of here
13:16 sri *or
13:16 sri anyway, that has absolutely nothing to do with the problem
13:16 sri if something breaks, we are screwed
13:24 Foxcool left #mojo
13:25 jzy joined #mojo
13:32 stereonaut left #mojo
13:34 Foxcool joined #mojo
13:35 stereonaut joined #mojo
13:38 stereonaut left #mojo
13:39 marcus what sri said.
13:39 moritz if something breaks, you can still revert and release the reverted version
13:41 Foxcool left #mojo
13:53 Foxcool joined #mojo
13:57 bart joined #mojo
13:58 kaare left #mojo
14:00 bart left #mojo
14:04 ka2u left #mojo
14:04 ka2u joined #mojo
14:10 ka2u_ joined #mojo
14:10 ka2u left #mojo
14:11 ispy_ joined #mojo
14:12 jzy left #mojo
14:15 jzy joined #mojo
14:17 Foxcool left #mojo
14:20 GitHub82 joined #mojo
14:20 GitHub82 mojo: master Sebastian Riedel * a38e5ae (4 files in 3 dirs): fixed a complicated application embedding bug - http://bit.ly/dNZB6Y
14:20 GitHub82 left #mojo
14:28 Foxcool joined #mojo
14:42 jzy left #mojo
14:46 jzy joined #mojo
14:48 kaare joined #mojo
14:48 MojoGuest261 joined #mojo
14:48 MojoGuest261 left #mojo
14:56 Foxcool left #mojo
14:58 jzy left #mojo
15:01 AmeliePoulain left #mojo
15:06 dekimsey joined #mojo
15:15 a|newkirk[assoc] joined #mojo
15:16 DaTa_ joined #mojo
15:16 DaTa left #mojo
15:16 a|newkirk[assoc] is now known as alnewkirk[here]
15:19 baton8 left #mojo
15:23 GitHub59 joined #mojo
15:23 GitHub59 mojo: master Sebastian Riedel * 8aa8b2e (1 files in 1 dirs): added cookbook recipe - http://bit.ly/fiiX7P
15:23 GitHub59 left #mojo
15:25 perlrocks Twitter: "And here's the #mojolicious client recipe for today, enjoy! :) http://t.co/Vpg25N6 #perl" --kraih http://twitter.com/kraih/status/32097184291758080
15:26 su-bzero_ left #mojo
15:26 su-bzero joined #mojo
15:27 sri the twitter bot works great since the rewrite
15:48 esskar2 joined #mojo
15:48 esskar left #mojo
15:51 crab what did you change?
15:55 stereonaut joined #mojo
15:59 maja joined #mojo
16:00 maja is now known as chuckderbiber
16:02 Christian cu all
16:02 Christian left #mojo
16:03 aleksey left #mojo
16:04 koban left #mojo
16:07 sri everything
16:07 purl everything is "omg, it must take over the world"
16:07 * sri hugs purl
16:07 * purl smiles
16:08 perlrocks Twitter: "Mojolicious:: Lite, CGI:: App Gossori fewer minutes to write many were still in a process that, you're only nice if you write a really Goritsu and processing. Simple and can be grouped into a template or __DATA__ section feels minimalist feeling." (ja) --tsukamoto http://twitter.com/tsukamot​o/status/32107888658878464
16:13 marcus I'm blue dudidadudidu
16:14 otaviof left #mojo
16:19 sri da ba di da ba di
16:22 chuckderbiber left #mojo
16:23 maja joined #mojo
16:23 maja is now known as chuckderbiber
16:29 breaker313 left #mojo
16:30 su-bzero[A] joined #mojo
16:33 sri wow, already another mongodb book out
16:33 sri actually looks interesting
16:33 sri http://oreilly.com/catalog/0636920018308/
16:34 marcus hmm
16:34 marcus written by Kristina
16:35 sri hmm
16:35 sri 50 pages? Oo
16:35 marcus more like an article...
16:37 sri makes book writing look a lot easier
16:44 tempire Why do you need a book?
16:44 tempire It's already web scale
16:45 * sri slaps tempire with a book, repeatedly
16:45 * tempire gives sri the assignment of writing a mojolicious book
16:45 tempire 51 pages.
16:45 * sri continues
16:46 * tempire web scales horizontally and sits on sri
16:46 sri HALP!
16:48 tempire I kind of like the idea of a short book.  Just another thing to inundate the public with.  Makes everyone believe everyone else is using it, regardless of whether it's true.
16:50 * sri likes the idea too
16:52 crab now, i must decide how to convert my objects to json.
16:52 tempire loop through and remove all bless objects
16:53 tempire though, I suspect you're doing something more complicated than it needs to be if you have blessed objects mixed in with stuff you want to transfer over json
16:54 crab they're rows fetched with DBI's selectrow_hashref, blessed directly into a class that provides some convenient accessor functions, that's all.
16:55 crab like G::User::has_password, which hashes the input before comparing with the hashed password in the db, that sort of thing.
16:55 crab so no, not especially complicated.
16:56 crab i could write a utility function that takes an array of such rows and returns unblessed versions to feed to render_json. or i could make it an object method. or i could have an object method to return JSON directly.
16:57 tempire ok, so essentially, you have a mini-orm.  It makes sense to have a ->dump or ->get_columns (like dbic) in a parent class of G::User
16:57 crab right.
17:05 esskar2 left #mojo
17:09 crab but i find i hate it.
17:10 tempire well of course.
17:10 purl Indubitably.
17:10 tempire making an orm to support an app is annoying.
17:11 tempire but you already know you're breaking the rules, so I won't say anything more
17:14 esskar joined #mojo
17:15 vel joined #mojo
17:16 GitHub40 joined #mojo
17:16 GitHub40 mojo: master Sebastian Riedel * 38d9d4a (2 files in 2 dirs): updated jQuery to version 1.5 - http://bit.ly/dEmBOm
17:16 GitHub40 left #mojo
17:20 GitHub94 joined #mojo
17:20 GitHub94 mojo: master Sebastian Riedel * ecff804 (1 files in 1 dirs): pod cleanup - http://bit.ly/fsxHtJ
17:20 GitHub94 left #mojo
17:26 esskar2 joined #mojo
17:26 sri hmm, the changelog is already big enough for a major release
17:28 bart joined #mojo
17:29 esskar left #mojo
17:31 ysyrota left #mojo
17:33 tempire anything interesting to announce with it?
17:34 sri interesting?
17:40 non joined #mojo
17:42 otaviof joined #mojo
17:43 bart left #mojo
17:46 forwardever left #mojo
18:01 dekimsey1 joined #mojo
18:06 dekimsey left #mojo
18:16 su-bzero sri: Now action is required?
18:16 snearch joined #mojo
18:17 su-bzero sri: Do you have any site in Mojolicious? (excluding your blog)
18:38 yko oops. really
18:38 yko $r->route('/')->to('example#test') => if there's no Example::test but template example/test.html.ep exist,
18:38 yko 404 is rendered
18:41 marcus oops
18:43 su-bzero oops
18:53 sri why would you ever do that?
18:54 sri route to a template ok, but to a non existing action?
18:54 sri if the template doesn't exist you're in trouble
18:56 su-bzero_ joined #mojo
18:56 sri think about placeholders
18:57 sri /:controller/:action -> non existing action = oops, no response and make the user wait for 5 seconds
18:58 sri the ep renderer used to be a little too clever and render_not_found in those cases
18:58 sri but other renderers don't
18:58 sri was a serious bug
19:00 sri yko: so that's very much intentional behavior
19:00 su-bzero left #mojo
19:01 sri if you want a route to a template you should use the documented way
19:02 sri $r->get('/foo') for foo.html.ep or even $r->get('/foo')->to(template => 'example/test');
19:18 PerlNinja joined #mojo
19:18 spleenjack1 left #mojo
19:18 PerlNinja sup, brothers from other mothers
19:20 sri http://blogs.perl.org/users/brian_d_foy/201​1/01/one-more-week-for-oscon-proposals.html # hmm, this is screaming for a mojolicious talk
19:23 alnewkirk left #mojo
19:28 PerlNinja it is... but.. no looking at me :P too far away for me to attend hehe
19:28 stephen joined #mojo
19:31 PerlNinja one of these days i gotta see if I can breathe some life back into the local .pm cos it seems to have been dormant for the last few years
19:36 alnewkirk joined #mojo
19:37 * sri needs a .pm again too
19:37 marcus sri: Come to Oslo :p
19:38 PerlNinja there's .. exactly one in this entire country
19:38 PerlNinja and it's been under construction and basically DOA for .. 3 years, which gives me a sneaking suspicion I might be one of a handful of perlers out here
19:39 marcus PerlNinja: which country is that?
19:39 PerlNinja Indonesia :D
19:39 PerlNinja and me doing up a .pm would suck since I don't speak the language fluently enough to pull it off
19:39 marcus just make them speak english
19:39 PerlNinja *snort*
19:39 PerlNinja you don't want that, honestly
19:39 PerlNinja you seen Engrish right?
19:39 PerlNinja think worse :P
19:40 marcus jow
19:40 marcus joy even
19:40 PerlNinja I teach English from time to time around here
19:40 marcus why do you live there? gf?
19:40 PerlNinja they supposedly learn in school but the books they use to learn from are full of spelling and grammar mistakes
19:40 PerlNinja so
19:40 PerlNinja marcus: worse... wife :P
19:40 marcus mmm
19:40 PerlNinja I ended up here 4 years ago on a job, kinda liked it here so stuck around, and well.. social life took over :)
19:41 PerlNinja it's umm, different, but not bad
19:41 stereonaut left #mojo
19:42 marcus one of our coworkers just moved to Malaysia for love ;)
19:43 PerlNinja big advantage: cost of living is ridiculously low, so I generally only have to spend 2 weeks out of any given month working to pay the bills and get my pocket money, the other 2 weeks i can pretty much do whatever i feel like, which at the moment is mostly trying to understand mojolicious guts and at some point writing some plugins
19:44 MojoGuest561 joined #mojo
19:45 MojoGuest561 is now known as korshak
19:45 yko left #mojo
19:46 su-bzero[A] left #mojo
19:56 ispy_ left #mojo
19:56 korshak hm.. for me that sounds bad, especially without any announcement
19:56 korshak but well, it's you decision
19:56 korshak * went fixing routes
20:05 sri what are you talking about?
20:06 yko joined #mojo
20:07 korshak left #mojo
20:07 sri ok, something is going wrong here
20:08 PerlNinja ?
20:08 sri those russian guys keep popping up and ignore everything i say :S
20:09 * sri wonders if they are related to und3f
20:12 sri i'm spending so much time trying to explain in detail how a bug can easily fry their apps and then they are just rude
20:13 yko left #mojo
20:13 sri grr... user support just makes me bitter...
20:16 aiglenoir left #mojo
20:16 * sri goes to get a beer
20:18 alnewkirk[here] left #mojo
20:23 PerlNinja sri: any sort of user support will proceed from making you bitter into making you bitter and cynical until you finally end up like me, a bitter, cynical, crotchety bastard whose favorite motto is "users are lying bastards, don't ever trust them, preferrably kill them all and hide the bodies"
20:24 PerlNinja unfortunately, in reality you gotta just smile and bear it
20:24 fhelmber_ left #mojo
20:24 perlite left #mojo
20:25 perlite joined #mojo
20:28 sri haha
20:29 aiglenoir joined #mojo
20:29 sri guess at least trying the kill em all and hide bodies approach won't do any harm
20:32 PerlNinja yeah but if you do it enough, you end up not having to field any support questions due to nobody using the thing you're supporting :P
20:33 PerlNinja unless you're specific about who receives an answer and who receives the business end of a shotgun
20:33 PerlNinja funny, i either got better at writing concise code, or the combination of mojolicious + mongodb lets me write shorter subs ...
20:36 PerlNinja and who the heck is that Blue guy on cpanratings? seems the guy does nothing but one-star things and leave acerbic comments
20:37 sri ye, 2 stars was actually much above average
20:37 PerlNinja yeah that was kinda funny but just wondering who's got enough spare time to like, go around like that
20:38 yko joined #mojo
20:40 sri who knows
20:40 purl and it's way past purl's bed time young man!
20:40 * sri pats purl
20:40 * purl bites!
20:40 sri :o
20:40 * PerlNinja muzzles purl
20:41 dhg joined #mojo
20:42 dhg Hi
20:42 purl privet, dhg.
20:42 * sri waves
20:45 stephan48 left #mojo
20:45 stephan48 joined #mojo
20:46 ispy_ joined #mojo
20:47 su-bzero[A] joined #mojo
20:50 dhg I have a problem within a mojolicious lite template. I need to acces to a hash var value. I'm trying with %$files{name} but I got noise. Any idea?
20:52 su-bzero joined #mojo
20:56 su-bzero_ left #mojo
20:56 dhg_ joined #mojo
20:57 dhg left #mojo
20:57 dhg_ is now known as dhg
21:02 su-bzero_ joined #mojo
21:04 su-bzero left #mojo
21:06 PerlNinja dhg: no idea, to be honest, I use the TT renderer :)
21:06 dhg im using ep
21:07 PerlNinja files.$name ?
21:08 PerlNinja guessing wildly off the wall here, never used ep hehe
21:09 sri it's just perl
21:09 marcus sri: you should call your next template system eep
21:10 marcus :)
21:10 sri :)
21:10 * PerlNinja fails rendering :'(
21:10 PerlNinja oh! yes.. please
21:10 PerlNinja i'll modify it and call it 'meep'
21:10 PerlNinja :P
21:11 PerlNinja i dunno wth is in this apple flavored ice tea i've been drinking but that stuff just goes right on through... *wanders off to bathroom, again*
21:11 sri tmi
21:12 dhg with %$thumbs{$name} i got:
21:12 dhg Global symbol "%thumbs" requires explicit package name at template line 30, near
21:12 PerlNinja try $thumbs{'name'}
21:12 dhg with $thumbs{$name} i got a value: HASH(0x86e1dc8).Escalada%20%20%20%20
21:13 sri $thumbs->{$name}?
21:13 dhg lets try
21:13 PerlNinja or there's a hashref in $thumbs{$name}
21:13 sri you might want to read up on perl data types
21:13 PerlNinja $thumbs{$name}->{field}
21:14 dhg sri i have the correct data out the template, in the log i placed in my route function
21:15 PerlNinja mmm you might have the right stash key but the data in there isn't what you think it is :)
21:16 sri you can always <%= dumper $thumbs %>
21:18 dhg With $thumbs->{$name} ... GET /gallerys/Escalada/thumb-Es​calada.png%20%20%20%20alt= (Mozilla/5.0   ...
21:19 * PerlNinja points up - try what sri said so you can see the data that's actually in $thumbs
21:19 dhg may be i need to read the entire perl book before mojolicious stuf
21:19 dhg :P
21:19 PerlNinja not to sound like a dick but.. ehm... yes, yes... it would help :P
21:19 sri very good idea
21:19 PerlNinja Mojolicious is pretty damn easy to use but you do need to know at least the basics of perl and perl datatypes :D
21:20 sri to see people learn perl with mojolicious is very nice to see though
21:20 sri *-to see
21:21 * sri needs to see the fridge
21:21 PerlNinja moar beer
21:21 PerlNinja !
21:21 yko umm, sri. i sounded rude? that i have to apologize
21:21 non left #mojo
21:21 sri yko: not you
21:22 dhg i have a 1000 lines of mojoloicious:lite coded i now im stucked with a nested hashes in a ep
21:22 PerlNinja dhg, don't give up though - grab the perl book, and your mojolicious::lite code and see if you can get it to work, if you're learning, might as well learn two things at the same time and have fun with it :d
21:22 dhg its ridiculous
21:22 sri yko: you're surely one of the nicest people around :)
21:23 PerlNinja dhg, if it's 1000 lines already, you might want to break it up into a regular mojolicious app instead of a lite one, it might (or might not) save you some headaches, but the difficulty level goes up a little at that point
21:23 yko korshak == yko
21:23 dhg ty PerlNinja
21:23 * sri is now confused
21:24 dhg but i have to get this app in production as soon as posible i fear the break :P
21:24 PerlNinja dhg: if you don't mind me asking, what's the app supposed to do? like, pretend i'm your grandma, tell me what the app's purpose is :)
21:25 baton8 joined #mojo
21:25 dhg a multiple gallery app with simple admin functions to upload the fotos and create gallerys
21:25 sri yko: most bugfixes have some kind of sideeffect, i don't think it would be wise to write announcements for every single one :S
21:26 dhg soms js for presentations
21:26 sri sorry for the noise earlier then
21:27 PerlNinja dhg: ah okay cool, and I take it the thumbs{...} bit is used for generating the gallery then :) if you wanna chase down the bug, find out what your code is doing that's generating that hash, because it's either putting more data in there than you think it is, or it's coming back as a hashref instead of a flat hash
21:27 PerlNinja don't forget dhg, templates just do what you tell them so it's happily taking whatever's in $thumbs and sticking it in the output, if the output's wrong, means whatever went in is wrong, and that's probably something in the code that can get fixed :)
21:29 dhg PerlNinja: can i paste about 5-10 lines of code here?
21:29 PerlNinja better use one of those nopaste things and post the link
21:29 PerlNinja ehr.. if I knew where the heck that thing lived
21:30 dhg pastelicious?
21:30 dhg :P
21:30 sri sounds appropriate :)
21:30 PerlNinja :P
21:30 PerlNinja if I knew where on the web it lives :P
21:31 PerlNinja paste.scsys.co.uk also works i guess
21:31 dhg http://showmetheco.de/articl​es/2010/1/pastelicious.html
21:31 dhg broken link?
21:31 dhg amm gist maybe
21:32 PerlNinja either/or  :) generally speaking usually better to use one of those services and plop the link in here, easier to read ;)
21:34 * sri still prefers http://pastie.org
21:34 * PerlNinja usually just reads lines of code out loud over the phone when i need help ... :/
21:35 dhg git@gist.github.com:804859.git
21:35 dhg lol
21:35 dhg sory
21:36 dhg https://gist.github.com/804859
21:36 dhg %thumbs is the problem.
21:37 PerlNinja thumbs => \%thumbs
21:37 PerlNinja change that one to thumbs => %thumbs .. oughta work
21:37 purl PerlNinja: that doesn't look right
21:37 PerlNinja purl, you don't look right, wacky bot
21:37 purl PerlNinja: huh?
21:38 dhg if i dont scape the hash char it dont works
21:38 dhg perl is a bit triky for novices
21:38 PerlNinja dhg, question though
21:38 dhg (of course im the novice :)
21:38 PerlNinja the bit where you do the @tfiles = map ... thing, and then $thumbs{$gallery} = $tfiles[0]
21:38 PerlNinja is that just to get the first thumbnail out of a gallery?
21:39 dhg yes
21:39 dhg but i only have a thumb for each folder
21:39 PerlNinja right okay
21:39 PerlNinja hmm
21:39 dhg i really dont need to map
21:40 PerlNinja mmm well if you get a list of files back, using map in that way works, as opposed to push(@tfiles, basename($_)) for(@files)
21:40 PerlNinja I dunno which one is considered 'best practice' :)
21:41 * PerlNinja just loves abusing map :/
21:41 PerlNinja but yeah anyway, in theory, $thumbs{$gallery} should in that case just contain a single filename
21:41 PerlNinja but since in your stash it turns into a hashref, you should refer to it as $thumbs->{$name} -- if there's garbage coming out still, then that map/basename thing is doing something wacky
21:41 dhg Mon Jan 31 22:16:33 2011 debug Mojo::Loader:143 [12035]: ##### Galleria:Escalada is thumb-Escalada.png #####
21:42 dhg its the log exit
21:42 dhg the thumb name is ok
21:42 PerlNinja yeah
21:42 PerlNinja okay.. huh
21:42 PerlNinja *mind blows up*
21:42 PerlNinja then I dunno what it is to be honest haha
21:42 dhg but later: Mon Jan 31 22:16:34 2011 debug Mojolicious::Plugin::RequestTimer:24 [12035]: GET /gallerys/Escalada/thumb-Es​calada.png%20%20%20%20alt= (Mozilla/5.0 (X11; U; Linux i686; ca; rv:1.9.2.13) Gecko/20101206 Ubuntu/10.10 (maverick) Firefox/3.6.13).
21:43 dhg ok,np i will suicide hahhaa
21:43 PerlNinja hmm wait
21:43 dhg ty very much PerlNinja
21:43 PerlNinja <img src="<%= ("/$gallerysdir/$gallery/". "$thumbs->{$gallery}") %> <- that's the culprit
21:43 PerlNinja you notice the missing " ? :D
21:44 PerlNinja <img src="<%= ("/$gallerysdir/$gallery/". "$thumbs->{$gallery}") %>"
21:44 dhg Oh fuc...
21:44 dhg ty a lot
21:44 PerlNinja >.> nobody saw this ok?
21:44 dhg alt is the key ;)
21:44 dhg hahhaha
21:44 PerlNinja hehe
21:44 PerlNinja eh get used to it
21:44 dhg well ty again PerlNinja
21:44 PerlNinja wacky bugs are usually the result of something obvious... but not that obvious >_<
21:44 PerlNinja np
21:45 PerlNinja needed a break from my code anyway :D
21:45 dhg oh yeah, mojolicious rocks
21:45 dhg i suckk...
21:45 dhg well, finally it works
21:46 PerlNinja eh, just keep writing code :D things improve :)
21:46 GabrielVieira2 joined #mojo
21:46 * PerlNinja has been writing perl code in some form or other for the last 15 years give or take and i'm still learning new stuff
21:48 sri we all do
21:49 sri just two weeks ago i learned about "print -helloworld"
21:50 PerlNinja ...
21:51 PerlNinja guess i just learned about that now then :D
21:51 sri :)
21:51 GabrielVieira left #mojo
21:54 PerlNinja question though, i'm busy converting a big catalyst app to mojolicious and as such i have a rather huge list of routes going on, shortened with shortcuts already, but is there any way to stick the routes inside the actual controller class and have them pulled out at some point?
21:54 sri nothing built in
21:55 PerlNinja given that i've got 3 other guys who will be maintaining it after, so it's.. preferrable they just have to edit one file to get things going, so i can be a lazy bastard and avoid having to repeat the "yes but stick it in the routes list in the main module too" line a few too many times :)
21:55 PerlNinja alright, is that something that could be made as a plugin?
21:55 PerlNinja because if I got it right, the controller objects aren't instantiated yet during startup
21:56 sri well, i would not recommend it, but i guess it might be possible
21:56 PerlNinja hmm
21:57 PerlNinja I think I see why too so.. *idea out the door*
21:57 sri i'd rather use routes with placeholders
21:57 PerlNinja yeah, but I get a lot of them that take the form of /path/:someid/{crud}
21:57 sri let them build stuff with /:controller/:action/:id routes and worry about pretty URLs later
21:58 PerlNinja and a lot of those got fixed up with shortcuts where possible
21:58 PerlNinja yeah could just do that since things pretty much map out that way due to porting from catalyst
21:58 sri you could also use the sledgehammer approach
21:59 sri use MyApp::FooController; MyApp::FooController::routes($app);
21:59 sri and do that for each controller ;p
21:59 PerlNinja yeah, I guess that would work but that's fugly :P
21:59 sri or turn every controller into a lite app
22:00 PerlNinja treat them like embedded apps and all.. could work
22:00 sri ye
22:01 PerlNinja hmm that's one i'll remember for later actually, there's some other project coming up that would actually work very well like that
22:02 sri http://techcrunch.com/2011/01/31/4ch​an-founder-unleases-canvas-networks/ # oh my, this can't end well
22:03 baton8 left #mojo
22:03 PerlNinja s/unleases/unleashes/ ?
22:04 PerlNinja and yeah...
22:04 purl O'REILLY
22:04 PerlNinja that's... gonna get epic
22:06 dhg hei, c u latter, ty 4 the patience
22:06 dhg left #mojo
22:12 kaare left #mojo
22:20 marcus 23:17 <#perl> GumbyPAN CPAN Upload: Plack-App-TemplateToolkit-0.01 by LLAP hmm
22:22 sri plack is turning into cgi 2.0
22:24 PerlNinja left #mojo
22:27 marcus http://search.cpan.org/~zby/Web​Nano-0.005/lib/WebNano.pm.orig # muhaha
22:27 marcus zby bringing the kwalitee
22:28 marcus also shipping with README.predzil
22:28 sri http://cpansearch.perl.org/src/ZBY​/WebNano-0.005/lib/WebNano.pm.rej
22:28 marcus :D
22:29 sri that was released last year
22:29 marcus oh.
22:29 marcus it popped up in some random search.cpan.org query I did
22:30 marcus it was released in december
22:30 marcus and there was an article on perl.com about it
22:30 sri Oo
22:31 marcus the dispatcher is pretty horrible
22:31 marcus see http://www.perl.com/pub/2010/11​/the-philosophy-of-webnano.html
22:31 marcus is Universality even a word?
22:32 marcus I guess it is.
22:33 sri i can't take frameworks serious that consider few lines of code a feature
22:33 vel left #mojo
22:33 sri there is only one benchmark that really matters... getting stuff done!
22:36 marcus mojolicious needs anti-procrastination mechanisms
22:36 marcus like blocking reddit and digg while the daemon is running or something :)
22:36 chansen sri: please label your Mojo::JSON parser as a superset of JSON
22:37 sri chansen: why?
22:37 marcus chansen: it already says 'relaxed'
22:37 sri doesn't superset mean we don't cover the whole spec?
22:37 marcus no, that would be a subset
22:38 sri ah
22:38 chansen I had a client that thought is was a good idea to use your parser for validation
22:38 sri heh, we had this talk before
22:38 sri i added relaxed after it :)
22:39 chansen I know, but know it has hunted me
22:40 marcus it's coming to take you away...
22:40 marcus to the funny farm!
22:40 sri THE FUNNY FARM!
22:40 chansen I ended up telling client to stay away from anything that begins with Mojo::
22:40 marcus WHERE LIFE IS BEAUTYFUL ALL THE TIME
22:40 sri thats not nice
22:41 sri and i can't follow the reasoning
22:41 chansen sri: no it's not, but it's not for a client spend XXX$ to me figure out why json can't be interchanged
22:42 * sri doesn't see the connection
22:43 * chansen guess you will someday
22:43 sri you wouldn't club nails into the wall with a chainsaw
22:44 marcus chansen: your client used the mojo json parser for something it wasn't meant for... how is that sri's fault?
22:44 marcus it would be like using mojo::dom for xml validation
22:44 marcus (please don't tell me your client is doing that ;)
22:46 GitHub159 joined #mojo
22:46 GitHub159 mojo: master Sebastian Riedel * ac5929c (1 files in 1 dirs): emphasize on relaxed - http://bit.ly/f0zhfZ
22:46 GitHub159 left #mojo
22:47 chansen marcus: I'm not blaming sri (I just earned a few bucks debugging the error, and Mojo lost a user) but IMO it should be pretty clear that Mojo::JSON implements a superset and not JSON, minimalistic is inconclusive IMO
22:48 marcus chansen: relaxed means it will not enforce the spec?
22:48 sri so far we've had no misunderstandings there
22:49 chansen marcus: you are pushing it, don't mind my report, go on with life ;P
22:49 marcus chansen: chill dude.
22:51 marcus http://www.youtube.com/watch?v=TXZMZ-XvvzI
22:51 * sri claps
22:53 marcus well annotated video
22:56 chansen it's not personal, I still ♥ sri for his achievements, but stil a thought worth processing
22:57 marcus chansen: But you don't think relaxed and 'a superset' means the same?
22:57 marcus chansen: I'm not asking to be difficult, it's just, to me, it would indicate the same thing.
22:57 marcus relaxed/liberal
22:58 marcus like http://search.cpan.org/~miyagawa/X​ML-Liberal-0.22/lib/XML/Liberal.pm
22:59 marcus it generates valid json if you throw a data structure at it, right?
23:08 chansen We could debate the this issue, but I won't, perhaps client should have interpreted relaxed as a superset of JSON, but he did interpreted as JSON due it's name. Causeless who knows, you have the report, hopefully you will make the best of it.
23:08 marcus sri: rather than adding 'very', maybe add a warning about not using it as a validator?
23:08 marcus chansen: I'm not intested in debate, I was asking you a genuine question.
23:08 marcus you seem a bit sore about the issue.
23:09 marcus interested even
23:12 chansen marcus: I'm not sore about software per se, only when I get involved and find the documentation misleading (on the behave of a client)
23:13 chansen lets drop it, what Mojo::JSON does is fine (assuming it's clear and wont backfire when you interchange the data)
23:14 marcus chansen: Well, I found the use relaxed in this context " Thus, it is a common strategy to create a relaxed parser for a context-free grammar which accepts a superset of the desired language constructs (that is, it accepts some invalid constructs);" at http://en.wikipedia.org/wiki/Parsing
23:14 marcus so it is clearly not misleading, but maybe it is confusing
23:14 marcus which is why I suggested sri added some additional warning about using it as a validator
23:15 GitHub165 joined #mojo
23:15 GitHub165 mojo: master Sebastian Riedel * a6e334c (2 files in 1 dirs): emphasize even more on relaxed - http://bit.ly/eYyc4Z
23:15 GitHub165 left #mojo
23:15 sri everybody happy now?
23:15 marcus that looks good to me.
23:16 marcus group hug?
23:16 purl Cannonball!
23:17 sri \o/
23:19 chansen marcus: may I elaborate on this tomorrow? I have a taxi waiting to take me to the famous Icebar, in 25 min?
23:19 marcus chansen: enjoy.
23:19 chansen thanks
23:22 * marcus has a bed waiting to take him to dream land
23:22 marcus nite guys
23:23 Alias_ joined #mojo
23:25 sri nn
23:29 * tempire is happy
23:30 * tempire wonders if he can be sent to oscon on the company dime
23:40 ispy_ left #mojo
23:47 mateus left #mojo
23:49 GabrielVieira joined #mojo
23:54 GabrielVieira2 left #mojo

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