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

IRC log for #mojo, 2015-12-08

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

All times shown according to UTC.

Time Nick Message
00:04 odc joined #mojo
00:07 jberger The shower's dead Jim. Died an unexpected death during a routine surgery. Its tough, but yah gotta let it go
00:08 sri :O
00:11 jberger Dammit Jim I'm a physicist, not a plumber!
00:12 disputin joined #mojo
00:33 punter joined #mojo
00:37 voldemortensen joined #mojo
00:45 phillipadsmith joined #mojo
00:48 harleypig joined #mojo
01:02 disputin joined #mojo
01:13 Foxcool joined #mojo
01:25 stuart joined #mojo
01:26 Zoffix joined #mojo
01:29 aborazmeh joined #mojo
01:32 disputin joined #mojo
01:39 hummeleBop joined #mojo
01:49 asarch joined #mojo
02:01 jontaylor joined #mojo
02:20 jontaylor joined #mojo
02:54 sri wait, anyone know what happened in #catalyst? http://blogs.perl.org/users/peter_rabbitson/2015/12/suspending-efforts-on-my-riba2016-crowdfunding-campaign-looking-forward-to-my-own-xmas.html#comment-1629116
02:56 mattp sri: actually just greppded my log to see the same
02:57 sri my log doesn't go that far
03:03 noganex joined #mojo
03:05 disputin joined #mojo
03:06 jberger hunh
03:07 genio Well, that made me kind of sad to read
03:07 disputin joined #mojo
03:26 jontaylor joined #mojo
03:28 * sri always liked jnap
03:28 sri if anyone sees him, invite him here :)
03:29 sri looks like he's not on irc
03:31 mattp this is one of the last active notcrappy perl projects. what else is there?
03:32 mattp should clarify, I mean large projects that is actively moving with development. I guess dancer too
03:33 kaare joined #mojo
03:38 genio I guess I should keep up my attempts at assisting with module maintenance even though I'm not doing very swimmingly at getting any changes through yet
03:39 disputin joined #mojo
03:39 disputin joined #mojo
04:11 sri well, right now development has come to a halt because of jberger's broken shower ;p
04:12 jberger hahahaha
04:12 jberger I'm not the only one that can work on transport abstraction :p
04:12 jberger and yes sadly I'm still working because I spent too much of my day making my shower go from leaky to dead
04:12 Grinnz because it was actually jberger's shower that was working on it?
04:12 jberger Grinnz: maybe that's why it was leaky :s
04:15 inokenty-w joined #mojo
05:21 preaction my projects aren't crappy! :'(
05:27 jontaylor joined #mojo
05:29 jlzhang joined #mojo
05:44 jlzhang I have 3 subs in Mojo::IOLoop::Delay->setps(), I want to $c->render and jump steps in sub2 if some variable is true.
05:44 jlzhang Whether direct rendering can?
06:25 kes joined #mojo
06:41 Vandal joined #mojo
08:04 disputin joined #mojo
08:05 disputin joined #mojo
08:07 tempire joined #mojo
08:17 AndrewIsh joined #mojo
08:23 Andreas joined #mojo
08:24 osfabibisi joined #mojo
08:29 jontaylor joined #mojo
08:43 berov joined #mojo
08:58 jontaylor joined #mojo
09:02 eseyman joined #mojo
09:07 disputin joined #mojo
09:07 disputin joined #mojo
09:09 trone joined #mojo
09:11 vanHoesel joined #mojo
09:24 * nic is searching the Devel:: namespace for modules that might help with debugging a leaky shower
09:33 stephan48 this should be documented in changelog: "2 week coding freeze - shower broke down"
09:34 theo joined #mojo
09:37 CHYC joined #mojo
09:38 * ashimema predicts a tilt coming on for a 'fix jbergers shower' fund ;)
09:53 Averna joined #mojo
10:11 sugar_ joined #mojo
10:38 eitz joined #mojo
10:53 dvinciguerra joined #mojo
11:02 juikuen joined #mojo
11:09 disputin joined #mojo
11:10 disputin joined #mojo
12:00 asarch joined #mojo
12:11 neilhwatson joined #mojo
12:22 punter joined #mojo
12:45 sue joined #mojo
13:04 disputin joined #mojo
13:04 disputin joined #mojo
13:09 sue_ joined #mojo
13:23 sue_ joined #mojo
13:31 orev joined #mojo
13:51 kaare joined #mojo
14:05 disputin joined #mojo
14:06 disputin joined #mojo
14:13 ribasushi mattp: as I said in #dbix-class - I do not agree that an eventual departure of mine will "kill" dbic, or slow thing down
14:13 ribasushi (repeating for the sake of the public logrecord ;)
14:18 coolo 
14:18 coolo sorry
14:43 sue joined #mojo
14:49 absolut__ joined #mojo
14:52 cpan_mojo CallBackery-0.3.3 by OETIKER https://metacpan.org/release/OETIKER/CallBackery-0.3.3
14:55 good_news_everyon joined #mojo
14:55 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vRy43
14:55 good_news_everyon mojo/master 1f160ca Sebastian Riedel: WebSocket compression is now RFC 7692
14:55 good_news_everyon left #mojo
15:07 disputin joined #mojo
15:08 disputin joined #mojo
15:10 voldemortensen joined #mojo
15:10 disputin joined #mojo
15:10 disputin joined #mojo
15:14 jberger http://imgur.com/qhT0Qw7
15:16 dvinciguerra joined #mojo
15:24 disputin joined #mojo
15:27 gryphon joined #mojo
15:27 theo joined #mojo
15:31 cpan_mojo CallBackery-0.3.4 by OETIKER https://metacpan.org/release/OETIKER/CallBackery-0.3.4
16:10 melo1 joined #mojo
16:19 jberger so this is a thing I'm working on for $work https://github.com/jberger/Minion-Notifier
16:20 jberger very rough
16:20 jberger but somewhat functional
16:20 jberger its basically half of a full multi-job management system
16:20 jberger but I needed this half sooner
16:23 kaare joined #mojo
16:24 sri seems reasonable
16:25 jjohn jberger, nice. I was building a job queue mechanism too.
16:25 jjohn It is not as generic as yours.
16:26 jberger so my major question is "should it wait for next_tick here: https://github.com/jberger/Minion-Notifier/blob/master/lib/Minion/Notifier.pm#L28
16:27 jberger "
16:27 jberger the darn thing is hard enough to test as it is, and I have no idea how to test it with a preforking worker
16:28 sri you only wait with next_tick if a callback could be invoked right away otherwise
16:28 disputin joined #mojo
16:29 jberger no, so as to wait for the (server) workers to be forked
16:29 sri like, you don't want Mojo::IOLoop->timer(0 => sub {...}) to run before the method returns
16:29 jberger I don't think that's a problem here
16:49 jberger sri: so you don't think its a problem if the app subscribes to listen notifications before the server workers fork?
16:50 jberger (I really need to figure out how to test that)
16:50 sri dunno
16:50 jberger (I guess I can just do it manually for now)
17:05 lluad joined #mojo
17:16 osfabibisi joined #mojo
17:37 sri jberger: what do you even mean with prefork worker?
17:38 jberger at this point I've convinced myself that that logic should go in the plugin anyway
17:38 sri prefork doesn't make any sense in this context
17:39 jberger but I mean that when starting up the application as a webserver, I want to listen for notifications
17:39 jberger (which is why that should go in the plugin)
18:15 jontaylor joined #mojo
18:20 sue joined #mojo
18:34 disputin joined #mojo
18:45 voldemortensen joined #mojo
19:36 voldemortensen joined #mojo
19:38 bpmedley joined #mojo
19:39 sue joined #mojo
20:13 abra joined #mojo
20:22 tempire joined #mojo
20:32 sri for the record, the fork maintainer did not contact us https://github.com/daoswald/JSON-Tiny/pull/2#issuecomment-162324610
20:33 sri re finding out what would happen
20:33 jberger :s
20:33 jberger davido used to hang out here
20:33 * sri will try to be more aggressive regarding forks in the future
20:34 jberger I met him at yapc::na this year, very nice guy
20:34 sue joined #mojo
20:37 sri yea, even well meaning fork maintainers will inevitably harm the project
20:40 jberger regarding forks, I really think we need more public education
20:41 jberger installing Mojo in order to use just a component is still an option in the wider perl community
20:41 jberger is still NOT an option
20:42 jberger they don't understand
20:51 * sri didn't realize that mongodb got joins
20:52 sri they only added it to the commercial version :o
20:52 preaction there's also the foreign data wrapper thing to proxy mongo through postgres
20:52 theo joined #mojo
20:53 jberger yo dawg, I heard you like document stores ...
20:54 jberger for Minion::Notifier I've implemented a websocket transport layer (using Mercury and Minion::SQLite as test dependencies) and a lot of the other things are starting to get nicer
20:55 preaction hooray! i'm useful! https://www.youtube.com/watch?v=S65ZzffW-Cw
20:56 jberger preaction++
20:56 jberger preaction: https://github.com/jberger/Minion-Notifier/blob/master/t/websocket.t
20:58 melo joined #mojo
21:03 jberger I wonder if we generally consider route names to be public api?
21:04 absolut_todd joined #mojo
21:04 jberger if I make an instance of Mercury, should I do $mercury->url_for(bus => topic => 'jobs') ?
21:11 preaction if that worked, that'd be nice. is there a way i can make that work?
21:14 sri perl -Mojo -E 'my $app = Mojolicious->new; $app->routes->get("/just/:foo" => "bar"); say $app->url_for("bar", foo => "works")'
21:17 jberger sri: I know it works, the question is should it be something we consider public api in our apps
21:18 preaction if people are building templates, and need to use url_for() in them, likely yes
21:18 sri i don't know what that means
21:18 PryMar56 joined #mojo
21:21 jberger preaction: good point
21:21 jberger sri: imagine designing a theme template for galileo, you'd need to use the route names
21:23 sri that's a very old problem
21:23 sri you have to decide how much power you want to give users
21:24 sri and pick the appropriate template system
21:25 Grinnz_ interesting setup Pivotal settled on to turn its frequent polling into infrequent polling + push for updates http://www.pivotaltracker.com/community/tracker-blog/one-weird-trick-to-switch-from-polling-to-push
21:25 sri like, you wouldn't expose url_for with mustache templates
21:26 disputin joined #mojo
21:26 Grinnz_ they wanted to keep their auth in Rails so they use Redis pubsub to communicate with it, and do the websocket server in Go
21:26 Grinnz_ node.js was "unable to meet [their] performance requirements"
21:28 melo joined #mojo
21:37 sri hackernews is so sketchy these days
21:37 sri did y combinator invest in mongodb?
21:37 jberger sri / preaction it turns out in this case it doesn't help anything to use the route name
21:38 sri mongodb critical stuff seems to be censored out
21:43 harleypig I'm new to both the Model/Controller/View model and Mojolicious. I want to make sure I understand what is I'm trying to do. I'm experimenting with setting up the authentication part of my app. The lib/MyApp/Controller directory holds code that takes a request (https://my.app.com/path/called) and runs sub path_called which access codes in
21:43 harleypig lib/MyApp/Model/Auth.pm. Do I have this break down correct?
21:44 sri http://mojolicio.us/perldoc/Mojolicious/Guides/Growing
21:45 sri there's also an mvc example app, without auth though https://github.com/kraih/mojo-pg/tree/master/examples/blog
21:47 harleypig I'll take a look at the example app. I've gone through the Growing guide ... I'm just not sure I understand the division of code correctly.
21:48 sri the model api is usually as generic as possible
21:48 sri so not tied to anything mojolicious
21:49 sri the controller glues everything together
21:49 harleypig So, the code that does the actual token generation and validation should go in lib/MyApp/Model/Auth.pm and the methods there should be called from lib/MyApp/Controller/Auth.pm (though, naming the modules the same thing bothers me).
21:49 sri and you want as little code as possible in templates and controllers
21:50 harleypig Right ... templates is manipulation of displayed data at most.
21:52 sri you can also abstract out code into helpers, if something doesn't fit in anywhere else
21:53 sri http://mojolicio.us/perldoc/Mojolicious/Guides/Cookbook#Adding-a-plugin-to-your-application
21:55 lluad joined #mojo
21:55 harleypig Yeah, I read that too ... I think I understand that. A simplistic way to describe that would be creating a method that is inlined (I realize that's not exactly it and I'll pick up the nuances as I go).
21:55 sri that's pretty much it
21:56 sri in the end you'll have to decide case by case where something fits in best
21:56 harleypig :] Yeah, that's  usually the way it goes.
21:57 sri like, managing credentials sounds like model, generating tokens like a helper
21:57 harleypig Even though the only time a token is generated is on authentication?
21:58 sri well, you have to verify the token i imagine, and deal with the session?
21:59 harleypig Right, but that is happening in an 'under' routine, so all routes are calling the same method.
21:59 sri so, it sounds like maybe a few helpers that mediate between the session and a model where the credentials are stored
22:00 sri if you want to go all out with clean abstraction :)
22:01 harleypig Ah ... so manually pulling the token from the header ( via $c->req->headers->header ) isn't the best way to do that. I guess I need to read up some more on sessions.
22:02 melo joined #mojo
22:07 jb360 joined #mojo
22:08 harleypig looking at the example you linked, the main module uses Blog::Model::Posts, but not Blog::Controller::Posts and $r->get('/posts')->to('posts#index'); calls Blog::Controller::Posts::index if I'm understanding the documentation correctly. The methods in B::M::Posts are available to B::C::Posts it looks like. Am I understanding this correctly? So my app would
22:08 harleypig 'use MyApp::Model::Auth'  but $r->get('/login')->to('auth#login') would call MyApp::Controller::login, which would call MyApp::Model::Auth::login? (Yes, this is simplistic.)
22:09 harleypig err, I mean ... M::C::login would have a call something like my $token = $self->auth->validate_login( ... )
22:10 harleypig s/M::C::login/M::C::Auth::login/
22:12 harleypig Thanks. I appreciate your taking the time to answer my newbie questions.
22:12 sri the model is exposed to the controller through a helper
22:13 sri https://github.com/kraih/mojo-pg/blob/master/examples/blog/lib/Blog.pm#L16-L17
22:13 sri https://github.com/kraih/mojo-pg/blob/master/examples/blog/lib/Blog/Controller/Posts.pm#L18
22:14 sri mojolicious does not care at all about the model, you make all the connections
22:15 sri only controller are loaded automatically
22:15 sri +s
22:16 melo joined #mojo
22:16 sri the model is really an arbitrary concept for mojolicious, the framework doesn't know anything about it, and you could just as well call it MyApp::Foo::Bar
22:19 voldemortensen joined #mojo
22:22 harleypig Ah! That was what I was missing. The helper you referred to I mean.
22:28 melo1 joined #mojo
22:43 tempire_ joined #mojo
22:44 tempire joined #mojo
22:57 crux joined #mojo
23:03 disputin joined #mojo
23:14 HtbaaPi joined #mojo
23:30 d4rkie joined #mojo
23:31 d4rkie joined #mojo
23:32 D4RK-PH0ENiX joined #mojo
23:32 sue joined #mojo
23:33 d4rkie joined #mojo
23:37 D4RK-PH0ENiX joined #mojo
23:39 Zoffix joined #mojo

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