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

IRC log for #mojo, 2015-12-17

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

All times shown according to UTC.

Time Nick Message
00:38 miller joined #mojo
00:39 voldemortensen joined #mojo
00:39 hgichon joined #mojo
00:43 miller_ joined #mojo
00:58 asarch joined #mojo
01:04 meshl joined #mojo
01:10 d4rkie joined #mojo
01:20 voldemortensen joined #mojo
02:11 punter joined #mojo
02:12 punter I'm getting this error when I start my hypnotoad server and attempt to visit a page: Can't locate Baza/Controller/Api.pm:   Permission denied at (eval 152) line 1.
02:12 punter even though I only have a Baza::Api class with all the route handlers
02:12 punter My site used to work with just Baza::Api
02:13 punter now it wants Baza::Controller::Api - WHY?
02:19 preaction punter: i vaguely recall a change in the route namespaces, you'll need to add 'Baza' to $r->namespaces();
02:19 punter thanks
02:19 preaction https://github.com/kraih/mojo/blob/master/Changes#L655
02:20 punter thanks
02:32 Zoffix joined #mojo
02:36 nnutter joined #mojo
02:58 d4rkie joined #mojo
03:11 kaare joined #mojo
03:28 noganex_ joined #mojo
03:32 voldemortensen joined #mojo
03:45 phillipadsmith joined #mojo
03:46 harleypig joined #mojo
03:50 voldemortensen joined #mojo
04:00 d4rkie joined #mojo
05:07 sri Zoffix: why are you trying to patch application/x-www-form-urlencoded but ignoring multipart/form-data?
05:08 sri Zoffix: this was by far your worst report yet
05:10 miller joined #mojo
05:26 sh4 joined #mojo
05:38 good_news_everyon joined #mojo
05:38 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/v0STL
05:38 good_news_everyon mojo/master 129e317 Sebastian Riedel: use UTF-8 as the default charset
05:38 good_news_everyon left #mojo
05:41 inokenty-w joined #mojo
05:47 d4rkie joined #mojo
06:16 sri google nexus prices in europe are absoluely insane
06:16 sri $449 vs 649 euro
06:17 Grinnz i just got an email that i can get $50 off a nexus 6P if i sign up for google fi
06:17 Grinnz too bad the 6P is enormous
06:17 sri it's quite beautiful though
06:25 miller joined #mojo
06:37 good_news_everyon joined #mojo
06:37 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/v0SOf
06:37 good_news_everyon mojo/master dfb031b Sebastian Riedel: no charset is an option too
06:37 good_news_everyon left #mojo
07:36 d4rkie joined #mojo
07:50 osfabibisi joined #mojo
07:50 Vandal joined #mojo
08:10 Vandal joined #mojo
08:23 eseyman joined #mojo
08:29 brainbuz joined #mojo
08:29 ribasushi joined #mojo
08:30 AndrewIsh joined #mojo
09:03 Lee_ joined #mojo
09:06 berov joined #mojo
09:07 CandyAngel I think I'm getting Mojo a bit more from coding Mojo::Telnet. I just had circular attributes and I was like "Huh, I don't remember seeing circular attributes anywhere else. I'm doing something wrong" and now I've fixed it! \o/
09:10 melo joined #mojo
09:18 harleypig joined #mojo
09:24 d4rkie joined #mojo
09:30 Ralesk joined #mojo
09:46 phillipadsmith joined #mojo
09:51 meshl joined #mojo
10:10 dvinciguerra joined #mojo
11:12 Zoffix sri, because in the middle of doing it I was trying to figure out how to run perltidy
11:13 Zoffix and then the wires on my drive fell out and I gave up and went drinking
11:24 CandyAngel Hm.. is it okay for Mojo::Telnet to register for events on Mojo::Telnet::Options?
11:40 CandyAngel Meh, I'll just move the code over, I don't think separating it will work properly
11:43 jontaylor joined #mojo
11:53 sue joined #mojo
11:59 sue_ joined #mojo
12:02 neilhwatson joined #mojo
12:37 trone joined #mojo
12:44 vytas joined #mojo
12:54 kaare joined #mojo
13:00 asarch joined #mojo
13:00 d4rkie joined #mojo
13:09 phillipadsmith joined #mojo
13:10 harleypig joined #mojo
13:14 sue joined #mojo
13:27 sri Zoffix: if you find a perltidy one-liner let us know
13:29 ajr_ joined #mojo
13:31 mfontani joined #mojo
14:01 genio I usually do a new file like Grinnz said and then look through the diff to see what it's suggesting.
14:22 bwf joined #mojo
14:23 harleypig_ joined #mojo
14:44 ZoffixW joined #mojo
14:44 ZoffixW sri, I don't use perltidy
14:47 ZoffixW And I really don't understand why you're being this way. You broke your software. I took time to debug the issue. There's really no reason to be condescending to me, saying it my worst whatever and then imply it's my own dumb fault that I don't know how to use tool XYZ that your project uses.
14:47 sri ZoffixW: well, you said we should mention a one-liner in the docs
14:47 sri umm
14:47 sri what's going on here?
14:48 moritz left #mojo
14:49 d4rkie joined #mojo
14:49 sri the quality of your bug reports has been exceptional in the past, and declined a lot in the last few days, that's why i mention it
14:50 sri if you want us to be purely formal, that's ok too, and i'll try to keep my distance
14:51 sri sorry, i did not mean to offend you
14:52 inokenty joined #mojo
14:53 voldemortensen joined #mojo
14:55 jb360 joined #mojo
14:56 jontaylor joined #mojo
15:01 lluad joined #mojo
15:59 voldemortensen joined #mojo
16:03 gryphon joined #mojo
16:07 voldemortensen joined #mojo
16:08 disputin joined #mojo
16:15 meshl joined #mojo
16:32 dod joined #mojo
16:37 d4rkie joined #mojo
16:42 sue joined #mojo
16:49 gryphon joined #mojo
16:56 dod joined #mojo
17:06 bif joined #mojo
17:10 miller joined #mojo
17:10 abra joined #mojo
17:28 meshl joined #mojo
17:40 bjoernfan joined #mojo
17:41 vanHoesel joined #mojo
17:43 bjoernfan joined #mojo
17:43 disputin joined #mojo
18:05 aborazmeh joined #mojo
18:13 asarch joined #mojo
18:27 miller_ joined #mojo
18:30 bif joined #mojo
18:31 bif I'd like to help with SNI in Mojo::Server::Daemon (#882); if anyone has any additional guidance beyond the github issue I'll take it
18:32 bif I see that it may depend on #876...
18:34 sri jberger is currently the one working on #876 the most
18:35 sri if #882 depends on it is arguable, i think it's not so important
18:36 sri guidance might be tricky, since there's no real plan, i was just throwing around an idea
18:38 sri anything specific you need guidance with?
18:39 bif Well... I wasn't sure if there was some additional history or ideas that weren't added to the gh issue
18:39 bif I'll talk to Joel--thanks!
18:40 sri no, that one is pretty much free of history
18:42 bif :)
18:45 jberger bif: I'm not sure how much I'll be able to help
18:45 jberger I'm learning #876 as I go
18:45 sri i expect testing to be the biggest problem with #882
18:45 jberger in that case, lets start by writing some tests
18:46 sri i think those would actually fit nicely into the new t/mojo/daemon_ipv6_tls.t file
18:46 sri perhaps reusing some of the certs used by t/mojo/ioloop_tls.t
18:48 sri just remember to keep notes on how to regenerate new certs https://github.com/kraih/mojo/blob/master/t/mojo/ioloop_tls.t#L13
18:51 bif *nod*
19:05 cpan_mojo AnyEvent-WebSocket-Client-0.32 by PLICEASE https://metacpan.org/release/PLICEASE/AnyEvent-WebSocket-Client-0.32
19:09 disputin joined #mojo
19:09 disputin joined #mojo
19:14 disputin joined #mojo
19:15 McA2 joined #mojo
19:25 absolut_todd joined #mojo
19:32 bif jberger, I have some ideas for testing this; I'm working on a poc but need to skip out for a couple hours
19:32 PryMar56 joined #mojo
19:32 bif are we open to some new syntax for listen()?
19:33 jberger how new?
19:33 bif well, right now all the params are picked out of the URL query string
19:34 bif maybe for now we leave that alone and make this accessible at Mojo::IOLoop::Server
19:34 bif I don't have anything concrete atm; I'll be back in a while
19:35 jberger yeah, that's a good start
19:35 jberger and sri already mentioned the url thing in the issue: https://github.com/kraih/mojo/issues/882#issue-121517159
19:35 bif left #mojo
19:36 y1mmm joined #mojo
19:37 lsm joined #mojo
19:42 voldemortensen joined #mojo
19:56 sri i think it's actually already accessible in Mojo::IOLoop::Server ;p
19:56 sri you just pass a hash instead of a string to those options
19:57 sri guess you could add some tests to t/mojo/ioloop_tls.t to make it a feature
19:57 sri and then add the listen query param stuff as a second step
20:00 jberger bif left, though I guess its a good thing to link to on the log
20:03 jberger ooh 20 years of the Schwartzian Transform
20:13 d4rkie joined #mojo
20:20 voldemortensen joined #mojo
20:57 disputin joined #mojo
20:57 disputin joined #mojo
21:28 orev given the following code: http://fpaste.org/302442/50387613/  I'm surprised to find that the call to $c->a->dostuff also calls the constructor for a.  I'm not really clear on what's going on there
21:28 disputin joined #mojo
21:29 orev does the $c->a call always execute the helper, then acts on the return value to locate the dostuff method?
21:29 disputin joined #mojo
21:29 Grinnz_ orev: don't use $a
21:29 Grinnz_ it's a global variable
21:29 orev it's an example for chrissakes
21:29 orev jessus
21:30 genio orev: He's just making sure you're aware
21:30 CandyAngel orev: It'll call the constructor the first time you use the 'a' helper
21:30 orev CandyAngel: but that's only because i'
21:30 orev CandyAngel: but that's only because I'm using 'state' there
21:30 orev ?
21:30 Grinnz_ yes
21:31 CandyAngel Yeah, if you didn't have state, it'd call the constructor every time
21:32 CandyAngel Whenevr you have state $a, you're basically saying "do this statement, but only once"
21:32 CandyAngel And then it is memoized by Perl
21:32 jberger CandyAngel: technically, I think its effectively closed over
21:32 orev I'm asking about how the helpers are executed.  I understand woht's going on with 'state'
21:33 jberger orev: helpers are just methods
21:33 CandyAngel jberger: 2fast4me
21:33 jberger ninja-ed
21:33 orev ok, makes sense.  I think I had it in my head but just cloudy.  now it's clear
21:33 jberger ok
21:34 jberger the nice thing about helpers is that you can call them as methods on the controller or the app and it will DTRT
21:34 jberger and they are curried into templates too
21:34 CandyAngel Sometimesssss
21:34 jberger CandyAngel: ?
21:35 CandyAngel I've had it where I can't access a helper from a controller without going through the app
21:35 jberger CandyAngel: I'm surprised to hear that
21:36 Grinnz_ orev: it uses AUTOLOAD so any unknown methods called on a controller or app will check for a helper to call
21:36 Grinnz_ orev: and from the app, it's passed a dummy controller instance
21:36 Grinnz_ so you always have a controller passed
21:36 CandyAngel jberger: Give me a minute and I'll show you. Chances are, my expectations are wrong..
21:38 CandyAngel Which is why I hadn't said anything :P I need to file a bug report against myself about being able to tell the difference between incorrect Mojo and incorrect expectations :P
21:40 bif joined #mojo
21:41 CandyAngel Also, that reminds me.. I need to write a plugin to make all the mojo commands into subcommands.. I do it so often -.-
21:43 jberger ?
21:43 jberger why would you want the mojo commands as subcommands?
21:44 CandyAngel Name collision
21:45 jberger most apps really shouldn't only keep a few of the default commands anyway
21:45 jberger *should* only
21:45 jberger daemon, eval, get, and maybe routes
21:45 * CandyAngel shrugs
21:45 CandyAngel It works nicely with them all being 'mojo' subcommands :)
21:45 bif jberger: just caught up from the log re #882; I missed the sri's URL idea first time through. That shouldn't be too hard.
21:46 jberger CandyAngel: maybe prefork too, depending on how you deploy
21:46 bif I'm focused mainly on setting up tests to ensure it works
21:46 jberger bif++
21:49 jberger CandyAngel: are you trying to use nested helpers from the template?
21:50 jberger because that doesn't work
21:50 jberger (by design)
21:55 harleypig I know I can get a param by doing "my $parm = $c->param( 'foo' )". How can I get all parameters without having to know what they are before hand?
21:55 CandyAngel jberger: http://codepad.org/RSpQulpA
21:56 voldemortensen joined #mojo
21:56 Grinnz_ harleypig: $c->req->params->to_hash
21:56 Grinnz_ harleypig: the params (Mojo::Parameters) object has other useful methods as well
21:56 Grinnz_ harleypig: you may also want $c->req->body_params or $c->req->query_params to limit it to one type of parameters or the other
21:57 harleypig Grinnz_: thank you, especially for the pointer to the docs.
22:02 d4rkie joined #mojo
22:04 Zoffix joined #mojo
22:05 Zoffix left #mojo
22:07 jberger CandyAngel: commands are not controllers
22:07 jberger (wait for it ...)
22:08 CandyAngel I'm an idiot? :)
22:08 jberger I wouldn't say that :-P
22:09 Grinnz_ i would expect if you checked the error message from $c->helpers->mycar, it might be more clear
22:09 jberger remember that you have a controller when you are in a request/response context
22:09 jberger in a command you aren't in that context
22:10 Grinnz_ $c in there is not a controller object, it's the command object (and one would usually use $self in that context)
22:10 jberger (I often use $command, but we've discussed that that isn't very standard around these here parts)
22:12 CandyAngel The only reason I can think of why I associated the two was because somewhere I have read 'my $c = shift' in both
22:13 Grinnz_ you may have been hallucinating :P
22:13 Grinnz_ i've never seen $c used for a command
22:13 * jberger neither
22:16 CandyAngel Ohhh.. I see where I got it from. That's annoying
22:16 CandyAngel My brain makes weird links sometimes :P
22:22 voldemortensen1 joined #mojo
22:24 berov1 joined #mojo
22:25 voldemortensen joined #mojo
22:25 CandyAngel It's not used in commands, but it is written as 'my $c = shift' in the helper, so when you call that helper from a command..
22:25 CandyAngel As I said, weird links!
22:26 CandyAngel Err, as in, it is written like that in the guide explaining helpers
22:27 jberger we discussed having a documentation conventions section of the docs at one point
22:28 sri as part of https://github.com/kraih/mojo/issues/830
22:28 sri someone wanted to work on a patch
22:28 sri marcus?
22:34 d4rkie joined #mojo
22:35 D4RK-PH0ENiX joined #mojo
22:36 harleypig As Grinnz_ pointed out, I can get a hash of parameters by using $c->req->params->to_hash, but this doesn't give me parameters included in the url.  I want to have an amalgamated hash of all sources of parameters.  So with a route of /somepage/:someparam, I want to have an args hash that includes { someparam => value }.
22:37 voldemortensen1 joined #mojo
22:37 Grinnz_ harleypig: placeholders aren't included as params
22:38 harleypig Looking at M::Controller it looks like mojo.captures holds that data, but I'm not seeing how I can access that, short of just doing something like $self->stash->{ mojo.captures }
22:38 Grinnz_ you can't. mojo.* are internal use
22:39 harleypig Grinnz_: :] You mean I not supposed to. I can access that value the way I described.
22:40 voldemortensen1 joined #mojo
22:40 Grinnz_ sure, but it will break
22:40 harleypig I realize placeholders aren't included as params, but I want to include them in the args  hash anyway.
22:40 harleypig Grinnz_: Yeah, I know, which is why I'm asking about a way to find out via proper methods.
22:45 jberger harleypig: stash
22:46 jberger or else from the match stack
22:46 orev does it make sense to access the mojo controller from inside your model classes?  or is that breaking the separation?
22:47 jberger harleypig: http://mojolicio.us/perldoc/Mojolicious/Controller#match
22:47 jberger orev: evil
22:47 jberger what do you need it for?
22:47 orev jberger: that's what I figured... :)
22:48 orev thinking of logging for a start.  guess I'll just get the log messages through a package variable or something
22:49 jberger there are different opinions about that, but no one would say to go via the controller for that
22:49 voldemortensen joined #mojo
22:49 jberger I don't personally mind attaching an instance of the app to the model (whether it be the active instance or not :p) others, notably sri, disagree with me
22:50 harleypig ... I take it this kind of question comes up often? Or did I just come at the right time? :D
22:50 jberger and that isn't to be taken lightly, he's almost always right (and I don't say in jest)
22:50 jberger it comes up sometimes yes
22:51 jberger and it usually is about configuration, logging or db access helpers
22:51 orev I'll just check return status in the helper and pull the log message out in there
22:52 harleypig I can't use the stash, there's no way to tell what's been added to it between initial creation and when I access it.
22:52 jberger harleypig: then use the match stack
22:52 harleypig yeah, I'm looking into that now
22:54 jberger perl -Mojo -E 'a("/:this/:that" => sub { $_->render(text => $_->dumper($_->match->stack->[-1])) })->start' get /hello/goodbye
22:58 harleypig oic ... thanks.
22:58 voldemortensen1 joined #mojo
22:58 harleypig hmmm ... looks like some reserved words are in there too.
22:59 harleypig oh, I see now. ok. Thanks for the help.
23:19 jberger ah, dammit
23:19 jberger https://twitter.com/Snowden/status/677623419727429632
23:37 disputin joined #mojo
23:45 sue joined #mojo
23:50 orev yup.  #votethemallout
23:52 asarch joined #mojo
23:57 pink_mist vote the mall out
23:58 genio I never liked those malls anyway!

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