Camelia, the Perl 6 bug

IRC log for #mojo, 2012-03-06

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

All times shown according to UTC.

Time Nick Message
00:05 rwstauner joined #mojo
00:12 rwstauner i noticed the changelog entry that deprecated hypnotoad conf files, so i moved my old conf to $name.conf and wrapped it in { hypnotoad => $conf }, but it doesn't seem to be picking it up... anybody know what i'm missing?
00:19 jotafer joined #mojo
00:20 rwstauner aha... i wasn't using the Config plugin in my app
00:35 jfernand joined #mojo
00:39 jnap joined #mojo
01:18 scott joined #mojo
01:43 cfedde joined #mojo
01:50 hshong joined #mojo
02:06 mojocasts joined #mojo
02:06 * mojocasts has logged in from twitter, and friggin loves ponycorns!
02:06 vervain joined #mojo
02:06 mojocasts firefox disconnects from eventsource when escape is pressed
02:06 mojocasts :s
02:07 mojocasts but it's fixed. \o\
02:14 crab hmm
02:14 crab this "and friggin loves ponycorns!" thing is something that's echoed automatically?
02:15 tempire yeah.  on connect.
02:48 mojocasts joined #mojo
02:48 * mojocasts has logged in from twitter, and friggin loves ponycorns!
02:57 xaka joined #mojo
03:09 cfedde joined #mojo
03:10 jnap joined #mojo
03:21 cfedde joined #mojo
05:05 tempire whoa
05:05 tempire nice tool: https://chrome.google.com/webstore/detail​/aejoelaoggembcahagimdiliamlcdmfm/related
05:08 tempire even better: https://chrome.google.com/webstore/de​tail/cokgbflfommojglbmbpenpphppikmonn
05:29 ispy_ joined #mojo
05:30 amirite what happens if two plugins have the same name but different namespaces? e.g. if I have a plugin called MyApp::Plugin::Authentication but I also have Mojolicious::Plugin::Authentication installed and I configure the app with "$self->plugins->namespace​s([qw/Mojolicious::Plugin MyApp::Plugin/])" and "$self->plugin('Authentication')"
05:30 amirite which one wins?
06:43 marcus amirite: how do you consider victory?
06:43 marcus amirite: I believe it's definition order.
06:50 mojocasts joined #mojo
07:07 Foxcool joined #mojo
07:15 amirite so I should put MyApp::Plugin before Mojolicious::Plugin
07:15 amirite took a look at Plugins.pm, seems that way
07:15 amirite thanks
07:23 mojocasts joined #mojo
07:49 pfig joined #mojo
07:51 cosmincx joined #mojo
08:03 spleenjack joined #mojo
08:33 cosmincx joined #mojo
08:39 augensalat joined #mojo
08:39 sven^ joined #mojo
08:40 rhaen joined #mojo
09:12 olav joined #mojo
09:17 mojocasts joined #mojo
09:18 mojocasts joined #mojo
09:20 malware joined #mojo
09:23 * irs yawns
09:24 * mojocasts glitters
09:24 olav Hey guys - what would be the mojo-dojo way of logging all json requests and responses to and from my app?
09:26 * marcus sputters
09:28 tempire olav: http://mojolicio.us/perldo​c/Mojolicious/Lite#Logging
09:31 olav tempire: thanks, but where are the strings? When I call render_json fx the contents are output'ed to the client. How do I get it ?
09:32 tempire you would have to create your own strings using Mojo::JSON
09:33 tempire or just dump the perl structures
09:33 olav tempire: well, I could do that, but it would be nicer to have a copy of the actual response.
09:34 tempire you could write a helper/plugin to use a hook
09:35 tempire http://mojolicio.us/perldoc/Mojolicious#hook
09:36 * tempire always forgets about hooks
09:37 * mojocasts hooks tempire before dispatching
09:41 olav tempire: Well, I already have a hook, I guess Ill dump the controller, and see what I can extract
09:43 tempire I haven't done it personally, but I suspect ->res would be populated given the right hook.
09:43 tempire But I did read it on the internet :)
09:45 olav tempire: ah, the internet, amazing stuff :-)
09:45 olav tempire: thanks
09:58 batman joined #mojo
09:59 batman left #mojo
10:24 andrefs joined #mojo
10:42 pfig joined #mojo
10:56 spleenjack joined #mojo
11:27 mojocasts joined #mojo
11:31 irs 2 days without a commit :o
11:46 batman joined #mojo
12:06 d4rkie joined #mojo
12:17 mire_ joined #mojo
12:20 d4rkie joined #mojo
12:22 hshong joined #mojo
12:35 amirite what do i do to have an action render xml if .xml is requested and json if .json is requested
12:35 amirite i.e. i could just render( json => $object ) but that's explicit
12:36 amirite ah n/m
12:36 amirite respond_to
12:36 purl respond_to is, like, supposed to be a step up from the default format handling, format param doesn't seem to fit into that
12:36 vervain There's a respond_to that may help http://mojolicio.us/perldoc/Mojoliciou​s/Guides/Rendering#Content_negotiation
12:37 amirite i thought the method would automatically handle a perl data structure but i guess respond_to requires explicit instruction too
12:37 amirite oh well, /me just uses the render json method
12:43 abra joined #mojo
13:03 crab json is good.
13:03 crab you should give the client json even if it requests xml
13:04 crab over time, xml parsers will grow enough workarounds to parse json
13:04 ispy_ joined #mojo
13:20 jnap joined #mojo
13:20 xxtjaxx crab: interesting sidethought: Step 1: pick your 2 favourite clientside parses one for json one for xml Step 2: code the same app one for jsonrpc one for xmlrpc Step 3: see which ones faster.
13:20 xxtjaxx also: In special cases eg. custom data types, its easier to code it up in XML than json.
13:22 irs doesn't sound interesting at all
13:22 irs json is faster to parse
13:22 xxtjaxx irs: is it? any benchmarks on that with complex data?
13:23 irs common sense
13:23 purl Common sense isn't.
13:23 xxtjaxx irs: invalid
13:25 Netfeed doesn't it depend on if you're using sax or dom for parsing xml?
13:26 irs not to mention verbosity of xml structures
13:28 irs size difference alone will have a significant effect
13:40 SmokeMachine_ joined #mojo
13:53 inokenty joined #mojo
14:19 cosmincx joined #mojo
14:25 ispy_ joined #mojo
14:27 crab common sense is invalid?
14:27 * crab makes notes
14:29 irs no common::sense;
14:32 marcus common sense is certainly rare.
14:33 marcus Le sens commun est fort rare.
14:38 andrefs joined #mojo
14:51 Foxcool joined #mojo
14:51 espent joined #mojo
15:05 black joined #mojo
15:07 mire_ joined #mojo
15:16 kaare joined #mojo
15:18 alnewkirk fyi, the ana.io is a mojolicious/wordpress hybrid powered by apache and hypnotoad
15:19 alnewkirk thanx to all mojo devs
15:26 crab mojolicious/wordpress hybrid. eek.
15:27 alnewkirk crab: wordpress backend manages the content, thats it
15:32 irs http://blogs.perl.org/users/jesse_shy/2012/03/as​ynchronous-http-requests-using-mojolicious.html # oh, this could just as well use an AnyEvent condvar (in case the author is here)
15:34 irs the "performance" difference is prolly dns related, on second iteration it's cached
15:57 xaka joined #mojo
16:33 vel joined #mojo
16:47 sri http://fortaweso.me/font-awesome/ # interesting
16:49 jnap joined #mojo
16:50 cosmincx joined #mojo
17:04 preflex_ joined #mojo
17:06 xaka joined #mojo
17:12 marcus alnewkirk: ana.io gives me a 404
17:12 marcus I considered writing the post Jesse Shy wrote. Glad he did it since I didn't =)
17:20 jwang joined #mojo
17:20 tempire xml is the devil
17:21 marcus tempire: no it's not
17:21 alnewkirk marcus: ? .. maybe a caching issue
17:22 tempire xml makes people disagreeable
17:22 tempire marcus: as a serialization format?
17:24 mojocasts moi has stayed successfully connected for 8 hours with no browser or connection issues
17:24 mojocasts almost ready for an official release!
17:24 * mojocasts dances
17:24 marcus alnewkirk: I've never been there before, not sure how it could be a cache issue. http://nordaaker.com/docs/skitch/ANAIO_%E2%80%94_​Superior_Software_Development-20120306-182408.jpg
17:25 marcus tempire: soap is the devil, xml is just inferior to json =)
17:25 marcus and in some cases it can be useful for sax parsing.
17:25 tempire ok.  I can accept that.
17:25 tempire soap is truly the devil.
17:36 stephan48 is the code for the eventsource irc client on github?
17:36 sri marcus: xml as a serialization format is the devel
17:37 tempire stephan48: not yet
17:38 tempire it will probably be a bit before it is
17:38 sri just like json is worse for structured data like websites and word documents
17:39 stephan48 i am interested in the twitter part how its done
17:39 stephan48 the authorization
17:39 purl the authorization is more of "does this person has access rights to do this"
17:39 stephan48 the session cookie is only signed and not encrypted rigth?=
17:40 sri marcus: the example would be better if it used condvars imo :/
17:40 tempire correct
17:41 stephan48 will it survive browser restart?
17:41 stephan48 i basically want a long lasting signed cookie
17:52 alnewkirk marcus: thats weird
17:52 * alnewkirk starts the investigation
17:56 alnewkirk marcus: can you check again
18:08 marty joined #mojo
18:19 d4rkie joined #mojo
18:22 mercutioviz joined #mojo
18:23 vel joined #mojo
18:29 dog_chocolate joined #mojo
18:44 kanishka joined #mojo
18:54 marcus alnewkirk: now I get a directory index instead
18:59 alnewkirk i fixed it
18:59 tempire stephan48: I'm storing the username in a session - the only way you can get it from twitter is after the authentication.
18:59 pfig joined #mojo
18:59 alnewkirk admin console removed ProxyPass statement and screwed the pooch on me
18:59 alnewkirk marcus: ^
18:59 stephan48 tempire: ah ok so subsequent auths are not performed?
18:59 marcus alnewkirk: yep, works now.
18:59 tempire so whether it survives is up to how you control the session.
19:00 tempire stephan48: correct.  you *could* do that, but it doesn't make much sense, since it's only being used for authentication.
19:00 stephan48 i am planing to do a twitter client
19:01 stephan48 and i would need to store the authorization of the user
19:01 tempire to be honest, I only kind of understand oauth1
19:01 tempire there's two different things - authorization and authentication.  for web sign in, you only use authentication.
19:01 tempire desktop apps are authorization
19:01 tempire I used Net::Twitter::Lite
19:01 tempire but you could just use Net::OAuth directly
19:02 tempire no reason, though.
19:02 alnewkirk marcus: programming ... *sigh* ... who needs it
19:08 pfig_ joined #mojo
19:09 marcus alnewkirk: not me!
19:23 marcus joined #mojo
19:27 marcus alnewkirk: the site looks good, btw.
19:32 andrefs joined #mojo
19:39 alnewkirk marcus: thanx, the wordpress-hybridness is an experiment based on a new client wanting wordpress as a backend with unique content requirements
20:07 fibo joined #mojo
20:20 sri http://www.cpantesters.org/cpan/report​/dd2e3b46-6728-11e1-a6e6-bcfafb698525 # we still have not figured out what goes wrong here
20:21 marcus sri: seems he can't write to /tmp ?
20:21 sri but the original file appears to already exist in /tmp
20:22 marcus sri: why do you think so?
20:22 sri because that's what the test does ;p
20:22 sri https://github.com/kraih/mojo/b​lob/master/t/mojo/asset.t#L120
20:23 marcus sri: I understand it's trying to move it, but why do you think it's already there? I just think it's a fucked up configuration, with an ACL that won't let you rename stuff in /tmp
20:23 sri we already have windows hacks in place, that's what confuses me
20:23 marcus sri: remember, windows doesn't have a unix permissions system.
20:24 sri that would be pretty fucked up
20:25 sri i'm not saying the target file already exists
20:25 marcus windows machines are pretty fucked up 9 times out of 10
20:25 sri just the source
20:28 sri sadly it's the only cygwin report
20:29 sri wait a minute
20:29 sri rwstauner: that report is from you!
20:29 rwstauner oh really?
20:30 sri what's up with the box, restrictive ACL?
20:30 rwstauner hmm
20:30 rwstauner haven't done much
20:30 rwstauner installed cygwin
20:30 rwstauner let me go look at it
20:31 sri the test is actually quite old, never had any problems with it
20:31 mojocasts joined #mojo
20:32 sri only that one box where it fails
20:32 tempire I could use some folks logging into moi and using it for a bit.  Want to make sure it has no errors or glaring usability problems before I announce it.
20:33 * rwstauner runs make test
20:34 sri i've looked through cpantesters and found a few green cygwin reports
20:34 sri http://www.cpantesters.org/cpan/report​/d536dc56-5b1e-11e1-905e-bef26d82c184
20:34 sri that's also from you
20:34 nordmarcus joined #mojo
20:34 nordmarcus YARR
20:34 * nordmarcus is a handsome devil.
20:34 sri rwstauner: something appears to have changed a few weeks ago
20:34 mojocasts joined #mojo
20:35 sri 2-3 weeks maybe
20:35 rwstauner interesting... still failing now... boy there's a lot of crap in /tmp there
20:36 rwstauner oh, you're right
20:36 rwstauner a few weeks back i had to reinstall strawberry perl
20:36 sri around february 25
20:36 rwstauner and everytime i do that i have to make a new windows user
20:36 rwstauner b/c it breaks my msi stuff
20:36 rwstauner and the owner on /tmp is the old user
20:36 sri :D
20:37 alnewkirk sri: we need a line in the Cookbook under mod_proxy explaining to install and enable mod_proxy and mod_security
20:37 sri rwstauner++
20:37 alnewkirk .. im running out the door atm
20:37 rwstauner now let's see if we can fix that
20:37 alnewkirk else I'd contrib
20:46 lukep joined #mojo
20:47 tempire marcus: did you close the browser, or did it disconnect you?
20:52 GitHub44 joined #mojo
20:52 GitHub44 [mojo] kraih pushed 1 new commit to master: http://git.io/YQqL2w
20:52 GitHub44 [mojo/master] added $AUTHORITY to Mojolicious - Sebastian Riedel
20:52 GitHub44 left #mojo
20:53 stephan48 tempire: ye i also planing in using Net::Twitter::lite
20:54 andrefs joined #mojo
20:55 sri hmm
20:55 stephan48 tempire: basically i want users to sign in with twitter and then being able to use it as client and then being able to delegate access to other accs which then can use their account and send from it without ever needing the creds
20:55 sri so repo admins can edit any ticket and nobody will ever know
20:56 stephan48 in github?
20:56 * sri just fixed a typo in marcus comment... not sure if that's a sensible thing to do
20:56 stephan48 ohoh. surely not.
20:57 stephan48 what does $AUTHORITY actually do?
20:57 stephan48 wont that flag releases from f.e. crab as invalid on cpan?
20:57 sri it's a pause fix for permissions
20:58 sri otherwise if new files get added and crab is the first uploader he would get first-come permission to the namespace
20:58 sri i'm just not sure if it actually works yet
20:58 sri or if it's just being used preemptively
20:58 sshaw joined #mojo
20:59 stephan48 ah, so with the var you will get the perms?
20:59 sri only if it works
20:59 stephan48 ah ok
21:00 sri i still remember what a huge mess catalyst permissions were, would be nice if it worked
21:00 stephan48 i can imagine
21:01 stephan48 a mojo session cookie is retained over browserrestarts?
21:05 sri damn, $AUTHORITY does in fact not appear to do anything :(
21:06 rwstauner i thought $AUTHORITY was a perl6 thing that some people do now to be future-proof
21:07 mercutioviz joined #mojo
21:12 sshaw is there a reason why mojo replies to requests using the wrong HTTP method with a 404 instead of a 405?
21:16 perlite joined #mojo
21:19 GitHub24 joined #mojo
21:19 GitHub24 [mojo] kraih pushed 1 new commit to master: http://git.io/bkmxcg
21:19 GitHub24 [mojo/master] fixed small caching bug in Morbo file watcher - Sebastian Riedel
21:19 GitHub24 left #mojo
21:23 vervain sshaw: You should probably handle that explicitly... and set the Allow header: http://pastie.org/3536544
21:28 nuba joined #mojo
21:29 sshaw vervain: i thought i did when i said: $route->get('/') :^)
21:31 vervain Ya... I understand what you are saying.
21:33 rwstauner sri: weird... I can only get t/mojo/asset.t to pass if i add `close $tmp->handle` before the move_to()
21:33 rwstauner i got the idea from the "Windows" comment in the move_to sub that does the same thing to $self
21:34 sri rwstauner: oh, that makes sense
21:34 sri but it's still weird
21:34 sri that test passed before
21:35 rwstauner yeah, don't know what to say other than that the setup (win and/or cygwin) is just messed up
21:35 sri wait, that makes no sense after looking at the test
21:36 * sri scratches head
21:36 rwstauner both files exist before the move
21:36 rwstauner i tried making two files and using File::Copy::move to rename one on top of the other and don't get an error
21:36 rwstauner but the test file does
21:36 rwstauner and if i close $tmp->handle it succeeds
21:36 * rwstauner shrugs
21:37 sri i'm actually not sure if that test behavior is intended
21:40 rwstauner i can try to reinstall cygwin later and see if it makes a difference
21:43 sri i'll make the test better
21:46 GitHub132 joined #mojo
21:46 GitHub132 [mojo] kraih pushed 1 new commit to master: http://git.io/wZzXCg
21:46 GitHub132 [mojo/master] fixed Windows bug in asset.t and added support for MOJO_LISTEN environment variable - Sebastian Riedel
21:46 GitHub132 left #mojo
21:46 sri rwstauner: that should work
21:49 rwstauner ok, cool
22:06 stephen joined #mojo
22:24 marcus I just heard from a friend that he US uses Hybrid IRC and Mirc to control their bomb planes. :/
22:24 marcus the US
22:25 * tempire bombs norway
22:25 marcus you'll regret that when we stop exporting our lutfisk!
22:25 fibo_ joined #mojo
22:25 marcus or maybe not.
22:26 sri you'll regret that once norway increases lutfisk exports!
22:27 marcus yes!
22:28 jamesw joined #mojo
22:34 tempire I don't understand the diff between the useragent delay syntax, and the syntax used on jesse shy's post,
22:35 sri delay helps syncing multiple requests
22:35 tempire oh, I guess delay blocks until they're all finished
22:35 sri right
22:35 sri or emits the event
22:36 tempire "or emits the event"
22:36 tempire ?
22:36 sri you don't want to block a Mojo::Server::Daemon based server
22:36 sri there you just use the event/callback
22:37 sri syncing without blocking in that case :)
22:37 sri http://mojolicio.us/perldoc/Mojoliciou​s/Guides/Cookbook#Backend_web_services
22:37 sri second example
22:37 purl second example is truncated
22:38 sri http://mojolicio.us/perldo​c/Mojo/IOLoop/Delay#finish # internally it's all this
22:41 * sri hopes he didn't confuse tempire
22:42 sri the code is actually so ridiculously simple that you might want to take a look :)
22:42 sri https://github.com/kraih/mojo/blob/​master/lib/Mojo/IOLoop/Delay.pm#L11 # it's all just a counter
22:42 tempire that's the delay.
22:43 stephen joined #mojo
22:43 tempire mojolicio.us doesn't have a view source.
22:43 * tempire args
22:47 mire_ joined #mojo
23:04 jnap_ joined #mojo
23:25 pfig joined #mojo
23:47 t4nk658 joined #mojo
23:56 t4nk658 Hello! Got a mojo user-agent question. I'm wondering how I can access properties with the user-agent. In this case, I have found a list of <category> elements with the find() function. Some <category> elements have label="Text" properties, and I'm wondering how I can access those? Simple example: http://pastebin.com/KbHcLeRM

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