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

IRC log for #mojo, 2015-03-04

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

All times shown according to UTC.

Time Nick Message
01:03 bpmedley_ joined #mojo
01:19 bpmedley https://github.com/brianmed/minion/commit/9aa719a0781b82319b86d15a97f9e4dd5836a5e9 <— Thoughts on stopping minions running on the current host?
01:27 zivester joined #mojo
01:40 hshong joined #mojo
02:20 kaare_ joined #mojo
02:32 klapperl_ joined #mojo
02:44 denny joined #mojo
02:57 Adura joined #mojo
03:25 bc547 joined #mojo
03:32 noganex_ joined #mojo
03:42 sri the design of the site for the freak attack is a bit underwhelming... so it can't be that serious i guess... https://freakattack.com/
03:42 sri like they didn't even hire a pr firm
03:43 preaction what is vulnerability disclosure coming to where they don't even have a logo?
03:43 sri seriously
03:43 purl is that for real?
03:45 bpmedley sri: Did you see my post a couple hours ago?
03:46 sri bpmedley: yea, but never had a need for that
03:47 bpmedley Hasn’t there been some talk about making it possible for minion to stop a set of workers on a box, or set of boxes?
03:47 sri not that i know
03:48 bpmedley What about the minion manager thing?
03:48 sri that one i know about
03:48 sri that's very different though
03:49 bpmedley I may have misunderstood, do you have a log of the manager discussion?
03:49 sri it's in the backlog... somewhere
03:49 sri around where i added the new heartbeat stuff
03:51 sri the core idea was that jberger wanted to be able to start/stop workers from a web admin app
03:52 bpmedley I see; the manager would allocate and deallocate workers.  Also handle things like graceful shutdown of a set of workers.
03:52 sri and we speculated that Mojo::Server::Prefork could be used for that... but i believe it can't
03:53 sri imo the right solution is not to start more workers, but to allow workers to handle multiple jobs concurrently
03:54 sri and the number could be stored in the workers table, where it is checked by workers every now and then
03:55 sri basically a redesign of the perform method with comcurrent jobs https://github.com/kraih/minion/blob/master/lib/Minion/Job.pm#L26
03:55 crab jberger: no chance, i'm afraid
04:00 jberger crab: :(
04:07 bpmedley sri: Were you thinking of using multiple forked processes to handle multiple jobs?  Basically, one fork per job up to N, where the number is defined in the workers table?
04:15 jberger I really don't understand the high-production-value security alerts
04:16 bpmedley jberger: Alerts from where?
04:17 jberger CVEs with fancy graphics and snazzy stuff
04:17 Adura Makes it look important.
04:17 inokenty-w joined #mojo
04:20 Grinnz it's how security consultants and such make their money
04:20 Grinnz it doesnt really matter how dangerous somethiing actually is, as much as how many businesses you can scare out of money
04:23 bpmedley jberger: Did I remember correctly that you were looking for a way to shutdown a set of workers in minion on a box or number boxes?
04:24 bpmedley “looking for a way” might be better stated: looking for different ways.
04:24 jberger bpmedley: more important to ensure that they are up and there, but down likely comes along for the ride then
04:24 bpmedley You want to monitor the workers?
04:25 jberger what good are workers if they aren't there
04:26 bpmedley That makes sense; perhaps something that can be plugged into nagios and friends?
04:26 jberger I had to hand craft an rc script because I couldn't even find a template for this kind of thing
04:27 jberger start N blocking processes at boot time and detect (in fact ensure, but that is kinda a side effect in this case) their presense
04:27 bpmedley Yes, I recall the rc script.  I’d be happy to spend some time in Minion and make it easier for people to get common process / task managment issues done.
04:28 riche Grinnz: most of those companies don't need to be scared, they have shit security in the first place
04:29 jberger in concept it seems so very much like the prefork command, its too bad that there are just enough differences
04:32 buu Sorry to interrupt but does anyone happen to know how you connect a sas expansion card to a sas controller?
04:34 cpan_mojo AnyEvent-WebSocket-Client 0.30 by PLICEASE - http://metacpan.org/release/PLICEASE/AnyEvent-WebSocket-Client-0.30 (depends on Mojolicious)
04:39 bpmedley jberger: https://gist.github.com/brianmed/f99e7281a5b721a715ef <— Thoughts?
04:46 jberger sounds nice
04:46 jberger and I have the start of a monitoring app on my github
04:46 jberger webapp I mean
04:47 bpmedley Thx, I’ll commit some time to work on it; however, no guarantees except headaches.
04:47 jberger sure take a look
04:48 jberger me and the front-end dev at $work did a bit of a hack night on it, but that's about all
05:05 bpmedley jberger: What about multiple tasks per worker?  There was mention of a desire for one worker to handle multiple jobs - have you given that any thought?
05:09 irq joined #mojo
05:30 melo joined #mojo
06:10 marmez joined #mojo
06:39 dod joined #mojo
06:44 dod joined #mojo
07:08 melo1 joined #mojo
07:22 bramirez joined #mojo
07:36 reneeb joined #mojo
07:53 elik joined #mojo
08:00 fhelmber_ joined #mojo
08:01 dparry joined #mojo
08:02 dparry Hi, is there an easy way to set a header on every response, from within the startup routine perhaps?
08:04 batman dparry: what is "startup routine" ?
08:05 eseyman joined #mojo
08:05 batman my $ua = Mojo::UserAgent->new; $ua->on(start => sub { my ($ua, $tx) = @_; $tx->req->headers->header("X-Whatever" => 42); }); $tx->get("http://example.com");
08:05 batman ^ dparry
08:09 cpan_mojo Bootylicious 1.07 by Oleg G - http://metacpan.org/release/OLEG/Bootylicious-1.07 (depends on Mojolicious)
08:11 dparry batman: I'd like to set a response header
08:11 dparry rather than a request header
08:11 dparry i.e. whenever mojo returns a response
08:11 dparry I'd like to set a particular header
08:11 dparry I could put that in all my handler code
08:11 dparry but I think it would be nicer to set this globally somehow
08:12 dparry just not sure how to
08:12 dparry startup = Mojolicious::Commands->start_app
08:13 batman i don't think you can.
08:13 batman i guess i would just do add_response_header($tx)
08:13 batman it's often a very bad idea to add **anything** global
08:13 batman s/often/almost always/
08:14 batman you have the finish event though: https://metacpan.org/pod/Mojo::Transaction#finish
08:14 dparry in my case the mojo app is behind anycast
08:14 dparry so I want to be able to identify which instance handled the response
08:14 dparry by setting an indentifying header on all responses
08:14 batman $ua->on(start => sub { my ($ua, $tx) = @_; $tx->on(finish => sub { my $tx = shift; $tx->res->headers->header("X-Whatever" => 42); }); });
08:14 batman ^ maybe something like that
08:14 dparry to aid with troubleshooting
08:15 batman untested, but please give it a shot
08:15 dparry in my case the ua is not involved though?
08:15 batman oh! is it in you Mojolicious web app?
08:16 dparry I have a route to a controller which sends a rendered response
08:16 dparry yes in the app
08:16 batman $app->hook(before_dispatch => sub { my $c = shift; $c->res->headers->header("Foo" => 123); });
08:16 batman ^ sorry. i'm not reading your question correct :(
08:16 dparry sorry, I was not making it clear :)
08:16 dparry hook looks promising
08:17 batman you might want to use another hook.... https://metacpan.org/pod/Mojolicious#HOOKS
08:17 batman nah. i messed up. read your question again now :)
08:17 batman *hung over*
08:17 dparry thanks yep, reading the docs, now learning about hooks :)
08:18 batman good thing my work is just critical infrastructure :P
08:18 batman dparry++
08:18 dparry yeah I figured this might be early for the mojo channel :)
08:18 batman 09:18am localtime
08:18 dparry ditto for now
08:19 dparry headed back to the greenwich meridian shortly
08:21 irq joined #mojo
08:29 Vandal joined #mojo
08:31 trone joined #mojo
08:40 AndrewIsh joined #mojo
08:45 dod joined #mojo
08:53 bramirez joined #mojo
09:00 berov joined #mojo
09:14 fhelmber_ joined #mojo
10:01 jontaylor joined #mojo
10:47 ashimema joined #mojo
11:02 kaare_ joined #mojo
11:03 alnewkirk joined #mojo
11:10 aleksey joined #mojo
11:10 aleksey left #mojo
11:38 bramirez joined #mojo
11:44 danejx joined #mojo
12:03 reneeb jberger: I moved the matrix to http://matrix.perl-services.de/mojolicious
12:21 Lee reneeb: cool!
12:24 oetiker joined #mojo
12:26 Lee reneeb: links to test reports would be useful - my Test::Mojo::Most is failing because Test::Mojo::More isn't v6 compat (Test::Mojo::More however is not marked as failed as it doesn't have good test coverage)
12:35 jberger reneeb++
12:36 bpmedley jberger: Also, what about multiple tasks per worker?  There was mention of a desire for one worker to handle multiple jobs - have you given that any thought?
12:36 jberger batman: do you know the phrase "the hair of the dog that bit you"?
12:36 jberger bpmedley: I have not thought of that
12:36 jberger sri is interested and he's usually smarter than I am
12:37 jberger the idea being  reducing the number of levels indirection
12:38 bpmedley Understood.  I’ll ask ‘em again when I get back from work today.
12:38 jberger but I have to admit I haven't had the time to give ie much thought
12:38 bpmedley Levels of indirection?
12:38 jberger it
12:39 jberger manager forks worker forks job is too hard to control
12:40 bpmedley I see; I was wondering about a worker managing their own number of children.
12:45 dotan bpmedley: the middle-management architecture
12:46 oetiker joined #mojo
12:52 oetiker joined #mojo
12:52 reneeb Lee: good idea... I'll work on that...
13:07 dotan joined #mojo
13:09 marmez joined #mojo
13:18 sri bpmedley: minion already supports multiple jobs per worker
13:18 sri just no process management for it
13:18 avkhozov_ I have a deep recursion issue with dumper transaction in after_build_tx hook
13:18 avkhozov_ http://pastie.org/9998929
13:18 avkhozov_ It's ok?
13:19 sri you can totally do my $job1 = $worker->dequeue; my $job2 = $worker->dequeue; ...process jobs... $job1->finish; $job2->finish;
13:20 sri and jberger
13:22 sri this is not a lot of code to write actually, just some design work, to find the right alternative to the blocking waitpid() call used currently
13:23 jberger sri: sure
13:23 jberger I wasn't disagreeing
13:24 jberger I was just saying that I didn't have good thoughts on the matter yet
13:24 sri i was disagreeing with bpmedley
13:24 jberger *any
13:24 jberger ahh
13:25 batman jberger: no, i don't know "the hair of the dog that bit you"
13:26 jberger http://en.wikipedia.org/wiki/Hair_of_the_dog
13:26 * jberger hands batman another beer
13:27 batman ETOOMUCHBEER;
13:28 batman haha. thanks
13:28 jberger try { $batman->beer } catch { $batman->back_to_bed }
13:28 jberger :-)
13:29 batman haha. i woke up too early. that's probably the worst part :/
13:30 jberger hmmmm, ein Konterbier trinken
13:30 batman 6am... couldn't get more sleep so i started working on mojoconf stuff
13:30 jberger good for you (I think)
13:30 batman guess it wasn't all for nothing :)
13:30 batman work has been slow though, hehe
13:39 amon joined #mojo
14:00 elik joined #mojo
14:07 cpan_mojo Net-Easypost 0.14 by MCMILLHJ - http://metacpan.org/release/MCMILLHJ/Net-Easypost-0.14 (depends on Mojolicious)
14:39 arthas joined #mojo
14:49 marty joined #mojo
15:00 jberger batman: haha, I just looked back at the wikipedia page and saw this: repareringspils
15:00 batman spot on! :)
15:00 batman i guess that is pretty understandable in english as well?
15:00 jberger yes
15:00 batman :)
15:00 jberger as long as you see pils and think pilsner
15:01 batman yeah.
15:06 mattastrophe joined #mojo
15:12 sri damn, there is a lot of opposition to the patch making signatures super fast
15:12 jberger yeah, I saw that
15:16 rohit joined #mojo
15:28 rohit Hello everyone
15:28 rohit I have question about hypnotoad setup for multiple apps on different port
15:29 rohit it seems that hypnotoad is not able to run different apps on different port at same time
15:29 dustinm joined #mojo
15:29 rohit https://github.com/kraih/mojo/issues/755
15:38 sri rohit: http://mojolicio.us/perldoc/Mojolicious/Plugin/Mount
15:38 jberger sri: I don't believe that that is what he is interested in
15:39 jberger can I do hypnotoad app1.pl; hypnotoad app2.pl; if the two apps specify different ports in their config?
15:39 sri of course
15:40 jberger I would think so too, though I haven't tried it
15:40 sri just make sure the pid file doesn't overlap
15:40 jberger ah! I bet that's related
15:40 jberger rohit: ^^
15:40 jberger I might have stumbled on that
15:42 jberger sri: could the pid file default to <<moniker>>.pid or is that not known at the time?
15:42 jberger I guess it must be too early to know that
15:42 sri not before 7.0 certainly
15:42 jberger that too
15:42 rohit @sri yes , I had brief look at Mount plug in but that is not ideal solution for me.
15:42 dvinciguerra joined #mojo
15:43 sri so really... it's meh... 7.0 will be 2016
15:43 rohit hmm thats long :(
15:44 rohit I guess probably end up using uWSGI for now
15:44 jberger rohit: did you see the original suggestion
15:44 jberger just change the name of the pid file in the configuration
15:44 jberger I was only asking if the change can be done for you automatically, and that is what would have to wait
15:45 rohit lets see,  I will try with with different pid files
15:47 sri hopefully we'll have a good book before 7.0... and then changes will be more limited
15:49 absolut_todd joined #mojo
15:54 rohit @jberger yes ,  it works with different pid files
15:54 rohit thanks
15:54 asarch joined #mojo
15:55 jberger rohit: glad to help, sri++
15:55 rohit @sri we looking forward to that book :)
15:56 sri we are still looking for an author though :/
15:58 jberger I think many of the potential authors are busy with mojoconf, but I still think that doing a book with authors by chapter would be more feasable
15:58 jberger as we discussed a little bit ago
15:59 jberger maybe we should make a real push for that after mojoconf
15:59 mst that's pretty much what we did for the cat book
15:59 mst apress were totally happy with it
16:00 jberger mst++ well volunteered! # hehe
16:04 sri mst: who did all the cat herding?
16:05 mst sri: do you mean finding the relevant people and talking them into it, or chasing them for their work once they were in progress?
16:05 sri yea
16:05 Grinnz_ lol
16:06 mst 'yes' wasn't quite the answer I was looking for, but to answer both: IIRC I did the former, and then the latter was a team effort between me, kd, and the apress staff
16:06 sri ah
16:07 mst I should really learn to ask either/or questions with (a) and (b) markers so people don't 'yes' me :)
16:07 Grinnz_ a+b
16:07 sri maybe
16:07 mst Grinnz_: yeah, but then I'd have an explicit 'both' answer
16:07 mst this would still be an improvement
16:11 Grinnz_ mst: unless it's a logic + which means or :P
16:16 mst at which point they're intentionally being difficult and the correct response is always 'break out the chainsaw' :D
16:20 captkangaroo joined #mojo
16:20 captkangaroo Is anyone familiar with BlueHost and their Apache Configuration maze? Need to configure the Virtual Host.
16:22 Grinnz_ not sure what that has to do with mojo really
16:23 captkangaroo was kicked by mst: cross-spam
16:25 jberger purl: be mst
16:25 purl RTFMTALITY
16:31 Ralesk that command reminded me of mspaintadventures somehow :D
16:42 sh4 joined #mojo
16:45 disputin joined #mojo
17:05 hesco joined #mojo
17:06 dod joined #mojo
17:36 marcus joined #mojo
18:15 punter joined #mojo
18:18 irq joined #mojo
18:32 Anon021 joined #mojo
18:40 relberger joined #mojo
18:45 csson joined #mojo
18:51 sri how many of you have ShowErrorStatement in their Mojo::Pg settings?
18:57 marcus im s bit bothered by the "nobody has perl 5.20, so you should just use perl6 retoric that damian is using ....
18:57 marcus re sub signatures.
18:58 marcus (at oslo.pm meetup)
18:59 * sri is too depressed about the OP_SIGNATURE discussion to care about damian
19:00 btyler it's just the two debating against it, most seem supportive (by my reading)
19:00 sri leonerd, zefram and father c at least
19:01 marcus :-/
19:05 jberger damian is invested
19:05 jberger he's another "inside the bubble" guys
19:06 jberger because the response is obvious right? literally nobody has perl6
19:07 jberger its been kinda fun using perl at $work, rather than mostly being a module author
19:07 jberger I do actually get to use the features of the perl I'm using
19:07 jberger I'm on 5.18 atm, and 5.20 is planned soon
19:26 jabberwok the perl6 logo must have been designed by cigar-smoking sliderule-toting toymakers from the 1930s attempting to make something "appealing to girls"  *sigh*
19:28 genio meh. Perl6. meh.
19:30 sri obligatory http://blog.kraih.com/post/43193421658/a-logo-for-perl
19:30 jabberwok i like yours much, much better, sri
19:30 * sri really liked the perl.org and tpf variants
19:31 jabberwok altho -- what was the logo for Pascal? for FORTRAN? for MUMPS or FOCAL or C or FORTH or anything? why does a language need a logo?
19:31 jabberwok http://design.perl6.org/S03.html#Changes_to_Perl_5_operators     now i have a migraine
19:31 romel joined #mojo
19:32 sri why do web frameworks need a logo? why have a web site? :)
19:33 jabberwok *tugs at sleeve* but why, Daddy, but why?
19:34 genio the entire Perl 6 site is terrible looking.  I'm not a good designer and likely couldn't do better, but, eww.
19:35 sri this is how the competition presents itself https://www.python.org/
19:35 marcus pestered about async io. my work is done here.
19:36 sri of course, we know we don't like significant whitespace, but that site catches beginners
19:36 ribasushi sri: which is why perl6 comes with significant whitespace baked into the syntax ;)
19:37 sri ribasushi: https://rpseawright.files.wordpress.com/2013/11/say-what.jpg
19:38 ribasushi I thought this is common knowledge these days
19:38 ribasushi perl6 as specced disallows
19:39 ribasushi function (arg1, arg2)
19:39 ribasushi you need an external grammar modifier to be able to have that whitespace between name and paren: https://github.com/FROGGS/p6-Slang-Tuxic#slangtuxic
19:39 marcus damian just compared perl5 vs perl6 to c and c++ - very apt. :p
19:40 jabberwok whitespace:  oh good grief.
19:41 jabberwok subscribe comp.lang.perl6.die.die.die  (sorry, wesley crusher)
19:42 Adura https://i.imgur.com/7KL2ytS.jpg Perl 6 logo inspiration?
19:43 Quai http://design.perl6.org/S02.html#Ampersand_and_invocation
19:44 jabberwok "Let's make a language so complex, no-one can understand it."
19:47 genio Why won't Perl6 just go away or rename itself?
19:49 jabberwok tune in next week, when the narrator asks: Does Larry hate us all?
19:58 ribasushi genio: because the creator has a legal and logical (albeit not moral) right to the name
19:58 jberger I don't especially mind removing the ability to say 'function_name     ('
19:59 jberger if it make the grammar easier
20:00 jberger you already can't have a space between '$    variable_name' # I think
20:01 sri hmm, i guess that affects all postcircumfix operators?
20:02 sri yea, somehow that doesn't bother me too much either
20:03 jabberwok all the way back to prehistory (BASIC, 1965) sigils have had relevant white space: BASIC had variables A and A$ ... but parens as far back as COBOL and ALGOL have had *insignificant* white space. That breaks 56 years of tradition.
20:03 sri what bothers me is that $foo {bar} doesn't work while $foo .{bar} does
20:04 sri oops
20:04 sri s/$/%/
20:07 sri wait a minute... i think i just encountered old docs
20:08 ribasushi jabberwok: precisely
20:08 sri if foo.() means really foo().() then %foo.<bar> has to mean what?
20:10 jabberwok *sigh*  call it Perl#
20:10 jabberwok as it seems full of #edges
20:13 sri hmm... looks like %foo.<bar> just means %foo<bar> and is inconsistent with foo.()
20:13 Grinnz i agree, for one thing we wouldn't have the problem of having to put +( after a function name just to parenthesize the first arg(s)
20:14 Grinnz if func ( didn't mean the arg list was starting
20:14 Grinnz also, wtf @ perl6 logo, i havent seen that before
20:14 Grinnz like, seriously
20:21 Adura Firaxis will sue Perl 6!
20:26 * genio wonders how many beers it will take to get Larry to give up the kidnapped version number
20:30 ribasushi Adura: what's firaxis?
20:33 Grinnz at least it's perl 5.020 so we can go all the way up to 5.999
20:34 sri you say that now... but time flies...
20:35 Adura The creator of Sid Meier's Alpha Centauri.
20:36 Adura The image I linked above was from that game.
20:36 genio if I have to     use 5.999;  I'll... yeah
20:36 Adura Perl 7!
20:37 cpan_mojo MojoX-IOLoop-Future 0.03 by Jose Luis Martinez Torres - http://metacpan.org/release/JLMARTIN/MojoX-IOLoop-Future-0.03
20:38 Grinnz well that works
20:45 sri any objections to removing experimental status from Mojo::Pg pubsub support?
20:55 cpan_mojo Mojo-Pg 1.11 by Sebastian Riedel - http://metacpan.org/release/SRI/Mojo-Pg-1.11
20:55 sri too late!
21:01 punter joined #mojo
21:09 Grinnz_ lol
21:18 melo joined #mojo
21:39 d4rkie joined #mojo
21:50 Dandre joined #mojo
22:00 nicomen how do I set a stash value from a query param inside a route definition?
22:12 hesco joined #mojo
22:12 marmez joined #mojo
22:19 d4rkie joined #mojo
22:19 Grinnz_ "from a query param" you would have to do in the action or in an under, i would think
22:29 riche joined #mojo
22:29 d4rkie joined #mojo
22:36 trone joined #mojo
22:40 nicomen I think I would like to be able to do: ->to( foo => sub { my $c = shift; $c->param('foo') if something } ), but I guess that's a bit hairy?
23:10 d4rkie joined #mojo
23:13 zackiv31 joined #mojo
23:20 polettix joined #mojo
23:27 kaare joined #mojo
23:40 elik joined #mojo

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