Camelia, the Perl 6 bug

IRC log for #mojo, 2013-02-23

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

All times shown according to UTC.

Time Nick Message
00:01 dhg joined #mojo
00:56 BeDa joined #mojo
01:01 GabrielVieira joined #mojo
01:20 asarch joined #mojo
01:36 jberger wow its been quiet today
01:36 * jberger got distracted
01:36 jberger sri: https://gist.github.com/jberger/5017886
01:47 sri jberger: neat!
01:47 jberger I'm thinking of using something like that for a websocket chat buffer
01:47 jberger just for an example
01:48 jberger can't run it from the netbook tho
01:48 jberger CAN NO HAZ 64 BIT INTZ
01:48 sri you shouldn't mix blocking an non-blocking calls though if the Mango instance is shared
01:49 sri it dies if a non-blocking operation is in progress already
01:50 jberger yeah, this test script probably isn't safe
01:50 * sri is very surprised there are so few boxes on cpantesters that don't support quads http://www.cpantesters.org/​distro/M/Mango.html#Mango-0.04
01:51 sri then again, you're currently blocking the one connection anyway with the tailable cursor :)
01:51 sri but the next Mango release should support a pool of connections
01:52 jberger I must admit, I'm still getting used to non-blocking
01:53 jberger its the create/insert that are blocking right
01:53 jberger but those are only called if needed
01:53 jberger should I still have a $delay->begin callback on the end?
01:53 jberger of each?
01:54 marty That rethinkdb web demo is pretty cool.     Overall, it looks promising.
01:55 sri all methods that allow a callback as last argument perform an operation on the server, and can be non-blocking
01:56 jberger but the keys is that they SHOULD ALL be if I want to do any non-blocking
01:56 sri yes
01:56 jberger gotcha
01:56 jberger I thought, because it was setup that I would get away with it
01:56 sri if you want to mix, you should use two Mango instances
01:56 jberger lesson learned
01:57 jberger the creation logic would only have to happen once
01:57 jberger so sure, another instance would be fine
01:57 sri you might get away with it in most cases, just not all
01:58 jberger but you are right I'm still kinda "blocking" waiting for messages
01:58 sri that part should be fine
01:58 sri $delay->wait unless $delay->ioloop->is_running; is very good
01:59 sri that only starts the event loop if necessary
01:59 jberger other tasks still get done though right, so this could be in a websockety server example
01:59 jberger yeah, that I learned from the GalileoSend stuff
01:59 * sri really likes $cur->next(__SUB__);
01:59 jberger that was my proud point :-)
02:01 jberger the whole thing kept bombing out until I realized I had to insert something before calling next
02:02 jberger then after I would insert something from the cli client it would work
02:02 jberger was driving me crazy until it clicked
02:02 sri how did it fail?
02:02 sri error message?
02:03 jberger cpu would spike
02:03 jberger I think it was looping infinitely
02:03 jberger remove the insert line
02:03 sri hmm
02:04 * sri should take a look when he has some time, could be a bug
02:04 jberger take your time, this was just a distraction
02:04 jberger I have a friend who will be needing a custom webapp, and I thought I might try Mango for it
02:05 jberger then one thing led to another
02:05 jberger he wouldn't need tailable though
02:05 jberger nor even non-blocking
02:07 sri ah, it's a mongodb thing, no bug
02:07 jberger that won't be for a few months though
02:07 jberger really?
02:07 jberger it was the perl instance going 100%
02:07 sri yea, it closes the cursor if there is no document
02:07 jberger oh
02:07 jberger should there be an error in $err
02:07 sri and so there are new roundtrips over and over
02:07 sri nope, it's not really a bug
02:08 jberger oh "new" roundtrips
02:08 * jberger is still a little lost
02:08 * jberger trusts sri
02:09 * sri will think about how to handle it better
02:09 * jberger gets it now
02:10 sri every cursor starts with a query operation followed by get_more operations
02:10 sri the get_more's block
02:11 sri block as in the server lets us wait for new documents to be added
02:11 sri for like 5mins or so
02:13 sri perhaps i'll just defer it with a timer for 1 second or so, that should prevent the cpu spike
02:15 * jberger must still not be getting it, but thats ok :-)
02:16 * jberger looks at the code
02:17 sri it's all surprisingly simple, just a few primitives chained together
02:20 jberger but if the 5 minutes are safe, what's with the 1 sec defer?
02:21 jberger in the end even if I have 5 minutes to add things, there is no guarantee that a message will be buffered in that time
02:22 jberger best to just create something
02:22 jberger sri: different question
02:23 jberger is the mongo cli application running javascript?
02:23 jberger or does it just have a javascript interpreter built in?
02:23 sri there is v8 running inside mongodb
02:24 jberger ok
02:24 jberger I was going to be surprised if they wrote their own javascript interpreter
02:24 sri you can $db->eval('...') javascript code too
02:24 jberger now if only it had a dom, we could test Mojolicious apps using it
02:25 sri that's a whole different beast
02:25 * jberger realizes that was kind of a silly statement
02:25 sri and there is already phantom.js
02:26 sri i get what you mean though ;p
02:26 jberger ok, its dinner time
02:26 jberger I'm liking Mango/Mongo though
02:26 jberger very cool
02:26 jberger o/
02:26 * sri wouldn't be surprised if you could run dom.js inside mongodb :D
02:26 jberger :-P
02:44 bpmedley Greetings, I just wanted to draw your attention to PhantomJS with Selenium.  It allows for headless Selenium WebKit browser interaction.  Selenium::Remote::Driver works as expected and can allow for quick browser based tests with Mojolicious.
03:32 jeen joined #mojo
03:42 btyler joined #mojo
03:55 Caelum should my api remove line numbers from server errors from perl exceptions?
03:55 Caelum bpmedley: that's pretty awesome
03:56 Caelum bpmedley: can it be installed on windows?
03:58 Caelum on the one hand, you don't want to give API users info about your source code, on the other hand it makes debugging more painful
03:58 Caelum maybe I'll just remove the line numbers in production
03:59 btyler joined #mojo
04:07 bpmedley Caelum: http://phantomjs.org/download.html
04:07 bpmedley Caelum: Line numbers confuse most users.
04:09 jeen joined #mojo
04:09 Caelum bpmedley: wow, this is awesome
04:10 Caelum bpmedley: this is an XML api though, not end user stuff
04:11 bpmedley Caelum: http://blogs.perl.org/users/brian_medley/2013/0​2/headless-selenium-testing-with-phantomjs.html
04:12 bpmedley Caelum: In the screenshot I have seen the Javacript popup that google uses for typeahead.  Pretty neat.
04:20 inokenty joined #mojo
04:20 Caelum bpmedley: I wouldn't mind writing tests in js either
04:21 Caelum bpmedley: assuming there's some sort of testing framework for js
04:22 bpmedley Caelum: Something like this: http://casperjs.org/?  I haven't used it.
04:22 ka2u joined #mojo
04:23 Caelum neat!
04:28 irq joined #mojo
04:41 preflex_ joined #mojo
04:44 jeen joined #mojo
05:22 Molaf joined #mojo
05:28 cfedde joined #mojo
05:32 jeen joined #mojo
05:32 yakudza joined #mojo
05:40 r0b3rt1 joined #mojo
05:40 lukep joined #mojo
06:06 jeen joined #mojo
06:18 marty_ joined #mojo
06:23 r0b3rt1 left #mojo
06:25 ka2u joined #mojo
06:26 irq joined #mojo
06:28 d4rkie joined #mojo
06:43 jeen joined #mojo
06:49 Vandal joined #mojo
07:05 Mike-PerlRecruiter_ joined #mojo
07:11 jzawodn joined #mojo
07:14 marcus joined #mojo
07:16 jeen joined #mojo
07:31 baton8 joined #mojo
07:47 basic6 joined #mojo
07:49 jeen joined #mojo
07:55 yakudza joined #mojo
07:56 yakudza joined #mojo
08:25 jeen joined #mojo
08:28 Britzel_ joined #mojo
08:32 lukep joined #mojo
08:37 davido joined #mojo
08:50 dod joined #mojo
08:53 fotodigital joined #mojo
08:53 ka2u joined #mojo
08:55 mire joined #mojo
08:59 dod joined #mojo
09:02 jeen joined #mojo
10:05 stephan48 joined #mojo
10:12 stephan48 joined #mojo
10:26 ka2u joined #mojo
10:48 dpetrov_ joined #mojo
10:51 jeen joined #mojo
11:06 BeDa joined #mojo
11:07 BeDa joined #mojo
11:22 berov joined #mojo
11:22 berov Hello,
11:23 berov Since sometime i receive reports about failing tests for my Mojolicious plugin from CPANTS
11:24 berov SELECT m.* FROM tl_bi_drwin_tips m  WHERE (id=(SELECT MAX(id) FROM tl_bi_drwin_tips      WHERE startdate >= UNIX_TIMESTAMP()     AND  published=1 AND bet_state=0 AND language='bg' ))
11:24 berov ops sorry :)
11:24 berov Can't locate object method "sysread" via package "FileHandle" at /usr/local/src/CPAN/build/Mojoliciou​s-3.85-ep_AW6/blib/lib/Mojo/Util.pm line 275.
11:25 berov what can be the reason?
11:26 berov here is an example report http://www.cpantesters.org/cpan/report​/c1c7882a-7c36-11e2-ae37-819b2390d62b
11:27 berov Locally tests pass
12:00 fotodigital joined #mojo
12:13 TitanOfOld joined #mojo
12:22 dvinciguerra joined #mojo
12:44 dpetrov_ joined #mojo
12:50 sh4 joined #mojo
13:01 dotandimet1 joined #mojo
13:09 TitanOfO1d joined #mojo
13:14 berov1 joined #mojo
13:16 marcus morning
13:17 berov1 good ... :)
13:17 berov1 afternoon
13:19 berov1 anyone can give me some hint about the following error:
13:19 berov1 Can't locate object method "sysread" via package "FileHandle" at /usr/local/src/CPAN/build/Mojoliciou​s-3.85-ep_AW6/blib/lib/Mojo/Util.pm line 275.
13:19 berov1 Happens during tests of a Mojolicious Plugin
13:20 irq joined #mojo
13:20 sri o/
13:20 berov1 ?
13:21 berov1 sri:?
13:22 marcus sri: I have a branch that adds Mojo::Util->warn_deprecated - which adds a MOJO_DEPRECATIONS_FATAL env variable, and reports deprecations with line numbers from perspective of caller (Carp).
13:22 lammel2 joined #mojo
13:22 marcus sri: Should I push it to the repo and open a pull request for discussions?
13:24 marcus sri: The branch was inspired by - https://twitter.com/bobtfis​h/status/304886477542793217 - and the fact that I always spend time tracking down where I used deprecated functions.
13:27 berov1 left #mojo
13:28 berov1 joined #mojo
13:28 marcus berov1: seems weird.
13:28 berov1 to me too
13:28 berov1 and happens from time to time
13:29 berov1 the otherday  skipped one of my tests on Solaris just because of this error
13:29 berov1 and today I see it for linux
13:30 berov1 the first time in one *.t file today I got report for another *.t this time on GNU/linux
13:30 marcus berov1: slurp is tested in t/mojo/util.t tho
13:30 berov1 I do not test slurp
13:31 berov1 I just test my plugin
13:31 marcus berov1: but you use slurp?
13:31 marcus in the tests?
13:31 berov1 no.. wait
13:31 marcus berov1: the sysread call is inside Mojo::Util::slurp
13:31 berov1 yes
13:33 berov1 marcus: here is what is happenning http://www.cpantesters.org/cpan/report​/c1c7882a-7c36-11e2-ae37-819b2390d62b
13:33 berov1 Compilation failed in require at t/basic.t line 22.
13:33 crab marcus: sounds good to me
13:34 berov1 I just require Mojolicious::Lite
13:34 berov1 https://github.com/kberov/Mojolicious-​-Plugin--DSC/blob/master/t/basic.t#L22
13:36 marcus berov1: but Mojo itself passes tests on these platforms?
13:37 berov1 marcus: Ok I the I am doing something wrong :)?
13:37 berov1 like use.. :) jocking ofcourse
13:37 marcus berov1: I can't see anything controversial. Guess sri is the best authority here.
13:38 sri marcus: -1 from me, i don't like deprecation stuff in the public api
13:38 marcus sri: that's just an implementation detail tho.
13:39 sri perhaps it should be a Carp feature?
13:39 marcus sri: could name it _warn_deprecated
13:39 BeDa joined #mojo
13:40 * sri still doesn't like it, deprecation code should be isolated
13:40 sri if it's generic enough for Mojo::Util, it should be in core
13:40 sri (perl core)
13:40 marcus sri: I actually think it'd be useful for module authors as well.
13:40 sri marcus: but why do we have to provide it instead of Carp?
13:40 marcus sri: that's very unrealistic tho
13:41 marcus sri: we don't even use carp for deprecations atm.
13:41 marcus sri: Carp is a generic warning library, not a deprecation mechanism.
13:42 good_news_everyone joined #mojo
13:42 good_news_everyone [mojo] marcusramberg created fatal_deprecations (+1 new commit): http://git.io/eubGfQ
13:42 good_news_everyone mojo/fatal_deprecations 171cb51 Marcus Ramberg: Add warn_deprecated method with MOJO_FATAL_DEPRECATIONS env variable and warnings from perspective of caller
13:42 good_news_everyone left #mojo
13:42 marcus Anyways, you can write your comments in the pull request and we can vote over it. sounds like crab supports it.
13:43 travis-ci joined #mojo
13:43 travis-ci [travis-ci] kraih/mojo#278 (fatal_deprecations - 171cb51 : Marcus Ramberg): The build failed.
13:43 travis-ci [travis-ci] Change view : https://github.com/kraih/mojo/commit/171cb51bca3e
13:43 travis-ci [travis-ci] Build details : http://travis-ci.org/kraih/mojo/builds/5001371
13:43 travis-ci left #mojo
13:43 sri the pull request has to be rejected based on style alone i'm afraid
13:44 crab i support some way to make it easier for people to find out where they used deprecated code. we deprecate lots of things, and it'd certainly save me time. i have no special opinion on how it should be implemented or where, but a common warning method sounds like a decent start.
13:44 marcus sri: I haven't even sent the pull request yet.
13:44 * sri agrees with crab, but disagrees about marcus implementation
13:45 crab i would slightly prefer for it to be an internal function rather than part of the public api.
13:45 crab i can see that other module authors may find it useful in principle, but somehow i don't like the idea of their using our method to announce it.
13:45 sri marcus: documentation and tests are also missing, huge -1 from me
13:46 marcus sri: if it's to be an internal method, it shouldn't have any documentation, should it?
13:46 crab "my -1 is so big, it's a -3!"
13:46 sri nope, but i really dislike a private function used all over the place
13:47 sri then i'd rather have it public and tested i guess
13:48 sri exporting a private function is about as ugly as Mojo::Util::_warn_deprecated
13:49 marcus ok, I'll add tests and documentation in my next commit, after I feed $baby
13:49 sri you also need to reformat everything
13:49 marcus I perltidyed it?
13:50 sri line length limit is 79
13:50 sri perltidy doesn't fix that
13:50 marcus even for strings? "...." .\n"..." then?
13:50 sri you have to convert all messages to heredocs to be in line with the rest of the deprecation messages
13:50 marcus but those heredocs make the warnings go over two lines
13:51 Britzel joined #mojo
13:51 sri then convert the heredocs to "" . ""
13:51 marcus sure
13:51 marcus I'll do that.
13:51 * sri just wants it consistent
13:51 marcus I think I removed the heredocs everywhere already
13:53 sri marcus: i think you didn't perltidy Mojo::Util btw
13:54 sri marcus: have you checked if there's a perl6 built-in?
13:55 sri that's an awkward looking heredoc https://github.com/kraih/moj​o/commit/171cb51bca3e#L4R125
13:56 sri oh
13:56 sri that one is way out of it's deprecation time https://github.com/kraih/moj​o/commit/171cb51bca3e#L6R61
14:00 sri also, why is warn_deprecated() better than deprecated()?
14:01 jeen joined #mojo
14:02 sri btw. i feel strongly about keeping deprecations isolated because i have screwed up removing deprecated code that wasn't before
14:02 jberger berov, it seems that the tester somehow is getting FileHandle objects rather than IO::File objects
14:03 jberger which does make sense given that its running 5.10
14:03 jberger but it seems that testing/installing Mojolicious should have given that tester problems first
14:10 dotandimet joined #mojo
14:10 dpetrov_ joined #mojo
14:12 jberger sri: should Mojo::Util use IO::File just in case?
14:13 mattastrophe joined #mojo
14:13 berov1 Thanks, jberger
14:14 jberger berov, you might try adding use IO::File near the very top of your test scripts
14:14 berov1 I was considering something similar
14:14 jberger https://metacpan.org/module/perl5120delt​a#Other-potentially-incompatible-changes
14:15 jberger as of 5.12 filehandles should always be instances of IO::File class, but it seems that before then the behavior was, lets say oddly defined
14:15 good_news_everyone joined #mojo
14:15 good_news_everyone [mojo] marcusramberg pushed 1 new commit to fatal_deprecations: http://git.io/EFH_9Q
14:15 good_news_everyone mojo/fatal_deprecations 1bee554 Marcus Ramberg: Reformat messages to fit 78 char limit, add documentation, tests
14:15 good_news_everyone left #mojo
14:17 travis-ci joined #mojo
14:17 travis-ci [travis-ci] kraih/mojo#279 (fatal_deprecations - 1bee554 : Marcus Ramberg): The build was fixed.
14:17 travis-ci [travis-ci] Change view : https://github.com/kraih/mojo/com​pare/171cb51bca3e...1bee554ddd85
14:17 travis-ci [travis-ci] Build details : http://travis-ci.org/kraih/mojo/builds/5001754
14:17 travis-ci left #mojo
14:19 TitanOfOld joined #mojo
14:19 jberger marcus: why not just change the "warn"s to "carp"s?
14:19 marcus jberger: die functionality?
14:21 marcus I agree with sri deprecated is better than warn_deprecated, I'm pushing that change now.
14:22 good_news_everyone joined #mojo
14:22 good_news_everyone [mojo] marcusramberg pushed 1 new commit to fatal_deprecations: http://git.io/M9qZRA
14:22 good_news_everyone mojo/fatal_deprecations 0dab946 Marcus Ramberg: Rename warn_deprecated to deprecated, reformat missing transaction
14:22 good_news_everyone left #mojo
14:23 jberger use warnings FATAL => 'all';?
14:24 jberger I'm neutral
14:25 marcus jberger: that doesn't only affect deprecations tho
14:26 jberger personally I don't think I would make them fatal
14:26 jberger why not see all the places you are using the deprecated code?
14:27 marcus jberger: the idea is that you can make them fatal in your test env so that you notice them.
14:27 marcus jberger: before you upgrade to a version that has removed them, and stuff just breaks.
14:28 sri jberger: look into Mojo::Base
14:29 sri use IO::Handle is one of our defaults, how else could we not have fails on cpantesters otherwise? ;)
14:30 cstamas sri: Mojolicious-3.86.tar.gz contains another Mojolicious-3.86.tar.gz :)
14:30 mst jberger: Mojolicious-3.86.tar.gz contains another Mojolicious-3.86.tar.gz
14:31 cstamas LOL :)
14:31 sri :(
14:31 jberger blast
14:31 jberger now why isn't there a warning for that?!
14:31 cstamas sorry, the lol was for the same post ;-)
14:31 good_news_everyone joined #mojo
14:31 good_news_everyone [mojo] marcusramberg pushed 1 new commit to fatal_deprecations: http://git.io/Un_Qgw
14:31 good_news_everyone mojo/fatal_deprecations eebfd15 Marcus Ramberg: Fix a couple of missed deprecations
14:31 good_news_everyone left #mojo
14:31 sri guess we'll have a quick 3.87 if deprecate() gets accepted
14:31 mst and maybe adjust your MANIFEST.SKIP
14:32 jberger isn't the manifest.skip supposed to handle that?
14:32 marcus classic release misteak :)
14:32 mst jberger: yes. but apparently yours doesn't.
14:33 travis-ci joined #mojo
14:33 travis-ci [travis-ci] kraih/mojo#281 (fatal_deprecations - eebfd15 : Marcus Ramberg): The build was broken.
14:33 travis-ci [travis-ci] Change view : https://github.com/kraih/mojo/com​pare/0dab9468cddb...eebfd1518e0d
14:33 travis-ci [travis-ci] Build details : http://travis-ci.org/kraih/mojo/builds/5001964
14:33 travis-ci left #mojo
14:34 jberger (I'm just sayin: http://irclog.perlgeek.de/​mojo/2013-02-22#i_6484918)
14:34 jberger :-)
14:34 crab thanks for putting a mojolicious in our mojolicious
14:35 jberger I herd you like mojolicious, so I put a mojolicious in your mojolicious
14:35 jberger so you can mojo while you mojo
14:35 jberger :D
14:35 good_news_everyone joined #mojo
14:35 good_news_everyone [mojo] marcusramberg pushed 1 new commit to fatal_deprecations: http://git.io/8vdEyg
14:35 good_news_everyone mojo/fatal_deprecations 2c437eb Marcus Ramberg: Add missing semicolon from last commit
14:35 good_news_everyone left #mojo
14:35 BeDa joined #mojo
14:35 crab it wasn't funny after i said it already. :-P
14:35 mst crab: I hate you.
14:36 jberger crab: you didn't take it far enough
14:37 * jberger retracts previous xhibit
14:37 crab far enough for mst to hate me, at least
14:37 marcus mst: yo dawg, I heard you hate crab, so I put crab in your pants.
14:37 jberger HAHAHAH
14:38 travis-ci joined #mojo
14:38 travis-ci [travis-ci] kraih/mojo#283 (fatal_deprecations - 2c437eb : Marcus Ramberg): The build was fixed.
14:38 travis-ci [travis-ci] Change view : https://github.com/kraih/mojo/com​pare/eebfd1518e0d...2c437ebd753f
14:38 travis-ci [travis-ci] Build details : http://travis-ci.org/kraih/mojo/builds/5002012
14:38 travis-ci left #mojo
14:38 good_news_everyone joined #mojo
14:38 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/_9QUYg
14:38 good_news_everyone mojo/master 7b78ff3 Sebastian Riedel: skip tarballs
14:38 good_news_everyone left #mojo
14:39 mst sri: you might want to look at the MANIFEST.SKIP from e.g. Moo
14:39 mst I use a negative assertion line at the top to define things to -include-
14:39 marcus sri: did you mean to remove render_content in that commit?
14:40 sri marcus: yes
14:40 sri marcus: it was about 3 months over it's deprecation time
14:40 marcus sri: would be nice if such things are mentioned in the commit message, for when one is searching version history
14:40 crab help, is there a pants.skip?
14:41 marcus sri: maybe in changes even.
14:41 crab marcus: srsly
14:41 marcus sri: not arguing against the removal, just the lack of mention.
14:42 marcus crab: pants.optional?
14:42 sri marcus: would be nice if you had squashed the commits before pull request
14:42 marcus sri: but I'm trying to surpass vti in the commit count :D
14:43 sri :D
14:43 sri carry on then
14:43 jberger sri: FYI the M::B-created MANIFEST.SKIP uses this:
14:43 jberger \bMojolicious-[\d\.\_]+
14:43 jberger but if you don't see any reason to ever include any tarballs (probably true) then your commit is fine
14:43 sri jberger: how is that better?
14:43 sri right
14:44 jberger I was just about to send that, is all
14:44 jberger you beat me to it
14:44 jberger thought I would still mention
14:45 sri i'd argue it is actually worse, since it's dist specific
14:45 TitanOfOld joined #mojo
14:45 crab agreed.
14:45 dvinciguerra joined #mojo
14:45 mst Module::Build is pretty much a giant bag of 'nice ideas in theory'
14:45 crab but it smells like cat barf if you look inside?
14:46 jberger I've looked inside it plenty
14:46 mst honestly, I find cat barf less unpleasant than the Module;:Build internals.
14:47 jberger mst: I got bored one day and started this: https://github.com/jberger/Moodule-Build
14:48 sri marcus: oops, looks like i broke your pull request
14:50 sri i guess squashing commits is not so bad anymore anyway, since you can see the result at https://github.com/kraih/mojo/pull/457/files
14:50 sri *forgetting to
14:51 jberger mst: I agree that MB has some problems, but if you weren't a C programmer first, EUMM is downright impossible
14:51 good_news_everyone joined #mojo
14:51 good_news_everyone [mojo] marcusramberg pushed 1 new commit to fatal_deprecations: http://git.io/zQQdlg
14:51 good_news_everyone mojo/fatal_deprecations 68f3116 Marcus Ramberg: Merge, update changes
14:51 good_news_everyone left #mojo
14:51 marcus WARNING: You called a Git command named 'pusy', which does not exist. Continuing under the assumption that you meant 'push'
14:51 marcus \o/
14:51 * sri phears
14:51 jberger marcus has other things on the mind
14:52 marcus sri: there, I fixed it
14:52 sri do we have a vote count?
14:53 marcus +1 from me, -1 from you +1 from crab, jberger neutral?
14:53 marcus guess tempire is sleeping?
14:53 jberger any thoughts on using the lexwarn functionality for this?
14:54 * jberger is just thinking out loud
14:54 BeDa joined #mojo
14:55 jberger maybe that defeats the purpose, "die noisily from anywhere when wanted"
14:55 jberger yeah, I'm still neutral
14:56 jeen joined #mojo
14:56 jberger personally I think just changing the deprecation warns to carps would be enough
14:56 * sri is neutral now
14:57 jberger you still get line numbers from caller and you can trap via $SIG{__WARN__} if you like
14:57 sri tempire: it's all up to you now
14:57 jberger the Mojolicious tarball inside the Mojolicious tarball is only 911 bytes
14:58 jberger it added itself rather early?
14:58 sri it's prolly your messed up tarball before make manifest
14:59 marcus very likely.
14:59 jberger oh, yeah, thats probably it
14:59 jberger nothing got added the first time
14:59 jberger but it still made a mostly empty tarball, which got added on make manifest
15:00 jberger see I knew I was going to screw it up
15:00 jberger :-)
15:00 marcus jberger: that's a classic screwup tho :)
15:00 sri just like adding os x resource fork files :)
15:00 marcus yeah, was just going to say that
15:00 marcus my two most common release mistake over my cpan history
15:00 marcus mistakes
15:00 jberger never thought about it because I'm used to the common .SKIP, just really never thought about it
15:01 marcus jberger: welcome to the core group btw ;)
15:01 jberger marcus, thanks
15:04 sri marcus: when would you want to make deprecations fatal anyway?
15:04 sri is anyone on cpan doing it already?
15:04 marcus sri: on my build server.
15:04 sri hmm
15:05 sri i guess that makes sense
15:06 sri ok, i'm slightly +1 now
15:06 marcus :)
15:07 marcus I don't know if anyone else is doing it yet. As mentioned, I saw this tweet from t0m, and figured it sounded sensible - https://twitter.com/bobtfis​h/status/304886477542793217
15:07 good_news_everyone joined #mojo
15:07 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/davhNQ
15:07 good_news_everyone mojo/master b0fc0f3 Sebastian Riedel: Merge pull request #457 from kraih/fatal_deprecations...
15:07 good_news_everyone left #mojo
15:07 jberger warnings::warnif('deprecated', 'Function X is deprecated in rainbow');
15:08 human39 joined #mojo
15:09 jberger http://perldoc.perl.org/perllexwarn.h​tml#Reporting-Warnings-from-a-Module
15:10 jberger don't know how you get the caller line number like carp using this, but its the standard architecture
15:10 good_news_everyone joined #mojo
15:10 good_news_everyone [mojo] marcusramberg pushed 1 new commit to master: http://git.io/SoChIg
15:10 good_news_everyone mojo/master 890c57e Marcus Ramberg: Mention removal of deprecated render_content helper
15:10 good_news_everyone left #mojo
15:12 marcus ok, well past vti now, can go back to sleep. ;)
15:12 marcus not going to catch up with sri anytime soon.
15:14 marcus (http://pastie.org/private/ao3u1lglxnr6np4djbhpg)
15:16 jberger and whoever that Sebastien guy is
15:16 jberger :-P
15:17 jberger s/e/a/
15:17 * jberger should probably go back to bed
15:25 hesco I'm looking for my missing \@config_files.  Can anyone please help me find it?  https://gist.github.com/hesco/5020130
15:26 marcus hesco: looks like that's a moose error?
15:28 hesco I guess so.  ok, will pose this question there.
15:29 sri marcus: you've been a bit sloppy
15:31 * marcus hides
15:31 marcus sri: you're supposed to tell me that before you merge the branch ;)
15:32 tempire_ joined #mojo
15:32 sri but then i couldn't increase my lead!
15:32 marcus o/ tempire_
15:33 marcus sri: fair enough.
15:35 jberger ok, so I have been reading, and I really think that the new deprecated should either be this:
15:35 jberger sub deprecated { push @_, 'deprecated'; goto &warnings::warnif }
15:35 jberger or we should just use warnings::warnif('deprecated', $message)
15:35 jberger sorry not push, unshift
15:35 jberger sub deprecated { unshift @_, 'deprecated'; goto &warnings::warnif }
15:36 gryphon joined #mojo
15:36 mst ha!
15:36 mst you require 5.10!
15:36 jberger it does use carp/croak internally ( I checked )
15:36 mst that means I don't have to warn you that 5.8.4 will segfault if you do that :D
15:36 jberger and it hooks into the normal system
15:37 jberger mst: the fact that Mojolicious requires 5.10 is so liberating
15:37 * tempire wakes up
15:37 * tempire skims backlog
15:38 kthakore hello how do I do render_static in the format of render( html => STATIC, json => {} ) so that for text and html I am sending a static image and for json I am sending an object?
15:38 kthakore render( static => doesn't seem to do it
15:38 kthakore hi tempire
15:38 crab you can't render two things at once.
15:38 * marcus finishes changing a soiled nappie
15:38 crab use respond_to
15:38 kthakore crab: okie
15:39 kthakore mst: oh hai! that new DB design works like teh awesome!
15:40 crab what new db design?
15:41 rihegher joined #mojo
15:44 kthakore crab: well not new ... but jsut smarter. I was using DBIx:Class with foriegn key (X) on x instead of foreign key (X) on x_id
15:44 kthakore every time I accesed x DBIx::Class would expand it all out
15:44 berov joined #mojo
15:45 good_news_everyone joined #mojo
15:45 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/aQXBUQ
15:45 good_news_everyone mojo/master ce3b5d1 Sebastian Riedel: fixed deprecation tests and tweaked documentation
15:45 good_news_everyone left #mojo
15:45 sri marcus: your tests were not portable
15:46 tempire +1 for the idea
15:46 * tempire submits to sri's style requests
15:47 marcus sri: good point about the paths.
15:47 * marcus thinks deprecated "reason" reads better in the sourcecode than warn too =)
15:51 good_news_everyone joined #mojo
15:51 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/h73OSQ
15:51 good_news_everyone mojo/master 89a62f9 Sebastian Riedel: small documentation tweak
15:51 good_news_everyone left #mojo
15:52 sri jberger: what would be the advantage?
15:52 jberger use warnings FATAL => 'deprecated'
15:52 jberger use warnings FATAL => 'all'
15:52 jberger work as expected
15:53 jberger it makes these proper "warnings" in the sense of the warnings.pm system
15:53 sri do they really?
15:54 jberger lexically scoped etc
15:54 sri but then you need to activate them in every scope
15:54 sri mojolicious apps have many parts
15:54 mst and those parts all invoke Mojo::Base's ->import, no?
15:55 sri not necessarily
15:55 jberger Carp::Always
15:57 sri marcus: thoughts?
15:59 marcus how would it look for the actual deprecation line?
16:00 jberger if you use my snippet above, it looks exactly the same
16:00 marcus Also, you wouldn't be able to activate fatal warnings without changing the source code?
16:00 jberger perl -MCarp::Always ...
16:01 marcus jberger: doesn't that just add stack traces?
16:01 mst correct
16:01 jberger yeah, maybe you're right
16:01 jberger I thought it did
16:01 jberger nm
16:02 * jberger still thinks using the standard mechansims when possible is a Good Thing
16:02 * jberger has said his piece
16:02 * jberger will defer to the group
16:02 sri what is the standard mechanism for our use case?
16:03 mst there isn't one, that's why DBIx::Class ended up writing its own
16:03 * sri nods
16:03 mst the warnings scoping stuff really doesn't work for this sort of thing
16:03 mst it would be nice if it did, but it doesn't
16:04 jberger well then I fold
16:04 jberger :-)
16:04 mst into a paper aeroplane?
16:04 jberger crane actually
16:04 * jberger wanted to be sure the idea got a proper vetting
16:05 * tempire really appreciates jamadam's effort.
16:06 marcus I support proper discussions.
16:12 jberger I guess I was hoping to avoid something home-rolled if something standard existed
16:12 jberger but hearing that DBIC found it necessary to do it, I think what I see is that there is no such standard mechanism for this
16:13 * jberger is now leaning +1
16:13 sh4|2 joined #mojo
16:18 mst actually, we're going to release a module that encapsulates what our stuff does
16:18 mst damned if I can remember what riba and frew decided to call it though
16:19 jberger my confusion about warnings::warn using carp seems to go back a long time! http://www.perlmonks.org/?node_id=188508
16:20 jberger thats 2002
16:20 jberger should someone fix the doc?
16:20 jberger if Perl development were on github I would do it right now
16:26 sri it should certainly be discussed properly, if we release deprecated() it will get used by plugins
16:28 mst jberger: if you produce a patch I'd be happy to arrange for it to be applied
16:28 good_news_everyone joined #mojo
16:28 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/a43eWA
16:28 good_news_everyone mojo/master 6beb2c9 Sebastian Riedel: fixed typo
16:28 good_news_everyone left #mojo
16:30 dotandimet joined #mojo
16:31 asarch joined #mojo
16:33 mst jberger: there's a perl repository in perl-doc-cats
16:33 mst jberger: where's my pull request?
16:34 jberger I can't put it on perl-doc-cats can I? It needs to be regen/warnings.pl
16:34 BinGOs patch against regen/warnings.pl not lib/warnings.pm
16:35 mst jberger: why can't you? it's a documentation fix
16:35 jberger mst: oh yeah, I owe you a patch on the docs for Safe::ISA
16:35 mattastrophe joined #mojo
16:35 jberger yeah, I could use perlbug
16:36 mst wtf
16:36 mst you complain about it not being on github. I give you a github route to submit via.
16:36 mst you talk about perlbug
16:37 mst I'm going into the office to get settled in to write some code
16:37 mst get another coffee and turn your brain on and we'll discuss in half an hour ;)
16:37 jberger mst: no I misunderstood
16:38 jberger I thought that doc-cats only had the FAQs etc
16:38 jberger I see that I'm wrong, it has a full fork of perl
16:38 jberger thanks for that
16:49 jberger https://github.com/perl-doc-cats/perl/pull/1
16:49 jberger FIRST!
16:50 * jberger walks down memeory lane
16:50 mst jberger: it did until a minute ago when I wondered why it didn't and kicked somebody :)
16:51 jberger :)
16:53 BinGOs its a shame that mirrors/perl is 5 days out of date
16:53 jberger I saw that, I don't think there will a conflict, seeing as how this has been at least 11 years in coming
16:54 BinGOs as is perl perl-doc-cats/perl
16:54 BinGOs ( not 5 days though ).
16:54 mst I think perl-doc-cats/perl should end up being just blead, synced live
16:54 mst but that involves scripting I CBA doing right now
16:57 bpmedley_ joined #mojo
17:10 jberger mst: now that github has automagic fork/pull-request for online edit
17:11 jberger which are probably a bad thing for code
17:11 jberger but great for documentation
17:11 jberger something like perl-doc-cats on github is a great thing
17:12 jberger (*automagic when you don't have commit access to the repo in question)
17:24 mattastrophe joined #mojo
17:31 sri btw
17:32 sri marcus, tempire: did you have an opinion on the whole args thing yesterday?
17:32 sri https://github.com/kraih/mojo/commit/7b​af50faa896055a144888f5483b206141c537fd
17:36 dvinciguerra joined #mojo
17:54 basiliscos joined #mojo
17:54 basiliscos left #mojo
17:55 basiliscos joined #mojo
18:00 tempire My bouncer is dying.  What does args do?
18:00 * tempire reads
18:02 tempire I don't know that's worth adding.
18:03 tempire it's not hard to use the stash, and the stash encourages separation between actions
18:03 tempire and I'd rather see people use helpers anyway
18:04 tempire I mean "I don't know that it's worth keeping"
18:06 sri tempire: yea, the only reason would be to allow people to use @_ in actions for "something"
18:07 tempire I think it would confuse people more than help, having another way to do the same thing.
18:07 sri i started thinking about it after trying Play Framework, where they validate params as part of the routes and put the result into arguments
18:07 tempire doesn't seem like the mojolicious way
18:08 tempire hmm
18:08 sri $r->get('/')->validate(foo => 'str', bar => 'int')->to('test#index');
18:09 sri my ($self, $foo, $bar) = @_;
18:09 tempire well that brings us to route plugins
18:10 sri http://engineering.linkedin.co​m/play/play-framework-linkedin # an example
18:10 * tempire likes the idea of routing plugins
18:10 * marcus likes the idea of cheese.
18:11 sri tempire: we kinda have that already with shortcuts
18:11 sri http://mojolicio.us/perldoc/Mojo​licious/Guides/Routing#Shortcuts
18:11 marcus sri: I agree with not adding it, as I don't quite see the use.
18:11 marcus (args)
18:11 sri marcus: i'm also worried about it being confusing, like tempire said
18:12 tempire huh.
18:12 sri tempire: you can combine shortcuts and conditions to do crazy things with routes
18:13 marcus don't you know I'm LOCO???
18:15 * marcus tries to run http://www.xen.org/download/xcp/index_1.6.0.html in Parallels.
18:18 tempire wow.
18:18 tempire monkey_patch really did clean up ::lite
18:19 sri indeed
18:20 sri also ojo
18:26 tempire might we add the shortcut keyword to lite?  and then monkey_patch in the new shortcut names.
18:27 sri tempire: i've thought about that many times, but it's too problematic imo
18:27 tempire what's the problem?
18:27 sri conflicts
18:28 sri adding a shortcut now is simple and doesn't require much thought
18:28 sri but if it automatically becomes a keyword too... you need to plan for conflicts with other functions
18:29 sri tempire: oh, and of course you need to use BEGIN {} blocks to load such plugins
18:30 sri otherwise perl would complain about barewords
18:30 tempire BEGIN blocks are the devil.
18:30 sri guess why this was my pluggabe keyword proposal ;p https://gist.github.com/kraih/4351674
18:31 basiliscos Hello. How to correctly fork sub-process and return result in Mojo? I do use:
18:31 basiliscos run \@cmd, \$in, \$out, \$err, timeout( 10 ) or $self->c->app->log->debug("Could not fork: $?");
18:31 basiliscos $self->render(text => "success\n", status => 200);
18:31 basiliscos but it says nothing to the curl client (the launching process is just a simple script with "sleep 1"). Thanks!
18:31 basic6 joined #mojo
18:32 sri basiliscos: please do not paste code into irc channels
18:32 basiliscos sri: OK, sorry. Here is a my code : http://bpaste.net/show/79284/
18:33 basic6 joined #mojo
18:34 basiliscos I just do not understand: why Mojo silently closes the stream to the client (curl). Does that relates somehow to morbo?
18:36 sri basiliscos: forking inside a mojolicious app is generally a bad idea, there are countless things to consider, i doubt anyone will be able to help you
18:37 basiliscos sri: thanks. Is there any alternative for launching external process and return the result to client?
18:39 sri of course, a non-blocking connection to a backend service, maybe a worker queue with redis
18:42 basiliscos sri: Could you give me any link to such restrictions in Mojo design, that discourages  any forking ? (I already proposed external-job-processor to my boss, but he doesn't believe to me --- I have an small experience in Mojo).
18:43 good_news_everyone joined #mojo
18:43 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/svETnQ
18:43 good_news_everyone mojo/master e15f134 Sebastian Riedel: better deprecation warnings
18:43 good_news_everyone left #mojo
18:44 sri basiliscos: there are no mojolicious specific restrictions, just the usual forking inside an app that already forks is hard
18:44 basiliscos sri: ok, thanks.
18:45 sri rule of thumb, never fork in a web app
18:46 berov joined #mojo
19:01 mattastrophe joined #mojo
19:01 d4rkie joined #mojo
19:08 Mike-PerlRecruiter_ joined #mojo
19:14 sri marcus: shouldn't it be local $Carp::CarpLevel = $Carp::CarpLevel + 1
19:15 sri in case it gets customized further?
19:17 sri (just like we do in Test::Mojo)
19:19 dvinciguerra joined #mojo
19:19 sri guess it's not that important
19:23 dotandimet joined #mojo
19:33 good_news_everyone joined #mojo
19:33 good_news_everyone [mojo] kraih tagged v3.87 at 64f1bbd: http://git.io/cGAiGQ
19:33 good_news_everyone left #mojo
19:36 KindOne joined #mojo
19:46 crab oh, guess i'm too late to do the release.
19:50 mattastrophe joined #mojo
19:51 dvinciguerra joined #mojo
20:03 sri by 10 minutes
20:10 jamesw joined #mojo
20:16 marcus sri: sorry, was putting children to bed, not sure it's so important.
20:16 marcus sri: if people want to customize it, they can make their own.
20:16 sri yea, i started to wonder if it might even be counter productive after asking
20:17 sri maybe the function calling our deprecated function already changed the carplevel :o
20:18 sh4|2 joined #mojo
20:19 sri (for different purposes)
20:23 sri parallel requests in Play Framework remind me a lot of our delays :) https://gist.github.com/brikis98/4592742
20:24 sri it's futures for actors behind the scenes though
20:36 dotandimet joined #mojo
20:50 GabrielVieira joined #mojo
20:54 rem_lex|pivo joined #mojo
20:58 dvinciguerra joined #mojo
21:04 irq joined #mojo
21:13 bzero joined #mojo
21:13 fotodigital joined #mojo
21:16 rihegher left #mojo
21:19 marcus turtles all the way down?
21:20 * marcus is looking at virtualization.
21:20 marcus Think I will set up an eucalyptus server at work
21:33 sri marcus: i completely missed that your tests didn't actually work :S
21:33 marcus sri: what do you mean?
21:33 sri marcus: carplevel doesn't do anything
21:33 marcus sri: they did output the expected output, and passed?
21:34 marcus sri: eh, I tested on the command line as well, it does?
21:34 sri marcus: you don't test the carplevel
21:35 marcus sri: well, I guess not, since I removed the line numbers.
21:35 marcus I felt the test would be fragile with them tho
21:35 sri even then
21:35 * sri fixes it
21:45 good_news_everyone joined #mojo
21:45 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/Cnry6w
21:45 good_news_everyone mojo/master 4d68c33 Sebastian Riedel: better deprecation tests
21:45 good_news_everyone left #mojo
21:45 sri marcus: that's what i meant
21:46 sri your test couldn't get another result than util.t
21:46 marcus sri: yeah, that is better
21:47 marcus sri++
21:47 sri \o/
21:55 perlite_ joined #mojo
22:33 marcus sri: Testing mango-apps, any thoughts? And how do you typically structure model-related methods when using mango?
22:58 sri marcus: like i've done anything serious with mango yet ;p
22:59 marcus sri: :D
22:59 marcus sri: Waiting for the 1.0 release?
23:00 sri 1.0 is months away, i'm gonna use it for more serious stuff before that first
23:01 marcus good
23:01 sri model abstraction should be the same as redis i suppose
23:01 marcus I plan to make a not so serious app with it soon.
23:01 marcus For lunch
23:01 sri well, just be aware that everything can still change, even though it might be more reliable than the official driver already :D
23:02 marcus sri: If the lunch app breaks, there will be tears!
23:02 sri if you want any kind of stability before 1.0, just fork it
23:02 sri like in the early mojolicious days ;p
23:03 marcus I just want people to be able to say days they plan to eat lunch, and for the lunch lady to add the menu and to tell people when it's served.
23:03 marcus sri: don't worry, I'm not actually serious about the tears.
23:03 sri "mango ate your lunch"
23:03 marcus If you break something, I'll just change it.
23:04 marcus guess the biggest job is writing the !#$%!#$ markup anyways. Think I'll just use bootstrap
23:04 marcus haters will be hatin' :)
23:05 marcus Actually, I think I'll just write the whole darn thing against facebook.
23:06 sri btw. i like to tie my live tests to an env var
23:06 sri the uri has all the important information, server, port, credentials and database name
23:07 marcus mm
23:07 sri when you do $mango->db it uses the database set in the uri
23:07 sri that pattern is all over the mango test suite
23:08 sri i just set TEST_ONLINE=mongodb://sri:secret@mongohq.com:123/test_db and it works
23:09 marcus sri: why not just mongo_url: in myapp.conf and then override it in myadd.testing.conf ?
23:09 sri sure, was just an example
23:10 sri the important part is that you can configure a database name and it just works
23:11 berov left #mojo
23:11 sri official driver doesn't even do that
23:11 sri you have to hardcode the database name and carry it around
23:11 hrupp joined #mojo
23:14 marcus sri: we support the same idea in Mojo::Redis
23:14 marcus sri: with /<db_nr> in the url to do a switch on connect
23:14 sri i was surprised Mojo::Redis doesn't do blocking
23:16 marcus I just never had the need.
23:16 sri especially for testing i find it a lot nicer
23:23 sri marcus: when an error occurs do you abort all concurrent requests?
23:24 marcus sri: no, we just emit the error
23:24 marcus sri: https://github.com/marcusramberg/mojo-r​edis/blob/master/lib/Mojo/Redis.pm#L298
23:24 sri hmmm, so you never know which request the error belongs to?
23:26 sri marcus: btw. no need to check has_subscribers, Mojo::EventEmitter will automatically warn if the error event has no subscribers
23:26 marcus sri: cool
23:29 sri oh, i see, you don't actually check for redis errors, just transport
23:33 sri wish the mongodb wire protocol was so simple :)
23:35 marcus yeah, redis has some solid advantages ;)
23:35 marcus but then, so does mongodb
23:35 * sri loves the redis design
23:36 marcus sri: Are you using TM2 these days?
23:36 sri of course, it looks pretty nice now
23:36 marcus yeah. I liked the new cmd+shift+n too
23:37 sri and undo in the file browser :)
23:37 marcus Hope they release a stable release soon, so we can get more plugins.
23:37 sri the tabs above document option made my day
23:37 marcus yeah :)
23:37 marcus Just getting regular releases is pretty good in itself
23:38 sri indeed

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