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

IRC log for #mojo, 2016-05-23

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

All times shown according to UTC.

Time Nick Message
00:15 janus joined #mojo
00:28 disputin joined #mojo
01:06 bpmedley https://github.com/kraih/minion/compare/master...brianmed:elected_recurring <-- This may be more agreeable for recurring
01:09 mrEriksson joined #mojo
01:44 Kripton joined #mojo
02:17 disputin joined #mojo
02:18 zivester_ joined #mojo
02:19 zivester_ joined #mojo
02:51 indianowl joined #mojo
02:52 jberger HODOR
02:54 noganex_ joined #mojo
02:55 indianowl Hi all ... I am trying to develop an aap in mojo ... Seen all screen cast ... Just wanted to check do we have any simple tutorial in and out for mojo?
02:56 indianowl or any book or course on udemy?
02:56 jberger In and out?
02:57 jberger The recommended way to learn is the tutorial and the guides
02:57 jberger http://mojolicious.org/perldoc#TUTORIAL
02:57 indianowl ok
02:59 jberger There are also some examples in several of the repos
03:00 indianowl great if u can share the link
03:05 zivester joined #mojo
03:11 jberger What kind of application are you writing?
03:12 jberger Mojo::Pg 's repo has a blog example and a chat example
03:12 jberger Mojo::Redis2 's has a chat example
03:15 jberger But i highly recommend carefully reading the tutorial and guides
03:21 indianowl thank you jberger
03:21 indianowl I am trying to write simple web application
03:22 indianowl to try my hand on mojo ...
04:15 mcsnolte joined #mojo
04:45 inokenty-w joined #mojo
05:19 damaya joined #mojo
05:19 damaya I am wondering how hypnotoad works. If I have 1000 people all hit the web server at one time, will Hypnotoad handle all the requests in parallel?
05:50 dod joined #mojo
05:55 dod joined #mojo
06:15 dod joined #mojo
06:37 punter joined #mojo
06:56 batman Dandre: depends on how many forks you have and if the app is non-blocking
06:57 batman if the app is blocking then n parallell requests = n workers
06:57 batman if it's non-blocking, then the answer is probably yes, but it depends on the hypnotoad settings
07:26 trone joined #mojo
07:27 AndrewIsh joined #mojo
08:12 Vandal joined #mojo
08:37 abra joined #mojo
09:14 mpapec it would be cool to see all current hypnotoad config params
09:14 mpapec for working server (either in log or wherever)
09:55 cpan_mojo Mojolicious-Plugin-RenderCGI-0.01 by MCHE https://metacpan.org/release/MCHE/Mojolicious-Plugin-RenderCGI-0.01
10:35 punter joined #mojo
10:41 cpan_mojo Mojolicious-Plugin-DebugDumperHelper-0.03 by LDIDRY https://metacpan.org/release/LDIDRY/Mojolicious-Plugin-DebugDumperHelper-0.03
10:49 dvinciguerra_ joined #mojo
10:51 cpan_mojo Mojolicious-Plugin-RenderCGI-0.02 by MCHE https://metacpan.org/release/MCHE/Mojolicious-Plugin-RenderCGI-0.02
11:02 kaare joined #mojo
11:33 tchaves joined #mojo
11:37 Kripton joined #mojo
11:39 tchaves joined #mojo
12:05 ivi joined #mojo
12:27 * Lee screams internally
12:30 dvinciguerra__ joined #mojo
12:55 cpan_mojo Mojolicious-Plugin-RoutesAuthDBI-0.446 by MCHE https://metacpan.org/release/MCHE/Mojolicious-Plugin-RoutesAuthDBI-0.446
12:57 zivester joined #mojo
13:00 gizmomathboy joined #mojo
13:04 cpan_mojo Mojolicious-Plugin-RoutesAuthDBI-0.447 by MCHE https://metacpan.org/release/MCHE/Mojolicious-Plugin-RoutesAuthDBI-0.447
13:16 osfabibisi joined #mojo
13:39 bwf joined #mojo
13:53 Kripton joined #mojo
13:57 Kripton joined #mojo
14:09 Guest-quest joined #mojo
14:11 mcsnolte joined #mojo
14:23 itaipu joined #mojo
15:05 zivester joined #mojo
15:08 dod joined #mojo
15:13 Zoffix joined #mojo
15:14 Zoffix I seem to be having the same caching issues I used to have last year: changing my sass file doesn't trigger the update. I have to manually delete assets/cached :S
15:16 Zoffix Hm... never mind. Telling morbo to watch the assets dir and restart the app on each change fixes the issue.
15:23 dhg joined #mojo
15:23 dod1 joined #mojo
15:38 dod joined #mojo
15:48 * sri yawns
15:56 jberger sri: I've been learning about RAFT now too
16:02 Nei joined #mojo
16:03 Nei hi, beginner question, how to best formulate "if/then/else" with IOLoop::Delay? if and else branch introduce a number of steps
16:03 PryMar56 joined #mojo
16:12 dantti_laptop joined #mojo
16:28 disputin joined #mojo
16:34 odc joined #mojo
16:36 jberger batman, is it possible that you changed how swagger interprets repeated query parameters?
16:40 batman jberger: can we talk in #swagger ?
16:40 bpmedley https://github.com/kraih/minion/compare/master...brianmed:elected_recurring  <-- anyone have time for perusal?
16:58 bpmedley I realize i have a glaring bug in my code.. I'll try and fix later..
16:59 bpmedley Sorry for bothering y'all, i just thought of the bug a few seconds ago..
16:59 jberger bpmedley: how are you doing leader election?
17:00 jberger I've been reading about it all weekend, it doesn't seem like an easy thing
17:02 bpmedley jberger: A SQL table that can only have one row
17:02 lluad joined #mojo
17:03 jberger and what if the leader goes away?
17:03 jberger how do they initiate a new election?
17:04 bpmedley My assumption for that is the workers were on the same box.. Eep.. Bad.  So, something else is required.
17:05 jberger and network partitions are possible too
17:05 bpmedley I think i'll add a heartbeat for the leader.
17:05 jberger this is a non-trivial problem
17:05 jberger its why I've been reading about Paxos and RAFT all weekend
17:05 jberger https://www.youtube.com/watch?v=YbZ3zDzDnrw
17:06 bpmedley Thx for the references, i'll read, as well
17:06 dhg joined #mojo
17:11 jberger this thing is fun to play with too
17:11 jberger https://raft.github.io/
17:12 jberger it is fun trying to engineer an election to fail
17:14 abra_ joined #mojo
17:22 sri jberger: isn't raft/paxos pointless if you have a single point of failure anyway?
17:23 sri like a postgres database
17:59 jberger might be
17:59 jberger I've been trying to learn the general case so that I can know what questions to ask
18:14 dantti_laptop joined #mojo
19:01 dod1 joined #mojo
19:45 disputin joined #mojo
20:01 marty joined #mojo
20:13 marty joined #mojo
20:24 thowe_work My sales manager really likes the MRR/churn tool I wrote in Mojo.  He said "this is fantastic".  So, we're officially using Mojolicious.  =]  I feel like I should at us to some kind of list of companies using Mojo.
20:24 thowe_work s/at/add/
20:25 sri https://github.com/kraih/mojo/wiki/Projects-and-Companies-Using-Mojolicious#companies
20:26 thowe_work Oh, cool...  So just fork and send pull request?
20:26 sri it's a wiki
20:26 thowe_work Ah...  OK.
20:27 thowe_work yeah, the edit link sort of gives it away...
20:27 sri :)
20:27 thowe_work Perldoc even(?)
20:28 sri mixed formats
20:28 sri some pages are pod, others markdown
20:28 thowe_work yeah, I meant POD
20:33 thowe_work there.  We're on the list.  I should really get cracking on MoPieNg so I can add it.
20:37 jberger thowe_work: \o/
20:37 dantti_laptop|2 joined #mojo
20:37 thowe_work Javascript is a pain in the ass to troubleshoot.
20:38 sri \o/
20:39 thowe_work \o/
20:39 thowe_work He said it was awesome, and I'
20:39 thowe_work and I'm like "Thanks, I hope it helps" and he's like "No, you don't understand, this is really fantastic."
20:40 preaction you're the man now, dog!
20:41 thowe_work I assure you, there is no world in which I am "the man" in that sense, but I'm glad this was well received after working on it for two days.
20:42 thowe_work Now when I want to be left alone because I'm working on something they will maybe understand that helpful things may result if I am given the time.
20:43 thowe_work Oh, dude, preaction, you're reminding me...  I need to mark up my YAPC calendar.  I seem to recall you are giving a talk I wanted to see.
20:43 preaction that can't be true
20:43 thowe_work No?  Maybe I have you confused...
20:43 punter joined #mojo
20:43 preaction i am giving a couple talks at yapc, that bit's true
20:44 thowe_work Oh.  Then I do think there was one I intended to be at...
20:45 thowe_work I seem to recall thinking, "oh that's the guy that was helping me not be stupid the other day."
20:45 preaction okay, that's definitely not me then ;)
20:46 thowe_work well, it's not "the other day" now, but it was then...
20:47 thowe_work actually, both of yours look good, but it was Rex I was thinking of.
20:53 abra joined #mojo
20:55 dvinciguerra__ joined #mojo
21:02 bpmedley thowe_work++
21:03 thowe_work bpmedley, Hi!
21:03 bpmedley Morning
21:04 thowe_work Have you figured out if you are going to YAPC yet?
21:04 bpmedley Not this year
21:04 thowe_work Oh.  Well, I still owe you that beer.
21:10 thowe_work bpmedley, What country are you in?
21:10 bpmedley US / North Carolina
21:11 thowe_work Oh.  Well, you said "Morning"..
21:11 bpmedley It's always Morning.. ;)
21:30 disputin joined #mojo
21:51 craftsmanship joined #mojo
21:52 craftsmanship Do I want under for "dude has to be logged in" type logic?
21:52 Grinnz_ sure, that's a common way to do it
21:52 bpmedley craftsmanship: that's one thing I use it for
21:52 Grinnz_ just make sure all of the routes you want it to apply to are "under" that one
21:53 craftsmanship do I use that even if I don't want it to correspond to a public url?
21:53 jberger craftsmanship: not sure what you mean by that
21:55 craftsmanship under seems to involve path fragment of some sort
21:55 bpmedley craftsmanship: Do you need an example?
21:55 Grinnz_ the path fragment can be '/', or in other words, the same as the parent
21:55 craftsmanship There is one in the docs
21:56 craftsmanship so, how do i mark routes as in need of auth if everything is under / ?
21:56 Grinnz_ put the ones in need of auth under the one you declared that "under" for, and the ones that don't outside it
21:56 bpmedley craftsmanship: What type of app?  Lite or Full?
21:56 craftsmanship Full.
21:57 craftsmanship Grinnz_: that means that i'll have some kind of "/admin..." in my urls, no?
21:57 Grinnz_ ->under returns a route object, this is what you use to declare routes under it
21:57 Grinnz_ no, I'm talking about just the objects, not the paths
21:58 dvinciguerra joined #mojo
21:59 Grinnz_ we have in our app something like my $authed = $r->under('/')->to(... auth function...); my $unauthed = $r->any('/'); (that any is actually kind of pointless, in the actual code there's other paths there, but maybe you get the idea)
21:59 craftsmanship You lost me.
21:59 Grinnz_ then you can have $authed->get('/foobar')->... and $unauted->get('/barbaz')->...
21:59 bpmedley craftsmanship: https://github.com/brianmed/InfoServant-Feeds/blob/master/docroot/info_servant/lib/InfoServant.pm#L91
22:00 bpmedley ^^ That's a little old and will need specific returns added.  Let me do that real quick.
22:00 craftsmanship so, both authed and unauthed share the same url-space?
22:01 Grinnz_ yes, routing will match in order of declaration
22:02 bpmedley craftsmanship: I updated the code..
22:03 sri http://mojolicious.org/perldoc/Mojolicious/Guides/Routing#Nested-routes
22:03 sri http://mojolicious.org/perldoc/Mojolicious/Guides/Routing#Under
22:04 craftsmanship We've already covered the "read teh docs" part
22:05 craftsmanship surprisingly an X-Bender header is not quite as helpful as even a tiny bit of code that does auth
22:05 craftsmanship it did get me far enough to ask the right question though, so there's that.
22:06 jberger craftsmanship: there's an entire example app in the Growing guide that does auth
22:06 sri but he said he's covered the "read the docs" part already -.-
22:07 craftsmanship oh, under growing ... not routing... sillly me.
22:07 jberger craftsmanship: I'm not sure I'm liking your tone
22:07 jberger the Growing guide is a long example, it just happens to be exactly this topic
22:07 jberger so I thought I would mention
22:08 jberger auth-by-header is totally valid too
22:08 craftsmanship you mean the /protected bit in growing?
22:08 jberger so the example in Routing#Under isn't unuseful, it is just a different (and more self-contained) one
22:09 jberger yes
22:09 jberger the example application goes through several phases as it "grows" from lite to full
22:09 jberger so find the one you like best
22:10 craftsmanship so, those redirects are actual "the browser sees this" redirects, not internal dispatching, right?
22:11 jberger there is no internal dispatching
22:11 jberger so yes
22:16 craftsmanship so is under(sub {} ) an untidy way to do this, or is it just fine?
22:27 batman joined #mojo
22:31 * sri wonders if anyone id using minion with job dependencies in production yet
22:31 sri s/d/s/
22:32 bpmedley https://github.com/kraih/minion/compare/master...brianmed:elected_recurring <-- I believe this is a better methodology than what I was doing before for elections/recurring jobs..
22:33 Grinnz_ craftsmanship: it's fine
22:38 slobo joined #mojo
22:46 disputin joined #mojo
22:52 orev joined #mojo
23:27 zivester joined #mojo
23:28 jberger sri: are you wanting to make some change or just curious
23:35 Lee_ joined #mojo
23:38 bpmedley What do y'all use for saving the Request line and the headers?
23:46 zivester_ joined #mojo
23:47 kamyl joined #mojo
23:47 SmokeMachine hi! How should I run minion workers as daemons?
23:48 bpmedley SmokeMachine: What OS/distro?
23:48 SmokeMachine any one... centos, for example...
23:49 SmokeMachine until now I'm only running it on docker containers...
23:49 SmokeMachine but now I need it outside docker...
23:50 bpmedley SmokeMachine: https://gist.github.com/brianmed/55c6e85d6a2e4010383551e8a2752a94 <-- I use a variant of this
23:52 SmokeMachine trying to open...
23:56 SmokeMachine bpmedley: thanks!

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