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

IRC log for #mojo, 2014-06-09

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

All times shown according to UTC.

Time Nick Message
00:01 kyshtynbai I think I got it. It's layout section, isn't it?
00:19 neyasov_____ joined #mojo
00:25 kyshtynbai That worked). Cool).
00:29 mst jberger: it's only unfortunate if you're a fan of treating things as X versus Y, rather than a fan of "anything that gets more people writing more perl is a good plan"
00:30 mst jberger: Dancer is important. we need a framework that takes the people who're scared of calling methods and isolates them off in a sandpit with a toy spade where they can have fun without interrupting the adults
00:37 jberger mst: I absolutely believe that anything that gets people writing more Perl is a good plan
00:38 jberger mst: I also believe showing that Perl can be in the cool spaces like node.js is what will get people who are not into Perl already writing more Perl
00:40 jberger but I don't begrudge them their toy spades, and that is why I didn't take a shot at Dancer in my previous comment, I just wish we could have Sawyer's presence in this camp, and not to the exclusion of the other either
00:40 jberger To rephrase, I want the conversation to be Perl/Mojolicious vs Node.js, not Mojolicious vs Dancer
00:41 mst right, which I have no problem with, but calling it 'unfortunate' that the person working hardest to kill CGI.pm is a Dancer fan makes it sound like you want the conversation to be the latter
00:41 mst hence my pulling you up on it
00:42 jberger ah, well I take full responsibility for my bad phrasing
00:42 mst mojolicious already has more of a reputation for being divisive than it really deserves, so you need to be extra careful about that sort of thing
00:42 shmuel joined #mojo
00:42 mst because confirmation bias etc. make you more likely to be misinterpreted than others would be
00:42 jberger I meant it as I love Sawyer and I wish he would hang out here more often, that is all :-)
00:42 jnbek^dt joined #mojo
00:42 jberger indeed
00:42 jberger point well taken
00:43 sivoais joined #mojo
00:43 jberger mst: btw mojoconf was such a breath of fresh air from that stale narrative, the vibe was so positive, I wish there could have been some way to bottle it up and show it to the Perl community at large
00:44 genio end every post with a smiley face?
00:44 jberger tiger face!
00:45 jberger ????!
00:46 preaction ???? we do not sow!
00:47 preaction no, wait, that's ????
00:49 sri that's an event loop
00:49 neyasov_____ joined #mojo
00:53 sivoais joined #mojo
00:57 laouji joined #mojo
01:08 btyler joined #mojo
01:09 jberger there is no good unicode raven :-/
01:32 jberger does the vim highlighting for __DATA__ work for anyone?
01:32 jberger I can't seem to make it work :-/
01:33 klapperl_ joined #mojo
01:36 kyshtynbai It does for me.
01:37 kyshtynbai but it colors __DATA__ section in comment color.
01:37 kyshtynbai ubuntu 14.04, default vim syntax set.
01:43 jberger kyshtynbai: oh, no I was talking about mojo template highlighting in the __DATA__ section, using mojo.vim
01:45 jberger thanks though
01:45 kyshtynbai :).
01:45 * jberger is now looking at Vim::X to try to make some weird and wonderful mojo+vim plugins m/
01:50 neyasov_____ joined #mojo
02:04 shmuel joined #mojo
02:10 crab i turned off vim's colours long ago
02:18 * jberger remembers that crabs often spend their whole live in the mud
02:18 jberger :-P
02:51 neyasov_____ joined #mojo
03:20 neyasov_____ joined #mojo
03:38 btyler joined #mojo
03:39 kyshtynbai Guys, this is small code of template. I'd like to know, if it is okay to insert perl code in _template_ or design and code should be separate (this code works however).
03:39 kyshtynbai http://pastebin.com/mCZbnf7V
03:41 preaction i wouldn't put this much code in the template
03:43 kyshtynbai preaction: could you please specify probable workaround? Maybe I should create array with filenemes in main app and just send it through stash to template? Not sure if it is possible however.
03:44 preaction yes, that is what i would do
03:44 kyshtynbai Thanks!
03:48 basic6_ joined #mojo
04:19 sh4 joined #mojo
04:20 neyasov_____ joined #mojo
04:21 neyasov______ joined #mojo
05:16 laouji joined #mojo
05:22 neyasov______ joined #mojo
05:26 laouji joined #mojo
05:35 odc joined #mojo
05:52 cpan_mojo Mojolicious-Plugin-Nexmo 0.91 by Andrey Khozov - http://metacpan.org/release/AVKHOZOV/Mojolicious-Plugin-Nexmo-0.91
06:23 Eke- joined #mojo
06:23 neyasov______ joined #mojo
06:29 cpan_mojo Mojolicious-Plugin-NetsPayment 0.02 by Jan Henning Thorsen - http://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-NetsPayment-0.02
06:48 sugar_ joined #mojo
06:53 sugar_ joined #mojo
06:54 Vandal joined #mojo
06:59 eseyman joined #mojo
07:00 davido_ joined #mojo
07:12 dgikiller joined #mojo
07:17 rawler joined #mojo
07:25 neyasov______ joined #mojo
07:26 d4rkie_ joined #mojo
07:29 trone joined #mojo
07:30 laouji joined #mojo
07:49 laouji joined #mojo
08:26 neyasov______ joined #mojo
08:28 edestler joined #mojo
08:30 cpan_mojo Business-Payment-SwissESR 0.2.0 by Tobias Oetiker - http://metacpan.org/release/OETIKER/Business-Payment-SwissESR-0.2.0 (depends on Mojolicious)
08:42 Tiger joined #mojo
08:53 basiliscos joined #mojo
08:58 rem_lex|pivo joined #mojo
09:02 laouji joined #mojo
09:10 laouji joined #mojo
09:23 dgikiller joined #mojo
09:40 denis_boyun joined #mojo
09:46 user_9743 joined #mojo
09:57 mire joined #mojo
09:57 shmuel joined #mojo
10:04 cpan_mojo Business-Payment-SwissESR 0.2.1 by Tobias Oetiker - http://metacpan.org/release/OETIKER/Business-Payment-SwissESR-0.2.1 (depends on Mojolicious)
10:16 neyasov______ joined #mojo
10:42 alnewkirk joined #mojo
10:59 batman is there a way i can make the app request a resource from itself?
11:00 batman hm.... maybe just $self->ua->get("/foo") works
11:00 batman *trying*
11:03 stephan48 batman: maybe Mojolicious::Plugin::Subdispatch can help?
11:04 batman stephan48: no, i think i'm good now that ua can do both blocking and non-blocking at the same time
11:04 stephan48 okey
11:04 stephan48 cool
11:06 batman :)
11:08 stephan48 will it actually do a local http request?
11:08 cpan_mojo Business-Payment-SwissESR 0.3.0 by Tobias Oetiker - http://metacpan.org/release/OETIKER/Business-Payment-SwissESR-0.3.0 (depends on Mojolicious)
11:12 batman yeah $c->app->ua->get("/foo"); will request /foo from the same server
11:13 sri not quite correct
11:14 sri it uses a test server to perform the request
11:16 crab oh?
11:16 sri this is what happens https://github.com/kraih/mojo/blob/master/lib/Mojo/UserAgent.pm#L322
11:21 dod joined #mojo
11:21 batman sri: yeah, but it act different from Mojo::UserAgent->new->get()
11:21 batman seems like $self->app->ua is set up...
11:22 batman right: $ua->server->app($self)
11:22 batman in Mojo.pm
11:23 sri no *but*, that's exactly what i'm talking about
11:23 purl hmmm... talking about is "Yeah, you're alway talking and talking and talking. Shut up and code."
11:23 batman sri :)
11:24 sri the test server https://github.com/kraih/mojo/blob/master/lib/Mojo/UserAgent/Server.pm
11:25 d4rkie joined #mojo
11:25 laouji joined #mojo
11:27 batman marcus: Useless use of private variable in void context at Mojolicious/Plugin/RenderSteps.pm line 19.
11:27 D4RK-PH0ENiX joined #mojo
11:28 cpan_mojo Business-Payment-SwissESR 0.4.0 by Tobias Oetiker - http://metacpan.org/release/OETIKER/Business-Payment-SwissESR-0.4.0 (depends on Mojolicious)
11:28 sri haha
11:28 sri marcus: just do "undef $tx;" somewhere at the end
11:31 mire joined #mojo
11:37 rawler Hi, just stumbled upon an inconsistency in http://mojolicio.us/perldoc/Mojolicious/Guides/Cookbook. Under "Rewriting", the example is for dealing with "X-Forwarded-Protocol
11:37 rawler However, under the nginx-config-example, the seemingly more common "X-Forwarded-Proto" is used. Perhaps they should match?
11:38 sri difference is intentional
11:42 Vandal joined #mojo
11:59 D4RK-PH0ENiX joined #mojo
12:07 sugar__ joined #mojo
12:11 good_news_everyon joined #mojo
12:11 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/FFzKTA
12:11 good_news_everyon mojo/master 3b02e41 Sebastian Riedel: use a different example for the rewriting recipe
12:11 good_news_everyon left #mojo
12:12 sri i guess it could be more distinctive
12:20 mire joined #mojo
12:29 neilhwatson joined #mojo
12:32 shmuel joined #mojo
12:39 eugen joined #mojo
12:41 cpan_mojo Mojolicious-Plugin-NetsPayment 0.03 by Jan Henning Thorsen - http://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-NetsPayment-0.03
12:43 ivan joined #mojo
12:56 babl joined #mojo
13:02 mire joined #mojo
13:09 eugen joined #mojo
13:09 perkar joined #mojo
13:10 shmuel joined #mojo
13:12 Feinorgh I have a mojolicious application deployed with hypnotoad, and I'm trying to use websockets to push updates to clients triggered from the server... but somewhere I need to keep track of all connected clients between the (preforked) hypnotoad processes... is there any workable examples or best practices regarding this?
13:13 Feinorgh or am I missing something fundamentally simple? :-)
13:15 sri you need some kind of message bus on the backend
13:15 sri redis pub/sub is commonly used for that
13:15 Feinorgh cool, Mojo::Redis looks promising then
13:16 * sri wonders how far the Mojo::Redis rewrite got
13:17 Feinorgh "Test suite is compatible with Mojolicious 5.0"
13:17 Feinorgh 0.9928
13:17 Feinorgh but maybe that doesn't say very much
13:17 Feinorgh i'll give it a go, thanks for the info
13:17 sri that was not a comment on the quality
13:18 Feinorgh there were problems with Mojo::Redis before?
13:18 asarch joined #mojo
13:18 sri batman was just planning to use more conventional exception handling
13:20 batman sri: i'm kind of burned out, so i'm doing as little as possible these days :(
13:20 batman Mojo::Redis rewrite take too much brain activity.
13:20 batman i've failed so many times trying to make sense of it.
13:20 batman the good thing is that i know more ways to _not_ do it :)
13:21 Feinorgh :-)
13:32 meshl joined #mojo
13:38 dexteruk joined #mojo
13:45 mire joined #mojo
13:51 TitanOfOld joined #mojo
13:52 gryphon joined #mojo
14:05 shmuel joined #mojo
14:13 cpan_mojo Mojolicious-Plugin-AssetPack 0.13 by Jan Henning Thorsen - http://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-AssetPack-0.13
14:29 Eke|| joined #mojo
14:51 shmuel joined #mojo
14:58 gryphon_ joined #mojo
14:59 mire joined #mojo
15:25 neyasov______ joined #mojo
15:26 Feinorgh hmm, Mojo::Redis seems to 'almost' work, i can listen to subscriptions according to the websocket example at https://metacpan.org/pod/Mojo::Redis, so when i publish something via redis-cli, it works just as intended
15:27 Feinorgh but i can't seem to publish anything, let alone get a working connection from inside Mojolicious, via Mojo::Redis->new
15:27 * sri wonders if charlie brady realizes that his hand waving only makes me want to get rid of Mojo::Server::CGI more
15:30 beyondcreed joined #mojo
15:36 * crab waves his hands wildly
15:36 * sri sets crab on fire
15:36 crab (let's see what i can convince you to get rid of that way ;-)
15:39 TitanOfOld So, I'm looking to submit metrics to Graphite. One of the metrics I'd like to send is render/request time. morbo prints out requests per seconds [200 OK (0.002597s. 385.060/s)]. Is that data available within the app?
15:43 crab are you sure that means what you think it means?
15:43 sri nope
15:43 crab (but anyway, it isn't)
15:43 sri i actually wanted to add some timing helpers for quite some time... but they always sucked
15:45 crab say, wasn't chronos a titan of old?
15:45 crab no, damn. that was cronus.
15:46 TitanOfOld lol
15:46 TitanOfOld Kronos maybe?
15:46 TitanOfOld Hmm, apparently it's an alternate spelling.
15:46 TitanOfOld Kronos = Cronus.
15:47 crab well, then i can't imagine anyone better to ask about timing things.
15:47 TitanOfOld lol
15:49 TitanOfOld Are hooks an appropriate place to attempt a timing?
15:56 Vandal joined #mojo
15:57 genio I realize it's mixing CPAN/yum, but as the RHEL world is so out-of-it when it comes to Perl anyway, why can't Charlie just install Plack::handler::CGI from the CPAN?
15:58 genio sticking with all yum packages is a nightmare in and of itself when it comes to Perl.  Install all the modules you need on a test server and build your own yum repo holding all the Perl modules you need
15:58 genio If you're not going to be in the sane world of Perlbrew, at least do RHEL/CentOS properly.
15:58 sri genio: charlie is also fighting for us to keep perl 5.10 support
15:58 purl okay, sri.
15:59 sri basically, he's fighting all change that's getting discussed on the list
15:59 TitanOfOld But 5.20 has so many cool things!
16:00 genio Perl 5.8 - EOL, 5.10 - EOL, 5.12 - EOL, 5.14 - EOL?  'nuff said.  Have a coke and a smile and shut the fuck up!
16:01 batman Feinorgh: that works like a charm. i'm guessing your Mojo::Redis object goes out of scope
16:01 batman Mojo::Redis->new->publish(foo => "bar"); # won't work
16:01 crab i wonder if it's selfish of me to not care about in-built CGI support
16:02 crab it sure makes life easier if you need it
16:06 sri crab: i think nobody on the core team actually uses CGI
16:06 sri we can keep tests passing, but real support is just not something we can provide
16:07 crab yes
16:07 crab i agree. i just feel vaguely guilty about it.
16:07 sri we just can't improve Mojo::Server::CGI, because those using it don't participate much in the community
16:07 crab it's better to be honest about what we do support and what we don't really
16:08 sri yea
16:08 sri the documentation actually advices against using it already
16:08 sri http://mojolicio.us/perldoc/Mojolicious/Guides/Cookbook#ApacheCGI
16:10 sri genio: at least we have two levels of support for perl versions now, so we don't have to fight with old workarounds that much anymore http://mojolicio.us/perldoc/Mojolicious/Guides/FAQ#Which_versions_of_Perl_are_supported_by_Mojolicious
16:11 sri stuff like the eval fixes in 5.14 (was it?)...
16:14 crab hmm, should that answer link to the legacy fork?
16:35 kvorg joined #mojo
16:35 dududude joined #mojo
16:35 jberger_ joined #mojo
16:35 batman joined #mojo
16:35 dotan_dimet joined #mojo
16:35 xantus joined #mojo
16:37 joelb joined #mojo
16:37 neyasov joined #mojo
16:40 neyasov______ joined #mojo
16:41 kvorg joined #mojo
16:41 neyasov joined #mojo
16:41 jberger_ joined #mojo
16:41 xantus joined #mojo
16:41 dududude joined #mojo
16:41 batman joined #mojo
16:41 joelb joined #mojo
16:41 dotan_dimet joined #mojo
16:55 batman joined #mojo
16:55 jberger_ joined #mojo
16:58 neyasov_______ joined #mojo
16:59 mire joined #mojo
17:00 jberger_ joined #mojo
17:00 batman joined #mojo
17:06 jberger_ joined #mojo
17:06 batman joined #mojo
17:58 neilhwatson joined #mojo
18:02 dexteruk_ joined #mojo
18:04 beyondcreed joined #mojo
18:05 bluescreen joined #mojo
18:07 batman am i here?
18:08 dexteruk joined #mojo
18:08 batman cool :)
18:08 batman convos is mojolicious 5.0 compat now
18:08 gryphon joined #mojo
18:15 cpan_mojo Convos 0.6 by Jan Henning Thorsen - http://metacpan.org/release/JHTHORSEN/Convos-0.6 (depends on Mojolicious)
18:19 mire joined #mojo
18:24 jberger__ joined #mojo
18:26 jberger__ batman++
18:27 batman too many breaking changes on 5.0 :(
18:27 batman s/on/in/
18:29 jberger__ What's funny is that I didn't need to require 5.0 to get any of my modules 5.0 compliant
18:30 batman i was using ->wait and ->render(partial => 1)
18:31 jberger__ Wait still exists, no?
18:32 jberger__ And I just used "include" rather than render_to_string
18:32 batman it does, but it doesn't return values from begin()
18:32 batman yeah, but render_to_string() is new
18:33 jberger__ oh, I didn't realize you relied on those return values, we asked if anyone did before removing them
18:33 jberger__ But include is old
18:34 batman include does not work. you need render_to_string() which was introduced in 5.0
18:35 batman render(include => 1) does not work ^
18:35 batman not sure if i would call 5.0 old...
18:36 sri batman: WAKE UP!
18:36 purl Huh? What...
18:37 sri at the very least you should have looked into my 5.0 thread https://groups.google.com/forum/#!topic/mojolicious/PYfjHyVj26w
18:37 sri then you would know about include
18:38 batman sri: i've known about render_to_string() since you released 5.0. anything else i should wake up for?
18:39 sri only the stuff in the thread came up so far
18:39 sri you may be the only one using wait return values :o
18:39 batman i don't get why i want to use wait() if it wasn't because of the return values.
18:39 batman i would just to $ioloop->start and ->stop instead
18:40 batman s/to/do/
18:40 meshl joined #mojo
18:40 sri doesn't work if you want portability
18:40 batman portability? from/to what?
18:40 sri if you use wait, stuff can work inside a mojolicious app and outside of it standalone
18:41 sri outside=no running event loop
18:41 batman right.
18:43 sri wait return values were really a bad idea
18:43 sri made wait much too complicated
18:43 batman i will get over it :)
18:44 batman looking forward to it
18:44 disputin joined #mojo
18:55 jberger__ Now now, no need to qwibble over it. batman is burned out for good reason, I give him a pass for at least a month
18:56 jberger__ We were talking about the include helper, not an include stash key
18:57 batman :/
19:01 sri jberger: and the crime rate in oslo will go through the roof!
19:02 sri next thing you know nosql bane will take over the city
19:03 sri "Consistency. Availability. Partition tolerance. These are the tools of your oppressors!"
19:03 cmcgarvey1 joined #mojo
19:05 dod joined #mojo
19:05 dod joined #mojo
19:18 KindOne joined #mojo
19:28 batman sri: haha
19:40 TitanOfOld And that's going into my quote book.
19:40 TitanOfOld "But sri said...."
19:40 disputin joined #mojo
19:42 mire joined #mojo
19:49 cfedde http://www.gutenberg.org/files/26184/page-images/26184-images.pdf
19:58 denis_boyun joined #mojo
20:31 meshl joined #mojo
20:31 dexteruk joined #mojo
20:41 dexteruk joined #mojo
20:50 disputin joined #mojo
21:00 gryphon joined #mojo
21:05 Eke- joined #mojo
21:23 gryphon joined #mojo
21:39 Eke- joined #mojo
21:47 dvinciguerra joined #mojo
21:48 disputin joined #mojo
22:00 Eke- joined #mojo
22:09 disputin joined #mojo
22:12 D4RK-PH0ENiX joined #mojo
22:26 disputin joined #mojo
22:31 punter joined #mojo
22:36 D4RK-PH0ENiX joined #mojo
23:12 basiliscos joined #mojo
23:13 jberger :-)
23:34 abhishekisnot strange, I have a simple app here https://github.com/abhishekisnot/mojo_test, which is deployed to http://shrouded-crag-1555.herokuapp.com/japanese -- problem is, how go I get correct japanese strings on that page
23:38 abhishekisnot brb
23:43 jberger abhishekisnot: it's the usual of course, you need to decode the slurped bytes
23:44 jberger pr coming (with Mojo::ByteStream goodness!)
23:47 jberger abhishekisnot: https://github.com/abhishekisnot/mojo_test/pull/1
23:49 * jberger is still here
23:50 * jberger is trying to keep his nordaaker doppleganger to stay gone
23:53 jberger sri: thoughts on a to_dom bytestream method?
23:54 jberger hmmm, I'm already second guessing, because of the xml semantics

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