Camelia, the Perl 6 bug

IRC log for #mojo, 2011-09-18

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

All times shown according to UTC.

Time Nick Message
01:19 Cside joined #mojo
01:23 GitHub170 joined #mojo
01:23 GitHub170 [mojo] kraih pushed 1 new commit to master: http://git.io/0Q6fcw
01:23 GitHub170 [mojo/master] fixed typos - Sebastian Riedel
01:23 GitHub170 left #mojo
01:23 tempire https://gist.github.com/1224563
01:25 j3nnn1 joined #mojo
01:38 sri think i've seen that one on perlmonks before
01:38 sri there's also a smaller one
01:40 sri http://www.perlmonks.org/?node_id=397958
02:01 Cside joined #mojo
03:27 GitHub35 joined #mojo
03:27 GitHub35 [mojo] kraih pushed 1 new commit to master: http://git.io/e35qNw
03:27 GitHub35 [mojo/master] added more application embedding tests - Sebastian Riedel
03:27 GitHub35 left #mojo
03:32 perlrocks Twitter: "text.purasi-healed bo.me. Incidentally, the Ppoku Mojolicious. In the next upgrade should not stop you organize your development environment." (ja) --purasiibo http://twitter.com/purasiib​o/status/115266860093673472
03:36 gabriel joined #mojo
04:13 driller_work joined #mojo
04:14 driller_work hey all
04:17 driller_work I wrote a small lib, something similiar to the growing guide (MyUsers to be more specific) however when I call that lib with $key (which I get from doing a:   my $key = $self->param('license_key') || '';) it seems to pass it on like a HASHREF and not like as string. The output tells me this: License key: license=HASH(0x8b4dc48) is invalid or has expired. <- why is it sayinG HASH(...) and not
04:17 driller_work "27110" like I passed in?
04:17 D4RK-PH0ENiX joined #mojo
05:13 SmokeMachine joined #mojo
05:24 tempire driller_work: not sure what you mean by 'call that lib' in reference to the $self->param call
05:25 driller_work tempire: let me no-paste the code im trying out mojo with, i'll have it up in a few mins..just need to deal with the kids brb
05:26 tempire just make sure it's as bare-bones as possible
05:29 driller_work yeah tempire: basically, my "attempt" is to validate someone with a db-call. let me get the paste up for you, sec
05:30 driller_work ?paste
05:32 driller_work ok, this is the app:
05:32 driller_work http://nopaste.info/56fe367288.html
05:33 driller_work and this is the lib/license.pm: http://nopaste.info/495696fe6a.html
05:34 driller_work when I go to: http://127.0.0.1/?license=27110 (which does exist in the db), I get this in the shell:
05:34 driller_work DEBUG:
05:34 driller_work Nope, no key
05:34 driller_work License key: license=HASH(0x9ef0c78) is invalid or has expired.
05:34 driller_work [Sun Sep 18 07:34:36 2011] [debug] 200 OK (0.032862s, 30.430/s).
05:35 driller_work license=HASH(0x9ef0c78) <- this I don't get, why is it not showing 27110?
05:37 sri license != license_key
05:38 driller_work sri: are you referring to: helper license => sub { return $license }; ?
05:39 sri perl -Mojo -E'a("/" => sub { $_[0]->render_json({whatever => $_[0]->param("license_key")}) })->start' get '/?license=12345'
05:40 driller_work ahhh
05:40 tempire well there you go.  attack of the misleading comment! mush!
05:41 tempire muah, even
05:41 sri btw. lower case module names are total no-go
05:41 driller_work really?
05:41 driller_work will keep that in mind, thanks sri
05:42 sri it's reserved for pragmas and fun modules
05:42 driller_work aha
05:42 sri like our "ojo" which makes "perl -Mojo" work ;)
05:46 driller_work darn, still can't get this to work as I thought.. the license != license_key was just my plain stupidity..
05:46 driller_work but even though if I pass a key (27710) that does exist in the db (the only entry actually) it still tells me that it's an invalid key
05:46 driller_work now I'm getting:
05:46 driller_work DEBUG:
05:46 driller_work Nope, no key
05:46 driller_work License key: License=HASH(0x91fbb28) is invalid or has expired.
05:46 driller_work [Sun Sep 18 07:45:11 2011] [debug] 200 OK (0.004734s, 211.238/s).
05:46 tempire pasting is evil
05:47 driller_work sorry, I'll do a one-liner next time... shouldn't be pasting all that crap over IRC hehe
05:48 * sri is not sure if he should turn on the spam protection script again
05:49 tempire for the mailing list?
05:49 sri for this channel
05:49 driller_work for me :P
05:49 sri for him ;p
05:49 tempire people don't paste often enough for regulation, I don't think.
05:49 sri gonna keep an eye on it i guess
05:50 driller_work I'll stop pasting junk and save you the trouble sri
05:50 sri that's good :)
05:54 driller_work so does anyone have a clue of what could possibly be wrong in the above paste? I am totally stuck :(
05:55 jpm_ joined #mojo
06:13 kaare joined #mojo
06:17 mohan joined #mojo
06:39 Vandal joined #mojo
06:39 d4rkie joined #mojo
07:00 driller_work wow, two hours later and still no luck, grrrrrrrrr
07:02 * tempire encourages driller_work
07:02 tempire you'll figure it out!
07:02 tempire GIVE ME A D!
07:02 tempire GIVE ME AN R
07:02 tempire and so on...
07:02 tempire GIVE ME A K!
07:03 tempire driller_work driller_work driller_work!!
07:03 * tempire sprinkles magical programming glitter
07:04 * sri thinks tempire should take it a little more easy with the coffee
07:04 * sri goes to get some coffee too
07:06 tempire http://www.youtube.com/watch?v=7mZZd4gQrrg
07:08 driller_work :|
07:08 driller_work just cannot get my head around this one, hell, what the heck could be wrong
07:11 sri tempire: haha, that's pretty much how i imagined you
07:14 sri hmm, i actually don't know that show
07:15 Foxcool_ joined #mojo
07:16 tempire WHAT.
07:16 sri :/
07:16 tempire cult classic.
07:16 sri :\
07:18 tempire http://www.youtube.com/watch?v=DI1I9KvDDfY
07:18 tempire or even better.  http://www.youtube.com/wat​ch?v=OAFkqZBubnU&amp;NR=1
07:20 tempire http://www.youtube.com/watch?v=​gpof-Pl97Zs&amp;feature=related
07:20 tempire And that'll do for now.
07:20 sri :)
07:23 driller_work ack... time go give up this piece of code, a gazillion attempts for such an easy thing is just ridicilous :-(
07:42 crab good afternoon.
07:42 crab driller: what are you trying to do?
07:47 driller_work crab: I pasted this earlier: myapp -> http://nopaste.info/56fe367288.html and the lib/license.pm -> http://nopaste.info/495696fe6a.html -- when I call 127.0.0.1:300/?license_key=27110 (which exists in the db) I get a: License key: License=HASH(0x91fbb28) is invalid or has expired. -- I don't get where the hash thing is coming from because that obviously does not match something in the db...thats
07:47 driller_work not what I passed in
07:50 driller_work cant proceed if I cant get that smallest thing figured out... wasted so many hours already so I'm just fed up
07:54 * crab looks
07:55 sri that paste still hase the license_key bug
07:57 * sri has no clue where the hash could come from either though
07:57 sri make sure to use a recent version of mojolicious
07:58 sri like my oneliner earlier showed, $license_key should be undef
08:00 sri driller_work: anyway, what does the output look like when you run my oneliner?
08:00 sri {"whatever":null}
08:00 sri that should be the result
08:01 crab sub get_license { my ($key) = $_; <- ?
08:01 sri also, if you're getting a hash why don't you just dump it to see where it comes from?
08:02 crab my $license_key = shift; <- this is where the hash comes from. ->get_license is called as a method
08:02 sri lol
08:03 sri driller_work: i highly recommend the llama and alpaca books btw
08:03 crab driller: queue up for your flogging in the public square!
08:03 * sri cracks the whip
08:04 Eugene joined #mojo
08:05 crab driller: (you want to change it to something like this: my ($self, $key) = @_;)
08:06 crab but you've still got other problems. you can't compare that to the return value of fetchrow_arrayref directly. pick out a column to compare, etc.
08:12 * sri wonders if the dbi book can still be recommended
08:12 sri guess not that much changed since it was written 10 years ago
08:12 driller_work let me try the changes you guys mentioned; I know that the DBI part is just horrible but please note that I just wrapped something up real quick to try it out
08:13 driller_work and yep sri, thanks, I did make that change but that past I showed is from earlier :P
08:13 Cside joined #mojo
08:19 driller_work christ, it works... thank you so much crab
08:27 jwang joined #mojo
08:36 crab you're welcome.
09:02 arthas joined #mojo
09:11 sugar joined #mojo
09:18 noganex joined #mojo
09:54 trone_ joined #mojo
10:00 bzero joined #mojo
10:08 hotz3 joined #mojo
10:34 sromanov joined #mojo
10:43 Cside_ joined #mojo
10:51 mohan_ joined #mojo
10:53 driller_work joined #mojo
11:09 hotz3 joined #mojo
11:33 alnewkirk joined #mojo
11:51 andrefs joined #mojo
11:52 stephan48 i get this: "[Sun Sep 18 13:29:26 2011] [debug] POST /openid/endpoint (libopkele/2.0.4)." when i POST to this route: "/openid/endpoint          GET,POST  "openid_endpoint"      (?-xism:^/openid/endpoint)", when i hit it with curl i get a 403, which my code never throws
12:00 crab it
12:00 crab 's haunted!
12:01 stephan48 would be possible
12:02 stephan48 do you know any ghosthunters working on sundays?
12:06 stephan48 CSRFDefender was the culprit
12:07 crab i have annoying problems with my CSRF defence mechanism.
12:08 crab i see denied POSTs in my logfiles every day from legitimate clients who either submit the form with no cookie, or with DIFFERENT values in the form and the cookie
12:09 crab and these are not people who know enough to turn off cookies or anything at all sophisticated.
12:12 Eugene joined #mojo
12:14 gabriel joined #mojo
12:29 gabriel joined #mojo
12:41 amoore joined #mojo
12:54 alnewkirk joined #mojo
12:55 nuba joined #mojo
13:19 nuba joined #mojo
13:33 perlrocks Twitter: "Mojolicious-Plugin-Mail 0.83 by SHARIFULN - http://t.co/hMWWin5R" --cpan_new http://twitter.com/cpan_new​/status/115418055823196161
13:39 perlrocks Twitter: "POSTing upload for Mojolicious-Plugin-Mail-0.83.tar.gz Thank CasperWarming StanislavBlinov and for help in testing http://t.co/WovNmH0H" (ru) --sharifulin http://twitter.com/sharifuli​n/status/115419623821803520
13:45 stephan48 crab: ye, it seems to catch even post requests that werent sent from a form
13:47 crab stephan: that's not my problem... but well, isn't that the whole point of CSRF defence?
13:47 stephan48 yap
13:48 stephan48 but it kills openid associate requests effecively :)
14:00 crab what's libopkele?
14:03 crab ah, a c++ openid lib.
14:05 gabriel_ joined #mojo
14:16 Coke joined #mojo
14:21 andrefs joined #mojo
14:22 driller_work joined #mojo
14:24 marcus oh hai
14:40 stephan48 crab: ye
14:51 marcus people still use openid? :o
14:57 abra joined #mojo
14:58 amoore joined #mojo
15:18 bzero marcus: Why not? :)
15:33 crab it's so old-fashioned.
15:36 andrefs joined #mojo
15:54 andrefs joined #mojo
16:31 alnewkirk joined #mojo
16:41 rhaen hep
16:48 rhaen whazzup?
16:48 purl budwieser tastes like wee
17:42 amoore joined #mojo
17:59 sugar joined #mojo
18:19 hotz3 joined #mojo
18:22 driller_work joined #mojo
18:26 andrefs joined #mojo
18:26 kaare joined #mojo
18:27 Eugene joined #mojo
18:32 grim_fandango joined #mojo
18:38 hotz3 joined #mojo
18:58 gbacon joined #mojo
19:04 SmokeMachine joined #mojo
19:06 SmokeMachine left #mojo
19:34 Eugene joined #mojo
19:47 vasundhar joined #mojo
19:49 vasundhar how database connections are handled in MOJO ?
19:58 tempire vasundhar: however you want.  db interfaces aren't something mojolicious forces on you.
19:59 vasundhar So I can use DBI,DBD
19:59 vasundhar tempire: Thank You
19:59 tempire depending on your needs, you can just do: helper my_favorite_db => sub { DBI->connect(….) };
19:59 SmokeMachine joined #mojo
19:59 tempire then the db connection is available in $self->my_favorite_db
20:01 vasundhar "do: helper my_favorite_db => sub { DBI->connect(….) };" right/
20:01 tempire are you using mojolicious or mojolicious::lite?
20:02 vasundhar I am not using either yet ... I am planning on using mojolicious
20:02 vasundhar I some how feel Lite(s) are too lite
20:03 tempire just depends on what you need.
20:03 tempire it's best to start out with lite, it's super easy to convert it to a full mojolicious app
20:04 tempire you want to start with reading through the guides on http://mojolicio.us/perldoc, the first being http://mojolicio.us/perldoc/Mojolicious/Lite
20:04 tempire it will take 10 minutes or so, and you'll save yourself a lot of trouble
20:05 tempire or, if you prefer demonstration, http://mojocasts.com might be good for you.
20:05 tempire http://mojocasts.com/e1 being the first episode.
20:08 vasundhar tempire: Thanks a ton !! I love the concept, simplicity because often times I was scared of using a framework and mojo is biggest motivation
20:08 tempire it will make your life sooooooo much easier.
20:09 tempire if this is your first time using a framework, and using mvc in particular, you definitely want to read through guides on http://mojolicio.us/perldoc in order.
20:09 tempire will save you a lot of time.
20:09 vasundhar sure I will do that
20:10 tempire sometimes I want a quick start, though.  the mojocasts will get you up and running quick.
20:10 vasundhar Directly yes because its going to be hobby programming rather than forced
20:15 vasundhar Got you on e1, though I installed mojolicious already (There is nothing simpler than this!)
20:46 andrefs joined #mojo
21:31 gabriel__ joined #mojo
21:32 marty joined #mojo
21:58 tempire How to I append to an empty Mojo::DOM tree?
21:59 tempire ah, append_content.
21:59 tempire makes sense
21:59 purl makes sense is http://xrl.us/bjq3kq
23:02 Cside joined #mojo
23:03 driller_work joined #mojo
23:36 j3nnn1 joined #mojo
23:49 SmokeMachine_ joined #mojo
23:55 Coke joined #mojo
23:56 noganex_ joined #mojo

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