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

IRC log for #mojo, 2014-10-05

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

All times shown according to UTC.

Time Nick Message
00:05 og01 hey where would render_later be implemented?
00:06 og01 its ok i found it
00:10 atmh joined #mojo
00:30 woz joined #mojo
01:11 atmh joined #mojo
01:21 fhelmber_ joined #mojo
01:30 woz joined #mojo
01:50 atmh joined #mojo
02:02 noganex_ joined #mojo
02:30 woz joined #mojo
02:42 atmh joined #mojo
02:47 Bolwind2 joined #mojo
02:59 noganex joined #mojo
03:02 basic6_ joined #mojo
03:02 atmh joined #mojo
03:30 woz joined #mojo
03:49 atmh joined #mojo
03:59 basic6 joined #mojo
04:26 Eke- joined #mojo
04:30 woz joined #mojo
04:34 thowe joined #mojo
05:06 irq joined #mojo
05:20 KCL_ joined #mojo
05:22 fhelmber_ joined #mojo
05:30 woz joined #mojo
06:03 Vandal joined #mojo
06:09 preaction joined #mojo
06:30 woz joined #mojo
07:15 shadowpaste "irq" at 217.168.150.38 pasted "it does not seem to run nonblocking. What am I missing here?" (40 lines) at http://paste.scsys.co.uk/427976
07:30 woz joined #mojo
07:55 preaction joined #mojo
08:00 dod joined #mojo
08:25 dotan joined #mojo
08:26 dexteruk joined #mojo
08:30 woz joined #mojo
08:48 cpan_mojo Mojo-Cloudflare 0.04 by Jan Henning Thorsen - http://metacpan.org/release/JHTHORSEN/Mojo-Cloudflare-0.04
08:49 dexteruk joined #mojo
08:56 dexteruk joined #mojo
08:59 cpan_mojo Mojolicious-Plugin-CGI 0.11 by Jan Henning Thorsen - http://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-CGI-0.11
09:30 woz joined #mojo
10:19 denis_boyun joined #mojo
10:28 basiliscos joined #mojo
10:30 woz joined #mojo
10:49 dotan_ok joined #mojo
10:53 D4RK-PH0ENiX joined #mojo
11:23 fhelmber_ joined #mojo
11:25 Eke- joined #mojo
11:30 woz joined #mojo
11:53 irq_ joined #mojo
12:02 atmh joined #mojo
12:30 woz joined #mojo
13:07 * sri wonders if this would be a good idea https://gist.github.com/anonymous/99a05a7bec460047396e
13:20 rem_lex joined #mojo
13:30 woz joined #mojo
13:30 jberger sri: I have often wondered that actually
13:52 sh4 joined #mojo
13:56 atmh joined #mojo
13:59 atmh_ joined #mojo
14:01 denis_boyun_ joined #mojo
14:04 basic6_ joined #mojo
14:12 basiliscos joined #mojo
14:15 denny joined #mojo
14:19 denny joined #mojo
14:22 denny joined #mojo
14:30 woz joined #mojo
14:33 marcus sri: That seems useful.
14:37 neyasov joined #mojo
14:44 good_news_everyon joined #mojo
14:44 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/y_R4_A
14:44 good_news_everyon mojo/master f132af6 Sebastian Riedel: improved pluck method in Mojo::Collection to be able to extract values from hash references
14:44 good_news_everyon left #mojo
15:00 atmh joined #mojo
15:03 sri hmm, but use cases for it in core are pretty limited :S
15:22 atmh joined #mojo
15:23 fhelmber_ joined #mojo
15:26 sri looks like i might have been a bit too quick with the commit again
15:30 woz joined #mojo
15:34 odc sri, you think it might have a significant impact on performances?
15:35 odc i doubt it
15:39 sri odc: we are generally don't add minor features that aren't of much use in core directly
15:40 sri say it could be used to simplify an example in the docs, that would be a good enough reason to add it
15:40 sri but as it stands, it's just a nice to have, not something that improves anything directly
15:41 odc i see
15:41 sri for example, jberger wanted a Mojo::Collection::reduce method for years, and we've been rejecting it because there was no use case
15:42 sri then a use case was found and it got added
15:43 good_news_everyon joined #mojo
15:43 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/LSJQqg
15:43 good_news_everyon mojo/master c36588c Sebastian Riedel: removed hash reference support from pluck again
15:43 good_news_everyon left #mojo
15:43 odc hmm btw i was thinking of adding a rand() method to mojo::collection (to get a random element from a rss feed)
15:44 sri main reason i wanted it was for Mojo::Pg examples, but that's just not good enough
15:44 odc i guess i shouldn't bother making a pull request
15:44 sri for?
15:44 purl for fun.
15:44 odc rand()
15:44 sri please elaborate
15:44 odc see 5 line up
15:45 sri oh
15:45 sri $collection->shuffle->first
15:45 odc oh
15:45 odc hm
15:45 irq joined #mojo
15:45 odc very inefficient but it works
15:47 sri i'm surprised nobody has made a pull request for encode_json_text yet, guess i overestimated the demand
15:50 odc sri, what would that function do exactly?
15:50 sri see backlog from yesterday
15:52 odc hm confusing name
15:53 sri why doesn't anyone get the name? http://irclog.perlgeek.de/mojo/2014-10-04#i_9456387
15:54 irq could someone look into http://paste.scsys.co.uk/427976 ?
15:56 odc irq, because you called wait() before say()
15:59 irq odc: I see. The SYSOPSIS example bumdled wait in one expression and confused me, the beginner.Thanks.
16:01 odc yw
16:30 woz joined #mojo
16:35 good_news_everyon joined #mojo
16:35 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/iI6mvQ
16:35 good_news_everyon mojo/master e812025 Sebastian Riedel: use a more modern Mojo::UserAgent example
16:35 good_news_everyon left #mojo
16:39 marcus Sentry is damn nice.
16:40 marcus And I see likhatsky has made a mojo plugin for it. \o/
16:42 preaction joined #mojo
16:46 marcus Also, it doesn't use mongodb, unlike fucking errbit.
16:46 cpan_mojo Mojolicious-Plugin-CGI 0.12 by Jan Henning Thorsen - http://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-CGI-0.12
16:46 atmh joined #mojo
16:49 berov joined #mojo
16:49 thowe So.  Just installed 5.20.1 and ran a Lite app...  Apparently I need to install Sub::Name?
16:50 thowe maybe this is DBIC thing....
16:52 berov batman, marcus, jberger : Please see an example of the missing feature which I proposed and which sri reverted https://github.com/kberov/mojo_json_encode/blob/master/myapp.pl
16:54 sri tempire and crab are on the core team as well
16:54 berov tempire,crab? please also take a look at the above
16:57 sri berov: i'm not sure how successful poking around on irc will be though, it often doesn't even work for me
16:57 berov user case: dump Perl references to JSON and then use them in JS code on the page returned to browser to dynamically manipulate the DOM
16:57 berov so, should i go and write it on the mailing list?
16:57 sri in case it's not entirely clear, a real proposal would be a pull request ready to be applied, on which all members of the core team are expected to vote
16:58 berov ok, still I needed to show the user case
16:58 sri of course raising awareness here and on the mailing-list might help
16:58 sri you will need to defend your pull request in the description too
16:59 berov ok, will make a pull request
16:59 sri especially if all the concerns that have been brought up here in the last few days are not addressed
17:00 berov will have to look at the back log for the concerns
17:09 basiliscos joined #mojo
17:17 punter joined #mojo
17:18 neyasov_ joined #mojo
17:20 KCL joined #mojo
17:25 denis_boyun joined #mojo
17:30 woz joined #mojo
17:52 atmh joined #mojo
18:06 tempire hmm
18:08 tempire berov: I must be missing something. What is its purpose?
18:09 tempire oh
18:09 tempire without encoding
18:10 tempire The name is a problem
18:10 tempire Which is presented because of two uses of the word "encode"
18:10 tempire Industry problem.
18:10 tempire encode_json_no_encoding
18:10 tempire lulz
18:11 tempire encode_json_but_not_THAT_sort_of_encoding
18:11 tempire I personally don't care about the feature.
18:11 tempire So no +1 from me.
18:12 tempire I'm not averse to it either
18:12 stephanj to_json(_unencoded)
18:12 * tempire has an iOS app in review
18:12 * tempire crosses fingers
18:18 sri yea, since i have no need for it atm. and the naming thing is unsolved it won't be getting a +1 from me either
18:19 sri with crab MIA, that means jberger, batman and marcus would all have to vote in favor
18:22 sri and batman was one of those sceptical about the name... so i guess it won't pass
18:27 atmh joined #mojo
18:29 berov well of course I can implement it elsewhere :)
18:30 woz joined #mojo
18:34 blueCat joined #mojo
18:40 berov tempire: the purpose is to be able to use perl references as JS objects in templates
18:45 sri berov: you keep arguing the wrong points
18:46 sri we have already agreed that there are valid uses
18:46 sri what you need to address are the concerns that have been brought up
18:46 sri like the function name, and the use of utf8::downgrade to decide if the input string should be UTF-8 decoded
18:48 sri and if you don't care about the decoding problem, you need to sell how having an inconsistent api is ok in this case
18:48 berov may be I do not understand the concerns, because they were spread in time. now I am sure I did not get the concerns
18:48 atmh joined #mojo
18:49 berov sri, I really appreciate your help.
18:50 sri short summary for everyone... i committed some stuff... and asked afterwards if use of utf8::downgrade in that context was acceptable... at which point batman and mst started complaining about the function name (about which i was worried already the day before)
18:51 sri in the meantime there have been more complaints about the function name and entirely different approaches have been brought up like encode_json({foo => "bar"}, {utf8 => 0})
18:52 berov as tempire noted this is industry problem, using same word with different meanings "encode"
18:53 berov it is not worth it to try to "sell" something which no body wants
18:54 berov or does not realize it is useful
19:15 lipizzan joined #mojo
19:19 atmh joined #mojo
19:22 stryx` joined #mojo
19:24 fhelmber_ joined #mojo
19:30 woz joined #mojo
19:44 zivester joined #mojo
19:52 atmh joined #mojo
19:54 bjoernfan joined #mojo
20:19 neyasov_ joined #mojo
20:23 denis_boyun joined #mojo
20:30 woz joined #mojo
20:35 basiliscos joined #mojo
20:45 cpan_mojo Mojolicious-Plugin-Bootstrap3 3.2001 by Jan Henning Thorsen - http://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-Bootstrap3-3.2001
20:50 neyasov_ joined #mojo
20:52 atmh joined #mojo
20:54 bobkare joined #mojo
21:10 thowe If I need essentially everything to require authentication except for the login page, does it make sense to have the "login" sub above the "/" sub and for the "/" to be an under route?
21:12 ua joined #mojo
21:30 woz joined #mojo
21:30 Adura joined #mojo
21:48 ua1 joined #mojo
21:49 marcus seen crab?
21:49 purl crab was last seen on #mojo 16 days, 17 hours, 24 minutes and 55 seconds ago, saying: i take it these are not registers like %eax  [Sep 19 04:24:20 2014]
21:49 bobkare joined #mojo
21:52 atmh joined #mojo
21:58 neyasov_ joined #mojo
22:11 ua joined #mojo
22:21 ua1 joined #mojo
22:24 elsanchez joined #mojo
22:28 * sri still wonders if Mojo::Pg should support (??) from DBIx::Simple
22:29 elsanchez joined #mojo
22:30 atmh joined #mojo
22:30 woz joined #mojo
22:32 ua joined #mojo
22:34 ua1 joined #mojo
22:47 * jberger releases a fixed version of AudioFile::Find
22:48 jberger now my MojoTunes works without having to force install dependencies
22:49 * sri looks through the implementation of (??) in DBIx::Simple and decides to run away
22:54 thowe OK, so I need a small amount of direction here, I think...
22:55 thowe I am writing a little sub that will render a login form OR take user/pass from the URL...
22:55 thowe When I specify the user:pass from the URL, I am told the site doesn't ask for authentication, and it asks me to click OK to proceed...
22:56 thowe Is there a way to specify that authentication is being asked for?  I suspect it's a http 1.1 thing....
22:56 ua joined #mojo
22:57 preaction i think that's what the WWW-Authenticate header is for
22:59 neyasov_ joined #mojo
23:00 sri specifically, read up on Basic authentication
23:02 thowe Basic authentication is what I have in front of me...
23:02 nicomen thowe: send 403?
23:03 thowe I seem to have other things not working too.....   I need to play more
23:03 nicomen soprry 401
23:04 thowe $c->req->url->to_abs->userinfo appears to be empty or undef...  It's not even checking it
23:05 preaction it's not just 401 that triggers it. you need to let the browser know that it can provide authentication
23:06 thowe Yeah, I think I need to do something with $c->res->headers->www_authenticate('Basic');
23:06 nicomen yah right
23:08 thowe not helping any....
23:08 sri http://mojolicio.us/perldoc/Mojolicious/Guides/Cookbook#Basic-authentication1
23:09 thowe yeah, I'm looking at that....
23:09 thowe There is clearly something I'm not getting.
23:10 thowe Oh...  I see..  I need to do something a bit different though.  I get it though.
23:10 ua1 joined #mojo
23:16 sri it's awesome how consistent DBD::Pg actually is, i've not needed a single workaround for anything yet
23:17 mst sri: also, if you run into trouble, it'll probably affect me too and I know how to harass the author :)
23:17 sri it's been ages since i've been digging deeper into a DBD module... but i really don't remember it being this painless
23:18 mst jberger: 30,000+ - it's a filter of my public IRC logs for 8 years for sswearing and/or rage
23:18 sri even the unicode defaults seem to just work
23:19 jberger mst: what good is scripting if we cannot rise to that kind of challenge!
23:19 sri i've been sending unicode strings and json back and forth without as much as a hickup
23:19 mst jberger: sec
23:20 mst yeah. grep for rage, then a perl one liner that if it's 'nick: <rage>' strips the nick since nobody cares who I was yelling at that many years ago
23:21 jberger haha, you actually use a rage tag!
23:21 sri #rage
23:21 jberger sri: indeed, tags are so 2006
23:22 ua joined #mojo
23:23 mst jberger: basically, that's my IRC logs run through a grep for swearing and a perl -pe to strip addressing
23:23 mst jberger: with a small CGI script on the front
23:24 fhelmber_ joined #mojo
23:27 cpan_mojo Mojo-Pg 0.03 by Sebastian Riedel - http://metacpan.org/release/SRI/Mojo-Pg-0.03
23:30 woz joined #mojo
23:31 ua1 joined #mojo
23:32 jberger I worry that this is going to be a bad idea, but I'll ask anyway...
23:32 jberger does anyone know anything about UPnP?
23:33 mst I know people who do. sup?
23:34 jberger I want to write an application that can expose itself through the router
23:35 mst 'us raincoat;'
23:36 jberger I guess I was asking for that with that phrasing :-P
23:36 jberger also, the raincoat namespace is available on CPAN ;-)
23:36 mst there's already a Coat
23:36 mst it was sukria's predecessor to Mouse
23:37 mst then I convinced him to have Dancer2 use Moo before he got even further into a rathole
23:38 jberger I get so sad when I see CPAN modules that use Mouse/AnyMoose
23:38 jberger more AnyMoose i guess, but even Mouse really
23:38 mst Any::Moose is now formally deprecated in favour of Moo
23:38 mst that seems to be helping
23:38 jberger yeah, but there are still those out there
23:39 sri "UPnP uses common Internet technologies. It assumes the network must run Internet Protocol (IP) and then leverages HTTP, SOAP..." oh my
23:40 jberger sri: yeah ... I know
23:41 jberger MojoTunes would be so much cooler if users didn't have to muck about with port forwarding
23:41 jberger bpmedley pointed this out to me: https://github.com/geuma/pDLNA
23:43 sri marcus: btw. if you're welcome to try and make Mojolicious fatpackable, entities.txt is trivial actually, just inline it in the DATA section of Util.pm, what you'll have real trouble with is lib/Mojolicious/public and lib/Mojolicious/templates
23:43 sri s/if//
23:45 sri lib/Mojo/IOLoop/server.crt and lib/Mojo/IOLoop/server.key are a bit of a problem too, since IO::Socket::SSL can only handle actual files, nothing in memory
23:45 sri (at least the last time i looked... like 2 years ago)
23:46 jberger could spit them into temp files
23:46 jberger but ick
23:46 mst "use temp files as a fallback" maybe
23:46 sri yea, it's less about finding a good solution... and more about picking the one that sucks least
23:46 mst I don't think fatpacker can avoid that requirement
23:47 sri also can't ignore maintainability... lots of stuff in public/templates especially needs to be updated a lot
23:47 mst note: so long as it stays simple, I have no problem adding features to fatpacker
23:47 mst I just dunno if anything would actually help :)
23:50 nicomen berovconvos: do you perhaps just want JSON.parse() ?
23:50 sri nicomen: his use case is valid
23:51 sri actually even more valid than he might be aware of
23:51 nicomen ah right
23:52 sri Mojo::JSON is unlike most JSON modules and actually only generates stuff that's valid JavaScript
23:53 sri judofyr wrote about the problem http://timelessrepo.com/json-isnt-a-javascript-subset
23:54 D4RK-PH0ENiX joined #mojo
23:54 ua joined #mojo
23:59 neyasov_ joined #mojo

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