Camelia, the Perl 6 bug

IRC log for #mojo, 2012-05-22

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

All times shown according to UTC.

Time Nick Message
00:31 mire joined #mojo
00:40 tempire OMG
00:40 tempire https://fbcdn-sphotos-a.akamaihd.net/hph​otos-ak-ash4/s720x720/292665_10150914044​864643_509189642_9754180_223709540_n.jpg
00:43 mikegrb \o/
00:55 jnap joined #mojo
01:07 xaka joined #mojo
01:08 scott joined #mojo
01:58 d4rkie joined #mojo
02:48 sri OMG
04:55 spleenjack joined #mojo
05:15 Leandr joined #mojo
05:55 Foxcool joined #mojo
06:34 pau4o joined #mojo
06:37 Vandal joined #mojo
06:43 pau4o joined #mojo
06:45 pau4o joined #mojo
06:45 ladnaV joined #mojo
06:46 pau4o joined #mojo
06:47 pau4o joined #mojo
06:52 Vandal joined #mojo
06:56 pau4o joined #mojo
07:00 marcus woot
07:04 MisterHatt hurf
07:04 MisterHatt I guess Mojo::Message->json doesn't work how I thought it did
07:04 dbr joined #mojo
07:06 pau4o joined #mojo
07:07 MisterHatt so if I'm receiving a JSON body in a request and I want to read it into a hash, where nested data is just nested in the hash and any sets are added as arrays, my $data = $self->req->json; doesn't work
07:07 MisterHatt suggestions on how to actually go about doing that?
07:08 MisterHatt I've read over the docs but from the Mojo::JSON docu it looks like it should jsut return the hash as I'd expect
07:12 marcus MisterHatt: what does it return? :o
07:13 batman joined #mojo
07:14 judofyr joined #mojo
07:17 MisterHatt marcus: not too sure tbh
07:17 MisterHatt I'm assuming a Mojo::JSON object but just going by perl -c output on my code
07:23 marcus MisterHatt: https://gist.github.com/2767319 methinks you are wrong.
07:24 MisterHatt quite possibly
07:25 MisterHatt ah, so it's raw JSON string
07:25 MisterHatt or, no
07:28 MisterHatt so it is a hash then
07:28 marcus yes, it's the deserialized representation of the json string I sent in...
07:29 marcus if I sent "[ 'boobs', 'ok',]" it would be an array
07:29 MisterHatt right
07:31 MisterHatt so then, for example, my $data = $self->req->json; foreach (keys $data) { say $_ }
07:31 MisterHatt I get Type of arg 1 to keys must be hash or array (not private variable)
07:32 MisterHatt but if it's a hash representation of such, then it should be fine
07:32 judofyr MisterHatt: keys only work on hashes, not a hashref
07:32 judofyr MisterHatt: foreach (keys %$data) { … }
07:32 MisterHatt yeah
07:32 MisterHatt that makes more sense
07:33 tempire also, foreach is unnecessary.  just use for
07:33 MisterHatt I like foreach to make it clearer
07:33 marcus MisterHatt: which perl ?
07:33 MisterHatt 5.14.2
07:34 marcus should deref $data automagically then.
07:34 MisterHatt ugh
07:34 MisterHatt I see what happened
07:35 MisterHatt old terminal window from before I switched my main perlbrew'd perl to 5.14.2
07:35 * marcus starts a brew of 5.16.0
07:36 GitHub46 joined #mojo
07:36 GitHub46 [mojo] kraih pushed 1 new commit to master: http://git.io/HBQiRg
07:36 GitHub46 [mojo/master] better JSON method descriptions and examples - Sebastian Riedel
07:36 GitHub46 left #mojo
07:39 pau4o joined #mojo
07:39 MisterHatt marcus: opened new terminal, ran test again, it all works now
07:39 MisterHatt :perlbrew:
07:40 judofyr \o/
07:40 MisterHatt and that's what I get for leaving terminals open for months
07:45 marcus help?
07:45 purl #perl is not a help channel, and I'm not a help bot.  If you want Perl help, try #perl-help or #metallica. or (see the 'help channel' factoid as well)
07:45 marcus purl: stab you!
07:45 purl marcus: i'm not following you...
07:45 MisterHatt marcus: that, and old brews lying around the place
07:46 Mad_Dud_ joined #mojo
07:48 Mad_Dud_ hi guys, could someone tell me what am i doing wrong with a session in mojolicious::lite? i'm doing as it's said in mojocast #4 on perl-mojolicious-2.95-1 and the session is not passed between get requests.
07:50 Mad_Dud_ i don't see any cookie with the session id on the client side
07:56 batman Mad_Dud_: i think that will be extremely difficult without seeing any code
07:56 batman also it would be nice to know which client you are using
07:57 Mad_Dud_ sure, do we have any specific paste or pastebin.org is fine to you?
07:57 batman fine by me
07:58 batman i usually use gists, but it's same to what you decide to use :)
07:59 batman *to me
08:01 Mad_Dud_ client is opera and chrome http://pastebin.com/dWtaAPyB
08:02 cosmincx joined #mojo
08:02 batman so you're using the chrome inspector to see the request/response?
08:03 batman like pressing F12 in chrome, go to the "Network" tab and look at the request for "/" ?
08:05 batman is there some evil hack i can do to pass %2F as %2F instead of / from client to server?
08:13 brambles joined #mojo
08:14 fhelmber_ joined #mojo
08:19 kvorg joined #mojo
08:20 kvorg Hello. In my ignorance I seem to be unable to set up my full Mojolicious app to use I18N plugin properly.
08:20 kvorg Can anyone show me some simple example apps? I can't seem to understand the tests, sadly.
08:22 MisterHatt I thought the docu for that had an example
08:26 Mad_Dud_ re. i checked "inspect element" in chrome to look for cookie or session content, but nothing in in there
08:27 Mad_Dud_ where does morbo store session data?
08:27 Mad_Dud_ /tmp?
08:27 purl well, /tmp is the thing that has different quotas.
08:27 kvorg of course there is an example, but it is a bit terse for people like me, who need brain pounding to understand.
08:28 Mad_Dud_ i have nothing related with "mojo" or "session" in /tmp (arch linux)
08:28 kvorg so i would be happy if anyone has an example with actual files and lexicons etc. perhaps squirreled on github.com somewhere?
08:28 MisterHatt kvorg: vti wrote an example app a while back, maybe check his blog
08:28 MisterHatt or, I believe Cosimo's blog on Opera has a good example of how he uses it too
08:29 MisterHatt kvorg: http://my.opera.com/cstrep/blog/2011​/08/29/internationalization-i18n-wit​h-mojolicious-and-template-toolkit
08:31 AmeliePoulain joined #mojo
08:34 kvorg ty, looking at it now
08:35 kvorg in the mean time, i had a wierd time-travel like experince with vti's blog, and indeed I have overlooked this:
08:35 kvorg http://showmetheco.de/articles/2010/5/buildin​g-multilingual-website-with-mojolicious.html
08:35 kvorg i must have been dead in may 2010 :-)
08:36 ok joined #mojo
08:46 kvorg aaaaah, I am a moron. after happily reading lenghty explanations of exaclty what the Mojolicious doc's say, I finally noticed the problem was me using the wrong language tag ...
08:47 kvorg btw, is the decision to deprecate I18N still standing? i have some minor ideas but now don't know if pathches are welcome
08:48 daxim joined #mojo
08:50 kvorg purl: is I18N about to be deprecated?
08:59 GabrielVieira2 joined #mojo
09:07 GabrielVieira joined #mojo
09:09 sri maybe
09:09 sri i tend towards putting it into a separate distribution though, if we find a maintainer
09:10 sri also, what is wrong with this example? http://mojolicio.us/perldoc/Mojolicious​/Guides/Rendering#Internationalization
09:12 Akron joined #mojo
09:13 Akron Mad_Dud_: Works fine here. But for testing cookies, setting the secret is important, or the result is not predictable!
09:14 sri predictable but insecure
09:14 GabrielVieira2 joined #mojo
09:15 sri https://github.com/kraih/mojo/issues/330 # maybe someone else wants to add something?
09:17 Akron sri: I thought the secret is newly generated then, each time morbo starts - no?
09:17 sri don't think so
09:19 sri https://github.com/kraih/mojo/bl​ob/master/lib/Mojolicious.pm#L29
09:19 Akron sri: Ah, just saw it. Okay, sorry then.
09:20 sri no need to be sorry, encouraging people to change the secret is always right :)
09:20 Akron :)
09:30 GabrielVieira joined #mojo
09:37 GabrielVieira joined #mojo
09:47 GabrielVieira joined #mojo
09:59 GabrielVieira joined #mojo
10:10 GabrielVieira joined #mojo
10:11 memowe Java: a comitee with the question: what is the most user-unfriendly way to do X?
10:20 GabrielVieira joined #mojo
10:26 sri Java: How can we make it more verbose?
10:27 sri as much as i hate Java as a language, the jvm is still pretty damn impressive
10:30 * judofyr loves JRuby
10:30 * judofyr silently sneaks Ruby into banking stuff thanks to JRuby
10:31 rem_lex|pivo joined #mojo
10:33 MisterHatt hmm, is it possibly to completely disable automated rendering of templates?
10:33 MisterHatt for example, 404 html templates when I only want to be returning JSON
10:33 MisterHatt short of providing my own JSON templates that is
10:34 pau4o joined #mojo
10:43 marcus judofyr: i thought we agreed to use clojure this time? ;)
10:43 sri it's so annoying how the first question in a discussion about a new perl 5 release is always "what's the status of perl 6?" :S
10:43 judofyr ah, right
10:44 sri maybe we need a catchy standard response...
10:45 sri like "perl 6 is not the future of perl 5, like the D programming language is not the future of C."
10:46 marcus I thought D was the future of C.
10:46 sri and F# is the future of C#? :D
10:46 Patterner isn't D just C++ in short..?
10:54 MisterHatt sri: "perl 6 is not the future of perl 5, like a parrot isn't the future of a camel"
10:54 MisterHatt substitute butterfly for parrot or onion for camel as required
10:55 GabrielVieira joined #mojo
10:57 sri kvorg: maybe you want to adopt the I18N plugin?
10:59 Foxcool joined #mojo
11:11 sri hmm
11:11 sri D is bigger than Scala and Haskell :o
11:28 GabrielVieira joined #mojo
11:30 MisterHatt really? I would not have expected that
11:32 judofyr "bigger"? how so?
11:33 sri in meaningless statistics ;p
11:35 sri i'm not even gonna say the name of the company that made it...
11:38 sri eeeeep
11:38 sri even perl.org links to tiobe :S
11:39 daxim from 2006
11:42 sri gartner says there will be 4 million ruby programmers by 2013, wonder if they also have perl stats
11:54 whee I'd better get started learning logo or vb.net, those are taking off
11:55 sri !
11:56 sri poor lua
11:57 whee redis will fix its meaningless ranking :)
11:58 MisterHatt I wonder when Riak is going to get a less stupid accessor setup
11:58 MisterHatt Redis is so much easier
11:59 MisterHatt also, js/erlang vs lua, why cant it being a more useful internal scripting setup ugh
12:01 sri i want to like riak... but it's not fun to work with at all
12:02 MisterHatt pretty much yeah
12:02 MisterHatt I'm in a weird position of having to choose between riak and cassandra
12:02 sri i want to hate mongodb... but it's so much fun :S
12:02 MisterHatt cassandra being annoying to admin and riak being super annoying to actually use
12:02 MisterHatt I never got mongo
12:03 MisterHatt probably because I suck at json but it just never clicked for me
12:07 MisterHatt sri: why DO you wanna hate it anyway?
12:08 MisterHatt I dont recall you being one to hate on principal, although I totally agree
12:11 vervain joined #mojo
12:12 judofyr I hate hate on principal
12:17 sri mongodb is a devops nightmare
12:21 judofyr I kinda like having a strict schema (at least in 90% of the cases). it's a good reminder so I don't fuck up some data.
12:22 GabrielVieira joined #mojo
12:24 * sri disagrees about schemas
12:25 judofyr in the 5% other cases, it's very nice having a dynamic schema, but most of my collections/tables do actually have a strict schema…
12:25 sri schema changes suck way too much
12:25 judofyr they still suck in MongoDB
12:26 judofyr Mongo doesn't make migrations cease to exist
12:26 sri it can
12:27 sri you just need to handle missing keys in old documents gracefully
12:27 judofyr well, then you can accomplish the same in *SQL by not adding a NOT NULL constraint
12:27 sri you still have to alter table
12:28 judofyr sure, and that should be a oneliner + running one command
12:28 judofyr I think the data integrity is worth that
12:29 judofyr (okay, more like three-liner, but still)
13:01 jnap joined #mojo
13:07 Psyche^ joined #mojo
13:07 GabrielVieira joined #mojo
13:20 jnap joined #mojo
13:20 GabrielVieira joined #mojo
13:21 MihailR joined #mojo
13:24 GabrielVieira joined #mojo
13:27 GabrielVieira joined #mojo
14:02 CromeDome joined #mojo
14:11 amirite joined #mojo
14:21 Htbaa joined #mojo
14:27 ladnaV joined #mojo
14:34 Leandr joined #mojo
15:06 Foxcool joined #mojo
15:07 gizzlon joined #mojo
15:08 mire joined #mojo
15:24 d4rkie joined #mojo
15:26 phillipadsmith joined #mojo
15:31 pau4o left #mojo
15:35 chansen joined #mojo
15:46 xaka joined #mojo
15:54 augensalat joined #mojo
15:54 rem_lex| joined #mojo
15:54 ladnaV joined #mojo
15:54 judofyr_ joined #mojo
15:54 perlite_ joined #mojo
15:55 Liam` joined #mojo
15:55 perlite_ joined #mojo
15:55 judofyr_ joined #mojo
15:55 ladnaV joined #mojo
15:55 rem_lex| joined #mojo
15:55 xaka joined #mojo
15:55 phillipadsmith joined #mojo
15:55 gizzlon joined #mojo
15:55 Leandr joined #mojo
15:55 Vandal joined #mojo
15:55 GabrielVieira joined #mojo
15:55 MihailR joined #mojo
15:55 jnap joined #mojo
15:55 Patterner joined #mojo
15:55 rem_lex|pivo joined #mojo
15:55 AmeliePoulain joined #mojo
15:55 kvorg joined #mojo
15:55 fhelmber_ joined #mojo
15:55 brambles joined #mojo
15:55 dbr joined #mojo
15:55 perlite joined #mojo
15:55 jzawodn joined #mojo
15:55 diegok joined #mojo
15:55 baton8 joined #mojo
15:55 tardisx joined #mojo
15:55 marcus joined #mojo
15:55 memowe joined #mojo
15:55 Liam`` joined #mojo
15:55 geira joined #mojo
15:55 keedi joined #mojo
15:55 atrodo joined #mojo
15:55 whee joined #mojo
15:55 gabiruh joined #mojo
15:55 nuba joined #mojo
15:55 mikegrb joined #mojo
15:55 \ask joined #mojo
15:55 maluco joined #mojo
15:55 charsbar__ joined #mojo
15:55 ruz joined #mojo
15:55 estrai joined #mojo
15:55 janus joined #mojo
15:55 BlueT_ joined #mojo
15:55 mattp_ joined #mojo
15:55 al joined #mojo
15:55 tinx joined #mojo
15:55 y0j_ joined #mojo
15:55 rafl joined #mojo
15:55 phips joined #mojo
15:55 tempire joined #mojo
15:55 nic joined #mojo
15:55 rwstauner joined #mojo
15:55 angelixd joined #mojo
15:55 MisterHatt joined #mojo
15:55 Kovensky joined #mojo
15:55 pooka_pook joined #mojo
15:55 reyjrar joined #mojo
15:55 rhaen joined #mojo
15:55 bzero joined #mojo
15:55 bobkare joined #mojo
15:55 plu joined #mojo
15:55 ashleydev joined #mojo
15:55 k-man joined #mojo
15:55 sshaw joined #mojo
15:55 dmn001 joined #mojo
15:55 [R] joined #mojo
15:55 burk joined #mojo
15:55 hide joined #mojo
15:55 predgtr1 joined #mojo
15:55 nicomen joined #mojo
15:55 robinsmidsrod joined #mojo
15:55 sri joined #mojo
15:55 jmmills joined #mojo
15:55 stephan48 joined #mojo
15:55 kmx joined #mojo
15:55 smpb joined #mojo
15:55 purl joined #mojo
15:55 Gedge_ joined #mojo
15:55 Htbaa1 joined #mojo
15:55 xaka1 joined #mojo
15:55 hide_ joined #mojo
15:55 preflex_ joined #mojo
15:56 xaka joined #mojo
15:56 jwang joined #mojo
15:56 [R] joined #mojo
15:56 ask joined #mojo
15:56 rhaen joined #mojo
15:56 janus joined #mojo
15:56 DaTa joined #mojo
15:56 jzawodn joined #mojo
15:57 ashleydev joined #mojo
15:57 plu_ joined #mojo
15:57 bobkare joined #mojo
15:57 _sri joined #mojo
15:57 inokenty joined #mojo
15:57 dbr joined #mojo
15:57 mike_ joined #mojo
15:57 chansen joined #mojo
16:02 tholen42 joined #mojo
16:02 augensalat joined #mojo
16:02 marcus joined #mojo
16:02 Htbaa joined #mojo
16:02 marty joined #mojo
16:02 jnap_ joined #mojo
16:02 predgtr1 joined #mojo
16:02 xaka joined #mojo
16:02 preflex_ joined #mojo
16:02 sri joined #mojo
16:02 kenjiskywalker joined #mojo
16:03 memowe joined #mojo
16:04 plu joined #mojo
16:07 black joined #mojo
16:21 * marty finally gets a chance to work oh his Mojolicous app!  (first time in a few months)  o/
16:40 ispy_ joined #mojo
16:40 inokenty joined #mojo
16:49 Foxcool joined #mojo
17:22 kvorg sri: (with a long delay) hmm, I will see how I like working on it, but I thought there were some candidates
17:22 kvorg sri: would it then stay part of the distribution or do you plan to throw it out (with me)?
17:40 sri kvorg: throw it out
17:40 sri marty: \o/
17:41 sri personally i have no interest whatsoever in making decisions about the future of the I18N plugin, so it doesn't seem like a good idea to keep it in core
17:42 sri i do know though that a few people like marcus won't like that
17:43 tempire joined #mojo
17:43 sri but unless they really step up once new feature discussions start, i couldn't care less ;p
17:44 sri i18n is such a broad topic, the plugin will evolve much better if someone who actually cares is in charge
18:03 judofyr joined #mojo
18:30 asarch joined #mojo
18:34 Leandr joined #mojo
18:50 GitHub145 joined #mojo
18:50 GitHub145 [mojo] kraih pushed 1 new commit to master: http://git.io/1S-96A
18:50 GitHub145 [mojo/master] encourage plugin forks - Sebastian Riedel
18:50 GitHub145 left #mojo
19:48 vel joined #mojo
19:49 andrefs joined #mojo
19:58 fibo joined #mojo
20:17 xaka joined #mojo
21:50 lukep joined #mojo
22:26 MihailR left #mojo
22:26 batman joined #mojo
23:06 jnap joined #mojo
23:06 zivester joined #mojo

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