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

IRC log for #mojo, 2016-08-24

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

All times shown according to UTC.

Time Nick Message
00:21 vytas joined #mojo
01:01 Pierre joined #mojo
02:07 noganex_ joined #mojo
03:20 Pierre joined #mojo
03:26 vytas joined #mojo
03:43 disputin joined #mojo
04:03 prajith joined #mojo
04:43 tools joined #mojo
05:19 prajith joined #mojo
05:27 tools joined #mojo
05:44 Guest-questX joined #mojo
05:58 inokenty-w joined #mojo
06:22 tools joined #mojo
06:44 AndrewIsh joined #mojo
06:56 Vandal16455 joined #mojo
07:08 mbudde joined #mojo
07:10 dod joined #mojo
07:14 dod joined #mojo
07:28 hummeleBop joined #mojo
08:11 kes joined #mojo
08:12 osfabibisi joined #mojo
08:13 Pierre joined #mojo
08:30 noganex joined #mojo
08:31 mpapec_ left #mojo
09:12 dod joined #mojo
09:18 rags joined #mojo
09:24 kaare joined #mojo
09:42 mvorg joined #mojo
09:55 ndiewald joined #mojo
10:08 ndiewald Is there a way to modify a value inside a custom validator check?
10:08 Akron Oh - wrong handle - sorry.
10:34 cuechan joined #mojo
10:54 sri don't think so
11:06 tchaves joined #mojo
11:07 Akron My use case is: I have a signed parameter and I want to check if the parameter is signed correctly. After checking that, I want to remove the signature. I can't use a filter, as this would alter the parameter before. And I can't use output, as I don't know the index of the current parameter that is checked.
11:10 Akron However - in my special case multiple params are forbidden, so 'output' may be the way to go ...
11:16 tchaves joined #mojo
11:18 sri sounds like a filter would work
11:18 sri just remove the value if the signature is incorrect
11:21 sri ->required('foo', 'with_signature')
11:22 sri if the string is empty after the filter it won't pass the required check
11:31 meshl joined #mojo
11:35 Pierre joined #mojo
11:36 jberger According to #toolchain, sometime #mojo community member avenj has passed away
11:36 jberger http://www.michaudfuneralhomeandcrematorium.com/obituaries/Jonathan-Portnoy?obId=1031720#/obituaryInfo
11:37 jberger https://gentoo.org/news/2016/08/23/in-memory-of-jonathan-avenj-portnoy.html
11:44 sri :(
11:46 jberger 29 is way too young!
11:52 mattp_ :( that is sad
11:53 Kripton joined #mojo
11:54 Pierre joined #mojo
12:05 prajith joined #mojo
12:11 marcus :(
12:21 meshl joined #mojo
12:31 dod joined #mojo
12:33 gizmomathboy joined #mojo
12:54 zivester joined #mojo
12:54 dexteruk joined #mojo
12:56 dexteruk Hi Everyone, i have an intersting problem.  Basically when mojo gets a get request from a browser the connection established and closes quickly.  However when i have tried connecting from a curl client it get TIME_WAIT for a long period of time and its blocking TCP ports
12:57 dexteruk I have tried connection_timeouts and all sorts of setting in curl, has anyone had simular problems with TCP ports
12:58 dexteruk I was wondering if there is anything in Mojo i can add, after sending a render to close the TCP port
12:59 dexteruk If i uses apache proxy the TCP port between mojo and the proxy close quickly but remain open on the proxy itself
13:18 Akron joined #mojo
13:22 ptolemarch joined #mojo
13:22 Akron :(
13:22 Akron sri: That makes sense. Thank you! I will see, which approach I like better.
13:32 jabberwok I wonder: In a program that already has a Mojo::Pg connection, is it ok to create a Minion object with a second connection string to the same database? I'm guessing so because of how Minion->new() works. Doesn't look like there's any way to pass an existing Mojo::Pg object into it.
13:37 nic When you ask "is it ok?", what are your concerns?  scalability?
13:39 jberger jabberwok: remember that Mojo::Pg does connection pooling anyway, so you likely have more than one connection even on your single instance
13:40 jberger Mojo::Pg is just the manager for the Mojo::Pg::Database instance which are the actual connections
13:46 tools joined #mojo
14:18 jabberwok very good, i just wanted to be sure.  -- it is curious that enqueue() has an underlying table constraint that the job argument must be an array (why not a hash?)
14:19 dexteruk Problem with two many TCP connection with TIME_WAIT is there any way to close these connection after sending back the render?
14:19 jabberwok The docs say "Arguments get serialized by the backend... nested data structures with hash and array references are fine..." but don't say the top level *must* be an array. (That's enforced by minion's Pg migration/schema.)
14:36 jehdin q
14:38 kes Does any faced the problem with AUTOLOAD https://rt.perl.org/SelfService/Display.html?id=129067
14:38 kes and how to resolve it or workaround?
14:43 prajith joined #mojo
14:46 jberger kes: that url doesn't open for me
14:47 jberger ah: https://rt.perl.org/Public/Bug/Display.html?id=129067
14:49 sri something to lighten the mood.... look at .gitattributes ;p https://github.com/dbsrgits/dbix-class
14:50 sri would be funny if that became a running gag
14:50 jberger kes: no, I've never seen that problem
14:51 jberger sri: :D
14:53 tools joined #mojo
14:54 kes hm... if I logged in into rt the link is automatically broken (( the original link from mail was: https://rt.perl.org/Ticket/Display.html?id=129067
14:54 kes jberger: ok ((. I will try to ask for perl updating.
14:54 kes maybe that disappear
14:56 jberger I don't fully understand what that bug is doing actually
14:59 kes I think: >>176:       $continue = $app->$sub;   $sub is called here as non-method
15:00 zivester joined #mojo
15:01 kes another surprising thing is why  \&{ FH::Controller::Cart::promo } refer to inherited ::AUTOLOAD from Mojolicious/Controller.pm
15:05 sri jabberwok: because @_
15:05 purl because @_ is being aliased all the way through?
15:06 sri it's arguments, only an array makes sense when you think about it
15:07 jberger purl: forget because @_
15:07 purl jberger: I forgot because @_
15:09 sri btw. the #33 on the alexa 500 uses mojolicious http://www.alexa.com/siteinfo/mail.ru
15:09 jberger \o/
15:11 pink_mist oh is that the one you mentioned you had found out about a week or two ago?
15:11 sri yes
15:11 sri just talked with some of them, nice folks
15:13 jehdin joined #mojo
15:17 cpan_mojo Mojo-IRC-0.32 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Mojo-IRC-0.32
15:22 Alice joined #mojo
15:23 Alice hi all
15:23 Alice "Installing Mojo::IOLoop::ForkC" (40 lines) at http://paste.scsys.co.uk/532429
15:23 Alice can someone help me?
15:25 sri good old windows
15:25 sri have you considered ubuntu on windows?
15:26 Alice I run with Strawberry perl portable version windows
15:26 Alice oh yes
15:26 Alice I had install Maverick Bot into Debian Machine without problems
15:27 sri we recommend the use of this now https://blogs.windows.com/buildingapps/2016/03/30/run-bash-on-ubuntu-on-windows/
15:28 sri it ships with the latest version of windows 10
15:28 Alice mmm ok I forget it on Windows machine....thanks anyway ..I can continue into debian machine was just to have 2 test machines
15:28 jberger ForkCall has known issues with windows, sorry
15:28 Alice sorry for my poor english
15:28 Alice thanks to all
15:28 jberger they are REALLY REALLY deep perl problems actually
15:28 jberger I wish there was a way I could fix it but I really can't
15:29 sri jberger: clean up forkcall and get it into core!
15:29 jberger have we decided that that is what we want?
15:29 sri (and have it die on platforms without pipes)
15:29 sri i thought everyone was in favor if the code was clean
15:30 sri guess it could also check for fork emulation and bail there
15:31 jberger either one
15:31 purl oh... a choice.  I can't handle that!
15:31 sri just bailing on fork emulation seems safer
15:31 jberger and I knew it was being discussed, i just didn't realize it had the actual green light
15:32 jberger are there any platforms that don't have pipes that do have fork?
15:32 lluad joined #mojo
15:32 jberger I mean, ForkCall doesn't actually check for that, I wonder what IO::Pipely considers as having pipes
15:32 sri think you can compile perl with fork emulation on platforms with pipe
15:32 jberger (since that is what I use)
15:33 jberger fork emulation isn't acutally the problem
15:33 jberger it is the perl windows io layer
15:33 sri but do you want to deal with it? ;p
15:33 jberger doesn't matter to me
15:33 jberger I'm happy to bail out on fork emulation
15:34 sri so, are there platforms with real fork but no pipes?
15:35 sri anyway, +1 for bailing on fork emulation, it's consistent with all the other code in core
15:35 sri (mojo core)
15:37 genio perl installs on a lot of platforms: http://perldoc.perl.org/index-platforms.html
15:38 jberger it looks like IO::Pipely only checks for windows/cygwin/MacOS https://metacpan.org/source/RCAPUTO/IO-Pipely-0.005/lib/IO/Pipely.pm#L34-46
15:39 sri hehe, macos
15:39 genio Is _anyone_ anywhere still running Mac OS < 10?
15:39 sri and perl
15:39 sri i doubt it very much
15:58 sri wait... wat? https://twitter.com/jerodsanto/status/768132071214551040
15:59 jberger anyone who prefers php over perl is someone I don't care to chat with on irc anyway
15:59 * jberger hugs jberger.pl
16:02 jehdin Dang.
16:02 disputin joined #mojo
16:03 jberger (/me was joking btw)
16:40 jehdin joined #mojo
17:45 zivester joined #mojo
17:48 kes joined #mojo
18:09 itaipu joined #mojo
18:09 asarch joined #mojo
18:27 PryMar56 joined #mojo
19:04 mib_fyemwt joined #mojo
19:04 mib_fyemwt Hello, I was wondering if Mojolicious periodically sends WS_PINGs on a during websocket connection
19:04 mib_fyemwt or do I have to implement that myself
19:12 sri not on its own
19:12 sri also, WS_PING doesn't work very well in some browsers, so it's rarely used
19:13 sri better make ping part of your higher level protocol
19:22 mcsnolte joined #mojo
19:23 mib_fyemwt Thanks!
20:03 jberger sri: I'm getting invalid frame header errors (and sometimes reserved bit errors) from websocket clients suddenly (in a specific part of the app, I think in relation to sending finish reasons)
20:04 jberger we havent' changed anything in the websocket emitting in a while have we?
20:05 jberger I'm trying to read the MOJO_WEBSOCKET_DEBUG output and it is almost actually greek to me, is there a way to make sense of any of that
20:05 jberger ?
20:38 mvorg joined #mojo
20:42 cpan_mojo Mojo-IRC-0.33 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Mojo-IRC-0.33
21:29 jberger sri: something about this commit breaks my sending of finish codes / reasons: https://github.com/kraih/mojo/commit/ffe7ea76530d16c105f138ba9aece414188c96f5
21:48 jberger I can add this statement back in to master and my code works again: https://github.com/kraih/mojo/commit/ffe7ea76530d16c105f138ba9aece414188c96f5#diff-876c5a156d62d5cb77141b6ad8276063L122
21:48 jberger could it be the time it takes to print to the log?
21:51 jberger I can replace that if block body with Mojo::IOLoop->next_tick(sub{ $tx->closed }) and it works too
21:52 jberger which is probably not right from a loop standpoint but it does delay setting closed
22:11 jberger ok so here is the final rundow
22:11 jberger +n
22:12 jberger it you open a websocket and then immediately call finish then the finish frame doesn't make it through correctly
22:12 jberger I was able to fix the problem in my own code by wrapping the ->finish($code, $reason) call in Mojo::IOLoop->timer(0.1 => sub { ... });
22:18 jberger that doesn't seem safe though, fixing a race condition with a timer is perilous
22:18 * Phil21 finds a slower cpu than your timer
22:22 jberger zactly
22:22 jberger anyway, I think this is essentially a timing bug in mojo, albeit a really corner case one
22:31 pink_mist jberger: 0_o how could the line of code you pointed to affect that? 0_o the only functional difference I see there is that non-websockets that aren't in a finished state no longer get a log message on close 0_o .. shouldn't change anything for websockets at all 0_o
22:31 jberger correct
22:31 jberger and that's why it was so hard to debug
22:32 jberger timing bugs suck
22:39 jberger and of course I can't replicate in a small-scale example
22:39 * jberger gives up
23:08 disputin joined #mojo

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