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

IRC log for #mojo, 2014-10-08

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

All times shown according to UTC.

Time Nick Message
00:05 D4RK-PH0ENiX joined #mojo
00:30 tempire ooo
00:30 tempire A craigslist quote
00:30 tempire That would be great
01:06 sri \o/
01:13 preaction joined #mojo
01:18 Averna joined #mojo
01:33 good_news_everyon joined #mojo
01:33 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/OR_iaw
01:33 good_news_everyon mojo/master 107a516 Sebastian Riedel: every_upload always returns an array reference
01:33 good_news_everyon left #mojo
01:49 D4RK-PH0ENiX joined #mojo
01:59 asarch joined #mojo
02:04 d4rkie_ joined #mojo
02:06 human39 joined #mojo
02:14 woz joined #mojo
02:18 jberger sri++ # fixes!
02:18 jberger so we didn't bump to 6.0?
02:30 sri jberger: why would we bump to 6.0?
02:30 jberger breaking changes?
02:30 purl breaking changes are a way to make people aware of the fact that mindless updates are a bad idea...
02:31 sri i fixed the rules instead :) https://github.com/kraih/mojo/commit/193541fe9d256782f3d8396a0a6012a470695b65
02:31 * jberger pushes purl down the stairs
02:31 * purl attaches herself to jberger using suction and a ham straw
02:31 sri because imo we really need to be prepared for security issues
02:31 jberger yeah
02:32 jberger though I think we could have just bumped the version number and been in compliance too, but I'm not complaining
02:34 fhelmber_ joined #mojo
02:38 jberger I like the every_* names too
02:40 jberger I'm surprised I didn't have to defend returning an array reference
02:41 jberger I expected at least some calls for those methods to return a list
02:43 Eke- joined #mojo
02:46 sri i'm not a fan of adding more methods to Mojolicious::Controller, but at least they are not ugly
02:48 sri jberger: array ref is the right choice because you most likely want to pick individual values
02:49 sri $c->every_cookie('foo')->[0]
02:50 sri some choices in the api are indeed a bit... odd
02:50 sri like my $names = $c->req->headers->names and my @names = $c->param
02:50 jberger that and since we are trying to remove list-flatten bugs I thought I would make it as obvious as possible
02:51 sri i wonder how many methods we have that actually return lists
02:52 sri most should be cargo culted from old apis... like catalyst... i have a tendency to use refs nowadays
02:52 jberger I use refs too
02:53 jberger if only because I want to only construct one array rather than two
02:53 sri with postderef it's becoming mostly a nobrainer
02:53 jberger Also the return list versus return array thingy
02:53 jberger sri yeah
02:54 jberger anyway good work
02:54 jberger in other news, the new patio is complete and I bought a propane area heater. who's coming over for a late night beer?
02:55 woz joined #mojo
02:55 sri that's an odd one too http://mojolicio.us/perldoc/Mojolicious/Validator/Validation#error
02:55 noganex_ joined #mojo
02:56 sri yay late night beer \o/
02:56 jberger utepils!
02:57 jberger And speaking of utepils...
02:57 jberger we should decide on mojoconf host soon
02:58 sri indeed
02:58 jberger I still would prefer doing it in conjunction with yapcna
02:58 jberger if tempire is up to handling the lion share
02:58 jberger I would be happy to help where possible
02:59 jberger but I'm still 4 ish states away
03:00 jberger I don't know if the Copenhagen guys are still game, but we should probably get some idea is they are maybe interested in waiting until 2016
03:01 jberger s/is/if/
03:04 jberger maybe there are some potential sponsors in California? hint hint
03:05 sri i've not heard anything new from anyone recently
03:06 jberger Well I would hate to wait too long and end up with neither
03:08 sri we also still really need a book -.-
03:12 jberger yeah we do
03:12 jberger I need more hours in the day
03:13 jberger I would love to write one, but I just keep not having the time
03:14 basic6_ joined #mojo
03:25 woz joined #mojo
03:36 doublelel joined #mojo
03:52 irq joined #mojo
03:53 odc joined #mojo
03:56 woz joined #mojo
04:11 odc joined #mojo
04:22 KCL_ joined #mojo
04:28 woz joined #mojo
04:34 zivester joined #mojo
04:43 sri i still would like to find a more elegant solution for bundled files
04:43 sri (bundled with mojo core)
04:44 sri as in server.crt, entities.txt, jquery.js...
04:47 arpadszasz joined #mojo
04:47 sujithm joined #mojo
04:57 doublelel joined #mojo
05:14 woz joined #mojo
05:31 d4rkie joined #mojo
05:40 sujithm joined #mojo
05:46 sujithm_ joined #mojo
05:56 Eke- joined #mojo
06:01 tempire I honestly have no idea how to run a conference, much less guarantee class attendence like oslo.pm did.
06:02 neyasov joined #mojo
06:02 Eke|| joined #mojo
06:02 tempire I'm not even sure what demand is like in the US
06:02 tempire Though, we do have 2k euros to use, so that's something.
06:06 tempire There's also a big issue of time. If I commit to this, I would be committing to putting on the conf, teaching a class, & writing the book.
06:06 tempire That's a lot.
06:07 tempire Regarding the class - Oslo already has quite a few Perl firms that are hooked into each other.
06:07 tempire I don't have any contacts to firms in the US
06:08 tempire So, this is me putting out feelers, I suppose, to companies that are interested in mojo/non-blocking training.
06:08 tempire Maybe even an enterprise web service design course.
06:09 Insane I wan to have 2 separate configs for mojo and hypnotoa to reload them for hot deployment, could I reach this?
06:10 tempire Insane: See http://mojolicio.us/perldoc/Mojolicious/Plugin/Config
06:10 tempire use different modes
06:11 tempire Actually, I'd be interested in putting together an enterprise web service design course.
06:14 woz joined #mojo
06:16 tempire I'd want to draw a different crowd than just the YAPC attendees.
06:21 markov joined #mojo
06:23 tempire Or, I should say, more than just the YAPC attendees.
06:29 batman tempire: I'm pretty sure Oslo.pm would help out with the practical stuff.
06:29 batman I would even fly in early to carry sodas for you ;)
06:35 fhelmber_ joined #mojo
06:38 dp_ joined #mojo
06:42 sujithm joined #mojo
06:46 dod joined #mojo
06:48 rawler joined #mojo
06:49 sujithm joined #mojo
07:04 basiliscos joined #mojo
07:14 woz joined #mojo
07:25 aleksey joined #mojo
07:26 Vandal joined #mojo
07:31 vytas joined #mojo
07:31 neyasov joined #mojo
07:38 woz joined #mojo
07:47 trone joined #mojo
08:07 fhelmber_ joined #mojo
08:20 rem_lex joined #mojo
08:33 arthas joined #mojo
08:35 chansen alanminter: Thanks for the report, I have released a new version of Time::Moment on CPAN which should be cpanm friendly
09:26 basiliscos joined #mojo
09:27 purl joined #mojo
09:44 basiliscos joined #mojo
09:45 aleksey joined #mojo
09:53 basiliscos joined #mojo
10:07 mishantil Since there seem to be quite a few Apple-users here; are there any special considerations one have to make with regards to running perl+perlbrew+mojolicious on OSX?
10:08 basiliscos joined #mojo
10:10 bpmedley mishantil: I don’t recally doing anything crazy to get them to work.
10:15 mishantil bpmedley: Thanks. :)
10:46 ver joined #mojo
10:55 lb siiiigh, chrome just POST'ed as response to a 303
10:57 marcus tempire: "Enterprise Web Design" <- Can we expect a lot of beige? :)
10:58 lb sri: btw, http://irclog.perlgeek.de/mojo/2014-07-23#i_9070999
11:14 basiliscos joined #mojo
11:28 D4RK-PH0ENiX joined #mojo
11:39 neyasov_ joined #mojo
11:46 lipizzan joined #mojo
11:46 neyasov_ joined #mojo
11:52 jberger tempire: sure you can want to draw more than just the YAPC attendees, but think about it the other way, you don't have to start at zero either
11:54 neilhwatson joined #mojo
12:21 d4rkie_ joined #mojo
12:30 risugg joined #mojo
13:20 asarch joined #mojo
13:26 sri lb: ?
13:27 davido___ joined #mojo
13:28 zivester joined #mojo
13:29 tbushell8512 joined #mojo
13:31 marty o/
13:35 good_news_everyon joined #mojo
13:35 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/x0IMgA
13:35 good_news_everyon mojo/master 6f31800 Sebastian Riedel: use more future proof examples
13:35 good_news_everyon left #mojo
13:35 lb sri: I totally advocated the every_ thing 3 months ago and you said "no" ;)
13:36 sri lb: that's not how i read it
13:36 sri but $dom->val is an interesting case now
13:37 sri because of https://github.com/kraih/mojo/issues/684
13:37 lb i switched our validator to always return a collection
13:37 lb hmm
13:39 neyasov__ joined #mojo
13:47 genio atom .
13:47 genio gahh. wrong window
13:52 miquelet joined #mojo
13:55 ignacio_ joined #mojo
13:58 zivester joined #mojo
14:01 robinsmidsrod joined #mojo
14:04 miquelet joined #mojo
14:06 punter joined #mojo
14:08 punter Is it necessary to upgrade to Mojolicious 5.48, even if I (as a web developer) have never used list context anywhere?
14:14 sri see https://groups.google.com/forum/#!topic/mojolicious/aJTYjRCPjOE
14:17 genio nobody has replied and complained... that's good
14:18 mst punter: have you ever constructed a hash?
14:19 mst punter: because 'foo => $m->param("foo")' totally uses list context
14:22 marty joined #mojo
14:25 phips joined #mojo
14:26 phips left #mojo
14:30 sh4 joined #mojo
14:33 punter mst, I don't use param calls that way. I'm aware of the danger.
14:34 mst appparently you, and the Catalyst userbase, were the only ones ;)
14:34 punter it was common practice in the company I work for, to capture the parameters in scalar variables at the top of each route handler
14:34 punter so I followed suit
14:36 punter I guess I was lucky
14:40 sri the catalyst situation is funny though... the recommended way seems very error prone
14:40 sri $c->params->{foo} may be a scalar *or* arrayref depending on user input
14:49 basiliscos joined #mojo
14:53 cpan_mojo Task-BeLike-RJRAY 0.008 by Randy J Ray - http://metacpan.org/release/RJRAY/Task-BeLike-RJRAY-0.008 (depends on Mojolicious)
14:54 doublelel joined #mojo
14:55 dod joined #mojo
15:01 disputin joined #mojo
15:06 neilhwatson joined #mojo
15:22 hesperaux joined #mojo
15:27 sujithm joined #mojo
15:29 preaction joined #mojo
15:35 sujithm joined #mojo
15:36 batman sri: yeah. That is awful.
15:37 batman I wish it was cheaper making objects. Then the return value from param() could be a collection. (Since it stringifies)
15:39 dotandimet joined #mojo
15:50 KCL joined #mojo
15:51 sri batman: https://github.com/kraih/mojo/issues/684
15:51 mst batman: that would probably end up being even more confusing
15:55 fhelmber_ joined #mojo
16:17 Kripton joined #mojo
16:27 good_news_everyon joined #mojo
16:27 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/CEaafw
16:27 good_news_everyon mojo/master 687a49f Sebastian Riedel: use less documentation boilerplate for every_* methods
16:27 good_news_everyon left #mojo
16:43 batman sri: right :/
16:44 batman another possibility could be to always return an array-ref.
16:44 batman but maybe-this-or-that is no good :(
16:44 batman mst: i wouldn't know.
16:50 sujithm joined #mojo
16:56 dotandimet joined #mojo
16:56 alanminter I'm having a hard time with sending (UserAgent) post parameters
16:57 alanminter I need to send 16:47:46 as 16%3A47%3A46
16:57 ignacio__ joined #mojo
16:57 alanminter If I include "16:47:46" it remains as-is (in the body of the post)
16:58 alanminter If I send "16%3A47%3A46" it gets escaped to "16%253A47%253A46"
16:58 alanminter Is there some trick I can do with binary/bytes so that "16%3A47%3A46" stays as-is?
17:13 sujithm joined #mojo
17:17 neilhwatson joined #mojo
17:22 sri sometimes i hate how magical some parts of perl are
17:25 sri do("foo.pl") searches for a foo.pl file in @INC
17:25 basiliscos joined #mojo
17:27 sri and the fun part, @INC has a higher precedence than the current working directory
17:27 punter joined #mojo
17:27 sri and since we use do() to load apps... "morbo foo.pl" will load whatever is found in @INC
17:27 alanminter even if you unshift '.' ?
17:28 alanminter eww
17:28 sri i've just checked, Plack does the exact same
17:29 alanminter ("eww" was at the problem, not the implementation)
17:30 alanminter does morbo ./foo.pl avoid the problem?
17:31 sri yes
17:31 sri i've actually updated all out examples yesterday ;p
17:31 sri except the one on the frontpage
17:32 alanminter bah, I need to go cry in a corner till I work out how to post 16%3A47%3A46 -- API requires me to send a string I cannot send
17:32 sri you can always build your own request manually
17:33 alanminter ooh, hadn't thought of that -- i'll chew on that later.  thx
17:33 sri http://mojolicio.us/perldoc/Mojo/UserAgent#start1
17:38 sujithm joined #mojo
17:38 woz Can anyone tell me how my $object = BaseSubClass->new(name => 'value'); works ?
17:39 woz Should that always work?
17:39 woz i.e. should name always be set to value ?
17:40 good_news_everyon joined #mojo
17:40 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/tctNug
17:40 good_news_everyon mojo/master fcb8046 Sebastian Riedel: use more links in start method description
17:40 good_news_everyon left #mojo
17:41 woz I've got sub new { shift->SUPER::new->parse_opts(@_) };
17:41 woz Does that prevent the attributes from being processed?
17:44 sri i think what annoys me most is that the do() logic is not actually explained in the pod
17:44 sri 'foo.pl' is magical, while './foo.pl' is not
17:47 disputin joined #mojo
17:49 Eke- joined #mojo
17:53 ignacio_ joined #mojo
17:57 fhelmber_ joined #mojo
18:10 tianon sri: is it actually supported to do "morbo some-file-from-INC.pl", or is it just an accident that it works?  (ie, couldn't the fix be to explicitly abspath or at least fullpath the argument before passing it to do()?)
18:11 tianon and I'm even willing to put my money where my mouth is on that one :)
18:11 tianon (and make the PR)
18:13 sri tianon: i don't know
18:14 tianon well, it's certainly not documented anywhere, right? :)
18:14 sri hypnotoad already does abspath, so there's at least some juggling to do to get it all consistent
18:19 tianon sounds fair; I'll go take a look :)
18:33 Jonis with Mojo::Pg is it possible to do a ('select * from storage where id = (?)', $id, sub => { ..}) or something similar?
18:36 sri is storage a keyword or a random table?
18:37 Jonis table
18:37 sri and this is why foo and bar are valuable in doc examples!
18:38 sri Jonis: if you couldn't do that Mojo::Pg would be a total failure
18:38 Jonis :)
18:39 Jonis I was just reading the Mojo::Pg::Database perldoc and didn't see any examples that used placeholders, and sucking at non-blocking I was unsure about the syntax
18:40 Jonis well, any queries that did, only the inserts
18:40 Jonis I'm probably bad at reading docs, but I thought I'd ask here
18:48 sri Jonis: there you go https://github.com/kraih/mojo-pg/commit/d4b02121af1dfbe7d49bb1f83adae8427039fb10
18:50 Jonis sri: thanks, that's brilliant :)
18:50 Jonis also trying to get used to signatures
18:51 sri <3 signatures and postderef
18:54 genio seeing "use experimental 'signatures';" makes me so happy.
18:55 cpan_mojo Mojolicious-Plugin-AssetPack 0.29 by Jan Henning Thorsen - http://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-AssetPack-0.29
18:55 disputin joined #mojo
19:01 berov joined #mojo
19:06 ceej__ joined #mojo
19:10 * berov thinks the new release 5.48 broke $c->cookie($cookie_name =>$cookie_value) ; Example: https://gist.github.com/kberov/12a8351aaf14121f8b08
19:10 berov new cookie value is not set
19:16 berov or what am I doing wrong?
19:20 good_news_everyon joined #mojo
19:20 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/0I1ELg
19:20 good_news_everyon mojo/master a918fac Sebastian Riedel: improved form content generator to allow custom content types
19:20 good_news_everyon left #mojo
19:24 berov before 5.48 this example worked fine
19:34 dod joined #mojo
19:34 ignacio_ joined #mojo
19:41 berov is this a bug or not Example: https://gist.github.com/kberov/12a8351aaf14121f8b08 ? anyone?
19:54 sri this could use some attention https://github.com/kraih/mojo/pull/686
19:57 cpan_mojo Mojolicious-Plugin-AssetPack 0.30 by Jan Henning Thorsen - http://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-AssetPack-0.30
19:58 cpan_mojo Mojolicious-Plugin-Bootstrap3 3.2003 by Jan Henning Thorsen - http://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-Bootstrap3-3.2003
19:59 berov there are not comments on Cwd::abs_path being unreliable in the documentation
20:00 batman mudler: i hope the new AssetPack is nicer to you.
20:12 dotandimet joined #mojo
20:12 Jonis hmm
20:25 Jonis this is weird, if I warn $result->hash->{id} before trying to $c->render(json => { id => $result->hash->{id} }) it'll time out.
20:25 Jonis so once I've accessed the result it seems to poof
20:29 jberger_ re: Cwd::abs_path: http://blogs.perl.org/users/joel_berger/2012/12/a-question-of-location.html
20:29 sri tldr ;p
20:31 jberger_ abs_path is broken on some platforms
20:31 jberger_ but only in rare cases like having newlines in paths
20:33 preaction joined #mojo
20:33 sri :o
20:34 jberger_ it is fixed in recent perls as noted in the rt at the end
20:36 Jonis I'm getting Mojo::Reactor::Poll: Read failed: Can't use an undefined value as a HASH reference at storage line 33.
20:36 Jonis in https://gist.github.com/jonisno/ae60c7ca6fb361f17a92
20:36 Jonis but if I comment out the warn on line 32 it's all dandy
20:37 Jonis any idea?
20:37 purl any idea is welcomed.
20:37 Jonis I've probably done something stupid
20:37 sri http://mojolicio.us/perldoc/Mojo/Pg/Results#hash
20:38 sri can comfirm ;p
20:38 Jonis ah, ref
20:38 Jonis confirmed
20:41 jamesaxl joined #mojo
20:41 tinkerj joined #mojo
20:42 sri maybe this makes it more clear https://github.com/kraih/mojo-pg/commit/ff8033a6c37ec03c7c8ddc8f63b630f5115a3cd6
20:42 tinkerj hi. Can anybody explain me what Mojo::Base does? I try to figure out if it something I can use instead of Moo or Moose. but I can't find any good FAQ or docs about Mojo::Base
20:43 tinkerj my goal is to have attributes for my DBIX Models in my mojo full app.
20:44 tinkerj so I can say: $obj = App::Model::User->new( name => "foo" ); for example.
20:45 sri http://mojolicio.us/perldoc/Mojo/Base
20:47 tinkerj how can I coerce attributes when initiating objects? or set default values or have a type system like age => isa => 'Int' etc?
20:48 good_news_everyon joined #mojo
20:48 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/JDOXIA
20:48 good_news_everyon mojo/master 70bbe92 Sebastian Riedel: use SubClass instead of BaseSubClass in examples
20:48 good_news_everyon left #mojo
20:48 sri tinkerj: you can't do anything that's not documented
20:49 tinkerj sri: what would you recommend for using DBIX::Class with Mojolicious? Moose, Moo or stick with Mojo::Base?
20:49 berov does anyone know why the new cookie value is not reflected in the response in this example:Example: https://gist.github.com/kberov/12a8351aaf14121f8b08
20:49 sri whatever gets the job done
20:50 sri different tools for different jobs
20:50 sri i have all of them in my toolbox
20:51 basiliscos joined #mojo
20:51 berov this test started failing after upgrading to Mojo 5.48
21:25 good_news_everyon joined #mojo
21:25 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/ZxNL0g
21:25 good_news_everyon mojo/master 88017f3 Sebastian Riedel: improved Mojo::Server to load applications consistently for all servers (closes #686)
21:25 good_news_everyon left #mojo
21:32 sri that commit needs portability testing
21:32 disputin joined #mojo
21:36 sri and i still want to know how do() actually handles different path variants like "foo.pl" and "./foo.pl"
21:42 sri guess this leaving github issues open forever or until enough information pops up thing actually works
21:43 sri \o\
21:43 sri /o/
21:57 jamesaxl joined #mojo
21:57 fhelmber_ joined #mojo
22:00 Nei pp_ctl says: /* require doesn't search for absolute names, or when the name is explicity relative the current directory */
22:00 Nei `
22:07 sri Nei: thanks, that is interesting
22:08 Nei well it is implemented as platform specific PERL_IS_ABSOLUTE and ./ or .\
22:08 Nei and ../
22:09 Nei \ only on win32 or so
22:10 good_news_everyon joined #mojo
22:10 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/Q5bEjA
22:10 good_news_everyon mojo/master a6b908f Sebastian Riedel: use more diverse examples again
22:10 good_news_everyon left #mojo
22:40 axlrose joined #mojo
22:56 jberger joined #mojo
23:31 hesperaux_ joined #mojo
23:41 sivoais_ joined #mojo
23:45 jnbek joined #mojo
23:48 good_news_everyon joined #mojo
23:48 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/gSMJ1A
23:48 good_news_everyon mojo/master 1d916ba Sebastian Riedel: be more specific about which value is returned
23:48 good_news_everyon left #mojo

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