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

IRC log for #mojo, 2015-06-24

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

All times shown according to UTC.

Time Nick Message
00:27 neilhwatson joined #mojo
00:46 woz joined #mojo
01:03 jberger Ahhh now this is summer
01:03 jberger https://twitter.com/joelaberger/status/613512399920836608
01:15 klapperl joined #mojo
01:35 Kogurr joined #mojo
01:50 asarch joined #mojo
02:13 noganex_ joined #mojo
02:22 woz joined #mojo
02:36 mgrimes joined #mojo
02:41 cpan_mojo Statocles-0.049 by PREACTION https://metacpan.org/release/PREACTION/Statocles-0.049
02:56 human39 joined #mojo
03:05 hshong joined #mojo
03:22 mattastrophe1 joined #mojo
03:24 woz joined #mojo
03:36 mtj- joined #mojo
04:21 sh4 joined #mojo
04:25 woz joined #mojo
04:41 melo1 joined #mojo
05:03 ChmEarl joined #mojo
05:16 kaare joined #mojo
05:26 woz joined #mojo
06:12 dp_ joined #mojo
06:16 dod joined #mojo
06:20 cpan_mojo Swagger2-0.35 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Swagger2-0.35
06:24 Lee joined #mojo
06:28 woz joined #mojo
06:33 dod joined #mojo
06:35 dod joined #mojo
06:47 berov joined #mojo
07:07 eseyman joined #mojo
07:17 ToApolytoXaos joined #mojo
07:29 woz joined #mojo
07:41 trone joined #mojo
08:04 woz joined #mojo
08:12 Vandal joined #mojo
08:45 zivester joined #mojo
10:51 kaare_ joined #mojo
10:59 crux joined #mojo
11:06 neilhwatson joined #mojo
11:16 Lee joined #mojo
11:24 crux joined #mojo
12:13 human39 joined #mojo
12:19 batman looking forward to updates on this: https://groups.google.com/forum/?utm_source=digest&utm_medium=email#!topic/mojolicious/1BM-4NG2QDU
12:19 batman i tried to investigate yesterday, but couldn't figure it out :/
12:22 mst right, because it gets the close at the same time as the final read
12:23 mst I'm not sure why that's surprising
12:37 augensalat no - the read event actually happens as expected, but  the callback is delayed until after the close event
12:39 batman mst: i don't think there's anything that is "at the same time" in a cooperative environment.
12:39 mst augensalat: ok, that would be more odd
12:40 mst batman: thank you for that factually accurate but completely irrelevant statement. are you practising for a microsoft tech support interview? :D
12:41 batman sorry. i just don't understand what you said, unless you actually meant _at_the_same_time_
12:42 batman crap. *work* *brb*
12:42 mst I meant that it would seem possible for the same bit of inside-loop code to emit both a final read and a close
12:42 dvinciguerra joined #mojo
12:42 mst augensalat has apparently already disproven that hypothesis though
12:43 mst so I wouldn't worry too much; it was wrong anyway :)
12:44 ajr_ joined #mojo
12:46 jberger augensalat: if your callback needs to be the first emitted, I think there are public api ways to do so
12:46 jberger Even if they aren't the most convenient
12:47 jberger (I haven't had time too read through the code in question yet, but I'd that would address your problem)
12:47 jberger s/too/to/
12:48 kaare_ joined #mojo
12:50 batman mst: ok :)
12:58 augensalat jberger: I only see the Mojo::EventEmitter::on(), wich adds the given callback to the end of the list. Moreover I don't like application code that does strange things based on some internal knowledge.
12:59 augensalat For me the money quote is that the Mojo::IOLoop::Stream read event is dangerous and should be avoided, due to the default subscriber to that event, that does things recursively.
13:12 jberger augensalat: I understand that point, and I think it seems valid
13:13 jberger that said, I don't think that it is silly to think that diagnostic information should be placed at the head of the subscriptions list
13:13 jberger sri: would it be considered public api to do something like
13:13 sri jberger: sorry, not getting involved
13:14 jberger unshift $emitter->subscribers('my_event')->@*, sub { ... }
13:14 jberger ^^ this is a general question, can be considered completely separately
13:15 sri i feel like whatever i contribute to the discussion will be used against me later
13:15 sri been burned too many times
13:15 jberger ok
13:25 Lee joined #mojo
13:27 jberger augensalat: I think your latter statement is a bit strongly worded though
13:27 batman +1
13:27 purl 1
13:27 jberger as I'm reading the code, it makes sense to me why it does what it does on read events
13:28 jberger I think it might be safe to say that piggybacking on another object's stream event (which in this case is used in a fairly low level way) is likely to be subject to that object's use of it
13:28 jberger to then avoid it, I think pushing yourself to the head of the subscription line is a reasonable way to mitigate
13:29 jberger we have other places in the guides where we document removing default subscribers, this isn't much different
13:30 jberger http://mojolicio.us/perldoc/Mojolicious/Guides/Cookbook#Streaming-response
13:30 jberger actually, have you tried using the res->content->on(read => ...) callback?
13:30 jberger is that sufficient?
13:30 jberger (I don't know if it would work and if so would it be a different outcome)
13:31 jberger augensalat: ^^
13:48 crux joined #mojo
13:50 augensalat jberger: I'm not sure if that will help - actually I'm not sure if Mojo::IOLoop::Stream is the appropriate solution for my actual use-case. It's just the second time that I stumbled over this strange event callback behaviour in Mojo::IOLoop::Stream.
13:51 augensalat But thank you anyway
13:58 davido__ joined #mojo
14:04 gryphon joined #mojo
14:08 crux joined #mojo
14:26 punter joined #mojo
14:28 asarch joined #mojo
14:32 gryphon joined #mojo
14:52 mattastrophe joined #mojo
14:56 sri guess the wishlist thread might be over now
14:57 sri too bad, i wouldn't mind working on a fun little feature
14:57 asarch left #mojo
14:57 sri looks like nothing happend with upload validations either
14:58 dexteruk joined #mojo
15:00 disputin joined #mojo
15:06 Kogurr joined #mojo
15:14 melo joined #mojo
15:17 dexteruk_ joined #mojo
15:26 lluad joined #mojo
15:27 sri ah, the phoenix folks have chosen postgres as their main database too
15:27 Grinnz_ if you have a choice, there is no choice anymore :)
15:28 mst 'phoenix folks' ?
15:29 sri http://www.phoenixframework.org/
15:29 sri most interesting new framework in a very long time
15:30 sri elixir is taking over erlang by storm, latest release of the beam vm has special optimizations for elixir
15:30 lluad Erlang's VM seems like a good place to start for a web stack.
15:31 mst eeenteresting
15:31 mst the erlang community basically standardised on postgres years ago
15:34 dexteruk joined #mojo
15:41 jberger is there any compelling reason to actually expire a session cookie on logout rather than just dumping all its contents?
15:41 jberger I've got a reason to need to send a logout flash message and, of course, that isn't possible when also expiring the cookie
15:42 mst what the fsck is it with everybody doing http-method-first routes
15:42 Grinnz_ meaining?
15:43 mst get "/", PageController, :index
15:43 jberger get '/' vs route '/' -> to get
15:43 mst entity first, then method, otherwise what is HTTP even :(
15:43 * Grinnz_ shrugs
15:43 Grinnz_ more concise for the common case, i guess
15:43 jberger mojo lets you do it the other way
15:45 jberger my $root = $r->any('/'); $root->get->to('controller#get'); $root->post->to('controller#post');
15:45 mst Grinnz_: except in the case where you only handle get for an entity I don't think it actually is
15:45 mst I think basically the problem is most people don't actually want to think in terms of REST even when they're designing a REST API
15:45 Grinnz_ that's what i meant by the common case, it really depends on the application though
15:45 mst and I can't quite undersatdn it
15:46 Grinnz_ it's not a REST API though, it's a router that can be used for REST APIs
15:46 Grinnz_ unless what you're talking about is a REST API, then nvm :P
15:47 mst which part of "when they're designing a REST API" wasn't clear? :P
15:47 pink_mist well, you could have lead with that :P
15:47 Grinnz_ i'm saying maybe the routers in question weren't just designed for REST APIs
15:47 pink_mist *led?
15:48 Grinnz_ i'm actually gonna have to look this one up
15:50 Grinnz_ yeah i think led is correct
15:57 sri HTTP puts the method first
15:58 sri GET /foo/bar HTTP/1.1
15:59 sri ->get('/foo/bar')->to('what#ever')
15:59 sri it feels right to me
16:03 nicomen 1
16:03 nicomen +1
16:03 purl 1
16:04 jberger well that's just crazy talk purl, 1+1 = 2
16:04 kaare_ joined #mojo
16:06 Grinnz_ could we somehow get purl to stop treating a bare +1 as a mathematical problem :P
16:07 * sri shakes purl
16:07 * purl shakes xantus
16:07 jberger purl: seen xantus
16:07 purl xantus was last seen on #mojo 1 years, 15 days, 20 hours, 25 minutes and 18 seconds ago, saying: via /minion (websocket)  [Jun  8 19:42:39 2014]
16:08 dod joined #mojo
16:08 sri oh, minion is over a year old now :o
16:09 jberger happy birthday minion!
16:10 jberger http://www.quickmeme.com/img/6f/6fd144a705f1ca352f9aa774766711ec3e5e8859dcd1bcac8387cd1f5bf7503e.jpg
16:10 sri \o/
16:10 Gedge joined #mojo
16:10 PryMar56 joined #mojo
16:17 jkramer joined #mojo
16:17 jkramer Ahoy
16:18 sri btw. upload validation is not as easy as we thought yesterday
16:18 sri tag helpers need to be changed too, or the tag_with_error stuff wouldn't work automatically
16:18 sri that might actually be the hardest part
16:18 jkramer I'm having a hard time finding the documentation of the method app->log or even it's definition in the source. It should be in Mojolicious.pm, right?
16:19 sri jkramer: base class
16:19 purl i think base class is demoted.
16:19 jkramer Mojo::Base?
16:19 purl hmmm... Mojo::Base is really about embracing minimalism and getting the most syntactic sugar out of as little code as possible
16:19 sri the inheritance chain is documented
16:20 sri just follow it
16:20 jkramer Dayum, Mojo? o_O
16:20 jkramer Ok got it
16:20 jkramer thx
16:21 sri the full hierarchy is here too http://mojolicio.us/perldoc#REFERENCE
16:22 jkramer Yeah I actually had seen log in Mojo.pm when grepping, but I thought Mojo.pm is just that funny hack thing for making -Mojo oneliners
16:22 jkramer Didn't expect it to be the base of it all :)
16:22 jberger jkramer: no, that's ojo.pm
16:22 jkramer Aww right
16:22 jkramer I'm tired
16:23 sri Mojo is a bit of an odd class
16:23 * jberger has now used it though
16:23 jberger it does its job
16:24 sri a relic from the times when Mojolicious was just an example framework for Mojo
16:24 sri now it exists mostly just for ->isa checks
16:24 sri for app embedding
16:28 jberger app embedding was my reason
16:28 jberger but its kinda nice to have a "just implement this one method" injection point to handle anything
16:29 sh4 joined #mojo
17:14 zivester joined #mojo
17:25 Gedge_ joined #mojo
17:55 berov joined #mojo
18:09 KimmoNO joined #mojo
18:20 Onigiri joined #mojo
18:37 disputin joined #mojo
18:47 Onigiri joined #mojo
19:44 dvinciguerra joined #mojo
19:57 amon joined #mojo
20:07 dod joined #mojo
20:24 berov1 joined #mojo
20:25 ajr_ joined #mojo
21:10 disputin joined #mojo
21:38 mattastrophe joined #mojo
22:11 * sri wonders if there are actually good use cases for $collection->push/unshift
23:41 neilhwatson joined #mojo

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