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

IRC log for #mojo, 2015-03-09

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

All times shown according to UTC.

Time Nick Message
00:39 asarch joined #mojo
00:57 mattastrophe joined #mojo
01:16 bwf joined #mojo
02:00 mattastrophe joined #mojo
02:25 klapperl joined #mojo
02:37 hshong joined #mojo
02:49 Flying_Squirrel joined #mojo
02:53 jberger EITSTOOQUIET
02:54 jberger purl: humans?
02:54 purl The humans are dead! https://www.youtube.com/watch?v=WGoi1MSGu64
03:15 bpmedley https://github.com/brianmed/patches <— If too quiet, then perhaps someone could read the readme?
03:18 Grinnz joined #mojo
03:26 noganex joined #mojo
04:16 cpan_mojo Statocles 0.041 by Doug Bell - http://metacpan.org/release/PREACTION/Statocles-0.041 (depends on Mojolicious)
04:21 dotandimet joined #mojo
04:22 buu bpmedley: Well, you don't explain patches at all and 'perl Patches.pl foo' is kinda lame
04:51 hshong joined #mojo
04:54 Oleg joined #mojo
05:33 polettix joined #mojo
05:39 reneeb joined #mojo
05:45 marmez joined #mojo
05:47 irq joined #mojo
06:09 reneeb joined #mojo
06:55 bpmedley buu: Thanks!  It’s the OS patches, for example using yum on CentOS.  I’ll update to be more speciifc.
06:59 berov joined #mojo
07:02 dod joined #mojo
07:07 dod joined #mojo
07:08 melo joined #mojo
07:12 bramirez joined #mojo
07:56 cpan_mojo Mojo-SMTP-Client 0.01 by Oleg G - http://metacpan.org/release/OLEG/Mojo-SMTP-Client-0.01
07:58 Oleg yahoo, now you can send emails from your mojo app :)
07:59 AndrewIsh joined #mojo
08:14 Vandal joined #mojo
08:19 eseyman joined #mojo
08:20 trone joined #mojo
08:37 Anon021 joined #mojo
08:41 irq joined #mojo
08:45 kwa joined #mojo
08:47 bramirez joined #mojo
08:48 csson joined #mojo
09:01 ashimema joined #mojo
09:04 vytas joined #mojo
09:15 fhelmber_ joined #mojo
10:06 McA joined #mojo
10:23 batman oliver: wow! how capable is it compared to the other mail libraries?
10:24 oliver err, very? :-}
10:24 batman haha. nicely put
10:25 amon joined #mojo
10:25 Oleg joined #mojo
10:27 batman i was thinking compared to Email::Send or Mail::Send
10:30 batman oliver: sorry. meant Oleg :)
10:30 ashimema_ joined #mojo
10:52 Oleg joined #mojo
10:53 Oleg batman: this is just SMTP client, like Net::SMTP, but can be easily used with different email generators like MIME::Lite. I'll add cookbook with real world examples in the next version
10:56 batman Oleg: ok. cool.
10:56 batman Oleg: can i suggest that you drop autodie and just make that the default?
10:57 Oleg hmm, I am not sure. For example Mojo::UserAgent will not die on error
10:57 batman no but mojo useragent is special :/
10:58 Oleg why it is special?
10:59 batman nevermind that comment.
10:59 batman but... i think it's better to have one way to handle errors instead of an attribute to instruct behavior
11:00 Oleg don't know, i like flexibility :)
11:02 batman ok
11:12 cpan_mojo Mojo-JSON-Any 0.990105 by Yuriy Syrota - http://metacpan.org/release/YSYROTA/Mojo-JSON-Any-0.990105
11:27 mikegrb joined #mojo
11:34 asarch joined #mojo
11:39 cpan_mojo Mojo-mysql 0.07 by HARRYL - http://metacpan.org/release/HARRYL/Mojo-mysql-0.07
11:52 melo joined #mojo
11:59 dotan1 joined #mojo
12:09 Zx3 joined #mojo
12:09 meshl joined #mojo
12:12 mattastrophe joined #mojo
12:23 dod joined #mojo
12:23 bramirez joined #mojo
12:25 cpan_mojo Mojolicious-Plugin-SMS 0.02 by Yuriy Syrota - http://metacpan.org/release/YSYROTA/Mojolicious-Plugin-SMS-0.02
12:29 dod joined #mojo
12:36 neilhwatson joined #mojo
12:39 cpan_mojo Mojolicious-Command-generate-lexicont 0.01 by DOKECHIN - http://metacpan.org/release/DOKECHIN/Mojolicious-Command-generate-lexicont-0.01
12:52 cpan_mojo Mojolicious-Plugin-RESTRoutes 0.010012 by MAXHQ - http://metacpan.org/release/MAXHQ/Mojolicious-Plugin-RESTRoutes-0.010012
13:15 deserted_ joined #mojo
13:21 Flying_Squirrel joined #mojo
13:26 doby joined #mojo
13:36 sh4 joined #mojo
13:38 falco joined #mojo
13:39 falco hi
13:41 marty joined #mojo
13:48 jberger o/
13:50 marty \o
13:52 zivester joined #mojo
14:07 salva joined #mojo
14:13 buu bpmedley: Well I mean, I assume this is the kind of thing you'd already know if you were interested in it, but like.. when you say patch I think of a literal piece of code in a file that changes another file of code, not some kind of meta package manager
14:16 D4RK-PH0ENiX joined #mojo
14:17 hernan604 joined #mojo
14:18 dotan joined #mojo
14:22 bc547 joined #mojo
14:24 mattastrophe joined #mojo
14:36 gryphon joined #mojo
14:38 doby joined #mojo
15:02 trone I'd like to have a sort of under route as dispatcher, so inside the "under" i cast some redirect_to, but they fail - I suppose because the action is not finished until the "under" route started. Is it right? any hint to do similar thing?
15:02 pink_mist I've not had problems using redirect_to in under
15:08 trone pink_mist: I see. I had a wrong behaviour.
15:10 trone however, if you have my $prev = under('/previous/route')->to('controller#previous'); $prev->get('/next/route')->to('controller#next') and redirect inside 'previous', the redirection happens after the 'next' action.
15:10 trone Or at least, this is what I see from log.
15:11 reneeb trone: did you "return"? like "return $self->redirect_to( $self->url_for('/'));"
15:15 trone reneeb: yep.
15:16 trone but thinking about it, this is correct
15:16 trone the 302 is a status for the client, but the framework build however the response body though its actions
15:17 reneeb I meant: "return 0". previous action has to return a false value to prevent mojolicious from further dispatching...
15:17 reneeb sorry about the confusion...
15:17 trone reneeb: nono, it's ok. I make $self->redirect_to(); return 1;
15:18 trone but it need to craft the content.
15:18 trone (rightly)
15:18 reneeb ok...
15:22 Flying_Squirrel joined #mojo
15:27 romel hey guys. what's the best approach to store data structures within application during run-time with mojo?
15:28 romel for instance, i want to store database query result somewhere for forther usage from different places
15:30 trone romel: I think you need to implement a thin cache layer (memcached?)
15:33 sri joined #mojo
15:33 framasky joined #mojo
15:34 sri so, has anyone tried this on windows? https://github.com/kraih/mojo/commit/9fa8e0ad2028b8e2073433ac2f0bb3306857232a
15:35 tomboh trone: I'd advise against using a cache as a data store - things get purged from a cache during typical operation
15:36 romel true
15:37 sri minion also has seen drastic changes and needs to be tested on windows https://github.com/kraih/minion/compare/v1.09...master
15:39 framasky Hello
15:40 Oleg joined #mojo
15:40 framasky I've got some problems with migrations with Mojo::Pg : I've got french accents in my migrations file (which is in UTF8) but they are not inserted correctly in the database.
15:40 framasky création is inserted as création
15:40 framasky does anybody have a clue about what to do?
15:42 * pink_mist imagines framasky forgot to decode it when he read it in from the file
15:42 pink_mist s/imagines/believes/
15:43 framasky I did $migrations->from_file('install/migrations.sql')->migrate(0)->migrate(1);
15:46 framasky so, your advice is to read the file before migrating from_string
15:46 genio ->from_file() uses Mojo::Util::slurp() to get the contents of your file.  slurp() doesn't appear to do anything as far as decoding.
15:46 framasky ok
15:47 genio https://metacpan.org/source/SRI/Mojolicious-6.01/lib/Mojo/Util.pm#L242
15:47 sri framasky: fixed https://github.com/kraih/mojo-pg/commit/2ce1c78792d9c95430b6e587d1bd7e695516a2cc
15:48 genio sri++
15:48 pink_mist sri++ indeed
15:50 mattastrophe joined #mojo
15:50 * framasky ♥ sri's speed
15:51 framasky thx
15:52 * sri still needs morbo from mojolicious master tested on windows
15:52 sri specifically if it restarts
15:54 btyler sri: I can check it out in about 3 hours. my windows perl setup is pretty minimal, but that sounds like an easy one to test.
15:59 jberger sri: o/
15:59 sri \o
16:00 jberger if anyone wants some fun, try porting an internal service away from using Webservice::UPS::*
16:01 jberger nothing like a module that wraps XML::Simple
16:43 sri the two new methods in minion are also up for discussion... my $pid = $job->start and $job->is_finished($pid); https://github.com/kraih/minion/compare/v1.09...master#diff-39db9abbf6e5b4c382fe20399013148eR237
16:50 dexteruk joined #mojo
16:53 dexteruk Hi all, im a newbie to mojo i have always used perl modules like www::curl as the like, but im now wanting to look at mojo and the useragent part right now..  from the command i can use mojo get -H to pass headers but in the documention when i search it gets a little confusing weather the information is regard to setting up headers or passing headers
16:53 dexteruk how do i do the same as the command line in code?
16:54 dexteruk sorry if its a dumb question
16:56 genio dexteruk: What have you tried?   my $ua = Mojo::UserAgent->new();  $ua->get($url, {headers=>'here'})  is the gist of it, but without more information, it's hard to know what to tell you.
16:56 dexteruk you see that was easy
16:56 genio That, by the way, is more or less the first lines in the synopsis in the docs
16:57 dexteruk im going to look
16:57 genio https://metacpan.org/pod/Mojo::UserAgent   Look at the first thing in the synopsis as the DNT header is being used
17:00 dexteruk ok maybe its just me, but as a newbie i think a more in your face example would have been better like an Authorization example
17:01 gryphon joined #mojo
17:01 dexteruk i did see that but i didnt understand what the code was trying to do from the syntax, i really feel dumb
17:01 genio Authorization => 'Basic ababafedaeaeaeae12323423452=='   why is that any harder?  (plus, this particular type of authorization can be handled by URL userinfo)
17:02 genio https://metacpan.org/pod/Mojo::URL#userinfo   and https://metacpan.org/pod/Mojo::Headers
17:02 dexteruk no just as an example it would have stood out more
17:03 dexteruk as most people at least me are use to having to pass some kind of auth in the headers, its just a point of view
17:04 dexteruk i understand it now thanks
17:04 dexteruk i suppose it will just take time, baby steps, once you get into the flow of the documentation
17:09 jberger I agree basic authorization is a bad example because it can be handled via the url
17:09 d4rkie joined #mojo
17:10 jberger DNT is a nice short header name, I assume that's why its there
17:10 jberger but a little farther down, there is a PUT with a Content-Type
17:11 jberger I might persuaded that an Accept header might be nice, but I'm not sure I care that much
17:11 jberger ^^ btw that looks a little flippant ("not care that much") it wasn't meant to be
17:12 nicomen I thought DNT was something needed by the request, hehe
17:12 nicomen didn't realize it was a headers hashref
17:12 nicomen til much much later
17:13 jabberwok joined #mojo
17:13 dexteruk im glad its not just me, i had no clue it was a header
17:13 caeles joined #mojo
17:14 pink_mist I had the same issue as nicomen, only it didn't take me "til much much later" to realise :P
17:14 pink_mist an Accept header would be very nice I think
17:15 nicomen patches welcome I believe ;)
17:16 jegade ok
17:17 dexteruk and an update on the remark to show you the header so you can see the same in the example would make it easier to spot
17:17 good_news_everyon joined #mojo
17:17 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/pcXj
17:17 good_news_everyon mojo/master ff5cba2 Sebastian Riedel: use better known headers in examples
17:17 good_news_everyon left #mojo
17:18 sri websocket examples still use DNT though... since i have no fricking idea what else could fit there
17:19 pink_mist awesome
17:19 pink_mist sri++
17:19 dexteruk that was quick wow, now im happy to be a newbie :-D
17:19 jabberwok splendiferous!
17:22 jberger sri++
17:26 * jabberwok hoists the postincrement mug, thank the Camel this isn't javascript where ++ is considered bad form
17:26 nicomen sri++
17:27 nicomen or python that forces you to sri += 1
17:27 jabberwok %SYN-U-GOOF, Spurious white spaces detected
17:27 dexteruk sorry with the headers it works now but on https i get an error IO::Socket::SSL 1.94+ required for TLS support
17:29 dexteruk isnt mojo ment to test all these things on install?
17:29 nicomen dexteruk: wether you are going to access https with TLS or not is optional
17:29 nicomen shouldn't hold up everyone else because of that?
17:30 dexteruk ok cool just asking, i updated it and its working fine
17:31 dexteruk whoo, thanks, all is good in the world
17:32 tomboh it's easy to check a CPAN module's dependency modules at install time, but not so easy (AFAIK) to check optional requirements are at a particular version
17:32 tomboh and even if it were, complaining about the presence of old optional modules might annoy some users..
17:59 sri final warning, i'll release Minion 1.10 later, so now is your chance to give feedback
18:06 cpan_mojo Mojo-Pg 1.12 by Sebastian Riedel - http://metacpan.org/release/SRI/Mojo-Pg-1.12
18:10 jabberwok the only thing i can think missing in Minion that would be awfully useful would be ability to query active/inactive jobs based on some arguments, but i can't come up with a convincing requirement yet
18:11 sri (i meant specifically the new concurrency features)
18:12 sri one interesting side effect of the new tests was actually that it made a DBM::Deep problem obvious that was causing random cpantesters failures
18:12 sri because DBM::Deep is not fork safe
18:13 jberger hmmmm, interesting
18:13 sri working around that now https://github.com/kraih/minion/blob/master/lib/Minion/Backend/File.pm#L12
18:14 jberger nice
18:14 sri tests have been rock solid since then
18:14 sri although, it still needs some windows test runs
18:14 sri (same as morbo)
18:17 * sri suspects jberger will like the -j option https://github.com/kraih/minion/blob/master/lib/Minion/Command/minion/worker.pm#L79
18:18 riche sri: I'm getting my cygwin env with Mojo::Pg so at least have cygwin coverage
18:18 jberger very nice
18:18 jberger so now one worker per host is sufficient right?
18:19 sri should be
18:19 jberger so <3
18:19 sri it really all depends on windows perl now
18:20 sri riche: cygwin is actually not as important, but all test runs are appreciated
18:20 riche blah so many dependencies not met
18:20 jabberwok people still use windows ?!
18:20 sri Mojo::Pg is not important btw. DBM::Deep is enough to test concurrency
18:20 riche DBM::Deep
18:20 purl DBM::Deep is more recent maintained than MLDBM, which I consider *dead* or rad or languishing
18:21 riche well, cygwin tests passed .. should I enable TEST_ONLINE?
18:21 sri no need
18:21 sri DBM::Deep is actually more problematic :)
18:22 sri otherwise, the tests are exactly the same, and pretty hardcore https://github.com/kraih/minion/blob/master/t/file.t#L384
18:23 riche never thought i'd do this but i'm installing strawberry 64
18:23 sri there is actually just one tiny bit of code i'm worried about https://github.com/kraih/minion/blob/master/lib/Minion/Job.pm#L29
18:24 riche ewww "updating component registration" ... i can hear the registry screaming
18:24 sri if "waitpid($pid, WNOHANG) == $pid" works reliably on windows we finally have something to standardize process management on
18:25 sri actually trying the same in morbo now
18:33 riche hm okay been a while since I've done pure windows perl ... got make error
18:33 riche 'to undefined at ... ExtUtils/Install.pm"
18:35 jberger with toolchain sometimes its best to cpanm --uninstall-shadows <<Module::Name>> first
18:35 jberger cpanm --uninstall-shadows --reinstall ExtUtils::Install
18:35 jberger can't hurt could help
18:36 btyler sri: just tried morbo with strawberry 5.20.2 and latest cpan Mojo. seemed to work fine
18:36 btyler restarted as expected
18:36 sri btyler: thanks \o/
18:36 riche awesome I can stop distracting myself :)
18:36 sri that means morbo has no windows workarounds anymore
18:36 btyler also, perlbrew explodes under cygwin -_-
18:37 btyler so I gave up on that and just installed strawberry, which worked well enough, just had to use the windows shell
18:37 btyler shudder
18:37 riche btyler: I got mine working on cygwin :)
18:37 sri btyler: oh wait
18:37 sri btyler: cpan mojo?
18:37 btyler ah, need head?
18:37 btyler yes
18:37 sri ye
18:37 btyler ok, moment
18:38 sri specifically this commit https://github.com/kraih/mojo/commit/9fa8e0ad2028b8e2073433ac2f0bb3306857232a
18:38 sri anything after that
18:40 berov hi all, do you know that when you just create a template and you have not put anything in it yet EPRenderer treats it as not found.
18:40 berov Here is a test whch shows that this seems as expected behaviour... but still...
18:40 berov https://github.com/kraih/mojo/compare/master...kberov:empty_template
18:41 berov this test fails of course . the expected is undef and not ''
18:42 berov the returned output I mean - not expected... any comment?
18:42 jberger berov: any empty response does things like that
18:43 berov jberger: it took me quite a while to figure why my newly created template is not found
18:44 jberger it took me a while once to figure out how to reply with 204
18:44 berov I am not sure what is beter, but definitely I would expect the template to be found
18:44 jberger answer is $c->rendered(204) btw
18:44 jberger $c->stash(status => 204) is not enough, for the same reason
18:44 berov at least te log message is wrong.
18:45 berov the template is actually found
18:46 btyler sri: morbo@HEAD seems happy too. just to make sure we're on the same page: I wrote a tiny lite app, started it with morbo, loaded it page, changed the app, loaded it again (well, like 10 more times), and saw the changes
18:46 btyler *loaded the page
18:46 sri btyler: perfect
18:46 sri btyler++
18:46 pink_mist sri: fwiw that seems to be the way Parallel::ForkManager also checks children
18:46 btyler and now I hope to avoid using the windows shell for another year
18:47 jberger btyler += 2 # testing, windows shell comment
19:00 sri pink_mist: good to know
19:03 memowe joined #mojo
19:04 good_news_everyon joined #mojo
19:04 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/pC6S
19:04 good_news_everyon mojo/master 0538c9b Sebastian Riedel: fix empty template handling in Mojo::Template
19:04 good_news_everyon left #mojo
19:04 sri berov: thanks, fixed
19:05 berov sri: thanks :) I just prepared a iuse case to show :)))
19:05 berov great anyway!
19:10 berov and here is the repo to show off the case if anyone is still interested
19:10 berov https://github.com/kberov/empty_template
19:10 berov https://github.com/kberov/empty_template/blob/master/log/development.log
19:25 good_news_everyon joined #mojo
19:25 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/pCQr
19:25 good_news_everyon mojo/master 0dcc89d Sebastian Riedel: group related examples
19:25 good_news_everyon left #mojo
19:27 mattastrophe joined #mojo
19:33 good_news_everyon joined #mojo
19:33 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/pCbw
19:33 good_news_everyon mojo/master 72bb7c8 Sebastian Riedel: more diverse JSON examples
19:33 good_news_everyon left #mojo
19:35 Grinnz joined #mojo
19:36 kaare joined #mojo
19:50 bwf joined #mojo
20:00 trone joined #mojo
20:04 jberger hmmmmm I thought that was by design
20:04 jberger sorry berov
20:05 berov jberger: np I had to explain more maybe :)
20:26 punter joined #mojo
20:38 good_news_everyon joined #mojo
20:38 good_news_everyon [mojo] kraih pushed 2 new commits to master: http://git.io/pWB0
20:38 good_news_everyon mojo/master 8265732 Sebastian Riedel: more examples for attribute selectors
20:38 good_news_everyon mojo/master 37cee57 Sebastian Riedel: slightly better selectors
20:38 good_news_everyon left #mojo
21:36 bowtie_ joined #mojo
21:50 mattastrophe joined #mojo
22:05 jberger The USPS has you submit a tracking request with a query parameter containing an xml document :s
22:10 cpan_mojo Minion 1.10 by Sebastian Riedel - http://metacpan.org/release/SRI/Minion-1.10 (depends on Mojolicious)
22:13 d4rkie joined #mojo
22:14 D4RK-PH0ENiX joined #mojo
22:14 sri \o/
22:16 sri hope passing around the process id was not a bad decision
22:16 sri my $pid = $job->start; $job->is_finished($pid)
22:19 neyasov joined #mojo
22:48 * tempire still doesn't really get the apple watch
22:49 Adura joined #mojo
22:50 cfedde a new way you can spend money on an apple product.  What's not to "get" about that?
22:50 hernan604 another unessential gadget
22:51 hernan604 make sure you get one. Everyone else is buying
22:52 marcusr I'm not
22:54 Grinnz if i was going to get a smartwatch it would be the new pebble; but i havent found a good enough reason yet
22:55 jabberwok all i want is a watch with a WWV receiver, and maybe an HD-Radio tuner
22:56 jabberwok why is it impossible to find a nightstand- or tabletop-radio with HD ? have so-called "smart" so-called "telephones" managed to kill the entire electronics industry?
23:10 bpmedley buu: Sorry for the confusion; the repo isn’t about patch/diff, it’s about OS patch management.
23:10 bpmedley sri: Do you still need anything tested in Windows 7?
23:10 bpmedley Oh, I see.. you released 1.10!!  Sweet.
23:13 jberger if tempire isn't interested in the new apple thingy, then they are in trouble
23:25 sri nice way to pay $10000 for a $2000 chunk of gold
23:27 sri i really want to like the new macbook, it's sooooo pretty, but seems underpowered :/
23:28 sri apparently Core M is about as fast as the macbook air 2012 i5s
23:30 sri does usb-c have a safety connector like magsafe?
23:31 sri bpmedley: well, running the tests certainly wouldn't hurt :)
23:31 bpmedley Ok
23:31 sri i suppose an emergency removal of job concurrency support is still possible ;p
23:33 bpmedley Do not break any glass, yet.. :)
23:33 * sri puts the hammer down again
23:46 bpmedley cannot unlink file for C:\Users\bpm\AppData\Local\Temp\aQWMUTzWeV\minion.db: Permission denied at C:/Strawberry/perl/lib/File/Temp.pm line 784   <— Nothing to do with concurrency, tho
23:54 sri that didn't even change since 1.09
23:54 jberger bpmedley: that's just windows destructor order
23:55 bpmedley Hrrm, I assumed it’s because the file is still open, although we could be saying the same thing.
23:55 sri literally no change since 1.09
23:57 bpmedley I”ve also never ran the Minion tests for 1.09 in my Windows 7, either
23:57 bpmedley Want me to try that?
23:58 jberger bpmedley: windows can't unlink an open file
23:59 jberger File::Temp attempts to unlink in the destructor
23:59 bpmedley Understood
23:59 jberger nothing to worry about
23:59 jberger I've seen if before

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