Camelia, the Perl 6 bug

IRC log for #mojo, 2012-02-28

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

All times shown according to UTC.

Time Nick Message
00:01 jnap joined #mojo
00:13 GitHub5 joined #mojo
00:13 GitHub5 [mojo] kraih pushed 1 new commit to master: http://git.io/-zQQpw
00:13 GitHub5 [mojo/master] added small WebSocket frame building example - Sebastian Riedel
00:13 GitHub5 left #mojo
00:21 GabrielVieira joined #mojo
01:01 bird joined #mojo
01:03 d4rkie joined #mojo
01:06 bird_ joined #mojo
01:12 scott joined #mojo
01:35 hshong joined #mojo
01:40 tempire sri: thinking about making an eventsource plugin
01:41 sri tempire: do it
01:41 tempire then I realized I could make it work exactly like websockets.
01:42 tempire *I think*
01:42 tempire have it send an upgrade header to eventsource, and then be handled by Transaction::EventSource
01:43 * sri doesn't follow
01:43 tempire I'm not sure about that last part.  just poking around.
01:43 tempire but have: eventsource '/events' => sub { }
01:43 sri you're on the wrong layer
01:43 sri transaction is transport
01:44 sri your transport is http
01:44 sri upgrade headers are for protocol changes
01:44 sri websocket, https, spdy...
01:45 tempire understood
01:47 sri eventsource keyword makes sense for a good plugin i suppose
01:48 tempire my intent is to make it work exactly like websockets from the users perspective
01:48 sri that's problematic
01:49 sri eventsource scales differently
01:49 sri since up and downstream are independent
01:49 tempire yes.  there would be an issue with growth.
01:50 sri take hypnotoad for example, incoming websocket messages always reach the same worker, for eventsource you need to use ajax, which will reach different ones
01:50 tempire hmm
01:50 sri you need a message bus backend much earlier
01:50 tempire that is a problem
01:51 crab i agree, i don't think eventsource should look like websockets api-wise.
01:51 sri making event sending pretty with a plugin is a worthy goal though
01:51 crab yeah
01:52 tempire damned websockets.
01:53 tempire I made a pretty thing.  but it relies on websockets, which doesn't work on heroku.
01:53 sri you could always use redis pub/sub
01:54 tempire I hear that's easy.  but I haven't taken the time with it.
02:09 hshong joined #mojo
02:17 GitHub83 joined #mojo
02:17 GitHub83 [mojo] kraih pushed 1 new commit to master: http://git.io/2jpqcA
02:17 GitHub83 [mojo/master] pretty trees and boxes - Sebastian Riedel
02:17 GitHub83 left #mojo
02:18 kitt_vl joined #mojo
02:18 sri http://mojolicio.us/perldoc/Mojol​icious/Guides/Growing#Differences # looks better, doesn't it?
02:20 poundyz joined #mojo
02:20 poundyz hi all
02:21 crab hi
02:21 purl bonjour, crab.
02:22 poundyz is there any command in .ep that I can tell which page i'm viewing? something like TT template.name ?
02:25 crab maybe you can figure it out from req->url?
02:29 marty weeee
02:29 poundyz thanks
02:29 crab hi wee marty
02:30 marty zod lives - sorta... http://184.106.195.84:3001/
02:33 marty haha.  I've not seen the barfing dinosaur before. cute.
02:34 marty Hi crab!  :)
02:34 crab marty: do you actually sell drip irrigation kits?
02:35 marty crab: Yes. I'm using our database as the data for the test.
02:35 sri marty: neat
02:35 marty Not our live db howver.  :)  Just an export into mongo
02:36 crab awesome.
02:36 marty glad  you like it, sri.  And thank you for creating Mojolicious.
02:37 marty I'm hoping to get it spruced up enough to release into the wild and hopefully it will be useful.
02:37 marty But unfortunately, the drip irrigation season is upon us, so my time is now limited. :(
02:39 arpadszasz joined #mojo
02:39 sri it's quite snappy
02:40 marty Even from Germany?  Kewl.  I designed for speed first, so that's good news.
02:41 marty I see that the filtered navigation is not working. Hmmm, not sure why, works on test.
02:44 crab filters not working -> drip irrigation failu
02:44 crab s/u$//
02:46 marty Hmm,  weird, works on test.  Well, it still have a **lot** of rough edges.  But I'm happy it's snappy.
02:46 marty Mojolicious ROCKS!!!!
02:46 marty ALL GLORY TO THE HYPNOTOAD
02:47 alnewkirk sup y'all
02:48 * marty waves
02:49 alnewkirk so is there an easy way to set a class on an element based on whether the current route matches the arg?
02:49 Alias joined #mojo
02:50 alnewkirk <li <% if ($self->current_page('/this')) { %>class="active"<% } %>
02:50 alnewkirk ^ for example
02:53 marty are you trying to match a path or a param?
02:54 alnewkirk path
02:54 crab i saw an "all upvotes to the hypnotoad" cartoon on reddit the other day
02:55 crab alnewkirk: stick a boolean in the stash
02:57 alnewkirk crab: yeah, thats where I was headed
02:58 marty alnewkirk: there is also $self->tx->req->url  but I think crab has the right idea.
02:58 * marty upvotes hypnotoad. :)
03:03 sri ALL GLORY TO THE HYPNOTOAD!
03:04 zpmorgan I tried reading some of the mojolicious source code to learn how to delete sessions.
03:04 zpmorgan it sent me on an epic nostalgia trip
03:04 alnewkirk marty: what was crab's idea?
03:04 zpmorgan futurama's not even that old
03:06 poundyz what's the proper if .. then ... else in .ep ? % if (condition) { \n <some_js> \n } else { \n <some_otherjs> \n %}
03:06 poundyz ?
03:06 marty alnewkirk: stick a boolean in the stash
03:06 zpmorgan do you just make a session irrelevant by deleting all of its data?
03:06 alnewkirk marty: how?
03:06 tempire zpmorgan: just set it to expire
03:06 sri zpmorgan: i think the growing guide covers that
03:06 zpmorgan oh, okay. thanks
03:07 crab alnewkirk: i think i misunderstood what you wanted.
03:07 marty alnewkirk: can you use a placeholder in the route then compare the stash value?
03:08 alnewkirk i was going to $self->tx->req->url eq $self->url_for($path) and check it that way
03:08 alnewkirk ^ any objections?
03:09 marty I've never done that, but if it works, go for it . :)
03:10 crab alnewkirk: $self->req->url->path eq $path
03:10 crab no need for tx-> anyway
03:10 alnewkirk crab: okay
03:14 marty I'm off to go hang out with my better half on the couch.  Good evening everyone.  \o/
03:14 crab i read that as "hang out with the better half of my couch"
03:15 marty hehehe,  I'm lonely, :)
03:15 * marty nn
03:29 Alias left #mojo
03:29 sri there's also $self->req->url->path->contains('/foo')
03:33 xaka joined #mojo
03:37 newbie joined #mojo
03:56 alnewkirk sri++
03:56 alnewkirk i ended up with ...
03:56 alnewkirk
03:56 alnewkirk <li class="<%= $page->is_active($self, '/service.*') %>">
03:56 alnewkirk $page is a view class
04:03 crab seems a bit bizarre, but whatever works
04:04 alnewkirk crab: why?
04:08 hshong joined #mojo
04:15 crab well, for starters, is_active suggests something that returns true/false. i'd have called it something like navigation_class or nav_class. second, what is $page? (and what is a view class?) why does it need to be passed the controller? that suggests to me that something is screwy in terms of responsibilities. third, assuming that this is in fact to generate navigation links, you'll have to repeat /service twice, once in the check and once in the href.
04:16 crab but most of all, it seems like a very low-level function, adding verbosity everywhere in your templates. i would much prefer to hand off these concerns to a sub-template that i just "include 'navbar'" or so, and _maybe_ also a navlink helper that takes /path and Title and generates a link with an a href in it.
04:17 crab if you're building structure, might as well build a solid one. otherwise i don't see the advantage over just doing string matching over req->url->path.
04:18 crab or well, i don't see _enough_ advantage over it.
04:18 alnewkirk context is everything ...
04:19 crab you probably didn't want that level of feedback, but hey, it's morning and i'm bored.
04:19 alnewkirk no, its cool, feedback is how we grow, ... that said, ... is_active does suggest and also returns true/false, as stated $page is a instance of a view class
04:21 crab if it returns true/false, don't you need a "? 'active' : ''" or so after each call? otherwise you'll get class="" or class="1"
04:21 alnewkirk separation of concerns and all
04:21 alnewkirk crab: ?
04:21 alnewkirk <li class="<%= $page->is_active($self, '/service.*') %>">
04:21 alnewkirk what ? 'active'
04:22 crab or something.
04:27 crab $page->is_active($self, '/service.*') ? 'active' : ''
04:29 alnewkirk $page->is_active() # returns 'active' or undef
04:29 crab oh.
05:55 preflex_ joined #mojo
06:01 Foxcool joined #mojo
06:20 tempire so rails is old and tired, node.js is the new hotness.  now there's tower.js, a framework for node modeled after rails.
06:21 * tempire tries to keep up
06:25 jwang interesting that the default datastore is Mongo
06:25 tempire I would expect that.
06:25 tempire mongo is hip!
06:26 alnewkirk use MongoDBI; # :}
06:26 alnewkirk a new framework created for node.js every 10 minutes ...
06:27 alnewkirk my feed reader says tako is the latest
06:27 berov joined #mojo
06:27 jwang maybe it's a landgrab to see who can be DHH.js
06:28 alnewkirk lmfao
06:28 alnewkirk yup
06:30 tempire it really comes down to the hair
06:30 tempire gotta have the right gel
06:37 alnewkirk "something about mary"-ish
06:39 jwang alnewkirk: I'll ask about MongoDBI in Thursday's Perl MongoDB talk :)
06:40 jwang Lambert Lum's talk for the Silicon Valley Perl meetup
06:42 jwang alnewkirk: does MongoDBI support utf-8 keys?
06:44 ilbot2 joined #mojo
06:44 Topic for #mojo is now Mojolicious real-time web framework 🐫 http://mojolicio.us 🐫 http://irclog.perlgeek.de/mojo/today
06:48 alnewkirk jwang: cool ... never heard about such a talk
06:48 alnewkirk ... wish I could be present
06:50 jwang the nice thing about silicon valley is there are a ton of free talks. the day before the Perl Mongo talk is a Node Mongo talk
06:50 alnewkirk re: utf8, I believe so although there is no explicit code for handling that, MongoDBI doesn't use it own driver, it uses MongoDB
06:50 alnewkirk ... until sri releases his ;)
06:51 newbie jwang: where do you guys find all this talks? dont see any :(
06:51 alnewkirk shyte, ... I knew I shouldnt've left LA
06:52 jwang newbie: Perl Mongo talk - http://www.meetup.com/SVPerl/events/50974832/
06:52 jwang newbie: Node Mongo talk - http://www.meetup.com/Silicon-Val​ley-Web-Builder/events/49222342/
06:53 jwang newbie: are you in the area?
06:53 newbie jwang: wow, cool. thx! how much is it?
06:53 jwang xaka: free
06:53 xaka jwang: yeah, i'm in
06:54 jwang xaka: cool, see you there :)
06:55 xaka how often that talks happen?
06:56 jwang xaka: all the time
06:56 spleenjack joined #mojo
06:56 jwang xaka: if you monitor/join enough meetups. each meetup group will usually only have one every month or longer, but with enough groups, there's usually something interesting going on
06:57 xaka jwang: hell, with all this traffic here i have no idea how i can get to fremont fast )
06:58 jwang xaka: some interesting talks I've been to include the CIO of Zynga and SW Architect for Netflix (S3, Cassandra, etc.).
07:00 xaka looks like i missed bunch of interesting stuffs :( ah
07:00 jwang there's always something new around the corner. Tomorrow, SF Perl Mongers is having a meetup on Pinto for CPAN dependency management - never heard of that before
07:03 alnewkirk just saw a blog post on it two days ago
07:06 jwang speaking of blogs, JT seems to be doing a great job of getting sponsors for YAPC::NA
07:09 alnewkirk yes, he is
07:09 alnewkirk i applaud hi efforts
07:10 marcus wassup
07:10 marcus hi alnewkirk.
07:11 marcus alnewkirk: Did you see the request for Mojolicious talks from NYC.pm? Are you from around there?
07:31 alnewkirk hey marcus
07:31 alnewkirk no im in philly
07:37 marcus oh :-/
07:37 marcus alnewkirk: are you neighbours with gruber? ;-)
08:06 batman joined #mojo
08:10 cosmincx joined #mojo
08:38 baton8 joined #mojo
08:42 mire joined #mojo
08:54 fhelmbe__ joined #mojo
09:21 judofyr joined #mojo
09:41 memowe \o/
10:21 vervain joined #mojo
10:25 poundyz adios
10:33 daxim joined #mojo
10:54 AmeliePoulain joined #mojo
11:20 black joined #mojo
12:31 malditogeek joined #mojo
12:53 d4rkie joined #mojo
12:57 ilbot2 joined #mojo
12:57 Topic for #mojo is now Mojolicious real-time web framework 🐫 http://mojolicio.us 🐫 http://irclog.perlgeek.de/mojo/today
13:24 marty moin
13:36 jnap joined #mojo
13:59 inokenty joined #mojo
14:27 malditogeek joined #mojo
14:41 hshong joined #mojo
14:47 crab hi
14:49 daxim https://socialtext.net/per​l5/events_2012_plat_forms   # application deadline extended
14:56 marty hi crab
14:59 * sri waves
15:01 sri hmm, the new tree and boxes are pretty on the web but not so much in command line perldoc :/
15:02 daxim alias pod='perlzonji -c annopod'
15:02 sri perldoc replaces all box building chars with X
15:02 daxim no, that's the crappy roff renderer
15:03 daxim use the text output module for unicode goodness
15:03 sri that's not relevant
15:03 sri i can't assume all our users will change their pod renderers
15:04 ki0 joined #mojo
15:04 sri but yea, all unicode chars are affected :/
15:05 sri the question really is if the default output is acceptable for our users
15:06 sri IRI example with unicode snowman also just shows a /X
15:06 daxim probably not.  I would simply put a notice at the top, like wikipedia does.  "This document uses blah, which is not displayed by default perldoc.  In case of display problems, run perldoc -M foobarquux instead."
15:08 Foxcool joined #mojo
15:08 sri the box diagrams look ok imo, just the trees...
15:10 cosmincx joined #mojo
15:10 sri https://metacpan.org/module/Mojoli​cious::Guides::Growing#Differences # old
15:10 sri http://mojolicio.us/perldoc/Mojol​icious/Guides/Growing#Differences # new
15:12 * sri pokes crab, marcus and tempire
15:13 daxim looks okay, should be a bit wider to avoid line-wrapping
15:15 crab what are you asking for feedback on?
15:15 crab ah, scrollback.
15:17 sri ascii vs unicode diagrams
15:17 crab the Xs in perldoc are horrendously ugly.
15:17 * sri nods
15:17 sri i tend towards going back to ascii actually
15:21 crab i agree
15:21 crab poky ascii art is a very small evil
15:22 crab but i don't understand this "Differences" section
15:22 GitHub190 joined #mojo
15:22 GitHub190 [mojo] kraih pushed 1 new commit to master: http://git.io/-BZ_eg
15:22 GitHub190 [mojo/master] back to ascii diagrams - Sebastian Riedel
15:22 GitHub190 left #mojo
15:23 crab Differences: "You likely know the feeling, you've got a really cool idea and want to try it as quickly as possible..." <- huh?
15:23 sri ?
15:26 crab what does "PROTOTYPE" mean? why does the first sentence in that sentence sound like an introduction to what mojolicious::lite is... halfway into a document that's all about leaving mojolicious::lite behind?
15:26 sri it's explaining the differences and motivation
15:27 crab and is Differences supposed to be differences between lite and fat? because the sentence above sounds like differences between mojo and *
15:27 crab differences between what and what?
15:27 sri lite and normal of course
15:28 sri i think the question why lite apps exists in the first place is rather important before showing normal apps
15:29 crab hum. the growing guide must have changed a lot since i last looked at it.
15:30 sri it's the guide that changed least actually
15:30 crab guess i changed, then.
15:31 sri https://github.com/kraih/mojo/blame/mas​ter/lib/Mojolicious/Guides/Growing.pod
15:31 sri that sentence is there since 2010 :)
15:31 crab i think i'll work on some documentation
15:31 crab (not in master)
15:37 xaka joined #mojo
16:19 arpadszasz joined #mojo
16:27 judofyr joined #mojo
17:09 jwang joined #mojo
17:14 tempire elb0w is in ny.  he seems to have disappeared, though.
17:17 tempire interesting.
17:19 xaka joined #mojo
17:19 black joined #mojo
17:20 tempire https://gist.github.com/1933795
17:21 tempire crab ^
17:21 sri marcus: mojolicious bundle is still not in tm2 :(
17:22 sri tempire: perl -E'say 0+""'
17:23 sri don't think you can differentiate between false and ""
17:24 tempire not for differentiation, but for expected output.
17:24 sri or actually, you might be based on flags
18:07 crab tempire: why me?
18:09 black joined #mojo
18:13 lammel2 joined #mojo
18:33 sri WHY NOT ZOIDBERG?
18:33 purl (V) (;,,;) (V)
18:40 abra joined #mojo
18:46 tempire crab: in reference to a similar conversation last week.  It's not important, though.
19:22 hshong I'm trying to `Mojolicious::Lite`, is `render_json` method has any options?
19:24 hshong i'm loss a way in hash_ref to json unicode encoding problem.
19:39 hshong http://git.io/OtUAfw <- this link is very impressive.
19:39 hshong i solved my problem. thanks.
19:46 kaare joined #mojo
20:39 lukep joined #mojo
20:41 sri http://www.cpantesters.org/cpan/report​/f20f4f8a-61bc-11e1-b348-f71d7339630b # do we have a test problem on cygwin?
20:43 lukep joined #mojo
20:45 sri wish we had a core dev on windows :/
20:51 perlite_ joined #mojo
21:21 marty sri: is the mongo driver still a possibility?  Just wondering out loud while I work on zod.
21:22 sri marty: yes
21:23 * marty jumps up and down \o/
21:23 marty Kewl.  No pressure of course.  I'll not make any decisions based on its existence.  But neat to know it may still come to fruition. sri++
21:24 tempire sri: do we need windows devs or just a windows instance?
21:25 sri tempire: windows devs mostly
21:26 sri i think there are too many freaky special cases that you can only know about if you use windows on a daily basis
21:31 rhaen 5hep
22:45 vervain joined #mojo
22:56 vervain I have a template directive that worked in 2.48 but is failing syntax in 2.55: http://pastie.org/3483810
23:02 jnap joined #mojo
23:03 batman joined #mojo
23:04 vervain Ah yes... the template adjustments in 2.50 made it fail.
23:05 vervain Should http://pastie.org/3483810 be valid?  If not help would be appreciated. :-)
23:08 vervain Changed to http://pastie.org/3483890 for the win.
23:21 tempire vervain: it's due to list context
23:22 tempire another option: +($self->req->url->to_string =~ /(^\/app.*)/)[0]
23:41 vervain Thanks!
23:49 GitHub112 joined #mojo
23:49 GitHub112 [mojo] kraih pushed 1 new commit to master: http://git.io/Y7NmAw
23:49 GitHub112 [mojo/master] add compiled EP template example to rendering guide - Sebastian Riedel
23:49 GitHub112 left #mojo
23:49 sri think that will help?
23:50 sri i left out whitespace, not sure if that's good or bad
23:52 sri http://mojolicio.us/perldoc/Mojolic​ious/Guides/Rendering#Embedded_Perl

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