Camelia, the Perl 6 bug

IRC log for #mojo, 2011-03-11

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

All times shown according to UTC.

Time Nick Message
00:28 fmerges left #mojo
01:27 baton8 left #mojo
01:30 stephen left #mojo
01:34 vel left #mojo
01:35 stephen joined #mojo
01:39 stephen left #mojo
01:42 alnewkirk joined #mojo
02:00 gshank_ is now known as gshank
02:05 Drossel joined #mojo
02:11 Kulag left #mojo
02:25 Hammit joined #mojo
02:25 Hammit left #mojo
02:25 Hammit joined #mojo
03:15 crab joined #mojo
03:34 Hammit when it comes to separating the api from the controller code, what do you guys recommend?
03:36 alnewkirk perl
03:36 Hammit :o
03:36 alnewkirk +mvc
03:37 Hammit i like mojo, but there seems to be a small lack of +m
03:37 Hammit is it just me?
03:38 alnewkirk yes
03:38 Hammit phew hehehe
03:38 alnewkirk m = DBIx-Class or Rose-DB or ORMesque .... yada
03:38 alnewkirk take your pick
03:39 Hammit yep
03:40 Hammit shove the models in the lib dir?
03:40 alnewkirk KiokuDB, MongoDB, ...
03:41 alnewkirk lib/M lib/C lib/V or lib/Model lib/Controller lib/View
03:41 alnewkirk take your pick
03:47 Hammit damn...i had it right in the first place...there was a bloody bug in my code!
03:48 Hammit grrr! hehe
03:48 Hammit cheers alnewkirk
03:48 alnewkirk np
03:56 alnewkirk left #mojo
03:59 Hammit left #mojo
04:04 tempire Mojo::UserAgent--
04:04 tempire I don't have a better idea, though.
04:11 crab hi tempire.
04:11 tempire hi crab.
04:11 crab how's it going?
04:52 tempire it's going alright.
04:52 tempire I've almost taken over corporate america.
04:52 tempire it's a long hard climb up the ladder.
04:52 tempire but things are a movin'
04:59 crab good to hear.
05:53 sri good morning fellow alligators
05:53 sri tempire: come up with a better name
06:00 crab Mojo::Gator
06:03 metaperl left #mojo
06:04 metaperl joined #mojo
06:22 sri i don't think so
06:45 kaare joined #mojo
07:23 Hammit joined #mojo
07:25 fhelmber_ joined #mojo
07:26 ver joined #mojo
07:31 koban1 joined #mojo
07:37 Christian joined #mojo
07:37 Christian moin
07:41 * sri waves
07:42 sri things become so much easier when the client api can separate blocking and non-blocking
07:50 Foxcool joined #mojo
07:51 mambo joined #mojo
07:52 mambo hi, i have newb questions, is it possible to use url_for for passing query params to url ? like <%= url_for 'list',  page => 2 %>
07:53 * sri waves
07:53 sri nope, but it returns a Mojo::URL object you can change
07:54 mambo ok, thanks
08:11 ysyrota joined #mojo
08:14 Hammit that raises a question for me...
08:14 Hammit url_for and link_to
08:14 Hammit or link
08:15 Hammit why both?
08:16 sri ?
08:17 sri why both exist?
08:17 Hammit is url_for a "<a href"
08:17 Hammit while link_to is something else?
08:18 Hammit i've got confused in all the doccos i've been reading :) hehehe
08:18 sri one generates urls the other link tags
08:18 Hammit oh, that simple
08:18 Hammit hahha
08:18 Hammit shame on me
08:19 sri if you want to know about helpers just look through the two plugins
08:19 Hammit yeah, i was trying to find them, just did then...got just about every docco page open in a tab and I'm getting lost :o
08:21 Hammit even though you see them as being very different probably, i see them as being similar
08:21 Hammit both generate "a href" according to the docs
08:21 sri link_to actually uses url_for
08:21 Hammit ahhhh....
08:22 Hammit thank you
08:22 Hammit clears things up for me :)
08:27 breaker313 joined #mojo
08:31 Foxcool left #mojo
08:35 sri left #mojo
08:35 tholen_ joined #mojo
08:35 perlrocks left #mojo
08:36 sri joined #mojo
08:37 sri still looking for a new name for Mojo::Client btw!
08:37 sri need suggestions
08:38 moritz Fri Mar 11 09:35:38 2011 error Mojolicious::Controller:311 [20453]: Can't use string ("") as a subroutine ref while "strict refs" in use at /home/moritz/perl5//perls/perl-5.12.2/lib/site​_perl/5.12.2/Mojolicious/Plugin/TagHelpers.pm line 200.
08:38 moritz line 200 is $cb = sub { "/*<![CDATA[*/\n" . $old->() . "\n/*]]>*/" }
08:38 perlrocks joined #mojo
08:39 moritz should I try to boil it down to a small test case?
08:39 moritz I guess $old is ""
08:39 sri it's most likely not a bug, just wrong helper usage
08:40 * moritz tries with Carp::Always
08:42 Foxcool joined #mojo
08:46 tholen_ left #mojo
08:51 Christian left #mojo
08:51 Christian joined #mojo
09:24 sri interesting, Mojo::Client refactoring was way easier than expected
09:24 sri wonder if that's a good or bad sign
09:26 sri basically whenever you use a callback it will fire off an async request using Mojo::IOLoop->singleton
09:26 sri and the client itself switches now between sync and async mode, taking care of leftover keep alive connections in the pool
09:27 sri $ua->ioloop can lie though, since it always points to the sync ioloop
09:29 sri the only use for ->start is now $ua->start($tx);
09:29 sri websockets will require working async mode, but that's to be expected i guess
09:30 sri $self->client will now become $self->ua
09:32 sri besides some very tricky websocket cases i think it is even bug for bug backwards compatible :)
09:33 sri but websockets are experimental anyway
09:45 spleenjack joined #mojo
09:46 perlrocks Twitter: "Finally found a good non-blocking api for Mojo::Client, some big changes coming up. :) #mojolicious #perl" --kraih http://twitter.com/kraih/status/46145006699954177
09:48 memowe_ is now known as memowe
09:50 perlrocks Twitter: "Gonna deprecate Mojo::Client and add a new client module for backwards compatibility during the deprecation period. #mojolicious #perl" --kraih http://twitter.com/kraih/status/46145976993456128
09:51 perlrocks Twitter: "New client module needs a good name though, only suggestion so far is Mojo::UserAgent, thoughts? #mojolicious #perl" --kraih http://twitter.com/kraih/status/46146155209424896
09:51 perlrocks Twitter: "Awesome! :) RT: @kraih: Finally found a good non-blocking api for Mojo::Client, some big changes coming up. :) #mojolicious #perl" --sharifulin http://twitter.com/shariful​in/status/46146276634537984
09:58 * sri cracks the whip
09:58 sri we need names!
09:59 sri ok, maybe not the smartest move to ask for action on a friday -.-
10:10 moritz well, Client is the obvious name
10:11 su-bzero_ Mojo::Wind
10:11 moritz which is why most other names seem inappropriate in comparison
10:11 moritz call it Karma
10:14 su-bzero_ After deprecation period many current apps in github will be burried...
10:14 su-bzero_ Which used Mojo::Client.
10:15 sri there is no alternative
10:16 sri things will always change if a project is alive
10:16 sri unmaintained apps die
10:17 sri you don't whine about stuff in core perl getting deprecated either
10:18 moritz just try to use a Perl 6 compiler for a year :-)
10:18 sri hehe
10:33 mambo tried to use Mojo for new small project and it looks very good, and very fast
10:33 koban1 left #mojo
10:34 mambo very strange, but there is no DBIx::Class plugin around
10:35 sri what would it do?
10:35 mambo just wondering how people find so much free time to do all that awesome opensource
10:36 mambo sri: i think it should glue it with threading and event system somehow, because it is now not single process model i suspect, because its so fast
10:37 sri impossible
10:37 purl impossible is nothing!
10:37 sri DBI is blocking xs code and DBIx::Class depends on that behavior
10:38 mambo sri: you mean that if i just plug it in as global attr for example, then it will just work ? only slower
10:39 sri exactly
10:39 mambo ok, cool
10:39 * sri wonders why people always ask for orm specific plugins
10:40 sri when you look at those plugins in other frameworks they do pretty much nothing besides "use $orm;"
10:41 sri i guess they make sense to store documentation in
10:42 sri maybe we need empty orm plugins containing links to the appropriate wiki pages :)
10:43 edenc sri: most of the guys that write a plugin containing only a "use $orm" statement can't write docs to save their lives
10:43 sri yet it somehow works
10:44 edenc but yeah, people need a place to refer to when they want to integrate something to a framework and the plugin docs work fairly well for that
10:46 mambo sri: i think its because of lack of documentation, simple example of how to plug DBIx::Class in would be just sweet
10:47 sri that stuff is in the wiki
10:48 sri https://github.com/kraih/mojo/wiki
10:48 sri everybody can add more recipes there
10:49 edenc mambo: "use YourDBIxClassSchema"
10:50 sri just like you would plug it into a console script
10:50 mambo and also plugin let you say something like $self->model('User'), which is cool
10:51 sri at least in catalyst that's not a plugin
10:53 ok22 joined #mojo
10:54 sri would make sense for a mojolicious plugin though i guess
11:04 sri i guess most mojolicious users are also into nosql databases these days
11:14 Christian left #mojo
11:30 tholen_ joined #mojo
11:58 koban joined #mojo
12:07 crab is mojolicious earthquake-resistant?
12:08 sri yes, but it can't swim yet
12:32 koban left #mojo
12:57 tholen_ left #mojo
12:57 omega how do people usually debug Mojo::DOM find problems?
12:58 sri tests?
12:58 purl it has been said that tests is what I don't have tuits for
14:06 fhelmber_ left #mojo
14:29 koban joined #mojo
14:29 kaare left #mojo
14:30 koban left #mojo
14:30 koban joined #mojo
14:43 Hammit left #mojo
14:52 sri UserAgent seems in line with rfc2616
14:54 sri you could even say the client has grown into a useragent
15:00 ver left #mojo
15:04 Foxcool left #mojo
15:05 crab useragent is fine, imo. nice and familiar.
15:06 sri wonder why tempire didn't like it
15:07 tholen_ joined #mojo
15:16 Foxcool joined #mojo
15:24 mambo left #mojo
15:39 breaker313 left #mojo
15:48 tempire It's fine, I guess.  It's just not as obvious as Mojo::Client.  I remember when I first started programming, the concept of a useragent was confusing.
15:49 tempire But that was more the examples of the LWP that were prevalent at the time.
15:56 tempire "you could even say the client has grown into a useragent" - I like that tagline
15:57 sri this is soooo much easier to debug
16:06 Foxcool left #mojo
16:09 koban left #mojo
16:24 Akron joined #mojo
16:24 cosmincx left #mojo
16:27 Akron How about Mojo::CURL?
16:27 mattastrophe joined #mojo
16:28 sri Akron: it doesn't use curl
16:28 Akron But it is a curl.
16:29 * sri doesn't get it
16:29 Akron A client for urls.
16:31 Akron But UserAgent is fine I think. I just thouth you whipcracked for further suggestions. ;)
16:32 sri true, my bad ;p
16:37 spleenjack left #mojo
16:37 stephan48 but curl i would only use if it really uses curl backend... could be confusing otherwhise
16:38 ysyrota left #mojo
16:45 Akron Confusion is good to gain attention. ;)
16:50 tholen_ left #mojo
16:53 spleenjack joined #mojo
16:58 rafl joined #mojo
16:59 rafl hey. Summer of Code 2011 is coming up. do you guys want to participate again?
16:59 rafl if so, it'd be most awesome if you could throw together a list of project ideas for students
17:02 sigue left #mojo
17:11 * sri waves
17:11 sri not sure
17:11 sri last year wasn't so great
17:13 moritz why not? what went wrong?
17:14 Foxcool joined #mojo
17:14 rafl note that you don't need to commit to actually participating right now
17:15 rafl right now it's about getting TPF accepted as an organisation and attracting students
17:15 rafl for that many project ideas are helpful
17:15 rafl if it turns out that you don't get promising students applying for something in your project, you don't need to mentor anyone
17:17 sri moritz: pretty much everything :)
17:20 sri rafl:  ideas are collected on the wiki again?
17:21 rafl sri: yes. a different one though, as the TPF wiki is broken currently
17:21 rafl i'm currently editing http://epo.means.no/gsoc2011/ideas
17:21 rafl which so far is mostly a copy of last year's idea page that i'm about to beat into shape
17:22 rafl when the TPF wiki works again it might be moved back there or not
17:22 sri well, the mojolicious ones are still valid ;p
17:24 sri think marcus said he didn't want to mentor again either
17:25 sri could be tricky to find someone
17:28 rafl well, it's up to you guys. say the word and i'll remove mojolicious from the ideas page
17:28 rafl but note that this isn't in any way a commitment to mentoring anyone yet
17:29 sri ok, you can leave the ideas up then i guess
17:30 rafl aye. feel free to edit it as you see fit
17:30 sri a motivated student showing up might be able to change the situation too
17:37 amonaco joined #mojo
17:38 hziSot joined #mojo
17:40 amonaco hi mojos, is there an equivalent to catalyst's --detach option?
17:41 sri elaborate please
17:42 amonaco something to make the application run completely in background, silent, no stderr output
17:42 amonaco i need an option to send the application to background and detach from the console
17:42 sri the normal built in server is meant for development mostly, so it has no such option
17:43 sri hypnotoad however is silent by default
17:43 sri (and will daemonize)
17:44 amonaco ok, will investigate hypnotoad
17:44 sri http://mojolicio.us/perldoc?Mojol​icious/Guides/Cookbook#Hypnotoad
17:45 amonaco thx
17:45 sri ALL GLORY TO THE HYPNOTOAD!
17:46 perlrocks Twitter: "ALL GLORY TO THE HYPNOTOAD! #mojolicious #perl" --kraih http://twitter.com/kraih/status/46265733029695489
17:51 spleenjack left #mojo
18:06 stephen joined #mojo
18:11 sigue joined #mojo
18:53 GitHub1 joined #mojo
18:53 GitHub1 mojo: master Sebastian Riedel * 6af6d35 (29 files in 11 dirs): Deprecated Mojo::Client in favor of the much sleeker Mojo::UserAgent - http://bit.ly/fWEXr3
18:53 GitHub1 left #mojo
18:53 perlrocks left #mojo
18:53 perlrocks joined #mojo
18:56 perlrocks Twitter: "Mojo::Client has now officially been deprecated in favor of the much sleeker Mojo::UserAgent. :) http://t.co/GDYyGPN #mojolicious #perl" --kraih http://twitter.com/kraih/status/46283351451119617
18:56 sri i'm almost certain there are bugs, get testing!
18:56 * sri cracks the whip
19:06 amonaco left #mojo
19:15 tholen_ joined #mojo
19:16 Akron Oh - now it's ->ua instead of ->client! Why didn't you say that! Now i'm in love with "UserAgent"!
19:16 sri ;p
19:18 garu sigh... I really liked the name Mojo::Client
19:18 * sri too
19:18 sri it's the only deprecation strategy i see though
19:20 garu is the api really that different?
19:21 sri very
19:21 sri non-blocking changed completely
19:25 GitHub28 joined #mojo
19:25 GitHub28 mojo: master Sebastian Riedel * a63bd16 (7 files in 6 dirs): made the most common Mojo::IOLoop methods easier to access for the singleton instance - http://bit.ly/i9Mpgj
19:25 GitHub28 left #mojo
19:26 garu sri: as for deprecation, how about leaving the client() method around, and issuing a warning?
19:26 sri that's what i did
19:27 rafl left #mojo
19:27 marcus Big change.
19:27 purl somebody said big change was the mental switch in the folks doing development.
19:27 sri or i'm not sure what you mean
19:27 garu sri: it's not on Mojolicious::Controller anymore
19:27 sri it is
19:27 garu oO
19:27 sri undocumented of course
19:27 * garu can't see it
19:28 garu I see sub ua {} but not sub client {} anymore
19:28 garu (on github)
19:28 * garu might just be blind though
19:29 sri https://github.com/kraih/mojo/blob/mas​ter/lib/Mojolicious/Controller.pm#L42
19:29 garu ah
19:29 garu *client
19:29 garu I was looking for sub client
19:29 garu sorry
19:29 garu sri++
19:30 sri if i fork a whole class to avoid breakage i will not make an exception for some tiny method ;p
19:30 garu sri: typo though... should be ->ua, right? not ->us
19:30 sri argh
19:30 garu :P
19:30 sri been typing us instead of ua all day...
19:32 GitHub95 joined #mojo
19:32 GitHub95 mojo: master Sebastian Riedel * 4586885 (1 files in 1 dirs): fixed typo - http://bit.ly/ftxbwH
19:32 GitHub95 left #mojo
19:32 edenc sri: I'm curious, why the glob on deprecated methods?
19:33 marcio_ferreira joined #mojo
19:33 edenc trying to avoid something at compile-time?
19:33 sri edenc: don't remember
19:33 purl Remember what?
19:33 sri i know i started it for a reason...
19:35 sri maybe it's useless
19:35 sri guess i would remember if i changed it ;p
19:35 edenc yeah, not a big deal, I was just curious
19:36 edenc if it were a big issue you'd probably remember instantly :)
19:36 * sri nods
19:39 sri the change was actually inspired by the mongodb client, it forced me to finally solve the non-blocking api problem :D
19:39 marcus Sri: can mojo do streaming responses?
19:39 sri it always could
19:39 sri there's even a recipe
19:39 marcus Not on fcgi tho?
19:40 sri nope
19:40 marcus Zok.
19:40 marcus Wonder if I should rewrite our ws client to use streaming libxml.
19:40 marcus Now that the app is on mojo...
19:41 sri wait, what do you mean with "in fcgi"
19:41 sri streaming response via client inside app or app itself?
19:41 marcus App
19:41 sri ah ok
19:41 marcus Chunked responses?
19:41 sri unlikely
19:42 sri most servers buffer the whole response
19:42 marcus What about hypnotoad?
19:42 sri of course it does
19:42 marcus Cool. Be a good excuse to make them switch.
19:43 marcus Now that the experimental sticker is off.
19:44 marcus Varnish supports it too.
19:45 marcus Guess we could drop the web server completely.
19:48 GitHub23 joined #mojo
19:48 GitHub23 mojo: master Sebastian Riedel * c228f58 (2 files in 2 dirs): made dns a little more fun - http://bit.ly/gid23d
19:48 GitHub23 left #mojo
20:17 tholen_ left #mojo
20:37 diegok sri: did you deprecated client in favor of the unated states? -> https://github.com/kraih/mojo/commit/6af6d​3519a161e838baad8fdfe23c8de85e20207#L2R31 :-p
20:37 sri already fixed ;p
20:38 diegok sri: ops, me bad reading the tweeter queue at the end of the day :-o
20:38 diegok (and not checking HEAD)
20:43 ok22 left #mojo
20:54 ok22 joined #mojo
21:02 Akron left #mojo
21:14 marcio_ferreira left #mojo
21:16 * marcus wrote two more paragraphs on the article. o/
21:17 marcus sri: Are you on instagram?
21:29 perlite left #mojo
21:31 perlite joined #mojo
21:32 Foxcool left #mojo
22:01 mateu I'm getting an escaped slash ala: <\/p> with $self->render( json => {"content", "<p>Mojo</p>"} )
22:05 mateu Is there a way to change that behavior?
22:17 marty left #mojo
22:38 mateu I guess I could do:  $self->render( text=> encode_json($hashref), format => 'json' }
22:39 Quai left #mojo
22:39 Quai_ joined #mojo
23:16 mattastrophe left #mojo
23:53 hoelzro|home left #mojo

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