The web in a box - a next generation web framework for the Perl programming language

IRC log for #mojo, 2013-11-18

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

All times shown according to UTC.

Time Nick Message
00:12 Lucas1 joined #mojo
00:52 laouji joined #mojo
00:59 dsteinbrunner joined #mojo
01:57 hummeleBop joined #mojo
02:00 d4rkie joined #mojo
02:16 basic6 joined #mojo
02:38 duncanthrax2 joined #mojo
02:56 athenot joined #mojo
02:56 bowtie_ joined #mojo
02:57 hesperaux joined #mojo
04:12 nicomen joined #mojo
04:12 preflex_ joined #mojo
05:08 laouji joined #mojo
05:15 laouji joined #mojo
06:22 cullum joined #mojo
06:36 Vandal joined #mojo
07:06 btyler joined #mojo
07:07 Adura joined #mojo
07:20 basiliscos joined #mojo
07:21 Tiger joined #mojo
07:21 Tiger joined #mojo
07:29 maxhq joined #mojo
07:37 batman marcus: right.
07:54 dod joined #mojo
08:14 dpetrov_ joined #mojo
08:17 dod joined #mojo
08:35 trone joined #mojo
08:45 hrupp morning all!
08:45 purl morning, hrupp
08:45 hrupp batman: I have a patch
08:46 hrupp Shold I send a puöö request ?
08:46 hrupp pull
08:47 batman hrupp: sure
08:49 hrupp batman: done
08:54 batman hrupp: i don't like it. i'm not sure i like my field() method either... i will try something.
08:55 batman also: why do you push the fields to $self->{fields} ? the field name should be unique, so i want to use a hash...
08:55 hrupp batman: you can't order the universe with a hash ;)
08:56 batman why do you want order?
08:56 hrupp I want to generate templates based on types
08:57 hrupp with ordered fields
08:57 batman hm... i need to think about that one
09:03 ka2u joined #mojo
09:08 batman also, i'm not sure about field_type(). i think the api will be pretty cluttered if we want a method for each meta attribute
09:08 batman i guess the field also should be an object...
09:10 hrupp like $field->meta('type') ?
09:11 batman no. $model->filed($name)->isa
09:11 batman *field
09:12 hrupp sounds good ...
09:20 batman hrupp: https://github.com/jhthorsen/mandel/commit/f8d0510c1ece947931397cf08c8f383bd1bd6418
09:21 batman maybe i should make add_field() public instead of having field() read/write
09:23 batman and fields() should probably return all the objects instead of field names
09:25 marcus lol, I thought Mojolicious::Plugin::Mobi was a mobi file renderer
09:26 moritz and instead it renders Mobi Dick?
09:27 batman that plugin name is just bad :(
09:28 batman hrupp: https://github.com/jhthorsen/mandel/commit/0eef94ac0cd35ba7029d9ade2b6d0abe78710b70 # and this
09:28 batman hrupp: let me know when you got any feedback
09:39 hrupp batman: field() read/write is good
09:39 batman :)
09:39 hrupp and fields() should probably return all the objects instead of field names: yes
09:39 hrupp when it's an object
09:39 batman it's always an object. did you look at the diff?
09:41 hrupp I looked. This should be a comment only :)
09:41 * hrupp wiil dive deeper into Mandel-  code to provide better patches
09:41 hrupp s/wiil/will/
09:41 fhelmber_ joined #mojo
09:42 batman hrupp: the patch was not bad from what you had to work with.
09:42 hrupp thanx
09:42 batman but i think making the field an object is the right thing to do
09:42 hrupp You're right
09:43 batman what do you think about the $field->isa attribute instead of $field->type ?
09:44 batman in moose it's called $attr->type_constraint
09:44 batman maybe i should just copy that
09:44 hrupp in the object structure it's a ->{isa}, so it's consistent whent it's called ->isa
09:45 hrupp otherwise
09:45 hrupp it's more compatible with moo/mouse/moose
09:46 batman i think compatibility is good
09:46 themage joined #mojo
09:46 hrupp ever
09:46 batman do you want a new release?
09:46 batman ever?
09:46 purl hmmm... ever is really a long time
09:46 hrupp ever too ;)
09:47 batman i don't get it :(
09:48 hrupp I mean 'release often' is a good idea
09:48 batman ok.
09:48 hrupp You can see that the project 'is living'
09:48 batman true
09:51 batman want your name in the AUTHOR section?
09:52 batman i'm adding you now...
09:52 hrupp I only had the idea. The coding is your's.
09:52 hrupp But thanks
09:52 batman i like to have people to blame ;)
09:54 hrupp :)
09:54 hrupp batman ++ for 'implemet idea speed'
09:54 batman hrupp++ # putting ideas into batman's head
09:55 batman oh my god! we're putting the 'friendly meter' through the roof this morning :P
09:55 batman hrupp: https://metacpan.org/pod/release/JHTHORSEN/Mandel-0.11/lib/Mandel.pm#AUTHOR
09:57 Vandal joined #mojo
09:57 hrupp hahaha, this week has a good start
09:58 batman :)
09:58 batman hrupp: any comments/ideas are more than welcome.
09:58 batman does the Mandel API feel natural to use?
09:59 hrupp batman: I felt at home from the beginning.
09:59 batman haha. ok :)
09:59 hrupp more ideas will come during using mandel in development
10:00 * batman like
10:12 mire_ joined #mojo
10:15 kwa You guys need to shout at each other to make the tingly feeling in my stomach go away.
10:15 kwa If you don't, I fear I might spend too much at Christmas.
10:17 batman yeah. sorry about that :(
10:20 kwa :)
10:20 * hrupp will be more seriously in future
10:33 basiliscos joined #mojo
10:37 hesperaux joined #mojo
10:41 Lucas1 joined #mojo
10:41 denisboyun joined #mojo
10:55 laouji joined #mojo
10:56 sawtooth does Mojo::UserAgent intentionally urlencode cookies?
10:56 sawtooth http://pastebin.ca/2476964
10:56 sawtooth API responds with a cookie starting in '##' :/
10:57 sawtooth doesn't like subsequent calls with my %23%23... cookie
10:58 kwa sawtooth: I'm not sure of the answer, but make sure you're running the latest version of Mojolicious.
10:58 sawtooth kwa: thnx of course:
10:58 sawtooth % cpanm Mojolicious
10:58 sawtooth Mojolicious is up to date. (4.57)
10:59 kwa Cool. I've seen sri spend time looking into an issue in the past and forget to ask that. Just wanted to make sure. :)
11:00 sawtooth me too!
11:00 sawtooth i'm just going to hack it around a bit with LWP::UA and see if I can make it work and come back to mojo later
11:01 kwa sawtooth: I'm reading a stackoverflow post where they're recommending not using non-ASCII characters in cookie names.
11:02 kwa It's from 2009 so things have most likely progressed.
11:02 kwa http://stackoverflow.com/questions/1969232/allowed-characters-in-cookies
11:03 sawtooth I thought that is probably the case, but consuming 3rd party API I don't have much influence in telling them the implementation is wrong!
11:05 kwa I think Mojo::UserAgent is doing the right thing. Their API however, leaves a lot to be desired. :/ :)
11:09 kwa sawtooth: Have you tried setting the cookie name with a Mojo::ByteStream object? Something in the back of my head thinks that might be what you're looking for.
11:13 sawtooth no I haven't, hmmmm
11:37 sanya_com_ua joined #mojo
11:55 sanya_com_ua Hi, all. I have a question about text_area helper. All browsers ignore newline right after <textarea> tag and this behavior makes problem with content beginning with newline. So question is - should text_area helper add extra newline before content or I need append extra newline by myself?
12:19 hrupp joined #mojo
12:28 dsteinbrunner joined #mojo
12:33 batman why do you care?
12:59 athenot joined #mojo
13:00 sanya_com_ua I don't want something broken later if I append newline now by myself and sometimes later text_area helper will append extra newline too
13:17 laouji joined #mojo
13:24 laouji joined #mojo
13:24 russum joined #mojo
13:26 batman but why do you want the newline in the first place..?
13:35 diegok sanya_com_ua: I think you should add by yourself if you really care :)
13:38 sanya_com_ua I'm generating textarea with predefined data. Sometimes my data begins with empty line. In this case browsers silently ignore my first line.
13:42 batman i think you should stop caring.
13:50 sanya_com_ua Please, try this gist https://gist.github.com/sanyacomua/7528031 . This is a simple form, when we submit form, and rerender it again first lines disappers. is it right behavior ?
13:57 * batman stopped caring
14:15 denisboyun joined #mojo
14:15 odc joined #mojo
14:26 odc does someone know how to set the slaveOk flag in Mango?
14:26 odc having a replica set is kinda pointless without this
14:32 batman odc: can you do it with https://metacpan.org/pod/Mango::Database#command ?
14:35 odc batman, that deserves a try
14:36 batman :)
14:39 btyler joined #mojo
14:40 dvinciguerra joined #mojo
14:50 odc but coffee break was more urgent
14:53 odc no such cmd: slaveOk at ./test.pl line 11.
14:53 odc of course :(
14:55 odc batman, in case you're interested, this is the only reference to slaveOk i can find in the code : https://metacpan.org/source/SRI/Mango-0.18/lib/Mango/Protocol.pm#L86
14:56 sri odc: unsupported
14:57 odc !!
14:57 sri and i don't think mango will ever support it
14:57 sri since it's deprecated
14:58 odc sri, isn't there a way to pass the slave_ok flasg manually in the $cursor->all command for example?
14:58 sri btw. replica-sets are pointless with mango, since those are unsupported as well
14:59 odc what? i just read about it in the official docs
14:59 odc what am i supposed to use to get some form of HA?
14:59 sri https://groups.google.com/forum/#!topic/mojolicious/QM3cBkWD6XM
15:00 odc thx
15:01 d4rkie_ joined #mojo
15:02 sri btw. readPreference is the replacement for slaveOK
15:02 sri i would only implement that
15:07 odc mmm ok
15:08 odc i guess installing a 3rd replica (to always have a master) would be the easiest way to solve this problem
15:14 d4rkie joined #mojo
15:37 batman mst: a colleague of mine says that "Foo" = "foo " is according to ANSI/ISO SQL-92. that's all i know :P
15:38 moritz when in doubt, blame the standard (or a colleague :-)
15:38 sri WHY NOT BOTH
15:46 batman i'm not blaming "colleague", since it's too difficult to spell :/
15:46 batman sri: hehe
15:46 moritz batman: spell them cow-orker
15:46 purl 'them' may be spelled correctly
15:49 batman :D
15:50 batman good idea :)
15:50 gryphon joined #mojo
15:51 batman is there a way to figure out who gave ++ on metacpan?
15:51 sh4 joined #mojo
15:53 beyondcreed joined #mojo
15:59 sh4 joined #mojo
15:59 cfedde joined #mojo
16:17 Dandre hello,
16:19 Dandre when I use this function:   $c = $c->redirect_to('named', foo => 'bar'); where 'named' is a template, how can I get foo content in the template?
16:19 Dandre I have tried $foo but I get Global symbol "$foo" requires explicit package name at template
16:25 dvinciguerra Dandre: you can use $c->flash(foo => 'bar');
16:26 Dandre ok i'll try
16:27 dsteinbrunner batman: that is a common question on metacpan
16:27 dsteinbrunner #metacpan rather
16:28 dsteinbrunner https://github.com/CPAN-API/metacpan-examples/tree/master/scripts/endpoints/favorite
16:30 denis_boyun joined #mojo
16:38 Dandre dvinciguerra: this doesn't help
16:41 dvinciguerra Dandre: $c->flash( foo => 'bar'); and in template you will get foo value like this: %= flash 'foo'
16:41 dvinciguerra It doesn't works?
16:42 denis_boyun__ joined #mojo
16:45 Dandre ok I had put $foo
16:45 Dandre sorry
16:45 dvinciguerra no problem!
16:50 sri interesting, it appears mongos is not smart enough to filter out $readPreference from queries it forwards to shards
16:58 sri i'll make $collection->find({'$query' => {...}, '$readPreference' => {...}}) work though
17:08 tianon joined #mojo
17:26 batman sri: planning an advent calendar? :)
17:26 sri no
17:26 sri same as last year, i don't do advent calendars
17:28 basiliscos joined #mojo
17:29 batman Sounds good.
17:29 batman dsteinbrunner: don't get your answer,
17:30 batman So I will try not to think about it :)
17:31 sri batman: i'll contribute an entry of you want to organize a calendar
17:31 sri s/o/i/
17:32 * sri watches batman run away
17:32 batman My skills are lacking in the advent department :O
17:33 batman I was thinking the other way around ;)
17:33 sri i've started the catalyst advent calendar... no fucking way i would do that again... it's really hard unthankful work
17:34 batman Hehe. I can imagine. I can make a low budget tweet-calendar :)
17:34 tianon joined #mojo
17:35 batman One new link each day. I will probably mess that up as well :P
17:42 beyondcreed joined #mojo
17:43 marty google tag manager makes my head swim
17:58 fhelmbe__ joined #mojo
18:12 tianon joined #mojo
18:27 abra joined #mojo
18:38 trone joined #mojo
18:42 delias joined #mojo
19:00 basiliscos1 joined #mojo
19:03 jnbek joined #mojo
19:06 dod joined #mojo
19:12 Mike-PerlRecruiter_ joined #mojo
19:16 dsteinbrunner batman: the 6-list-plussers-by-module.pl is a script to help you get what you are looking for
19:17 dsteinbrunner sorry I did not link more directly
19:20 batman oh! it had to be the one at the bottom :P i kind of gave up before i reached that one :)
19:42 mire_ joined #mojo
19:45 asarch joined #mojo
19:47 markus joined #mojo
19:47 markus Hello
19:47 purl hola, markus.
19:49 markus Some days ago, i was here, because I start to write a Webserver for an existing Applicationserver. That Applicationserver has a TCP interface, with that i want to connect the webserver with the applicationserver.
19:50 markus After reading the manual, I found the Mojo::IOLoop::Client Class
19:50 markus is this the right way, or is there any better way to connect a mojo app with the applicationserver?
19:50 sri can we stop with the "marcus" variations please
19:51 exonity ;-)
19:51 marcus \o/
19:51 sri \o/
19:51 * marcus is the real slim shady
19:51 exonity new album? hehe ;)))
19:51 sri marcos: afraid i have to put you on ignore
19:53 sri exonity: http://mojolicio.us/perldoc/Mojolicious/Guides/Cookbook#Event_loops
19:53 sri use whatever you like
19:55 exonity okay, but one more question, is it technical possible, to open one connection from mojo app to application server and after that, every "HTTP Controller request" can use this connection?
19:58 marcus exonity: sounds like you want a web socket
19:58 sri very complex topic, if you need an example, Mango does that if you set max_connections(1)
19:59 exonity marcus: websocket is beetween browser and webserver, but between webserver and applicationserver there have to be only one connection
19:59 exonity because of ressources
19:59 sri non-blocking or blocking?
20:00 exonity do you mean non-blocking on webserver-client?
20:00 sri the connection to the appserver
20:01 exonity none-blocking
20:01 exonity the application server is only pushing sensor data
20:02 exonity that data dont get edited
20:03 exonity did you mean that?
20:03 sri Mojo::Redis might be a better example
20:03 exonity thanks!
20:05 hummeleBop joined #mojo
20:07 batman Mojo::APNS is pretty simple iirc
20:17 exonity Mojo::Redis looks good!
20:21 batman oh yeah! ;D
20:21 batman too bad it has failing tests...
20:21 batman timing_issues--
20:21 exonity :-/
20:22 exonity does Mojo::APNS makes it better?
20:23 batman makes what better?
20:24 marcus APNS makes everything better!
20:24 marcus it contains magical apple fairy dust.
20:25 batman exonity: APNS is for sending push notifications to iphone and friends
20:25 exonity I thought you post it as an answer on my question
20:26 batman it sounded like you where looking for examples using Mojo::IOLoop::Client...
20:26 batman that's why i posted it.
20:26 batman i might have been confusd
20:26 batman *confused
20:26 exonity I have a mojo webserver with many clients, connected with websocket.
20:27 exonity there is a second server between the webserver
20:27 exonity there should only be one connection between application and webserver
20:27 * batman folds.
20:27 exonity that is my problem ;)
20:28 exonity so the webserver should share the connection to the applicationserver
20:28 batman do you know why you want this, or do you just -think- you need it?
20:28 exonity i know, why i want this
20:29 exonity The applicationserver doesnt allow more that one client
20:29 exonity that=than
20:29 sri you're screwed then
20:30 sri any decent web server will have at least multiple worker processes that can't share one connection
20:32 * sri would go <webserver> + <redis pub/sub> + <data collection daemon> + <appserver> with such harsh constraints
20:35 batman i would go....
20:35 batman CRAPCRAPCRAPCRAPCRAPCRAPCRAPCRAPCRAPCRAPCRAP!
20:38 lukep joined #mojo
20:48 marcus o/' What does the bat say? o/'
20:49 cooper joined #mojo
20:51 batman squiiik?
20:52 elvis joined #mojo
20:52 elvis mucho mojo
20:52 batman hi elvis :)
20:53 elvis batman: hey!
21:01 btyler it feels a bit like an anti-pattern, but boy is it fun to Mojo::IOLoop::Stream-ify a pipe-opened process and fire the output out over a websocket.
21:22 gtodd btyler: if it feels fun it could be against a law or design principle ;-)
21:23 btyler heh, of course, no fun allowed!
21:25 KindTwo joined #mojo
21:33 jberger o/
21:34 jberger hi all, I'm back!
21:34 jberger ... and then I saw this: https://twitter.com/cpan_new/status/402548489734733824
21:34 marcus backman?
21:35 jberger nananananananana BACKMAN!
21:39 trone joined #mojo
21:41 jberger anyway, I don't know that I feel like going back over the last say 5 days of log
21:41 jberger did anything big happen?\
21:43 hesperaux joined #mojo
21:47 marcus jberger: sri killed a couple of kittens.
21:47 marcus the usual...
21:47 purl rumour has it the usual is a ham and cheese sandwich or a slice of tomato-basil
21:50 jberger sounds about right
21:50 tianon a bunch of cool releases :)
21:51 tianon go read the Mojolicious and Mango changelogs :)
21:52 sri jberger: only the perl 5.10/5.12 eval thing comes to mind
21:54 tianon I guess looking over them myself, Mango had a couple nice bugfix releases in the last week or so :)
21:55 sri he wasn't in brazil for that long ;)
21:55 jberger just a week
21:55 tianon lol indeed, that's what I'm realizing now :)
21:55 tianon so just sri, fixing all the things, as usual :D
21:55 jberger though when you travel for 20-odd hours each way, it feels like longer than that
21:55 jberger FIX ALL THE THINGS!
22:03 batman jberger: i've added Mandel::Model::Field
22:41 marty_ joined #mojo
22:41 Adurah joined #mojo
22:41 Lee_ joined #mojo
22:41 hummeleBop1 joined #mojo
22:41 chansen joined #mojo
22:47 russum joined #mojo
22:58 rem_lex|pivo joined #mojo
23:00 jberger also, would anyone be interested in decorator-like syntax for method modifiers?
23:01 jberger which makes it easier to import/export the decorators rather than the method modifiers style
23:01 jberger anyway: https://github.com/jberger/MooX-Decorator/blob/master/ex/simple.pl
23:14 jberger (ps: also discussing on #moose)
23:17 * sri was about to mention p5-mop traits
23:36 dsteinbrunner joined #mojo

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