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

IRC log for #mojo, 2014-12-17

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

All times shown according to UTC.

Time Nick Message
00:09 Akron joined #mojo
00:11 Grinnz_ jberger: when RHEL6 is out of extended support, maybe
00:11 Grinnz_ and yet, i know people still running webservers on RHEL5...
00:11 jberger and yet, perlbrew and carton exist
00:11 Grinnz_ yeah, thats not gonna happen (here)
00:11 jberger I'm having less and less patience for that kind of thought
00:11 Grinnz_ but we are using 5.16, just saying, others probably aren't
00:12 jberger offical distro packages aren't magic
00:12 Grinnz_ no, but they are supported
00:12 purl okay, Grinnz_.
00:12 jberger define supported
00:12 Grinnz_ you can complain to redhat if it breaks
00:12 human39 joined #mojo
00:12 jberger purl forget supported
00:12 purl jberger: I forgot supported
00:12 Grinnz_ lol
00:13 jberger Grinnz_: and then what do they do?
00:13 Grinnz_ i don't know, i've never personally complained to redhat :P
00:13 jberger I can't imagine they fork the upstream package and fix it
00:13 Grinnz_ they do, sometimes, sure
00:13 Grinnz_ depends how much you're paying i imagine
00:13 jberger probably
00:14 jberger ok, lets take that scenario
00:15 jberger so you have to use distro perl, aren't you also using distro mojolicious?
00:15 Grinnz_ true :P
00:16 jberger when do you have a fixed (probably ancient) perl version and yet you need (and are allow to) run bleading-edge mojo
00:16 jberger ?
00:16 Grinnz_ eh... it's a lot easier to install a cpan module than a whole perl, footprint-wise
00:16 jberger Grinnz_: with perlbrew, I disagree :-)
00:17 jberger but yes, conceptually its different
00:17 Grinnz_ footprint, as in, size :P
00:17 jberger if its not obvious, and it might not be, I'm mostly playing devil's advocate
00:17 jberger but I do get frustrated in op's faith in distro package
00:17 jberger s
00:17 Grinnz_ sure, i kind of am too
00:18 Grinnz_ lol
00:18 Grinnz_ the only thing that would break is my server's ability to install an updated Mojolicious, because i'm not going to bother installing a perlbrew on it
00:18 jberger the closer something is to your core business, the more "on top of" the deployment you should be
00:18 Grinnz_ it's a VPS, disk space is a premium
00:19 jberger sure, I'll use core sed to run Makefiles
00:19 jberger ah, I se
00:19 jberger interesting point
00:19 Grinnz_ but i'm only using Mojolicious on my server for testing my cpan module, lol
00:19 jberger hahahah
00:20 jberger see, you should be using distro mojo!
00:20 Grinnz_ does centos 6 even have one, let me see
00:20 * jberger CAUGH
00:20 Grinnz_ if it does, my prereq is too high for it :P
00:21 Grinnz_ why is a whois query using 100% of one of my cores
00:21 Grinnz_ and has been for days
00:22 Grinnz_ the answer is no it doesn't, of course :P
00:23 Grinnz_ (side note -- this is all moot for me, because i'm probably upgrading it to centos 7 sometime soon)
00:29 sri there's no performance cost associated with using @+ and @-, right?
00:29 jberger mst: I finally got around to reading mstpan-12 (which is titled 11 btw :-) )
00:29 jberger no mention of Mojo::Base ;-)
00:30 Grinnz_ oh, i'm a few behind on that
00:30 jberger sri: I believe you are correct on that
00:31 good_news_everyon joined #mojo
00:31 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/Vo9New
00:31 good_news_everyon mojo/master 8eacd6b Sebastian Riedel: parse headers a tiny bit faster
00:31 good_news_everyon left #mojo
00:32 jberger sri: http://perldoc.perl.org/perlvar.html
00:32 jberger search performance issues
00:32 jberger this one is linkable: https://metacpan.org/pod/perlvar#Performance-issues
00:33 sri jberger++
00:34 sri Mojo::Headers::parse is such a hot spot, everything counts
00:35 sri if anyone here wants to go crazy with micro optimizations, that's the place
00:36 * Grinnz_ sticks a sleep in, what's the worst that could happen
00:43 akhasanov joined #mojo
00:45 Grinnz_ sri: shouldnt it be $+[1]-$-[1] ?
00:49 Grinnz_ on later lines, the offset wont be from the start of the line
00:51 Grinnz_ or... this isn't a global match
00:53 Grinnz_ sneaky
01:07 woz joined #mojo
01:12 KindOne joined #mojo
01:13 ignacio_ joined #mojo
01:28 good_news_everyon joined #mojo
01:28 good_news_everyon [mojo] kraih pushed 2 new commits to master: http://git.io/A363ug
01:28 good_news_everyon mojo/master ec4e159 Nils Diewald: split_header not needed...
01:28 good_news_everyon mojo/master 484732f Sebastian Riedel: Merge pull request #722 from Akron/patch-5...
01:28 good_news_everyon left #mojo
01:56 Averna joined #mojo
02:08 klapperl_ joined #mojo
02:09 Grinnz sri, prove -l on git master still gets that message size error on my 5.10.1 server :/
02:10 sri Grinnz: be more specific
02:10 Grinnz the test still fails with the changes you did
02:10 Grinnz is what i mean
02:10 sri which test?
02:11 Grinnz https://github.com/kraih/mojo/issues/717#issuecomment-67215057
02:11 sri ah
02:11 sri :(
02:11 sri on the plus side, you've got something to hack on ;p
02:11 Grinnz heh
02:56 woz joined #mojo
03:04 noganex joined #mojo
03:11 Grinnz %options => sub {
03:12 Grinnz ^ wat
03:13 bwf joined #mojo
03:13 Grinnz if i'm interpreting this correctly, its just excessive use of fat comma :P
03:21 jberger has no effect if the thing on the left isn't a single barre word
03:21 Grinnz other than confusing me, apparently :P
03:36 akhasanov joined #mojo
03:37 sri really too bad nobody else is able to replicate the issue :(
03:51 Grinnz http://paste.fedoraproject.org/160444/88273141/ here's what i get turning on some debug flags and cleaning up the excessive output
03:55 Grinnz so... just gotta figure out why the server is sending that close
03:56 franzkafka sri, did you see my message earlier?
03:57 franzkafka would it be possible to make Mojo::UserAgent croak if scheme is https and IO::Socket::SSL is not installed?
04:01 sri Grinnz: aaah, we are getting closer
04:01 sri the client wants to write but the server already wrote a response and closed the connection
04:02 akhasanov joined #mojo
04:02 sri tricky situation
04:04 sri Grinnz: i suspect this patch makes it work https://gist.github.com/anonymous/52829810eaf35c58170e
04:05 sri streams always watch for readable, so connection close will be picked up there
04:06 Grinnz yep, test success
04:06 sri :)
04:06 Grinnz though i'm not sure the early connection closing is a success :P
04:07 sri what do you mean?
04:09 Grinnz well the server is still sending a close prematurely for some reason
04:09 Grinnz though i suppose, the response is supposed to be 200 OK in this test regardless
04:10 sri it's done, there is nothing premature about the close
04:10 sri why keep a dead connection open?
04:10 Grinnz the client is still sending data
04:10 sri if anything that's an attack vector
04:11 Grinnz strange that it's happening only in certain environments also
04:11 sri normal timing error
04:12 sri operating systems distribute i/o very differently
04:18 Grinnz oh i see, the Message sets an error and sets itself to finished as soon as it sees the limit is exceeded, which causes the server to close to connection
04:18 Grinnz that was the missing piece
04:23 asarch joined #mojo
04:28 good_news_everyon joined #mojo
04:28 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/nEHw3w
04:28 good_news_everyon mojo/master 90fd43f Sebastian Riedel: fixed error handling bugs in Mojo::IOLoop::Stream
04:28 good_news_everyon left #mojo
04:28 sri i bet this breaks some apps that use streams for weird stuff ;p
04:29 sri some write errors may need to be handled, but i'm not sure yet which
04:30 sri Grinnz++ # thanks for the debug data
04:32 Grinnz :)
04:35 good_news_everyon joined #mojo
04:35 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/kjkgIQ
04:35 good_news_everyon mojo/master 6160782 Sebastian Riedel: combine close and error
04:35 good_news_everyon left #mojo
04:36 bpmedley_ joined #mojo
04:39 irq joined #mojo
04:41 Grinnz why... does github think my module is Perl6
04:41 Snelius ur code is future
04:41 Snelius i are best, man
04:41 Grinnz https://github.com/Grinnz?tab=repositories
04:41 Grinnz i guess i learned perl6!
04:41 Snelius *you are best, man
04:45 woz joined #mojo
04:48 mrmccrac- joined #mojo
04:49 mrmccrac- in Mango, how does it handle the fact that the order of the keys in a query sometimes matters?  in MongoDB driver they let you pass in Tie::IxHash object instead of hashref
04:58 mrmccrac- think i found the answer to that question here: https://gist.github.com/amarnus/43fc2896725e0c43d754
05:01 sri anyone want to write the test case for #717?
05:01 sri it's rather easy now that we know the i/o pattern
05:02 sri just a little something for t/mojo/ioloop.t
05:02 sri if there's no takers i'll do it tomorrow
05:05 hesperaux joined #mojo
05:06 oetiker joined #mojo
06:34 woz joined #mojo
07:00 dod joined #mojo
07:02 rem_lex joined #mojo
07:36 franzkafka Is there something wrong with this: $dom->children('.col-md-8.col-lg-8 > h2, div')->each  ??
07:37 franzkafka that .col-md-8 has a div in front of it: div.col-md-8.col-lg-8
07:43 preaction you're selecting every div
07:43 preaction , separates complete selectors, not just a part of one
07:43 preaction so you're selecting some h2, but every div
07:49 fhelmberger joined #mojo
07:51 perlang joined #mojo
07:55 franzkafka ohh ok
08:12 basiliscos joined #mojo
08:14 eseyman joined #mojo
08:19 sugar joined #mojo
08:23 woz joined #mojo
08:23 Eke- joined #mojo
08:24 trone joined #mojo
08:28 sugar_ joined #mojo
08:29 Vandal joined #mojo
08:29 tempire It's time to return to Norway.
08:30 tempire Boxing is no longer banned.
08:30 * tempire punches marcus
08:51 woz joined #mojo
08:54 sugar__ joined #mojo
08:55 mishantil tempire: You are more than welcome.
09:11 irq joined #mojo
09:21 oetiker batman: thanks!
09:21 batman oetiker: thank you :)
09:21 batman impossible to fix anything without a proper bug report
09:37 diancn joined #mojo
09:59 perlang joined #mojo
10:07 oetiker batman: just tested 0.9 it works ... but only if I have a handler registered listening for the error event ... it would be nice if the thing did not just happily ignore the error otherwhise
10:09 batman how can you solve that?
10:09 oetiker I see two options
10:09 oetiker a) detect if someone has registerd an error handler
10:10 oetiker b) just register one by default
10:10 batman but what should happen inside that handler?
10:11 batman warn $err; ..?
10:11 oetiker yes
10:11 oetiker how does the IOLoop handle that
10:11 oetiker isn't there a standard behaviour
10:11 batman at this point i'm almost considering monkey patching Net::SNMP :(
10:13 oetiker instead of what ?
10:18 batman oetiker: Net::SNMP does eval{} which mess up the "normal" flow
10:19 oetiker batman: on another note, I have writen a module which uses your mojo fork read write module to deal with blocking function calls by running them in a forked copy of the perl interpreter ... very useful module you worte there
10:19 oetiker the master communicates with the slave copy and tells it what functions to start ...
10:20 oetiker and gets the results back when they are done
10:20 batman aha. cool.
10:20 oetiker including support for transparent logging
10:20 batman i think i would use https://metacpan.org/pod/Mojo::IOLoop::ForkCall for that case though...
10:20 oetiker pretty neat ...
10:20 oetiker still not quite clear how to make this generic in a good way, but I will get there
10:20 oetiker no
10:20 oetiker ForkCall forks and dies
10:21 oetiker this one keeps the second copy of perl running and sends it stuff todo
10:21 oetiker AnyEvent has such a module as well
10:23 oetiker it could even be extended to fork additional slaves if one is busy
10:24 oetiker I use it to access a sqllite db at the moment
10:26 batman why do you want to keep it alive?
10:35 oetiker I can keep my db file open
10:38 oetiker and logging works :)
10:39 neyasov___ joined #mojo
10:43 rem_lex|pivo joined #mojo
10:49 batman ok
10:53 neyasov____ joined #mojo
10:56 Adura joined #mojo
11:58 t4nk710 joined #mojo
11:59 da5id When calling 'mojo routes' in a brand new app created with 'mojo generate app foo' i get: /*whatever  *  whatever
12:00 da5id Shouldn't that show the example route?
12:01 t4nk710 can someone give me an example of how to pass multiple params on the command line to mojo, so supposing you had a route foo but you want params /foo?table=aTableName,key=someKey what is the syntax for passing the second command
12:01 t4nk710 second param rather
12:02 t4nk710 so there is a syntax for pulling multiple params but I do not see any documentation on how to query multiple params
12:05 da5id t4nk710: I believe you are looking for every_param('bar')  - /foo?bar=1&bar2&bar=3
12:06 t4nk710 that I think that bar takes on multiple values of 1,2,3 whereas I actually want to pass distinct alues /foo?bar=1,alpha=2
12:06 t4nk710 with a different param name
12:07 t4nk710 but still all going to route foo
12:13 t4nk710 does anyone know if there is a way to do this with different param names so /foo?bar=1&gamma=2, that syntax doesn't work
12:15 moritz t4nk710: are you quoting your argument?
12:15 moritz t4nk710: otherwise the shell will use & as a command separator and send jobs to the backgroud
12:23 punter joined #mojo
12:25 t4nk710 so /foo?'bar=1&gamma=2'  still gives me an unrecognized command for gamma
12:26 moritz t4nk710: please copy&paste the whole command line
12:27 niczero /foo\?bar=1\&gamma=2
12:27 moritz t4nk710: and are you on windows?
12:28 t4nk710 yes
12:29 moritz t4nk710: on windows you need to quote with double quotes
12:29 moritz "/foo?bar=1&gamma=2"
12:31 t4nk710 yes, thanks, I just stumbled on that as well, thanks very much
13:01 akhasanov joined #mojo
13:06 Kripton joined #mojo
13:22 ignacio_ joined #mojo
13:43 amon joined #mojo
13:47 neilhwatson joined #mojo
13:49 neilhwatson joined #mojo
13:53 irq joined #mojo
14:02 irq what could be best approach to pass a result of url_for to javascript code icluded with %= javascript '/script.js' ? Currently script.js has the urls hardcoded,
14:10 KindOne joined #mojo
14:12 asarch joined #mojo
14:19 sugar_ joined #mojo
14:28 bwf joined #mojo
14:29 akhasanov joined #mojo
14:38 Dandre joined #mojo
14:40 akhasanov joined #mojo
14:43 Ptolemarch joined #mojo
14:45 Dandre joined #mojo
14:51 marty joined #mojo
14:52 Dandre joined #mojo
14:57 akhasanov joined #mojo
15:09 sri hmm, this does not seem credible https://github.com/kraih/mojo/issues/717#issuecomment-67295392
15:09 sri comment has been edited a few times, an strace has been posted and then removed again :S
15:10 sri is profundus here?
15:11 * sri has a hunch that he did not checkout the correct version
15:14 alnewkirk joined #mojo
15:16 Ptolemarch joined #mojo
15:16 sh4 joined #mojo
15:18 Ptolemar_ joined #mojo
15:23 sugar__ joined #mojo
15:25 Eke- joined #mojo
15:43 Ptolemarch joined #mojo
15:50 trone how helpers are "loaded" in the template object?
15:50 sugar joined #mojo
15:51 trone I'm using Mojo::Template and I would have helpers inside. Looking code in Mojo::Template, DefaultHelpers plugin, etc. but still not found
15:55 trone Oh, Mojolicious::Renderer with add_helper
15:56 sugar_ joined #mojo
15:58 sri https://github.com/kraih/mojo/blob/master/lib/Mojolicious/Plugin/EPRenderer.pm#L32
16:00 trone sri: thx
16:01 sri damn... looks like my attempt at writing a test case for the stream problem from yesterday did not succeed :( https://gist.github.com/anonymous/60bc9f5e09b344b1b7ee
16:30 neyasov____ joined #mojo
16:42 Ptolemarch joined #mojo
16:51 t4nk722 joined #mojo
16:53 sri can anyone confirm this? https://github.com/kraih/mojo/issues/717#issuecomment-67349635
16:53 t4nk722 has anyone tried to add commands beyond get/put/push, I am trying to define my own, say foobar and perl doesn't let me even export it, is there any preamble to add a list of command keywords, I saw the tutorial but it is not clear how to add user defined commands
17:01 doby joined #mojo
17:04 disputin joined #mojo
17:16 Ptolemarch joined #mojo
17:38 Ptolemarch joined #mojo
17:48 hernan604 joined #mojo
17:52 punter joined #mojo
18:01 sri dammit... this one doesn't work either https://gist.github.com/anonymous/79ea7587c76d368072c5
18:01 * sri is running out of ideas
18:07 Eke- joined #mojo
18:34 dod joined #mojo
18:39 ssm t4nk722: to make a PURGE command, I do "my $tx = $self->ua->build_tx( PURGE => $purge_url );"
18:39 ssm or are you thinking of command line arguments?
18:40 ssm …on reflection, you probably are :)
18:41 Grinnz_ haha
18:41 sri it helps to use the correct terms
18:45 good_news_everyon joined #mojo
18:45 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/-Ia8zA
18:45 good_news_everyon mojo/master 966cdf0 Sebastian Riedel: no need for two lines
18:45 good_news_everyon left #mojo
18:52 denis_boyun joined #mojo
18:55 sri jberger, tempire, marcus, crab, batman: please review https://github.com/kraih/mojo/compare/484732fa1c630aa9363f683039491f73434a0514...966cdf0bd31fa57b031299615b0f3fd289479498
18:55 sri odds are i messed something new up
18:56 sri but if you don't review you're just as guilty ;p
18:56 sri for context https://github.com/kraih/mojo/issues/717
19:03 batman i don't understand that diff. but i would like to ask some questions though...
19:03 batman does "return $read == 0 ? $self->close : $self->emit(read => $buffer)->_again;" kind of replace the need for EPIPE?
19:04 batman as in the "$read == 0" part
19:24 akhasanov joined #mojo
19:42 sugar__ joined #mojo
20:02 sri batman: on which platform can a read result in an EPIPE?
20:02 batman no idea. that's why i asked.
20:03 Ptolemarch joined #mojo
20:09 Grinnz_ batman: in https://metacpan.org/pod/Mojo::APNS synopsis you have a reference to "$apns->loop", should that be ioloop?
20:10 juikuen joined #mojo
20:20 hesperaux joined #mojo
20:50 woz joined #mojo
20:54 good_news_everyon joined #mojo
20:54 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/_PbDNw
20:54 good_news_everyon mojo/master 16b2a17 Sebastian Riedel: try the new container-based stack
20:54 good_news_everyon left #mojo
20:56 jnbek joined #mojo
20:58 good_news_everyon joined #mojo
20:58 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/BcZFxA
20:58 good_news_everyon mojo/master 8a0ab3d Sebastian Riedel: switch back to the old stack
20:58 good_news_everyon left #mojo
20:58 sri well, that didn't work https://travis-ci.org/kraih/mojo/builds/44377652
20:58 Grinnz_ lol
21:04 sri (apparently the docket stack doesn't do ipv6 yet)
21:04 sri s/docket/docker/
21:04 Grinnz_ ipv6 is hard!
21:19 moritz uhm, wut?
21:20 moritz isn't docker written in go, which has native v6 support?
21:20 sri the docker travis stack
21:41 sri argh, looks like i was right https://github.com/kraih/mojo/issues/717#issuecomment-67399391
21:47 dotan joined #mojo
21:57 jnbek joined #mojo
22:18 irq joined #mojo
22:22 Ptolemarch joined #mojo
22:22 Snelius joined #mojo
22:33 Grinnz_ batman: https://github.com/jhthorsen/mojo-apns/pull/4 i meant for that to only include the first commit, but i forgot github automatically includes later commits... suppose i should have done the other two on a different branch, i was going to add a separate pull request for them
22:33 Grinnz_ idk how/if i can change it
22:39 juikuen joined #mojo
22:55 jberger Grinnz_: force push what you want
22:55 Grinnz_ hm, true
22:55 jberger then make a second branch for the latter commits
22:57 woz joined #mojo
22:57 Grinnz_ that works :)
23:04 Grinnz_ i never did get an email from PAUSE to link my metacpan account...
23:05 Grinnz_ (and my PAUSE is actually set up to forward emails now)
23:11 good_news_everyon joined #mojo
23:11 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/wVQPzw
23:11 good_news_everyon mojo/master 5527061 Sebastian Riedel: more collection examples
23:11 good_news_everyon left #mojo
23:20 sugar joined #mojo
23:23 * sri is still worried that we can't test #717
23:23 Grinnz_ its a tough one
23:28 neyasov____ joined #mojo

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