Camelia, the Perl 6 bug

IRC log for #mojo, 2013-02-02

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

All times shown according to UTC.

Time Nick Message
00:05 sri oh noes, my first ugly hack in the driver codebase :/
00:07 sri automatic authentication was harder than i thought
00:10 sri got it as simple as my $mongo = Mongo->new('mongodb://sri:1234@foo.mongohq.com:10004/test'); $mongo->db->collection('foo')->find({test => 23})->all;
00:11 sri (blocking and non-blocking)
00:11 sri only difference for non-blocking is once again ->all(sub {...})
00:11 sri \o/
00:14 jzawodn nice
00:14 Molaf__ joined #mojo
00:15 jontaylor joined #mojo
00:22 marty sri++
00:23 sri not sure what to do about update/insert flags yet, would really like not to expose them in the high level api at all
00:26 sri insert has only continueOnError, which seems like a bad idea in general anyway, but update has important ones with upsert and multiUpdate
00:27 sri it's nicer with query flags, they can all be exposed through the cursor api
00:27 marty that's tricky.  continueOnError no big deal.  upsert and multi are nice to have
00:28 sri yea, i'm gonna leave out all the unsafe stuff for now
00:28 marty ya, prolly a good idea until things settle a bit
00:28 marty the cursor api sound wicked fun
00:28 marty sounds
00:31 sri quite happy with them, just the kill_cursors problem is a little unfortunate
00:32 sri since a non-blocking api can't automatically clean up cursors, you have to do it by calling a method when you're done (unless you wait 10 mins for mongodb to clean it up for you)
00:33 sri a pure blocking driver would send a kill_cursors operation to mongodb on DESTROY
00:34 sri the node.js driver has the same problem
00:47 jzawodn joined #mojo
00:53 marty Not  a huge price to pay for the ability to have non-blocking.
00:54 marty my guess is most people at first will use it blocking and then non-blocking will gain in use over time
00:54 sri very similar to Mojo::UserAgent
00:55 TitanOfOld joined #mojo
00:55 * marty nods
01:01 marcus_ joined #mojo
01:03 asarch joined #mojo
01:09 Mike-PerlRecruiter_ joined #mojo
01:25 d4rkie joined #mojo
01:26 d4rkie joined #mojo
01:31 sri ah, other drivers already have nicer methods to avoid flags
01:31 sri ->save($doc) for upsert
01:52 mire joined #mojo
02:25 sri oh wow, almost all os x apps crash when you type File:// (uppercase F) followed by another / into a text field with spell check activated
02:25 sri i can't type it... since my limechat crashes :S
02:27 sri http://openradar.appspot.com/13128709 # hahaha, first comment
02:28 whee neat
02:29 sri should be fun once people start adding that to their email signatures and stuff like that
02:30 tempire yo dawg
02:38 sri to hell with hacks... i'm gonna do authentication right :)
02:39 sri $mongo->credentials([['user', 'pass', 'dbname'], [...], ...])
02:40 sri so you can authenticate with multiple databases, even after reconnect
02:40 buu Is that subject to hacks?
02:41 sri i was referring to my earlier comment about hackish code
02:42 buu Oh.
02:43 * sri should stop looking at the official perl driver... the ruby and python drivers do authentication right
03:05 xaka joined #mojo
03:11 ka2u joined #mojo
04:32 * sri thinks he might be fighting with a perl bug :/
04:33 sri for some reason a method can't be found via a specific class, it is there though
04:35 Miked_ joined #mojo
04:46 sri actually, i can't call any methods on that object
04:47 sri ah, i'm a moron :)
04:47 moltar joined #mojo
05:05 Miked joined #mojo
05:06 ka2u joined #mojo
05:14 rem_lex| joined #mojo
05:34 Averna joined #mojo
05:36 KindOne joined #mojo
06:16 yakudza joined #mojo
06:25 ryozi joined #mojo
06:47 ka2u joined #mojo
07:15 Mike-PerlRecruiter_ joined #mojo
07:15 xaka joined #mojo
07:30 _xaka_ joined #mojo
07:43 dod joined #mojo
07:48 Vandal joined #mojo
08:08 dod joined #mojo
08:31 ObseLeTe joined #mojo
09:55 mugenken joined #mojo
10:02 d4rkie joined #mojo
10:02 d4rkie joined #mojo
10:08 ComLock joined #mojo
10:56 mire joined #mojo
11:23 marty \o
11:28 * diegok is in perl room at fosdem
12:26 ryozi joined #mojo
13:10 mire joined #mojo
13:21 JiYu joined #mojo
13:31 jberger joined #mojo
13:49 Britzel joined #mojo
13:56 jontaylor joined #mojo
13:57 ObseLeTe joined #mojo
14:14 BeDa joined #mojo
14:24 marcus diegok: awsum
14:43 mugenken joined #mojo
14:44 mire joined #mojo
14:45 GabrielVieira joined #mojo
14:46 Miked joined #mojo
14:51 GabrielVieira Is flash working fine?
14:57 Miked joined #mojo
15:09 Molaf_ joined #mojo
15:10 Miked joined #mojo
15:46 kitt_vl joined #mojo
15:47 ComLock joined #mojo
16:14 mire joined #mojo
16:54 prasad joined #mojo
17:01 GabrielVieira joined #mojo
17:05 Skolem joined #mojo
17:05 Skolem How do I view all the HTTP headers and their values, within Mojolicious?
17:09 marty Skolem: $self->req->headers
17:11 marty you can also dump them.  $self->app->log->debug($self-​>dumper($self->req->headers))
17:13 Skolem joined #mojo
17:24 ObseLeTe joined #mojo
18:29 BeDa joined #mojo
18:30 sh4 joined #mojo
18:59 mire joined #mojo
19:00 xaka joined #mojo
19:06 xaka joined #mojo
19:09 Mike-PerlRecruiter_ joined #mojo
19:13 GabrielVieira joined #mojo
19:26 marty pizza
19:58 d4rkie joined #mojo
19:59 mire joined #mojo
20:03 perlite_ joined #mojo
20:06 sh4|2 joined #mojo
20:08 moltar joined #mojo
20:13 avenj joined #mojo
20:24 becks joined #mojo
20:26 sh4 joined #mojo
20:27 becks hi all. what is wrong in http://pastebin.com/3FUjpiZs
20:32 human39 joined #mojo
20:36 jontaylor joined #mojo
20:37 marty becks: rand is failing
20:38 marty my $random_string = int(rand(10));
20:40 becks not random here
20:40 marty just keep refreshing
20:41 buu That's a funny bug
20:41 becks perl -e "print rand 10;" <-- Works as expected
20:42 buu becks: I have no idea what's causing this, I suppose maybe there's caching involved, but srand does exist.
20:42 sri how are you starting the server?
20:43 becks with morbo or hypnotoad, return the same results
20:44 sri those are fork based, and forked processes start with the same random seed in perl
20:44 Adura joined #mojo
20:44 buu How many forked processes does morbo start?
20:44 sri one
20:44 buu Shouldn't you get a new random number when you refresh then?
20:44 buu Since you're not hitting another child
20:45 marty I got random numbers here when I started with morbo
20:45 sri yes
20:47 becks Perl        (v5.16.2, linux)
20:47 becks Mojolicious (3.84, Rainbow)
20:48 sri in any case, it's not a mojolicious problem
20:49 becks ok, thanks
20:51 ObseLeTe joined #mojo
20:51 becks https://github.com/augensala​t/mojolicious-plugin-onfork --> your workers probably all get the same sequence of "random" numbers from "rand" in perlfunc
20:51 becks i'm not alone ;)
20:55 becks calling srand before rand produce random number here
20:55 buu Is anything else you're including calling srand?
20:57 becks http://pastebin.com/gvWNm6JQ
21:01 buu I think you said that already
21:11 jberger isn't this the case for a helper? http://pastebin.com/8mwED8wG
21:47 marty pjax - why uz no display my content!
21:52 marty errg.  pjax will not display content unless it's enclosed in html tags.  weird.
21:57 * marty conjures his best pirate voice and loudly proclaims "In thy alligator pit with yee all"!
22:08 ObseLeTe joined #mojo
22:48 BeDa joined #mojo
22:53 ka2u joined #mojo
23:56 jontaylor joined #mojo

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