Camelia, the Perl 6 bug

IRC log for #mojo, 2010-12-16

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

All times shown according to UTC.

Time Nick Message
00:23 spleenjack left #mojo
01:30 Akron joined #mojo
02:18 MojoGuest180 joined #mojo
02:18 MojoGuest180 From: http://news.ycombinator.com/item?id=1277067 (105 hits)
02:20 MojoGuest604 joined #mojo
02:22 MojoGuest180 test
02:22 marty test test  :)
02:22 MojoGuest180 this thing is amazing!
02:22 marty Yep.  Are you using the websockets demo?
02:23 MojoGuest180 yeah.. just tested it on the iphone but it didnt work?
02:23 MojoGuest180 is now known as C1
02:23 marty Ahhh, never tried that.
02:23 C1 are you the developer?
02:24 marty Nope, just a lowley user. :)  the developer is Sabastian   (sri)
02:25 marty But ya, Mojo is pretty amazing.  Lots of good stuff going on in Mojo land.  This channel is usually pretty busy most people are in Europe, so prolly asleep.
02:25 C1 what happens in this chat room?
02:26 C1 as in topics?
02:26 MojoGuest604 left #mojo
02:27 marty bug squashing, best practices discussions.  Basically everyone trying to figure out all the fun stuff they can do with Mojo and the best way to do it.
02:27 C1 nice!
02:28 marty Ya, pretty active group overall.  Nice folks too.
02:28 C1 you know i would like to implement this with live stream with HTML5
02:28 C1 live streaming video that is..
02:29 marty I would imagine that could be done.  (never done it though)
02:30 C1 have you heard of any custom made Mojo clients?
02:32 marty I think so.  I can't remember names but I think I remember some discussions on that subject and some work being done.
02:33 C1 so what do you do?
02:34 MojoGuest928 joined #mojo
02:34 marty I'm working on a ecommerce web framework for Mojo
02:35 MojoGuest928 left #mojo
02:35 C1 Interesting.. how would you apply it?
02:38 marty It's just a framework for web stores with a default configuration.  Kinda like a scaled down Magento thing.
02:46 C1 i am not sure what you are talking about?
02:47 C1 any examples?
02:48 marty It's a framework for building web stores.  No examples yet, still alpha.
02:53 C1 left #mojo
02:59 Akron left #mojo
04:03 jamesw left #mojo
04:04 tholen42 joined #mojo
04:05 tl left #mojo
04:20 perlrocks Twitter: "Mojolicious-Plugin-BasicAuth 0.032 by Glen Hinkle - http://frepan.64p.org/~tempire/Mo​jolicious-Plugin-BasicAuth-0.032/" --cpan_new http://twitter.com/cpan_ne​w/status/15259843380125696
04:22 tempire kk0: ok, you're straight.  Will take a bit to be processed by cpan.  In the meantime, https://github.com/tempire/mojolicio​us-plugin-basicauth/raw/master/Mojol​icious-Plugin-BasicAuth-0.032.tar.gz
04:23 * tempire trololos in remembrance of vti
04:33 polvo joined #mojo
05:14 perlrocks Twitter: "Mojolicious - Web framework for Perl http://www.findbestopensour​ce.com/product/mojolicious # FOSS" (no) --bestopensource http://twitter.com/bestopenso​urce/status/15273509697626113
06:26 ltriant left #mojo
06:34 achromic left #mojo
06:35 achromic joined #mojo
07:07 marcus marty: Mojolicious ecommerce framework sounds exciting. What are you using for the backend_
07:12 tholen42 left #mojo
07:13 tholen42 joined #mojo
07:21 kaare joined #mojo
07:27 koban joined #mojo
07:28 und3f[A] is now known as und3f
07:31 perlrocks Twitter: "Today is a day with your loved ones: collectd Mojolicious #, # # and NetBSD" (de) --rabenfeder http://twitter.com/rabenfed​er/status/15308002575781888
07:32 perlrocks Twitter: "All glory to the hypnotoad! #mojolicious" --rabenfeder http://twitter.com/rabenfed​er/status/15308237175787520
07:41 perlrocks Twitter: "Plans for life: spend at least one hour work with #mojolicious a day." --rabenfeder http://twitter.com/rabenfed​er/status/15310631594889217
07:42 perlrocks Twitter: "I should put some love in the #mojolicious wiki today!" --rabenfeder http://twitter.com/rabenfed​er/status/15310755310080000
07:42 perlrocks Twitter: "#mojo is cool for rapid prototyping, accessing a ldap server from #Perl, however, pulls tons of dependencies into your toolchain..." --rabenfeder http://twitter.com/rabenfed​er/status/15310845143678976
07:48 marcus tempire: is vti dead?
07:52 Christian joined #mojo
07:52 Christian morning
07:54 sri marcus: hope not
07:55 marcus sri: 'in remembrance of' sounded a bit omnious
08:01 * marcus just bought javascript the good parts and mongodb: the definitive guide
08:01 marcus preparing for 2011 :p
08:02 und3f is now known as und3f[A]
08:08 moritz marcus: the js book is also on my wishlist
08:08 marcus oreilly had a buy one, get one ebook offer
08:11 breaker313 joined #mojo
08:12 arthas joined #mojo
08:18 dm_ joined #mojo
08:24 perlrocks Twitter: "This is the second part of the new #mojolicious welcome page. :) http://twitpic.com/3gdbqs/full #perl" --kraih http://twitter.com/kraih/status/15321267582275584
08:27 yko sri++
08:27 yko Mojolicious becames a teacher, ye?
08:28 sri in soviet russia mojolicious teaches you!
08:28 metaperl left #mojo
08:30 tholen42 left #mojo
08:32 tholen joined #mojo
09:15 GitHub25 joined #mojo
09:15 GitHub25 mojo: master Sebastian Riedel * f01fdea (2 files in 2 dirs): new code name - http://bit.ly/h0fviO
09:15 GitHub25 left #mojo
09:17 perlrocks Twitter: "We are now officially ahead of schedule for #mojolicious 1.0 in a few days. :) http://bit.ly/elwmzU #perl" --kraih http://twitter.com/kraih/status/15334619054350337
09:18 yko Yahooo!
09:19 perlrocks Twitter: "RT: @kraih: We are now officially ahead of schedule for #mojolicious 1.0 in a few days. :) http://bit.ly/elwmzU #perl" --sharifulin http://twitter.com/shariful​in/status/15335234044170240
09:22 perlrocks Twitter: "RT @sharifulin: RT: @kraih: We are now officially ahead of schedule for #mojolicious 1.0 in a few days. :) http://bit.ly/elwmzU #perl" --rdtft http://twitter.com/rdtft/status/15335852146163712
09:28 perlrocks Twitter: "#mojolicious 1.0 officially scheduled! Soon m-y- -p-r-e-c-i-o-u-s, soon…" --ykorshak http://twitter.com/ykorsha​k/status/15337576059633664
09:30 ajgb joined #mojo
09:33 sri get testing! :)
09:33 szasenko joined #mojo
09:35 fhelmber_ joined #mojo
09:35 al left #mojo
09:41 koban left #mojo
09:51 koban joined #mojo
10:00 jest joined #mojo
10:01 sri oh, i can remove deprecated stuff again :)
10:03 perlrocks Twitter: "RT @sharifulin: RT: @kraih: We are now officially ahead of schedule for #mojolicious 1.0 in a few days. :) http://bit.ly/elwmzU #perl" --mshershnev http://twitter.com/mshershn​ev/status/15346208193126400
10:09 su-bzero left #mojo
10:09 su-bzero joined #mojo
10:14 GitHub117 joined #mojo
10:14 GitHub117 mojo: master Sebastian Riedel * 1b97444 (14 files in 7 dirs): removed a lot of deprecated stuff for next release - http://bit.ly/hi2fQ7
10:14 GitHub117 left #mojo
10:21 crab TEST_ONLINE shows some new failures (apart from the 'right url' problem with google.de/.co.in)
10:21 crab t/mojo/client_online.t                      (Wstat: 1280 Tests: 101 Failed: 5)
10:21 crab Failed tests:  58, 64, 72, 74, 77
10:21 sri doesn't matter
10:22 crab ok. just wanted to let you know.
10:23 sri it's just your location/computer/network connection
10:25 jest left #mojo
10:25 crab i didn't realise there was so much to scroll down in the new 404 page
10:25 al joined #mojo
10:27 sri wonder if i should rather encourage using helpers instead of app->defaults
10:29 yko ha!
10:30 * yko tasted begin/new blocks
10:30 yko really cool stuff.
10:30 crab begin/new?
10:30 yko begin/end
10:30 sri :)
10:31 yko it allows to build so pretty helpers, like <%= admin begin %> big admin interface <% end %>
10:31 yko and hide/show chunks of page to user
10:31 yko just like that: https://gist.github.com/743265
10:32 yko i like the idea to have few boolean/block helpers that describe user/page status or something like that
10:33 sri interesting idea
10:35 yko it allows us to really improve app syntax
10:36 szasenko yko++
10:36 perlrocks Twitter: "RT @kraih: We are now officially ahead of schedule for #mojolicious 1.0 in a few days. :) http://bit.ly/elwmzU #perl" --chernomyrdin http://twitter.com/chernomyr​din/status/15354570335068160
10:36 szasenko yko, nice technic
10:37 yko :) thanks
10:37 szasenko yko, i've used admin staff in next way <% if (is_admin) {  %> ... <% } %>
10:37 szasenko yko, but now i know better way :P
10:37 szasenko "Perfect way"
10:39 yko hm. i did "% if (admin) {\n some html \n% }" before
10:40 rhaen sri!
10:41 rhaen the new images for the 404 and the launch page are incredible!
10:41 sri :)
10:41 rhaen really, I love them
10:43 rhaen they are soooo cool!
10:43 rhaen wow!
10:44 rhaen sri for president!
10:44 perlrocks Twitter: "New #mojolicious begin/end syntax allows us to create nice block helpers to show/hide parts of page from user: http://bit.ly/g6GWuc" --ykorshak http://twitter.com/ykorsha​k/status/15356483537469440
10:44 sri \o/
10:47 GitHub130 joined #mojo
10:47 GitHub130 mojo: master Sebastian Riedel * e2651b2 (1 files in 1 dirs): improved growing guide - http://bit.ly/f15h1v
10:47 GitHub130 left #mojo
10:48 sri i somehow really don't like "defaults"
10:49 crab don't take away my defaults!
10:50 sri defaults is bad mmmmmkay?
10:50 crab looks like the only time i use defaults is when i do $self->defaults('config')
10:50 crab why is it bad? what should i use instead?
10:51 sri umm
10:51 yko __PACKAGE__->attr('config'); sub startup { $self->config($config) }
10:51 sri thats a perfect example
10:51 sri crab: you are not supposed to do that
10:51 sri $self->defaults('config') is sooooo wrong
10:52 sri you're supposed to do my $config = $self->plugin(...);
10:52 yko sri: why? because it's available from stash?
10:52 sri or $self->stash('config')
10:52 sri yko: exactly
10:53 crab oh
10:53 crab i'm sure i cargo-culted that code from somewhere
10:53 sri hmm, i might actually remove it right now if it is misused that badly :S
10:54 yko :)
10:54 yko that's bad :(
10:54 yko i like to have dafault layout
10:55 sri hmm
10:55 szasenko is now known as omegatron
10:55 crab what? i can have a default layout? where do i sign up? :-)
10:56 yko crab, you can
10:56 crab $self->defaults(layout => "blah")?
10:56 yko startup { $self->defaults(layout => 'default') }
10:56 sri thats a good use case :S
10:56 yko s/^/sub /
10:56 sri guess we'll keep it experimental for now
10:56 sri and see
10:57 su-bzero is now known as alphatron
10:57 spleenjack joined #mojo
10:57 crab i think i must have done it because i read the source of JsonConfig.pm and saw that it puts the new $config into $self->defaults($stash_key => ...)
10:58 yko actually i do something like that: http://bit.ly/eJwhwn
10:59 yko auch... it really does.
11:00 yko sri ;)
11:02 sri damn you for bringing up a valid use case :S
11:08 spleenjack is now known as xitron
11:13 * yko giggles
11:20 crab i wonder what other horrible fauxs pas i'm committing in my app
11:22 sri well, it wasn't *that* horrible, i exaggregated a bit
11:23 crab :)
11:27 GitHub195 joined #mojo
11:27 GitHub195 mojo: master Sebastian Riedel * 8db0409 (4 files in 4 dirs): deprecated handler and helper attributes in Mojolicious::Renderer - http://bit.ly/fFLRg7
11:27 GitHub195 left #mojo
11:29 perlrocks Twitter: "RT @kraih We are now officially ahead of schedule for #mojolicious 1.0 in a few days. :) http://bit.ly/elwmzU #perl" --xomaa http://twitter.com/xomaa/status/15367826470608896
11:33 Christian is there a list about form tags like this: <%= submit_button 'Submit'>
11:34 crab Christian: Mojolicious/Plugin/TagHelpers.pm
11:35 perlrocks Twitter: "The amelia #perl logo makes a cameo in the third part of the new #mojolicious welcome page. :) http://twitpic.com/3gegpk/full" --kraih http://twitter.com/kraih/status/15369317113667584
11:36 Christian crab, nice one it is important for me
11:36 Christian thx
11:36 yko how tu run specific helper from outside of template? haveing controller and app
11:38 yko looks like $self->renderer->helper->{helper_name}->()
11:38 sri hell no
11:38 sri $self->helper_name
11:39 sri the growing guide shows it now
11:39 sri $self being controller or app
11:40 yko wow cool!
11:40 sri if it is app then a dummy controller will be passed though
11:40 yko really cool, thanks
11:41 sri looks like helpers need more recipes
11:41 sri something in the lite tutorial i guess
11:42 yko i think with the time helpers will need separate Guides/*pod file :)
11:43 sri hmm, maybe a session like section in the growing guide
11:43 yko that helpers autoload trick is really nice
11:43 sri i thought you were around when we added it Oo
11:44 marcus btw, does the helpers work in the TT renderer?
11:44 sri i guess so
11:44 sri you can always do [% c.helper_name %]
11:44 marcus mm
11:44 marcus good point
11:44 sri blocks of course not
11:45 yko sri, i'm not watching mojolicious always. shame on me
11:45 sri shame on you!
11:45 marcus agree
11:49 sri TT feels really clunky once you tasted tag helpers
11:51 sri especially with the indented line style they can have this haml feel
11:53 sri i could totally see someone make a complete tag library for html now
11:54 crab i wonder how to answer "how much bandwidth will 500 concurrent users need?"
11:54 sri you can only test that
11:55 sri track one user and multiply it
11:56 crab if i know how much data is sent during a typical user session, how do i convert that to "bandwidth"? do i assume that 500 concurrent users means 500 concurrent requests? that seems rather unlikely.
11:57 sri i would assume 500 concurrent requests
11:57 sri always assume worst case
11:58 yko // and one day it became truth
11:58 sri "I described Riak to coworkers thusly: "NoSQL done by Akamai engineers, whose idea of a failure condition involves nuclear attack.""
11:58 sri lol
11:58 janus left #mojo
11:58 janus joined #mojo
11:58 yko :)
12:00 crab so 500 concurrent requests to transfer 50KB each, assuming <2s response time, means some 16MB/s. that's... does that sound even vaguely reasonable?
12:01 crab i guess i'll write a script to login/do stuff/logout and run 500 of them with small random delays between steps
12:25 sri https://github.com/agentzh/redis2-nginx-module # redis rest api :)
12:32 crab sri: you mentioned liking to deploy mojo so that static files are served from the cache, right? how?
12:34 sri google for caching reverse proxy
12:34 crab which one do you use?
12:34 sri varnish and nginx are popular
12:35 sri i've not set them up myself yet
12:35 crab ah
12:35 sri thats an admin job ;p
12:36 crab i assume mojo already takes care of all the necessary if-modified-since/expires/etag stuff for me
12:36 crab heh
12:36 sri Last-Modified and If-Modified-Since
12:37 sri you can add more with hooks
12:37 jdixon sri: http://is.gd/iQcKV
12:38 crab is there an easy way to say "everything under /public expires next year?"
12:39 sri they all do stuff like that
12:39 jdixon ok, I'll erase it
12:39 sri jdixon: ?
12:39 jdixon I thought you were talking to me
12:39 crab jdixon: i think he meant all reverse proxies set expires
12:39 sri jdixon: not looked yet
12:39 jdixon oh ok
12:39 crab though i was actually asking about sending Expires: from mojo, not from the cache
12:40 sri depends on the proxy i guess
12:40 sri admin stuff ;p
12:40 crab (at the moment it's behind apache, and i'm setting expires: by content type, on images and css/javascript)
12:41 crab sri: no, this isn't about the proxy. you said "you can add more with hooks", right? got an example of adding an Expires: header? or where should i look to find out how?
12:42 sri after_static_dispatch and after_dispatch hooks
12:42 sri don't think there are examples yet
12:42 sri but it's similar to the rewrite hook in the cookbook
12:42 sri they all work the same, just at different times
12:44 sri jdixon: glad you like it :)
12:44 perlrocks Twitter: "Taking a little time off:  http://is.gd/iQcKV  #vacation #mojolicious" --obfuscurity http://twitter.com/obfuscuri​ty/status/15386902857261056
12:45 crab so: app->hook(after_static_dispatch => sub { shift->tx->res->headers(Expires => "send mail to sri to ask when") })?
12:45 crab neat. let me try it.
12:46 rhaen reverse proxy. *ugh*
12:46 rhaen *UGH*
12:46 rhaen <-- Admin
12:46 sri do your job!
12:46 * sri cracks the whip
12:46 rhaen sri: apache is a fine alternative, too
12:46 sri apache is dead
12:46 rhaen sri: the system of choice seems to be varnish, tho
12:46 rhaen sri: no.
12:47 crab rhaen: got any advice about setting it up as a caching reverse proxy then?
12:47 sri apache is too easy to kill
12:47 rhaen sri: it works like a charme, no reason to call it dead.
12:47 sri one word, slowloris
12:47 omegatron is now known as sza
12:47 rhaen crab - you mean an apache thing?
12:47 crab yes
12:48 sri you can easily starve apache with slow http requests
12:48 rhaen sure - first question: what do you try to accomplish with a reverse proxy?
12:48 rhaen crab: load sharing between multiple hosts or to improve caching?
12:49 sri nginx seems to be the choice for load sharing and varnish for caching
12:50 crab note: it's actually shift->res->headers->header(Foo => 42)
12:50 rhaen sri: huh! ngninx seems to be very nice, correct - but where will that end in a few years?
12:51 sri rhaen: what do you mean?
12:51 rhaen sri: apache is being maintained well - will nginx be the next lighttpd?
12:51 crab rhaen: improve caching. basically so that my mojo server doesn't keep getting hit with requests for static files
12:51 sri doubt that
12:51 crab is lighttpd unmaintained now?
12:51 sri nginx has huge userbase now
12:51 sri lighttpd is dead
12:52 moritz as dead as perl? :-)
12:52 rhaen sri: lighttpd solved every problem - however, yep, it's dead by now and all those fancy 2.0 guys left it for nginx
12:52 sri long standing bugs made it unpopular
12:52 rhaen moritz: even more dead :)
12:52 sri moritz: thats a different kind of dead :)
12:52 rhaen crab, let me grab a config
12:53 rhaen oh, sorry - forget it. Choose nginx
12:54 rhaen I use as different setup here.
12:54 rhaen I use an apache frontend server which balances the requests to two mojo http daemons
12:55 rhaen so basically I use the apache as a caching proxy and for serving static elements
12:56 rhaen crab: is that what you are trying to accomplish? even one mojo http is fine
12:56 crab yes
12:56 sri he wants to cache static files
12:56 rhaen ok.
12:56 rhaen so, enable the mod_proxy module
12:57 crab heh, my $r->route('/favicon.ico')->to(cb => sub { shift->render_not_found }); is no longer effective, and my app has a little white cloud as favicon :-)
12:58 sri right, built in static file
12:58 rhaen LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
12:58 crab rhaen: i already use ProxyPass and ProxyPassReverse
12:58 sri you can overload it with another static file
12:58 rhaen crab: so everything is fine!
12:59 rhaen you can exclude URL from the proxypass method by using
12:59 alphatron is now known as sko
12:59 rhaen ProxyPass /favicon.ico !
12:59 crab rhaen: but does it cache static content?
12:59 rhaen but this has to be put in the config BEFORE the proxy pass for the mojo app
12:59 crab oh, so if i give it a documentroot and say ProxyPass /static !, it won't ask mojo about those files? neat
13:00 sza left #mojo
13:00 rhaen this way the apache will serve the static favicon (in my example) or the /static in your example
13:01 crab good deal.
13:01 rhaen crab: it's that easy!
13:02 crab i hear nginx has more predictable memory use in these kinds of scenarios. someday i'll investigate migrating to it. but for the moment, making things work decently under apache is good
13:04 rhaen crab: nginx as it's advantages but apache is not dead. If you have the time, compare the two servers and decide which one suits your needs
13:06 perlrocks Twitter: "And the final part of the new welcome page shows what #mojolicious is all about. ;) http://twitpic.com/3gf6ai/full #perl" --kraih http://twitter.com/kraih/status/15392237856755712
13:07 rhaen crab: in order to get the most of the caching part you can just use "CacheEnable mem /static" - after enabling mod_cache and you can improve the performance even more
13:07 rhaen crab: dead simple
13:10 rhaen sri: come one - admin job, hm? But easy! This can even be done by a developer!
13:14 crab rhaen: is that like the old mod_mmap_static?
13:16 * crab finds the documentation
13:16 crab thanks
13:17 sri rhaen: are you asking me to steal your job? :)
13:18 sri usually admins appreciate it if i don't mess with their stuff
13:18 rhaen sri: true!
13:18 rhaen sri: btw, I need one
13:19 moritz rhaen: are you willing to move?
13:19 rhaen moritz: no. 3 kids want to have me somewhere around Munich
13:19 moritz rhaen: quite understandable
13:20 rhaen I really would like to ...but...kids...
13:21 * sri doesn't know that many perl companies around munich
13:23 crab i used to work for a company that was founded in munich, but i only went to munich a couple of times
13:23 sri i think amazon was looking for someone in munich
13:23 rhaen ah!
13:24 rhaen I am something like an admin - not a so-sri-called-them-developer
13:39 perlrocks Twitter: "That's good! RT: @ kraih: And the final part of the new welcome page shows what # mojolicious is all about. ;) Http://bit.ly/i913jh # perl" (ru) --sharifulin http://twitter.com/shariful​in/status/15400682030895104
13:57 sko Cool
14:12 dm_ left #mojo
14:19 ispeak joined #mojo
14:26 daviddelikat joined #mojo
14:31 fhelmber_ left #mojo
14:31 tempire marcus: vti is dead!?
14:31 tempire oh dear.
14:31 tempire love live vti!
14:32 perlrocks left #mojo
14:33 tempire *long
14:33 perlrocks joined #mojo
14:33 sri he's not dead
14:35 sri https://github.com/vti/boogie-woogie # just a little crazy
14:43 sri hmm, wonder why nobody has written a fun little pod viewer with mojolicious yet
14:43 sri would be kinda fun to have one bundled
14:43 moritz too easy?
14:43 sri is it that easy
14:43 sri ?
14:44 sri we do have a pod renderer, but i don't know about file discovery
14:44 moritz <%== `pod2html($path)` %>
14:44 moritz perldoc -l should give you that
14:45 moritz oh wait, that won't work for perldoc -f uc
14:45 moritz that still gives you the correct filename with -l, but then pod2html will convert the whole file, not just the section
14:46 sri it would be a nice example for the generated apps
14:47 sri /perldoc?Mojolicious::Lite possibly with autoredirect to search.cpan for /perldoc?Moose
14:48 sri it depends on perl 5.10 though
14:49 sri older versions don't have Pod::Simple
14:51 sri making pod look really pretty would be a fun challenge
14:55 Akron joined #mojo
14:57 sri perl -MPod::Simple::Search -E'say Pod::Simple::Search->new->find(shift)' Mojolicious
14:57 sri ok, that was easy
14:58 sri it even works with perl -Ilib
14:58 sri hmm
14:58 sri tempting
15:01 ispeak left #mojo
15:03 koban left #mojo
15:13 Akron left #mojo
15:19 Christian left #mojo
15:19 Christian joined #mojo
15:38 fhelmber_ joined #mojo
15:49 Akron joined #mojo
15:59 Christian cu all
15:59 Christian left #mojo
16:08 otaviof joined #mojo
16:14 fish__ is it safe to use $upload->filename (from req->upload) as a path component? or might it contain .. and such stuff?
16:15 breaker313 left #mojo
16:17 sri it might
16:17 sri very unsafe
16:18 sri it's the same as a query parameter
16:19 tholen42 joined #mojo
16:21 tholen left #mojo
16:29 fish__ sri: already thought something like that..
16:30 * sri will make pod look pretty now
16:31 sri plugin 'pod_renderer'; will register an action /perldoc
16:39 marcus never trust the user!
16:40 marty marcus:  I'm thinking about using Postgress with RoseDB as the backend.  But still reseaerching.
16:41 marty I know that nosql is the in-thang, but I'm new to it.   Not sure if Riak or something similar world work
16:41 moritz nosql has high buzzword compatiblity
16:41 marcus but low transaction-security
16:41 marcus which is kind of important for ecommerce
16:42 marcus at least mongodb for instance isn't guaranteed to have committed your data to disk
16:42 moritz I also tend to rely on certain structures. Not having the backend enforcing these structures seems like a bad idea
16:42 fish__ https://github.com/discordianfi​sh/dropbox/blob/master/dropbox <- another tiny mojo app ;)
16:42 sri fish__: put it into the wiki :)
16:42 moritz but then I'm old-fashioned
16:43 marcus The three operations that this chapter focused on (inserts, removes, and updates) seem instantaneous because none of them waits for a database response. They are not asyn- chronous; they can be thought of as “fire-and-forget” functions: the client sends the documents to the server and immediately continues. The client never receives an “OK, got that” or a “not OK, could you send that again?” response.
16:43 marty I think my ultimate goal would be combination of sql and nosql.  I'll use nosql for things like favorites list and recent view products etc...
16:43 sri fish__: you should indent the if/else in templates
16:43 * marcus is reading the mongodb book atm, can you tell?
16:44 marcus actually, there's a safe version
16:44 marty My current app is vanilla MySql.   But I'd like to implement an ORM (sounds fun) :)
16:44 marcus ugh
16:44 marcus please don't make another orm
16:44 marcus I am starting to hate them.
16:44 moritz does it at least send an SIGABRT if something failed? :-)
16:44 * sri wonders why mongodb doesn't have a rest api
16:44 marcus sri: it has great perl drivers tho
16:44 marty No, not write a new one.  Use an existing ORM.  :)
16:44 marcus rafl++ for those
16:45 sri marcus: blocking though
16:45 marcus sri: yepp. true
16:45 * moritz kinda likes DBIx::Class. It sure has progressed a lot in the last few months
16:45 fish__ sri: well, i thought its mixed perl and html, so i ident html and indent perl - independently from each other. i think every possible indent style on that is ugly btw ;)
16:45 marcus sri: I'd love to see an async version without moose.
16:45 sri there is an anyevent binding, but it looks very hackish
16:46 marcus but rafl's bindings are very well done, and easy to use.
16:46 sri they are the official bindings, so i would expect that
16:46 marcus $c->stash->db->collection->search()
16:46 marcus {db}
16:46 sri marcus: make the db connection a helper :)
16:47 sri $c->monogodb->collection->search()
16:47 marcus sri: I guess I should. Right now I use defaults to set it up
16:47 fish__ <ul>\n\t<li>foo</li>\n\tif {\n\t\t<li>bar</li>... would suck even more (because the output html is not indend right
16:47 sri marcus: i've changed the growing guide to use a helper too
16:48 sri fish__: http://twitpic.com/3famlf/full # i like this style
16:49 sri the result doesn;t have to be indented
16:49 sri browsers don't care
16:49 sri i on the other hand benefit a lot from pleasant templates
16:50 fish__ sri: i care when looking a the the html output ;)
16:50 sri htmltidy?
16:50 marcus I usually look at how the dom renders it rather than the html source =)
16:50 sri ^^^
16:52 fish__ but you don't intend perl code as it where a html tag. the % for is on the same deep as <table> is
16:53 sri thats just a quirk of me
16:53 sri i like the look of it
16:53 marcus you so quirky!
16:53 marcus five dollah!
16:54 baton8 left #mojo
16:55 * sri doesn't get the reference :(
16:55 marcus http://www.urbandictionary.com/define.p​hp?term=Sucky!%20Sucky!%20Five%20Dolla!
16:55 sri lol
16:59 sri hmm, is it bad if generated apps depend on perl 5.10 already?
17:00 marcus I think it's great
17:00 marcus but the enterprise will hate you :)
17:00 marcus I think some of my clients are still on debian systems running 5.8
17:00 sri well, it will be like this
17:00 sri # This depends on Perl 5.10
17:01 sri plugin 'pod_renderer';
17:01 marcus I guess that's ok
17:01 sri the welcome template would be able to link to locally rendered pretty pod
17:02 moritz what you can do is require Pod::Simple in META.yml
17:02 moritz then users of older perls can still install that from CPAN
17:03 sri we will soon move to 5.10 anyway
17:04 sri i highly doubt anyone would still develop on 5.8
17:04 marcus unless they deployed to 5.8...
17:05 sri then they would switch intentionally
17:05 marcus iusethis is actually still running on 5.8.8 :-/
17:05 sri shame on you!
17:06 * moritz has recently decided never to deploy to a system perl again, if he has the choice
17:06 sri yea, they are always broken
17:06 moritz that's not it
17:06 moritz I've been quite happy with debian's perl
17:06 moritz but then you try to upgrade a core module, and hell breaks loose
17:07 sri debian seems to be one of the few that are ok
17:07 sri but i got tons of ipv6 problem reports for it
17:08 sri redhat is the worst
17:14 marcus Had to change a shitty diaper :-/
17:18 daviddelikat ;P
17:18 daviddelikat :P
17:18 daviddelikat been out of that business for 7 years
17:18 Akron left #mojo
17:21 marcus daviddelikat: lucky
17:21 marcus I know a little girl who needs to start potty training soon.
17:23 stephan48 fish__: nice :)
17:30 ajgb left #mojo
17:39 josh is there a way to hook into the exception handler? id like to do something like $c->on_exception(sub { if ($c->req->is_xhr) { $c->render_text( status => 500, text => $@ ) } else { $c->render_exception( $@ ) } })
17:41 josh so my ajaxes can just display an alert()
17:43 marcus alert('you fail');
17:43 josh lol yeah apparently
17:44 fhelmber_ left #mojo
17:45 vel joined #mojo
17:56 sko_ joined #mojo
18:00 sko left #mojo
18:05 und3f[A] is now known as und3f
18:10 sri josh: overload render_exception
18:10 josh ah good call
18:10 josh :*
18:11 marcus then write a plugin
18:11 marcus ajax_exception
18:11 marcus ]
18:11 marcus :)
18:13 sri my perldoc plugin already works, too easy...
18:16 xitron left #mojo
18:17 josh[0] joined #mojo
18:18 * josh[0] rolls his eyes at his lousy third world internet
18:19 josh left #mojo
18:21 josh[0] is now known as josh
18:22 napoleon joined #mojo
18:23 marcus where in the world is josh leder
18:23 josh costa rica
18:30 josh the wife would be mad if i didnt say, its not really 'third world' here... but it feels that way a lot of times
18:30 napoleon left #mojo
18:32 marcus more life 4th?
18:32 marcus at least the climate is a lot better than here :)
18:33 josh haha yeah today is actually beautiful. summer just started here, we're finally out of rainy season and into the sunshine :D
18:37 josh and compared to its neighbors, costa rica is decidedly not 'undeveloped' .. but compared to the developed world of north america and europe, costa rica is decidedly 'developing'
18:39 josh where is 'here' for you?
18:58 sri his neighbor is santa
18:58 marty Hey lives in a Department store?
18:59 sri :D
19:01 josh haha
19:12 arthas left #mojo
19:49 josh whats the path for the embedded jquery?
19:50 sko_ /js/jquery.js
19:50 josh thanks!
19:50 sri there's a recipe in the cookbook
19:50 sri using google cdn if possible
19:51 josh ohh yeah i did see that, thats right
19:53 tempire_ am I the only one who doesn't like debian?  their init scripts are so inconsistent.
19:54 tempire_ from a sysadmin perspective, I can't imagine going with anything other than redhat/centos
20:20 * moritz doesn't have to fiddle with init scripts often
20:31 marcus josh: Oslo,Norway
20:32 josh ooh that does sound cold ;)
20:47 marcus RIP delicious?
20:47 marcus that's what happens when you rewrite in PHP :D
20:49 jamesw joined #mojo
21:05 ltriant joined #mojo
21:08 perlrocks Twitter: "Lets make the #mojolicious documentation look pretty, a pod browser will soon be built in. :) http://twitpic.com/3gj5g1/full #perl" --kraih http://twitter.com/kraih/status/15513646771732480
21:14 otaviof left #mojo
21:17 yko sri: will the /perldoc route be removable?
21:17 sri it will be activated by loading a plugin
21:17 yko oh! great, thanks
21:18 * yko doesn't like non-removable builtins...
21:18 * sri neither
21:19 perlrocks Twitter: "RT @kraih: Lets make the #mojolicious documentation look pretty, a pod browser will soon be built in. :) http://twitpic.com/3gj5g1/full  ..." --otaviof http://twitter.com/otaviof​/status/15516382686871552
21:20 Akron joined #mojo
21:21 perlrocks Twitter: "RT @kraih: Lets make the #mojolicious documentation look pretty, a pod browser will soon be built in. http://twitpic.com/3gj5g1/full #perl" --obfuscurity http://twitter.com/obfuscuri​ty/status/15516904839974912
21:28 ok22 joined #mojo
21:32 DaTa damn it, that looks good!
21:32 marcus so pretty, you won't believe it is perl.
21:33 sri language makeover with sri
21:34 perlrocks Twitter: "Mojolicious  - So pretty you won't believe it's Perl http://twitpic.com/3gj5g1/full" --marcusramberg http://twitter.com/marcusramb​erg/status/15520134827343872
21:34 DaTa how is the syntaxhighlighting done?
21:35 marcus small chinese children
21:35 marty LOL!!!!
21:35 DaTa :-P
21:40 tempire_ pod browser: nice
21:40 tempire_ all hail the twilight theme!
21:41 sri DaTa: prettify.js with a custom theme
21:41 MojoGuest185 joined #mojo
21:41 MojoGuest185 From: http://news.ycombinator.com/item?id=1277067 (106 hits)
21:41 sri which is in fact based on twilight
21:41 sri the theme, not the movie
21:42 josh i dunno, that theme is way sexier than a vampire
21:42 marcus http://www.mongodb.org/dis​play/DOCS/Trees+in+MongoDB storing trees in mongodb is just as problematic as with SQL
21:42 marcus guess I'll be basing mojomojo2 on riak then.
21:43 MojoGuest185 left #mojo
21:43 sri web scale!
21:43 marcus but riak is web scale too!
21:44 sri "I described Riak to coworkers thusly: "NoSQL done by Akamai engineers, whose idea of a failure condition involves nuclear attack.""
21:45 marcus you have coworkers? :o
21:45 marcus I thought you were a lone wolf and cub :)
21:45 * sri only has minions
21:46 marcus that's how I roll
21:46 marcus minions and customers
21:46 marcus and arne
21:47 marcus $client is #1 free app in the norwegian app store again today
21:47 memowe_ joined #mojo
21:48 marcus ooh, airfoil 4
21:49 fhelmber_ joined #mojo
21:52 memowe left #mojo
21:52 stephan48 left #mojo
21:52 crab left #mojo
21:52 bedi left #mojo
21:53 marcus ooh, no free upgrade. Fuckers
21:56 moritz uhm.
21:57 moritz as pretty (or not) as the new 404 page might be, I'd not like to see it for routes I registered
21:59 moritz I just installed the current mojolicious from github, and my get '/' => { ... } doesn'T seem to work anymore
21:59 sri nothing changed
21:59 sri you prolly just didn't render anything
22:00 moritz I didn't change my index method either
22:00 stephan48 joined #mojo
22:02 marty marcus: I just found you on cpan, you are one prolific programmer my friend.  Impressive!
22:02 moritz oh wtf? if I call a helper from a template, and something's wrong, I get a 404?
22:02 marcus marty: I blame sri.
22:03 marcus if he hadn't made Catalyst, I would have been a lot less prolific
22:06 marty Ahhh Ya, I see a lot of Catalyst stuff.  Well, loooooks like sri did it again.  :)   Now, get to it!!!
22:06 und3f left #mojo
22:06 marcus marty: I just released my first mojolicious plugin. :p
22:07 marcus I do have plans for one more. I want to write a bridge between mojolicious and LWP
22:07 und3f[A] joined #mojo
22:07 marcus to make it easier to use stuff that expects LWP http classes with mojolicious
22:07 moritz btw having many static files loaded from the 404 template is a bad idea
22:07 moritz it obscures the log
22:08 und3f[A] left #mojo
22:08 moritz I have a full 80x25 xterm with logs from the static files, and the actual 404 scrolled out of the window
22:08 perlrocks left #mojo
22:08 perlrocks joined #mojo
22:08 marcus I'm thinking successful static requests shouldn't be logged by default.
22:08 marty Yes, I saw your proxy plugin.  I'm sure if I new how to use it, I would.
22:08 und3f joined #mojo
22:09 bedi joined #mojo
22:09 moritz ah, I narrowed down the bug
22:09 marcus marty: if you don't need it, you don't need it :)
22:09 moritz in the helper I did a partial inline
22:09 moritz s/inline/rendering/
22:09 moritz and it didn't find the template
22:10 moritz so I got a 404 for the request for which the template included the helper
22:14 daviddelikat left #mojo
22:18 perlite_ joined #mojo
22:21 vel left #mojo
22:21 perlite left #mojo
22:21 perlite_ is now known as perlite
22:24 * sri removes log messages for static files
22:24 kaare left #mojo
22:27 und3f \o/
22:27 und3f no more floood
22:28 marcus sri: will it still log 404s?
22:29 sri ye
22:29 marcus good show
22:30 GitHub6 joined #mojo
22:30 GitHub6 mojo: master Sebastian Riedel * 5f2f0ae (8 files in 5 dirs): added POD browser to Mojolicious::Plugin::PodRenderer - http://bit.ly/eeF4Tb
22:30 GitHub6 left #mojo
22:30 sri all in one
22:31 marcus writing something to import your delicious booksmarks in mojo
22:31 marcus might be a good pr stunt right now :)
22:32 * marcus & # zzz
22:33 GitHub45 joined #mojo
22:33 GitHub45 mojo: master Sebastian Riedel * 33317a6 (1 files in 1 dirs): changed default module - http://bit.ly/ff2SGi
22:33 GitHub45 left #mojo
22:34 sri still need to fiddle a bit with the css, but it's mostly usable
22:49 ok22 left #mojo
22:50 sri perl -Mojo -E'plugin "pod_renderer"; app->start' daemon
22:50 sri thats all you need :)
22:50 janus left #mojo
22:51 janus joined #mojo
22:55 perlrocks Twitter: "Added a small but pretty POD browser to #mojolicious. :) http://bit.ly/hvF0nj #perl" --kraih http://twitter.com/kraih/status/15540512823971840
22:57 perlrocks Twitter: "All you need is a oneliner. ;) "perl -Mojo -E'plugin pod_renderer => {prefix => "/"}; app->start' daemon" #perl #mojolicious" --kraih http://twitter.com/kraih/status/15541096738193408
22:58 marcus sri: Would you accept a Mojo::Date patch to allow strftime output?
22:59 sri nope
22:59 marcus k
22:59 sri i almost did once, but Time::Piece is a core module
23:00 marcus good point
23:00 marcus I should be using Time::Piece for this
23:01 perlrocks Twitter: "RT @marcusramberg: Mojolicious  - So pretty you won't believe it's Perl http://twitpic.com/3gj5g1/full" --chunzi http://twitter.com/chunzi/status/15542097989861376
23:07 Rhaen_ joined #mojo
23:08 Rhaen_ left #mojo
23:10 perlrocks Twitter: "It's a general purpose POD browser btw. http://twitpic.com/3gk44r/full #perl #mojolicious" --kraih http://twitter.com/kraih/status/15544262057791488
23:10 sri marcus: that screenshot is for you :)
23:15 perlrocks Twitter: "RT @kraih: Added a small but pretty POD browser to #mojolicious. :) http://bit.ly/hvF0nj #perl" --tempiretech http://twitter.com/tempirete​ch/status/15545664825991169
23:18 perlrocks Twitter: "@kraih do I sense a "cpanlicious" coming up?:D RT: It's a general purpose POD browser btw. http://twitpic.com/3gk44r/full #perl #mojolicious" --garu_rj http://twitter.com/garu_rj​/status/15546218105016320
23:19 marcus sri: when hypnotoad runs in the foreground, it would be nicer if it defaulted to development mode
23:19 tempire_ funky characters : http://twitpic.com/3gk7cr in chrome on ubuntu
23:19 marcus sri: so that we can easily use it for stuff that requires prefork during development
23:19 sri tempire: yea, comes from the pod module, feel free to fix :)
23:20 sri marcus: hypnotoad really sucks for development
23:20 marcus sri: I am trying to do a request to localhost from my app now, and that really sucks with daemon :)
23:21 sri what *needs* prefork during development?
23:21 sri umm, why?
23:21 marcus because it can't serve another request while it's serving my request?
23:21 marcus can it?
23:21 sri you can
23:21 sri just go async
23:22 * marcus goes wild
23:22 marcus Unhandled event error: Couldn't connect. at /Users/marcus/perl5/perlbrew/perls/perl-5​.10.1/lib/site_perl/5.10.1/Mojo/IOLoop.pm line 1066.
23:22 sri all tests work that way
23:22 sri client and server in same process
23:23 perlrocks Twitter: "RT @kraih: It's a general purpose POD browser btw. http://twitpic.com/3gk44r/full #perl #mojolicious" --tempiretech http://twitter.com/tempirete​ch/status/15547624102825984
23:25 marcus humm
23:26 marcus but I can't do render from the callback, sri?
23:26 sri of course you can
23:26 sri there's a test for that too :)
23:26 marcus sri: http://pastebin.com/JCHCPFUr
23:27 sri umm
23:27 marcus Fri Dec 17 00:27:05 2010 debug Mojo::Server:57 [9891]: Waiting for delayed response, forgot to render or resume?
23:27 sri relative url, seriously?
23:27 sri ->to_abs is your friend
23:27 sri relative in that case is undefined behavior
23:28 marcus sri: didn't change anything
23:28 sri ?
23:28 marcus $self->url_for('/delicious-20101216.htm')->to_abs
23:28 sri don't use a relative url
23:28 marcus still waiting for render
23:33 marcus doh, missing call to ->start
23:33 sri lol
23:33 sri was about to say it
23:34 sri MOJO_CLIENT_DEBUG=1 not saying anything was suspicious
23:34 marcus async is hard :)
23:34 sri indeed
23:34 sri sadly it is well worth it
23:34 marcus it still warns about delayed response tho
23:35 marcus even tho the delay is just reading the html file
23:35 sri intentional
23:35 sri because you are doing stuff normal people don't
23:37 marcus I usually do
23:37 marcus =)
23:37 marcus but now I am going to bed like I threatened to do 1 hour ago
23:37 marcus at least now it renders, even if Mojo::DOM returns 0 objects
23:38 sri weakling
23:38 marcus ok, changing from 'dt a' to 'a' works
23:38 marcus I now render delicious bookmarks
23:39 sri :)
23:39 marcus sri: you don't have a baby girl who's waking up in 6 hours. don't tell me I am weak :)
23:39 sri you're going to push them out of business
23:39 sri heh
23:40 marcus well, I think they are managing that on their own
23:40 marcus seeing as they just fired the whole delicious team
23:40 sri yea, daring fireball just wrote about it
23:40 marcus I just think there will be a lot of refugees who want to host their bookmarks on their own server
23:41 sri not unlikely
23:44 fhelmber_ left #mojo

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