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

IRC log for #mojo, 2014-08-12

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

All times shown according to UTC.

Time Nick Message
00:02 d4rkie joined #mojo
00:04 dexteruk joined #mojo
00:07 disputin joined #mojo
00:20 neilhwatson joined #mojo
00:26 Claudio joined #mojo
00:27 Averna joined #mojo
00:59 zivester joined #mojo
01:03 laouji joined #mojo
01:37 sujithm joined #mojo
01:41 sujithm_ joined #mojo
01:48 mr-foobar joined #mojo
01:49 klapperl joined #mojo
01:54 KCL joined #mojo
01:56 disputin joined #mojo
02:17 woz joined #mojo
02:53 davido___ joined #mojo
02:54 Adura joined #mojo
02:55 noganex joined #mojo
03:00 woz joined #mojo
03:14 sujithm joined #mojo
03:52 basic6 joined #mojo
04:01 woz joined #mojo
04:55 d4rkie_ joined #mojo
04:59 d4rkie joined #mojo
05:02 woz joined #mojo
05:23 laouji joined #mojo
05:57 denis_boyun joined #mojo
06:00 denis_boyun joined #mojo
06:07 woz joined #mojo
06:40 dp_ joined #mojo
06:49 zivester joined #mojo
06:53 gatitskiy joined #mojo
06:58 _eugen joined #mojo
06:58 Adura joined #mojo
07:01 trone joined #mojo
07:05 Dandre joined #mojo
07:08 woz joined #mojo
07:19 basiliscos joined #mojo
07:19 jamesaxl joined #mojo
07:24 Jonis morning
07:34 neyasov_____ joined #mojo
07:50 woz joined #mojo
07:54 mr-foobar joined #mojo
08:23 Vandal joined #mojo
08:28 batman marcus: didn't get jason-derulo-wiggle-borgore-remix :/
08:45 neyasov_____ joined #mojo
08:52 Dandre joined #mojo
08:53 Dandre left #mojo
08:53 Dandre joined #mojo
09:05 Averna joined #mojo
09:09 mr-foobar joined #mojo
09:21 gatitski_ joined #mojo
09:26 Dandre joined #mojo
09:48 gatitskiy joined #mojo
09:57 Kripton joined #mojo
10:00 neyasov______ joined #mojo
10:00 Dandre joined #mojo
10:11 gatitskiy joined #mojo
10:15 Kripton this is a little off-topic for this channel, but maybe someone had the same problem
10:15 Kripton i have a postgres table with (id integer, data1 text, data2 json)
10:16 Kripton perl dbi is returning data2 as text, and i need a hash do convert later to json using Mojo::JSON
10:16 Kripton right now, i am doing the convertion in perl, but i wondering is there is another way, to do it on-the-fly
10:19 Kripton for my point of view, dbi should return a hash inside another hash , when one or more of the columns is json
10:25 KCL_ joined #mojo
10:34 gatitskiy joined #mojo
10:53 gatitskiy joined #mojo
10:53 sujithm joined #mojo
11:05 dotan joined #mojo
11:06 d4rkie joined #mojo
11:06 D4RK-PH0ENiX joined #mojo
11:18 sri i assume this is what batman had in mind when he wanted to generate classes for helper proxy objects https://gist.github.com/anonymous/89b9a3651cd277a360c1
11:20 sri https://gist.github.com/anonymous/f93e4b96e0cf0082c1ef # the potential performance gain
11:20 sri https://gist.github.com/anonymous/0de87d1408f5e98707a1 # from this before
11:21 sri so from 1.79s to 0.98s
11:21 sri which would be almost the same as a non-nested helper
11:22 batman sri: I could have made that patch for you :(
11:22 sri batman: you didn't want to
11:22 batman I really want to make an alternative, if you're going in that direction.
11:23 sri i am not
11:23 sri just wanted to see the potential performance
11:23 * batman goes away.
11:27 jamesaxl joined #mojo
11:31 sri for future reference, the version i ended up with for my tests https://gist.github.com/anonymous/848be6e11b1771bcc0ea
11:38 neilhwatson joined #mojo
11:52 sri although the potential for leaks does seem rather small here
11:54 sri still, if you instantiate renderers yourself and use nested helpers with them... you will leak like crazy
12:01 sri batman: lets say, i may consider going in that direction, if the risk/reward tradeoff is good enough
12:02 batman \o/
12:02 batman i hope i have time to try something tonight :)
12:02 batman can't promise anything...
12:03 sri then don't make promises
12:03 batman no. i like delay() better
12:03 batman *wink* *wink*
12:04 Jonis got something in your eye, batman? ;)
12:04 batman Jonis:)
12:08 sri anyone is welcome to play the nested helpers benchmark game
12:08 sri my benchmarks are all public, same as my patches
12:08 sh4 joined #mojo
12:08 sri just hack away and compare the results
12:09 Nei joined #mojo
12:11 sri the idea that you can actually use nested helpers as an optimization is a fun one though
12:11 sri my $foo = $c->foo; $foo->bar; $foo->baz; $foo->yada;
12:12 sri those 3 nested helper calls would have normal method call performance
12:13 sri well... almost
12:15 sri a normal method call and a function class
12:15 sri s/class/call/
12:16 Nei hi, how would I go about using mojo with irssi (if at all)? I saw some script which would just call $something->ioloop->one_tick in a loop?
12:17 sri tempire, jberger, marcus, crab: what do you think about the optimization?
12:18 sri upside: very fast nested helpers, with the potential to be *faster* than normal helpers... downside: potential for classes leaking if someone instantiates and destroys multiple renderers while using nested helpers
12:20 sri with faster meaning almost as fast as normal method calls (difference of one additional function call)
12:26 ryozi joined #mojo
12:30 gatitskiy joined #mojo
12:35 sri i don't see how you could make that patch any better
12:36 sri whoops, wrong window ;p
12:40 sri posted a summary to the list too https://groups.google.com/d/msg/mojolicious/Pn0FkpBzO4I/g_4V9y794qQJ
12:43 gatitskiy joined #mojo
12:51 Nei would implementing a custom "reactor" fit the bill?
12:55 sri and another problem... app->foo->bar during startup time
12:55 sri once a helper has been called the class is compiled and frozen
12:56 gatitskiy joined #mojo
13:05 hesco joined #mojo
13:06 sujithm_ joined #mojo
13:10 dexteruk joined #mojo
13:12 marcus sri: I am groot.
13:14 marcus sri: I'm in favor of generating helpers instead of using autoload, fwiw.
13:28 sri tempire, jberger, marcus, crab: updated downsides... upside: very fast nested helpers, with the potential to be *faster* than normal helpers... downside: potential for classes leaking if someone instantiates and destroys multiple renderers while using nested helpers, and nested helpers get frozen as soon as they are used for the first time... so you can't use them in plugins if you want to add more helpers to that namespace afterwards
13:36 sri ok, scratch that ;p
13:36 sri i can make it work
13:39 sri https://gist.github.com/anonymous/36ac0cf73d3f17f7e6ba # this patch invalidates the cache when new helpers are added
13:40 sri not how no tests need to be changed anymore, and it's basically 100% backwards compatible as far as stuff is concerned we supported so far
13:40 sri *note
13:42 sri back to the leak problem only again
13:51 sri "Nested helpers are a lot faster than normal helpers, but because proxy objects use dynamically generated classes, their memory cannot be freed before the end of program execution."
13:51 sri possible explanation if we go that way
13:53 * sri shrugs
13:53 KCL joined #mojo
14:03 sri batman: THIS is why i hate dynamically generated classes
14:04 batman i'm pretty sure you will hate me as well, but i'll show you my patch in a few minutes...
14:04 sri <3
14:05 batman http://pastie.org/9467144
14:06 batman that's the basic idea...
14:06 batman it's aweful, but the test pass
14:07 batman 0.465137 wallclock secs ( 0.47 usr +  0.00 sys =  0.47 CPU) @ 212765.96/s (n=100000)
14:07 batman perl -Ilib -Mojo -E 'helper "foo.bar" => sub { "works!" }; my $c = app->build_controller; n { $c->foo->bar } 100000' ^^^
14:07 sri do all tests still pass?
14:07 batman 0.771905 <-- same code on master
14:07 batman i will check...
14:08 sri almost certain they won't
14:08 batman Result: PASS
14:09 batman oops!
14:09 batman wrong branch :D
14:09 batman t/mojolicious/lite_app.t fail with one test
14:09 * batman checks
14:11 good_news_everyon joined #mojo
14:11 good_news_everyon [mojo] kraih created faster_nested_helpers (+1 new commit): http://git.io/q2QvGQ
14:11 good_news_everyon mojo/faster_nested_helpers ea20e1d Sebastian Riedel: improved performance of nested helpers significantly
14:11 good_news_everyon left #mojo
14:16 sri batman: your solution is slower, your box is just faster than mine ;p
14:17 sri "1.17427 wallclock secs ( 1.18 usr +  0.00 sys =  1.18 CPU) @ 84745.76/s (n=100000)"
14:17 batman :/
14:19 sri i've made a branch, so you can easily check yourself
14:22 batman my solution also bad, in a different way...
14:24 noganex mh... is there a default setting for the session expiration?
14:24 batman $app->sessions->default_expiration(...)
14:24 batman see Mojolicious::Sessions
14:24 batman noganex: ^
14:25 noganex ouch
14:25 noganex thanks batman :)
14:25 batman ouch?
14:25 purl ouch is the appropriate word I think
14:25 sri i kinda want faster nested helpers... but they need a good note in the docs... not sure this one is there yet https://github.com/kraih/mojo/compare/faster_nested_helpers#diff-65cf575515a0ad467194433b39cd30d3R928
14:31 inokenty joined #mojo
14:39 Kripton i have some problems using Mojo::JSON
14:40 Kripton when i got a string with a url inside, the "/" is escaped
14:40 Kripton http://pastebin.com/yuh4YEET
14:45 good_news_everyon joined #mojo
14:45 good_news_everyon [mojo] kraih pushed 1 new commit to faster_nested_helpers: http://git.io/dKwclQ
14:45 good_news_everyon mojo/faster_nested_helpers c1eeadc Sebastian Riedel: match keys only once
14:45 good_news_everyon left #mojo
14:45 odc Kripton, I think it's Data::Dumper which escapes it. Try to print the url directly
14:46 Kripton it is not, there is no Dumper on line 15 - say "Second: " . $second;
14:47 mishantil Kripton: Here is a summary: http://stackoverflow.com/questions/1580647/json-why-are-forward-slashes-escaped
14:51 Kripton according to that url: "The JSON spec says you CAN escape forward slash, but you don't have to"
14:51 dj_goku joined #mojo
14:52 Kripton and looks like PHP has a option to prevent the escape
14:52 Kripton there is anyway to do that with Mojo::JSON ? preveting the escape on / ?
14:54 Kripton right now i am using " =~ s/\\//;" on url data
14:55 Kripton to remove the \
14:55 vervain joined #mojo
14:57 odc looks like it's not possible
14:57 odc https://metacpan.org/source/SRI/Mojolicious-5.27/lib/Mojo/JSON.pm#L22
14:58 good_news_everyon joined #mojo
14:58 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/LHdbJg
14:58 good_news_everyon mojo/master 5271482 Sebastian Riedel: improved Mojo::JSON to generate smaller JSON by not escaping the "/" character
14:58 good_news_everyon left #mojo
14:58 odc omg
14:58 sri your reasons for wanting it is prolly really shitty... but it's an optimization... so meh
14:58 sri s/s//
15:01 Kripton thank you so much :)
15:01 Kripton i am using Mojo::Json to convert postgres native json to perl hash
15:02 Kripton and later on, converting everything back to json to output
15:02 Kripton sri++
15:05 sri batman, jberger, tempire, marcus, crab: funny thing about the leak situation, it's actually the same for .ep templates
15:05 sri they currently all get compiled into the Mojo::Template::Sandbox class
15:06 sri soooo... if you have two apps with the same helpers, but which do different things, you get conflicts ;p
15:07 marcus don't do that then, I guess.
15:08 sri what do you mean?
15:08 sri we already did!
15:09 sri we would just be doing it again, for the exact same reason
15:10 sri the whole idea of having a warning in the docs is pointless, since you're always affected anyway
15:13 neyasov______ joined #mojo
15:13 sri no wait, i'm wrong :D
15:14 sri hahaha... because of the way template helpers are implemented... they check _C()->app->renderer->helpers->{...}
15:14 sri they leak, but that's ok, since they hook into the current controller
15:15 sri this is complicated!
15:17 marcus Not leaking on perl is next to impossible =]
15:19 sri hmm, if we do the same for nested helpers they get a little slower
15:19 sri "1.26338 wallclock secs ( 1.26 usr +  0.00 sys =  1.26 CPU) @ 79365.08/s (n=100000)"
15:22 sri but much less leaky and no conflicts between apps
15:23 * batman <3 leaks
15:23 batman they are tasty
15:23 * batman hides
15:28 sri 1.79s currently, 0.97s for leaky generated classes, and 1.26s for safe generated classes
15:29 * sri shrugs
15:30 batman sri: i'm impressed that you spend so much time on this... i think i would leave it until someone complains.
15:30 mst batman: it bubbled up now because somebody was going through the PR queue, and then I saw your patch, and then I saw the bag of dicks of a method your patch applied to, and then I had to kill it with fire
15:30 mst "code so bad mst is willing to delay going to the pub to make it not exist anymore" (the code that was already there, your patch didn't make it any worse :)
15:31 batman did i provide dicks to the party, or were they already there?
15:31 miked joined #mojo
15:32 batman thanks for fixing. i kind of gave up on the whole thing and made my way around it...
15:32 mst http://paste.scsys.co.uk/415522
15:33 mst hey, while I didn't end up liking the patch, your test case has been merged :)
15:33 batman wohoo! awesomeness strikes again \o/
15:34 mst and you know how much more I enjoy chainsawing the code that writing the test for it ;)
15:34 batman yeah. while i just loooove writing tests
15:35 batman t/00-load.t is like my second girlfriend.
15:39 sri well shit
15:39 sri we could also make template helpers a little more leaky and double their performance
15:40 marcus double the leaks, double the fun.
15:42 lb mst: my eyes :(
15:42 sri https://gist.github.com/anonymous/42ea9ae778a47bcc40c6 # before and after
15:42 mst lb: hence why I broke out the cleansing fire :)
15:43 sri remember though... this only leaks if you instantiate, render something, and destroy apps over and over
15:43 * lb loves to destroy apps
15:44 sri the patch is pretty trivial https://gist.github.com/kraih/9b50adcd0b324513555a
15:45 mst sri: heh. you remind me of how DBIx::Class::Schema leaked memory on destroy but people re-created them so rarely we didn't notice for, like, two years
15:46 sri mst: did it double your performance? ;p
15:46 mst sri: EPRenderer.pm will still be DESTROYed though
15:47 sri i'm torn really... the performance gain is massive and makes a real difference for real-world apps
15:47 sri mst: very rarely
15:47 purl well, very rarely is someone's body too alkaline
15:48 mst sri: right, but that means you can hook in there and kill the namespace
15:48 sri hopefully only when the process is killed
15:48 mst http://paste.scsys.co.uk/415526
15:48 sri mst: can you really reliably kill a namespace?
15:48 mst that's the code in Class::MOP that blows it away
15:48 mst for anon classes
15:48 mst I would suggest trying it, at the very least it'd make the leak -less-
15:52 bodgix joined #mojo
15:55 sri the fact that this sounds like a good idea scares me
15:58 hesco joined #mojo
16:16 disputin joined #mojo
16:17 _eugen joined #mojo
16:26 disputin joined #mojo
16:40 good_news_everyon joined #mojo
16:40 good_news_everyon [mojo] kraih created faster_helpers (+1 new commit): http://git.io/hmPsbQ
16:40 good_news_everyon mojo/faster_helpers d89e688 Sebastian Riedel: made all helpers significantly faster
16:40 good_news_everyon left #mojo
16:40 sri ok, this works... but might be going a little too far ;p
16:41 sri https://gist.github.com/anonymous/fc47b339b009924120a7 # before and after results
16:41 sri batman, jberger, marcus, tempire, crab: review!
16:43 crab review what?
16:43 purl review is in this case eyeballing how the app performs at a particular point, and looking through the code changes too or welcome if you have time
16:43 crab https://gist.github.com/kraih/9b50adcd0b324513555a? or?
16:43 sri the branch i committed right before
16:44 sri allright, let me be absolutely clear
16:44 sri batman, jberger, marcus, tempire, crab: review this! https://github.com/kraih/mojo/compare/faster_helpers
16:44 batman i would suppose the renderer was kept alive as long as my app is running..?
16:45 disputin joined #mojo
16:46 sri https://gist.github.com/anonymous/7f271e5aa352c19bea6a # before and after for nested helpers
16:46 disputin joined #mojo
16:47 dexteruk joined #mojo
16:48 sri https://gist.github.com/anonymous/b6a915ce905790195b65 # and another before and after example that brings the point across really well
16:48 batman sri: i don't get why you can't do the things inside get_helper() when you do add_helper()...
16:49 batman i mean the monkey_patch part
16:49 * batman checks it out
16:50 crab sri: that really helps, especially with /lastlog
16:52 disputin joined #mojo
16:54 sri batman: make a fricking branch!
16:55 sri just show that it's less/faster code
16:58 good_news_everyon joined #mojo
16:58 good_news_everyon [mojo] kraih pushed 1 new commit to faster_helpers: http://git.io/suCbaA
16:58 good_news_everyon mojo/faster_helpers 8e4c504 Sebastian Riedel: note in rendering guide is not necessary anymore
16:58 good_news_everyon left #mojo
16:59 batman sri: i can't make it work.
16:59 batman the rest looks good to me. +1
17:05 batman or... it doesn't seem to make any difference, but it looks like it's the same if you move $class ||= ... out of the for() loop inside get_helper()
17:05 batman just thought it was a bit confusing to have it inside...
17:05 dotan joined #mojo
17:06 sri mst++ # for the class destruction idiom
17:09 dexteruk_ joined #mojo
17:15 rawler joined #mojo
17:15 kthakore joined #mojo
17:16 kthakore [Show #MOJO] Mojolicious/Mango web Mergeorsell.com :)
17:16 kthakore also
17:16 kthakore [Show #MOJO] iOS/Mojolicious MySQL app https://twitter.com/KartikThakore/status/499180790258077696 :)
17:17 kthakore yes I spammy but wanted to share
17:17 kthakore how is everyone ?
17:18 sri \o/
17:18 kthakore hi sri
17:18 kthakore how are you!?
17:18 * kthakore <3 Sri
17:19 kthakore [Show #MOJO] Also! PaaS (Platform as a service) with Mojolicious, Digital Ocean and EV http://scratchd.ca
17:19 sri great, and yourself?
17:19 sri don't forget to add your companies here! https://github.com/kraih/mojo/wiki/Projects-and-Companies-Using-Mojolicious#companies
17:20 kthakore Okay
17:21 kthakore Eh I am okay. My startup of 3 years got hit by a financing drought. I had to let people go (some resigned) and re structure and apply for jobs and start other businesses
17:21 kthakore soooo ... hehe busy and stuff
17:27 kthakore Any work on 3-way binding (similar to Firebase/Angular) with Mojo/Mongo and Angular? Please ping me
17:29 basiliscos joined #mojo
17:45 denis_boyun joined #mojo
17:46 jberger From a quick review, i am +1
17:47 jberger I will really need to look at that class destroy stuff
17:54 fhelmber_ joined #mojo
18:00 hesco joined #mojo
18:23 gatitskiy joined #mojo
18:27 sri allright, jberger didn't even use the word magic... looks like it's all good :)
18:47 tempire whoa
18:47 tempire that's quite the performance increase
18:47 KCL_ joined #mojo
18:56 lb sri: nice
18:59 sri mst: do you know more about that idiom by any chance? a "@{"${class}::ISA"} = (); Symbol::delete_package($class);" seems to prevent the leak too
19:00 sri i'm rather happy about the performance gain too :D
19:00 sri batman: oh, to answer why i'm so persistent with this... i think our old helpers prevent mojolicious from scaling up... as in big enterprise-ish apps
19:01 mst sri: it may be that people simply didn't find it
19:01 mst sri: I just knew there was code in Class::MOP and went and found it
19:01 sri ah
19:02 mst hrm. except that https://rt.perl.org/rt3/Public/Bug/Display.html?id=92708 suggests that delete_package *does* leak
19:02 mst notice he's on 5.14
19:03 mst maybe it got fixed later and nobody realised?
19:03 Nei didn't it say delete_package leaks if you don;t clear ISA first?
19:03 sri batman: nested helpers will make that a non-issue conceptually, but using them might feel bad if they are slow.... so by making them really fast i want to preemptively make sure nobody skips them for performance
19:04 sri mst: oh, it does still leak, i just clean @ISA before delete_package
19:06 mst hrm. that code seems to do pretty much the same thing
19:07 mst my suspicion is that the package deletion code was written by somebody sufficiently familiar with hitting the symbol table with a stick that it didn't occur to them to check for a method
19:08 mst and 5.10.1's Symbol.pm has delete_package
19:08 mst so you're probably good
19:08 sri i knew it existed once... but didn't remember until google pointed me at http://perldoc.perl.org/perlfaq7.html#How-do-I-clear-a-package%3f
19:09 mst sigh. 'recent' isn't helpful
19:09 sri too bad the circular ref problem hasn't been fixed, no way i would have figured that one out on my own
19:09 mst bloody thing
19:09 purl i heard bloody thing was looking in /tmp
19:10 disputin joined #mojo
19:13 Nei delete_package has always been there iirc
19:13 sri wow, the leak is actually pretty bad
19:13 marty joined #mojo
19:14 sri two packages in @ISA and leaking about 20mb for every 20k delete_package calls
19:19 good_news_everyon joined #mojo
19:19 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/Wa0qMA
19:19 good_news_everyon mojo/master d32baef Sebastian Riedel: improved performance of nested helpers and helpers in templates significantly
19:19 good_news_everyon left #mojo
19:22 sri this one is funny too... i have no clue yet why it wants me to UTF-8 decode the package https://github.com/kraih/mojo/commit/d32baef1560b73c3211143c5be921ee36205cb71#diff-a09274b18038544adf6675dc264c0b74R103
19:22 sri render_to_string does not perform any encoding
19:23 batman sri: ok. cool :)
19:23 batman the performance gain is... impressive! \o/
19:25 jamesaxl joined #mojo
19:25 sri yay for n {...} blocks... they make comparing little changes really fun
19:25 batman i agree :)
19:26 batman i also hoped you would choose n() when i read through the backlog ;)
19:27 sri :D
19:28 batman what did i() stand for..?
19:28 sri timing or so
19:28 batman ok
19:29 sri right, the function was called _timer and it returned a hires time
19:31 fhelmber_ joined #mojo
19:34 disputin joined #mojo
19:41 disputin joined #mojo
19:46 Adura joined #mojo
19:46 kthakore joined #mojo
19:50 disputin joined #mojo
20:07 nishttal2 joined #mojo
20:07 nishttal2 where do I set the MOJO_MODE?
20:08 kthakore nishttal2: in %ENV https://www.cs.cf.ac.uk/Dave/PERL/node106.html
20:09 nishttal2 kthakore, thanks but where do I set it so its set before the startup() is called?
20:10 Nei maybe set it before calling startup
20:11 nishttal2 i'm not calling startup
20:11 nishttal2 oh wait.. one sec
20:12 nishttal2 ok so the morbo server runs script/myapp which is turn is calling start_app
20:12 nishttal2 Mojolicious::Commands->start_app('MyApp');
20:13 sri morbo -h
20:14 nishttal2 thanks.. i get it now.. morbo defaults to development and hypnotoad to production.. so I dont really have to set a mode.. this is awesome!
20:14 sri :)
20:21 dotan joined #mojo
20:22 good_news_everyon joined #mojo
20:22 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/dJQjeg
20:22 good_news_everyon mojo/master 9be10fd Sebastian Riedel: mention that hypnotoad sets the operating mode to production
20:22 good_news_everyon left #mojo
20:33 disputin joined #mojo
20:35 Nei basically irssi has timeout_add and input_add, that should be enough for an io loop. how must the one_tick work?
20:38 sri Nei: https://github.com/kraih/mojo/blob/master/lib/Mojo/Reactor.pm
20:38 aramisf joined #mojo
20:39 stephan48 Nei: you, want to run Mojo inside of irssi? sounds like a crazy but awesome idea
20:39 Nei my idea was to run mojo inside irssi but I don't see (yet) how I can make one_tick block
20:40 Nei as irssi is single threaded
20:40 sri https://github.com/kraih/mojo/blob/master/lib/Mojo/Reactor/Poll.pm
20:40 sri https://github.com/kraih/mojo/blob/master/lib/Mojo/Reactor/EV.pm
20:41 Nei hi sri thanks for the references afaik those all block
20:42 sri just like ->start
20:43 basiliscos joined #mojo
20:43 Nei I see, are you saying it can still work if I do not implement one_tick
20:44 Nei that makes sense I guess
20:44 sri i don't know, but you don't seem to have a choice
20:46 disputin joined #mojo
20:48 Nei stephan48: may be useful for web /mobile interface
20:48 stephan48 yea
20:48 stephan48 please keep me updated :)
20:49 denis_boyun_ joined #mojo
20:50 sri considering AnyEvent has an irssi backend, i don't see why it shouldn't work, you just assume the event loop is always running
21:02 good_news_everyon joined #mojo
21:02 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/eLmY1A
21:02 good_news_everyon mojo/master eceba70 Sebastian Riedel: fixed typo in Changes file
21:02 good_news_everyon left #mojo
21:11 dexteruk joined #mojo
21:30 sujithm joined #mojo
21:31 dexteruk_ joined #mojo
21:44 [TheFlash] joined #mojo
21:44 [TheFlash] hi
21:44 purl hola, [TheFlash].
21:45 sri o/
21:45 [TheFlash] i have a question about Mojo::DOM
21:45 [TheFlash] how do I extract the HTML code from a modified DOM object?
21:45 sri http://mojolicio.us/perldoc/Mojo/DOM#to_string
21:46 [TheFlash] so just doing "$dom" is ok?
21:46 sri http://mojolicio.us/perldoc/Mojo/DOM#stringify
21:47 [TheFlash] my $dom = Mojo::DOM->new($html);
21:47 [TheFlash] $dom->find('#ads')->pluck('remove');
21:47 [TheFlash] return "$dom";
21:47 [TheFlash] this is my code, it doesn't work
21:47 [TheFlash] there is a div with the id "ads" on the page
21:47 [TheFlash] it's not removed
21:49 sri perl -Mojo -E 'my $x = x(q{<div><div id="ads">Test</div></div>}); $x->find("#ads")->pluck("remove"); say "$x"'
21:50 [TheFlash] Can't locate object method "remove" via package "Mojo::DOM"
21:50 [TheFlash] strange
21:50 sri mojo version?
21:50 purl mojo version is 3.35 (here) - rhaen is updating everything now.
21:50 [TheFlash] it looks like the program i am writing a perl script for ate the output
21:50 sri purl: forget mojo version
21:50 purl sri: I forgot mojo version
21:50 [TheFlash] Package: libmojolicious-perl
21:50 [TheFlash] Version: 2.98+dfsg-2
21:50 sri ...
21:50 sri and i'm out
21:51 [TheFlash] is version 2.98 of any use?
21:51 sri that's where you are https://github.com/kraih/mojo/blob/master/Changes#L1420
21:52 [TheFlash] i see, it's quite old
21:53 disputin joined #mojo
21:53 [TheFlash] so my only hope is that it's in backports...
21:53 [TheFlash] libmojolicious-perl (3.68+dfsg-1)
21:54 [TheFlash] works now :)
21:57 [TheFlash] unfortunately it still didn't remove the div...
21:57 [TheFlash] it did in my test
21:57 [TheFlash] but not on the real page
22:01 [TheFlash] also, the output seems to be weird now :/
22:01 [TheFlash] it wasn't with the older version
22:02 disputin joined #mojo
22:08 Lanre joined #mojo
22:09 disputin joined #mojo
22:20 Lanre joined #mojo
22:22 [TheFlash] left #mojo
22:23 disputin joined #mojo
22:34 jberger [TheFlash] the current version is 5.27
22:36 jberger batman: it seems that convos doesn't like nicks that start with [
22:36 jberger I was noticing that in freenode#techempower-fwbm
22:36 jberger their bot is [d___d]
22:37 jberger but it shows up in the list as d__d]
22:37 jberger (both of those should be two underscores)
22:38 jberger when I try to tab complete [d it doesn't work
22:38 jberger d_ does complete to the wrong thing
22:38 sujithm joined #mojo
22:39 neyasov______ joined #mojo
22:44 sujithm joined #mojo
23:00 neilhwatson joined #mojo
23:05 disputin joined #mojo
23:06 hesco joined #mojo
23:06 sujithm joined #mojo
23:10 davido__ joined #mojo
23:17 good_news_everyon joined #mojo
23:17 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/Av9xqw
23:17 good_news_everyon mojo/master dee284f Sebastian Riedel: small optimizations
23:17 good_news_everyon left #mojo
23:35 good_news_everyon joined #mojo
23:35 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/mHBxkg
23:35 good_news_everyon mojo/master 1bf533d Sebastian Riedel: switch to faster AUTOLOAD idiom
23:35 good_news_everyon left #mojo
23:36 D4RK-PH0ENiX joined #mojo
23:37 sri about 0.04s in my nested helper benchmark ;p
23:38 jberger that's a vaguely funny looking regex :-)
23:44 good_news_everyon joined #mojo
23:44 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/7lCxtg
23:44 good_news_everyon mojo/master 7d21365 Sebastian Riedel: use a slightly more correct regex
23:44 good_news_everyon left #mojo
23:46 jberger I meant funny as in humorous
23:46 jberger not wrong
23:46 jberger but ok ;-)
23:49 sri i know :)
23:49 sri that was just ocd
23:49 hesperaux joined #mojo
23:53 D4RK-PH0ENiX joined #mojo

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