Camelia, the Perl 6 bug

IRC log for #mojo, 2013-10-18

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

All times shown according to UTC.

Time Nick Message
00:13 saurabh_abhishek joined #mojo
00:15 chansen write Mojo::JSON::XS ;P
00:16 sri lets not
00:29 laouji joined #mojo
01:05 marty joined #mojo
01:05 laouji joined #mojo
01:19 jnbek joined #mojo
01:52 d4rkie joined #mojo
02:03 d4rkie joined #mojo
02:03 laouji_ joined #mojo
02:07 basic6_ joined #mojo
02:26 laouji joined #mojo
02:29 laouji_ joined #mojo
02:35 laouji joined #mojo
02:36 laouji__ joined #mojo
02:46 d4rkie joined #mojo
03:13 rem_lex|pivo joined #mojo
03:29 hlin_ joined #mojo
03:43 preflex_ joined #mojo
03:50 gryphon joined #mojo
04:19 jberger_ joined #mojo
04:32 dqw15 joined #mojo
05:13 dqw16 joined #mojo
05:27 Kundun joined #mojo
05:39 hesco left #mojo
05:52 jberger_ joined #mojo
05:56 denisboyun joined #mojo
06:14 jamesw joined #mojo
06:14 jberger_ joined #mojo
06:24 dpetrov_ joined #mojo
06:43 hlin__ joined #mojo
06:44 dod joined #mojo
06:48 hlin joined #mojo
06:51 hlin_ joined #mojo
06:52 jberger_ joined #mojo
06:53 hlin__ joined #mojo
07:08 hlin_ joined #mojo
07:12 hlin joined #mojo
07:14 dod joined #mojo
07:17 trone joined #mojo
07:20 Vandal joined #mojo
07:34 laouji joined #mojo
07:37 dod joined #mojo
07:59 Vandal joined #mojo
08:05 ladnaV joined #mojo
08:06 themage joined #mojo
08:08 ribbit joined #mojo
08:10 ribbit Two things. First, I noticed that the Mojo::UserAgent page says that non-blocking requests work inside an event loop, but that is not what I am getting (error: "Can't call method "res" on an undefined...")
08:11 ribbit Second, I am wondering if non-blocking requests work with Proc::Daemon. Though it is working, it doesn't seem to be working correctly.
08:12 crab Can't call method "res" on an undefined... sounds like you're doing something wrong.
08:14 ribbit Well, the non-blocking useragent requests work, and the event works, but combining the two together (i.e., putting the useragent loop in the event loop) does not work.
08:16 mire_ joined #mojo
08:20 crab hmm. based on the information you've given so far, i can confidently say that something must be wrong.
08:20 batman ribbit: i'm pretty sure your problem is scope, but you need to show us some code
08:21 batman crab: no, no, no... nothing is wrong....
08:21 batman ;)
08:23 ribbit one second.
08:31 ribbit http://pastebin.com/nSuWPQH8
08:39 ribbit The other issue that I have is that I have a very similar useragent loop (i.e., only difference is the URL) in a script using Proc::Daemon, and it doesn't seem to run 100% correct.
08:39 ribbit Without using Proc::Daemon it works fine, but as soon as I introduce Proc::Daemon some of the URLS get skipped for some reason.
08:41 jberger_ joined #mojo
08:41 ribbit Do you want me to use another source for showing my code?
08:53 ribbit Any ideas?
09:02 batman i think $self->ua goes out of scope.
09:02 batman but i'm super busy at work now, so i don't have time to look at now
09:14 maxhq joined #mojo
09:31 tianon joined #mojo
09:34 jpn joined #mojo
09:38 ribbit kinda a silly question... just wondering when doing this: $ua->get($url => sub { my ($ua, $tx) = @_;  $end->($tx->res->json); }); is there any way I can print a message if there's errors in the JSON it is grabbing?
09:39 fhelmber_ joined #mojo
09:40 sri oooh, nexus 5 looks pretty nice
09:40 marcus is it out now?
09:41 sri nope, lots of leaked info though
09:41 sri http://ttb.thetechblock.netdna-cdn.com/wp-con​tent/uploads/2013/10/nexusae0_unnamed-130.png
09:41 marcus After http://austinmann.com/trek/​iphone-5s-review-patagonia there's only one new phone for me
09:41 jberger_ joined #mojo
09:41 marcus Isn't apple ipad launch event soon tho?
09:42 marcus Ah, next week
09:42 ribbit I'd rather have a flip phone
09:42 ribbit God I hate touch screen phones
09:42 ribbit Actually, I just hate cell phones period.
09:42 sri i guess the nexus will be released today, to ride the apple event press wave next week
09:45 ribbit does this "$end->($tx->res->json);" raise an exception if parsing of JSON fails?
09:45 marcus sri: or monday!
09:45 sri possibly
09:46 * sri will get one though
09:48 marcus sri: good luck
09:48 * marcus runs his htc one in google mode
09:48 sri i'll need it!
09:48 mire_ joined #mojo
09:48 marcus sri: remember to join the enlightened then :)
09:48 ribbit cell phones suck dick
09:48 ribbit who cares?
09:48 marcus ribbit: you're using them wrong
09:49 sri ribbit: please be nice
09:49 ribbit yank yank, a new phone is out
09:49 marcus ribbit: use them to call people.
09:49 ribbit I'm out of here
09:49 marcus don't even
09:49 marcus bye ribbit
09:49 sri o/
09:49 ribbit <3
09:50 * marcus enjoys his pocket computers.
09:50 marcus Also got my new paperwhite yesterday. So nice.
09:50 marcus Can finally read in bed next to the baby without being annoying.
10:07 dod joined #mojo
10:16 tba joined #mojo
10:24 nic On android you can dim the screen as dark as you like
10:24 nic (can get a bit tricky if you accidentally dim it too much, but it gives you plenty of warning about that :) )
10:26 denisboyun joined #mojo
10:32 denis_boyun_ joined #mojo
10:41 jberger_ joined #mojo
10:41 dqw16 joined #mojo
10:47 sjn marcus: same here! \o/
10:48 * sjn wonders what books to get
10:49 sjn no mojolicious book. :-\
11:14 dbr joined #mojo
11:21 marcus sjn: I'm reading Chronicles of amber.
11:21 marcus book 4/10 now :)
11:22 marcus nic: I have an android device, and it's not nearly as good to read on.
11:24 nic not as easy on the eyes, but does the job of letting you read next to a sleeping baby
11:41 jberger_ joined #mojo
11:45 dod joined #mojo
11:57 * sri never looked closely at the nexus 7, google has really stepped up their game
12:13 dod joined #mojo
12:46 jberger__ joined #mojo
13:07 marcus sri: yeah, apple better deliver on the retina minis :)
13:15 denisboyun joined #mojo
13:31 good_news_everyone joined #mojo
13:31 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/eyM2vQ
13:31 good_news_everyone mojo/master a3f00c6 Sebastian Riedel: better example for streaming responses
13:31 good_news_everyone left #mojo
13:31 bluescreen joined #mojo
13:35 mire_ joined #mojo
13:46 good_news_everyone joined #mojo
13:46 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/Xh-9Og
13:46 good_news_everyone mojo/master 955c1dd Sebastian Riedel: fixed typo in cookbook
13:46 good_news_everyone left #mojo
13:46 * sri wonders if funding a few mojolicious or mango features with bountysource would work https://www.bountysource.com/
13:57 ryozi joined #mojo
13:58 bluescreen joined #mojo
14:09 btyler joined #mojo
14:19 Dandre hello,
14:19 Dandre is there anyway to add some specific tag_helper?
14:25 Dandre I mean write some plugin that extend or depends on core TagHelper plugin and use it to generate the proper text
14:28 crab there's no specific way to do it.
14:29 crab duplicate the code, or read the source and call it the right way (but of course that's relatively fragile)
14:30 jim joined #mojo
14:35 stephan48 Dandre: could a wrapper around http://search.cpan.org/~sri/Mojolicious-4.4​9/lib/Mojolicious/Plugin/TagHelpers.pm#tag help you?
14:36 Dandre yes
14:37 stephan48 if i remember correctly it is also used by other taghelpers
14:39 marty moin \o
14:40 marty sri: I think boutysource (or similar) is a great idea.  If there were features that would benefit our company we would surely contribute.
14:46 asarch joined #mojo
14:48 mire_ joined #mojo
14:51 stephan48 Dandre: i just checked the tag helper is basically what is used internally in all taghelpers defined by that plugin
14:57 nic aww, ready that as 'bootysource'; much less interested now :)
14:59 Dandre I've try to create my plugin and call _tag function . but that doesn't work ATM. I'm reviewing my code
14:59 dqw16 joined #mojo
15:01 abhishekisnot joined #mojo
15:02 buu_ joined #mojo
15:16 gryphon joined #mojo
15:32 sri marty: yea, that's the next question, what features would be worthy of crowd funding
15:32 sri Dandre: don't ever use private methods/functions
15:32 sri i will break those
15:34 marty Maybe an app framework, tightly coupled with mongo that handles user authentication and sessions.  And maybe a few simple plugins like blog, ???
15:35 sri not even thought about high level features like that :)
15:35 sri was more thinking about http/2 support
15:36 marty in my world, those are low level.   :)
15:43 psiman joined #mojo
15:45 denisboyun joined #mojo
15:48 Dandre (2013-10-18 17:32:40) sri: Dandre: don't ever use private methods/functions
15:48 Dandre ok and can I call helper instead of private method?
15:51 crab sure. helpers are meant to be called.
15:52 mire_ joined #mojo
15:55 saurabh_abhishek joined #mojo
16:05 Dandre ok I have solved using $app->tag instead of using _tag
16:05 Dandre thanks
16:12 kanishka joined #mojo
16:19 bluescreen_ joined #mojo
16:23 dod joined #mojo
16:31 mmp_ joined #mojo
16:32 howitdo joined #mojo
16:37 denisboyun joined #mojo
16:43 Fatalnix joined #mojo
16:43 Fatalnix hey guys.. whats going on here?: curl: (77) Problem with the SSL CA cert (path? access rights?)
16:43 Fatalnix running as root
16:43 Fatalnix when I prform curl get.mojolicio.us | sh
16:43 Fatalnix I also can't wget the page and run it from there, it says theres too many redirects.
16:44 Fatalnix you know I don't need this script, all it is is just curl -L cpanmin.us | perl - -n  Mojolicious
16:44 Fatalnix :D
16:45 Fatalnix nevermind, itl breaks on cpanmin.us anyways..
16:48 tianon do you have outdated ca-certificates?
16:51 bpmedley_ joined #mojo
16:51 gryphon_ joined #mojo
16:51 russum1 joined #mojo
16:55 memowe joined #mojo
17:14 Fatalnix tianon: probably. everything should be fixed as soon as I flash a new system to this thing
17:56 hrupp joined #mojo
17:56 stephan48 Dandre: did you try calling $self->tag?
17:56 saurabh_abhishek joined #mojo
17:57 stephan48 which is the exposed function via helper mechanism
17:57 stephan48 sorry didnt read hat you fixed it already
18:02 fhelmber_ joined #mojo
18:11 dvinciguerra joined #mojo
18:13 sh4 joined #mojo
18:19 thomason joined #mojo
18:21 thomason Hi all, I'm light on syntax to do this. Is there a way that I can create a sub-route and append it to multiple routes later?
18:21 thomason So I create $g = $r->get('/edit')->to('action' => 'edit');, then later create /foo, /bar, /baz. I want to end up with /foo/edit, /foo/bar, /foo/baz. Can I append that $g route to the newly created parent routes?
18:22 thomason Goal is to standardize dispatch for certain types of actions across different parent objects.
18:31 punter joined #mojo
18:36 mire_ joined #mojo
18:39 thomason Or would it be better form in this case to set up a route like /:objtype/edit ?
18:45 KindOne joined #mojo
18:47 d4rkie joined #mojo
18:47 bowtie_ joined #mojo
19:00 d4rkie joined #mojo
19:06 stephan48 thomason: will your "parent objects" change (frequently)?
19:06 thomason No, there are fairly few of them that will remain pretty static.
19:07 stephan48 then shortcuts could be the best way
19:14 basiliscos joined #mojo
19:16 Mike-PerlRecruiter_ joined #mojo
19:34 dod joined #mojo
19:36 thomason Shortcuts look like a pretty viable option. I'll look into 'em further. Thanks for the suggestion!
19:55 marcus https://github.com/blog/1661-mo​deling-your-app-s-user-session
20:12 cfedde joined #mojo
20:16 cfedde a $ui->get($url)->res->content gives me a Mojo::Content::Single containing a Mojo::Asset::File that has content-type text/html.  I was expecting just a DOM object.  Is there a generic way to deal with this?
20:21 rem_lex| joined #mojo
20:21 moritz cfedde: use ->res->dom instead?
20:43 cfedde outstanding!
20:44 cfedde webscraping--
20:46 denis_boyun joined #mojo
20:49 cfedde are there any built in methods for ripping on html tables?
20:57 d^_^b Mojo::DOM?
20:57 d^_^b I wish I didn't have to scrape websites.
21:04 cfedde I want to extract the first and third columns from a table. find gets me the table.
21:05 tianon nth-child ?
21:06 tianon cfedde: https://metacpan.org/module/M​ojo::DOM::CSS#E:nth-of-type-n
21:06 * cfedde follows
21:07 tianon dom->find('table td:nth-of-type(3)') <- third column
21:07 tianon sans colspans - those will screw everything up anyhow
21:10 gryphon joined #mojo
21:24 cfedde that makes column order easy.
21:33 KindOne joined #mojo
21:59 howitdo joined #mojo
22:24 bpmedley $self->url_for('/dashboard/show')->to_abs  <-- Why would the url_for append "/dashboard/show" to the current route?
23:04 bpmedley I was using a reseved word, i think that was the problem.
23:58 basic6_ joined #mojo

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