Camelia, the Perl 6 bug

IRC log for #mojo, 2012-10-13

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

All times shown according to UTC.

Time Nick Message
00:42 zivester joined #mojo
00:42 SmokeMachine joined #mojo
00:45 zivester joined #mojo
00:52 zivester joined #mojo
00:54 zivester joined #mojo
00:58 davido joined #mojo
01:02 davido joined #mojo
01:14 nyamned joined #mojo
01:38 ObseLeTe joined #mojo
02:13 noganex_ joined #mojo
02:29 jnbek joined #mojo
02:38 frozenwithjoy joined #mojo
04:35 Foxcool joined #mojo
04:39 diegok I'm still on lion
05:01 memowe joined #mojo
05:08 Adurah joined #mojo
05:25 Britzel joined #mojo
05:42 noganex joined #mojo
05:46 Foxcool joined #mojo
06:02 Vandal joined #mojo
06:10 korshak joined #mojo
06:11 DaTa joined #mojo
06:38 ladnaV joined #mojo
07:09 d4rkie joined #mojo
07:13 memowe joined #mojo
07:16 sh4 joined #mojo
07:21 Mike-PerlRecruiter_ joined #mojo
08:04 Polarn joined #mojo
08:22 davido joined #mojo
08:40 sh4 joined #mojo
09:01 arthas joined #mojo
09:12 dpetrov_ joined #mojo
09:17 sh4 joined #mojo
09:25 fhelmber_ joined #mojo
09:53 Britzel joined #mojo
10:00 Foxcool joined #mojo
10:02 batman joined #mojo
10:33 memowe joined #mojo
11:02 rem_lex|pivo joined #mojo
12:02 HtbaaPi when declaring a route and using a callback, is it possible to redirect to another url from within that callback?
12:05 zpmorgan could mean either generating a 3xx or rendering using a different controller.
12:06 HtbaaPi 3xx
12:06 zpmorgan redirect_to(url) generates the 3xx
12:06 HtbaaPi but is that possible from within the callback?
12:06 zpmorgan within the controller, you mean?
12:07 HtbaaPi no, within the callback of the route
12:07 HtbaaPi $r->route('/foobar')->to(cb => sub { redirect_to('zzz') });
12:08 HtbaaPi I'll put it in a controller if I have to, but would be nice if not required
12:08 zpmorgan what's the invocant of that callback?
12:08 zpmorgan $_[0]
12:08 HtbaaPi that's just an example
12:08 HtbaaPi so far I can't seem to find a way to do a redirect from within the callback
12:08 zpmorgan right, I'm wondering if a controller or the app is what calls that
12:09 HtbaaPi it's probably the app since it hasn't matched a controller to it
12:10 zpmorgan a controller is the invocant.
12:11 HtbaaPi ah, in the callback, $self->redirect_to just works
12:11 HtbaaPi perfect :)
12:12 HtbaaPi time to implement it in my app :)
12:16 ryozi joined #mojo
12:21 GabrielVieira joined #mojo
12:22 good_news_everyone joined #mojo
12:22 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/-91P4w
12:22 good_news_everyone [mojo/master] improved Mojo::Content performance slightly - Sebastian Riedel
12:22 good_news_everyone left #mojo
12:25 sri that callback is equal to a lite app action
12:25 sri the pretty version is $r->any('/foobar' => sub { shift->redirect_to('zzz') });
12:26 sri you should have learned that from the growing guide
12:32 HtbaaPi I never really started out with Lite :)
12:32 HtbaaPi but yeah once I reread that it's the foundation of Lite it made sense
12:33 memowe joined #mojo
12:37 Adurah Now I can write tests, huzzah!
12:37 Adurah No idea what to write.
12:39 Adurah I suggest
12:39 Adurah use lib './lib'; in the text examples, you'd think most people would mojo test t/testname.t
12:39 Adurah Where'd that newline come from... ahah...
12:42 Adurah *test examples
13:08 batman +1 on pgsql
13:11 ZadYree hey folks, and All glory to the Hypno Toad!
13:13 ZadYree I'm having a strange problem: A certain path, defined in my Mojolicious routes should lead to a template, but... does not. Isteant, I am getting the "Page not found... yet!". If the page was not existing, it should just redirect me to the homepage. Any clue?
13:17 ZadYree forget it, my mistake
13:17 purl ZadYree, I didn't have anything matching it, my mistake
13:18 GabrielVieira joined #mojo
13:41 sri batman: why do you +1 pgsql?
13:52 baton8 joined #mojo
13:55 batman because it looks like pg has most of the features that you would want
13:56 batman i'm not too big of a mongodb fan myself neither
13:56 henq joined #mojo
13:56 sri so far everybody who spoke out in favor of postgres seems to not have actually worked a lot with it
13:57 batman i'm way out of context btw... the +1 is related to if mojo should have a full stack
13:57 sri it's mostly just "i heard good things about postgres", "i heard bad things about mongodb"
13:57 * sri doesn't buy it
13:58 batman i haven't worked much with it myself. i'm just looking at the feature list
13:58 batman i guess mysql would be the sane insane choice - since most devs are familiar with mysql
13:58 Adurah Make both noSQL and SQL plugins...!
13:58 batman but i don't like mysql, so...
13:59 sri Adurah: you gonna pay for that? :)
13:59 Adurah I'll give you a bitcoin.
13:59 batman sri: maybe you can make a kickstarter project :)
13:59 sri i don't really care about feature lists, just what will be most fun for me
13:59 Adurah Do you like SQL or noSQL more?
14:00 sri atm i like mongodb the most
14:00 batman i had issues with mongodb on dotcloud... got bad connections all the time :/
14:00 batman not sure if it's MongoDB.pm or something else that failed
14:01 sri implementing the postgres wire protocol for a blocking/non-blocking hybrid would be easier, but it requires a lot more on top that won't be as much fun to build
14:01 batman redis looks more promising and more fun to work with as well (not related to this discussion)
14:02 Ulti what is the db vs db discussion about?
14:02 Ulti surely mongodb and postgres aren't that comparable one being nosql and the other being sql and all
14:02 batman sri: on top? something dbic like + migration support?
14:03 sri the discussion is about which database i'm going to use for my full-stack version of mojolicious
14:03 sri batman: relational algebra
14:03 purl i think relational algebra is always context-free
14:03 batman relational algebra?
14:03 purl well, relational algebra is always context-free
14:03 sri i don't care too much for an ORM, but i would want a cool sql generation layer
14:04 Ulti guess it depends if you want everyone else in mysql-only-land using it or not >:3
14:04 batman what's the difference?
14:04 purl well, the difference is that I can't just uninstall systemd to make it work like it did before
14:04 Adurah A cool noSQL generation layer, rather...!
14:04 sri mysql is not up for discussion... oracle is a big no no for me
14:04 batman ;)
14:04 Adurah Understandable.
14:04 sri it's either mongodb or postgres
14:06 scrooby joined #mojo
14:07 sri all non-blocking clients for both on cpan seem equally terrible so far
14:07 Ulti can I +1 postgres, having used postgres but not having used mongodb :Z
14:07 sri Ulti: not without real arguments
14:08 sri of course more people have used postgres already... it's old :)
14:09 sri people being used to DBI too much already is actually an argument against postgres imo
14:09 batman sri: will this db layer be included in the Mojolicious release? - if created
14:09 Ulti the main arguemnt for me is joins and relational data storage
14:09 sri batman: very unlikely
14:09 Adurah You are a RDBMS hater?
14:09 Ulti my database of protein assignments would have to be a vast single table in mongodb
14:09 sri Ulti: how is that an advantage?
14:09 batman sri: ok. good :)
14:09 Ulti well the advantage is my data can fit on a computer
14:09 sri Ulti: fixed schemas are somethign negative for me
14:10 batman i agree
14:10 batman sri: have you worked much with mongo lately?
14:10 sri batman: yes
14:10 Ulti *shrug*
14:10 batman ok. does it feel right?
14:11 sri i'm getting rather good at understanding mongodb internals actually
14:11 Ulti also you get extra hipster points for going with mongodb postgres has the proper image of fuddy academic (like myself)
14:11 sri mongodb is fun, people just don't seem to grok the tradeoffs and expect magical scalability
14:12 sri stuff like BSON documents being limited to 16mb
14:12 Ulti I was thinking of using mongo to cache stuff for Mojolicious
14:12 sri or that it will eat up all your RAM if you let it
14:13 batman i really like working with redis. it makes me think about my data a lot
14:13 sri redis is not a database though... more a global namespace for data structures
14:14 batman ok?
14:14 Adurah The ISS uses postgres, heh.
14:16 Adurah If the lead dev enjoys it more, seems the way to go...
14:18 ObseLeTe joined #mojo
14:18 sri biggest advantage of postgres i see so far is political, it will never vanish since it's BSD licensed
14:19 sri mongodb with the AGPL could always be bought by oracle and killed
14:23 Adurah Ask 10gen to offer a BSD-style license...!
14:35 sri is there some simple solution for sharding with postgres these days or do you still need to do all the work yourself?
14:43 gryphon joined #mojo
14:49 lammel2 joined #mojo
14:59 diegok I'm using mongodb and I like it. My main "problems" till now are bad docs and perl driver not being at pair with node/ruby one.
15:01 diegok reconnection is problematic as it fails first and then reconnect to other node.
15:01 diegok Docs not being clear about some tradeoff is not so nice also.
15:03 diegok Some tradeoff are very reasonable when you know about it. I'm not crying about tradeoff existence, just under documented as it's a bit late every time you understand it.
15:03 sri diegok: yea, the perl driver for mongodb is terrible
15:04 diegok I'm using elasticsearch for some things I've planned to use mongodb at start.
15:04 sri i would aim for at least node.js/python quality
15:04 diegok sri: sure!
15:04 diegok node quality is great!
15:04 sri didn't like the ruby and php ones as much either
15:04 diegok sri: did you look at the polling/connection management recomendations for driver authors?
15:05 sri yea, they are pretty bad
15:05 sri ignoring non-blocking pretty much
15:05 sri had to find out some connection limitations the hard way
15:05 diegok and have to implement that same thing on all drivers is also sad
15:06 sri well, it's something 10gen could throw money at to make it better
15:06 diegok when you start using mongos it's a bit clear that this thing should be implemented only once
15:06 sri right, i hope they just make mongos better
15:06 diegok sure
15:07 diegok hey!, I have to go NOW. But I'll come back to talk about mongodb :)
15:08 sri it's refreshing to have someone who actually used the database he lobbies for :D
15:08 diegok I've used pg also and like it. But I also like mongodb.
15:08 diegok I'll come back to talk about sharding mongodb :)
15:08 sri everybody throws around postgres, yet can't answer my questions about it!
15:08 gryphon What are your thoughts of mongo vs couch?
15:09 gryphon I've used couch on a few projects, loved it. Never used mongo.
15:09 sri couch is backwards
15:09 diegok gryphon: do couchdb fixed the fragmentation hell? :-/
15:09 gryphon hcuoc++
15:09 sri having to plan your queries in advance doesn't sit well with me
15:09 gryphon That, that part annoys me.
15:09 baton8 joined #mojo
15:09 gryphon To be fair, I've used it very differently than I would something like pg.
15:10 sri mongodb is closer to an sql database with its ad-hoc queries
15:10 sri you put an index on a key and query away
15:11 gryphon How is that diff than setting up a map/reduce in couch?
15:11 sri problems there are mostly devops stuff
15:11 sri you query ad-hoc
15:12 sri it's pretty much just like sql, just without joins
15:12 sri and without sql :)
15:12 jnbek joined #mojo
15:12 gryphon heh. I heart sql, though. But cool.
15:12 gryphon Anything mongo doesn't go so great?
15:13 sri http://www.mongodb.org/display/DOCS/Querying
15:15 sri mongodb likes to have a dedicated server
15:16 sri that's the only real problem i ran into so far
15:17 gryphon Is that for ram?
15:17 sri yea, it uses memory mapped files, which eat up all RAM
15:17 gryphon Hm, OK.
15:17 sri on windows and linux you can limit that through the operating system i heard though
15:18 gryphon We've got a couple of platforms ATM: Mojo+Couch+Pg, Mojo+Couch+Solr. Loving Mojo. Mildly OK with Couch. Everything's on Debian.
15:18 gryphon But everything runs on a single node in each platform.
15:18 gryphon Wouldn't be difficult to separate it out, but just means more nodes to manage.
15:19 gryphon What's bugging me from a simplicity POV is the whole Couch+"something" because Couch doesn't do "something" as well...
15:22 sri Couch+Pg seems a little unusual to me
15:23 gryphon We wanted to leverage table partitioning for an unusual business case.
15:24 gryphon And we picked couch just because of the automatic/free history bit.
15:34 lammel2 joined #mojo
15:36 jnbek joined #mojo
16:04 baton8 joined #mojo
16:05 marcus Sri: what is your questions about pg?
16:06 sri marcus: sharding
16:06 purl sharding is taking a great big database and cutting it up into little pieces parts
16:06 * sri pats purl
16:06 purl how condescending
16:06 marcus Afaik you have to do that manually.
16:07 marcus I've never had to tho. Just buy a bigger iron covers 99% of the cases.
16:07 marcus More ram and ssds.
16:09 * marcus &
16:10 sri uncool
16:10 sri i'm also interested in reasons for why postgres is actually better as a default database than mongodb
16:13 sri and of course what kind of api would you expect from a postgresql client in mojolicious?
16:13 sri raw sql, sql generator, full orm...
16:13 sri blocking, non-blocking, both...
16:15 batman better because most people tend to use tables
16:15 batman non-blocking and sql generator
16:15 batman later on full orm
16:16 batman and i agree with marcus: i think most (any?) mojo based projects will not need sharding
16:19 xaka joined #mojo
16:25 jnbek joined #mojo
16:32 vishwanathms joined #mojo
16:32 vishwanathms_ joined #mojo
16:54 d4rkie joined #mojo
16:59 xaka joined #mojo
17:53 zivester joined #mojo
18:08 vishwanathms joined #mojo
18:09 mattastrophe joined #mojo
18:17 mattastrophe joined #mojo
18:24 * sri is still surprised that absolutely nobody seems to trust mongodb
18:25 sri batman: but tables will require migrations
18:26 Adurah I don't have experience with noSQL, but, I'm not sure why there's newfound hatred for RDBMS.
18:26 sri i think there has always been a hate for sql
18:27 sri and schemas
18:27 Adurah Nice and orderly.
18:28 sri postgres has json support now too after all
18:28 Adurah Yeah, native.
18:28 sri kinda proves the point
18:29 Adurah It's... just output formatting though, right?
18:29 sri i think it stores the raw json as TEXT fields
18:29 crab it's essentially a json validation function in front of a text type, plus some output functions.
18:30 sri crab: postgres or mongodb?
18:30 * crab reviewed the json patch for inclusion in 9.2
18:30 crab postgres
18:30 purl postgres is another free RDBMS.  Has more features that you'd expect in a commercial RDBMS. or linked to from yahoo, altavista, hotbot ... or (slower than..? We're not sure.) or see postgresql or obra's bitch
18:30 Adurah Yeah, didn't think it was a new way of querying, just output.
18:30 sri mongodb has no vote so far.... hmmmm
18:31 crab oh, you were asking me for a vote? i thought you meant which one am i talking about.
18:31 crab fortunately i don't need to change my answer to make it a vote ;-)
18:31 sri i was asking for a vote :)
18:31 sri -.-
18:31 Adurah Could be lack of familiarity, but... You mentioned Meteor, what other framework that uses an RDBMS would you currently compare Mojolicious to?
18:32 sri Adurah: non-blocking there is not much
18:32 crab you can't really compare meteor to mojolicious
18:32 crab except in terms of the low-level mechanics
18:32 sri django and rails mostly use postgres, but blocking with an orm
18:32 sri right, but with a default model layer i would like to provide the primitives for a meteor system
18:32 crab that would be pretty neat
18:33 sri guess i'll look into making non-blocking postgres more fun
18:33 Adurah Is blocking that bad?
18:34 crab not if you're a blockhead! (/me hides)
18:34 Adurah If each request had a db connection, I'd not think it's too bad.
18:34 sri if we target websocket apps and the like it's surely not good ;p
18:35 Adurah Some sort of queuing...
18:36 Adurah Complicationy.
18:42 sri blocking means it blocks the whole process, no amount queueing will keep your websockets responsive
18:46 Adurah Well, I was looking at RabbitMQ.
18:46 Adurah Perhaps it'd be overkill.
18:46 mattastrophe joined #mojo
18:50 GabrielVieira joined #mojo
18:59 zivester joined #mojo
19:04 abra joined #mojo
19:21 Mike-PerlRecruiter_ joined #mojo
19:27 GabrielVieira joined #mojo
19:30 sri muhahahahaha... Twitter shows Perl Borat for me in the "Similar to you" menu
19:49 gryphon joined #mojo
20:04 rhaen sri: omg!
20:04 rhaen sri: screenshot it!
20:11 sh4|2 joined #mojo
20:12 xaka joined #mojo
20:15 sri rhaen: tweeted it ;p
20:19 scrooby joined #mojo
20:21 scrooby Hi I'm a long time Catalyst user trying to get my head around async Mojo::UserAgent http requests
20:21 zivester joined #mojo
20:22 scrooby Would someone be able to answer a question about Mojo::IOLoop
20:23 scrooby please
20:25 scrooby I'd like my Mojo::UserAgent script to exit once it has finished all it's async requests, but it waits and I can't see why
20:26 batman scrooby: you should probably use Mojo::IOLoop->delay
20:26 scrooby Thanks for the response. Could I paste some code?
20:27 tempire scrooby: use gist.github.com
20:27 batman call $d->begin before $ua->$action(.., $cb) and $d->end inside the callback
20:27 batman scrooby: only oneliners
20:27 scrooby pastebin?
20:27 purl pastebin is see nopaste. or see shadowpaste
20:28 batman ...and $d->wait instead of Mojo::IOLoop->start;
20:28 scrooby ah
20:28 sri i'm almost certain there are examples in the synopsis
20:29 scrooby http://pastebin.com/rfVr53YC
20:29 batman scrooby: https://metacpan.org/module/Mojo::IOLoop::Delay and https://metacpan.org/module/Mojo::UserAgent
20:29 batman what sri said: the synopsis for Mojo::UserAgent has an example with delay
20:30 scrooby The code does the work, it just doesn't exit when the requests have finish
20:30 batman why do you have $tx->finish; ?
20:30 scrooby batman: checking the docs
20:31 scrooby That's what I got from the synopis for post_json example
20:31 batman # Non-blocking parallel requests (does work inside a running event loop)
20:31 batman ^ look for that example for mojo-ua
20:32 * batman need to get some sleep
20:32 sri i'm almost certain that $tx->finish is not part of any post_json example
20:32 scrooby Wait a minute. I added the $tx->finish myself to try to make it exit. I did not get that from example.
20:39 perlite_ joined #mojo
20:43 scrooby Cool, thanks batman. It worked.
20:44 scrooby specifically $d->begin before $ua->$action(.., $cb) and $d->end inside the callback ...and $d->wait instead of Mojo::IOLoop->start
20:44 scrooby Awesome. I'm liking this async stuff in Mojo
20:55 jnbek joined #mojo
21:02 tempire lulz.  http://scottberkun.com/2007/​asshole-driven-development/
21:03 * tempire updates resume with relevant experience bullet points
21:26 mattastrophe joined #mojo
21:32 sri tempire: you're also in the postgres camp?
21:33 * sri vaguely remembers
21:34 tempire as in supporting a mojo postgres driver?
21:34 sri ye
21:35 sri which would possibly result in a pretty new dsl for generating sql and maybe an orm
21:35 tempire I'm not averse to it.
21:35 sri but that's step 2 and 3
21:36 tempire saying I'm in that camp is a bit too strong.
21:36 tempire but I'm all for new DSLs :)
21:36 tempire I've been thinking a lot of databases and ORM-related stuff.
21:36 tempire s/of/about/
21:36 buu Databases are THE PAST
21:36 buu Embrace the FUTURE
21:36 buu (At zombo.com)
21:36 tempire spreadsheets?
21:36 purl spreadsheets are easy, mailers are hard. or known as sprayedsheets
21:37 * sri sets buu on fire
21:37 * buu smokes happily
22:18 xaka joined #mojo
22:20 jnbek joined #mojo
22:23 jzawodn joined #mojo
22:29 * tempire looks at sinatra-assetpack again
23:05 tempire oh
23:05 tempire ?embed is a neat feature
23:22 sri crab: what's up with unicode in postgres?
23:23 sri are those crazy escapes really necessary or just an option? http://www.postgresql.org/docs/9.2/interactive​/sql-syntax-lexical.html#SQL-SYNTAX-CONSTANTS
23:23 * sri has not actually looked at the text encoding side of the wire protocol
23:32 sri hmm, null terminated c-style strings... looks like that kind of escaping is mandatory... ouch
23:34 sri oh wait, those are submitted as bytes
23:34 sri with a text/binary flag... whatever that means
23:55 kthakore joined #mojo
23:55 kthakore left #mojo
23:55 kthakore joined #mojo
23:55 kthakore hello
23:55 kthakore hello

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