Camelia, the Perl 6 bug

IRC log for #mojo, 2012-09-02

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

All times shown according to UTC.

Time Nick Message
00:56 sawtooth joined #mojo
01:21 xaka joined #mojo
01:24 asarch joined #mojo
02:01 xaka joined #mojo
02:04 azawawi joined #mojo
02:08 yuni joined #mojo
02:15 yuni joined #mojo
02:32 noganex joined #mojo
02:36 xaka1 joined #mojo
06:02 Vandal joined #mojo
06:09 memowe joined #mojo
06:12 mayfield_ joined #mojo
06:13 dross joined #mojo
06:13 jamesw joined #mojo
06:14 perlite joined #mojo
06:15 Antisoche joined #mojo
06:29 davido joined #mojo
06:31 davido The documentation for Mojolicious::Lite still points to Mojolicious::Plugin::TagHelpers for content_for, but I believe that function now falls under Mojolicious::Plugin::DefaultHelpers
06:38 yko joined #mojo
07:12 marcus good morning, party people
07:33 crab hi marcus
07:34 Polarn joined #mojo
07:35 good_news_everyone joined #mojo
07:35 good_news_everyone [mojo] amenonsen pushed 1 new commit to master: http://git.io/ZFDuGA
07:35 good_news_everyone [mojo/master] content_for has moved to ::DefaultHelpers (thanks, davido) - Abhijit Menon-Sen
07:35 good_news_everyone left #mojo
07:38 crab i wonder wtf github changed its nick to good_news_everyone
07:49 williamt joined #mojo
07:59 d4rkie joined #mojo
08:11 Leandr joined #mojo
08:32 davido joined #mojo
09:17 ryozi joined #mojo
09:29 tolid_air joined #mojo
09:43 azawawi joined #mojo
10:02 marcus crab: that's almost certainly sri's work
10:03 marcus crab: you can setup the bot nick in the admin section of the repo.
10:05 marcus crab: http://cdn.memegenerator.net​/instances/400x/23283515.jpg ?
10:35 themage joined #mojo
10:53 rem_lex| joined #mojo
11:02 mire_ joined #mojo
11:22 asarch joined #mojo
11:42 mpneves joined #mojo
12:03 dross crab: no professorlike line after that huh? :/
12:26 xxtjaxx Hi! I think something in Debian either broke IO::Socket::INET or Mojolicious use of it in IOLoop::Server.pm line 105 see paste: http://paste.debian.net/187189/ The result I got was undef twice
12:36 buu xxtjaxx: At the risk of being obvious, you don't have Reuse set?
12:38 xxtjaxx buu: Which reuse?
12:39 xxtjaxx port reuse? I dont know where I could have set that.
12:39 * sri yawns
12:39 xxtjaxx sri: Morning.
12:40 * sri waves
12:43 xxtjaxx buu: I dont understand the question sorry.
12:55 xxtjaxx buu: There is no TIME_WAIT state either...
12:59 xxtjaxx buu: ah! For some reason lo was not set == no loopback device == no 127.0.0.1 == nothing to bind to... what the hell
13:04 sri crab: don't think content_for ever moved, the link was just wrong ;)
13:35 arthas joined #mojo
13:39 gryphon joined #mojo
14:02 Antisoche joined #mojo
14:06 azawawi http://code.google.com/p/mojoli​cious-plugin-pedro/source/list
14:07 azawawi nearly on pedro 0.07... new cool UI coming up... preparing a release
14:20 sri azawawi: there is still nothing to look at
14:21 * sri would expect at least a screenshot for an editor
14:26 Britzel joined #mojo
14:32 azawawi cpanm http://cpan.metacpan.org/authors/id/A/AZ/AZ​AWAWI/Mojolicious-Plugin-Pedro-0.07.tar.gz
14:35 azawawi pedro  # and then open http://127.0.0.1:3000/pedro in your favourite modern browser
14:37 sri azawawi: please don't spam installation instructions for every new release
14:37 azawawi sri: ok... i was just excited
14:38 azawawi sri: you're 100% right
14:39 azawawi sorry
14:39 inokenty azawawi: Can you add hotkeys?
14:40 azawawi inokenty: like?
14:40 sri it's ok, would just get quite spammy here if it became a trend ;)
14:41 azawawi sri: true
14:42 inokenty azawawi: Like F7 to run code
14:42 azawawi inokenty: yes we can add hotkeys but the problem it wont be 100% perfect on all browsers...
14:43 azawawi inokenty: i think I can add a keybinding dialog for that though
14:43 sri github has hotkeys, and it seems to work rather well
14:44 azawawi i was talking about the codemirror editor component atm...
14:45 azawawi try Ctrl-O binding for example...
14:45 sri ah
14:45 azawawi Ctrl-N
14:45 azawawi Ctrl-Shift-T
14:45 azawawi ...etc
14:47 azawawi http://code.google.com/p/js-hotkeys/wiki/about
14:49 azawawi im actually thinking of whether to keep it as a plugin or go as a full app...
14:49 azawawi like galileo
14:50 azawawi and there is also the issue of having a PPI-backed syntax highlight mode
14:51 azawawi whatever js can do, it wont be 100% correct as PPI is.
14:51 azawawi and PPI-ing the document at certain times gives more information about its structure and hence faster inline refactoring support
14:56 azawawi Mojo question please, how can i remove predefined mojo commands?
14:57 azawawi e.g. i dont need cpanify, test
15:03 sri app->commands->namespaces(['MyApp::Command']) and subclass the commands you want
15:13 marcus hmm
15:13 bpmedley joined #mojo
15:15 marcus sri: I bought sketch now that it's on sale.
15:15 * sri loves sketch
15:17 marcus it's pretty great.
15:25 sri hmm, no sublime updates in over a month
15:25 sri and the forum is full of spam
15:37 davido joined #mojo
15:44 bpmedley joined #mojo
15:50 crab what's sketch?
16:01 batman http://docs.dotcloud.com/0​.4/guides/daemons/#caveats <-- guess i won't be able to run hypnotoad after all :/
16:02 batman "You can write daemons that listen on TCP or UDP ports but you will not be able to reach them over the Internet or from another DotCloud instance"
16:07 sri crab: http://bohemiancoding.com/sketch/
16:14 xaka joined #mojo
16:23 fibo joined #mojo
16:30 asarch joined #mojo
16:30 sri batman: that sucks
16:30 purl The rock is now off.
16:30 batman sri: yeah. i tweeted them. looking forward to the reply...
16:31 sri heroku > dotcloud
16:31 batman don't get why they are mentioning "run a specific web server, like Node.js or Tornado;" in the intro
16:31 batman i like dotcloud's pricing better :P
16:31 sri i would expect that they give you a tcp port to use via env var, like heroku does
16:32 batman will check that...
16:34 * sri likes listening to the bsg soundtrack while hacking on binary protocols :)
16:39 d4rkie joined #mojo
16:40 mikegrb joined #mojo
16:45 crab sri: do you have any apps on heroku?
16:45 sri nothing serious
16:46 mikegrb joined #mojo
17:01 mire_ joined #mojo
17:02 asarch joined #mojo
17:08 CromeDome joined #mojo
17:14 marcus just porn
17:38 osprey_ joined #mojo
17:41 osprey_ hi
17:42 osprey_ sri: Do you remember yesterday proxy is_finished problem?
17:43 osprey_ I found that some useragent with some proxy  return is_finished even stuff is partial downloaded
17:43 osprey_ I use $tx->is_finished
17:47 bpmedley_ joined #mojo
17:48 sri osprey_: vaguely, but odds are you're just misunderstanding something and it's not a bug
17:50 osprey_ I need some test unit for proof :)
17:51 osprey_ maybe I need $tx->res->content->is_finished no $tx->is_finished?
18:03 mollusk joined #mojo
18:05 Netfeed if i have a config in my startup method, how can i access it in a has within that object?
18:05 mollusk again apologies for the silly questions, but now I have a small app that is rendering "get /" from index.html.ep just right, but I want to style this with a CSS file and that fails with not found.  Should I define a route for the CSS file so that 'get /style.css' works?
18:06 inokenty mollusk: Put you .css file input 'public' directory
18:06 inokenty s/input/into/
18:06 bpmedley joined #mojo
18:07 mollusk thanks!
18:29 osprey_ sri: Yes, If I download large file via slow proxy (for example i2p localhost:4444) I got tx->is_finished even file is not full
18:30 osprey_ tx->res->content->is_finished is false
18:39 abra joined #mojo
18:39 hipyhop joined #mojo
19:08 sri Netfeed: app->config
19:08 purl well, app->config is a hash of my config... App->config-{home} is my home dir, you just s/// the relevant config items or you could go iterate through them all
19:12 Netfeed sri: alright, thank you
19:47 hipyhop left #mojo
20:27 batman https://gist.github.com/3604260 <-- thinking about releasing this to cpan + Mojolicious::Plugin::Facebook
20:27 batman any comments?
20:27 purl i heard any comments was appriciated =) or punt!
20:29 sri batman: $res seems a little misleading, i was expecting a Mojo::Message::Response
20:30 sri also, why do you pass $tx as a separate argument?
20:30 batman i pass on $tx in case $res is undef.
20:30 batman any other suggestion on how to check for error?
20:31 sri i like error as first argument convention
20:31 sri my ($fb, $err, $res) = @_;
20:31 batman my($delay, $error, $json) = @_; ?
20:31 batman ok
20:31 sri or of course $res->{error}
20:32 sri i generally do first argument or attribute of the response
20:32 batman hm... not sure if i like mixing error inside a result
20:32 sri it's like $tx->error
20:32 sri the beauty of it is that collecting responses from parallel requests doesn't get awkward
20:33 sri my ($fb, $err1, $res1, $err2, $res2...)
20:33 batman what if i just pass on $tx->res instead of ($json, $tx) like i do now?
20:33 sri i would consider that ugly ;p
20:33 sri but it's up to you
20:33 batman then i can do $res->error or $res->json
20:33 batman why is that ugly?
20:34 sri because $tx->res->json
20:35 sri you end up with a mix of fb client and normal user agent
20:35 batman not $tx. just $tx->res
20:35 sri i would always design the api to look self contained
20:35 batman print $res->error || $res->json->{name}
20:35 sri but if you're ok with mixing
20:36 batman it's pretty hard coupled already... :/
20:36 batman and facebook respond with both HTTP status codes and error messages, so i would not like to hide that from the end user imo
20:36 sri perhaps you should have a custom response object
20:37 batman i can add a disclaimer: the $res object may change without warning ;)
20:38 batman guess returning a hash wouldn't be all bad
20:39 batman ok. i'm converting to \%hash as a single return value. then i ship it :)
20:40 batman warn $res->{error} || $res->{name};
20:46 * dross yawns
20:46 dross mojo is sort of what I wish I had 5 years ago for ruby :/
20:46 batman :D
20:46 batman please tweet it, and i will retweet you :)
20:47 dross :3
20:47 batman https://gist.github.com/3604260 <-- updated it now with just one $res
20:48 dross (actually, I've been using ruby for 7-9 years I guess, though I always managed to get shit done in Python/Pylons)
20:48 batman sri: did you have any other objections to the api?
20:48 sri if i had i would have said so ;p
20:49 batman sweet! wasn't sure if you bothered to read it all :)
20:49 dross https://twitter.com/wolfeon​/status/242363448334368769
20:49 sri i didn't read everything
20:49 dross (straight from a devop who loves programming) :3
20:49 dross *cough* and ethical hacking
20:50 batman :)
20:50 batman sri: that's fine. thanks for the feedback.
20:50 dross sad how a few gestures of hacking an app at work which we develop will make people view you as nafarious
20:50 batman i find it quite funny how little code i had to use with mojo, compared to https://metacpan.org/module/Facebook::Graph :)
20:51 dross facebook and a graph o.0
20:51 dross oh
20:51 sri batman: and yours is non-blocking :)
20:51 batman indeed it is!
20:53 * sri is still unsure about the whole error as first argument convention
20:53 sri guess now that delays can capture arguments in order it's not really a big deal
20:53 batman you want ($fb, $err, $res) instead of ($fb, $res) ?
20:54 sri my worry is always multiple requests in one delay
20:54 sri ($fb, $res1, $res2)
20:54 sri vs ($fb, $err1, $res1, $err2, $res2)
20:55 batman yeah. i think the first is a lot nicer
20:55 sri it could also be ($fb, $err1, $res1, $tx1, $tx2, $err2, $res2)
20:55 sri :)
20:55 sri if you also made two normal requests in between
20:57 sri but there are apis where error as first argument just make more sense http://mojolicio.us/perldoc/Mojo/IOLoop#client
20:57 batman https://github.com/jhthorsen/mojo-facebook <-- deleted the gist and created a repo
20:59 sri batman: is the callback required or optional?
21:00 sri i think you could just do __check_response($ua, $ua->start($tx)) unless $cb; :)
21:01 sri no wait, you can't
21:01 sri but something similar ;p
21:01 batman it's required. i was thinking about making the module both blocking and non-blocking, but then i though: why bother? :P
21:01 sri or maybe you can xD
21:01 batman yeah, you can :)
21:01 sri we have very examples or hybrid modules like that
21:02 sri *very few
21:02 sri *for
21:02 sri eeep...
21:02 batman it was hybrid ten minutes ago :P
21:02 batman but i removed it
21:03 sri the new delay api makes callbacks look too good? ;p
21:03 batman indeed
21:03 batman :)
21:28 dross client certificate auth helper, hmm
21:29 dross well that's sort of pointless, heh
21:30 dross (Mojolicious::Plugin::SslAuth)      people should be using a frontend for all their enterprise load balancer or even an nginx frontend, doing the SSL Auth, CRL, etc from there.
21:30 osprey_ left #mojo
21:31 dross D: I've fallen in to Enterprise Application programming and I can't get up
21:31 dross (aka internal apps)
21:32 sri dross: there are exceptions, like protocols these load balancers don't understand yet
21:33 dross sri: :) as a devop, I work with quite a bit of systems, including doing all the network engineering work
21:33 dross regarding load balancers, I can tell you it's easy to set up a VM for load balancing apps, and to not is just pure laziness
21:34 sri how do you terminate TLS websockets?
21:35 dross :3 nginx
21:35 sri umm
21:35 dross there's a module for TCP proxying
21:35 dross (not in nginx by default)
21:36 dross :< okay I might do a bit more patching and module adding than most. People just need to RTFS :)
21:39 lukep joined #mojo
21:41 sri so because you can patch nginx to do tcp forwarding a simple authentication plugin that just works is pointless... mmmkay
21:43 dross hmm
21:46 sri i wouldn't recommend using, but it's not pointless
21:47 sri *+it
21:48 sri in fact, i'm rather disappointed with websocket support in nginx, it has been at the bottom of their todo list for quite some time now
21:48 dross :( I'm sure it will get better
21:49 sri they've implemented spdy before websockets...
21:49 dross I usually connect in with ipsec for my internal apps anyway
21:49 sri spdy is years away from a real spec!
21:49 dross sri: hey, it's a way to introduce people to it
21:49 dross even though they should've written support for ws before spdy
22:13 sri ipsec aka what's holding back ipv6 adoption
22:13 * sri grabs his pitchfork!
22:14 dross :o
22:14 dross well you know what, people better hurry and implement IPv6 support for all the IPSec stacks
22:15 dross I mean, I think Cisco IOS had the support for years now
22:15 dross strongswan has also supported it
22:17 dross I wonder what other perl ORMs have optimistic locking with versioning (or plugins available)...
22:17 dross DBIx-class has a module for it
22:22 sri which reminds me to irc less and hack more on the mongodb driver :)
22:22 dross :)
22:22 dross sri: is the drive for anything specific or just a pure perl driver?
22:22 dross *Driver
22:22 sri also non-blocking
22:23 sri and i'm trying to make bson types more fun to use... which will take some trial and error
22:24 sri it will be a blocking/non-blcking hybrid like Mojo::UserAgent
22:27 sri what's holding me back is mostly bad protocol design :S
22:28 sri getLastError and the capped collection delay are annoying problems
22:29 dross heh, actually got around to watch the mojolicious webcasts... I'm surprised the person doesn't sound like a complete nerd like most webcasts
22:29 sri tempire++
22:29 dross though, I'm also an outlier, people mistake me for a police officer or security guard in person and in voice
22:30 dross "I'm a sys admin who loves to program" (person not believing me)
22:30 sri citizen, pick up that can!
22:36 dross hmm
23:03 jzawodn joined #mojo
23:41 memowe joined #mojo

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