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

IRC log for #mojo, 2017-11-01

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

All times shown according to UTC.

Time Nick Message
00:07 jberger I don't think we are going to break a record today, the stream of kids is dwindling and we've only had 152 so far
00:15 stanley_thecat joined #mojo
00:18 marty joined #mojo
00:20 stanley_thecat I've got a nice simple mojo app to expose my greenhouse data to a rest api for external use. It works fine with morbo. When I run with mojo, I get nothing. No output the generate lite_app seems ok. My env is 15.6.0 Darwin Kernel Version OSX with perl 5.24.0.
00:20 pink_mist what do you mean by "run with mojo"?
00:23 stanley_thecat after I do the mojo generate lite_app, I run it ./monitor_mojo.pl daemon -m production -l http://*:3000
00:23 stanley_thecat and I get no running proc
00:25 stanley_thecat while morbo ./monitor_mojo.pl produces a server at at http://127.0.0.1:3000, where all my routes work fine.
00:33 stanley_thecat is there a way to log or debug what happens when I exec the script?
00:37 Seth joined #mojo
00:40 aborazmeh joined #mojo
00:55 marty joined #mojo
01:08 jberger you get no output at all?
01:09 jberger do you have a log directory?
01:09 EvanCarroll joined #mojo
01:09 jberger you can start the application with the MOJO_DAEMON_DEBUG=1 environment variable set
01:10 jberger perhaps that will give something more
01:10 stanley_thecat ok. no, no output at all
01:11 stanley_thecat rather weird
01:12 stanley_thecat not sure how to setup a log dir for it.
01:17 mohawk stanley_thecat, maybe perl -d it?
01:17 jberger perl -d rarely helps in mojo lang
01:17 jberger land*
01:17 mohawk doh
01:17 jberger I mean, it can, but given the ioloop it is very hard to navigate
01:19 mohawk is there some function he could put a "warn" in to see how far it's got that would be indicative?
01:20 jberger in a full app I'd do it in the startup method, in a lite app, near the end of the file (but before the app->start, which has to be last)
01:21 jberger there's an interesting thought
01:22 jberger stanley_thecat: is your app a lite app and is the app->start not the last line of the (perl portion of the) script?
01:22 jberger a test, run: ./monitor_mojo.pl routes
03:29 noganex joined #mojo
03:54 mib_f2s2zz joined #mojo
03:57 mib_f2s2zz using Mojolicious v7.51 -- are signatures supported for helpers? helper foo => sub ($self, $a) {}
04:03 mib_f2s2zz nvm, I see a test for it
04:11 EvanCarroll joined #mojo
05:04 dboehmer_ joined #mojo
07:40 inokenty-w joined #mojo
08:07 AndrewIsh joined #mojo
08:21 mtj joined #mojo
08:47 ashimema joined #mojo
08:55 ashimema joined #mojo
09:02 CandyAngel Step 1) Get to work, Step 2) Send my persistent cookie module home :P
09:16 rshadow joined #mojo
09:32 kes joined #mojo
09:39 onix joined #mojo
10:20 aborazmeh joined #mojo
10:25 trone joined #mojo
11:02 tchaves joined #mojo
11:35 mib_mhihrl joined #mojo
12:08 kes hooray. I found infinite loop
12:08 kes it is here: https://metacpan.org/source/SRI/Mojolicious-7.51/lib/Mojolicious/Routes/Route.pm#L174
12:09 kes created here: https://metacpan.org/source/SRI/Mojolicious-7.50/lib/Mojolicious/Routes.pm#L153
12:09 kes when I mount app to itself
12:09 kes hm... how it would be better to resolve that
12:09 Vandal joined #mojo
12:10 sri we knew that already yesterday, and we'll never make that work
12:26 karjala_ joined #mojo
13:21 marty joined #mojo
13:29 gizmomathboy joined #mojo
13:38 gryphon joined #mojo
14:01 tcohen joined #mojo
14:06 jberger I can imagine mounting a second instance of the same app within another
14:06 jberger but I agree with sri, I don't see any reason to support mounting an app within its own instance
14:06 jberger (and to be clear, I believe the former should work, right?)
14:18 kes please review this optimization
14:18 kes https://github.com/kraih/mojo/compare/master...KES777:no_need_to_traverse_whole_chain?diff=split&expand=1&name=no_need_to_traverse_whole_chain
14:22 kes all tests PASS
14:22 purl Time to write more tests!
14:23 haarg purl is likely right
14:23 haarg i can't imagine that change is valid.  more likely it just happens to pass on the current tests.
14:24 kes the %via will not have more keys than values of ->via from ->endpoint
14:25 kes and there is no reason to do check at all if ->endpoint does not exists
14:35 jberger "purl is likely right" <--- a phrase that is rarely uttered
14:37 raisin joined #mojo
14:39 raisin hiya! I have the following in before_dispatch http://mibpaste.com/H5TgQC and is delaying every request/response by an average of 2-3ms and I am trying to avoid/optimize it.  Is there a more efficient way to do something similar?
14:47 kes I found the case where this optimization fail
14:47 kes is is OK to extend tests as next?
14:47 kes https://github.com/kraih/mojo/compare/master...KES777:no_need_to_traverse_whole_chain?diff=split&amp;expand=1&amp;name=no_need_to_traverse_whole_chain#diff-c89d84cbb955054b1be5dbd45b694bf9R948
14:49 xrt joined #mojo
14:49 xrt THOSE STUPID MUSLIM SAND NIGGERS HAVE KILLED INNOCENT AMERICANS AGAIN
14:49 xrt THE NAZI ORGANIZATION OF AMERICA IS PLANNING AN EMERGENCY MEETING
14:49 xrt TODAY @ #/JOIN ON IRC.FREENODE.NET. DO NOT COMPLAIN IN #FREENODE
14:49 xrt THIS MEETING IS INTENDED TO BE FOR MORE LIKEMINDED INDIVIDUALS
14:49 xrt IF YOU HAVE QUESTIONS PLEASE DONT HESISTATE SENDING A MESSAGE TO
14:49 xrt VAP0R ON IRC.FREENODE.NET.
14:49 xrt raisin tcohen gryphon gizmomathboy marty karjala_ Vandal tchaves trone kes rshadow ashimema mtj AndrewIsh inokenty-w dboehmer_ noganex jacoby genio jamesaxl ghenry CHYC dotan_convos dantti_laptop maschine Dandre bjakubski jnbek Peppard suede Lee rickbol_ mdom bpmedley jabberwok gordonfish stokachu
14:49 xrt perlpilot salva cng hesperaux [vlad] garo VVelox purl ilbot2 zach renormalist cosimo jberger mishanti1 erry TBSliver simcop2387 batman bc547 haarg bobkare tardisx pirateFinn meredith tinita plicease Sebbe anparker pink_mist phillipadsmith sri mmp iamb hkclark mohawk Ralesk geheimnis` cfedde
14:49 xrt foursixnine odc karjala klapperl coolo Zx3 wouter esh mtth cromedome jnap vinnix diegok Xyem ccakes CandyAngel robinsmidsrod preaction mantovani ribasushi lari_ arcanez abracadaniel gabiruh mrallen1 skaji xdg robx hernan604 tianon kivilahtio_ stryx`_ matt firnsy Phil21 kamyl_ alilles sjn spicyjack
14:50 xrt left #mojo
14:50 Lee someone kickban pls
15:00 jberger one of my favorite things about running convos, it is super easy to get in to my chat logs and remove that filth
15:03 ghenry joined #mojo
15:17 kes will be supported application mounting under route with placeholders?
15:21 jberger kes: is that not already supported?
15:28 EvanCarroll joined #mojo
15:29 bwf joined #mojo
15:29 gryphon joined #mojo
15:34 kes jberger: no. this is not supported
15:45 pink_mist giving the application access to the placeholder values is not supported
15:45 pink_mist (meaning the url_for in the mounted application doesn't get the right base)
15:46 kes jberger: here are mojoapps: https://drive.google.com/open?id=0B0hINzhpu9EieUdRb2JWbWpQRzA
15:46 kes the output:
15:46 kes from apps http://paste.scsys.co.uk/565642
15:47 kes second app is mounted as: $r->any( '/test/:placeholder' )->detour( 'MyApp2' );
15:48 kes I do not know what I do wrong
15:50 dod joined #mojo
15:51 kes links are rendered ok, except for links rendered by name
15:51 jberger yeah, I guess I'm not sure what to do about that
15:53 kes The stash is inherited from master application
15:53 kes I think %captures should be inherited too
15:57 dod joined #mojo
15:57 arcanez jberger: did you secure convos?
15:58 jberger kes: if that's true, then I can believe that the captures ought to be merged into the stash before detouring to the other application
15:58 jberger I don't know the technical details there, but that makes sense to me intellectually
15:58 jberger arcanez: how do you mean?
16:00 arcanez oh nm, it does have a login/password
16:01 arcanez I may look into convos as a sort of self hosted irccloud
16:02 sh14 joined #mojo
16:03 kes detouring is done at application startup, but captures are in context of request
16:04 kes I believe this should be here: https://metacpan.org/source/SRI/Mojolicious-7.50/lib/Mojolicious/Routes.pm#L153
16:06 kes but embedded app fill its ->match object later
16:10 ChmEarl joined #mojo
16:28 dustinm joined #mojo
16:52 Peppard joined #mojo
16:55 jberger ok so this is the essential problem: https://gist.github.com/jberger/8411686de08ef9124e7f77dec5e7e54d
17:00 dod joined #mojo
17:01 jberger And that can be made into a test form too, I just didn't think of it before I stepped away from my lappy
17:01 kes I was brought back to url_for method again
17:02 kes rendering path for unnamed route work because we just replace text
17:02 kes https://metacpan.org/source/SRI/Mojolicious-7.50/lib/Mojolicious/Controller.pm#L309
17:02 kes for named route we relay on $self->match stack
17:03 kes but not full stack. Only on embedded application
17:04 kes so route renderer do not fill placeholders by theirs values
17:04 kes despite stash->{ mojo.captures } is OK
17:07 kes The $match->stack is merged into stash->{ mojo.captures }. So when route is rendered it should (maybe) relay on { mojo.captures } instead of $match->stack
17:15 a6502 joined #mojo
17:20 ghenry joined #mojo
17:23 dod joined #mojo
17:25 kes hooray \o/
17:25 kes I resolve this problem
17:28 kes but some tests fail :`-(
17:30 rshadow joined #mojo
17:34 kes Deep recursion on subroutine "Mojolicious::handler" at on test with PluginWithEmbeddedApp
18:11 jberger ok that gist is now a test
18:12 mohawk yay tests
18:13 jberger well, I mean, a failing test :-P
18:13 mohawk always a good starting point
18:14 mohawk how about enhancing it to also try to pass on a match parameter (wrong terminology) to the contained route/
18:14 mohawk ?
18:17 jberger that should (should) work, the problem is that the embedded app can't see the outer app's captures
18:18 jberger certainly it can see its own
18:31 dustinm joined #mojo
18:34 jberger ugh, kes I think once I pass the stash to url_for it works as expected
18:36 jberger please confirm for me
18:40 kes mmm... so for every link I render I must pass the stash to not break thing when someday someone mount my app?
18:42 jberger that's how placeholders work in url_for as it is
18:42 jberger I didn't notice it until I was doing it myself
18:43 kes yes. that works. Also that works when we pass stash->{ mojo.captures } only
18:43 jberger mojo.captures is private, that would be acceptable if it was a core patch but you shouldn't do that in your own apps
18:43 kes also that works when we do not pass explicitly stash->{ mojo.captures }
18:44 kes and this should work same way for embedded apps when we do not pass it explicitly
18:44 jberger so that's a hard thing to know
18:45 jberger because for regular (non-embedded) apps the placeholders need a value when generating a url using url_for
18:45 kes I suppose this patch
18:45 jberger it would be handy if the outer app's stash could be used by default, but I don't know if that feasible
18:45 kes http://paste.scsys.co.uk/565650
18:47 kes at current state I think the ->match should be improved
18:47 kes and this condition should also be improved: https://metacpan.org/source/SRI/Mojolicious-7.51/lib/Mojolicious/Routes.pm#L44
18:48 jberger I really don't follow that series of suggestions
18:50 kes I fill next hitch:
18:50 kes embedded app see the outer app's routes, but do not see captures.
18:51 kes When embedded appp render its route it should render outerapp route part (prefix where it is mounted)
18:51 disputin joined #mojo
18:51 kes hitch: How this routes should be rendered if the do not have captures for that?
18:53 kes Another suggested fix is to remove this hack: https://metacpan.org/source/SRI/Mojolicious-7.51/lib/Mojolicious/Routes.pm#L150
18:54 kes so Embedded app will render only its own route part.
18:54 kes when route rendering is finished. the outer app should continue
18:55 jberger I have no idea how that would affect other things
19:30 jberger kes ok so in the meantime, I think you should probably make a helper that wraps url_for
19:30 jberger (or link_to if that was your problem)
19:30 kes I can not create helper url_for
19:30 kes it did not wrap all things
19:31 kes When helper is created. url_for and $c->url_for will call different subs
19:31 jberger sorry, have a new base controller class that extends Mojolicious::Controller
19:31 jberger because yes, url_for is a method not a helper
19:32 jberger anyway, have it take any placeholders and merge them into the existing stash
19:32 jberger (locally of course)
19:33 kes there is no need to hack new base controller if: https://metacpan.org/source/SRI/Mojolicious-7.50/lib/Mojolicious/Plugin/TagHelpers.pm#L120
19:33 kes here call to helper is made
19:33 kes $c->url_for  -->  $c->helpers->url_for
19:34 jberger but you need the new behavior anyway
19:34 jberger so may as well do it in a new controller
19:36 kes I do not know you see the issue or not. When I hack url_for in base controller or register new helper url_for. I MUST do both. to get all work
19:36 kes otherwise url_for (called from template) and $c->url_for will do different things
19:37 kes this is true for all helpers which are controller aliases
19:37 kes ((
19:38 jamesaxl joined #mojo
19:39 jberger why? the helper form just calls the method
19:39 jberger https://github.com/kraih/mojo/blob/master/lib/Mojolicious/Plugin/DefaultHelpers.pm#L16
19:56 Seth joined #mojo
19:58 kes look. in common app url_for will call controller method. $c->url_for will also controller method
19:59 kes but when you register url_for helper. url_for will call your helper  while $c->url_for will still call controller method
19:59 rick_soc1 joined #mojo
19:59 kes and vice versa
19:59 Grinnz no, not vice versa
19:59 rick_soc1 Don't worry I'm here now.
19:59 kes you define your own url_for method in your app::controller
19:59 Grinnz thats the point, if your controller overrides url_for the helper will cal that too
19:59 kes when you call url_for it will call Mojolicious::Controller::url_for
19:59 Grinnz no it won't
20:00 kes when you call $c->url_for it will call your app controller
20:00 kes method
20:00 Grinnz it will call the url_for method on whatever $c is, the current controller object
20:01 kes oh. sorry, not vice versa.
20:02 kes I am tired already today.. (
20:03 jamesaxl joined #mojo
20:07 EvanCarroll joined #mojo
20:14 kes This is almost solution: https://github.com/kraih/mojo/compare/master...KES777:do_not_lose_captures_for_embedded_apps?diff=split&amp;expand=1&amp;name=do_not_lose_captures_for_embedded_apps
20:15 kes three test check left B-)
20:32 karjala_ joined #mojo
21:16 jberger here's a silly idea
21:16 CandyAngel Who let jberger out of his box?
21:17 jberger ->catch is going from having two argument to having one, yeah
21:17 jberger nearly every usage of that that I have looks like
21:18 jberger ->catch(sub{ $self->$cb($_[1], ...) })
21:18 jberger where ... is any other args that the $cb takes
21:18 jberger well, I wonder if I could instead use
21:18 jberger ->catch(sub{ $self->$cb($_[-1], ...) })
21:19 CandyAngel Why not shift/pop, then use @_?
21:19 jberger giving me the last argument, which should be the error slot
21:19 jberger because I'd have to conditionally shift
21:19 sri i liked pop
21:19 jberger pop is the same as -1
21:19 jberger sure, say its pop
21:19 sri you can
21:19 Grinnz no, it's soda
21:19 jberger ok, that's my new preferred fix, and I agree with Grinnz fwiw
21:20 pink_mist lemonade
21:20 purl lemonade is probably http://www.youtube.com/watch?v=CeJ1Sauv2gc
21:20 * Grinnz sends mail to p5p: add soda() and coke() as regional variants to pop()
21:21 pink_mist purl: thanks
21:25 jberger you can use `sub soda { pop }` as long as you call it as `&soda`
21:27 preaction BEGIN { *soda = \*CORE::pop }
21:27 preaction without the BEGIN, I get "Array found where operator expected (Do you need to predeclare soda?)"
21:27 jberger man I hate gist's search
21:28 jberger hmmmm, declare it above or predeclare it?
21:28 jberger or use subs or something
21:28 jberger I forget, weird stuff
21:29 Grinnz just needs the BEGIN so it's a known keyword at compile time
21:29 preaction yeah. if i were using "sub soda" it wouldn't need BEGIN, because that happens at compile time
21:30 jberger ah, right, I never did make this a gist
21:30 jberger I guess I should
21:30 jberger http://irclog.perlgeek.de/mojo/2016-06-06#i_12614011
21:31 jberger https://gist.github.com/jberger/863277a158ae573a09deaf76f8bfadd7 boom
21:49 jamesaxl joined #mojo
21:55 jamesaxl joined #mojo
22:09 EvanCarroll joined #mojo
22:21 thowe joined #mojo
22:24 disputin joined #mojo
22:31 thowe Can I use Mojo to essentially daemonize a command line app that I want to do a bunch of non-blocking posts every N minutes?
22:32 thowe I haven't looked at it in a while, and I seem to recall having known I could do this, but now I can't seem to wrap my head around it
22:35 pink_mist why does that need to be non-blocking?
22:35 pink_mist but sure, mojo can do it
22:35 thowe well, there's just one part of it that I suspect wll be more performant if it is non-blocking...
22:36 thowe I need it to read a big config I have, fetch a bunch of SNMP data, and after each fetch post the data to the http interface of influxdb.
22:37 thowe I don't want to wait for the post to complete to continue my fetching...
22:37 Grinnz thowe: "every N minutes" is usually better served by writing a mojo command and running it via cron
22:38 thowe So basicall, I want a daemon that reads a config file on startup (and also re-reads it every 2 hours), every minute goes through a fetch/post/repeat loop, and AT LEAST can do the posts in an IO loop or whatever.
22:39 thowe Grinnz, cron would normally be my go-to here, but I wan tthe option to also do 10 second intervals and the like.
22:39 Grinnz right, you'll need a persistent process for that
22:40 thowe the problem is that the SNMP plugin for telegraf just doesn't do the fine grained SNMP work I want, so I am trying to build a solution for all the folks who complain about that same fact.
22:42 thowe I already have scripts I use to build the snmp configs for nagios, so that's a start.
22:44 thowe So, do I need to build it as a Mojo app and use Mojo::Server::Daemon, or is there a better way for a script like this.  I really just imagined using Mojo::UserAgent, but then I remembered Mojo was good at lots of stuff.
22:44 thowe I think I need a full app to have the IO loop, don't I(?)
22:44 pink_mist no, you can make a loop on your own
22:45 marty joined #mojo
22:46 Grinnz if you use a delay (maybe with the new promises API) you can then call $delay->wait to run the loop outside of an app
22:46 Grinnz or Future::Mojo ->await will do the same
22:46 thowe If I have a for loop creating "$ua->post('http://bleh' => {'InfluxDB stuff'} => sub { #things }"  how does that know to be in the loop?
22:47 Grinnz nonblocking requests from Mojo::UserAgent always use the main Mojo loop
22:48 Grinnz thus the line that shows up in the synopsis for nonblocking requests: Mojo::IOLoop->start unless Mojo::IOLoop->is_running;
22:48 thowe Can I easily make my SNMP requests non-blocking?  Somehow I think not.
22:48 Grinnz you can't just make things non-blocking, they have to be designed that way
22:48 Grinnz you can do them in a subprocess
22:49 Grinnz or you can rewrite whatever's needed so you get a socket you can have the loop watch manually
22:49 jberger thowe: seen Mojo::SNMP?
22:49 purl I haven't seen 'Mojo::SNMP', jberger
22:49 Grinnz was about to mention that too
22:49 jberger shut it purl
22:49 * purl shuts it
22:49 thowe Right, that's what I was thnking...  Might need a small service that runs the proper snmpget commands
22:49 thowe jberger, Woah, the what now?  =)
22:49 jberger I have a massively parallel Mojo::SNMP thingy at work
22:49 Grinnz Mojo::SNMP is non-blocking
22:50 thowe No I haven't.
22:50 jberger in a single process
22:50 thowe Oh, man, I knew my day would get better if I joined #Mojo
22:50 jberger you know it!
22:50 jberger purl, tell him what he's won!
22:50 purl jberger: no idea
22:50 jberger damn, that would be a good factoid
22:50 jberger someone add that
22:51 Grinnz and it looks like Net::SNMP has sufficient hooks for what i just suggested after all: "It does this by using a custom dispatcher, Mojo::SNMP::Dispatcher, which attach the sockets created by Net::SNMP directly into the ioloop reactor."
22:51 thowe jberger, How have you been?  I've been so busy and out of it I completely missed that TPC even happened.  And I still haven't managed to watch any of the sessions.
22:51 jberger been good for the most part
22:52 jberger got a new module I've been working on: https://github.com/jberger/Mojo-Chrome
22:52 EvanCarr1ll joined #mojo
22:52 jberger how about you, all good?
22:52 thowe Came across a Go book the other day and I'm like "Oh, yeah.  I like programming.  What happened there?"
22:52 jberger I keep wanting to like Go and then remembering that I don't
22:54 thowe Mm.  I don't know if I will like it, but I might learn something from it.  I played with C++ one year and made a couple of things.  Added a water calculations tool to a QT4 homebrewing app.
22:54 jberger I suspect I'll look at Rust the next time I look at a compiled language
22:54 Grinnz rust is the big thing in that area these days
22:54 thowe Go seems to have some legs.  People keep making cool stuff with it.
22:55 thowe But I don't know anything.
22:55 jberger it is a performant systems language, good for building servers
22:55 thowe So, back to getting my head on straight.  Is there a way to daemonize my script that isn't using Mojo::Server, or ?
22:55 jberger but it doesn't seem very friendly
22:56 Grinnz Daemon::Control can be useful
22:56 Grinnz there's no need to use the Mojo stuff designed for webservers when it's not a web server
22:56 jberger thowe: you just want it to run forever right?
22:56 Grinnz you'd be using the ioloop and useragent more
22:56 thowe Grinnz, OK, that's the way I was leaning, but you never know what will happen in #Mojo :)
22:57 thowe jberger, run forever, and do the Mojo things in a mojo loop all non-blocky like
22:58 jberger so all you need to do is Mojo::IOLoop->start and make sure there is always something in the loop
22:58 thowe how do I "make sure there is always something in the loop"?
22:58 Grinnz Daemon::Control would be more for handling it as a service, double-fork startup and start/stop commands and such
22:58 EvanCarroll joined #mojo
22:58 jberger so especially if you are going to loop forever and make it do something every x seconds, that's a recurring timer, which is enough to keep the loop running
22:59 Grinnz within the program itself you'd just have the loop running forever like jberger says
22:59 jberger right, then as Grinnz says you probably want something that monitors it etc
22:59 jberger Daemon::Control or systemd (I think it has some restart facility)
22:59 thowe Oh, otherwise I need to "Mojo::IOLoop->start unless Mojo::IOLoop->is_running;" right?
22:59 Grinnz yeah service files are super easy to make manually in systemd
22:59 jberger at the outside of the application you know if the loop is running
23:00 Grinnz and can do most of what Daemon::Control does
23:00 jberger so just, Mojo::IOLoop->start is fine
23:00 thowe I seem to recall there being a couple of decent Daemonzing things on CPAN
23:00 thowe jberger, I don't follow you...  how do you know it is running?
23:00 jberger because you haven't started it :-P
23:01 Grinnz if it's not a systemd machine, read https://metacpan.org/pod/Daemon::Control#SYNOPSIS, this is basically the script you'd write to manage your other script that does all the work and runs the loop
23:01 thowe I know it is running because I haven't started it?
23:01 jberger you know it is NOT running because you haven't started it
23:01 * thowe scratches his head
23:02 thowe ah, OK
23:02 Grinnz thowe: if the loop stops, and you have nothing after ->start, then it will exit
23:02 preaction there's also runit
23:02 thowe ah, and the daemon will exit then, unless I screwed something up.
23:02 Grinnz yes, unless you make use of systemd's auto restart feature
23:02 Grinnz ;)
23:03 thowe Probably won't be using systemd.  Primary targets for me are Free and OpenBSD
23:03 preaction then i recommend runit
23:03 * thowe searches for runit
23:03 * Grinnz really needs to make more use of Daemon::Control, currently has a bunch of reinvented stuff
23:04 marty joined #mojo
23:06 thowe sending HUP signals to it and the like would probably be a good idea.  A HUP could re-read config file...
23:14 trone joined #mojo
23:15 sri guess i overestimated the interest in promise returning methods in Mojo::UserAgent
23:16 sri then again, i guess pretty much nobody has even tried promises yet
23:22 thowe I'm interested.  What's "promises"?  Be warned, I'm probably significantly more ignorant that your hoped-for audience.
23:22 thowe s/that/than/
23:23 thowe I don't see promise under the UA docs.
23:23 EvanCarroll joined #mojo
23:24 Grinnz it hasn't been built into the UA yet
23:25 Grinnz it's in https://metacpan.org/pod/Mojo::IOLoop::Delay
23:25 sri i started a patch and expected someone else would finish it today
23:25 sri https://gist.github.com/anonymous/692695c43f328b7d7ee270601e4549fc
23:26 sri just noticed that even testing is easy, just run all the methods against https://github.com/kraih/mojo/blob/master/t/mojo/user_agent.t#L50
23:26 sri really easy way to contribute something bigger
23:29 sri even rejection is easy to test with this https://github.com/kraih/mojo/blob/master/t/mojo/user_agent.t#L144
23:29 * sri shrugs
23:30 sri and for bonus points, contribute the same for Mojo::Pg
23:32 sri people are not as eager to contribute these days, even though the community has never been bigger
23:33 thowe It is my gift to the community that I don't contribute much code.
23:34 sri lol
23:34 Grinnz sri: i think you're just writing code faster than other people want to :P
23:36 thowe Here's my old script for building my Nagios configs.  This is about the level I am comfortable at: https://gist.github.com/thowe/e961f8c8f2d67465cf41a406b9b5f6c7
23:44 thowe and the channel is struck speachless ;)
23:56 EvanCarroll joined #mojo

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