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

IRC log for #mojo, 2016-04-08

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

All times shown according to UTC.

Time Nick Message
00:02 woz joined #mojo
00:09 Adura joined #mojo
01:00 bpmedley I hope the ubuntu for windows is less quirky than GnuWin32
01:19 genio I'm still unable to get the latest build to allow me to have the Linux subsystem.  :/
01:19 bpmedley https://github.com/brianmed/ForkAndGo/blob/master/eg/minion.pl <-- Anyone have time to look over the code?
01:36 tchaves joined #mojo
02:04 woz joined #mojo
02:20 asarch joined #mojo
02:31 bpmedley jberger : All I see on the page with the Vue stuff is a text input
02:36 noganex joined #mojo
02:46 tchaves1 joined #mojo
02:50 jasanj https://github.com/kraih/mojo/issues/944
02:51 jasanj I got this issue with Mojo::Reactor::EV
03:00 bpmedley jasanj : Hrmm, would you try with $ export MOJO_REACTOR=Mojo::Reactor::Poll ?
03:03 jasanj bpmedley: $ENV{MOJO_REACTOR} = 'Mojo::Reactor::Poll'  ?
03:03 bpmedley jasanj : You may need that in a BEGIN block.
03:04 jasanj -- Reactor initialized (Mojo::Reactor::Poll)
03:04 jasanj -- Reactor initialized (Mojo::Reactor::P
03:04 jasanj oll
03:05 bpmedley Cool, did you try minion.pl?
03:05 jasanj which minion.pl ?
03:05 woz joined #mojo
03:06 bpmedley https://github.com/brianmed/ForkAndGo/blob/master/eg/minion.pl
03:07 jasanj seems this not relate to my issue ?
03:08 thowe I had a very positive reaction today from my CEO when I showed him the stuff I had been working on in Mojo.
03:08 jasanj my issue is I didn't instsall EV moduel ,but IOLoop will eventually use a Mojo::Reactor::EV as reactor
03:08 bpmedley jasanj : zomg ponies, I had my context backwards.. sorry, I didn't ready your gist fully
03:09 bpmedley thowe++
03:10 thowe bpmedley, He was also impressed that the Mojo community had people in it willing to spend so much time with me to get me up to speed on the relevant technologies.
03:11 thowe So I asked if I could use the company credit card to pay for my YAPC trip :)
03:12 bpmedley Did they left you?
03:12 bpmedley *let
03:12 thowe After I argued that it would largely be covered by the "miles" we've accumulated, he said I could.
03:13 jberger thowe: Nice! Well played
03:13 thowe Of course, now I've promised to build an appointment management system into it for the field techs, so I'll have to deliver on that...
03:15 thowe I gotta learn minion
03:15 bpmedley thowe : http://demos.telerik.com/kendo-ui/scheduler/index
03:17 thowe Yeah, the appointment schedule view javascript is the part I am most confused how to handle...
03:17 bpmedley Kendo UI is amazing
03:18 thowe But for us it isn't a stand alone thing, it has to be an extension of our existing task, customer, and user stuff.  The backend will be trivial, I just need to display sensibly.
03:23 thowe I already have the model designed, I just need to up my javascript game.  Maybe there's a UI thing I can use.
03:32 mcsnolte joined #mojo
03:46 dvinciguerra joined #mojo
04:31 irqq joined #mojo
05:07 woz joined #mojo
05:13 inokenty-w joined #mojo
05:42 melo joined #mojo
05:52 Lee joined #mojo
05:56 cpan_mojo Mojolicious-Plugin-RoutesAuthDBI-0.202 by MCHE https://metacpan.org/release/MCHE/Mojolicious-Plugin-RoutesAuthDBI-0.202
05:56 Bender AD HUT!
06:06 dod joined #mojo
06:15 woz joined #mojo
06:23 dod joined #mojo
06:25 dod joined #mojo
06:48 kes joined #mojo
07:06 woz joined #mojo
07:12 AndrewIsh joined #mojo
07:14 csroli joined #mojo
07:22 trone joined #mojo
07:38 osfabibisi joined #mojo
07:40 osfabibisi joined #mojo
07:50 woz joined #mojo
07:54 dod joined #mojo
08:13 Vandal joined #mojo
08:20 osfabibisi joined #mojo
08:36 woz joined #mojo
08:36 woz joined #mojo
09:15 irqq joined #mojo
09:16 meshl joined #mojo
09:58 jkramer joined #mojo
09:58 jkramer Ahoy!
10:00 jkramer I have an around_action hook and a route '/:slug'. It routes to the correct action and the hook is executed as well, however within the hook, $c->param('slug') is not set. Does the population of the parameters happen sometime later?
10:01 jkramer Within the action $c->param('slug') is there
10:05 jkramer Hmm seems to be in the stash though
10:05 jkramer Oh well, good enough for me
10:07 mishanti1 Has there been any discussion about including information in the documentation about what kind of type you get back when calling various methods?
10:08 mishanti1 I'm thinking so that a reader does not have to create snippets of code to execute and data-dump or thrawl the source to see what kind of return type methods give.
10:11 pink_mist doesn't it already say that?
10:12 mishanti1 I will double-check. I might have been looking in the wrong places.
10:12 cpan_mojo Mojolicious-Plugin-RoutesAuthDBI-0.204 by MCHE https://metacpan.org/release/MCHE/Mojolicious-Plugin-RoutesAuthDBI-0.204
10:12 Bender AT HUD!
10:13 pink_mist take https://metacpan.org/pod/Mojolicious::Controller#render_maybe for example, it clearly shows you get a boolean back from ->render_maybe
10:14 mishanti1 Yeah, Mojolicous::Controller has become very well documented, and yes there it does specify return types.
10:16 mishanti1 I was looking at some other packages earlier that did not have that same level of completeness. I'll either file an issue or submit a patch when I see another example of it.
10:16 cpan_mojo Mojolicious-Plugin-Sessions3S-0.003 by JETEVE https://metacpan.org/release/JETEVE/Mojolicious-Plugin-Sessions3S-0.003
10:20 Kripton joined #mojo
10:22 meshl joined #mojo
10:25 woz joined #mojo
10:36 noganex_ joined #mojo
10:57 tchaves joined #mojo
10:59 noganex joined #mojo
11:08 kaare joined #mojo
11:12 tchaves joined #mojo
11:34 woz joined #mojo
11:38 bpmedley https://github.com/brianmed/ForkAndGo/blob/master/lib/Mojolicious/Plugin/ForkCart.pm <-- jberger , sri (or anyone else) have time to look over the code?
11:43 tinita hi, I have a question about JSON::Validator/Swagger2
11:44 jkramer left #mojo
11:44 tinita is jan henning here? forgot his nickname
11:44 sri mishanti1: yes, comes up every now and then, and usually ends with me asking for good conventions ;p
11:44 sri tinita: he's batman
11:44 tinita sri: danke
11:44 tinita batman: ping =)
11:45 tinita i'm reading a YAML spec, and booleans get converted to 1 or ''
11:46 sri mishanti1: i see the whole $bytes/$chars/$bool thing for documenting it more as a temporary fix
11:46 tinita and JSON::Validator actually has the logic to deal with that, but it doesn't
11:47 woz joined #mojo
11:52 batman tinita: join #swagger
11:54 sri is this the right approach? https://github.com/kraih/mojo/pull/945
11:55 sri i mean delete_package after require?
11:55 sri not the specific implementation, we already have alternatives that cover more edge cases
11:55 sri just the basic approach
11:59 asarch joined #mojo
11:59 good_news_everyon joined #mojo
11:59 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vV1h7
11:59 good_news_everyon mojo/master bfc5449 Sebastian Riedel: fix bug in Mojo::Loader where classes with exceptions could not be loaded twice (closes #945, closes #944)
11:59 good_news_everyon left #mojo
12:00 sri perl actually changes the error message
12:01 sri in a pretty unhelpful way
12:01 bpmedley sri : What if the package with the exception has no new method?
12:03 sri we don't really care about that case
12:05 sri if you want it to care, then you have to argue for it ;p
12:05 bpmedley Understood; I'm trying to increase my level of comfort with the code base by asking questions.
12:06 sri it's called load_class after all, what's a class without a new method?
12:07 bpmedley Not all classes in perl use new.  However, that's the general usage these days.  For example, a singleton class might just use "instance".
12:07 sri i'm glad the borked error message is backwards compatible to 5.10.1 though
12:07 sri even if it's a little annoying
12:07 ribasushi perl -MDBIx::Class::Schema -e 'warn DBIx::Class::Schema->can("new") || "NOPE"'
12:08 sri https://rt.perl.org/Public/Bug/Display.html?id=121787
12:09 sri hope it ends up with the original error getting tacked on
12:12 sri i take it back, you don't just have to argue for it, you also have to send a patch
12:14 jberger !!keys %{"$pkg::"}
12:17 ribasushi jberger: that's also not great, as BEGIN {} stuff may set various global vars, e.g. @VERSION. The general technique is to look for coderefs, look at Class::Load for more edge cases
12:17 ribasushi errr $VERSION
12:18 jberger True
12:23 batman is it easy to install Net::SSLeay and IO::Socket::SSL in osx..? it's been so long ago i can't remember how i did it :/
12:23 sri batman: not anymore
12:23 batman sri: because apple dropped openssl?
12:23 sri on el capitan you have to install openssl with homebrew and build Net::SSLeay against that
12:24 sri on the plus side, you now get new openssl features
12:24 sri like alpn
12:24 meshl joined #mojo
12:24 batman ok :)
12:24 sri or sni
12:27 batman not sure if this is a good idea, but running it either way: brew link openssl --force
12:29 batman i wonder if i should make an alternative to CPAN::Uploader to avoid installing LWP :)
12:31 cpan_mojo Mojolicious-Plugin-AssetPack-1.02 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-AssetPack-1.02
12:33 jberger batman: there is one already, it is mojo cpanify
12:34 jberger Core module i use all the time
12:34 batman jberger: does it work for generic modules or mojo apps?
12:34 jberger It's just a tarball uploader
12:34 jberger Generic
12:35 batman cool :)
12:46 woz joined #mojo
12:57 orev joined #mojo
13:07 melo joined #mojo
13:11 woz joined #mojo
13:16 HtbaaPi Minion executes the startup routine of your Mojolicious app, right?
13:17 HtbaaPi I'm using Mojolicious::Plugin::I18N and when using it through Mojo it doesn't seem to load my language modules
13:20 HtbaaPi hmm, I think that may be because the I18N plugin initializes them in a before_dispatch hook
13:23 woz joined #mojo
13:37 woz joined #mojo
13:38 cpan_mojo Mojolicious-Plugin-Sessions3S-0.004 by JETEVE https://metacpan.org/release/JETEVE/Mojolicious-Plugin-Sessions3S-0.004
13:59 dvinciguerra joined #mojo
14:15 ivi joined #mojo
14:29 mcsnolte joined #mojo
14:55 lluad joined #mojo
15:03 woz joined #mojo
15:45 woz joined #mojo
15:59 dod joined #mojo
16:10 mdom https://metacpan.org/source/SRI/Minion-5.02/lib/Minion/Worker.pm#L10
16:10 mdom sri: Doesn't that fail if the worker id is zero?
16:10 mdom Or is there anything that prevents the id from being zero?
16:12 mdom I'm working on my own Backend and using the pg testsuite as reference. My code is failing at my version of https://metacpan.org/source/SRI/Minion-5.02/t/pg.t#L155
16:14 Grinnz_ mdom: it uses the default nextval() on the serial sequence which always starts with 1
16:14 Grinnz_ similar to most other database increment ids
16:15 mdom So that's a assumption that is baked into minion ... okay, np then, i can just emulate that
16:16 mdom I'm not using any kind of sql backend, so i have my own version of nextval... :)
16:17 meshl joined #mojo
16:22 PryMar56 joined #mojo
16:23 marty joined #mojo
16:27 mdom Grinnz_: Thanks starting at one solved the problem ...
16:30 mdom tdd is much more fun when somebody else write the test suite
17:06 woz joined #mojo
17:29 vicash hello. is there a way to detect that when a websocket, that is receiving data, is closed, it is closed by the server because there is no more data to send vs it being closed because the user migrated away from that page with the open websocket ?
17:32 vicash i guess i can send a message with the finish() call to detect that
17:54 perlpilot vicash: aye, you have to do something like that
18:05 SmokeMachine hi there! is it right a job enqueued to minions be ran more than once?
18:08 woz joined #mojo
18:11 SmokeMachine ok! I got!!! Im doing that from outside any function and running that code with hypnotoad... than every process is enqueuing that job...
18:13 SmokeMachine how can I run a function on server startup only once?
18:15 tencendur joined #mojo
18:21 pink_mist uhm, surely: if the server closed it, it should know that it did? otherwise it was the client that navigated away. and vice versa: the client-side code should know that it was navigated away from so that's why it was closed. otherwise the server did it.
18:21 * pink_mist wonders what kind of problem vicash /actually/ has
18:22 cpan_mojo Mojolicious-Plugin-AssetPack-1.03 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-AssetPack-1.03
18:23 batman nic, sri: ^^^ reloader is back :) https://github.com/jhthorsen/mojolicious-plugin-assetpack/commit/1c92533677407dac5afdcbe38c461450584ac38a
18:34 SmokeMachine anyone?
19:09 dvinciguerra joined #mojo
19:10 batman SmokeMachine: not sure if you can.
19:10 batman what are you trying to solve?
19:11 pink_mist isn't this what sub startup { ... } is for? or am I confused about when that's run?
19:11 SmokeMachine I am writing a rest server that automatically starts a minion job every X time...
19:12 SmokeMachine pink_mist: it didn't work for me with mojolicious::lite
19:12 batman pink_mist: startup() is called once in parent and once after the fork iirc
19:13 pink_mist batman: oh .. thought it was just in the parent
19:13 batman sorry... not the parent, but at least on hot reload startup() is called twice
19:14 SmokeMachine any other idea?
19:14 batman not sure what to call the process that reloads the running process...
19:15 batman SmokeMachine: why do you have to start the recurring job from inside hypnotoad ?
19:15 genio I think it's time for me to go home.  I just read that as "not sure what to call the princess that reloads the ..."
19:15 pink_mist what happens if you put it outside the startup sub? so the code is simply run when your module is loaded?
19:15 batman pink_mist :)
19:16 batman pink_mist: same thing. the code is loaded multiple times
19:17 pink_mist :<
19:17 SmokeMachine batman: because I have to run that recurring job after I start the server... and I don't want to start it manually... but I am going to have the same problem if I try to warmup my caches on the server startup...
19:20 batman you almost never "have to" anything... there's always another way
19:20 batman but... maybe you can search for an existing task and then just not add another if it exists?
19:21 batman like $minion->backend->list_jobs(0, 1, {task => "unique_warmup_stuff"});
19:21 SmokeMachine batman: thanks! I think that'll work...
19:22 SmokeMachine but shouldn't the server backend emit a event when starting? (or something like that?)
19:22 batman you could also add locking and then cancel out the other tasks
19:23 batman locking is quite simple on linux using symlinks...
19:23 batman server backend? do you mean hypnotoad?
19:24 pink_mist the list_jobs hack seems racy to me, but I'm not really sure how Minion works, so I could be wrong
19:25 batman pink_mist: indeed it is.
19:25 batman :P
19:25 batman SmokeMachine: ignore my suggestion
19:26 batman i would really go for another solution, but if you must force through your idea then i would suggest locking from inside the task and then don't do anything if the lock exists
19:27 batman i haven't used it myself, but i would use something like this: https://metacpan.org/pod/Lock::File
19:28 batman you could also probably implement locking in the database... not sure which backend you're using though
20:10 woz joined #mojo
20:17 punter joined #mojo
20:28 mcsnolte joined #mojo
20:42 cpan_mojo Mojolicious-Plugin-AssetPack-1.04 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-AssetPack-1.04
20:58 trone joined #mojo
21:06 melo joined #mojo
21:12 woz joined #mojo
21:40 rwp joined #mojo
21:45 disputin joined #mojo
21:53 sri i really underestimated borderlands, pretty good game series
21:53 sri basically fps diablo with a story :)
21:53 Adura Bullet sponge enemies.
21:56 preaction yeah. borderlands is for those times where mass effect is too intellectual ;) <3
21:57 Adura Yeah, reddit-tier writing.
21:59 sri compared to diablo it's basically shakespeare
22:00 preaction i mean, i prefer borderlands's nihilism, it's funny. marcus is hilarious
22:00 sri jack is one of the best villains ever
22:01 preaction If you shop anywhere else I'll have you killed!
22:02 preaction jack had a bit more ambiguity in his villainy than the previous borderlands villains, which i'm on the fence about
22:03 preaction i mean, pandora is kind of a bad place to live, that's not really up to debate.
22:03 dvinciguerra_ joined #mojo
22:04 preaction but the choice between complete anarchy or totalitarian facism doesn't seem like much of a choice, or a difficult one...
22:05 sri he thinks he's the hero, the pre-sequel gives the character a lot of depth
22:06 preaction yeah? i've got to play that. i think i just bought the super-plus-special edition with all the DLC. not sure if it has the pre-sequel in it
22:06 preaction someone recommended Tiny Tina's Assault on Dragon Keep
22:07 sri have not yet played any of the dlcs
22:07 preaction apparently that one is Tiny Tina as a DM for a role-playing game, and all the regular borderlands characters are represented
22:08 sri oh, neat
22:08 rwp left #mojo
22:09 preaction you can play as Claptrap in the pre-sequel!?
22:10 sri yea, he's pretty weak solo though
22:10 preaction aww...
22:11 preaction okay, steam lets me buy a bundle, and if i have almost everything in it, will discount the things i don't have? that's awesome!
22:13 preaction well, looks like i know what i'll be doing this weekend
22:13 sri you can even play as a jack clone :)
22:48 meshl joined #mojo
22:49 marty joined #mojo
22:49 marty joined #mojo

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