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

IRC log for #mojo, 2016-05-11

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

All times shown according to UTC.

Time Nick Message
01:09 dvinciguerra joined #mojo
01:25 ivi joined #mojo
02:10 noganex joined #mojo
02:13 zivester joined #mojo
02:26 stephan48 joined #mojo
02:26 bd joined #mojo
02:26 crab_ joined #mojo
02:26 Zx3 joined #mojo
02:32 abracadaniel joined #mojo
02:33 mdom joined #mojo
02:56 frogz joined #mojo
03:02 asarch joined #mojo
04:08 inokenty-w joined #mojo
04:22 frogz joined #mojo
04:32 irqq joined #mojo
05:24 jberger kwa: is it the same app as the one that defines the job m
05:24 jberger ?
05:24 jberger In that case it is $job->app
05:33 frogz joined #mojo
05:35 dod joined #mojo
05:40 dod joined #mojo
05:43 frogz_ joined #mojo
05:54 cpan_mojo Mojolicious-Plugin-RoutesAuthDBI-0.442 by MCHE https://metacpan.org/release/MCHE/Mojolicious-Plugin-RoutesAuthDBI-0.442
06:04 dod joined #mojo
06:20 cpan_mojo Mojolicious-Plugin-RoutesAuthDBI-0.443 by MCHE https://metacpan.org/release/MCHE/Mojolicious-Plugin-RoutesAuthDBI-0.443
06:49 batman mgrimes: cool. does that mean "reloader" fixes your usecase?
06:56 frogz joined #mojo
07:06 osfabibisi joined #mojo
07:12 AndrewIsh joined #mojo
07:24 trone joined #mojo
07:47 Guest-quest joined #mojo
08:12 Vandal joined #mojo
08:24 kwa jberger: This is what I settled on - https://gist.github.com/kwakwaversal/c4a59332bda0da15e766e6b69b2bd1ce
08:25 kwa It's obvious now, but at the time I was trying things like $minion->app(MyApp->new);
08:26 kwa I have minion jobs related to a MyApp, but are enqueued outside of MyApp.
08:50 henq joined #mojo
09:14 jwang joined #mojo
09:20 henq joined #mojo
09:24 meshl joined #mojo
09:45 cpan_mojo Mojolicious-Che-0.001 by MCHE https://metacpan.org/release/MCHE/Mojolicious-Che-0.001
09:46 irqq joined #mojo
09:57 punter joined #mojo
10:20 n16gel joined #mojo
10:22 dave joined #mojo
10:39 Kripton joined #mojo
10:47 dvinciguerra joined #mojo
10:52 frogz joined #mojo
11:05 jwang joined #mojo
11:20 tchaves joined #mojo
11:40 cpan_mojo Mojolicious-Che-0.002 by MCHE https://metacpan.org/release/MCHE/Mojolicious-Che-0.002
11:42 meshl joined #mojo
11:56 kaare joined #mojo
12:32 Kripton joined #mojo
12:33 mgrimes batman: i'm still experimenting with reloader. i'm hoping i can replace my entire workflow w/ AssetPack and Reloader.
12:36 cpan_mojo Mojolicious-Che-0.003 by MCHE https://metacpan.org/release/MCHE/Mojolicious-Che-0.003
12:38 perlpilot joined #mojo
12:41 irqq_ joined #mojo
12:49 irqq_ joined #mojo
12:55 ramortegui joined #mojo
12:56 Atog joined #mojo
12:57 irqq_ joined #mojo
12:58 zivester joined #mojo
13:01 Lee_ joined #mojo
13:10 gtodd joined #mojo
13:16 gtodd why do the synopsis examples in Mojo::Pg  show code tat uses  "say" to spit the results of a query to STDOUT instead of rendering it to a page?  do people use Mojo::Pg that way?  It would be neat if there was a way to make "say" / "print" just render what would be console output to web browser ...
13:16 batman mgrimes: cool! let me know if/when you have any feedback
13:17 batman gtodd: that's because Mojo::Pg can be used without any web app
13:17 gtodd ok ... I was doing that but thought I was being silly :)
13:17 jberger kwa: so yes that will work (probably, depending on how you load config etc)
13:17 gtodd then I noticed the docs
13:18 jberger I'm a little curious as to why you define the task in a separate app?
13:18 irqq joined #mojo
13:19 gtodd hmm it would be neat to be able to use "render" (another name for it might be better) as a "function" like print / say / printf
13:21 jberger gtodd: Mojo::Pg can and does get used outside of a web context all the time
13:22 jberger For example, even in a webapp your model shouldn't know about rendering
13:22 jberger That's the controller's job
13:25 batman gtodd: you have $db->query(...)->text;
13:25 kwa jberger: The app is a monolith, and doesn't directly communicate with with inion. Other jobs (importing messages, sending APNS') are created outside of this monolith app, but require some of the information from within.
13:25 gtodd batman: right
13:25 batman just add print infront of that
13:27 jberger kwa: So it is just separation of concerns. I guess that works, but probably isn't necessary
13:27 gtodd batman: now that I think of it ... it is better to stay in that kind of object->method "pattern"  when using a webpage as a text "console"
13:27 batman gtodd: is that a question? if so, i don't understand it :(
13:28 gtodd nah just me talking to myself :)
13:28 kwa jberger: I read in the docs to use the ::Task namespace and using pluginc, but I didn't want to load the plugin tasks in on ->startup().
13:28 irqq_ joined #mojo
13:28 batman gtodd :)
13:29 kwa (Some of them connect to things like Oracle that I don't want to be part of a loaded worker.)
13:29 kwa jberger: Unless I'm missing something?
13:30 kwa load_task_plugin if $c->mode eq 'minion'?
13:31 dvinciguerra joined #mojo
13:32 jberger kwa: That world work
13:32 gtodd batman:  I was using the synopsis docs to write quick command line scripts practically verbatim:    say "$_->{year} yield was $_->{mean_yld}" for $db->query('select * from bckwht')->hashes->each  ... but time passed and I thought it was my idea to put "say" in there :)
13:32 jberger kwa: It really is up to you
13:32 jberger I was just curious
13:33 kwa jberger: I was open to ideas to be honest. I just thought I was missing something, and wondered what the canonical way of using $minion with a $mojo app.
13:33 jberger The canonical way to use it would be to only have one app
13:33 jberger But
13:34 gtodd when you check docs and find that a script came from the perl "hive mind" and not your own hackish errors it's a funny feeling
13:34 jberger Application embedding is totally allowed
13:34 jberger http://mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#Application-embedding
13:34 jberger gtodd++
13:42 kwa jberger: I looked at that, but it didn't DWIM. How would the first example be used with Minion? $minion = Minion->new(), $minion->add_task(), then $app->start to start the loop?
13:43 * kwa scratches his head
13:46 jberger kwa: It is basically what you already had
13:46 irqq_ joined #mojo
13:46 jberger You have a separate container app
13:46 jberger It loads minion and instantiates the embedded app
13:48 kwa Ah right. The container app (MyApp) isn't using minion directly, so wasn't playing ball.
13:49 kwa I also wasn't sure on how to actually start a worker with the embedded app method.
13:50 kwa jberger: It's cool though. The way I've settled on works. I wanted to make an effort to do things properly. Cheers for your feedback.
13:57 frogz joined #mojo
14:05 Guest-quest joined #mojo
14:08 henq joined #mojo
14:09 cpan_mojo Mojolicious-Plugin-RoutesAuthDBI-0.444 by MCHE https://metacpan.org/release/MCHE/Mojolicious-Plugin-RoutesAuthDBI-0.444
14:09 irqq joined #mojo
14:12 punter joined #mojo
14:16 dod joined #mojo
14:17 mgrimes batman: i think i found a bug in Reloader. it seems to be watching the cached sass (ie, assets/cache/screen-037639087b.css) but not its _immediate_ source (screen.sass).
14:17 mgrimes i can't quite track down a fix, but i filed a pr with a failing test.
14:18 Adura joined #mojo
14:42 osfabibisi joined #mojo
14:48 Atog joined #mojo
14:52 zivester joined #mojo
15:10 n16gel joined #mojo
15:16 mcsnolte joined #mojo
15:25 jberger is this guy looking for M::P::SetUserGroup? https://github.com/kraih/mojo/issues/957
15:25 jberger I'm going to assume so
15:26 jberger though the "websocket worker" thing has be a bit confused
15:26 jberger but if maybe he is only working in a websocket application perhaps?
15:27 frogz joined #mojo
15:41 henq joined #mojo
15:46 meshl joined #mojo
16:15 mgrimes_ joined #mojo
16:25 n16gel joined #mojo
16:50 coolo http://thecodinglove.com/post/144195259106/when-the-manager-is-looking-for-a-volunteer-to - they think perl 5.8 I bet
16:55 preaction eh. perl is the butt of a certain class of programmer joke. like java and visual basic
17:16 henq joined #mojo
17:17 autarch left #mojo
17:25 dod joined #mojo
17:30 irqq_ joined #mojo
17:31 PryMar56 joined #mojo
17:34 noganex joined #mojo
17:49 bpmedley So!  I just did a 'mojo get' with CSS selectors that retrieves the img src which is base64 coded and then decoded the img via CLI..
17:49 bpmedley \o/
17:57 henq joined #mojo
18:07 n16gel joined #mojo
18:32 irqq_ joined #mojo
18:36 jberger I really need a Task::BeLike::JBERGER
18:37 bpmedley Fails test human
18:37 jberger sudo apt-get autoremove bpmedley
18:37 jberger :P
18:38 pink_mist the new voight-kampff test?
18:56 haarg i have a Task::BeLike::HAARG that i just keep locally.  kind of pointless to publish it.
18:58 henq joined #mojo
19:07 HtbaaPi joined #mojo
19:26 ramortegui joined #mojo
19:57 punter joined #mojo
20:08 orev I'm dynamically rendering an image and it looks like firefox is requesting it multiple times per reload.  anyone seen this or have any ideas on what's going on?
20:10 orev hmm, only seems to happen if I have the image loaded by itself as "view image".  in the html page it only loads once
20:10 jberger orev: some browsers will preload
20:11 Grinnz_ GET requests are fair game for prefetching, multiple requests, etc
20:11 Grinnz_ as far as browsers are concerned
20:12 orev hmm, possibly coming from the favicon request
20:13 orev kind of concerning for a captcha image...
20:14 Grinnz_ i think captcha is often requested by a javascript widget
20:14 orev I'm generating the image myself with gd::securityimage
20:21 ZoffixMobile joined #mojo
21:11 meshl joined #mojo
21:53 mishanti1 To give Mojolicious 6.x and Mojo::Pg a spin I wrote a simple bank reconciliation web frontend complete with parsing of bank statements, buttons and whatnot that does things etc.
21:54 mishanti1 Conclusion: Mojo 6.x rocks, and Mojo::Pg is super-fun to use.
21:54 mishanti1 sri++
21:54 mishanti1 Though that goes for all of you who contribute. Much appreciated!
21:58 jberger mishanti1: glad you like it
21:59 jberger I'll forward the note to sri, who isn't on the channel atm
21:59 bpmedley mishanti1++ # is that open source?
22:00 mishanti1 jberger: Thanks. :) Mojolicious is a real pleasure to use. Especially loving how terse and tidy you can get code that uses mojo-components.
22:01 jberger bpmedley: mishanti1 probably can't open source that, I imagine technically that is probably against his bank's terms of service
22:02 jberger but fun for personal use still :-P
22:07 mishanti1 bpmedley: Not open source at the moment. Just wrote this in a hurry because I needed a tool to do this as a "one-off" tonight.
22:07 mishanti1 Needed to plow through some statements before a meeting with an accountant tomorrow.
22:08 mishanti1 jberger: Actually, I do not think my bank would mind. Also; if they did mind, I would love to see them try to get at me with any legal action.
22:08 mishanti1 Consumers here in Norway have a silly amount of protection from lawsuits.
22:09 mishanti1 O, so that was factually incorrect: anyone can be sued for anything at any time, but there is a high threshold for a consumer to be found liable for stuff.
23:43 iamb joined #mojo

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