| Time |
S |
Nick |
Message |
| 00:14 |
|
julien |
hi there |
| 00:14 |
|
purl |
hello, julien. |
| 00:14 |
|
julien |
stash confuses me a bit, where can I find a good explanation of what it is and what it can do ? |
| 00:15 |
|
|
MojoGuest381 joined #mojo |
| 00:15 |
|
MojoGuest381 |
From: http://news.ycombinator.com/item?id=1277067 (226 hits) |
| 00:15 |
|
|
MojoGuest381 left #mojo |
| 01:43 |
|
julien |
how do I do a redirect to an external URL ? with return $self->redirect_to ? |
| 01:58 |
|
DaTa |
$self->redirect_to("http://example.com/") should work fine |
| 02:08 |
|
|
MojoGuest446 joined #mojo |
| 02:08 |
|
MojoGuest446 |
From: http://www.reddit.com/r/html5/[…]bt76k/irc_client/ (50 hits) |
| 02:08 |
|
|
MojoGuest446 left #mojo |
| 02:09 |
|
|
MojoGuest221 joined #mojo |
| 02:09 |
|
MojoGuest221 |
From: http://www.reddit.com/r/html5/[…]bt76k/irc_client/ (51 hits) |
| 02:10 |
|
|
MojoGuest221 left #mojo |
| 02:11 |
|
|
MojoGuest86 joined #mojo |
| 02:11 |
|
MojoGuest86 |
From: http://www.networkedblogs.com/33Knp (64 hits) |
| 02:11 |
|
|
MojoGuest86 left #mojo |
| 02:11 |
|
|
MojoGuest914 joined #mojo |
| 02:11 |
|
MojoGuest914 |
From: http://twitter.com/justinvince[…]tatus/12550383961 (7 hits) |
| 02:12 |
|
|
MojoGuest914 left #mojo |
| 02:18 |
|
julien |
DaTa: it doesn't seem to, it returns that location header "Location: http://localhost:3000/!rx |
| 02:19 |
|
julien |
DaTa: which is the original URL |
| 02:19 |
|
julien |
must be from my code, this code works return $self->redirect_to("http://www.google.fr"); |
| 02:36 |
|
|
esskar2 left #mojo |
| 02:53 |
|
|
GitHub102 joined #mojo |
| 02:53 |
|
GitHub102 |
mojo: master Sebastian Riedel * 3f4fcf3 (3 files in 3 dirs): added TTL support to resolve in Mojo::IOLoop - http://bit.ly/h3nAVi |
| 02:53 |
|
|
GitHub102 left #mojo |
| 02:54 |
|
|
julien left #mojo |
| 02:55 |
|
|
julien joined #mojo |
| 02:58 |
|
sri |
marcus: i should :) |
| 03:00 |
|
|
esskar joined #mojo |
| 03:06 |
|
sri |
su-bzero: you forgot a test case again |
| 03:09 |
|
sri |
otherwise the patch was fine |
| 03:09 |
|
julien |
hum.... I'm confused, I get a "Can't locate object method "route" via "Mojolicious::Controller"" when using my $r = $self->routes; and use Mojo::Base 'Mojolicious'; |
| 03:10 |
|
sri |
that's the wrong $self |
| 03:10 |
|
sri |
routes are part of the app instance, not the controller |
| 03:11 |
|
julien |
so I shouldn't do that in a "post '/sendurl' => sub {}" |
| 03:11 |
|
sri |
never |
| 03:12 |
|
julien |
ok |
| 03:12 |
|
* julien |
goes back to the routing guide |
| 03:12 |
|
sri |
the routing guide covers normal routes |
| 03:12 |
|
sri |
the lite tutorial is about lite routes |
| 03:13 |
|
|
stephen left #mojo |
| 03:13 |
|
sri |
you might want to squeeze in the growing guide, to see how they relate to each other |
| 03:15 |
|
julien |
I've been switching between guides for the last few hours, MVC is new to me so it hurts a bit but I'm getting there |
| 03:16 |
|
julien |
can you add stuff in the stash from the controller ? like random scalar I want to share between functions ? |
| 03:17 |
|
crab |
sure. that's what it's for. |
| 03:35 |
|
julien |
humf... I have a post /sendurl that processes fine, but does not render anything |
| 03:36 |
|
julien |
can posts requests respond with html content ? |
| 03:36 |
|
sri |
of course |
| 03:36 |
|
crab |
of course. |
| 03:36 |
|
purl |
Indubitably. |
| 03:36 |
|
sri |
:) |
| 03:36 |
|
* sri |
hugs purl |
| 03:36 |
|
* purl |
smiles |
| 03:37 |
|
julien |
that's what I thought, but after 30 minutes of unsuccessful debugging, I'm starting to doubt that my brain is still sane |
| 03:40 |
|
julien |
if somebody has 5 seconds to check those few lines, I would be glad : http://pastebin.com/sCFFMNJy |
| 03:41 |
|
julien |
basically, I send a 'submit_url' value through post to /sendurl, it's processed fine (url is stored) but I don't get any render in return |
| 03:43 |
|
crab |
i dunno, your code looks fairly ok |
| 03:44 |
|
julien |
I thinks it's the begin in the submit.html.ep that's not good |
| 03:44 |
|
crab |
heh |
| 03:44 |
|
julien |
I removed it, and not it complains about a curly bracket |
| 03:44 |
|
crab |
i didn't even look at that template |
| 03:45 |
|
sri |
the template is very wrong |
| 03:45 |
|
sri |
begin/end are not supposed to ever be used like that ;p |
| 03:45 |
|
crab |
you don't need begin/end at all |
| 03:45 |
|
crab |
and using them that way won't work... what sri said |
| 03:46 |
|
sri |
it would generate an anonymous closure that does nothing or so |
| 03:46 |
|
sri |
resulting in an empty page |
| 03:47 |
|
julien |
do they need to be put somewhere else ? |
| 03:47 |
|
sri |
nope |
| 03:47 |
|
crab |
no |
| 03:47 |
|
sri |
just remove those lines |
| 03:47 |
|
sri |
i think you're rushing it a bit |
| 03:48 |
|
sri |
take it easy and read more slowly |
| 03:48 |
|
sri |
when you're starting fresh that's a lot of information to process |
| 03:49 |
|
crab |
you mean... don't try to accept such long urls? :-) |
| 03:49 |
|
julien |
crab: the regex is from the RFC :) I didn't write that one, or my brain would be fried by now ! |
| 03:49 |
|
crab |
julien: begin/end are used with something else, like <= form_for ... => begin %> ... <% end %>, not by themselves |
| 03:50 |
|
crab |
<%= form_for, i mean |
| 03:56 |
|
julien |
hehe |
| 03:56 |
|
julien |
my url shortener works :D |
| 03:58 |
|
julien |
is there an env variable that contains the URL, or more generally, a list of what is stored in $self ? |
| 03:59 |
|
crab |
$self->req->url? |
| 03:59 |
|
crab |
or do i misunderstand? why do you want an environment variable? |
| 04:00 |
|
crab |
the Mojolicious::Controller manpage documents what methods are available via (a controller's) $self |
| 04:00 |
|
julien |
crab: that's what I wanted, thanks :) |
| 04:04 |
|
|
tl joined #mojo |
| 04:06 |
|
|
tholen42 left #mojo |
| 04:09 |
|
julien |
hummm... anything like $self->url->host ? |
| 04:11 |
|
crab |
what do you want? |
| 04:11 |
|
purl |
DO YOU WANT TO HAVE MORE |
| 04:12 |
|
julien |
crab: the hostname in http://hostname/blablabla to regenerate an url like http://hostname/toto |
| 04:12 |
|
crab |
$self->req->url->base->host or so |
| 04:16 |
|
julien |
and thus the port is in $self->req->url->base->port, thanks crab |
| 04:25 |
|
sri |
my $url = $self->req->url->clone->to_abs; |
| 04:25 |
|
sri |
that way you don't mess up the original |
| 04:25 |
|
sri |
and can reuse the whole thing to generate whatever you want |
| 04:26 |
|
sri |
which i suspect is what you want to do :) |
| 04:27 |
|
julien |
sri: if I do that I need to manipulate the url after to remove everything after the hostname:port, and I just want those two |
| 04:28 |
|
sri |
ok |
| 04:46 |
|
|
torbjorn left #mojo |
| 04:46 |
|
|
torbjorn joined #mojo |
| 04:55 |
|
|
GitHub137 joined #mojo |
| 04:55 |
|
GitHub137 |
mojo: master Sebastian Riedel * bb8e99a (3 files in 2 dirs): fixed cookbook recipes - http://bit.ly/girgJU |
| 04:55 |
|
|
GitHub137 left #mojo |
| 04:55 |
|
crab |
i'd like a mojo pie, please |
| 04:56 |
|
sri |
no |
| 04:56 |
|
crab |
how about just a mojo muffin? |
| 04:57 |
|
sri |
maybe |
| 05:01 |
|
julien |
guys, thanks to your help, I'm proud to present my first mojolicious app :) http://1nw.eu/ |
| 05:01 |
|
sri |
\o/ |
| 05:01 |
|
* julien |
opens a fanta zero to celebrate |
| 05:04 |
|
julien |
alright, there might be some fixed needed :) |
| 05:05 |
|
julien |
I'm not sure that URL regex works as expected... :p |
| 05:05 |
|
sri |
just use Mojo::URL |
| 05:06 |
|
julien |
to check the validity of the url ? |
| 05:08 |
|
sri |
ye |
| 05:08 |
|
sri |
->is_abs will tell you if it looks like an absolute url |
| 05:15 |
|
julien |
works great, thanks |
| 05:21 |
|
julien |
hypnotoad in a chroot seems to be working alright as well |
| 05:52 |
|
|
metaperl left #mojo |
| 05:53 |
|
|
metaperl joined #mojo |
| 05:59 |
|
|
julien left #mojo |
| 05:59 |
|
|
jwang left #mojo |
| 06:34 |
|
sri |
http://blogs.perl.org/users/ma[…]command-line.html # looks like we've started yet another trend :) |
| 06:35 |
|
|
su-bzero is now known as su-bzero[off] |
| 06:57 |
|
|
kaare joined #mojo |
| 07:00 |
|
|
fhelmber_ joined #mojo |
| 07:01 |
|
|
koban joined #mojo |
| 07:05 |
|
|
su-bzero[off] is now known as su-bzero |
| 07:14 |
|
|
su-bzero left #mojo |
| 07:21 |
|
|
su-bzero joined #mojo |
| 07:21 |
|
su-bzero |
sri: https://github.com/kraih/mojo/pull/72 |
| 07:22 |
|
sri |
oh :) |
| 07:23 |
|
sri |
you might have missed my earlier commit |
| 07:23 |
|
sri |
https://github.com/kraih/mojo/[…]d1e90da0d73fa8f31 |
| 07:26 |
|
su-bzero |
sri: Thanks! |
| 07:27 |
|
sri |
sure |
| 07:31 |
|
|
Christian joined #mojo |
| 07:32 |
|
Christian |
morning |
| 07:33 |
|
* sri |
waves |
| 07:37 |
|
|
fhelmber_ left #mojo |
| 08:02 |
|
|
AmeliePoulain joined #mojo |
| 08:07 |
|
|
breaker313 joined #mojo |
| 08:51 |
|
|
esskar2 joined #mojo |
| 08:53 |
|
|
esskar left #mojo |
| 09:02 |
|
MisterHatt |
what the hell |
| 09:02 |
|
MisterHatt |
talking to our main host about getting a perl env setup for easy deployment for clients running shared hosting |
| 09:02 |
|
MisterHatt |
and they insist they cant do perl |
| 09:03 |
|
MisterHatt |
meanwhile their bug tracker is RT |
| 09:03 |
|
crab |
not enough cloud! |
| 09:04 |
|
MisterHatt |
cloud's not a problem for us unless we need australian hosting |
| 09:11 |
|
sri |
http://docs.yesodweb.com/blog/warp-speed-ahead # lol, 190000 rps |
| 09:12 |
|
crab |
sri: wow, i was _just_ going to paste that |
| 09:12 |
|
crab |
i copied it and was just switching to this window |
| 09:12 |
|
sri |
:D |
| 09:13 |
|
crab |
it's like a thousand times faster than mojo! |
| 09:13 |
|
sri |
seriously, screw perl, we're switching to haskell!!! |
| 09:14 |
|
crab |
their CPAN equivalent is called 4CHAN, right? |
| 09:20 |
|
MisterHatt |
hurr |
| 09:21 |
|
yko |
The best way to communicate with mongodb is MongoDB atm? |
| 09:22 |
|
yko |
there's no async stuff, ye? |
| 09:24 |
|
|
spleenjack joined #mojo |
| 09:29 |
|
sri |
not yet |
| 09:33 |
|
marcus |
sri: I wish that when people reinvented mojolicious, they would at least do it better. |
| 09:34 |
|
sri |
hehe, yea |
| 09:35 |
|
marcus |
xpath for scraping.. eww |
| 09:35 |
|
|
mattastrophe left #mojo |
| 09:35 |
|
sri |
i also like the opening, making it standalone by pulling in shitloads of dependencies |
| 09:36 |
|
sri |
if you're paying that much extra there really should be additional value |
| 09:37 |
|
yko |
regexps - that's what anyone need for scrapings :\ |
| 09:37 |
|
|
memowe left #mojo |
| 09:38 |
|
yko |
building DOM of 500Kb HTML just to get 20 bytes of data suxx |
| 09:38 |
|
|
memowe joined #mojo |
| 09:38 |
|
yko |
after all there's always broken html code, dirty hacks, etc. |
| 09:40 |
|
sri |
good luck searching for the text content of elements by a specific class :D |
| 09:40 |
|
yko |
not so hard as you think |
| 09:40 |
|
yko |
i grab whole element manually and then just parse it with Mojo:DOM :D |
| 09:41 |
|
yko |
it's not the same as build dom of whole page |
| 09:41 |
|
sri |
;p |
| 09:41 |
|
sri |
i've even had people complain about Mojo::DOM being regex based, because regex are evil! xD |
| 09:42 |
|
|
mattastrophe joined #mojo |
| 09:42 |
|
yko |
lol |
| 09:42 |
|
yko |
no, DOM is perfect |
| 09:42 |
|
purl |
okay, yko. |
| 09:42 |
|
yko |
-_- |
| 09:42 |
|
* sri |
kisses purl |
| 09:42 |
|
* purl |
swoons! |
| 09:43 |
|
yko |
i't a good stuff to parse something not very big and not very often |
| 09:43 |
|
sri |
its main purpose is testing |
| 09:44 |
|
yko |
but if you have fast flow of pages you need to parse (what scraping usually is) than you need fast box with a lot of ram or fast regexp |
| 09:44 |
|
yko |
i know, but it hav wide usage |
| 09:44 |
|
sri |
that's the point, it is a really good starting point, not the best at anything, but 99% of the time good enough |
| 09:44 |
|
sri |
argh |
| 09:44 |
|
yko |
actually, if i need to preform some parsing once even if there's a lot of data i use it :) |
| 09:45 |
|
sri |
why the hell am i reusing words so much in a single sentence -.- |
| 09:45 |
|
yko |
code reuse :) |
| 09:45 |
|
yko |
it's just a practice :D |
| 09:45 |
|
sri |
haha |
| 09:46 |
|
yko |
also DOM is great to communicate with APIs that usually returns XML (or JSON!) |
| 10:06 |
|
crab |
sri: render_later is for when you want to e.g. do something with mojo client and send a response from the callback? |
| 10:06 |
|
sri |
yes |
| 10:08 |
|
perlrocks |
Twitter: "To say that @ hayajo perl implementation, Mojolicious:: Lite is a guy you just use that or something you? But I tried with node.js, WebSocket I'm funny. In feeling very mach." (ja) --ushiboy http://twitter.com/ushiboy/sta[…]37453146959785984 |
| 10:21 |
|
yko |
hmm. can controller somehow know if client closed connection (in delayed render)? |
| 10:24 |
|
sri |
don't think so |
| 10:25 |
|
sri |
or actually |
| 10:25 |
|
sri |
you could use a callback |
| 10:27 |
|
sri |
you would use on_finish of course |
| 10:27 |
|
sri |
it's all over the long polling tests ;p |
| 10:28 |
|
sri |
https://github.com/kraih/mojo/[…]ng_lite_app.t#L21 |
| 10:30 |
|
yko |
thanks, just what i need i think |
| 10:31 |
|
DaTa |
moritz: can't remember that larry was here :) |
| 10:31 |
|
DaTa |
ups, http://irclog.perlgeek.de/sear[…]ojo&nick=&q=False forgotten the link :) |
| 10:32 |
|
moritz |
DaTa: there's a known search bug that context is displayed from other channels too |
| 10:32 |
|
moritz |
DaTa: I've been meaning to redo the search completely (using KinoSearch this time), but so far never got around to it |
| 10:33 |
|
sri |
could be fun use case for riak search |
| 10:34 |
|
moritz |
does it have perl bindings? |
| 10:34 |
|
sri |
http api |
| 10:34 |
|
moritz |
I count that as a "no" |
| 10:34 |
|
sri |
;p |
| 10:34 |
|
sri |
there are bindings... but they are well... |
| 10:36 |
|
* sri |
wonders if the mongodb folks can keep their fulltext search promises |
| 10:37 |
|
moritz |
in particular I want 1) automatic lexing/stemming 2) automatic query parsing and 3) sorting by arbitrary records |
| 10:37 |
|
moritz |
ie in the case of the IRC logs, I want to sort by day + timestamp |
| 10:38 |
|
moritz |
and maybe I want a second index that is not stemmed |
| 10:38 |
|
sri |
riak-search is mostly a erlang port of lucene |
| 10:38 |
|
sri |
with solr compatible http api |
| 10:57 |
|
|
breaker313 left #mojo |
| 10:58 |
|
marcus |
sri: 354 if ($_[0] eq 'UTF-8') { die unless utf8::decode $_[1] }$ <- kinda crap error handling |
| 11:01 |
|
sri |
marcus: can haz patch? |
| 11:04 |
|
sri |
i think one of the japanese guys wrote that code |
| 11:06 |
|
sri |
test case would be cool too |
| 11:12 |
|
yko |
http://bit.ly/fJEWQf # lol, if i was younger i'd do that immediately |
| 11:13 |
|
sri |
lol |
| 11:26 |
|
crab |
yko: how young would you have to be to do it? |
| 11:26 |
|
yko |
~18..21 i think |
| 11:27 |
|
su-bzero |
Ahahaha. |
| 11:30 |
|
* sri |
places a bowl with norwegian candy on the channel trap door and waits for marcus to pass by |
| 11:30 |
|
su-bzero |
DejaVu Sans Mono in Terminus. ;) |
| 11:30 |
|
su-bzero |
Or Monaco. |
| 11:30 |
|
yko |
oh good! ill have neighbor in trap pit here! |
| 11:31 |
|
su-bzero |
yko: I think it will be a man, not a woman. ;) |
| 11:31 |
|
yko |
i was in love with design stuff those days, just a boy with big silly ayes |
| 11:31 |
|
yko |
su-bzero: i'm here sooo long... don't care moch :p |
| 11:31 |
|
yko |
just hungry |
| 11:31 |
|
sri |
Menlo is better than Monaco |
| 11:33 |
|
su-bzero |
Menlo is non-free too as Monaco? |
| 11:33 |
|
sri |
ye |
| 11:33 |
|
sri |
apple font |
| 11:34 |
|
crab |
i really want to use a font called pt sans on my web page, but its "Q" glyph is so ugly that i can't. |
| 11:36 |
|
marcus |
mensch is bettererer |
| 11:37 |
|
marcus |
http://robey.lag.net/2010/06/21/mensch-font.html |
| 11:39 |
|
omega |
I use http://www.levien.com/type/myf[…]/inconsolata.html :) |
| 11:44 |
|
crab |
marcus: better than pt sa... ah, no, menlo. ok. |
| 11:44 |
|
su-bzero |
Ho... Mensch is nice. |
| 11:45 |
|
su-bzero |
I think it has problems with cyrillic. ;) |
| 11:45 |
|
sri |
marcus: are you going to patch it? |
| 11:46 |
|
marcus |
sri: something like http://paste.scsys.co.uk/88323 ? |
| 11:46 |
|
sri |
marcus: i don't know, that's why a test would be nice |
| 11:47 |
|
marcus |
how do you test error handling? |
| 11:47 |
|
sri |
with bad input i guess |
| 11:47 |
|
marcus |
eval? |
| 11:47 |
|
purl |
I ain't your slave, marcus |
| 11:47 |
|
sri |
yea |
| 11:48 |
|
marcus |
sri: I'll look at it later. Have to work on $client_project now |
| 11:48 |
|
sri |
i guess a t/mojo/bytestream.t test with bad input and eval should do |
| 11:48 |
|
sri |
sure, just don't forget it, because i will ;p |
| 11:48 |
|
marcus |
hmm, I seem to remember something else I promised to look at later.. |
| 11:48 |
|
sri |
json errors? |
| 11:48 |
|
marcus |
ah yes, json line numbers |
| 11:49 |
|
marcus |
will do both tonight |
| 11:49 |
|
sri |
no worries, in 10 mins i'll have forgotten that again too -.- |
| 11:49 |
|
marcus |
bad robot, no cookie |
| 11:50 |
|
sri |
need ssd drives! |
| 11:58 |
|
marcus |
yes you do |
| 11:59 |
|
sri |
marcus: the ocz drive just fits into the macbook, or do i need some kind of adaptor? |
| 11:59 |
|
marcus |
sri: it should just fit |
| 11:59 |
|
marcus |
it did in my macbook pro |
| 11:59 |
|
marcus |
you have the alu 13"_ |
| 11:59 |
|
marcus |
? |
| 12:00 |
|
sri |
yea, from a year ago |
| 12:01 |
|
marcus |
http://www.everymac.com/system[…]e-hard-drive.html |
| 12:01 |
|
marcus |
guess your even has a battery hatch |
| 12:02 |
|
marcus |
if you have the one in the video, there is only 1 screw(!) |
| 12:02 |
|
sri |
i think i do :) |
| 12:02 |
|
marcus |
should be super easy then |
| 12:03 |
|
marcus |
mine had two screws holding it down, and like 10 screw on the lid |
| 12:03 |
|
marcus |
screws |
| 12:03 |
|
sri |
no wait |
| 12:03 |
|
sri |
mine has screws all over the bottom |
| 12:03 |
|
marcus |
but do you have a replaceable battery? |
| 12:04 |
|
sri |
nope |
| 12:04 |
|
marcus |
ah |
| 12:04 |
|
marcus |
then you need to unscrew the lid |
| 12:06 |
|
|
kimoto joined #mojo |
| 12:09 |
|
|
bc5042 joined #mojo |
| 12:09 |
|
|
kimoto left #mojo |
| 12:10 |
|
|
kimoto joined #mojo |
| 12:11 |
|
kimoto |
I deploy Mojolicious::Lite application by Apache mod_proxy. |
| 12:11 |
|
kimoto |
but dispach and url_for don't work. |
| 12:11 |
|
kimoto |
so I solve this in the following code. |
| 12:11 |
|
sri |
purl: doesn't work? |
| 12:11 |
|
purl |
Look buddy, doesn't work is a strong statement. Does it sit on the couch all day? Is it making faces at you? Does it want more money? Is it sleeping with your girlfriend? Please be specific! |
| 12:12 |
|
kimoto |
http://codepad.org/0xVXMGNs |
| 12:12 |
|
yko |
sri++ |
| 12:12 |
|
kimoto |
Is this best way? |
| 12:13 |
|
sri |
the hook for x-forwarded-host is good |
| 12:13 |
|
sri |
but what's the point of overloading url_for? |
| 12:13 |
|
marcus |
Test::Mojo makes TDD a joy |
| 12:13 |
|
sri |
\o/ |
| 12:13 |
|
kimoto |
I specify base tag. |
| 12:13 |
|
sri |
kimoto: are you using 1.1? |
| 12:14 |
|
sri |
url_for in 1.1 returns absolute paths that just work |
| 12:14 |
|
sri |
we've changed that one or two weeks ago |
| 12:14 |
|
sri |
base tag is optional from now on |
| 12:14 |
|
crab |
absolute paths? |
| 12:14 |
|
purl |
absolute paths are bad for later deployment |
| 12:14 |
|
kimoto |
now i use 1.1. but I write this code a few week ago. |
| 12:14 |
|
sri |
ok, it is not needed anymore |
| 12:15 |
|
crab |
absolute urls with scheme and hostname, or something to do with just the paths? |
| 12:15 |
|
sri |
i said "absolute path" |
| 12:15 |
|
crab |
what does that mean? where does it make a difference? |
| 12:16 |
|
sri |
that's a huge topic |
| 12:16 |
|
sri |
google html paths or so |
| 12:16 |
|
crab |
well, i just want to understand if/how it affects me |
| 12:17 |
|
sri |
sure, but i don't want to explain for half an hour :/ |
| 12:17 |
|
sri |
someone else maybe? |
| 12:18 |
|
crab |
sri: is this about path-absolute from rfc 3986? /foo/bar instead of ../bar? |
| 12:18 |
|
crab |
must be. ok, then, nothing to worry about. |
| 12:22 |
|
kimoto |
dose url_for render '/foo/bar'? don't base tag work absolute path? so i write $url->path->leading_slash(0) |
| 12:22 |
|
bc5042 |
to set cookie for test request i use $t->tx->req->cookies({name => 'name', value => 'value'}), but i can't get that cookie from $c->cookie('name'), what am i doing wrong? |
| 12:22 |
|
sri |
kimoto: don't worry, just remove that part |
| 12:23 |
|
sri |
url_for will prefix the generated path with the base path if it exists |
| 12:23 |
|
sri |
so it is always a valid absolute path |
| 12:24 |
|
kimoto |
OK , i do try it tomorrow in my work. |
| 12:24 |
|
sri |
bc5042: you can't access the transaction like that |
| 12:25 |
|
sri |
i guess you would need an $t->client->on_start(sub {...}); |
| 12:25 |
|
bc5042 |
so how i can add cookie header to request? |
| 12:25 |
|
garu |
sri: can I bitch about a really poorly written html page? one that's so bad that Mojo::DOM is getting data "correctly" |
| 12:26 |
|
sri |
garu: sure you can |
| 12:26 |
|
garu |
hmm... might as well just ask a question: when a crappy html coder forgets to close a tag, does Mojo::DOM treat is as empty and forgets whatever is supposed to be in it? |
| 12:26 |
|
sri |
yes it does |
| 12:26 |
|
garu |
or is it a Mojo::DOM "bug"? |
| 12:26 |
|
garu |
ah |
| 12:26 |
|
garu |
crap |
| 12:27 |
|
garu |
:) |
| 12:27 |
|
sri |
except for tags that are allowed to by spec |
| 12:27 |
|
sri |
like <p> |
| 12:27 |
|
sri |
<p>lalala is equal to <p>lalala</p> |
| 12:27 |
|
sri |
yay for html |
| 12:27 |
|
garu |
mine is a <table> call |
| 12:28 |
|
sri |
table is allowed to |
| 12:28 |
|
garu |
that the amazing html coder forgot to close |
| 12:28 |
|
sri |
no wait |
| 12:28 |
|
sri |
just tags inside table |
| 12:28 |
|
garu |
and I want to get a <b> inside it |
| 12:30 |
|
sri |
nope, afraid that's broken html |
| 12:30 |
|
garu |
if you're at all interested, it's this html => http://bit.ly/g96IjK, $dom->at('table#resenha_coluna_preco') is coming out empty |
| 12:30 |
|
sri |
http://dev.w3.org/html5/spec/O[…]tml#optional-tags # those are all exceptions |
| 12:31 |
|
garu |
any suggestions? other than trying to kill their coder? |
| 12:31 |
|
sri |
i wouldn't mind making Mojo::DOM more forgiving, but we would have to be much more html aware and keep lists of tags with rules |
| 12:31 |
|
|
espent_ is now known as espent |
| 12:31 |
|
sri |
regex before Mojo::DOM? ;p |
| 12:33 |
|
sri |
or some html healing filter thingy |
| 12:33 |
|
yko |
sri: that's what i usually do :) |
| 12:34 |
|
yko |
cut html i really need with regexp, heal it and parse with DOM |
| 12:34 |
|
sri |
yea |
| 12:34 |
|
jamesw |
that depends on them not fixing it, heh |
| 12:34 |
|
yko |
all who don't agree should go and use HTML::TreeBuilder, it's also nice :p |
| 12:34 |
|
sri |
auto healing in DOM would be nice, but it insanely hard, and requires tons of maintained meta data |
| 12:35 |
|
yko |
sri++ |
| 12:35 |
|
sri |
i doubt treebuilder can heal html,can it? |
| 12:35 |
|
yko |
i don't see reasons for making Mojo::DOM SO user(bugs)friendly |
| 12:36 |
|
yko |
sri: i just hope it has tons of aidbands, plaster and iodine and other humanitarian relief for html builded in poor-dev minds |
| 12:36 |
|
|
kimoto left #mojo |
| 12:37 |
|
|
kimoto joined #mojo |
| 12:37 |
|
* yko |
hates aspx because of it |
| 12:37 |
|
sri |
thinking about it... healing a forgotten table end tag is really fucking hard |
| 12:38 |
|
sri |
you have tons of tags with exceptions in between |
| 12:38 |
|
yko |
i really don't know why we need such 'healings' |
| 12:38 |
|
sri |
we don't, but it is neat |
| 12:39 |
|
yko |
you will try, your html-autopatch will be wrong sometimes, users will blame you for that |
| 12:39 |
|
sri |
maybe a gsoc student wants to implement it :) |
| 12:42 |
|
* garu |
goes for the regex approach |
| 12:42 |
|
|
kimoto left #mojo |
| 12:43 |
|
|
kimoto joined #mojo |
| 12:48 |
|
kimoto |
I update Mojolicious and rewrite code. it is good. |
| 12:48 |
|
kimoto |
http://codepad.org/dTlGowXI |
| 12:49 |
|
sri |
looks good |
| 12:50 |
|
sri |
the whole relative path thing we tried before was way too complicated |
| 12:51 |
|
kimoto |
Can i get application script name or proxy path? all thing will become automatical. |
| 12:51 |
|
sri |
yay, ssd ordered |
| 12:52 |
|
sri |
kimoto: doubt it |
| 12:52 |
|
sri |
but please prove me wrong :) |
| 12:52 |
|
|
kimoto left #mojo |
| 12:53 |
|
|
fish_ joined #mojo |
| 12:53 |
|
fish_ |
re |
| 12:53 |
|
|
kimoto joined #mojo |
| 12:56 |
|
garu |
sri: DOM->find->until will keep going until the subref returns true, and keep going in case it returns false, right? |
| 12:56 |
|
|
kimoto left #mojo |
| 12:57 |
|
sri |
right |
| 12:57 |
|
garu |
sri++ # awesome |
| 12:58 |
|
|
kimoto joined #mojo |
| 13:00 |
|
crab |
if i do $p = $r->bridge->to('c#a') twice, will it create two identical bridges? |
| 13:00 |
|
|
kimoto left #mojo |
| 13:00 |
|
|
kimoto joined #mojo |
| 13:01 |
|
sri |
it will |
| 13:01 |
|
sri |
you should know by now that there is nothing unique about a route |
| 13:02 |
|
crab |
ok, is it worth trying to avoid that? |
| 13:02 |
|
sri |
why would it? |
| 13:02 |
|
crab |
(i.e. to avoid creating duplicate bridges, by naming the first one and always looking for it) |
| 13:02 |
|
sri |
that's up to you |
| 13:03 |
|
sri |
everything gets slower the more routes you have, but that's about it |
| 13:03 |
|
crab |
i know, i'm just trying to decide if there's any compelling reason to add the extra code |
| 13:03 |
|
crab |
ah |
| 13:05 |
|
sri |
hmm, sparrow seems broken since the update :( |
| 13:05 |
|
|
kimoto left #mojo |
| 13:06 |
|
|
kimoto joined #mojo |
| 13:18 |
|
|
bellaire joined #mojo |
| 13:35 |
|
garu |
is there a way to search for elements above a given element in Mojo::DOM ? like ->at('div#foo')->parent('table')? or maybe ->at('div#foo < table') or something? |
| 13:36 |
|
garu |
or do I have to climb the parent()s |
| 13:36 |
|
garu |
(and know beforehand the full lineage) |
| 13:36 |
|
sri |
i don't think there is |
| 13:37 |
|
garu |
:( |
| 13:38 |
|
sri |
can't you do something like ->find('table')->each(sub { warn "lalala" if $_->find('div#foo'); }) or so |
| 13:38 |
|
|
kimoto left #mojo |
| 13:38 |
|
sri |
s/find/at/ |
| 13:39 |
|
|
kimoto joined #mojo |
| 13:39 |
|
sri |
$dom->find('table')->each(sub { warn "lalala" if shift->at('div#foo'); }) |
| 13:39 |
|
sri |
garu: that might work |
| 13:40 |
|
garu |
yeah, that's what I'm doing.. I was just hoping $dom would make it a bit easier on the eyes :) |
| 13:40 |
|
sri |
heh |
| 13:40 |
|
garu |
I'm using until() actually |
| 13:41 |
|
garu |
since I don't know how to break from each() |
| 13:41 |
|
|
kimoto left #mojo |
| 13:41 |
|
garu |
(not that it should break at all) |
| 13:42 |
|
|
kimoto joined #mojo |
| 13:42 |
|
sri |
until is a good choice there |
| 13:42 |
|
garu |
ok, another stupid question: |
| 13:42 |
|
purl |
another stupid question: is, like, #x1F the same as x1f or x01f |
| 13:42 |
|
garu |
purl: it's almost that :) |
| 13:42 |
|
purl |
garu: huh? |
| 13:42 |
|
garu |
purl++ |
| 13:43 |
|
sri |
until(sub { $_->at('div#foo') and $_->whatever }); is not that ugly |
| 13:43 |
|
garu |
is there a way to easily get the string represented by codes like ' ' ? |
| 13:44 |
|
sri |
b($something)->html_unescape? |
| 13:44 |
|
garu |
ha! |
| 13:44 |
|
garu |
sri++ |
| 13:44 |
|
* garu |
was about to perldoc HTML::Entities |
| 13:45 |
|
sri |
:) |
| 13:45 |
|
garu |
but I thought bytestream would probably have something ready :) |
| 13:45 |
|
sri |
Mojo::ByteStream can decode and encode just about anything |
| 13:47 |
|
|
Akron joined #mojo |
| 13:49 |
|
elb0w |
If I dont have access to apache.conf and system runs fastcgi how can I plug in mojo |
| 13:53 |
|
Akron |
elb0w: How is fastcgi then started? By detection of file ending? |
| 13:55 |
|
elb0w |
My host sets it up |
| 13:56 |
|
elb0w |
I havent configured it |
| 13:57 |
|
Akron |
Yes - but somehow apache has to detect to start a script as cgi or fastcgi. |
| 13:57 |
|
elb0w |
I think I can do it in the .htaccess |
| 13:57 |
|
|
kimoto left #mojo |
| 13:58 |
|
elb0w |
yeah I do it with the htaccess |
| 13:58 |
|
elb0w |
http://elbowrage.com/htaccess |
| 13:58 |
|
elb0w |
I had setup catalyst |
| 13:58 |
|
elb0w |
using it |
| 13:58 |
|
purl |
i think using it is asking for troubles, it will cause more work than doing right from the beginning |
| 13:58 |
|
|
kimoto joined #mojo |
| 13:58 |
|
elb0w |
Yeah, but I dont have access to it |
| 13:59 |
|
elb0w |
I guess what I am asking, is htaccess my only choice if I dont have access to apache.conf? |
| 14:00 |
|
garu |
sri: turns out I didn't even have to ->html_unescape, $dom->text already did it for me :) |
| 14:00 |
|
garu |
sri++ # once again |
| 14:01 |
|
Akron |
I think so, yes. Probably you have to start your app with ->start('fastcgi') instead of just ->start; if detection goes wrong somehow. But ... yeah. .htaccess should be fine. |
| 14:10 |
|
elb0w |
ok |
| 14:10 |
|
|
kimoto left #mojo |
| 14:11 |
|
|
kimoto joined #mojo |
| 14:14 |
|
sri |
we still need a bulletproof rewrite recipe |
| 14:14 |
|
sri |
but detection should mostly work |
| 14:18 |
|
sri |
would be cool if someone with a dreamhost account or so put something together i could add to the cookbook |
| 14:19 |
|
|
mattastrophe left #mojo |
| 14:21 |
|
elb0w |
sri, thats my host |
| 14:21 |
|
elb0w |
I will take notes as I go |
| 14:21 |
|
sri |
that would be nice |
| 14:22 |
|
garu |
sri: it's already done |
| 14:22 |
|
garu |
but in portuguese :) |
| 14:22 |
|
sri |
:S |
| 14:22 |
|
garu |
http://sao-paulo.pm.org/artigo[…]astcginodreamhost |
| 14:23 |
|
garu |
"installing a mojolicious app with fastcgi on dreamhost" |
| 14:23 |
|
|
kimoto left #mojo |
| 14:23 |
|
garu |
want me to translate it? |
| 14:23 |
|
sri |
that's exactly what our wiki needs |
| 14:23 |
|
|
kimoto joined #mojo |
| 14:23 |
|
garu |
okay |
| 14:24 |
|
sri |
\o/ |
| 14:24 |
|
|
kimoto left #mojo |
| 14:25 |
|
garu |
elb0w: http://bit.ly/ggU5rP |
| 14:25 |
|
marcus |
sri: having some trouble with a test that is checking a http request using Mojo::Client |
| 14:25 |
|
garu |
the actual translation should take a bit longer :) |
| 14:26 |
|
marcus |
sri: it works fine in the browser, but using Test::Mojo it says '(Interrupted, maybe a timeout?) |
| 14:26 |
|
|
kimoto joined #mojo |
| 14:26 |
|
marcus |
sri: any ideas? |
| 14:26 |
|
sri |
checking a http request sounds wrong |
| 14:26 |
|
garu |
wtf |
| 14:27 |
|
garu |
google translated my name (breno) as "brenda" |
| 14:27 |
|
|
kimoto left #mojo |
| 14:27 |
|
sri |
haha |
| 14:27 |
|
garu |
the bastards |
| 14:27 |
|
* purl |
kills kenny |
| 14:27 |
|
sri |
"Blab of Bleb a programmer since 1999..."? |
| 14:27 |
|
marcus |
sri: I mean, it's doing a $client->get and checking for ->success |
| 14:28 |
|
sri |
no ideas |
| 14:28 |
|
marcus |
against another host on the intarwebs |
| 14:28 |
|
|
kimoto joined #mojo |
| 14:28 |
|
sri |
give me the url then |
| 14:28 |
|
elb0w |
garu, ty |
| 14:28 |
|
garu |
sri: it should read "blabos de blebe", it's wesley's nick (he wrote the article based on a debugging session with me) |
| 14:28 |
|
sri |
ah |
| 14:28 |
|
marcus |
sri: http://pastie.textmate.org/pri[…]bqigseur8wii4iola |
| 14:29 |
|
garu |
sri: ok, he agreed on translating it |
| 14:29 |
|
|
kimoto left #mojo |
| 14:29 |
|
garu |
delegation++ |
| 14:29 |
|
garu |
:) |
| 14:30 |
|
sri |
:) |
| 14:30 |
|
marcus |
sri: I've tried with MOJO_CLIENT_DEBUG=1, and it seems to get a 200 back :/ |
| 14:30 |
|
garu |
sri: he's also adding a piece on how to do mojolicious in HostMonster \o/ |
| 14:30 |
|
|
kimoto joined #mojo |
| 14:30 |
|
sri |
marcus: "mojo get -v --method head 'http://foo:bar wap.ntb.no'" seems fine too |
| 14:31 |
|
sri |
garu: yay! |
| 14:31 |
|
marcus |
sri: yeah, it works in the browser. Just the unit-test fails |
| 14:31 |
|
elb0w |
garu this is awesome, im sure it will save me a lot of time |
| 14:32 |
|
marcus |
sri: http://pastie.textmate.org/pri[…]ytikksdmh7uax4nbg |
| 14:32 |
|
marcus |
sri: I output the $tx->error in the error template, and it says 'Interrupted, maybe a timeout?' |
| 14:32 |
|
|
kimoto left #mojo |
| 14:34 |
|
sri |
no ideas |
| 14:35 |
|
|
kimoto joined #mojo |
| 14:35 |
|
sri |
if there's a bug somewhere i need something i can replicate |
| 14:37 |
|
marcus |
understandable |
| 14:46 |
|
garu |
elb0w: yay :) |
| 14:47 |
|
garu |
elb0w: let me know if the translation is confusing at any given moment and you need help |
| 14:47 |
|
sri |
i'm sure it will make many of our users happy |
| 14:47 |
|
sri |
shared hosting comes up all the time |
| 14:47 |
|
elb0w |
well |
| 14:47 |
|
elb0w |
the daemon will violate |
| 14:47 |
|
elb0w |
their TOS |
| 14:47 |
|
purl |
their TOS are somewhat sketchy |
| 14:48 |
|
elb0w |
I got in trouble with them |
| 14:48 |
|
elb0w |
when I ran the catalyst daemon |
| 14:50 |
|
Akron |
garu++ |
| 14:50 |
|
|
fmerges joined #mojo |
| 14:50 |
|
sri |
garu++ |
| 14:55 |
|
elb0w |
garu++ |
| 14:55 |
|
elb0w |
:D |
| 14:56 |
|
elb0w |
[Server] $ mv dispatch.fcgi app.pl , that backwards? |
| 14:58 |
|
elb0w |
This is cool |
| 14:58 |
|
elb0w |
Ill be able to deploy tonight |
| 14:58 |
|
elb0w |
yey |
| 14:58 |
|
elb0w |
should add to mojolicio.us imo |
| 15:02 |
|
|
tempire left #mojo |
| 15:03 |
|
|
koban left #mojo |
| 15:05 |
|
|
kaare left #mojo |
| 15:10 |
|
|
AmeliePoulain left #mojo |
| 15:13 |
|
* garu |
bows |
| 15:14 |
|
garu |
elb0w: yeah, it's backwards :P |
| 15:14 |
|
garu |
elb0w: for the code bits, I advise you browse the original :) |
| 15:17 |
|
elb0w |
yeah im comfurtable with it now |
| 15:17 |
|
elb0w |
its similiar to catalyst |
| 15:22 |
|
crab |
what? dreamhost doesn't allow you to run daemons? |
| 15:23 |
|
|
fhelmber_ joined #mojo |
| 15:25 |
|
garu |
crab: I don't think so |
| 15:26 |
|
garu |
though you can run regular cronjobs |
| 15:29 |
|
omega |
if you run the cronjob often enough, it might just listen once every minute, so some users should get responses? :p |
| 15:30 |
|
crab |
hah |
| 15:31 |
|
|
tholen joined #mojo |
| 15:31 |
|
elb0w |
yeah you arent allowed to |
| 15:31 |
|
elb0w |
I got warnings |
| 15:35 |
|
|
sri left #mojo |
| 15:35 |
|
|
tholen left #mojo |
| 15:35 |
|
bellaire |
what routes match if a bridge returns 0? |
| 15:37 |
|
crab |
bellaire: none |
| 15:38 |
|
crab |
it's up to you to provide some alternative action to perform, i usually call render() and then return 0. |
| 15:38 |
|
bellaire |
ah, ok. |
| 15:38 |
|
|
sri joined #mojo |
| 15:39 |
|
Christian |
nice evening to you all |
| 15:40 |
|
garu |
'evening Christian |
| 15:41 |
|
|
sri left #mojo |
| 15:42 |
|
|
Christian left #mojo |
| 15:42 |
|
|
sri joined #mojo |
| 15:45 |
|
|
mattastrophe joined #mojo |
| 15:46 |
|
|
marty joined #mojo |
| 15:50 |
|
sri |
Test |
| 15:50 |
|
sri |
:-) |
| 15:52 |
|
zipkid |
Fail |
| 15:52 |
|
zipkid |
:-( |
| 15:52 |
|
sri |
pass! |
| 15:52 |
|
perlrocks |
Twitter: "FreeBSD port of Mojolicious has been updated to version 1.1" --skreuzer http://twitter.com/skreuzer/st[…]37539855986597888 |
| 15:53 |
|
sri |
\o/ |
| 15:53 |
|
sri |
yay, my ssd will be delivered tomorrow |
| 15:55 |
|
perlrocks |
Twitter: "www/p5-Mojolicious - 1.1: Update to 1.1 PR: ports/154798 Submitted by: Murilo Opsfelder <mopsfeld... http://bit.ly/gYEPWw" --freshports_org http://twitter.com/freshports_[…]37540557693648896 |
| 15:56 |
|
|
kimoto left #mojo |
| 16:10 |
|
|
tempire_ joined #mojo |
| 16:11 |
|
tempire_ |
What size/how much did you pay? |
| 16:12 |
|
crab |
i paid $2.37 |
| 16:13 |
|
tempire_ |
excellent price for an ssd |
| 16:25 |
|
|
jwang joined #mojo |
| 16:26 |
|
|
GitHub27 joined #mojo |
| 16:26 |
|
GitHub27 |
mojo: master Sebastian Riedel * 01a18b0 (1 files in 1 dirs): fixed typo - http://bit.ly/gR6s2H |
| 16:26 |
|
|
GitHub27 left #mojo |
| 16:28 |
|
sri |
tempire_: http://www.amazon.de/Vertex2-O[…]te/dp/B003NE5JCO/ # this one |
| 16:36 |
|
perlrocks |
Twitter: "f * cking epic fail! # Mojolicious # aspect, and together make a vinaigrette from the circuit and the output gives the full farshmak: (Mlyat! use original way" (ru) --meettya http://twitter.com/meettya/sta[…]37550791409537024 |
| 16:36 |
|
tempire_ |
Mojolicious: fails with vinaigrette circuits |
| 16:37 |
|
sri |
epic |
| 16:37 |
|
bellaire |
mojo is delicious on its own, no need for vinaigrette. especially with tostones |
| 16:38 |
|
perlrocks |
Twitter: "Am I going to have to write my own pastebin clone (with #Mojolicious)?" --obfuscurity http://twitter.com/obfuscurity[…]37551297779466241 |
| 16:38 |
|
yko |
lol |
| 16:38 |
|
yko |
there was at least two pastebins on mojolicious |
| 16:39 |
|
sri |
can't have enough of those :) |
| 16:40 |
|
su-bzero |
"farshmak" ;)) |
| 16:40 |
|
tempire_ |
are there still mojolicious pastebins? |
| 16:40 |
|
tempire_ |
I thought they disappeared |
| 16:40 |
|
yko |
mojopaste by xantus is alive |
| 16:40 |
|
tempire_ |
someone needs to make one that's faster than pastie, and has the twilight theme by default |
| 16:40 |
|
yko |
afaik |
| 16:40 |
|
sri |
at least on github i guess |
| 16:42 |
|
tempire_ |
mojopaste is flashy |
| 16:42 |
|
tempire_ |
but not as pretty as pastie |
| 16:47 |
|
tempire_ |
I think I'm done with corporate america. |
| 16:47 |
|
tempire_ |
I'm thinking of quitting and working on mojolicious plugins all day long. |
| 16:48 |
|
sri |
the path to eternal happiness |
| 16:52 |
|
* sri |
switches back from iterm to the normal mac terminal |
| 16:55 |
|
yko |
ok, here you go one more paste http://epl.korshak.name/e233b3f323e28a87 |
| 16:55 |
|
yko |
all i need - implement sri's color scheme he shown few days ago :p |
| 16:56 |
|
sri |
eww...where is that purple coming from? |
| 16:56 |
|
yko |
you mean on stylesheet? or begin/end? |
| 16:57 |
|
sri |
begin/end |
| 16:57 |
|
purl |
rumour has it begin/end is a "compile time" run, so ... prolly not |
| 16:57 |
|
yko |
oh, that's reserved perl words :p |
| 16:57 |
|
sri |
that's horrible ;p |
| 16:57 |
|
yko |
sri++ |
| 16:57 |
|
yko |
i tod that i need to mplement your color scheme |
| 16:57 |
|
yko |
*told |
| 16:58 |
|
yko |
and made syntax to html a bit verbose |
| 16:58 |
|
yko |
well, 430 lines of code (including all templates) ;P not so bad |
| 16:59 |
|
yko |
with redis as db storage |
| 17:00 |
|
yko |
it should be slow atm because actually it runs vim instance on each highligh request (dont knock me!) |
| 17:00 |
|
* sri |
knocks yko |
| 17:00 |
|
yko |
-_- |
| 17:01 |
|
yko |
i'm thinking about reusing single vim instance as a 'highlighting server' |
| 17:01 |
|
* sri |
wonders why there is no highlighting web service yet |
| 17:02 |
|
yko |
thet's why i started epl highlighter :) |
| 17:02 |
|
yko |
i'm gonna using it as hl service |
| 17:02 |
|
sri |
:) |
| 17:04 |
|
yko |
damn, i <3 mojolicious so much! |
| 17:05 |
|
yko |
(don't tell my gf) |
| 17:17 |
|
crab |
we'll keep your secret if you tell us what this vinaigrette tweet above was really about. |
| 17:17 |
|
sri |
maybe she would love mojolicious too? :o |
| 17:19 |
|
crab |
i had a long conversation with my girlfriend about mojolicious and catalyst once |
| 17:20 |
|
|
fmerges left #mojo |
| 17:21 |
|
yko |
crab: i can't guess. author of that tweet tweets many words. but not much logic to tie them up |
| 17:22 |
|
crab |
weird |
| 17:24 |
|
yko |
actual translation should be like '#mojolicious and #aspect togather make russian salad and produce forshmak. damn...' |
| 17:25 |
|
yko |
s/forshmak/forshmak of closures/ |
| 17:26 |
|
crab |
strange. i know forshmak, but i wonder what aspect is. |
| 17:27 |
|
yko |
in meaning 'strange mix' i believe |
| 17:27 |
|
bellaire |
i'm converting an app from CGI::App::Dispatch to mojolicious now, and i notice mojo doesn't have anything like ->forward (to switch runmodes within a controller). i'm guessing that's a design decision? |
| 17:27 |
|
yko |
oh, aspect. me too |
| 17:27 |
|
crab |
bellaire: yes |
| 17:27 |
|
crab |
bellaire: either write your code so you can call $whatever as a sub, or use a http redirect |
| 18:00 |
|
perlrocks |
Twitter: "[Mojolicious] / mojolicious-no-kyodou http://htn.to/CDbfLX" (sw) --shiba_yu36 http://twitter.com/shiba_yu36/[…]37571890734174208 |
| 18:01 |
|
garu |
first draft of the translation => https://github.com/blabos/Docs[…]tCGI-on-Dreamhost |
| 18:03 |
|
sri |
garu++ |
| 18:03 |
|
sri |
put it into the mojolicious wiki |
| 18:08 |
|
|
spleenjack left #mojo |
| 18:26 |
|
* yko |
wonders if renderer can be async |
| 18:26 |
|
|
mattastrophe left #mojo |
| 18:28 |
|
sri |
yko: what would be the point? |
| 18:29 |
|
sri |
or do you just mean calling render from a callback? |
| 18:31 |
|
sri |
rendering is a cpu intensive task, to make it really async you would need another thread and multiple cpu cores |
| 18:42 |
|
yko |
sroy, was afk. iI thinking about rendering something like pdf by producing it from third-party app using MojoX::Run |
| 18:43 |
|
yko |
just curious if i can build renderer that way or i should render_later from controller |
| 18:44 |
|
yko |
hmm. looks like it's possible actually but can haz side effects |
| 18:44 |
|
yko |
i gonna render pdfs using svg as templates and inkskape as template editor!!! |
| 18:45 |
|
yko |
(inkscape as renderer also :) |
| 18:45 |
|
|
kaare joined #mojo |
| 18:47 |
|
garu |
sri: Mojo::Client->user_agent still works, right? |
| 18:48 |
|
garu |
it's marked "experimental" |
| 18:53 |
|
|
ispy_ joined #mojo |
| 18:54 |
|
garu |
I'm asking because it's still on cpan's Mojo::Client pod |
| 18:55 |
|
sri |
why wouldn't it work? |
| 18:55 |
|
garu |
but when I $foo = Mojo::Client->new->user_agent('bar'), I get Can't locate object method "user_agent" via package "Mojo::Client" |
| 18:55 |
|
sri |
we have lots of experimental features |
| 18:56 |
|
garu |
I know, just trying to figure out what I did wrong here :) |
| 18:56 |
|
sri |
wrong version |
| 18:56 |
|
purl |
rumour has it wrong version is hachi's fault |
| 18:56 |
|
garu |
oh |
| 18:57 |
|
garu |
sigh |
| 18:57 |
|
sri |
https://github.com/kraih/mojo/[…]ojo/Client.pm#L31 |
| 18:57 |
|
sri |
there it is |
| 18:57 |
|
garu |
I should have seen that one |
| 18:57 |
|
garu |
yeah |
| 18:57 |
|
garu |
I'm too slow today |
| 18:57 |
|
garu |
sorry :) |
| 18:57 |
|
sri |
experimental just means stuff might change, but it usually works |
| 18:59 |
|
|
Akron left #mojo |
| 19:00 |
|
garu |
hmm |
| 19:00 |
|
garu |
on max_redirects, 0 means 'infinite', right? |
| 19:01 |
|
garu |
what do I do to make get() fail if it's a redirect? |
| 19:02 |
|
garu |
(other than checking $client->res :P) |
| 19:07 |
|
yko |
Yay! Inkscape has no paragraph implementation atm |
| 19:09 |
|
sri |
0 means none |
| 19:14 |
|
garu |
awesome, just what I needed :) |
| 19:14 |
|
garu |
infinite redirects would be crazy anyway |
| 19:14 |
|
garu |
(see, that's me being slow today =) |
| 19:18 |
|
|
stephen joined #mojo |
| 20:00 |
|
|
MojoGuest911 joined #mojo |
| 20:00 |
|
MojoGuest911 |
From: http://www.google.co.uk/url?sa[…]uzUnHhWcD0vcKNULg (1 hits) |
| 20:01 |
|
|
MojoGuest911 left #mojo |
| 20:05 |
|
omega |
I've been wondering, could the demo thingy do /notice instead? highlights my irssi in a different way :p |
| 20:07 |
|
marcus |
demo thingie? |
| 20:09 |
|
omega |
the bot that joines all the MojoGuestNNN |
| 20:09 |
|
omega |
er, not bot |
| 20:09 |
|
omega |
you know what I mean |
| 20:09 |
|
marcus |
oh, you mean the actual irc client. |
| 20:10 |
|
marcus |
xantus^^^ |
| 20:13 |
|
|
ispy_ left #mojo |
| 20:13 |
|
omega |
yah |
| 20:14 |
|
|
ispy_ joined #mojo |
| 20:16 |
|
|
ispy_ left #mojo |
| 20:22 |
|
|
forwardever joined #mojo |
| 20:23 |
|
|
fhelmber_ left #mojo |
| 21:00 |
|
|
perlite left #mojo |
| 21:01 |
|
|
perlite joined #mojo |
| 21:03 |
|
|
tempire joined #mojo |
| 21:04 |
|
|
tempire_ left #mojo |
| 21:10 |
|
|
Akron joined #mojo |
| 21:12 |
|
bellaire |
is there a helper for rendering json inside a template? |
| 21:13 |
|
|
ispy_ joined #mojo |
| 21:18 |
|
Akron |
bellaire: What do you mean? Something like $c->render('partial' => 1, 'json' => { wow => 'yeah!'}); ? |
| 21:19 |
|
bellaire |
Yeah, that'd work, but I meant (e.g. with TT) [% h.json( some_structure ) %] |
| 21:26 |
|
Akron |
Hm ... well - you could do <%== Mojo::JSON->new->encode($x) %> ... but it's not that good lookng ... ;) But I do not see a use case. |
| 21:34 |
|
yko |
bellaire: why not to bring json into controloler? |
| 21:36 |
|
marcus |
sri: http://pastie.textmate.org/pri[…]ghg4okv17sebjrfkg <- couple of warnings when unicode goes haywire |
| 21:36 |
|
marcus |
they trigger a couple of times in he test suite tho |
| 21:36 |
|
chansen |
bellaire: http://search.cpan.org/dist/Te[…]s.pod#Subroutines |
| 21:37 |
|
yko |
bellaire: actually only 2 mins ago i faced with same problem as you. and first thought was: there should be json helper! |
| 21:37 |
|
yko |
but second was: code => controller! |
| 21:38 |
|
chansen |
bellaire: $vars = { json => \&JSON::XS::encode_json } |
| 21:39 |
|
yko |
oh. looks like checkbox helper doesn't escape it's value! |
| 21:39 |
|
Akron |
yko: Yes. Code should be in the controller. Actually there is, in my opinion, no good reason for a json-Template. |
| 21:46 |
|
yko |
perl -MMojolicious::Lite -e 'print app->check_box("somename" => "some\" haha! \"value")' |
| 21:46 |
|
yko |
:( |
| 21:46 |
|
Akron |
Oh - I am wondering - there is no JSONP plugin out there? |
| 21:48 |
|
chansen |
JSONP? |
| 21:48 |
|
purl |
JSONP is a way to do cross domain calls : http://ajaxian.com/archives/js[…]json-with-padding |
| 21:50 |
|
Akron |
Wrapping json in a named function to run it via <script /> injection with ignoring cross domain policies. Dirty, wonderful hack. ;) |
| 21:53 |
|
Akron |
yko:yko: It seems like _tag isn't escaping ... |
| 21:55 |
|
yko |
just created issue |
| 21:56 |
|
Akron |
yko++ |
| 21:58 |
|
|
tempire_ joined #mojo |
| 22:19 |
|
|
ispy_ left #mojo |
| 22:22 |
|
garu |
http://paste.scsys.co.uk/88463 |
| 22:22 |
|
garu |
can anyone help me? ^^ |
| 22:22 |
|
garu |
res->dom is coming in empty |
| 22:24 |
|
garu |
sigh... I think part of the html is being created by js |
| 22:25 |
|
garu |
that or I'm doing something really really stupid |
| 22:25 |
|
garu |
or... the browser is guessing correctly |
| 22:25 |
|
garu |
yeah, that's gotta be it |
| 22:26 |
|
garu |
cause if I save the file from firefox to the disk and load it via Mojo::DOM->new->parse(), it fills the dom nicely |
| 22:27 |
|
yko |
garu, try download html with wget for example. |
| 22:27 |
|
yko |
firefox can make 'healings' before saving |
| 22:27 |
|
yko |
dom not always able to parse broken pages |
| 22:32 |
|
|
kimoto joined #mojo |
| 22:35 |
|
garu |
sigh... I need a more permissive dom parser :( |
| 22:36 |
|
yko |
well, you can try HTML::TreeBuilder |
| 22:38 |
|
garu |
yeah, I'll give it a try |
| 22:39 |
|
garu |
I was really hoping on being able to do it with mojo::dom's sweetness though |
| 22:39 |
|
yko |
last time i faced such a problem i found bug in html and made pre-fix with regexps |
| 22:40 |
|
yko |
but i was parsing tons of similar pages, not sure such solution is acceptable for you |
| 22:41 |
|
garu |
I'm trying to diff the FF version and the plain version, to see if can manage that before I try HTML::TreeBuilder |
| 22:41 |
|
garu |
I find it really odd that M:DOM doesn't give me a single element though |
| 22:42 |
|
garu |
maybe I don't have a </html> ? |
| 22:42 |
|
yko |
use correct tool for different tasks tasks :) |
| 22:42 |
|
yko |
when i debug such stuff i cut off parts of html and see what happens |
| 22:42 |
|
garu |
good idea |
| 22:43 |
|
garu |
(I do have a </html>) |
| 22:55 |
|
|
forwardever left #mojo |
| 22:55 |
|
|
kimoto left #mojo |
| 22:57 |
|
|
kimoto joined #mojo |
| 23:06 |
|
* tempire_ |
does not like the perl debugger |
| 23:14 |
|
yko |
i don't know anyone ho really does :D |
| 23:14 |
|
Akron |
Were there any changes in 1.1 regarding utf-8? |
| 23:18 |
|
|
kaare left #mojo |
| 23:19 |
|
|
marty left #mojo |
| 23:20 |
|
|
marty joined #mojo |
| 23:29 |
|
|
Exodist joined #mojo |
| 23:43 |
|
|
daviddelikat left #mojo |
| 23:43 |
|
|
kimoto left #mojo |
| 23:44 |
|
|
kimoto joined #mojo |