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

IRC log for #mojo, 2016-09-23

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

All times shown according to UTC.

Time Nick Message
01:09 disputin joined #mojo
01:37 aaa2016 joined #mojo
01:39 tchaves joined #mojo
02:08 noganex_ joined #mojo
02:13 noganex joined #mojo
02:42 go|dfish joined #mojo
03:00 tchaves joined #mojo
03:39 tyldis joined #mojo
04:05 jberger I'm assuming this is a bad tester, iirc he's known to have a bad one:
04:05 jberger http://www.cpantesters.org/cpan/report/4c5bb994-80bf-11e6-aa34-d83b61871d4b
04:09 polettix joined #mojo
04:32 haarg his testers are often goofy, but i usually only ignore threading issues from him
05:54 Vandal joined #mojo
06:04 dod joined #mojo
06:30 cpan_mojo Mojolicious-Plugin-ReverseProxy-0.704 by OETIKER https://metacpan.org/release/OETIKER/Mojolicious-Plugin-ReverseProxy-0.704
06:50 mbudde joined #mojo
06:50 AndrewIsh joined #mojo
06:54 dod joined #mojo
07:06 dod joined #mojo
07:09 dod joined #mojo
07:33 trone joined #mojo
08:04 kes joined #mojo
08:18 sri jberger: and krebs has been kicked off akamai
08:27 polettix joined #mojo
08:32 polettix hi all
08:32 polettix is there a way to print all defined routes? I tried looking for “print” and “dump” in some docs and google for it, bu to no avail
08:33 polettix basically something like you get when an exception is thrown
08:33 sri http://mojolicious.org/perldoc/Mojolicious/Guides/Routing#Introspection
08:34 polettix thanks, is there a way to do that from inside a test?
08:35 osfabibisi joined #mojo
08:35 polettix tried ->to_string but it prints nothing… not sure if it’s because it’s the wrong way to do that, or there’s an error in the logic before that command
08:36 polettix s/command/statement/
08:39 polettix uhm ok doing a Data::Dumper::Dumper on the routes shows me something, thanks!
08:41 Atog joined #mojo
08:51 Atog hi all!
08:51 Atog can i use helpers as straight perl functions?
08:52 Atog i'm calling a helper who gets some htlm using mojo:ua then returns $tx->res->body
08:53 Atog but i'm getting a hash a output
08:53 Atog [Fri Sep 23 10:34:59 2016] [debug] $VAR1 = 'eb5ba503913e199ba24f1029610d467b';
08:53 Atog for example
08:56 sri as functions only in templates, otherwise only methods
08:58 Atog ok, thanks sri!
10:15 xdg joined #mojo
10:24 Atog woah, IOloop::Delay is such a blast to work with
10:25 nic :)
10:36 kaare joined #mojo
10:52 jamesaxl joined #mojo
11:02 tchaves joined #mojo
11:22 tchaves joined #mojo
11:29 * sri wonders if a fibonacci example would make sense for a subprocess section in the cookbook
11:30 sri since it's the famous anti node.js example
11:30 nic heh, that very idea came to me some months ago (before it was in core) but then I got sidetracked onto a million other things
11:31 sri thinking about generating the sequence for 10000 numbers and returning the last one to be returned with the response
11:32 sri no wait, the user should pass the number of iterations
11:45 polettix joined #mojo
11:55 sri hmm, i guess i should calculate the fibonacci sequence with recursion, to make it much much slower :)
12:12 sri not sure abut this as an example https://gist.github.com/kraih/88ccb2448e1df38481da2af71c04e896
12:13 sri going from fib(35) to fib(40) is somehow a jump from 5 seconds to over 300 seconds
12:13 sri there is something i don't quite understand here at play
12:15 sri fib(37) is 13 seconds
12:17 pink_mist using a recursive algorithm for fib() will cause that kind of behaviour, yeah
12:17 pink_mist memoization could likely speed it up significantly
12:21 pink_mist sub fib { state %cache = ( 0 => 0, 1 => 1 ); return $cache{$_[0]} //= fib($_[0] - 1) + fib($_[0] - 2); } # untested
12:25 sri actually, i think i'll use that to teach about inactivity timeouts in the docs
12:31 anton joined #mojo
12:31 pink_mist oh, and your solution is actually wrong, heh ... it gives '2' for fib(2), but it should be '1'
12:31 pink_mist and mine is wrong in other ways :P
12:35 sri yea, i just ported the fib example from https://gist.github.com/ry/2018811
12:36 sri generating fibonacci sequences is not as good of an example as i expected :/
12:37 good_news_everyon joined #mojo
12:37 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/viFjx
12:37 good_news_everyon mojo/master 604d478 Sebastian Riedel: add -i option to get command
12:37 good_news_everyon left #mojo
12:39 sri i would add --connect-timeout too, but -c and -C are already in use :S
12:39 pink_mist -t perhaps?
12:40 pink_mist though that might cause confusion
12:42 sri was thinking maybe -o
12:43 pink_mist
12:45 gizmomathboy joined #mojo
12:45 Dandre Hello,
12:45 Dandre I have an embeded perl template inherited from another. I need to pass some information from it to the base template. What is the best solution to do this? Use stash?
12:47 good_news_everyon joined #mojo
12:47 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vibeh
12:47 good_news_everyon mojo/master 57cb876 Sebastian Riedel: add -o option to get command
12:47 good_news_everyon left #mojo
12:50 good_news_everyon joined #mojo
12:50 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vibvC
12:50 good_news_everyon mojo/master 59cbc0d Sebastian Riedel: update jQuery to version 3.1.1
12:50 good_news_everyon left #mojo
12:52 sri Phil21:  *poke*
12:52 sri you wanted me to remind you of the server
13:13 ramortegui joined #mojo
13:21 good_news_everyon joined #mojo
13:21 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vibT6
13:21 good_news_everyon mojo/master c8b5be6 Sebastian Riedel: add subprocess example to cookbook
13:21 good_news_everyon left #mojo
13:22 blonewolfs joined #mojo
13:24 cpan_mojo Mojolicious-Plugin-ReverseProxy-0.705 by OETIKER https://metacpan.org/release/OETIKER/Mojolicious-Plugin-ReverseProxy-0.705
13:26 sri argh, of course this comes up now... https://github.com/kraih/minion/issues/44
13:29 cpan_mojo Mojo-Pua-0.006 by ALEXBYK https://metacpan.org/release/ALEXBYK/Mojo-Pua-0.006
14:09 sri xdg: i hope you're very very careful with this http://www.nntp.perl.org/group/perl.modules/2016/09/msg96139.html
14:10 sri should a first-come get taken away from someone by force CPAN will take irreparable damage
14:14 Lee i don't think that's in anyway being suggested
14:14 ptolemarch joined #mojo
14:14 xdg sri, the PAUSE administrators are taking this seriously and carefully
14:15 jberger note also that it is a lesson for all of us
14:15 jberger if you want a say in future governance of a module, don't give away first-come
14:17 xdg One "problem" we've discussed is that we have only a two-level system.  There's no way to delegate making/unmaking comaints – an administrative task – without giving up primary.
14:18 sri i think since the CPAN permission system is set up around dictatorships, there is only two options, either a) riba as first-come holder gets to decide who to pass it on to, or b) the PAUSE admins decide that the original founder of a project gets to have the final say about what happens
14:18 xdg well, the third and preferable option is that everyone involved actually discuss future plans and come to some agreement
14:19 sri right, assuming no agreement can be reached
14:19 jberger and actually, I think that behind the discussion of DBIC, the discussion around governance is what riba has been asking for for years
14:19 sri i think riba will force the issue, and you'll have to make a decision between the two options
14:20 jberger anyway, good luck xdg, and congrats on the linked thread staying civil so far
14:20 xdg jberger, thanks.  I hope we stay that way. :-)
14:20 sri if they pick option b i might ask for some catalyst control back ;p
14:21 jberger hehe
14:21 jberger do you really though? mojo is so nice
14:21 sri to make a point for sure, to get involved, naah
14:22 HtbaaPi_ joined #mojo
14:22 jberger heh, I should give first-come to plicease on Alien::Base and then turn around and join in the party \o/
14:23 sri i don't think they could pick option b, it would be a mess
14:23 HtbaaPi joined #mojo
15:15 Lee joined #mojo
15:19 disputin joined #mojo
15:21 coolo forgive my ignorance - what is PAUSE?
15:24 coolo found it
15:28 jberger coolo, caution, releasing to CPAN can be addictive
15:28 jberger please consult your doctor to see if you heart is healthy enough for learning about PAUSE
15:29 genio I don't think this should have been made so public. Putting your dirty laundry out there as if this is a TV show when nothing's yet been even done just makes the whole community look bad for no reason. For those of us without all of the background knowledge, this now just looks like a preemptive public airing *shrugs*
15:29 jberger riba wanted it public
15:29 jberger he's been going down this path for quite a while
15:30 jberger hopefully, it can come to some greater benefit
15:30 jberger as xdg said, an additional state of ownership between first-come and comaint might be useful
15:30 jberger (or as he kinda said, I'm interpolating)
15:30 coolo jberger: oh, I have one gem and package all the crap on cpan including tons of strange stuff from shlomif - who seems to have gone cpan addict :)
15:31 coolo I don't believe in my perl :)
15:31 jberger oh, see, uploading to CPAN can help your perl
15:31 jberger once I started uploading I felt a good kind of social pressure to write better code and especially better tests
15:32 jberger I think if I had never done that I might never have challenged myself to do better
15:40 coolo jberger: oh, I know how the drug open source works - https://libraries.io/github/coolo/contributions
15:46 Adura Hmm, Mojolicious is a cygwin package now, interesting.
15:46 Adura Or, it's been for some time, not sure.
15:46 pink_mist it has been for at least 1½ years, which was when I noticed it first
15:49 cpan_mojo Mojo-Pua-0.007 by ALEXBYK https://metacpan.org/release/ALEXBYK/Mojo-Pua-0.007
15:56 kaare joined #mojo
16:35 PryMar56 joined #mojo
16:35 ivi joined #mojo
17:02 dod joined #mojo
17:03 dod joined #mojo
17:05 dod joined #mojo
17:17 disputin joined #mojo
17:18 good_news_everyon joined #mojo
17:18 good_news_everyon [mojo] kraih tagged v7.08 at 6fb4b8c: https://git.io/vibD9
17:18 good_news_everyon left #mojo
17:19 polettix I have a Mojo::URL object whose path is “/path/to/“ with a trailing slash
17:19 good_news_everyon joined #mojo
17:19 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vibDp
17:19 good_news_everyon mojo/master 6b4ce61 Sebastian Riedel: bump version
17:19 good_news_everyon left #mojo
17:20 polettix then I have a Mojo::Path object $path where I called $path->leading_slash(0)
17:20 polettix if I print this $path it indeed lacks the leading slash
17:20 polettix now I have that $url->path($path) and $url->path(“$path”) yield different results
17:20 polettix am I missing something?
17:27 Grinnz sri: do you think it would be worthwhile to add a delay helper for subprocesses, like the fork_call plugin i made jberger add? ;)
17:27 sri don't think so
17:28 Grinnz it basically just wrapped the fork_call in the delay helper so that it would set render_later and save the $tx etc
17:31 Grinnz i just thought of it because the example as you added is a little incomplete without doing that stuff, i think
17:45 genio sri: https://v1.metacpan.org/pod/release/CREIN/Monorail-0.2/lib/Monorail.pm#make_migration   seems like a feature to maybe consider adding.
17:45 stefan What's the best way to restart minion workers after updating code in the app?
17:51 sri stop old worker, start new worker
17:52 tchaves1 joined #mojo
17:52 sri :)
17:52 sri genio: i don't see it
17:54 dod joined #mojo
17:55 jberger Grinnz: I can't say I've ever used the helper I added for you either ;-P
17:55 Grinnz it's the only way i've used fork_call, so :P
17:55 jberger which is why I haven't removed it :D
17:56 genio sri: a diff feature of sorts. If I'm doing lots of dev-work with other people on a project and we're all working something out, a diff tool of sorts to ensure our current migrations create what our schema looks like in the all kinds of crazy dev environment.  paying proper attention should always negate the need for this, but a simple check seems like a nice feature
17:57 Grinnz it doesn't sound that simple...
17:57 Grinnz i think it works better for something like Monorail because it already has the abstraction of the database
17:57 sri genio: i really don't see how that would fit into Mojo::Pg
17:58 jberger even IF you wanted to compare the actual versus expected schema (for ostensibly the same schema) it is really outside of the scope for Mojo::Pg to generate the DDL to get it into sync
18:00 tchaves joined #mojo
18:01 genio yea, I should have thought that one out a bit more than going "oooh"
18:02 Grinnz maybe there would be room for something that takes a temp database, maybe DBIx::TempDB, which would be populated by your migrations from scratch, and compare it to the existing database
18:02 Grinnz how to do that in each database backend would be very diffferent though
18:03 Grinnz (to clarify, i mean something separate on CPAN :)
18:10 tchaves joined #mojo
18:28 polettix joined #mojo
18:40 mpapec joined #mojo
19:28 jamesaxl joined #mojo
19:53 bombuzal_ joined #mojo
20:08 dod joined #mojo
20:20 Janos joined #mojo
21:09 Phil21 siri: sorry about the delay, I think I can commit to handing something off to you next week
21:12 jberger sri: ^^
21:12 stephan48 haha
21:12 polettix joined #mojo
21:13 stephan48 sri: how is the weather in Hamburg tomorrow?
21:15 stephan48 i am actually using the hyperx headset now for a few days.. i am not that much impressed by the sound(yea yea i am not worth a damn audiophile) and a bit annoying at it not having media keys on the side but i am totally happy with its comfyness. easly wearable for hours. i wish i could plug it into my desk phone :D would be so awesome. compared to the jabra headset
21:16 stephan48 and it works damn nicely with my smartphone. for that alone i would keep it
21:23 sri stephan48: what are you comparing them to that you're disappointed by the sound?
21:24 stephan48 logitech G930, i fell like can't really find a difference.
21:25 stephan48 it is atleast comparable if not slightly better but no hudge jump
21:27 stephan48 but its obviously quite a bit lighter than the g930 because it does not need to carry a battery & soundcard inside
21:31 sri for both music and gaming?
21:33 stephan48 i think for gaming they perform better than the g930 - specially for directional sounds with the virtual 7.1.
21:36 stephan48 for music the 7.1 has to be disabled or the outcome is funny for some stuff - but i find myself listening to music more since I got them. can just plug them either into the pc or the phone. since they are barely noticeable I can listen to music all day. with the g930 i had to stop somewhen because the got uncomfortable
21:36 stephan48 (and the akku ran empty)
21:36 sri like most gaming oriented headphones they seem to have a huge soundstage and low bass, making them less good for listening to music
21:36 * sri has started to learn audiophile terms :)
21:36 stephan48 yes the bass thing i noticed
21:36 stephan48 not that the g930 had any more of it
21:37 sri the music i normally listen to is not very bass heavy though
21:37 stephan48 yup mine is neither
21:37 stephan48 i dislike bass heavy music :D
21:37 sri like i said before, for electronic music i find them rather pleasant
21:39 sri this is the kinda stuff i really like listening to while programming :) https://www.youtube.com/watch?v=bvkwTsTrWeM
21:41 sri really wonder what the beyerdynamic mmx 300 are optimized for now
21:42 * Grinnz would definitely need some bassy headphones if he wanted something for his music ;)
21:43 stephan48 haha i am rather biased towards electronic music :D your suggestion is actually something quite decent
21:44 stephan48 i developed my distaste with mainstream techno and goa/trance stuff and kind of projected them towards the whole "electronic music" thing as negative
21:48 pink_mist I'm not sure "biased towards" is the right phrase to use =) "biased against" seems more like what you mean :P
21:49 stephan48 ooops. thanks. what of a slip :D
21:49 Grinnz not electronic; metal ;)
21:51 stephan48 *groans* not another one of these metal fans :D
21:52 * sri also likes a little alt rock... <3 a perfect circle
21:52 Grinnz APC is even bassier than some of the metal i listen to :P
21:52 sri heh
21:53 Grinnz like Magdalena and The Package
21:53 stephan48 at my previous job one of the first sentences my coworkter saied to me was "got any problem with metal? " "no, just nothing effective against it".  nowadays i am mostly indifferent to it
21:53 Grinnz stephan48: fire, ground, and fighting are super effective
21:54 stephan48 haha there was always one stream running Metal based music :D
21:55 sri when i want to sound really pretentious i also say that i like godspeed you black emperor ;p
21:55 Grinnz (that was a pokemon reference, btw)
21:56 stephan48 (ah in that context it makes slightly more sense. )
22:08 jberger <3 APC
22:08 jberger saw them up close once
22:08 jberger Amazing
22:09 jberger I even play a few apc songs on the guitar from time to time
22:10 jberger Btw, when i play music, these are my "headphones"
22:11 jberger http://img.audiofanzine.com/images/u/product/normal/peavey-5150-412-straight-21499.jpeg
22:11 pink_mist wow, strapping those around your head could lead to serious damage :P
22:12 jberger Hehe
22:12 stephan48 might induce severe neck pain after extended usage. not to tell about the ear damage.
22:12 jberger I don't have the matching amp, didn't have the money at the time
22:12 jberger Use this instead http://www.el-amin97.com/siteimages/peavey%20musician%20400.jpg
22:12 jberger Still 200w \m/
22:13 jberger Yeah, ear damage is a thing
22:13 jberger If i could go back and stop young me from doing something it would be wrecking our ears
22:13 jberger But it was pretty fun
22:33 stefan_ joined #mojo

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