Camelia, the Perl 6 bug

IRC log for #mojo, 2012-12-29

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

All times shown according to UTC.

Time Nick Message
00:13 Molaf_ joined #mojo
00:14 zivester joined #mojo
00:34 Miked joined #mojo
00:42 yakubori joined #mojo
01:11 basic61 joined #mojo
02:14 Caelum cfedde: are you using proxy or plack?
02:15 Caelum so mojolicious works perfectly in CGI mode under the shitty web server in Eclipse/EPIC, as long as I give the file a .cgi extension
02:17 cfedde Caelum: I've worked with both plack and proxy.  I think that I've settled on mod_fcgid and plack.   I'm still not quite happy with the mod_rewrite technique for dealing with serviing static content.
02:18 Caelum oh ok
02:18 Caelum I'm using the mod_perl handler, was working on some docs for plack for that
02:19 Caelum the best method is probably wsgi, but it doesn't really matter
02:19 cfedde there are some notes over in the mojo wiki on dealing with apache plack and mojo.
02:22 Caelum yeah I saw the link you posted, I don't like the mod_perl instructions, but you're not using mod_perl so never mind
02:22 cfedde for static content I'm happy putting stuff like src="public/image.jpg" in my templates.  But in the development cycle under morbo it wants src="image.jpg".  It'd be nice if there was a convenient way to deal with that via templating rather than webserver config.
02:27 cfedde Though I suppose. Once I have a config that works for me I'll be done.
02:51 lammel2 joined #mojo
03:04 zivester joined #mojo
03:18 zivester joined #mojo
03:20 zivester joined #mojo
03:29 noganex_ joined #mojo
03:35 tempire Hmm.
03:35 * tempire wonders how long it takes ironman to recognize a post
03:36 * tempire loses patience
03:36 tempire http://tempi.re/more-mojolicious-consolelogger
03:37 zivester joined #mojo
03:38 jberger tempire: that is spectacular!
03:38 jberger tempire++
03:39 tempire :)
03:40 jberger I can see myself adding $app->plugin('ConsoleLogger') if $ENV{GALILEO_CONSOLE_LOGGER}; very soon
03:41 jberger what does ->plugin do if the plugin is unavailable? die? I should hope so
03:42 tempire essentially
03:43 jberger so plugin if env should be sufficient
03:43 tempire yes
03:43 zivester joined #mojo
03:43 tempire morbo will print out an error and sit there.
03:43 tempire daemon will exit
03:44 jberger yeah
03:44 jberger sure
03:44 jberger excellent, that sounds incredibly useful
03:51 zivester joined #mojo
04:00 zivester joined #mojo
04:21 Miked joined #mojo
04:22 jberger tempire I don't get the line that appends to the body
04:22 jberger how does that get inside the body tag?
04:22 tempire line?
04:22 jberger https://github.com/tempire/mojolicious-​plugin-consolelogger/blob/master/lib/Mo​jolicious/Plugin/ConsoleLogger.pm#L73
04:23 tempire it replaces with the body with body + str
04:23 jberger when I apply the same logic for Mojolicious::Plugin::Humane, it puts the content in the head
04:23 jberger which is where it should go, but how does it know!?
04:24 tempire you're making it too complicated.  it just replaces the whole document with what was previously there, plus new stuff
04:24 tempire it doesn't know anything about head or any tags
04:25 jberger but it shows up there when I look at a source view
04:27 jberger hmmmm, my test for Humane seems suspect
04:27 tempire maybe you're confusing ->res->body with <body></body> ?
04:27 jberger but I still see your appended content inside the <body> tag
04:27 jberger no, I get the difference, I'm saying it looks like its placed there!
04:28 jberger look at a source view of a page using ConsoleLogger
04:28 tempire in my test, it the console logging stuff is after the closing html tag of a properly formatted document
04:30 jberger yeah, ok
04:30 jberger chrome's dev tools fixes it up
04:30 jberger the real source view shows it as you say
04:30 jberger nm
04:30 jberger go about your business, nothing to see here!
04:36 marty tempire++  ConsoleLogger is neato
04:42 jberger ok so script works after the </html> tag, will links to css sheets?
04:43 jwang joined #mojo
04:44 jberger sounds like something I shouldn't rely on
04:48 * jberger hands tempire a beer
05:03 zivester joined #mojo
05:30 zivester joined #mojo
05:35 anaio joined #mojo
05:35 plu joined #mojo
05:35 sri joined #mojo
05:38 tempire joined #mojo
05:38 jnbek^dt joined #mojo
05:38 duncanthrax joined #mojo
05:38 augensalat joined #mojo
05:38 Gedge_ joined #mojo
05:38 LV joined #mojo
05:38 _xaka_ joined #mojo
05:38 rem_lex| joined #mojo
05:38 Adurah joined #mojo
05:38 jwang joined #mojo
05:38 noganex joined #mojo
05:38 Molaf_ joined #mojo
05:38 dabudabu joined #mojo
05:38 Britzel joined #mojo
05:38 ask joined #mojo
05:38 d4rkie joined #mojo
05:38 jberger joined #mojo
05:38 JiYu joined #mojo
05:38 Foxcool joined #mojo
05:38 vervain joined #mojo
05:38 zdk joined #mojo
05:38 marty joined #mojo
05:38 alnewkirk joined #mojo
05:38 amirite joined #mojo
05:38 heytrav joined #mojo
05:38 connor_goodwolf joined #mojo
05:38 edenc joined #mojo
05:38 baton8 joined #mojo
05:38 al joined #mojo
05:38 stephan48 joined #mojo
05:38 mfontani joined #mojo
05:38 migo joined #mojo
05:38 nicomen joined #mojo
05:38 cfouts joined #mojo
05:38 mike_ joined #mojo
05:38 mattp joined #mojo
05:38 keedi joined #mojo
05:38 tokuhirom joined #mojo
05:38 jhthorsen joined #mojo
05:38 buu joined #mojo
05:38 rwstauner joined #mojo
05:38 phips_ joined #mojo
05:38 nic joined #mojo
05:38 Nom- joined #mojo
05:38 diegok joined #mojo
05:38 sawtooth joined #mojo
05:38 charsbar__ joined #mojo
05:38 marcus joined #mojo
05:38 jmmills joined #mojo
05:38 gabiruh joined #mojo
05:38 allison joined #mojo
05:38 ashleydev joined #mojo
05:38 tomi-ru joined #mojo
05:38 avenj joined #mojo
05:38 Mikey joined #mojo
05:38 Mithaldu joined #mojo
05:38 mikegrb joined #mojo
05:38 bobkare joined #mojo
05:38 jmaister joined #mojo
05:38 wheee joined #mojo
05:38 mtths joined #mojo
05:38 rafl joined #mojo
05:38 janus joined #mojo
05:38 ruz joined #mojo
05:38 memowe joined #mojo
05:38 kmx joined #mojo
05:38 t[R]oll joined #mojo
05:38 perlite joined #mojo
05:38 tl joined #mojo
05:38 Gruber joined #mojo
05:38 bc547_ joined #mojo
05:38 Miked joined #mojo
05:38 basic61 joined #mojo
05:38 njlg joined #mojo
05:38 trone joined #mojo
05:38 chansen joined #mojo
05:38 crab joined #mojo
05:38 jzawodn joined #mojo
05:38 geira joined #mojo
05:38 drift joined #mojo
05:38 sjn joined #mojo
05:38 Caelum joined #mojo
05:38 Annihitek joined #mojo
05:38 omega joined #mojo
05:38 cosimo_ joined #mojo
05:38 andrefs joined #mojo
05:38 espen joined #mojo
05:38 stickpin joined #mojo
05:38 Ulti joined #mojo
05:38 tardisx joined #mojo
05:38 garu joined #mojo
05:38 BinGOs joined #mojo
05:38 kwa joined #mojo
05:46 ver joined #mojo
06:14 mattastrophe joined #mojo
06:15 zivester joined #mojo
06:30 zivester joined #mojo
06:52 sri tempire++
07:02 ryozi joined #mojo
07:05 sri jberger: i don't really see many real world use cases for returning text in an array
07:06 sri here's also a normal text scaping example from the docs http://mojolicio.us/perldoc/Mojoli​cious/Guides/Cookbook#Web_scraping
07:07 sri whenever i see that $elements->[-1]->text_after(0) i want to add Mojo::Collection->last :)
07:12 sri tempire: i don't think the monkey patching is necessary
07:12 tempire what are we talking about?
07:13 sri https://github.com/tempire/mojolicious-​plugin-consolelogger/blob/master/lib/Mo​jolicious/Plugin/ConsoleLogger.pm#L21
07:13 sri can't you just subscribe to the message event?
07:14 tempire did that exist last june?
07:14 Vandal joined #mojo
07:14 sri don't think so
07:15 tempire good.  then that's my excuse.
07:15 sri or maybe it did :o
07:15 sri 2.15  2011-10-29
07:15 * tempire stands by his excuse
07:15 sri was experimental though
07:17 tempire MOJO_EVENTEMITTER_DEBUG is really useful
07:17 sri \o/
07:17 tempire hmm
07:18 tempire seeing all the events that you can hook into from the browser might be neat
07:25 tempire I like that mojolicio.us is showing up as the first result for all mojolicious modules now
07:25 sri \o/
07:39 zivester joined #mojo
07:43 _xaka_ would be cool to have kind of full text search over all modules on the home page. last time when i was helping people here, i couldn't remember module name so i had to search in sources
07:43 tempire http://search.cpan.org/dist/Mojolicious/
07:45 sri http://grep.cpan.me/about
08:07 Mike-PerlRecruiter_ joined #mojo
08:12 sri jberger: btw. i don't think your SO answer is what he actually wants, he needs context information to identify spoilers, only way i see is tree walking as shown in the example i linked above
08:12 _xaka_ well, that is different. i want to search within mojo repo and both links don't allow me to do so
08:12 _xaka_ so the only way i know is "git clone" + "git grep"
08:13 sri http://grep.cpan.me/?q=dist%3DMojolicious+foo+bar
08:14 _xaka_ oh, i though "dist" is something else, not package name :(
08:15 * _xaka_ is whining
08:29 wircus joined #mojo
08:30 wircus tempire++ # <3 Consolelogger idea.
08:52 guest-quest joined #mojo
08:54 guest-quest hi guys! where is there full described list of ENV to mojolicious?
08:55 kitt_vl joined #mojo
09:03 tempire not a central list.  they're in the docs in the locations respective to their functionality.
09:04 guest-quest tempire: ruefully :(
09:18 tempire mongodb is so weird
09:21 spleenjack joined #mojo
09:54 sri guest-quest: you're welcome to make a wiki page listing them all
10:07 guest-quest sri: oh, yeah, okey
10:18 guest-quest sri: which name of wiki page and which section of them?
10:36 sri whatever you think is appropriate
10:37 ObseLeTe joined #mojo
10:54 yakubori joined #mojo
11:00 guest-quest sri: began with my mind https://github.com/kraih/mojo/wiki/%25ENV
11:13 tempire ooh
11:13 tempire s/monkey patch/event/
11:13 tempire so much prettier
11:15 Britzel guest-quest: Here are some more: https://gist.github.com/4406239
11:16 guest-quest Britzel: thanks, will be attached
11:24 guest-quest sorry for my avidity, but where is there class diagram for Mojo?
11:27 Britzel guest-quest: It will be in the wiki as soon as you draw it :)
11:27 guest-quest is there a Perl module for show class diagrams for the Perl modules?
11:27 vervain sri et al worked on a diagram over a year ago... does it still exist.
11:27 mattastrophe joined #mojo
11:27 vervain ?
11:28 sri wasn't me, marcus did it
11:29 vervain Ah ok, I couldn't remember who actually drafted it but I remember the whole core team contributing more or less.
11:33 guest-quest okay, guys, and i want to describe bundle nginx+uwsgi+mojolicious on wiki
11:35 sri guest-quest: please do not start wiki pages you don't intend to maintain, if they start confusing other users we'll just delete them
11:35 sri i can totally see a bad list of ENV vars go that way
11:36 sri if your list is incomplete there needs to be descriptive text pointing people in the right direction
11:37 guest-quest okay, i want to continue right new year, dont delete
11:38 sri depends entirely on if it helps or causes trouble for others
11:40 sri right now it kinda gives the impression there might only be 3 env vars https://github.com/kraih/mojo/wiki/%25ENV
11:40 sri i like that it links to the right doc sections though
11:41 guest-quest okay, i mark this incomplete
11:42 guest-quest work gradually, as far as possible
11:43 rem_lex|pivo joined #mojo
11:44 sri tempire: any reason you're leaving the github issue open?
11:46 vervain I knew I had seen an ENV list before, had to dig in history to maintain sanity, this used to be in the Cheatsheet which seems to have been deprecated back in late Feb.
11:47 sri yea, cheatsheet was a pita to maintain, so it went away
11:49 sri tempire: i'll close it with a link to http://mojolicio.us/perldoc/Mojoliciou​s/Guides/Contributing#Feature_requests
11:51 vervain guest-quest: have a look at https://github.com/kraih/mojo/commit/19​25cb99dc47f452cb552d849787c1c83f15b3dd as a reference to what was once there, but double check for current validity.
11:52 sri most of that is outdated
11:52 guest-quest vervain: ok
11:53 guest-quest always triple checks
12:12 mire_ joined #mojo
12:23 ladnaV joined #mojo
12:26 yakubori joined #mojo
12:29 ObseLeTe joined #mojo
12:40 Molaf__ joined #mojo
12:51 priodev joined #mojo
13:03 yakubori joined #mojo
13:04 Miked joined #mojo
13:12 Mike-PerlRecruiter_ joined #mojo
13:17 sri i guess once Scalar::Util::set_subname has been added we can support it with monkey_patch :)
13:53 Vandal joined #mojo
14:18 yakubori joined #mojo
14:51 ObseLeTe joined #mojo
15:16 Britzel_ joined #mojo
15:29 dod joined #mojo
15:37 jberger sri: hmmmm, agreed, I didn't see his need for context info
15:38 jberger I removed most of my post as in that case it is now more confusing than help.
15:39 jberger guest-quest: finding all the env vars should just be a simple ack
15:45 dod joined #mojo
15:48 jberger ack -oh '(?<=\$ENV{)MOJO[^}]*(?=})' | sort | uniq
15:48 jberger there's your list
15:48 sri not all are public api though
15:49 sri just the documented ones
15:49 jberger and neither do they have descriptions, so it only helps get started
15:50 jberger but it is ALL the env vars used in mojo
15:58 dod joined #mojo
16:28 inokenty joined #mojo
16:32 yakubori joined #mojo
16:44 rem_lex joined #mojo
16:52 vervain Hehe... I did something similar to find ENV at the time, but didn't want to suggest it: in the t directory: grep -R ENV * | cut -f 2 -d { | cut -f 1 -d } | sort -u
16:55 yakubori joined #mojo
17:01 sinkovsky joined #mojo
17:17 yakubori joined #mojo
17:33 xaka joined #mojo
17:39 mattastrophe joined #mojo
17:44 yakubori joined #mojo
18:05 dod joined #mojo
18:21 sri hmmm
18:21 sri http://pastie.org/5594070 # wonder if we should make the alternative version work
18:22 sri ->walk would visit all children and children of children
18:39 gryphon joined #mojo
18:46 rhaen joined #mojo
18:46 rhaen hep.
18:47 sri http://pastie.org/5594165 # here's the full patch
18:48 jberger looks useful
18:50 dvinciguerra joined #mojo
18:51 sri jberger: but is it useful enough to be worth the cost? :)
18:52 sri and does it fit into the api?
18:54 sri and what should the exact semantics be?
18:54 sri perhaps the second argument to the callback should be the depth
18:54 sri so you can draw pretty element trees easily
19:00 sri http://pastie.org/5594198 # example
19:06 jberger the semantics are the tricky point
19:07 sri drawing element trees is fun
19:10 sri and makes for a great tree walking example
19:14 sri hmm
19:14 sri the depth argument makes the implementation harder though
19:14 sri without it's basically just "$_->$cb for $self->find('*')->each;"
19:16 sri guess the original comparison is not really fair, since we could get away there with a find instead of recursing too
19:20 yakubori joined #mojo
19:21 marcus sri: my @formats = @{$app->types->detect($req->headers->accept, $req->is_xhr)}; <- what does is_xhr do in this line?
19:21 sri yea, the whole thing is silly :/
19:21 sri marcus: provide a true/false value
19:22 marcus sri: Well, I know that bit, but how does it relate to respond_to?
19:22 sri marcus: see repond_to description
19:22 sri we've discussed that recently and you voted for it ;p
19:23 yakubori sorry to butt in, but is that asking if the req is an ajax req?
19:23 yakubori nm, i'll google
19:23 marcus yakubori: it is, and it will slightly change how respond_to works.
19:24 marcus (with regards to Accept headers)
19:24 marcus sri: are you sure? I can't remember voting on that.
19:24 * marcus is getting old, he supposes.
19:24 marcus sri: (not opposed to it tho)
19:25 marcus yakubori: it's in the changelog under version 3.67
19:25 sri basically, we allow multiple mime types since the header is only set by ajax libraries that know what they are doing
19:26 sri it's what rails does too
19:27 marty That change bit me recently, but in a good way.  It got me to define my types properly to get things working instead of just appending an extension to the request url
19:30 * marty just found JSformat for ST2 and now has purrdy javascript
19:30 good_news_everyone joined #mojo
19:30 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/0i0ZOA
19:30 good_news_everyone mojo/master 9d7fabc Sebastian Riedel: better web scraping example
19:30 good_news_everyone left #mojo
19:31 sri ok, ->walk is basically useless :)
19:33 sri but i've got a good excuse for not doing that before, ->next was added only recently ;p
19:37 * sri likes the recipe now http://mojolicio.us/perldoc/Mojoli​cious/Guides/Cookbook#Web_scraping
19:39 good_news_everyone joined #mojo
19:39 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/_WY0YQ
19:39 good_news_everyone mojo/master b047b50 Sebastian Riedel: tweaked web scraping recipe
19:39 good_news_everyone left #mojo
19:39 * sri thinks he originally added the recipe for buu
19:39 sri buu: you might be interested in that
19:41 marcus sri: why do we need the '0' on all the method calls?
19:41 sri trimming
19:42 sri the result looks better without it
19:53 sri hmm, getting the current element depth is rather tedious
19:53 sri you have to walk up the tree with ->parent and count
19:56 sri perl -Mojo -E 'for (g("mojolicio.us")->dom("*")->each) { my ($i, $c) = (0, $_); $i++ while $c = $c->parent; say "  " x $i, $_->type }'
19:56 sri not such a cool oneliner
20:02 marcus sri: no, not really
20:04 sri but adding a ->depth method just for that seems overkill if there are not more use cases :/
20:05 sri perl -Mojo -E 'say "  " x $_->depth, $_->type for g("mojolicio.us")->dom("*")->each'
20:05 sri would look cool though
20:10 yakubori joined #mojo
20:12 sri http://pastie.org/5594432 # another one
20:22 tempire sri: Only because I didn't want to risk creating a complainer
20:22 tempire Was just going to leave it open for a day and close it
20:23 tempire oh, I like the feature request section
20:23 sri tempire: shouldn't be much of a risk there, many big projects have such rules for github use
20:52 ObseLeTe joined #mojo
20:53 jberger ok, I've added the link to the new scraping example to the SO question
20:53 jberger sri++
21:14 sinkovsky joined #mojo
21:25 tempire ok.
21:25 tempire I think it's time.
21:25 * tempire turns on filevault
21:28 perlite_ joined #mojo
21:52 yakubori joined #mojo
23:03 yakubori joined #mojo
23:50 bpmedley joined #mojo
23:55 good_news_everyone joined #mojo
23:55 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/HgdGZw
23:55 good_news_everyone mojo/master 64c3d53 Sebastian Riedel: small optimizations
23:55 good_news_everyone left #mojo

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