Camelia, the Perl 6 bug

IRC log for #mojo, 2012-12-28

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

All times shown according to UTC.

Time Nick Message
00:00 sri ohoh
00:00 laidback_01 joined #mojo
00:00 sri https://travis-ci.org/kraih/mojo
00:00 sri that doesn't look right :o
00:05 jberger when I used TEST_POD=1 I got a pod failure on TLS
00:05 good_news_everyone joined #mojo
00:05 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/LcWpCg
00:05 good_news_everyone mojo/master 6a8b227 Sebastian Riedel: fixed environment variables
00:05 good_news_everyone left #mojo
00:05 travis-ci joined #mojo
00:05 travis-ci [travis-ci] kraih/mojo#37 (master - 9632953 : Sebastian Riedel): The build was broken.
00:05 travis-ci [travis-ci] Change view : https://github.com/kraih/mojo/com​pare/8d1633cde48c...9632953ac48d
00:05 travis-ci [travis-ci] Build details : http://travis-ci.org/kraih/mojo/builds/3848578
00:05 travis-ci left #mojo
00:06 sri noooo!
00:06 sri oh, old build :)
00:06 travis-ci joined #mojo
00:06 travis-ci [travis-ci] kraih/mojo#38 (master - 6a8b227 : Sebastian Riedel): The build was broken.
00:06 travis-ci [travis-ci] Change view : https://github.com/kraih/mojo/com​pare/9632953ac48d...6a8b227e2b8d
00:06 travis-ci [travis-ci] Build details : http://travis-ci.org/kraih/mojo/builds/3848621
00:06 travis-ci left #mojo
00:07 sri ohoh, new build fails too
00:10 sri the coverage error is odd, TLS and IPV6 are constants
00:13 Molaf__ joined #mojo
00:13 jberger as in "use constant"? aren't those technically subs
00:14 jberger then again, I know nothing about pod testing, so I should probably keep my trap shut
00:14 sri all constants are optimized subs
00:15 sri on os x i don't get those reports
00:18 sri it seems they only count when they are used outside their package though, and only on some platforms
00:19 tempire I found issues like that as well.
00:19 sri not sure what to do, document the constants or add ->has_ipv6 and ->has_tls methods
00:25 jberger seems like a problem in the test, not mojo
00:27 jberger http://www.perlmonks.org/ba​re/index.pl?node_id=826059
00:27 sri hmm
00:29 good_news_everyone joined #mojo
00:29 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/2KS7Ww
00:29 good_news_everyone mojo/master 5be2899 Sebastian Riedel: fixed POD tests
00:29 good_news_everyone left #mojo
00:29 sri ok, option 3 it is :)
00:30 tempire I'm starting to think the market is large enough to support a regular paid mojocast series.
00:30 travis-ci joined #mojo
00:30 travis-ci [travis-ci] kraih/mojo#39 (master - 5be2899 : Sebastian Riedel): The build was fixed.
00:30 travis-ci [travis-ci] Change view : https://github.com/kraih/mojo/com​pare/6a8b227e2b8d...5be2899b936c
00:30 travis-ci [travis-ci] Build details : http://travis-ci.org/kraih/mojo/builds/3848832
00:30 travis-ci left #mojo
00:30 sri that looks good again
00:31 sri tempire: we sure have a lot of people starting to learn mojolicious
00:34 sri demand for a book is growing too *hint hint*
00:35 laidback_01 sri, I'm going to give it a go tonight.  I'm a catalyst user, really rather like the framework, but a friend recommended I try out mojo just to see.  So.. heh, here I go ;)
00:35 sri have fun!
00:36 tempire laidback_01: recommended steps: watch the mojocasts, then read the guides on mojolicio.us/perldoc in order
00:36 laidback_01 hmm.okay, will do.  thanks!
00:37 sri tempire: when i release the mongodb driver you'll do a mojocast about it, right? :)
00:39 tempire very plausible
00:39 sri hmm, this version looks a lot more sympathetic https://github.com/kraih/mojo/pull/433/files
00:39 tempire especially if it's a planned simultaneous launch
00:40 tempire lists lists lists!
00:40 laidback_01 I'm sure it's likely explained in the casts and such, but i have to ask.  Which ORM do you tend to have favor for.  I'm pretty dbic oriented, and I can't see it not working, but is there something already built in, or are models handled in a similar way to catalyst?
00:41 jberger I use dbic for Galileo
00:41 sri the docs are pretty much model layer agnostic, we have no blessed one yet
00:41 jberger totally ORM agnostic as far as I know
00:42 tempire I default to dbic
00:42 tempire laidback_01: https://github.com/tempire/mojoexample
00:42 tempire uses dbic
00:43 good_news_everyone joined #mojo
00:43 good_news_everyone [mojo] kraih pushed 5 new commits to master: http://git.io/AogWXg
00:43 good_news_everyone mojo/master 5385def Joel Berger: monkey_patch can take hashref of name => subref pairs to patch
00:43 good_news_everyone mojo/master 67f8689 Joel Berger: small optimization in monkey_patch
00:43 good_news_everyone mojo/master a46abe7 Joel Berger: change monkey_patch interface to only accept name/sub pair rather than hashref (sri request)
00:43 good_news_everyone left #mojo
00:44 jberger hey hey, thanks sri
00:46 laidback_01 Okay, good to hear
00:46 laidback_01 thanks for the info
00:46 laidback_01 this will be an interesting experiemtn
00:48 sri jberger: you forgot to perltidy though, messes up the formatting a bit with our .perltidyrc
00:49 jberger shoot, I did forget
00:49 jberger I don't use perltidy myself, so I forgot
00:49 jberger my bad
00:49 tempire what
00:49 jberger how bad does it look?
00:49 * tempire glares at jberger
00:51 * jberger accepts the well earned glare
00:52 jberger (my code is always tidy, but tidy in my way)
00:56 good_news_everyone joined #mojo
00:56 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/fy-2Ow
00:56 good_news_everyone mojo/master f74cf10 Sebastian Riedel: small formatting tweaks
00:56 good_news_everyone left #mojo
00:57 sri it was just the j
00:57 labrown joined #mojo
00:58 jberger thats why I had made it its own sub
00:58 jberger course that had its problem
01:00 jberger I rather surprised at perltidy's handling of the j inline as it was
01:00 jberger why wouldn't it accept the further indentation
01:01 good_news_everyone joined #mojo
01:01 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/i_9NIw
01:01 good_news_everyone mojo/master dc74456 Sebastian Riedel: more monkey_patch tests
01:01 good_news_everyone left #mojo
01:01 sri jberger: yea, i've stumbled over that a few times before
01:02 sri i would bet it's a bug
01:02 sri eval {} also has a few weird edge cases in perltidy
01:03 yakubori joined #mojo
01:04 jberger I really haven't needed to use perltidy since I essentially work alone with a rather consistent style
01:04 jberger can't say that this episode has me any more convinced
01:04 jberger of couse, its probably worth the hassle in a group setting
01:05 sri i can't work without perltidy
01:05 jberger I know others who have said the same thing
01:05 sri got it on a hotkey :)
01:05 laidback_01 sri which editor do you use?
01:05 sri textmate2
01:06 laidback_01 is that Mac stuff?
01:06 sri yea
01:06 jberger my ocd beats perltidy handly in most cases
01:06 sri every now and then vim too
01:06 laidback_01 ah, okay, I probably can't use it.  heh.
01:06 jberger farabi has perltidy integration
01:06 jberger anyone can use that
01:06 jberger :-)
01:06 sri sublime text 2 is also pretty nice
01:07 laidback_01 Oh, yeah, I use Eclipse with the perl ide in it.
01:07 sri but perltidy doesn't work so well with it, so i can't really use it yet ;p
01:08 laidback_01 I'm just plain not sure what EPIC uses for indentation, etc.  It's nice enough to use by yourself, but... not sure otherwise.
01:08 sri my ocd makes me hit the perltidy button repeatedly :)
01:09 sri fun fact, very now and then it actually changes formatting the second time
01:09 sri *+e
01:09 jberger I'm sure EPIC uses the standard Eclipse indentation stuff
01:10 jberger sri: if it does that, how can you expect a consistent result?
01:10 jberger I love and hate Eclipse
01:10 jberger Eclipse+TeXlipse is the only decent LaTeX IDE that I'm aware of
01:10 sri jberger: both versions are usually good enough
01:11 sri i wouldn't notice an inconsistency at least
01:11 jberger but the hassles are so much that I usually go back to editing in gedit as usual
01:13 Mike-PerlRecruiter_ joined #mojo
01:15 hlin joined #mojo
01:19 sri you might like sublime text 2
01:19 sri has a nice mojolicious plugin too
01:20 Miked joined #mojo
01:30 ka2u joined #mojo
01:56 egopro joined #mojo
01:57 d4rkie joined #mojo
02:24 sri hmmm
02:24 sri https://github.com/kraih/mojo/blob/5c9ce4df38​2c54fc3dc5a25f77767a41ece116b0/lib/ojo.pm#L32
02:24 sri vs
02:24 sri https://github.com/kraih/moj​o/blob/master/lib/ojo.pm#L32
02:57 xaka +1 for last one
03:08 marty +1 for last one
03:09 jberger sri: any thought on making j a special function in Mojo::JSON like b is for bytestream
03:09 jberger then importing it into ojo?
03:09 jberger its a handy trick
03:10 D4RK-PH0ENiX joined #mojo
03:25 sri ok, last one stays :)
03:25 sri jberger: what's the use case?
03:25 jberger https://github.com/jberger/mojo/commit/5​e32faf40a44b5883a388bc04b238fa1ea498c80
03:25 jberger same as for ojo
03:25 jberger typically you know if you are encoding or decoding
03:26 jberger my $json = j { ... };
03:26 jberger my $data = j $json_string;
03:27 jberger like I said, parallel to ByteStream's b
03:27 sri don't think i would ever do that in a real app
03:27 jberger why not?
03:27 sri incoming $self->req->json and outgoing render(json => ...)
03:28 jberger ok, so its already built-in
03:28 jberger as long as the data is going to/from the server
03:28 sri b() is a bit different, since it's very useful in templates for example to prevent escaping
03:29 jberger it was just a thought
03:29 sri imo it would have to be really common for a shortcut like that
03:29 jberger seemed like j was the only function in ojo that isn't defined somewhere else
03:30 sri dumper is similar i guess
03:30 jberger then it seemed obvious that it could come from Mojo::JSON and possibly be used outside one-liners
03:30 sri Mojo::JSON->new->encode() is good enough for the few cases you need it
03:30 jberger sure
03:31 jberger I just think out loud sometimes
03:32 sri btw. imports and methods are ordered alphabetically usually (my ocd is tingling!) :)
03:32 jberger of course
03:32 jberger this was just a super-quick
03:32 jberger you'll notice I didn't even submit as a pull
03:33 noganex_ joined #mojo
03:33 jberger I really should have just pastie'd it
03:33 jberger (now you have my ocd tingling)
03:33 sri i actually think j() has been discussed here before
03:34 jberger I'm not going to fight for it
03:34 tempire eclipse is the devil
03:35 sri jberger: think i'm neutral on it, depends on real world use cases really
03:36 tempire http://dailypicksandflicks.com/wp-cont​ent/uploads/2012/05/devil-eclipse.jpg
03:37 jberger tempire: hahahahahah
03:42 sri http://irclog.perlgeek.de/​mojo/2012-06-19#i_5741160 # it was me xD
03:46 tempire hmm
03:47 tempire That's kind of neat.
03:48 tempire Not sure what for, though.
03:59 jberger a similar logic in each case
04:07 jberger I moved j in my fork
04:07 jberger however now it comes between false and true
04:08 * jberger ocd recursion stack exceeded
04:14 tempire what's a good way to demonstrate async on the server?
04:14 tempire something that's useful
04:14 tempire other than remote requests.
04:16 sri throttling with timers?
04:17 sri like, you are making requests too fast, we'll delay responses
04:17 tempire that's excellent
04:19 sri websockets are also always async, you could broadcast the time
04:19 sri same for a chunked/eventsource stream
04:19 sri or check some /proc value and broadcast that every second :)
05:01 ka2u joined #mojo
05:52 asarch joined #mojo
06:01 yakudza joined #mojo
06:01 crab hi
06:06 laouji joined #mojo
06:18 hotsnow left #mojo
07:00 anaio joined #mojo
07:10 dod joined #mojo
07:33 Vandal joined #mojo
07:34 anaio joined #mojo
07:38 dod joined #mojo
07:48 ladnaV joined #mojo
08:43 tempire HI CRAB
08:51 ka2u_ joined #mojo
09:02 alexeiras joined #mojo
09:23 trone Context: in Mojolicious::Plugin::DefaultHelpers, setting title/layout/extends in for loop, why $self->stash(@_) if @_;
09:23 trone ?
09:31 Miked joined #mojo
09:38 egopro joined #mojo
09:49 spleenjack joined #mojo
09:52 SmokeMachine joined #mojo
09:55 SmokeMachine joined #mojo
10:16 trone lol, I seen the docs right now. oook.
10:33 ObseLeTe joined #mojo
11:01 yakubori joined #mojo
11:06 alexeira1 joined #mojo
11:08 dabudabu joined #mojo
11:35 ka2u joined #mojo
11:43 rem_lex|pivo joined #mojo
11:50 ryozi joined #mojo
11:54 ka2u joined #mojo
11:57 mire_ joined #mojo
12:52 sri \o\
12:52 sri /o/
12:52 basic6 joined #mojo
12:58 d4rkie joined #mojo
12:59 marty \o/
13:01 ver joined #mojo
13:05 good_news_everyone joined #mojo
13:05 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/9S43SQ
13:05 good_news_everyone mojo/master e6e52f9 Sebastian Riedel: test IPv6 and TLS with Travis
13:05 good_news_everyone left #mojo
13:07 travis-ci joined #mojo
13:07 travis-ci [travis-ci] kraih/mojo#43 (master - e6e52f9 : Sebastian Riedel): The build was broken.
13:07 travis-ci [travis-ci] Change view : https://github.com/kraih/mojo/com​pare/dc744565e5a1...e6e52f99e065
13:07 travis-ci [travis-ci] Build details : http://travis-ci.org/kraih/mojo/builds/3854856
13:07 travis-ci left #mojo
13:07 sri :(
13:08 good_news_everyone joined #mojo
13:08 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/yiO3kQ
13:08 good_news_everyone mojo/master 94f9cf0 Sebastian Riedel: only run minimal tests with Travis
13:08 good_news_everyone left #mojo
13:12 good_news_everyone joined #mojo
13:12 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/AADsXQ
13:12 good_news_everyone mojo/master a4f69c9 Sebastian Riedel: fixed typo in ".travis.yml"
13:12 good_news_everyone left #mojo
13:14 travis-ci joined #mojo
13:14 travis-ci [travis-ci] kraih/mojo#45 (master - a4f69c9 : Sebastian Riedel): The build was fixed.
13:14 travis-ci [travis-ci] Change view : https://github.com/kraih/mojo/com​pare/94f9cf0b2285...a4f69c9f7223
13:14 travis-ci [travis-ci] Build details : http://travis-ci.org/kraih/mojo/builds/3854940
13:14 travis-ci left #mojo
13:17 ObseLeTe joined #mojo
13:24 good_news_everyone joined #mojo
13:24 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/_EVD2w
13:24 good_news_everyone mojo/master 07fdbad Sebastian Riedel: documentation tweaks
13:24 good_news_everyone left #mojo
13:32 basic6 joined #mojo
13:42 yakubori joined #mojo
13:50 _basic6 joined #mojo
13:51 basic6 left #mojo
13:52 basic6 joined #mojo
13:54 gryphon joined #mojo
13:58 basic6 joined #mojo
13:59 Vaewyn joined #mojo
14:08 nic sri: did the travis testing time shorten when 'j9' was added?
14:09 nic (curious whether travis allows concurrency)
14:12 dsteinbrunner joined #mojo
14:13 dsteinbrunner Heavy HTML::Tree user here dipping his toe into Mojo::DOM
14:14 nic The heavy HTML::Trees are the ones you need to be careful of
14:15 dsteinbrunner and I have found that I would like a way for find to return dom rather than the collection so I can then run more finds
14:15 dsteinbrunner I have made a quick hack so I can do so but
14:16 nic as in root ->find-> nodeA ->find-> nodeB ?
14:17 dsteinbrunner as in loop on root->find and then to more finds on each result
14:19 dsteinbrunner I'm used to HTML::Element's look_down which gives results that I can then look_down as much as I want
14:21 dsteinbrunner the collections seem like they are useful in but not in all cases
14:22 dsteinbrunner and hence a way to keep working with Mojo::DOM objects is benifical
14:23 nic how about providing a plugin to provide an additional method?
14:24 Vaewyn Howdy all...  wondering if it is possible to do redirect_to in plugins?  Moved code from a sub to a plugin and it stopped working...  example here: http://pastebin.ca/2297324
14:26 dsteinbrunner nic: plugins can be used outside of web apps?
14:27 inokenty joined #mojo
14:28 sri nic: yes, drastically, from 50s to 15s
14:30 sri dsteinbrunner: which dom would find return?
14:30 sri collections are just a collection of dom objects
14:31 sri odds are you're misunderstanding something, since i don't understand the problem
14:35 dsteinbrunner sri: here is my ugly hack which allows me to do what expect https://gist.github.com/43868b7f2326c2496775
14:35 sri dsteinbrunner: yea, that's pointless
14:36 sri ->find->map(sub { $_->find->each })
14:36 sri you want something like that
14:37 sri or for my $e (->find->each) { $e->find()... }
14:37 dsteinbrunner hmm
14:37 sri if you're reparsing html it's wrong
14:41 dsteinbrunner sri: the for example you have there points what I'm looking for
14:42 dsteinbrunner I'm used to working more directly and that hack basically does that same thing, gets rid of the need for the collection layer and hence the need to use each
14:43 sri that hack is horribly inefficient though
14:44 dsteinbrunner sure
14:44 dsteinbrunner ugly in many ways
14:47 dsteinbrunner but is working through the collection layer when you don't need/want it efficient?
14:51 ryozi joined #mojo
14:58 wircus o/
14:58 * wircus is in russia.
14:59 nic by plan?
14:59 nic or did you wake up in the boot of a car with a sore head and empty pockets?
14:59 wircus joined #mojo
14:59 batman____ joined #mojo
15:00 Vaewyn anyone? ...  ideas on why my plugin can't redirect_to ?   http://pastebin.ca/2297324
15:00 wircus nic: Visiting family.
15:02 nic ah, 'family'
15:02 Vaewyn wircus, I thought "in soviet russia... family visits you!"   ;P
15:03 Vaewyn and with that joke I'll sign up for my internet AARP card... :(
15:03 nic Vaewyn: I had a quick look but nothing jumped out
15:04 wircus nic: yeah, my wife's from st. petersburg.
15:04 wircus I actually think it's hard to accidentally go to russia because of the visum requirements.
15:04 nic nice
15:04 Vaewyn nic, thanks for looking...  it's freaky...  cause it works just fine in a direct sub in 'under' ....  but in the plugin I just get screwed routing
15:05 nic Vaewyn: when using the plugin, what does 'routes' say?
15:05 nic (hm, I don't actually want to know, just checking you've checked)
15:09 Vaewyn nic, routes are identical either way
15:09 Vaewyn and I actually don't want it to route at this point... I want it to do the redirect so :P
15:12 Vaewyn I'm beginning to think it's something real and not just a typo though... cause my google foo can't find a single plugin that uses redirect_to in itself... they all do it as side effects of the results of calling a plugin
15:15 Britzel_ joined #mojo
15:19 yakubori joined #mojo
15:21 Miked joined #mojo
15:53 yakubori joined #mojo
16:01 duncanthrax2 joined #mojo
16:11 ask joined #mojo
16:16 Vaewyn nic, figured it out...  I was ending up with the startup $self   instead of the sub calls $self...  so...  app versus controller...   still not sure why I didn't get a "no such function"  trying to call a redirect_to  on the app itself... but oh well :)
16:16 ask hello everyone! I'm making a small Mojo app again after not using it for anything new for a while.  I have some business-logic classes that don't use Mojo::* now. I'd like to have them hook into the app->log stuff for logging
16:17 nic Vaewyn: glad you solved it
16:17 ask what's the best way to do that? Ideally so I can still use those classes without the Mojo event loop etc running.
16:18 nic ask: eezy peezy
16:18 nic with your existing classes, can you "use Mojo::Base -base;" ?
16:19 nic it's just "Mojo::Log->new(level => $level, path => $path)"
16:20 nic I use "has log => { Mojo::Log->new(level => $_[0]->log_level, path => $_[0]->log_path) };"
16:21 nic but that's cos I luvs Mojo::Base
16:53 Vaewyn left #mojo
17:12 xaka joined #mojo
17:37 labrown joined #mojo
17:39 yakubori joined #mojo
17:41 trone_ joined #mojo
18:01 sri bow ties are cool
18:08 asarch joined #mojo
18:24 ask nic: the existing classes use Moose, so I'm not sure that will play nicely, but I'll try just using Mojo::Log->new(level => $level, path => $path) and then have my app use the same code to set its log object.
18:24 ask thanks!
18:28 yakubori joined #mojo
19:07 Miked joined #mojo
19:29 njlg joined #mojo
19:51 nic ask: That's fine, you can omit Mojo::Base and use Moose attributes.  Should work very nicely
20:05 yakubori joined #mojo
20:25 yakubori joined #mojo
20:39 gryphon joined #mojo
20:44 cfedde Morbo and hypnotode serve static files from public.  If I'm running under say cgi or fcgi is there some clever way to get similar behavior?
20:45 cfedde hypnotoad even.
20:55 tempire yes.  the server providing the cgi or fcgi
20:58 * tempire thinks it's about time for another blog entry
21:02 cfedde Sorry if I asked a silly question.   Please forgive me.
21:03 Britzel_ cfedde: It's not a stupid question, but an FAQ which needs more documentation. So tempire++
21:04 tempire no questions are stupid.
21:05 cfedde just the people who ask them.
21:06 Britzel_ neither that. They just havent spent enough time reading or experimenting.
21:06 cfedde left #mojo
21:08 cfedde joined #mojo
21:15 tempire even then, it's more about whether someone has the time to go through the answer.  so no stupid questions, just unanswered and requiring more time.
21:19 dod joined #mojo
21:31 dod joined #mojo
21:36 cfedde How very sensitive you are.  Thank you for that.
21:38 yakubori joined #mojo
21:47 cfedde A yucky and not very satisfying solution is just to link everything in public up a level: for f in `/bin/ls -d public/*`; do ln -s $f .; done
21:54 nic some providers give you sibling dirs (eg cgi for cgi and www for public) but annoying providers put one under the other (eg www for public and www/cgi-bin for cgi)
22:08 Britzel joined #mojo
22:19 zivester joined #mojo
22:23 sinkovsky joined #mojo
22:25 zivester joined #mojo
22:47 sinkovsky joined #mojo
22:51 jberger_ joined #mojo
22:52 jberger_ sri: re SO question: http://stackoverflow.com/questions/14073437/troub​le-pinpointing-child-elements-while-using-mojodom
22:52 jberger_ would there be any interest in allowing _text function to return the non-joined text string in list context?
22:53 jberger_ it wasn't a hard patch
22:54 jberger_ http://pastie.org/5590825
22:55 jberger_ this is especially useful for all_text method in which you want all child text, but it might not make sense joined
23:03 zivester joined #mojo
23:06 jberger_ full code: https://github.com/jberger/mojo/blob/f0b4d7688679​96abe0ddfc2de3d6ca62652b2728/lib/Mojo/DOM.pm#L369
23:19 cfedde the answer to my orignal question is:  See the Wiki: https://github.com/kraih/m​ojo/wiki/Apache-deployment
23:22 ask nic: indeed it does, thanks!
23:23 nic \o/
23:25 yakubori joined #mojo
23:26 mattastrophe joined #mojo
23:33 dabudabu joined #mojo
23:40 zivester joined #mojo
23:54 basic6 joined #mojo

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