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

IRC log for #mojo, 2014-08-07

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

All times shown according to UTC.

Time Nick Message
00:35 Averna joined #mojo
00:41 jberger Galileo has an app-specific helper: https://github.com/jberger/Galileo/blob/master/lib/Galileo/Plugin/Modal.pm
00:41 jberger and I have been using them more and more in my own apps for clarifying things
00:42 sri Galileo is a much better organized example
00:43 jberger even my toy app MojoForum has something: https://github.com/jberger/MojoForum/blob/master/lib/MojoForum/Helpers.pm
00:43 sri haha, there's a Model namespace :)
00:43 sri i guess you're ok with the guide changes
00:44 sri and MyApp::Controller being the default
00:44 sri you're not using that convention, but it would fit well into your apps
00:44 jberger yeah, those changes are all fine with me
00:45 sri \o/
00:45 jberger and yeah, I would even think about using a ::Controller namespace
00:45 jberger it would clarify things in both of those apps actually
00:45 jberger its not easy to see that MojoForum::Helpers is not a controller just from looking at the directory tree
00:46 jberger while ::Threads etc are
00:46 sri https://github.com/jberger/MojoForum would be very very clean with a Controller namespace
00:46 sri good argument for the convention, i like those apps a lot!
00:46 * jberger tries
00:47 sri reading Convos was rather shocking
00:48 jberger Galileo doesn't have a ::Model namespace, but it does have ::DB which is essentially the model
00:48 sri one of the reasons i keep the package and use Mojo::Base lines together is so i see right away what kind of class i'm dealing with https://github.com/jberger/MojoForum/blob/master/lib/MojoForum/Helpers.pm#L3
00:48 sri one empty line is not too bad though
00:49 sri wish we could write it all on a single line
00:49 jberger often when I have lots of imports I segregate the Mojo::Base line
00:49 sri class MojoForum::Helpers extends Mojolicious::Plugin {...}
00:50 * sri drools
00:50 * jberger WANTS
00:50 sri that's p5-mop style
00:50 jberger oh, I should make a Mojo app using Moops
00:50 jberger \m/
00:50 sri indubitably
00:59 preaction joined #mojo
01:04 jberger https://github.com/jberger/MojoForum/tree/master/lib/MojoForum
01:13 sri looks nice
01:14 jnbek aye
01:14 jnbek so, who's going to YAPC::NA in 2015?
01:14 jnbek it's just up the road from me, so I'll be there
01:23 jberger I sure hope to be there
01:23 jberger one of my friends lives nearby
01:23 jberger so I can make it a two-part trip
01:27 davido_ I'll be there.
01:27 jberger jnbek: do you know where in salt lake the conference will be
01:27 jberger ?
01:27 jberger or davido_?
01:28 jberger my buddy lives in North Ogden, so the farther north the conference, the more likely I could just stay with him
01:28 davido_ It hasn't been made official yet.
01:28 good_news_everyon joined #mojo
01:28 good_news_everyon [mojo] kraih tagged v5.25 at 14ddd5b: http://git.io/qwwpDw
01:28 good_news_everyon left #mojo
01:28 davido_ It will be downtown salt lake though.
01:28 davido_ (I was with TPF when they scouted the locations -- I run salt lake perl mongers)
01:28 jberger ok, that's all I really needed to know
01:28 jnbek not yet, but there's one of two places, The Energy Solutions venue or... The Maverick Center
01:28 jberger davido_++
01:29 jnbek davido_: oh, right on
01:29 davido_ Oh, we're not big enough for Energy Solutions or Maveric Center.
01:29 jnbek you're the one who made me aware of said event :)
01:29 davido_ 300-500 people.
01:29 jnbek you and Jayce
01:29 good_news_everyon joined #mojo
01:29 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/s1L5oQ
01:29 good_news_everyon mojo/master 6300240 Sebastian Riedel: bump version
01:29 good_news_everyon left #mojo
01:29 jnbek my company is going send myself and a number of devs up there.
01:30 davido_ oh yeah, Jayce and fozzmoo (among others) were at one of the TPF meetings when we were helping them gain comfort with our ability to support it.
01:30 jnbek I'm pretty jazzed
01:30 davido_ It was kind of an easy choice since half of the people who planned OpenWest will be participating in planning YAPC15.
01:30 jnbek yep
01:31 laouji joined #mojo
01:31 davido_ and UTOS is also behind us.
01:31 jberger have you roped tempire in?
01:31 davido_ I've talked to him. He's got some good ideas.
01:31 jberger I know a few of them ;-)
01:33 davido_ At our PM meeting Tuesday we'll be discussing what we can do locally to make sure it's a success.
01:34 davido_ I'm glad there's been such a positive response.
01:34 klapperl joined #mojo
01:53 KCL joined #mojo
01:54 jberger_ marcus/batman: speaking of convos, I can't install it!
01:54 jberger_ I was trying to upgrade and no dice
01:54 jberger joined #mojo
01:57 dvinciguerra joined #mojo
01:58 jberger marcus/batman: hunh? https://github.com/Nordaaker/convos/blob/master/MANIFEST.SKIP#L69-L71
02:06 jberger Is installing Convos via CPAN not encouraged then?
02:06 davido___ joined #mojo
02:08 noganex joined #mojo
02:10 woz joined #mojo
02:18 sri rails has some interesting methods for caching http://api.rubyonrails.org/classes/ActionController/ConditionalGet.html
02:22 mikegrb seems like they are conflating seting cache headers on outgoing stuff with etag/freshness checks on incomming stuff
02:23 mikegrb I'd expect to find them in separate places, maybe with a see also in the docs
02:23 sri *cough* http://mojolicio.us/perldoc/Mojolicious/Plugin/DefaultHelpers#is_fresh
02:27 mikegrb :p
02:27 mikegrb but that's default helpers
02:27 mikegrb that's like a catch all, you expect to see disparate things together there
02:28 sri i find it interesting how much stuff they cram in there... basically Cache-Control and $c->rendered(304) are implicit too
02:33 mikegrb damn, jplayer on a site of mine quit working in new chrome, assumed it was my fault and stepped through the js but the js made it to jplayer being invoked, went to check the release notes, 2.6 is current, I'm using 2.2
02:33 mikegrb guess I won't be reading all the release notes
02:37 crab wtf.
02:37 crab i just read the "adding a plugin to your application" recipe
02:38 crab my first thought was "oh yeah, not much to see here"
02:38 crab then i suddenly realised that, although i've been writing and using a lot of app-specific plugins, i've only been putting them under Mojolicious::Plugin::
02:38 sri :D
02:41 crab oh, ok. it's not _that_ stupid. you do have to change the plugin namespaces for it to pick up MyApp::Plugin
02:41 jberger crab: or you can load it via fully qualified name
02:42 crab nah, that sounds like too much work
02:43 sri i only mention the fully qualified name, since i like that more
02:43 * jberger launches crab into the ocean via massive slingshot
02:44 crab but i was already here!
02:44 jberger **back**
02:45 * crab pokes holes in jberger's outrigger canoe with his claws
02:46 jberger hmmmmm, that outrigger was fun
02:47 jberger not much use for it in Chicago though :-/
02:49 jberger left #mojo
02:49 jberger joined #mojo
02:49 jberger (oops)
02:57 crab heh, if i say ->plugin('Foo::Bar') i guess it'll actually load Mojolicious::Plugin::Foo::Bar before trying Foo::Bar
03:11 kryptonite joined #mojo
03:13 basic6 joined #mojo
03:18 miked joined #mojo
03:22 woz joined #mojo
03:23 sri maybe the recipe isn't worth it and should just be removed again
03:23 jberger sri: there have already been instances of people who have learned from it, I would keep it
03:24 sri then maybe there's a better helper it could use
03:24 sri something a little more unique
03:25 jberger maybe, make a render_steps helper out of the delay helper ;-)
03:25 sri not too sophisticated
03:25 sri just enough to be interesting
03:26 jberger that's easy enough, it just adds a sub { $c->render } to the end of the list of steps
03:31 Adurah_ Mojo::DOM didn't do the same thing as jQuery again so I had to come up with another CSS selector...!
04:02 miked joined #mojo
04:13 mattp_ joined #mojo
04:19 ldris joined #mojo
04:23 woz joined #mojo
04:28 irq joined #mojo
04:34 bjoernfan joined #mojo
04:37 xevz joined #mojo
04:47 laouji joined #mojo
04:58 sh4 joined #mojo
05:22 sujithm joined #mojo
05:26 woz joined #mojo
05:50 lsm joined #mojo
06:01 howitdo joined #mojo
06:03 batman jberger: you're not giving a very descriptive error message regarding convos :(
06:04 batman jberger: https://metacpan.org/source/MRAMBERG/Convos-0.8002/lib/Convos <--- templates and public are all there.
06:05 good_news_everyon joined #mojo
06:05 good_news_everyon [mojo] amenonsen pushed 1 new commit to master: http://git.io/RGpo4A
06:05 good_news_everyon mojo/master 2a92ed5 Abhijit Menon-Sen: Fix typo
06:05 good_news_everyon left #mojo
06:06 batman sri: https://github.com/kraih/mojo/pull/666 # this one has +1 from me - at least compared to the _always_ do sort keys
06:06 batman and after thinking about it, i also give +1 on MyApp::Controller. not sure how to _not_ make names overlap if not
06:07 batman regarding Convos, it's still needs a cleanup even if we get ::Controller :P
06:07 chankey joined #mojo
06:08 batman odc`: thanks for the paste :)
06:19 Eke- joined #mojo
06:29 woz joined #mojo
06:42 dexteruk joined #mojo
06:43 sujithm joined #mojo
06:45 sujithm_ joined #mojo
07:04 preaction joined #mojo
07:15 Vandal joined #mojo
07:21 batman jberger: i added you as author. hope that's ok: https://metacpan.org/pod/release/JHTHORSEN/Mojolicious-Plugin-LinkEmbedder-0.07/lib/Mojolicious/Plugin/LinkEmbedder.pm#AUTHOR
07:30 woz joined #mojo
07:30 basiliscos joined #mojo
07:35 odc gut morning
07:35 odc batman, yw
07:35 batman :)
07:36 odc btw, mojopaste is the best paste
07:38 batman thanks :)
07:38 batman i would like to improve the layout... i think it's a bit dark and the buttons are placed in a really annoying position making it hard to mark the text
07:39 batman odc: did you know you can add .txt to the end of the url..?
07:39 odc i didn't
07:39 batman :)
07:39 odc i had no problem with the buttons tho
07:40 batman i'm considering changing it to a top navbar.
07:40 trone joined #mojo
07:40 batman got any other feedback or feature requests?
07:40 odc keep it dark enough so it stays classy
07:41 odc maybe mention how long the link will stay valid?
07:42 batman i can't :( it's valid until the file is deleted manually
07:43 odc hm :) how much space do you have on your server?
07:44 batman enough ;)
07:45 batman i do delete old files from time to time...
07:45 firnsy batman: you could have a timer to reap old file for you
07:45 batman firnsy: sure. a simple cron job will do the job.
07:46 batman but it's not a big deal. it's not like p.thorsen.pm is a high volume service :)
07:46 firnsy i built a pastebin for our work when i was first learning mojo, it's a perfect case scenario
07:47 batman firnsy: have you seen App::mojopaste ?
07:47 firnsy requirements were simple enough, support text and general files, hold for a week or hold for a month
07:47 firnsy batman just looked at the link then, the structure is essentially the same
07:48 batman yeah, it always is :)
07:49 firnsy i'm actually going through my code now, i want to be able to drag a file directly on the textarea instead of requiring a second tab
07:49 firnsy i like your massive textbox, it oozes awesome
07:50 batman thanks :)
07:50 batman maybe i should add drag/drop as well...
07:50 odc typical mac user...
07:51 batman haha
07:51 firnsy with generic file support, drag and drop makes sense
08:01 woz joined #mojo
08:02 d4rkie joined #mojo
08:03 diegok oh!, we use app specific plugins! :-)
08:18 irq joined #mojo
08:39 sujithm joined #mojo
08:42 fhelmber_ joined #mojo
08:55 hotsnow joined #mojo
08:59 batman odc, firnsy: would you mind giving me feedback on these three screenshots: http://home.thorsen.pm/private/tree/notverysecret/mojopaste ?
09:01 odc excellent! the bottom bar is always visible right?
09:01 batman yes
09:01 firnsy the footer is nice
09:01 batman \o/
09:01 * batman is making a new release
09:01 firnsy there is some variation between screens, i presume that's screenshot grabbing artefacts?
09:02 batman what do you mean? artefacts..?
09:02 firnsy footer looks like it's moving around when i spin through each image
09:03 batman ah. it's just because i suck at screenshots :)
09:03 firnsy nm ... it is the screen grabbing causing the variation
09:03 firnsy lol ... yeah, noted
09:04 batman ;)
09:11 batman firnsy: http://p.thorsen.pm/ <-- demo
09:14 batman i like that you can use <tab> and that the textarea is focused on load
09:14 dod joined #mojo
09:16 dod joined #mojo
09:16 firnsy batman: that's a nice refinement, and the tab to commit is a sweet touch
09:17 batman thanks :)
09:22 Jonneh joined #mojo
09:28 odc batman, have you tried in firefox? the button has a not-so-nice 3d effect here
09:30 odc https://imgur.com/Uf4cnfK
09:35 Dandre joined #mojo
09:35 odc adding 'border: 0px' to class button helps
09:44 batman odc: oh! thanks. will look into it, but i'm a bit busy now
09:44 batman care to make an issue? https://github.com/jhthorsen/app-mojopaste/issues
09:45 odc sure
09:47 batman thanks
09:49 Jonneh_ joined #mojo
09:52 Jonneh_ joined #mojo
09:55 mr-foobar joined #mojo
10:11 batman jberger: convos 0.81 is on it's way to cpan
10:20 Dandre left #mojo
10:21 Dandre joined #mojo
10:39 Adurah_ It isn't way.
10:43 d4rkie joined #mojo
10:52 sujithm joined #mojo
11:05 d4rkie joined #mojo
11:13 sujithm joined #mojo
11:15 neilhwatson joined #mojo
11:37 batman Adurah_?
11:37 jalie joined #mojo
11:39 sujithm joined #mojo
11:50 Adurah_ Just a little its/it's humour.
11:59 Kripton joined #mojo
12:00 batman thanks. i mess that up all the time :(
12:01 Jonis easy rule
12:01 Jonis use apostrophe when you remove one or more letters
12:02 sri batman: re your +1 vote, you really believe that feature is worth such an ugly hack?
12:02 batman Jonis: i know the rule. thanks anyway :)
12:03 Jonis aight :)
12:03 batman sri: is has 'canonical' an ugly hack?
12:03 Jonis I'm environmentally damaged from living in .uk
12:04 sri batman: https://github.com/kraih/mojo/pull/666/files#diff-ca9694676bc47b6c51420cb2af6591c6R50
12:04 batman ah. sorry. no idea why that happens, but i like the overall idea about having canonical($bool)
12:05 batman that happens => the code looks like that
12:05 sri you voted +1 for that patch
12:06 batman +1-=2
12:06 sri and what happens when someone JSON encodes from a TO_JSON method?
12:07 sri batman: also, what use case do you base your vote on
12:07 sri ?
12:08 oetiker I would like to add a reverse proxy into a mojoapp. with support for GET and POST. anyone got an example ?
12:09 batman sri: https://github.com/kraih/mojo/pull/665 <-- this is why i give +1 to #666, but i don't give +1 on the patch.
12:10 oetiker I imagine it should be possible to copy the original request, then fiddle with host and path and have the UA retrieve the page
12:10 sri batman: ok, your earlier +1 was a little confusing then
12:11 batman oetiker: no, but i hope you make a plugin so i can use it. marcus made one for get: https://metacpan.org/pod/Mojolicious::Plugin::Proxy (maybe you should fork it and add post++)
12:11 batman sri: i totally agree. that's why i said i'm sorry. (about confusing feedback)
12:11 lipizzan joined #mojo
12:11 oetiker yea that was what I was looking at but it is limited to GET and simply copies the URL,
12:12 batman oetiker: i pointed you in that direction, because i hope marcus will allow you to extend it, because i like that plugin name
12:12 oetiker hi hi
12:12 oetiker yes ... it is a very appropriate name
12:13 sri you make it sound like writing a revers eproxy is easy
12:14 sri that plugin is full of security issues
12:14 batman if i thought it was easy, i wouldn't have said "no, but..." i would say "yes, and" instead :)
12:14 oetiker sri any input on how to approach it ?
12:14 sri run!
12:15 Adurah_ Does that difference in result from Mojo::Dom and jQuery CSS selector suggest intended implementation differences or one being wrong?
12:16 sri but seriously, you need to scrub and rewrite all the appropriate headers and stuff stuff too
12:16 batman sri: the TO_JSON() is an interesting question. i guess we could say 1) that is not fixable 2) we can post-processing the results
12:16 oetiker that was what I was wondering
12:16 batman if we go for #2, then i really think we need an attribute and not do it by default.
12:16 oetiker so NOT just somehow duplicate the original request, but actually build a new one explicitly adding the bits that need to be added
12:16 batman since i guess that will/could make it super slow
12:17 batman sri: could you give an example on a security hole in the ::Proxy plugin?
12:17 sri batman: i mean in TO_JSON you get canonical(true) even if you're not setting it
12:17 sri since the local redefine is still in effect
12:18 sri batman: X-Forwarded-For header passed through from the client
12:18 sri client could send X-Forwarded-Proto: https
12:19 batman right.
12:19 batman sri: i need to step out of the "canonical" discussion. i understand now that i was too hasty.
12:20 sri i'm sure just forwarding hop by hop headers could cause trouble too
12:25 oetiker sri looking at the http://cpansearch.perl.org/src/MRAMBERG/Mojolicious-Plugin-Proxy-0.6/lib/Mojolicious/Plugin/Proxy.pm where does X-Forwarded-Proto: pass into the new request ?
12:29 sri batman: btw. for 3rd party pull requests you need to vote with a comment for it to count
12:30 batman sri: good to know
12:30 batman (not going to vote until i've did some more thinking)
12:37 sri anyway, now i'm scared and voted on #666 myself
12:38 sri https://github.com/kraih/mojo/pull/666#issuecomment-51465419
12:40 dvinciguerra joined #mojo
12:53 zivester joined #mojo
13:12 gatitskiy joined #mojo
13:18 edestler joined #mojo
13:39 Adurah joined #mojo
13:42 * sri wonder if there will be a render_if_stale() plugin
13:43 sri $c->render_if_stale(json => $hash, last_modified => $hash->{some_timestamp});
13:43 sri which would generate a 304 response if the content is fresh
13:53 dod joined #mojo
13:53 KCL_ joined #mojo
14:07 hesco joined #mojo
14:08 hesco I have a Mojolicious::Validator->like() question at: https://gist.github.com/hesco/0dc7290a83f845657e83
14:12 hesco This: ->like(qr/^[\w]$/) fails in unexpected ways (ways in which I think the check should pass), although these: ->like($RE{Email}{Address}), ->like(Number::Phone::US::get_regex(), and ->like($RE{zip}{US}) all seem to work just fine.
14:13 hesco Can anyone here please provide me a clue as to why?
14:16 davido__ sri: Thanks for your detailed explanation. I don't disagree with any of it. :)
14:17 davido__ There's no question it was an abuse of all sensibilities. ;) lol
14:19 gatitskiy joined #mojo
14:19 gatitski_ joined #mojo
14:24 ryozi joined #mojo
14:25 sri :)
14:27 sri hesco: missing quantifier
14:27 gatitskiy joined #mojo
14:29 hesco ah, so it is!  Thanks sri!
14:31 hesco mo betta!  thanks again.
14:31 michael also no need for the character class ([ ... ]) there
14:40 sri Adurah: fyi. your css question was incomprehensible
14:42 Adurah Same CSS selector, different elements returned.
14:42 sri that's a statement
14:42 Adurah That it is, but it clarifies the problem.
14:43 sri this is one of those times where i'm not sure if you're trolling or not
14:44 sri you have my attention for a few minutes now, either state your question clearly or accept that you may not get an answer
14:44 Adurah Oi, should one expect Mojo::Dom, given the same CSS selector as jQuery to return the same elements?
14:44 Dandre joined #mojo
14:44 sri i suppose
14:45 sri as usual it depends on context
14:47 Adurah I can't remember the exact selector now seeing I came up with something else. Just wanted to know if it was implementation difference of unintentional.
14:47 Adurah *or
14:52 sri oh that's great, ask incomprehensible question, hint at bug, not tell what bug was...
14:52 miked joined #mojo
14:53 Adurah Ayaa, I can attempt to reproduce it.
14:53 * sri sets Adurah on fire
14:54 sri http://blogs.perl.org/users/rurban/2014/08/vec-is-slow-little-endian-and-limited.html # i wonder if our uses of vec() could be optimized away
14:55 * sri is not very good at working with bit vectors in perl
14:55 sri https://github.com/kraih/mojo/blob/master/lib/Mojo/Transaction/WebSocket.pm#L37
14:55 sri https://github.com/kraih/mojo/blob/master/lib/Mojo/Transaction/WebSocket.pm#L166
15:19 odc not in mojo, but why not fix vec() in core
15:19 sri add a comment ;)
15:35 Adurah joined #mojo
15:41 davido__ sri: Where are you using them?
15:41 davido__ lol, nevermind. :)
15:46 lb sri: MAGICAL CONSTANTS!
15:59 batman odc: http://p.thorsen.pm/ # fixed and 0.10 is on cpan. thanks :)
15:59 odc sri, at line 166, I guess puting the result of vec($head, 0, 8) in a variable could speed it up a bit
16:00 odc batman, great :D
16:00 batman i really think it looks better now... i wonder for how long :)
16:00 Adurah_ joined #mojo
16:01 odc haha
16:01 hesco Where is the meaning of { DNT => 1 } documented as used here:  https://metacpan.org/pod/Test::Mojo#post_ok
16:04 go|dfish hesco: it's the Do Not Track header
16:04 odc http://mojolicio.us/perldoc/Mojo/Headers#dnt
16:05 hesco Thanks go|dfish, but what exactly does that mean.  Thanks odc, looking now.
16:05 michael that confused me at first. would be more obvious to just use \%headers in the synopsis or a header more people have heard of
16:06 odc DNT - the Norwegian Trekking Association
16:06 go|dfish heh
16:06 hesco right.
16:06 hesco so that is a way for me to insert an arbitrary header into my post request?
16:06 odc i also discovered DNT with mojolicious
16:06 odc it's a good thing
16:07 hesco The Trekking Assn I assume you mean odc?
16:08 odc hesco, i don't know, i'm just copying what google said ;)
16:10 hesco odc: that was an attempt at humor, to suggest that you 'dicovered (the Trekking Association) with mojolicious'
16:10 odc oh!
16:10 odc haha, well sort of :)
16:12 hesco I'm still trying to sort out how to use Test::Mojo::More; I'm thinking that this: $t->post_ok('/admin/instructors/add_instructor' => form => $test_instructor)  should take a hashref of key=>value's and post it to a form at that route, and although my code works in a browser, I seem unable to automate a test of it.  Am I misreading this?
16:15 dvinciguerra joined #mojo
16:41 basiliscos joined #mojo
16:41 denis_boyun joined #mojo
16:43 hesco that is a never-mind.  Turns out I had ommitted a required field from my test data.
16:44 Mikey_ am i missing a way for a recurring() to make itself stop?  it looks like you're only passing in the loop, why not the event, too?  so it can do $loop->remove($event_id) in some cases?  is the idea that i should just be re-setting a timer() in cases where i want it to keep going, and just not doing that if i want it to stop?
16:53 Adurah_ Can't reproduce the CSS selector misbehaviour, never mind.
17:02 denis_boyun_ joined #mojo
17:14 dvinciguerra joined #mojo
17:31 sri odc: good idea
17:40 good_news_everyon joined #mojo
17:40 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/QM_P4Q
17:40 good_news_everyon mojo/master e127465 Sebastian Riedel: improved WebSocket performance
17:40 good_news_everyon left #mojo
17:52 berov joined #mojo
17:53 berov sri: http://irclog.perlgeek.de/mojo/2014-08-06#i_9146293
17:53 berov you are forgetting :)
17:53 berov https://metacpan.org/source/BEROV/Ado-0.55/lib/Ado/Plugin
17:53 sri you're a little late to the discussion i'm afraid
17:54 berov :)
17:54 berov just saw the log
17:55 sri also, Ado is a framework, and i was taling about apps
17:55 berov it is an app at the same time
17:56 berov which can be extende via plugins
17:56 sri i was talking about clean, pure apps
17:56 berov it is a Mojo app
17:56 berov pure :)?
17:56 sri anyway, discussion was yesterday
17:56 berov yep, ok
17:58 berov but still in my/yor/anyone  if added app->plugins->namespaces(['Mojolicious::Plugin', 'MyApp::Plugin',]);
17:58 berov one will not need to state the full class name
17:58 berov or this would be wrong?
17:58 berov not discussing. just asking
17:59 sri todays topic is "how do we get rid of these vec() caled?" https://github.com/kraih/mojo/blob/master/lib/Mojo/Transaction/WebSocket.pm#L37
17:59 berov ok sorry
17:59 sri if anyone has any ideas, the other half of the vec() calls is already gone
18:01 sri marcus, batman, jberger, tempire, crab: you should just vote on this so we can this over with https://github.com/kraih/mojo/pull/665
18:02 batman done.
18:02 sri (i derailed it a bit, so i'm poking you to get it back on track)
18:03 sri batman++
18:03 batman \o/
18:03 irq joined #mojo
18:03 batman feels good.
18:03 batman beer taste good. ++ taste better ;)
18:04 batman (i might be a bit off again)
18:04 * sri is drinking erdinger
18:05 batman which type?
18:05 purl which type is, like, it that's pestering you then
18:05 * batman drinks premium beer.
18:05 batman at least that's what it says on the carlsberg bottle :P
18:06 sri weissbier of course!
18:06 batman :)
18:06 marcus sri: discussion was yesterday about controllers?
18:06 sri marcus: ye, already shipped to cpan
18:07 marcus sri: o^O
18:07 sri but you always like ::Controller:: afair
18:07 sri *+d
18:08 marcus Yeah, I did. The reason we didn't use it in Convos was we wanted it to be close to the defaults
18:08 sri :)
18:08 sri one more reason!
18:08 marcus I group my Objective-C controllers in a Controller group too.
18:08 sri nothing breaks though, both styles work now
18:09 sri but the app generator and the docs now encourage ::Controller::
18:09 sri growing guide even uses ::Model:: now
18:09 marcus Ideally I'd actually do it like most ruby frameworks do, directly in /controller or whatever in the project
18:10 sri i like the layout of padrino
18:10 batman marcus: not a big fan, since i'm embedding many apps in toadfarm and such
18:10 batman need to have unique namespaces
18:10 sri yea, cpan-ish layout is a must imo
18:11 marcus Yeah, I agree it makes sense to follow cpanish layouts for tooling reasons
18:11 * sri nods
18:13 marcus one of my clients stores templates and public under lib/MyApp/ so that they can generate debian packages for deployment
18:17 sri http://googleonlinesecurity.blogspot.in/2014/08/https-as-ranking-signal_6.html # still wondering when google will start selling certs
18:18 batman marcus: convos does that dynamically on cpan-i-fy-ing :)
18:42 noganex_ joined #mojo
18:50 D4RK-PH0ENiX joined #mojo
19:20 marcus batman: that's rather nicer for development, Startsiden should steal that.
19:20 batman git-ship++ :)
19:25 sri all aboard the git-ship
19:33 davido___ joined #mojo
19:34 woz joined #mojo
19:50 jalie left #mojo
19:51 berov добре
19:51 berov sorry wrong window
19:51 jalie_ joined #mojo
19:53 jalie__ joined #mojo
20:06 woz joined #mojo
20:08 punter joined #mojo
20:10 marcus berov: I AM COMING
20:12 marcus Landing at LED in ~18 hours
20:12 marcus Oh,  I guess you're not in Russia.
20:28 good_news_everyon joined #mojo
20:28 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/T5e3hg
20:28 good_news_everyon mojo/master 01d9592 Sebastian Riedel: use a different example for application specific plugins
20:28 good_news_everyon left #mojo
20:30 denis_boyun joined #mojo
20:50 aramisf joined #mojo
20:54 berov marcus: I am in the Czech Republic but will be in Bulgaria for YAPC::EU
21:05 tempire oh snap.
21:06 tempire https://blog.heroku.com/archives/2014/8/7/heroku-button
21:06 tempire ONECLICKDEPLOYMENT
21:06 tempire Oh, maybe not.
21:06 tempire But it's still cool.
21:12 sri interesting
21:16 woz joined #mojo
21:28 sri michael: what is a header more people have heard of?
21:29 sri every now and then someone complains about the use of the DNT header in examples, but what other header is there that's not s outrageously huge it would kill the examples?
21:29 sri honestly, which self respecting web developer has not heard of DNT?
21:30 sri that header has gone through the news more times than i can count
21:30 sri i bet no other header is better known
21:43 tempire sri: helper namespaces
21:43 tempire I usually do something like this: https://gist.github.com/tempire/c4a4df70f7ed0d9b48bc
21:44 tempire I don't know that the ->controller attribute assignment is the right thing.
21:45 sri hmm
21:45 sri not so nice for templates though
21:46 sri i suppose app->renderer->helpers->{'foo.bar'} could be $c->foo->bar()
21:47 sri (going at it from another angle)
21:48 sri i assume in your proposal the first level helper would contain an object with the subhelpers, instead of referring back to the central helper store
21:52 sri oooh, you mean plain old classes
21:53 sri i somehow assumed proxy objects with AUTOLOAD
21:55 tempire hadn't thought about proxy objects
21:56 tempire I don't use helpers without a containing namespace for nearly anything anymore. In fact, even plugins are super tiny, just pointing to a regular module
21:58 tempire foo.bar is interesting, though.
21:59 cooper joined #mojo
22:17 sri unrealistic though, now that i think about it
22:17 sri looking up ->foo would be rather expensive
22:18 sri registering foo.bar would need to create a foo proxy helper
22:19 sri but that wouldn't automatically work for foo.bar.baz
22:20 woz joined #mojo
22:23 sri easier would be a different proxy system
22:24 sri $app->helpers('foo'); $app->foo->add_helper(bar => sub {...}); $c->foo->bar()
22:31 sri oh wait, there is app state leaking through
22:32 sri you can't store the controller anywhere
22:32 sri *facepalm*
22:41 lb $c->serialize
22:43 aramisf left #mojo
22:44 davido___ joined #mojo
22:47 jzawodn joined #mojo
22:50 jzawodn joined #mojo
22:55 sri tempire: a naive implementation that works https://gist.github.com/anonymous/86ec9740af9758a35a27
22:56 sri the namespace lookup with first() could be cached i suppose
22:56 sri like app->renderer->has_helper_namespace('foo')
22:57 sri then only the first lookup would be slow
22:58 sri the result https://gist.github.com/anonymous/0ac3a40201b7354c8825
22:59 sri foo.bar.baz wouldn't be a problem either
23:00 sri supporting them in templates seems like not such a great idea
23:01 sri <%= foo->bar %>
23:01 sri can't pass them a begin/end block... so meh
23:02 sri at that point <%= $c->foo->bar %> should be good enough
23:03 sri anyway, i believe this is the point where i stop... if someone wants to see this happen, clean it up
23:04 sri no cue if i would even vote +1
23:09 sri holy miscommunication batman... i bet this is very easy to answer... if only i found the question https://groups.google.com/forum/#!topic/mojolicious/0pxh1VGAhDc
23:24 woz joined #mojo
23:37 neyasov___ joined #mojo

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