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

IRC log for #mojo, 2015-11-20

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

All times shown according to UTC.

Time Nick Message
00:14 woz joined #mojo
00:38 cstamas joined #mojo
00:46 marty joined #mojo
00:59 jontaylor joined #mojo
00:59 good_news_everyon joined #mojo
00:59 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/v4Qu4
00:59 good_news_everyon mojo/master 0bccbd1 Sebastian Riedel: link to default helpers
00:59 good_news_everyon left #mojo
01:02 Andreas2 joined #mojo
01:03 sri interesting comparison between rails and phoenix https://dockyard.com/blog/2015/11/18/phoenix-is-not-rails
01:44 inokenty-w joined #mojo
01:47 aborazmeh joined #mojo
01:50 Onigiri joined #mojo
02:00 woz joined #mojo
02:01 jontaylor joined #mojo
02:22 jberger "A new Phoenix application will include one Endpoint, one Router, and one PubSub Server"
02:22 jberger Oh man, a default pubsub server
02:23 jberger <3
02:23 jberger Then again it requires pg so I guess we could say we have that too in a manner of speaking
02:26 kaare joined #mojo
02:59 aborazmeh joined #mojo
03:01 PryMar56 joined #mojo
03:24 noganex joined #mojo
03:32 woz joined #mojo
04:24 jontaylor joined #mojo
04:25 McA joined #mojo
05:03 woz joined #mojo
06:25 jontaylor joined #mojo
06:32 woz joined #mojo
06:37 dod joined #mojo
06:57 dod joined #mojo
06:58 dod joined #mojo
07:05 val joined #mojo
07:15 McA joined #mojo
07:46 Vandal joined #mojo
08:02 woz joined #mojo
08:13 melo joined #mojo
08:14 trone joined #mojo
08:14 Jonis should it be expected that when I b64_encode 'foo:bar' it appends a newline at the end?
08:16 eseyman joined #mojo
08:16 Jonis ah, I should read the docs
08:16 jontaylor joined #mojo
08:39 gorfel joined #mojo
08:50 bjakubski joined #mojo
09:13 Adura joined #mojo
09:21 glauber joined #mojo
09:36 woz joined #mojo
09:41 berov joined #mojo
09:44 jontaylor joined #mojo
10:07 dod joined #mojo
10:08 dod joined #mojo
10:27 dod joined #mojo
10:40 btyler jberger: I don't think phoenix uses postgres for pubsub, just as a data store
10:44 btyler but yes, of course, in terms of dependency footprint it works out similarly
10:49 Eric joined #mojo
10:57 CandyAngel sri: (regarding Mojo::Collection from find_modules) That makes sense. I just wrapped it in a Mojo::Collection anyway :P
11:25 woz joined #mojo
11:32 woz joined #mojo
12:01 neilhwatson joined #mojo
12:08 bc547_ joined #mojo
12:08 woz joined #mojo
12:21 jberger Jonis: I don't know how many times I've done that
12:21 kaare joined #mojo
12:21 jberger But that's basically a pass through option, I don't blame Mojo Util
12:48 jontaylor joined #mojo
12:48 osfabibisi joined #mojo
13:00 asarch joined #mojo
13:03 jkramer joined #mojo
13:06 Jonis jberger: yeah, I needed to consume some azure market data and tossed the basic auth in the header, then I got illegal header back
13:19 woz joined #mojo
13:28 ajr_ joined #mojo
13:35 woz_ joined #mojo
13:38 dod joined #mojo
13:40 jkramer left #mojo
13:50 woz joined #mojo
14:03 cpan_mojo Clustericious-1.05 by PLICEASE https://metacpan.org/release/PLICEASE/Clustericious-1.05
14:03 panshin joined #mojo
14:07 plicease joined #mojo
14:18 woz joined #mojo
14:25 woz joined #mojo
14:31 berov left #mojo
14:38 marty joined #mojo
14:39 marty joined #mojo
14:39 gryphon joined #mojo
14:45 woz joined #mojo
14:50 disputin joined #mojo
15:09 plicease joined #mojo
15:09 woz joined #mojo
15:23 sue joined #mojo
15:23 dod joined #mojo
15:42 woz joined #mojo
15:52 PryMar56 joined #mojo
16:03 woz joined #mojo
16:05 voldemortensen joined #mojo
16:18 mgrimes joined #mojo
16:26 gryphon joined #mojo
16:30 and joined #mojo
16:34 lluad joined #mojo
16:37 asarch joined #mojo
16:48 good_news_everyon joined #mojo
16:48 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/v4bv7
16:48 good_news_everyon mojo/master c6c76a9 Sebastian Riedel: try Perl 5.22
16:48 good_news_everyon left #mojo
17:06 sh4 joined #mojo
17:09 woz joined #mojo
17:26 gryphon joined #mojo
17:41 woz joined #mojo
17:52 sri interesting talk about the architecture of cowboy 2 https://www.youtube.com/watch?v=YGuAXS0Cy_8
17:52 sri erlang web server with a very small implementation of http/2
18:01 woz joined #mojo
18:01 disputin joined #mojo
18:23 sri we need to move as much code as possible from Mojo::Server::Daemon to Mojo::Stream::HTTP::Server
18:23 jabberwok joined #mojo
18:24 jabberwok if i have an absolute file path (/home/me/myapp/public/foo.jpg) is there a standard or recommended way to turn that into a URL? presumably with reference to the active http request?
18:26 lluad Are you serving that to to a local user, via the filesystem?
18:27 lluad Or to remote users, via http?
18:28 woz joined #mojo
18:30 trone joined #mojo
18:31 lluad If the latter, I think you'd need to get chummy with Mojolicious::Static, to see if the file path is in a directory it handles, then generate the URL from there by stripping off the first path that matches.
18:33 Grinnz_ jabberwok: if you want it to be portable, something like: use URI::file; use File::Spec::Functions 'abs2rel'; my $rel_path = abs2rel($filepath, $public_dir); my $url = URI::File->new($rel_path)->abs('/')
18:33 jabberwok Ahhhhh thanks
18:34 dod joined #mojo
18:34 jabberwok =takes a bow=  =trips on shoelaces= =falls into orchestra pit=
18:34 Grinnz_ URI::file->new *
18:36 Grinnz_ unix filepaths may look like URLs but they aren't quite, and URI::file handles filepaths on other systems transparently as a bonus
18:44 panshin joined #mojo
19:01 jabberwok hmm, i was looking for http://localhost:3000/foo.jpg  ... which has to take into account "how the user's browser can get there"
19:02 Grinnz_ unless you're doing stuff that requires a different protocol, usually you should just use links starting with '/'
19:02 Grinnz_ they will be "absolute" on the current domain
19:04 jabberwok this is for returning in JSON
19:05 jabberwok but, ok
19:05 Grinnz_ https://metacpan.org/pod/Mojolicious::Controller#url_for may help there
19:06 lluad ... though if the json is going to javascript that's running inside a page on that domain an absolute link starting with '/' would be fine.
19:07 Grinnz_ or just using the request URL to get the protocol/host/etc
19:08 Grinnz_ my $abs_url = Mojo::URL->new($url_from_last_example)->to_abs($c->req->url)
19:08 Grinnz_ something like that
19:09 Grinnz_ might need a ->to_abs in there
19:09 Grinnz_ for the base url
19:13 voldemortensen1 joined #mojo
19:19 PopeFelix joined #mojo
19:58 woz joined #mojo
20:37 sri hmm, i guess Mojo::Transaction::HTTP is still a bit inefficient
20:38 sri content is not pushed from the transaction to the connection, but pulled
20:45 sri a refactoring there really needs to go on the todo list
20:45 disputin joined #mojo
20:45 voldemortensen joined #mojo
20:45 sri all the get_*_chunk methods need to go, in favor if a push solution
20:45 sri s/i/o/
20:46 sri current architecture is preventing new features
20:47 sri if only we had more volunteers
20:49 woz joined #mojo
20:52 sri no way we can get http/2 support without the refactoring
20:53 sri we've designed ourselves into a corner there
21:01 * sri thinks it might worth considering a feature freeze until we've reduced the technical debt in Mojo::Transaction::HTTP and the classes it interacts with
21:05 sri the fact that everyone seems always to be hiding from this topic only makes me more determined :)
21:36 jabberwok re: my question and Grinnz response earlier, probably what I was looking for was:    $url = Mojo::URL->new($self->url_for->to_abs)->path('/events.jpg')
21:37 sri why not $c->url_for('/events.jpg')?
21:40 good_news_everyon joined #mojo
21:40 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/v4Alp
21:40 good_news_everyon mojo/master d53773a Sebastian Riedel: no need to check the transaction
21:40 good_news_everyon left #mojo
21:43 good_news_everyon joined #mojo
21:43 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/v4A8F
21:43 good_news_everyon mojo/master bc8ea4e Sebastian Riedel: weaken should be closer to the closure
21:43 good_news_everyon left #mojo
21:54 jabberwok umm... well... that would be way too obvious!  =facepalm=   right.
21:55 Grinnz_ yeah the URI::file stuff was just to get an absolute URL path, once you have the path you can just pass it to url_for
21:55 jabberwok sometimes i do over-think thinks.  =raises glass=  y'all are awesome
22:01 kyshtynbai joined #mojo
22:13 disputin joined #mojo
22:21 woz joined #mojo
22:26 disputin joined #mojo
22:27 disputin joined #mojo
22:40 ZoffixMobile joined #mojo
22:43 woz joined #mojo
23:09 woz joined #mojo
23:28 Eric joined #mojo
23:59 mib_yt3uc8 joined #mojo

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