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

IRC log for #mojo, 2015-01-10

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

All times shown according to UTC.

Time Nick Message
00:03 cpan_mojo Mojo-Reactor-POE 0.002 by DBOOK - http://metacpan.org/release/DBOOK/Mojo-Reactor-POE-0.002
00:05 Grinnz_ performance is even a little improved i think
00:10 sri tricky topic https://groups.google.com/d/msg/mojolicious/dB4xlE9h9Lw/agUufZfKSGkJ
00:12 Grinnz_ "and in HTML there are case-sensitive as well as case-insensitive attribute values."
00:12 Grinnz_ really? jeez lol
00:13 sri type is case-insensitive, class and id case-sensitive for example
00:13 Grinnz_ hmm
00:15 sri or a more obvious one... accesskey=C
00:17 good_news_everyon joined #mojo
00:17 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/TmLCuA
00:17 good_news_everyon mojo/master 02c822b Sebastian Riedel: be more specific about Mojo::DOM normalization
00:17 good_news_everyon left #mojo
00:25 disputin joined #mojo
00:36 Grinnz_ cpantesters down? D:
00:44 * sri has a very odd benchmarking problem
00:44 Grinnz_ no markers for the bench?
00:44 sri if i pre-compile a regex it is slower than if i compile it over and over 100 times
00:44 Grinnz_ haha
00:45 sri it makes no sense
00:45 Grinnz_ oddity in perl regex compilation maybe
00:47 sri https://gist.github.com/anonymous/07799f5a33ec597c88af # the patch
00:47 sri and a very simple one-liner benchmark
00:47 sri perl -Ilib -Mojo -E 'my $dom = g("mojolicio.us")->dom; n { $dom->find("[href]") } 1000'
00:50 sri i wonder if \Q\E are special
00:50 sri and the regex isn't actually recompiled
00:51 sri still doesn't really explain it :S
00:51 Grinnz_ im getting same results, 960-980/s -> 890-920/s
01:02 sri soooo weird
01:02 sri it's not the compilation, i can actually keep that code in and it's still as fast
01:06 sri https://gist.github.com/anonymous/e0a429ee7beaf8c2196b#file-attr-diff-L18
01:06 sri switch in the commented out line and it's faster Oo
01:07 sri $name_re is literally the same regex, just pre-compiled
01:07 sri another fun thing
01:08 sri if i put both in a grep {...} they are equally fast
01:08 sri grep { /(?:^|:)\Q$key\E$/ } vs. grep {$_ =~ $name_re}
01:16 sri hmm, for a really big document it's not measurable
01:18 punter joined #mojo
01:25 good_news_everyon joined #mojo
01:25 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/Zwra3g
01:25 good_news_everyon mojo/master 5bfba56 Sebastian Riedel: precompile all regular expressions in Mojo::DOM::CSS
01:25 good_news_everyon left #mojo
01:32 kmx joined #mojo
01:37 sri the case-sensitivity selector would be super easy to implement https://gist.github.com/anonymous/359099cc3239e56d4101
01:37 sri [type=hidden] vs. [type=hidden i]
01:38 sri but it's CSS4... and we all know how that worked out the last time :/
01:41 sri marcus, tempire, batman, jberger, crab: feel free to voice your opinion on this
01:42 sri https://groups.google.com/d/msg/mojolicious/dB4xlE9h9Lw/agUufZfKSGkJ
01:47 jberger I can see how that would be handy
01:47 jberger doesn't break anything, right?
01:48 jberger I would say add it, document as experimental on the condition of css4
01:51 * tempire digs it
02:02 sri jberger: css4 history https://github.com/kraih/mojo/issues/236
02:04 sri this one has not changed since 2011 though
02:21 Insane joined #mojo
02:28 akhasanov joined #mojo
02:39 klapperl joined #mojo
03:06 Grinnz TIL i just needed to add my other email address to github to get all of my commits to show up as my github user
03:19 good_news_everyon joined #mojo
03:19 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vDhBQQ
03:19 good_news_everyon mojo/master 1a2c5de Sebastian Riedel: added experimental support for case-insensitive attribute selectors like [foo="bar" i] to Mojo::DOM::CSS
03:19 good_news_everyon left #mojo
03:19 sri i guess we can give it a try
03:31 noganex_ joined #mojo
03:32 good_news_everyon joined #mojo
03:32 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/xXKZHA
03:32 good_news_everyon mojo/master 3b30391 Sebastian Riedel: better selector examples
03:32 good_news_everyon left #mojo
03:34 akhasanov joined #mojo
03:41 good_news_everyon joined #mojo
03:41 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/0Zut_g
03:41 good_news_everyon mojo/master 03cfe7d Sebastian Riedel: use inline modifiers
03:41 good_news_everyon left #mojo
03:41 sri anyone know a cleaner solution?
03:44 preaction couldn't you do: my $cire = $ci ? '(?i)' : ''; return qr/$cire$value/; since regex metachars get interpolated?
03:45 jberger preaction: you know I actually thought of that
03:45 sri actually, i can prefix it to the value
03:45 good_news_everyon joined #mojo
03:45 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/Da7RMg
03:45 good_news_everyon mojo/master a916d3f Sebastian Riedel: use modifier only once
03:45 good_news_everyon left #mojo
03:45 sri uses quotemeta anyway
03:46 preaction yeah, that's nice, i like that
03:46 akhasanov joined #mojo
03:46 sri preaction++
03:47 preaction heh. i get bit enough by regex metachars getting interpolated when i _don't_ want them ;)
03:47 Grinnz wtf is (?i)
03:47 Grinnz never seen that before
03:47 sri same as /i
03:47 Grinnz interesting
03:48 Grinnz and perldoc.perl.org search is still broken of course
03:49 sri i kinda would like to interpret all attribute values correctly... but the performance cost seems too high :/"
03:49 Grinnz performance is the same with (?i) or /i?
03:49 sri (would also be quite a bit of work to compile a list of insensitive attributes)
03:50 Grinnz just wait for them to insult your mother
03:54 sri hmm, i guess the new selector really is the best solution
03:55 sri any other candidates while we are at it? http://dev.w3.org/csswg/selectors-4/#overview
04:04 doby joined #mojo
04:23 good_news_everyon joined #mojo
04:23 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/ZSp2gw
04:23 good_news_everyon mojo/master 6d1b5ea Sebastian Riedel: use attribute selector in example
04:23 good_news_everyon left #mojo
04:44 good_news_everyon joined #mojo
04:44 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/Y5n3sg
04:44 good_news_everyon mojo/master 81dbe9d Sebastian Riedel: simplify regex a little
04:44 good_news_everyon left #mojo
05:12 allison joined #mojo
05:37 disputin joined #mojo
05:40 Grinnz_ joined #mojo
05:48 jberger sri++ preaction++
05:54 allison joined #mojo
06:16 rem_lex joined #mojo
06:48 sh4 joined #mojo
06:51 KindOne joined #mojo
07:05 alnewkirk joined #mojo
07:37 Vandal joined #mojo
07:51 juikuen joined #mojo
08:05 dotandimet joined #mojo
08:21 mib_rih8j9 joined #mojo
08:26 juikuen joined #mojo
08:31 marmez joined #mojo
09:09 basiliscos joined #mojo
09:18 rem_lex joined #mojo
09:20 amon joined #mojo
09:23 dod joined #mojo
09:24 trone joined #mojo
09:26 Insane joined #mojo
09:28 dod joined #mojo
09:58 trone joined #mojo
09:59 trone joined #mojo
10:00 batman i'm +1 on [foo="bar" i] as long as it's marked as experimental
10:01 batman ...and it is, so i'm +1
10:12 dotandimet joined #mojo
10:33 Insane joined #mojo
10:49 denis_boyun joined #mojo
10:59 dotandimet1 joined #mojo
11:03 denis_boyun_ joined #mojo
11:13 dotandimet joined #mojo
11:20 denis_boyun joined #mojo
11:28 marmez joined #mojo
11:28 denis_boyun_ joined #mojo
11:31 denis_boyun__ joined #mojo
11:52 dotandimet joined #mojo
12:48 Insane joined #mojo
12:50 dotandimet joined #mojo
13:13 basiliscos joined #mojo
13:13 asarch joined #mojo
13:18 crab joined #mojo
13:39 Eddy joined #mojo
14:00 dotandimet joined #mojo
14:01 akhasanov joined #mojo
14:12 meshl joined #mojo
14:37 dotandimet joined #mojo
15:00 punter joined #mojo
15:03 marmez joined #mojo
15:36 sh4|2 joined #mojo
15:50 denny joined #mojo
15:54 Insane joined #mojo
15:55 juikuen joined #mojo
16:06 * sri yawns
16:12 Oleg joined #mojo
16:34 neyasov joined #mojo
16:39 firnsy joined #mojo
16:42 sugar joined #mojo
16:46 Nemix__ probably not a mojo question...but...I have an index page in data section that properly renders jquery mobile content.  However when I have elements brought in from a different page in the data section they render but not with jquery mobile appearance
16:48 good_news_everyon joined #mojo
16:48 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/NteekA
16:48 good_news_everyon mojo/master c4f4cad Sebastian Riedel: no need for a default value
16:48 good_news_everyon left #mojo
16:54 mst accidentally made the CSS a relative URL so only / works?
16:55 sugar_ joined #mojo
16:59 Oleg mst: do you know where I need to send co-maint request for some module if original author is not available? Is modules@perl.org a proper place?
16:59 sugar__ joined #mojo
17:00 mst Oleg: attempt to contact the author by whatever means you can find, and make sure to cc modules@perl.org when you do
17:00 mst after four weeks or so, if you get no response, ask modules@ for co-maint
17:01 Oleg ok
17:04 Nemix__ mst:  I will take a look at that
17:09 Oleg mst: btw, should i contact original author in this case https://rt.cpan.org/Ticket/Display.html?id=97874#txn-1451264? SHLOMIF is co-maint
17:11 mst not any more he isn't
17:11 mst but he couldn't've given you co-maint anyway
17:12 mst I think in this case modules@ should be able to oblige you
17:12 mst since it's already been de-abandoned once already
17:13 Oleg i sent to modules@ 26 hours ago. The strange thing is that i can't see my message here http://www.nntp.perl.org/group/perl.modules/
17:40 Adura joined #mojo
17:41 good_news_everyon joined #mojo
17:41 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/wFW2ag
17:41 good_news_everyon mojo/master 1e45509 Sebastian Riedel: a few more Mojo::DOM tests
17:41 good_news_everyon left #mojo
17:50 good_news_everyon joined #mojo
17:50 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/yWaCWg
17:50 good_news_everyon mojo/master 00805dc Sebastian Riedel: a few more selector examples
17:50 good_news_everyon left #mojo
17:50 dod joined #mojo
17:51 sri one part of selectors level 4 bugs me... the :hash() pseudo class can start with a combinator
17:52 sri ->find('foo:has(> bar > baz)')
18:04 good_news_everyon joined #mojo
18:04 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/oCZQ4A
18:04 good_news_everyon mojo/master 2ced6e6 Sebastian Riedel: fixed whitespace bug in Mojo::DOM::CSS
18:04 good_news_everyon left #mojo
18:29 Insane joined #mojo
18:31 sri neat, Mojo::DOM is also getting faster in Perl 5.22
18:31 sri 5-20%
18:31 purl 4.8
18:32 sri botsnack
18:32 purl :)
18:34 Grinnz silly purl, making up math
18:53 Insane joined #mojo
19:19 bobkare joined #mojo
19:26 bobkare joined #mojo
19:33 bobkare joined #mojo
19:50 denis_boyun joined #mojo
19:56 Insane joined #mojo
20:03 dotandimet joined #mojo
20:12 neyasov joined #mojo
20:14 punter I would have thought that 5-20% = 4.2
20:14 punter or even 4
20:14 punter but on the other hand, 20% = 0.2 in some way
20:14 punter so ok
20:26 sri purl: for a robot you are pretty bad at math
20:26 purl OK, sri.
20:43 Grinnz sri, i'm working on POE::Loop::Mojo_IOLoop and i think i came across an oddity in Mojo::Reactor::Poll handling filehandles.. a little tough to explain or provide a test case unfortunately, this is all happening in a POE test, and only on my perl 5.10.1 box
20:44 sri that literally tells me nothing ;p
20:44 Grinnz i'm getting there :P
20:45 Grinnz so it sets up a watcher on some filehandle (a TCP connection) on write, and then somehow the callback gets called with writable=0, i looked into the event mask IO::Poll is setting on that handle and it looks like it's POLLHUP | POLLERR
20:46 Grinnz (this test passes fine with Mojo::Reactor::EV)
20:46 sri EV uses select() by default, there are differences between poll() and select()
20:48 Grinnz but anyway POLLHUP | POLLERR causes Mojo::Reactor::Poll to call the callback with writable=0, which i guess is not what POE is expecting
20:49 Grinnz since it set a watcher only on write
20:49 sri you'll love the IO::Poll documentation
20:50 Grinnz i saw, hahaha
20:50 * sri actually learned how IO::Poll works from a book that's no longer in print
20:52 sri although, i guess you can learn the important bits from the linux manpages and the IO::Poll sources too
20:52 Grinnz i wish i knew enough to provide a test case for this but i barely know what's happening in this test
20:54 Grinnz all i know is it is definitely setting ->watch($handle, 0, 1) and it is definitely getting that response from the poll
20:54 dotandimet joined #mojo
20:55 sri as far as i remember, poll() just always watches for POLLHUP and POLLERR
20:55 sri no matter if you set it or not
20:57 Grinnz right, the problem is just that my callback tells POE it got a read callback since writable==0, and if i force it to tell POE it's a write callback instead, the test passes
20:58 sri or might just be IO::Poll https://metacpan.org/source/GBARR/IO-1.25/lib/IO/Poll.pm#L104
20:58 Grinnz heh
20:58 sri anyway, can't say i care particularly
20:59 sri strict write only mode is not something mojolicious uses internally
20:59 sri so... meh
20:59 Grinnz i think i can write a workaround for this case
21:03 Grinnz if a callback is called that isn't being watched, but the other mode is, i'll tell POE to use that one
21:23 Grinnz on the bright side, i think in this process i have figured out how to deal with EV's exception handling for POE::Loop::EV
21:23 Grinnz er, signal handling rather
21:24 Grinnz https://metacpan.org/pod/EV#PERL-SIGNALS # reading docs ftw i guess
21:24 Grinnz i wonder how much having that EV::check in there affects performance
21:51 Grinnz cpantesters still screwed up eh :/
22:04 cpan_mojo Mojolicious-Plugin-ConfigSimple 0.06 by Hugh Esco - http://metacpan.org/release/HESCO/Mojolicious-Plugin-ConfigSimple-0.06
22:07 Nemix joined #mojo
22:11 cpan_mojo POE-Loop-Mojo_IOLoop 0.001 by DBOOK - http://metacpan.org/release/DBOOK/POE-Loop-Mojo_IOLoop-0.001
22:19 preaction with the new CSS4 stuff, i wonder how much of CSS selectors could be used for generic data structure selection... like Data::Partial::Google but with more features, because CSS selectors have a lot more features
22:21 basiliscos joined #mojo
22:35 good_news_everyon joined #mojo
22:35 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/wNJe4A
22:35 good_news_everyon mojo/master f72acd3 Sebastian Riedel: no need to splice headers
22:35 good_news_everyon left #mojo
22:54 jp- joined #mojo
23:06 neyasov joined #mojo
23:24 asarch joined #mojo
23:57 good_news_everyon joined #mojo
23:57 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/Z0u0TQ
23:57 good_news_everyon mojo/master 5676ba4 Sebastian Riedel: fixed bug in Mojo::Headers where max_line_size was not checked correctly
23:57 good_news_everyon left #mojo

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