Camelia, the Perl 6 bug

IRC log for #mojo, 2013-05-29

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

All times shown according to UTC.

Time Nick Message
00:16 inokenty left #mojo
00:24 libsysguy joined #mojo
00:36 memowe joined #mojo
00:44 zivester joined #mojo
00:53 shmuel joined #mojo
00:59 libsysguy so are there not a lot of people that use Mojo in conjunction with DBIx::Class?
01:03 jberger libsysguy, I bet there are
01:03 jberger Galileo does at least and so does tempire's example app
01:03 jberger then again, its not non-blocking
01:03 jberger I'm hoping Mango will be ready for my next project
01:04 jberger and Mojo::Redis exists and is non-blocking too
01:04 libsysguy ahh so the issue with DBIx::Class is that its blocking?
01:04 jberger and really heavy
01:05 libsysguy it is really heavy…but I don't know of another good alternative
01:05 libsysguy maybe I'm just comfortable with DBIx
01:05 jberger http://deps.cpantesters.org/?module=Galileo
01:05 jberger nearly all of that is DBIC
01:06 jberger in truth, I think most people agree with you
01:06 libsysguy but should they...
01:06 jberger sure, I think its a good model layer for Mojo
01:06 libsysguy should I agree with myself…who knows lol
01:06 tianon DBIx always felt to me like it was for people afraid of SQL :P
01:07 jberger if you are to the point where you have the entire app non-blocking, then maybe, but until then, code for ease of coding too
01:07 jberger tianon, that's me :-)
01:07 tianon :)
01:07 jberger not afraid, but I also probably can't make a really nice LEFT JOIN chain without really researching
01:07 libsysguy I am all about code re-use
01:07 * jberger can fake the terminolofy
01:08 libsysguy I guess I could it it with SQL
01:08 libsysguy and probably faster
01:08 libsysguy but the inflation/deflation is a win for me
01:08 libsysguy jberger I have been pillaging Galileo for help
01:09 jberger please do
01:09 libsysguy I've been able to find quite a bit of techniques I was looking for
01:09 jberger I can't say that its all great, it was my first CMS :-)
01:09 libsysguy sometimes its really nice to have someone pioneer the way :p
01:09 jberger I have tried to keep it as nice as possible though
01:09 jberger indeed
01:09 libsysguy I am attempting to write a web interface for git
01:09 jberger I don't make enough use of the routing engine
01:10 jberger a noble goal to be suer
01:10 libsysguy well…more like a clone of some of the existing ones
01:10 jberger sure
01:10 libsysguy routing in mojo boggles my mind
01:10 libsysguy lol
01:10 jberger start simple, as ever
01:10 libsysguy I told my boss today, I'm sure its very useful and powerful, but I'm lazy and really like the auto-dispatching in catalyst
01:11 libsysguy but somebody pointed out that plugin today…the distributed auto-chain
01:11 libsysguy which I am attempting to employ
01:12 libsysguy also, authentication and authroization
01:12 libsysguy authorization*
01:13 jberger I can't really help you with a real comparison with Catalyst, I've never used it
01:13 libsysguy its okay, I don't really expect too much of a crosswalk
01:14 jberger sri on the other hand I'm sure can, if you have a specific question
01:14 libsysguy well, catalyst has a built in plugin for DBIx::Class Storage for users
01:14 jberger there is a Mojo plugin for authentication
01:14 libsysguy so I am watching the 3rd episode of the screencast for authentication
01:15 jberger but feel free to look at how I do it in Galileo (after watching that screencast++)
01:15 sri pretty sure catalyst has no built-in plugin for dbic
01:15 libsysguy this is the one I was talking about http://search.cpan.org/~bobtfish/Catalyst-A​uthentication-Store-DBIx-Class-0.1503/lib/C​atalyst/Authentication/Store/DBIx/Class.pm
01:16 sri that's just a plugin on cpan
01:16 libsysguy forgive me if I have committed a cardinal sin…I feel dirty posting anything related to catalyst in here
01:16 libsysguy :p
01:17 libsysguy sri you're right
01:17 sri i'm the founder of catalyst, why would i mind anyone talking about it?
01:18 libsysguy that blog post kind of scared me from talking about it here
01:18 sri if you like it use it
01:19 libsysguy I think I will like mojo *better*
01:19 jberger we like to think so
01:19 libsysguy I'm just trying to pick up any useful crosswalks
01:20 libsysguy is an old programmer at 24, so I'm pretty set in my ways :p
01:21 jberger young-uns
01:21 jberger :-p
01:21 libsysguy I really do appreciate the help from you guys over the past few weeks
01:22 libsysguy I apologize if I am peen annoying
01:22 jberger personally I never mind a well asked question
01:23 jberger I often respond in kind with the amount of effort put in (this is my rule of thumb on SO)
01:24 libsysguy thats a good rule of thumb to have (especially with SO's) imo
01:24 libsysguy I've definitely had a lot of bad code come through my QA queue
01:25 libsysguy some of it is mine :p
01:29 inokenty joined #mojo
01:30 libsysguy I think im starting to get the idea behind mojo
01:30 libsysguy i'm a little slow :p
01:32 egopro joined #mojo
01:39 libsysguy jberger do you prefer mongodb over mysql?
01:39 libsysguy I guess they both have their place
01:39 hesperaux_ joined #mojo
01:40 hesperaux__ joined #mojo
01:41 sri hmmm
01:41 * sri wonders if Mojo::URL::ext would make sense
01:42 sri Mojo::URL->new('/foo/bar.baz')->ext -> "baz"
01:42 sri or rather Mojo::Path::ext
01:43 egopro joined #mojo
01:43 sri $self->stash->{format} => $self->req->url->path->ext;
01:44 sri for those cases where route detection doesn't work
01:44 * libsysguy dares not ask what for
01:45 sri $self->stash->{format} = $self->match->stack->[-1]->{format}; doesn't work for embedded apps
01:47 sri (since the second router will detect the format)
01:49 libsysguy so basically using the path matching module to work out the logic rather than checking it yourself?
01:49 * libsysguy is probably wrong is his assumption
01:53 hesperaux_ joined #mojo
01:54 jberger libsysguy, like I said, I have used DBIC so far
01:54 jberger my recent learnings have been about NoSQL, but I'm not actually using them for anything yet
01:55 libsysguy I have been stuck in rdbms land for so long its hard to make the jump to non relational databases
01:55 libsysguy all those duplicated and null columns…blows my relational mind
01:55 libsysguy :p
01:56 d4rkie joined #mojo
01:56 sri oh look, we're in a pull request acceptance statistic http://paulmillr.com/posts/​github-pull-request-stats/
01:56 abra joined #mojo
01:57 libsysguy not a lot of stuff gets through then lol
01:57 Meiermann joined #mojo
01:57 sri well, 30%
01:57 * sri thought he was more picky
01:58 * libsysguy reminds himself not to bug sri for pulls
01:58 libsysguy :p
02:04 D4RK-PH0ENiX joined #mojo
02:24 d4rkie joined #mojo
02:26 egopro joined #mojo
02:43 jberger sri: there are some doc-only patches that up the rate
02:46 jberger I'm not sure what the point of that is actually
02:46 jberger I guess if there are projects that just don't consider patches at all ...
02:47 jberger but I think most projects would consider GOOD patches right?
02:47 jberger and as I now always try to do, run the idea by the project leader first before preparing a huge PR that has no chance of being merged
03:31 fildon__ joined #mojo
03:49 preflex_ joined #mojo
03:59 D4RK-PH0ENiX joined #mojo
04:01 fhelmber_ joined #mojo
04:17 hesperaux__ joined #mojo
04:40 zivester joined #mojo
04:40 zivester joined #mojo
04:41 d4rkie joined #mojo
05:10 fhelmber_ joined #mojo
05:23 alnewkirk joined #mojo
05:49 Britzel joined #mojo
05:51 basiliscos joined #mojo
05:58 suy joined #mojo
06:09 hesperaux_ joined #mojo
06:58 basiliscos joined #mojo
06:59 Vandal joined #mojo
07:00 dod joined #mojo
07:09 rihegher joined #mojo
07:17 rihegher left #mojo
07:17 nicolaas joined #mojo
07:22 abra joined #mojo
07:22 jakir joined #mojo
07:24 dod joined #mojo
07:32 yakudza joined #mojo
07:34 preflex_ joined #mojo
07:50 jzawodn joined #mojo
07:59 alnewkirk joined #mojo
08:09 kwa sri: $self->req->url->path->ext would obviously only work when the ext is part of the path. What about the { Accept => 'application/json' } header when used in place of the ext? I'd hope respond_to to respond accordingly (which it does everywhere but the bridge ATM). It's not looking easy though. :/
08:36 bobishh joined #mojo
08:37 bobishh hello everyone
08:45 bobishh Have anyone of you experienced problems with mojo and db responses? I have situation like this - request started from the console script (DBIx::Simple) works perfectly fine and returns results in 1 second, but the web request takes about 15-20 seconds, and i suppose somehow related to user activity on the server. And it is not related to db performance, cuz we checked there)
08:50 kwa After 15-20 seconds do you get the response expected?
08:50 kwa Or does it time out?
09:04 maxhq joined #mojo
09:22 bobishh yeah i got the response
09:26 egopro joined #mojo
09:32 egopro joined #mojo
09:47 jakir left #mojo
09:51 jwang joined #mojo
09:51 ver joined #mojo
09:52 bobishh left #mojo
10:06 abra joined #mojo
10:08 rem_lex|pivo joined #mojo
10:11 egopro joined #mojo
10:32 cosmincx joined #mojo
11:20 fhelmber_ joined #mojo
11:36 kbenson joined #mojo
12:01 libsysguy joined #mojo
12:01 alnewkirk joined #mojo
12:04 libsysguy1 joined #mojo
12:18 bowtie joined #mojo
12:19 d4rkie joined #mojo
12:36 fhelmbe__ joined #mojo
12:38 rihegher joined #mojo
12:38 rihegher left #mojo
12:43 moltar joined #mojo
13:01 zivester joined #mojo
13:15 libsysguy joined #mojo
13:16 libsysguy joined #mojo
13:21 * sri yawns
13:21 Tester123 Sri: concerning "it's cygwin, sockets are always broken somehow there" recommend force? Is cygwin just not supported? Should I dig deeper and see if there is something we can fix to support cygwin?
13:24 sri i mean it's common for sockets to be broken with cygwin, we've seen like a dozen different test failures
13:25 sri no clue if it's fixable, but i doubt it considering the nature of the failures
13:25 perl2012 joined #mojo
13:27 perl2012 how do you send custom headers in the request in Test::Mojo. I tried $t->tx->req->headers->accept('application/json'), but req is undefined
13:31 sri Tester123: https://github.com/kraih/mojo/issues/494 # another recent cygwin failure
13:31 Tester123 I think it may just be me... I use LWP::Protocol::socks to make cpanm work, and I noticed in these tests you do a bit of work with proxy...
13:32 Tester123 very restrictive fw here, use ssh -D to make things work
13:39 bluescreen joined #mojo
13:54 btyler joined #mojo
13:55 laouji joined #mojo
14:04 laouji_ joined #mojo
14:05 gtodd so if I'm using embedded perl quickie templates in a lite app à la  ->  %= link_to "potatoes" => 'http://villagetelco.org'
14:06 gtodd I still need to "end" somehow before starting back in to html/text/content
14:07 gtodd Mostly I just cut/pasted html and now I want to make the templates a bit more perlish and a bit less htmly
14:17 btyler joined #mojo
14:21 Tester123 sri: I think I found the bug :) interested?
14:24 Tester123 generate_port basically listens on any random port, then reports back the port it listened on. When it falls out of scope, the port should be released and immediately available for the listen command which will inevitably follow. on cygwin (and maybe others, who knows) the port takes some random slow time to become available. I think this can easily be fixed
14:24 Tester123 :)
14:26 Tester123 I have tested ->shutdown(2) and then ->close() on the socket, but that does not fix the problem. I think the solution should be this -- if you want mojo to listen on a random port, specify a port of 0. then we can create the socket correctly and use it, instead of creating, waiting for destroy, then listening on it again.
14:27 Tester123 does this sound right? or, we could just wait in generate_port until we can test that the port is available again.
14:27 Tester123 either way
14:34 * gtodd tries to figure out why:  %= link_to "potatoes" => 'http://villagetelco.org'        works
14:35 gtodd but
14:35 gtodd %= link_to "potatoes" => 'http://villagetelco.org'.
14:35 gtodd period ----^
14:35 gtodd doesn't
14:36 gtodd heh  ...  <%= link_to 'http://villagetelco.org' => begin %>potatoes<% end %>.
14:42 gtodd that's longer than the html :)
14:43 * gtodd resolves to grok ep tt epl ...
14:44 nicolaas_ joined #mojo
14:50 laouji joined #mojo
14:54 nicolaas joined #mojo
14:59 sri Tester123: no, it does not sound right
14:59 Tester123 ok, which part?
14:59 sri all
15:02 kej left #mojo
15:02 kej joined #mojo
15:02 Tester123 ok, I may be misunderstanding. Could you help me by picking from the list? 1) there is a problem, but Tester123 probably does not understand it 2) there is a problem, but Tester123's solution is sub optimal and will not be used 3) there is no problem 4) im grouchy, come back later 5) Seriously, dont come back.
15:04 sri modern operating systems put a dimishing return on randomly assigned ports and don't assign it again for some time, but it is available again right away
15:04 asarch joined #mojo
15:04 Tester123 agreed
15:12 sri gtodd: <%= ... %>.
15:13 sh4 joined #mojo
15:16 sri %= consumes the whole line, <%= %> is embedded in the line
15:16 gtodd sri: :-)  doh!  ... was too slavishly following examples in docs
15:16 * gtodd adds that as an example to personal copy of pods
15:16 gtodd with sri's note
15:17 gtodd hmm a github fork ... with all my tiny additions and tweaks to the docs
15:19 gtodd would that be useful? ... I guess then I could add them as discrete/meaningful pull requests (instead of one big diff) but you'd have to manage all that noise ... is there a better way
15:19 * gtodd <--- eternal git/github noob
15:19 Tester123 here is my test http://pastebin.com/wNM3gNaa
15:19 Tester123 fails in cygwin
15:19 sri gtodd: i would have hoped after the renderging guide it would be obvious that those forms are interchangeable :/
15:20 gtodd sri: it is :-)  alot of my documentation tweaks are "for dummies"  :-)
15:20 gtodd sri: well almost is obvious :-P
15:20 Tester123 updated Mojo::IOLoop::Server with cygwin fix: http://pastebin.com/fFpppQvg
15:21 Tester123 so, I have the test, and the fix.
15:22 sri sleep(1) is not a fix :)
15:22 libsysguy of course not…sleep(5) is
15:22 libsysguy :p
15:22 sri that's just randomness making it more likely to pass
15:23 sri ;p
15:23 gtodd I started to add basic info and pod sections to bits of Rex:: (since a lot of it is still predocs)  but with Mojolicious I stuck a lot in Mojo::NotesToSelf
15:23 Tester123 it is a workaround for a broken platform that does not release the listening port as quickly as it should
15:24 Tester123 1 test is randomness
15:24 Tester123 we can loop this thousands of times
15:24 btyler joined #mojo
15:24 sri i'd like to know why IO::Socket doesn't block until the port is released
15:25 Tester123 maybe it does and cygwin lies
15:26 sri which version of cygwin anyway?
15:26 sri and perl
15:27 sri cpantesters has been pretty clean for a long time, so i assume it affects only certain versions http://www.cpantesters.org/distro​/M/Mojolicious.html#Mojolicious-4.07
15:27 Tester123 This is perl 5, version 14, subversion 2 (v5.14.2) built for cygwin-thread-multi-64int
15:28 Tester123 CYGWIN_NT-5.1 L61BK8W1 1.7.17(0.262/5/3) 2012-10-19 14:39 i686 Cygwin
15:28 sri 1.7.18 seems to be current
15:30 * gtodd realizes how wrong it must seem create a fake package just to put POD in it :-| ... instead of just a plain .pod file
15:30 gtodd but TIMTOWTRP
15:31 Tester123 i will have to wait to update cygwin toll I get back tot he hotel :(
15:32 sri anyway, thanks for investigating
15:33 sri cygwin appears to have the worst network stack out there
15:35 sri 1.7.18 does not appear to be without problems either https://github.com/kraih/mojo/issues/494
15:35 Tester123 agreed. at least this "fix" will get me working. what is the best place for me to write this up?
15:36 sri start a wiki page for cygwin quirks?
15:37 Tester123 maybe I could go back and post solutions for issues closed with "Thanks for your contribution, but i'm afraid nothing relevant changed in 4.03, this is just cygwin/windows/perl being a bit unstable."
15:38 sri you have a solution for that issue?
15:39 Tester123 not yet :)
15:39 sri btw. i heard perl on cygwin is not maintained very well, so i wouldn't be surprised if this were bugs in perl
15:39 gtodd sri: "cygwin appears to have the worst network stack out there" .... I'm *shocked *
15:40 Tester123 could be, honestly I am just bored at work and looking for "problems" to "fix"
15:40 gtodd Tester123: is the "native" perl for Windows good w/ Mojo?
15:41 Tester123 you mean ActiveState? (there is no perl from MS
15:41 sri judging by bug reports, it is better than cygwin :)
15:41 gtodd hehe well yeah or strawberry (?!?)
15:41 sri active got better since 5.16, strawberry worse
15:41 gtodd hmm
15:42 Tester123 I totally forgot strawberry, checking it now
15:42 sri (strawberry might have gotten better again, been some time since i saw a bug report)
15:44 * sri hugs os x
15:45 gtodd I guess without a unixy shell you can't use perlbrew or any of those things ...
15:45 * sri hugs perlbrew
15:45 tianon sri: just curious, are you a fan of homebrew?
15:46 * sri hugs homebrew
15:46 tianon lol :)
15:47 gtodd why Microsoft would claim to love the internet but continue using "\" instead of "/" ship no ssh or posix shell is a mystery ... but it's great for Macbook sales ;-)
15:49 asarch joined #mojo
15:51 gtodd sri: what sold me was  "perlbrew exec"   e.g.    perlbrew exec my-crazy-hackish-script.pl   can test against every version ... some kind of service (mojo based of course) that would do the same but use vms to test against 10 versions on 25 different platforms would be neat :)
15:52 gtodd errm to clarify I meant VM's not "VMS"
16:09 asarch joined #mojo
16:09 dod1 joined #mojo
16:09 dod1 joined #mojo
16:15 jberger_ joined #mojo
16:22 Tester123 joined #mojo
16:22 Tester123 Strawberry installed, configured for socks :( and now installing mojo
16:24 Tester123 installed mojo, no issues
16:25 basiliscos joined #mojo
16:44 asarch joined #mojo
17:03 rem_lex| joined #mojo
17:16 asarch joined #mojo
17:24 abra_ joined #mojo
17:51 Tester123 joined #mojo
17:52 Tester123 ok, I may be following some old documentation/examples... can a quick glance tell me what is wrong here? I am not seeing my flash message as I expected... http://mibpaste.com/Ujcj7L
17:54 jberger flash almost always is used for redirects
17:54 jberger you might mean stash here
17:57 Tester123 cool, Ill check that
18:00 Tester123 yup, that works, thanks :)
18:01 jberger flash is good for authorization fail messages, see here for example: https://github.com/jberger/Galile​o/blob/master/lib/Galileo.pm#L143
18:02 jberger and humane_flash just wraps flash underneath I promise :-)
18:15 bodgeex joined #mojo
18:15 rihegher joined #mojo
18:15 rihegher left #mojo
18:16 bowtie_ joined #mojo
18:16 * marty hugs mojolicous bridges
18:20 libsysguy1 joined #mojo
18:22 bowtie joined #mojo
18:24 bowtie joined #mojo
18:25 bowtie_ joined #mojo
18:34 mire joined #mojo
18:44 snuffles joined #mojo
18:45 KindOne joined #mojo
18:54 mike_ joined #mojo
19:07 libsysguy joined #mojo
19:24 mrphilov joined #mojo
19:39 yakudza joined #mojo
19:49 duncanthrax joined #mojo
19:49 nelio joined #mojo
19:59 mib_3kqke8 joined #mojo
19:59 mib_3kqke8 left #mojo
20:00 Tester123 http://mibpaste.com/g5nnNO
20:01 Tester123 http://mibpaste.com/0XNVRu
20:01 Tester123 seems like I should not get that error?
20:14 royskatt joined #mojo
20:15 royskatt hello
20:15 libsysguy hello Mr. Skatt
20:15 libsysguy :)
20:16 Tester123 if I put message in the stash via $self->stash( message => 'I can Stash');
20:16 Tester123 I should be able to use $message in my template via <b><%= $message %></b><br>
20:16 Tester123 correct?
20:16 Tester123 I am getting Global symbol "$message" requires explicit package name at template login.html.ep from DATA section line 5.
20:17 libsysguy I think that is pretty much straight out of the sample app Tester123
20:17 Tester123 I know, right?
20:17 libsysguy I did get that error when my routing was wrong though
20:18 Tester123 hrmm, ok
20:18 Tester123 ill check that
20:18 libsysguy I tried to move the controller into a controller directory and didn't include the new namespace
20:21 libsysguy sri you've got me all paranoid about using DBIx::Class with Mojo
20:21 Tester123 ok, looks like my DBI call is blowing up, so the stash isnt being called, but I am not seeign the DBI error :(
20:22 libsysguy Tester123 maybe its getting piped to some other log?
20:22 libsysguy or worse, caught in an eval :p
20:22 Tester123 yeah, wrapped in an eval
20:22 Tester123 darn it
20:22 libsysguy doh
20:23 moritz you can set PrintError => 1 on DBI connect
20:23 moritz useful for debugging
20:23 sri libsysguy: umm... looking through the channel log... my only comment about DBIx::Class this year was "pretty sure catalyst has no built-in plugin for dbic"
20:23 libsysguy if your using dbic I set local logging
20:23 libsysguy its really helpful
20:23 jwang joined #mojo
20:24 libsysguy well, maybe I'm just projecting your thoughts in my head then.  I know its blocking and I don't want to lose all the non-blocking benefits of mojo
20:24 libsysguy curse my inexperience with async stuff
20:25 * libsysguy thinks "what would sri do" :p
20:25 btyler joined #mojo
20:26 * sri thinks "what should sri do"... and realizes he still needs to finish Mango
20:26 libsysguy I have been poking at your Mango repo
20:26 sri don't use it, still highly experimental
20:27 libsysguy I am just afraid of using Mongo.  I like the idea behind it, but I heard it doesn't scale well
20:27 libsysguy and if anybody says it on the internet it has to be true right?
20:28 * sri slowly moves backwards and leaves the channel
20:28 libsysguy hehe
20:33 dod joined #mojo
20:36 perlite joined #mojo
20:52 tianon sri: hopefully backwards to work on Mango! \o/
21:03 kej_ joined #mojo
21:10 mire joined #mojo
21:15 tempire nonsense.
21:15 tempire it's for mongodb
21:15 tempire so it's webscale
21:27 denisboyun_ joined #mojo
21:30 BeDa joined #mojo
21:31 kjohnson joined #mojo
21:36 lukep joined #mojo
21:59 Averna joined #mojo
22:07 royskatt joined #mojo
22:40 sri interesting, this is based on mojo-mitm https://metacpan.org/module/IO​::Socket::SSL#Intercepting-SSL
23:04 ZadYree cool stuff
23:23 mrphilov joined #mojo
23:26 russum left #mojo
23:26 russum joined #mojo

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