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

IRC log for #mojo, 2016-02-23

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

All times shown according to UTC.

Time Nick Message
00:01 rabbit In fact, I just realize that I can pass it all through <%= $exception->message %>, so it's not such a critical issue.
00:23 acamari hi everyone
00:32 sri o/
00:53 good_news_everyon joined #mojo
00:53 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/v2OEC
00:53 good_news_everyon mojo/master 17ace53 Sebastian Riedel: add files function to Mojo::Util
00:53 good_news_everyon left #mojo
00:54 sri not super useful, but it's quite a bit less code
00:54 sri ¯\_(ツ)_/¯
00:58 good_news_everyon joined #mojo
00:58 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/v2OEh
00:58 good_news_everyon mojo/master 6375642 Sebastian Riedel: slightly more consistent tests
00:58 good_news_everyon left #mojo
00:59 nugged joined #mojo
01:02 lluad joined #mojo
01:02 jberger http://tinyurl.com/jv662lw
01:11 asarch joined #mojo
01:17 dhg joined #mojo
01:59 davido joined #mojo
02:16 Grinnz joined #mojo
02:19 nugged joined #mojo
02:44 bf joined #mojo
03:20 nugged joined #mojo
03:42 mcsnolte joined #mojo
03:52 noganex_ joined #mojo
04:55 Floyd_ATC joined #mojo
05:20 nugged joined #mojo
05:31 bf joined #mojo
06:22 nugged joined #mojo
06:32 bf joined #mojo
06:36 melo joined #mojo
07:23 nugged joined #mojo
07:33 bf joined #mojo
07:44 dod joined #mojo
07:46 kes joined #mojo
07:51 dod joined #mojo
07:51 batman has anyone written a crawler/link tester in mojolicious?
07:51 batman would like to crawl a web page for dead links...
07:52 noganex joined #mojo
07:54 osfabibisi joined #mojo
08:06 AndrewIsh joined #mojo
08:12 Vandal joined #mojo
08:17 punter joined #mojo
08:18 trone joined #mojo
08:24 nugged joined #mojo
08:28 salva joined #mojo
08:34 bf joined #mojo
08:37 batman https://gist.github.com/jhthorsen/0827a57c154a652c1a70 <-- here's mine if anyone is interested
08:59 vanHoesel joined #mojo
09:04 CHYC joined #mojo
09:13 nic It is so annoying when a server sends back 200 'Page no longer exists'
09:19 vytas joined #mojo
09:25 nugged joined #mojo
09:31 CandyAngel nic: What should it return?
09:32 CandyAngel 410?
09:34 ashimema 410 seems sensible to me
09:34 bf joined #mojo
09:41 nic yeah, that would be helpful.  Baseline is anything that indicates an error
10:05 jabberwok joined #mojo
10:06 nugged joined #mojo
10:35 bf joined #mojo
10:39 odc joined #mojo
10:44 pink_mist sri: btw, for your complaint that nobody filed a bug about $DBDPG_DEFAULT, I think mitya, who was the natural choice for filing that bug, worked around it by using the '$1' style instead of the '?' style for placeholders .. apparently $DBDPG_DEFAULT worked fine with that style
10:45 berov joined #mojo
10:45 pink_mist so mitya didn't want to file that bug report since it no longer mattered for him/her/they
11:24 rwp joined #mojo
11:30 CandyAngel Is it possible to do a non-blocking one_tick with reactor, or do I need to subclass it and add a new method for that?
11:33 batman non-blocking one_tick() ...? what does that mean?
11:36 bf joined #mojo
11:38 CandyAngel one_tick will wait until there is an event to handle, handle it and then return
11:38 CandyAngel I want it to either do an outstanding event or return immediately
11:45 kaare joined #mojo
11:47 CandyAngel I think I can use EV::RUN_NOWAIT, but Mojo::Reactor(::EV) doesn't expose a method for it
11:49 dboehmer joined #mojo
11:50 pink_mist perhaps you could add an event, run one_tick, and then if the event you added wasn't run, remove it
11:52 CandyAngel Yeah, I saw in the docs you can not block for longer than a certain time
11:52 CandyAngel I'd need to test it to see if you can pass 0 to it without it breaking :P
12:05 asarch joined #mojo
12:10 taichi joined #mojo
12:10 CandyAngel What I am trying to do is use Mojo::Reactor to read in the output of some ffmpeg pipes I want to create
12:10 CandyAngel So I can load textures in without my app stopping
12:36 pink_mist sri: https://rt.cpan.org/Public/Bug/Display.html?id=112309
12:37 bf joined #mojo
12:39 mcsnolte joined #mojo
12:43 melo joined #mojo
12:44 Lee joined #mojo
12:44 batman CandyAngel: that's weird... it thought it would return if there was nothing to do.
12:44 batman https://github.com/kraih/mojo/blob/master/lib/Mojo/Reactor/Poll.pm#L41
12:45 batman s/it/i/
12:45 batman it would = one_tick() would
12:46 CandyAngel That's if there is nothing to watch, not if there is something to watch, but nothing ready..
12:46 CandyAngel It says it in the docs that it waits for an event
12:46 batman so how is that one_tick() if it haven't done anything and there might be something to do..?
12:47 batman ah! i get what you want now.
12:47 batman nevermind me.
12:48 CandyAngel :P
12:48 CandyAngel No worries
12:48 batman it sounds like a very strange thing to want though...
12:49 CandyAngel I want to spend as little time in the Reactor as possible
12:50 CandyAngel Or are you talking about loading textures? :P
12:53 sri pink_mist: did you open the ticket?
12:54 pink_mist sri: yes
12:54 pink_mist just now
12:54 sri pink_mist++
12:54 sri good to know about the $x version working
12:54 pink_mist I actually can't get that one to work for me
12:55 pink_mist so I don't know what mitya actually did
12:55 sri oh
12:55 pink_mist it's always the first use of $DBDPG_DEFAULT that fails
12:55 pink_mist the subsequent ones seem to work
12:55 sri interesting
13:02 sri maybe someone else wants to give this a try? https://github.com/kraih/mojo/issues/914
13:26 tencendur joined #mojo
13:37 bf joined #mojo
13:46 neilhwatson joined #mojo
13:50 ramortegui joined #mojo
13:54 vicash CandyAngel: i have a similar problem that i need to solve with reading data from pipes if they're available. I have been looking at Mojo::IOLoop::ReadWriteFork as a possibility
13:56 CandyAngel Hm, that might work
14:13 bf joined #mojo
14:33 batman https://github.com/kraih/mojo/issues/914 <--- 10_000 routes!??
14:33 batman that's........ a lot.
14:39 * nic immediately stops claiming to be working on large apps
14:49 good_news_everyon joined #mojo
14:49 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/v2sRz
14:49 good_news_everyon mojo/master eac8210 Sebastian Riedel: improve url_for performance significantly (closes #914)
14:49 good_news_everyon left #mojo
14:49 mspo I can't imagine how you would get thta many routes
14:50 Adura It's over 9000!
14:51 mspo especially since mojo isn't very friendly to dynamic route generation
14:51 mspo well, you can add them dynamically but it's hard to get rid of them :)
14:52 sri 10k or 100k routes shouldn't matter much anymore
14:54 sri https://github.com/kraih/mojo/issues/914#issuecomment-187727528
14:55 mspo I wonder if they're actually routes or just pages added to the routes
14:56 nic sri++
15:16 zivester joined #mojo
15:23 batman mspo: yeah... i'm curious as well :/
15:24 batman sri: why did you delete tests?
15:25 sri batman: because they fail
15:29 batman oh.
15:32 kivilahtio joined #mojo
15:58 jberger Grinnz / batman: got any thoughts on this? https://github.com/jberger/Mojo-IOLoop-ForkCall/pull/9
15:58 jberger anyone else that uses ForkCall is welcome to comment too
15:59 jberger the poster wants to silence (or I'd accept improve) the warning when the IPC buffer is empty and it tries to deserialize
16:00 jberger his use-case is essentially during global destruction, but I worry about silencing errors when there is a legitimate failure to transmit
16:01 batman jberger: sorry, i think this is way to low level for me :/
16:02 jberger batman: well thanks for looking anyway
16:20 tencendur_ joined #mojo
16:30 jb360 joined #mojo
16:32 taichi joined #mojo
16:37 lluad joined #mojo
16:47 bradjm joined #mojo
17:07 PryMar56 joined #mojo
17:21 taichi joined #mojo
17:37 sri \o\
17:37 sri /o/
17:40 jabberwok amazing how much Mojo::DOM cleans up versus HTML::TreeBuilder ... https://github.com/lindleyw/wp2statocles/commit/2968299b2a7cf2d42b5b765f63517425f0454781
17:42 sri neat
17:43 sri think i'd use the for loop version instead of ->each(sub {...}) though
17:44 sri for my $e ($dom->...->...->each) {
17:45 preaction is reaching into the ->attr hash and deleting the item the best way to do that?
17:48 jabberwok hm, it is only the temporary place-holder attribute that gets deleted.
17:53 sebbe joined #mojo
18:08 sebbe Heh. About the 10000 routes, we do in fact have about that many. However, not 10000 distinct ones. :) We're running 5 very similar but slightly different sites off of the same Mojo app, creating a route to the feature for each site it should be enabled on. That combined with lots of small features (and both internal and external systems) makes it come to around those numbers.
18:13 sri wow, it's already been a year since 6.0 got released :o
18:13 bf joined #mojo
18:13 sri and we are only at 6.48 now
18:14 mspo sebbe: how do you avoid the routes from app1 working for app2?
18:15 jberger a sign of how stable mojo has been recently
18:16 sri yea
18:16 trone joined #mojo
18:16 sebbe mspo: We prefix each route and url with the site name. E.g. route frontpage becomes foo_frontpage and bar_frontpage, and its url /index becomes /foo/index and /bar/index. And then we have a wrapper for url_for that automatically puts on the prefix based on the current site.
18:17 sebbe Is the gist of it.
18:17 mspo got it
18:17 mspo sebbe: I was tryign to do something similar with lite a while ago and just deleted all of the routes and added the correct ones per request ;)
18:18 mspo sebbe: not so efficient
18:19 sri and you use nested routes to speed up routing?
18:19 sri my $foo = $r->any('/foo'); $foo->get('/index')...
18:20 jberger sebbe: could that have been several instances of the same app mounted into a container app at the /foo or /bar prefixes?
18:21 sebbe sri: Indeed.
18:22 patrickz joined #mojo
18:24 sebbe jberger: Possibly. I don't know much about the reasons for the chosen implementation, but it seems to work well enough for us to not bother changing it. :)
18:25 vicash batman: Mojo::IOLoop::ReadWriteFork is great.
18:31 pink_mist sri: update on the $DBDPG_DEFAULT bugreport =) https://rt.cpan.org/Public/Bug/Display.html?id=112309
18:35 sri pink_mist: \o/
18:39 bradjm joined #mojo
18:52 batman vicash: thanks :)
18:54 good_news_everyon joined #mojo
18:54 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/v2GAs
18:54 good_news_everyon mojo/master 170810d Sebastian Riedel: no need to check first
18:54 good_news_everyon left #mojo
19:05 vicash batman: can Mojo::IOLoop::ReadWriteFork be invoked from a Minion::Worker task ? do I need to call the ioloop->start in the task as well ?
19:15 vanHoesel1 joined #mojo
19:18 good_news_everyon joined #mojo
19:18 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/v2Zvb
19:18 good_news_everyon mojo/master b96cea3 Sebastian Riedel: perltidy does not like nested blocks
19:18 good_news_everyon left #mojo
19:20 pink_mist perltidy-- ... the map is much tidier imo
19:24 batman vicash: yeah, you need a running ioloop
19:24 batman s/yeah/no/ :)
19:26 batman vicash: guess you can do $rwf->run(qw(ls -l))->ioloop->start;
19:27 batman i think the ioloop will even stop it self when "ls" is done... i might be wrong though
19:31 Grinnz_ it gets reset in the child, so it should, yes
19:32 Grinnz_ not sure if that is documented behavior though :)
19:34 jberger Grinnz_: not sure that it's documented but the reset method was added especially for that call
19:40 batman jberger: I think me and Grinnz_ are talking about the ioloop stopping... Not sure though.
19:47 jberger Well yeah, but to fully reset you'd have to stop it wouldn't you?
20:03 csson joined #mojo
20:03 batman I mean that if you just call ioloop->start() then it doesn't run forever, but stops when there's no more possible events
20:03 batman I could be remembering this wrong...
20:05 csson joined #mojo
20:05 Grinnz_ that's correct
20:06 Grinnz_ which is why some of my reactor backends have to just run the other event loop's equivalent of ->one_tick over and over, since they don't stop automatically
20:08 jberger Right, and if that's true then reset would certainly also stop
20:12 sri pink_mist: btw. as it turns out, in this context for is actually also a little faster than map
20:13 dod joined #mojo
20:15 sri i think if multiple values were more common then map would be better
20:16 sri hmm, i was wrong it seems
20:16 sri map blocks seems to have a substantial overhead
20:43 bf joined #mojo
21:37 trone joined #mojo
21:37 pink_mist oh, that's a shame
21:39 taichi joined #mojo
21:41 punter joined #mojo
21:41 taichi joined #mojo
21:58 ramortegui_ joined #mojo
22:44 bradjm joined #mojo
23:11 bf joined #mojo
23:55 disputin joined #mojo

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