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

IRC log for #mojo, 2016-08-25

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

All times shown according to UTC.

Time Nick Message
00:37 Pierre joined #mojo
01:07 Pierre joined #mojo
01:16 genio OK, seriously. This Charles Whitener guy _has_ to quit using my email address for everything
01:19 genio I think I have found his home phone number.  He's getting a call tomorrow
01:21 Pierre joined #mojo
01:23 Pierre joined #mojo
01:48 Grinnz lol
01:49 jberger but that's your name ... right?
01:49 * jberger ducks
01:49 * jberger shoves purl down a well
01:49 jberger drat, I knew I'd mess that one up
01:51 noganex joined #mojo
01:53 jberger /me throws purl down a well
01:53 * jberger throws purl down a well
01:53 purl seven days
01:53 jberger damn that wasn't even fun by the time I did it right
01:59 noganex_ joined #mojo
02:07 jberger ummm, seriously, this happened? http://status.npmjs.org/incidents/dw8cr1lwxkcr
02:08 preaction i wonder if PAUSE properly indexes all of the core Perl modules...
02:09 preaction i think it would. i know it's tried downloading perl on me a few times
02:09 jberger I like the module "install" though
02:09 * genio pushes purl down the stiars
02:09 jberger s/module/dist/
02:09 jberger genio: hahahaha
02:09 purl LOLCON 4 reached.
02:09 genio she must be quiet in here
02:09 jberger its that kinda day
02:09 jberger you misspelled stairs
02:09 genio dangit
02:10 * genio goes to find a beer
02:10 * jberger hands genio a G&T
02:10 genio thanks, batman!
02:10 genio :)
02:10 * jberger looks around
02:12 genio Well, I've now completed 45.75 hours of work this week so far.  I think I deserve to go outside with the dogs and enjoy a beer for a few minutes
02:13 genio it will be so nice to be back to normal hours next week.
02:13 sri i'll allow it
02:35 genio ok, beer break over.  back to work for an hour or so
02:44 zivester joined #mojo
02:48 noganex joined #mojo
03:25 Pierre joined #mojo
03:26 simcop2387 joined #mojo
03:43 Pierre joined #mojo
04:19 prajith joined #mojo
04:41 plicease_ joined #mojo
04:47 itaipu joined #mojo
04:53 Pierre joined #mojo
05:11 Pierre joined #mojo
05:22 tools joined #mojo
05:29 Pierre joined #mojo
05:47 Pierre joined #mojo
05:52 Guest-questX joined #mojo
05:59 Pierre joined #mojo
06:01 newbie joined #mojo
06:46 AndrewIsh joined #mojo
06:50 dod joined #mojo
06:55 dod joined #mojo
06:57 mbudde joined #mojo
07:02 mpapec http://stackoverflow.com/questions/39066238/cant-install-ev-cpan-module-on-alpine-linux
07:03 mpapec and note from Marc:
07:03 mpapec --------
07:03 mpapec >.. should I expect event loop to start blocking when fork is issued?
07:03 mpapec You can expect things to break badly after fork, if you plan to use EV in
07:03 mpapec a child process.
07:03 mpapec However, that's extremely difficult to do anyway, even if fork detection
07:03 mpapec works, so it's best to avoid it. Most programs just use EV int he main
07:03 mpapec program and don't try to do so in a child process.
07:03 mpapec --------
07:03 mpapec \o/
07:05 mbudde joined #mojo
07:06 mpapec sri: does this apply in case of mojolicious?
07:06 mpapec (forked workers using EV?)
07:09 tools joined #mojo
07:11 Vandal16455 joined #mojo
07:15 kes joined #mojo
07:20 batman joined #mojo
07:25 inokenty-w joined #mojo
07:47 bobkare mpapec: iirc mojo does it the other way around - the event loop is only started in the workers
07:47 osfabibisi joined #mojo
07:51 mpapec bobkare: this is comforting as alpine can then be used for Mojo docker deployment (alpine has smallest images)
08:07 Grinnz also, the poll loop may be fast enough without EV
08:07 Grinnz it's very efficient
08:35 VVelox joined #mojo
08:36 mvorg joined #mojo
08:39 Pierre joined #mojo
08:40 tools joined #mojo
08:43 dod joined #mojo
08:46 Dandre joined #mojo
08:51 cuechan joined #mojo
09:08 Pierre joined #mojo
09:35 cuechan joined #mojo
09:35 dexteruk Hi when we recieve a data that is HTML eliment format ie %20 mojo converts this into plain string how can i keep it in this format
09:43 tools joined #mojo
09:52 pink_mist what do you mean? I just checked a webpage which included a %20 and a mojo get on that webpage showed the %20 intact
09:54 dexteruk pink_mist: sorry i dont know the technical terms.. the curl passes data v=test%20hello and in the $self->param('v') it removes the %20 and replaces it with a space
09:55 dexteruk i want to keep the html eliments
09:57 pink_mist well first of all, that's url format, and that's how it's supposed to be. if you want to preserve the %20 you'll need to encode the % character, so make curl pass %2520 instead of %20
09:59 dexteruk the curl is being created by another application so i cannot change the curl output
09:59 dexteruk what i want to do is raw data
09:59 dexteruk what i want to do is grab the raw data
10:00 pink_mist the raw data is with the %20 converted to a space. you want the *encoded* data, in which case you'll probably need to encode it again yourself
10:01 pink_mist see https://metacpan.org/pod/URI::Encode
10:02 mpapec joined #mojo
10:03 pink_mist or https://metacpan.org/pod/Mojo::Util#url_escape
10:05 mpapec Grinnz: are there some comparison charts of EV vs. native loop?
10:06 meshl joined #mojo
10:09 dexteruk if i dump $self->tx->req->body_params it shows me the data i need is in string
10:10 dexteruk but if i do self->tx->req->body_params-string it returns me nothing
10:10 dexteruk $self->tx->req->body_params->string
10:10 dexteruk it returns nothing
10:18 mpapec1 joined #mojo
10:32 mpapec joined #mojo
10:32 kes jberber: https://github.com/kraih/mojo/pull/993
10:40 pink_mist kes: but $@ passed to the exception helper gets copied to $e inside sub _development immediately; there's no clobbering of $@ before that
10:41 kes until that sub is called there are many different calls
10:41 kes and there *may* something happen which changes $@
10:44 kes Yeah, in current implementation all is fine, but in future it maybe occasionally broken. So it safer to save value of $@
10:44 kes before call
10:51 kaare joined #mojo
10:51 Pierre joined #mojo
10:55 kes for example: this: Mojolicious/Renderer.pm:56 sgu get_helper or this https://github.com/kraih/mojo/blob/master/lib/Mojolicious/Controller.pm#L27
10:56 sri what about that line in Mojolicious::Controller?
10:59 tchaves joined #mojo
11:00 mpapec1 perhaps local $@ = $@;
11:01 mauke I don't trust 'local $X = $X' for builtin variables. there's a perl bug about that somewhere
11:01 sri anyway, no matter what, #993 is the wrong solution
11:03 tchaves joined #mojo
11:08 mpapec func("$@") if its plain string :-o
11:10 pink_mist if it's a Mojo::Exception, that should be preserved, mpapec
11:11 mpapec1 yes, it's not a general solution..
11:21 Zx3 joined #mojo
11:44 cuechan joined #mojo
11:46 kes sri: > this pull request would be too limited in scope.
11:46 kes which scope you mean?
11:56 tools joined #mojo
12:00 pink_mist kes: pretty sure he means: your pull request only changed one single instance of $@ being passed, whereas if it was agreed that this should be done at all, _every_ instance of passing $@ should be fixed
12:01 kes pink_mist: thank you. Now I understand
12:03 sri wow https://twitter.com/clkao/status/768701237101416448
12:05 pink_mist cool
12:09 jberger yeah, I saw that, very cool
12:09 Pierre joined #mojo
12:22 kes is this will be ok now? https://github.com/KES777/mojo/commit/f31284ced613a41815648792ba9ff7123fbfc2b0
12:22 kes I am unsure a bit about this line: https://github.com/KES777/mojo/commit/f31284ced613a41815648792ba9ff7123fbfc2b0#diff-892d699369fe9beca14818a2019adc36R49
12:22 pink_mist did you completely ignore the first part of the rejection notice?
12:24 kes I do not understand what are you asking for ((
12:25 pink_mist you're going to haveto _convince_ sri that this is worthwhile
12:33 kes https://github.com/KES777/mojo/commit/99ae80 In this case $e is *always* empty. I think **early copy** of 'my $e = $@' will worth. This is safe. But the **later copy** https://github.com/kraih/mojo/blob/master/lib/Mojolicious/Plugin/DefaultHelpers.pm#L88 may be clobbered as in example above.
12:33 kes In this case that as: my( $page, $c, $e ) = ( $_[0], $_[1], $@ ). Which is wrong
12:34 kes is not?
12:34 purl Is too.
12:35 kes so if this commit: https://github.com/KES777/mojo/commit/f31284ced ok OK now let me, please, open pull request. If not - forget about it.
12:41 pink_mist I doubt you've convinced sri ... it certainly hasn't been a convincing argument for me
12:47 sri yea, am not convinced
12:53 zivester joined #mojo
13:06 oalders for minion priority, which will get processed first, 0 or 5?
13:06 sri 5
13:06 oalders thanks
13:17 cpan_mojo Mojolicious-Plugin-Recaptcha-0.64 by DMITRYNOD https://metacpan.org/release/DMITRYNOD/Mojolicious-Plugin-Recaptcha-0.64
13:18 cpan_mojo Mojolicious-Command-generate-lexicon-0.997 by UNDEF https://metacpan.org/release/UNDEF/Mojolicious-Command-generate-lexicon-0.997
13:18 mcsnolte joined #mojo
13:27 CandyAngel joined #mojo
13:49 gizmomathboy joined #mojo
14:23 asarch joined #mojo
14:37 taichi joined #mojo
14:42 tools joined #mojo
15:03 zivester joined #mojo
15:11 ptolemarch joined #mojo
15:25 PryMar56 joined #mojo
15:30 prajith joined #mojo
15:37 disputin joined #mojo
15:44 sri kes: could you please not post in mailing-list threads from 2011
15:45 kes sri: Ok
15:46 kes I google this theme (about custom exception handling), but I do not find anything except this one. So I post what I dig, maybe someone will be interested in.
15:48 sri nobody is interested in threads from 2011
15:55 michael joined #mojo
16:01 disputin joined #mojo
16:04 jehdin So I'm reading through the source for Galileo, and I'm getting stumped by a thing. Where || how is GALILEO_HOME populated?
16:06 jberger the environment variable?
16:06 purl i heard the environment variable was for setting it globally
16:06 jberger thanks purl
16:06 jberger botsnack
16:06 purl thanks jberger :)
16:06 alilles joined #mojo
16:07 jehdin jberger: yes
16:07 jberger I guess I don't understand your question then
16:07 jberger are you familiar with environment variables?
16:07 jehdin Probably much less than I should be
16:08 jberger they are settings you can set outside of the program and the program can see them
16:08 jberger so if you run galileo daemon as:
16:08 jehdin Hrmm
16:08 jberger GALILEO_HOME=/some/path galileo daemon
16:08 jehdin Aha, gotcha
16:08 jberger assuming you are on a *nix
16:09 jberger on windows there is some other incantation, but I don't know it off hand
16:09 jehdin Makes total sense - thanks!
16:10 jehdin I never did get perl in general to play nicely with windows, which is a bit sad.
16:10 jehdin automate all the $dayjob things!
16:11 jberger you can also set environment variables in init scripts, which for automation is probably how you would want to do it
16:12 jehdin Oh, holy hell and damnation.
16:12 jehdin I do that in bash constantly, and just now made the connection.
16:13 jehdin Thanks again, jberger!
16:17 jberger np
16:17 jberger have fun
16:17 purl Don't do anything I wouldn't do!!!
16:17 jberger purl, you are delightful today
16:17 purl ...but purl is <reply> I am a (modified) flooterbuck infobot, and my owner is perigrin.  Download source at http://flooterbuck.sourceforge.net/ or edenc's bitch or espertinho or bugado or stupid. or the mongodb of irc bots or Nuclear Biological Chemical or a big metal dummy. or he mongodb of irc bots or a big fat liar or my favorite robot...
16:18 jberger purl, you are also delightful today
16:18 purl okay, jberger.
16:40 kes May I pull request? https://github.com/KES777/mojo/commit/c0d3d4371
16:41 sri kes: please don't send too many pull requests
16:42 sri kes: better to get support for it here first, like other members of the community interested in the change, or a member of the core team supporting the change
16:42 sri if nobody here supports it, then it is highly unlikely to be accepted
16:43 kes yes. I do this. I do not open this pull request, just ask about this opportunity.
16:44 kes sorry for first one. I just forget to discuss it (((
16:45 kes Is the link to the change is enough or  should I do something more?
16:45 sri kes: perhaps you should mention why people here should care
16:46 kes In supplied patch I change $_[0] to shift. Which is a bit faster
16:47 sri how did you measure that?
16:47 sri and how much faster?
16:49 vicash kes: use Devel::NYTProf and profile your changes and see how much faster it really is..
16:52 dod joined #mojo
17:01 cuechan joined #mojo
17:03 kes actually you already use shift over $_[0] everywhere
17:03 kes the benchmark: http://paste.scsys.co.uk/532483
17:04 kes I ran it three times
17:22 sri kes: can't confirm your results with perl 5.24
17:23 sri i get 1% difference and it's random which one wins
17:28 umask001 joined #mojo
17:34 kes That it because of die. To see right results we should run that test for an hour or two. Actually I should time only access two first @_; So this is right test: http://paste.scsys.co.uk/532485
17:34 kes perl 5.24.0
17:35 kes *acces two = acces to
17:38 cuechan joined #mojo
17:47 * sri hates that battlenet doesn't have an appear offline feature
17:49 Grinnz_ they actually commented on that recently
17:49 Grinnz_ http://us.battle.net/forums/en/overwatch/topic/20745044649?page=2#post-38
17:54 tchaves joined #mojo
18:08 mpapec1 what vicash said; code profiling matter and microoptimisations usually not
18:13 stefan joined #mojo
18:14 stefan Are there any ORMs to use with Mojo::Pg?
18:17 jberger stefan: Mojo::Pg is just a thin layer over DBI and DBD::Pg
18:17 jberger if you were going to use an ORM just use an existing one
18:17 jberger DBIx::Class for example
18:20 pink_mist jberger: but does that work together with Mojo::Pg?
18:20 jberger why would you need it to work with Mojo::Pg?
18:21 jberger it works with DBD::Pg and provides you with results in a way that Mojo::Pg doesn't
18:23 Grinnz_ https://metacpan.org/pod/Mad::Mapper is another option
18:24 stefan With DBIx::Class, wouldn't I lose the non-blocking feature of Mojo::Pg?
18:24 stefan I'll look at Mad::Mapper!  Thanks!
18:33 jehdin Manning pubs has some amazing book titles. Secrets of the Javascript Ninja, Getting MEAN
18:33 jehdin What would they call a Mojolicious book?
18:42 jberger stefan: Mojo::Pg is only nonblocking while the query is running, not during transport, gotta remember that
18:42 jberger meaning, fighting for the nonblocking nature for small queries isn't always worth it
18:48 genio https://dev.to/ben/the-targetblank-vulnerability-by-example  huh.  news to me
18:49 Grinnz_ sri: possible problem with Mojo::Collection::first i've been looking into, the dev version of List::Util has a List::Util::PP which has a version of first() which can't use @_ from the outer sub since it's not XS
18:49 Grinnz_ this List::Util::PP also existed in perl 5.10 days but i guess it's never come up
18:50 Grinnz_ it's tricky to make it actually use List::Util::PP but this test fails when i get it set up, and this patch fixes it https://gist.github.com/Grinnz/68c9ed18b2dbfc04a274df45f5173b25
18:51 stefan jberger: This makes a lot of sense!  I didn't realize that Mojo::Pg was not NB at transport!  I had always wondered where the magic was within Mojo::Pg to accomplish that.  No wonder I couldn't find it!
18:51 jberger right
18:52 mcsnolte joined #mojo
18:52 jberger DBD::Pg has a handle that you can watch that tells you when results are ready, but then it reads from the db not mojo, so that read is blocking
18:52 jberger Grinnz_: why would you need a List::Utils::PP?
18:52 jberger the whole point of List::Utils is that it is core
18:53 jberger and thus you can use the XS form even if you don't have a compiler
18:54 Grinnz_ jberger: i think you can fatpack the newer List::Util::PP
18:55 Grinnz_ the core version on 5.10.1 is missing a bunch of functions
18:55 Grinnz_ for instance
18:57 mpapec1 joined #mojo
18:59 Grinnz_ it looks like the smoker using List::Util::PP has also hit this test in mojo http://www.cpantesters.org/cpan/report/c258433e-684f-11e6-870f-84c158b9f28c
19:01 jberger IMO a PP variant that can't handle @_ is broken by design and I don't see why it should be our problem :s
19:02 Grinnz_ from what i understand, a PP variant can't handle @_, period
19:02 jberger right, so that is an invalid PP variant
19:03 jberger it isn't a PP alternative to the module it purports to be
19:03 jberger that the XS version is not easily PP variated is the entire point
19:03 jberger that's why it is in core
19:10 dod joined #mojo
19:17 seeram joined #mojo
19:42 ramortegui joined #mojo
19:45 ramortegui Hello, I was tying to install Mango with cpanm and I get thiss message: 64-bit Perl or one built with -Duse64bitint is required!  Do you know where can I find information of how to pass -Duse64bitint option?
19:47 jberger ramortegui: are you using perlbrew?
19:48 ramortegui yes I'm.
19:59 genio What OS and platform are you on?
20:00 genio http://search.cpan.org/~gugod/App-perlbrew-0.76/bin/perlbrew shows the settings.
20:01 jberger I think you can just pass the -Dblah flags to perlbrew install
20:01 genio gah.  sorry, this is easier to read https://metacpan.org/pod/release/GUGOD/App-perlbrew-0.76/bin/perlbrew
20:02 genio so, perlbrew install --64int perl-5.24.0   or whatever version
20:04 genio I was under the assumption that perlbrew set some of those things by default on appropriate platforms.  hrm
20:05 ramortegui the OS ubuntu i686
20:05 ramortegui I'm going to try with perlbrew.
20:11 ksmadsen ramortegui: i686 is 32-bit. x86_64 is 64-bit.
20:16 ramortegui Thanks jberger, genio, ksmadsen
20:33 dod joined #mojo
20:43 cuechan joined #mojo
20:47 cpan_mojo Mojo-IRC-0.34 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Mojo-IRC-0.34
20:57 mvorg joined #mojo
21:27 mib_aou9qe joined #mojo
21:30 quiggle joined #mojo
21:45 cuechan joined #mojo
22:11 disputin joined #mojo
22:24 sri overwatch is starting to get a little boring
22:26 sri maybe i need more teamwork
22:38 jberger back to debugging my thing from yesterday
22:38 jberger I'm somehow able to write the headers from the 101 twice
22:38 jberger and the second message (no status line, just headers) is seen by the client as the beginning of the websocket stream and it 1006es it
23:27 meshl joined #mojo

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