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

IRC log for #mojo, 2015-10-20

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

All times shown according to UTC.

Time Nick Message
00:00 salva joined #mojo
00:11 damaya joined #mojo
00:15 sri http://mojolicio.us/perldoc/Mojolicious/Guides/Rendering#Rendering-JSON
00:26 * pink_mist has a bad habit of not looking through the ::Guides section but going right into the source code instead ... I probably miss a lot because of that :/
00:29 mattastrophe joined #mojo
00:42 Grinnz yes, i made the same mistake a lot :)
01:24 tencendur joined #mojo
01:33 nnutter joined #mojo
01:55 kaare joined #mojo
02:05 aborazmeh joined #mojo
02:11 nnutter If anyone wants to weigh in with thoughtful feedback I would appreciate it: https://github.com/nnutter/mojo-pgx-cursor/pull/2
02:12 noganex_ joined #mojo
02:12 nnutter This is for an early version of Mojo::PgX::Cursor to add support for DBD::Pg cursors.
02:15 sri nnutter: i don't understand the need for menkey_patch, you can just overload the db method
02:28 Grinnz i'm making (yet another) template toolkit renderer plugin, and i'm thinking it would be nice to bundle .tt2 versions of the bundled mojolicious templates, but then i figured out how those templates are bundled again :/
02:33 sri come up with a better way
02:33 Grinnz it's tough... encroaching on scary sharedir territory
02:34 sri i don't think you're grasping the complexity quite yet
02:35 sri there's also precedence issues where bundled files need to be below everything usr generated
02:38 sri actually the main issue
02:46 davido_ joined #mojo
02:47 d4rkie joined #mojo
02:51 Grinnz that is tricky... the only way i can think to do it is to make the _bundled call (more specifically, the templates it looks for) in Mojolicious::Renderer extensible, but then it's still a problem of how do you specify bundled templates
02:57 Grinnz i may have a better idea
02:59 Grinnz eh... nevermind :)
03:00 Grinnz as long as i don't let template toolkit try to render a nonexistent exception template, everything works well anyway
03:00 sri so you have no better idea?
03:01 Grinnz not for the moment
03:01 * sri is disappointed :(
03:02 mantovani joined #mojo
03:20 sri and in case someone else wants to work on this
03:20 sri the problem is that we need 3 precedence levels
03:21 sri templates directories > DATA templates > bundled templates
03:21 sri so you can't just append the directory for bundled templates to the templates directories
03:22 sri because an exception.html.ep in a DATA section overrides the bundled template
03:23 sri if anyone here has an idea for doing that elegantly, please send a pull request
03:23 sri oh, and this also applies for static files
03:38 davido_ joined #mojo
03:51 damaya joined #mojo
04:04 Grinnz i just had flashbacks to using HTML::Template and having to set die_on_bad_params to 0 or it would die if you specify any template parameters that aren't used by the template @_@
04:07 damaya joined #mojo
04:20 nnutter sri: I just left monkey_patch in as an option.  However, I totally missed the `db` part which should apply to either choice of use.  I'll rework that.
04:35 d4rkie joined #mojo
04:42 irqq joined #mojo
04:48 davido_ joined #mojo
05:13 damaya joined #mojo
05:45 cpan_mojo Mojolicious-Plugin-TemplateToolkit-0.001 by DBOOK https://metacpan.org/release/DBOOK/Mojolicious-Plugin-TemplateToolkit-0.001
05:57 Lee ^ what's the diff between that and Mojolicious::Plugin::TtRenderer?
05:58 Grinnz about 3 orders of magnitude less complicated for one
06:01 Grinnz hmm forgot to mention that data/inline templates still work normally
06:02 Lee okay, that's a reason
06:02 Lee but less complicated? don't see it
06:03 Grinnz that wasn't a reason, i think that's true for TtRenderer too
06:03 Grinnz https://metacpan.org/source/DBOOK/Mojolicious-Plugin-TemplateToolkit-0.001/lib/Mojolicious/Plugin/TemplateToolkit.pm vs whatever's going on in https://metacpan.org/source/Mojolicious::Plugin::TtRenderer::Engine ?
06:06 Lee yeah that's a bit more involved
06:10 dod joined #mojo
06:10 Grinnz i don't really see the point of making a h object which autoloads helpers, the controller object already does that o_0
06:10 Grinnz maybe a remnant of older mojolicious
06:12 inokenty-w joined #mojo
06:15 marcusr Grinnz: ttrenderer is ancient
06:15 Lee yes, TtRenderer is 4 years old now
06:15 dod joined #mojo
06:15 * Lee will see if the maintainer will accept a pull to just make it a shim around the new shiny one :D
06:15 Vandal joined #mojo
06:23 d4rkie joined #mojo
06:54 sugar joined #mojo
07:03 sugar joined #mojo
07:07 eseyman joined #mojo
07:28 trone joined #mojo
07:40 Shaeto joined #mojo
08:03 melo joined #mojo
08:11 d4rkie joined #mojo
08:12 melo1 joined #mojo
08:14 jberger joined #mojo
08:15 stephen joined #mojo
08:19 damaya joined #mojo
08:22 meshl joined #mojo
08:23 punter joined #mojo
08:33 berov left #mojo
08:35 berov joined #mojo
08:35 berov left #mojo
08:49 jontaylor joined #mojo
08:53 melo joined #mojo
09:10 irqq joined #mojo
09:14 irqq_ joined #mojo
09:33 gaunt_ joined #mojo
09:54 bc547 joined #mojo
10:00 d4rkie joined #mojo
10:05 mattastrophe joined #mojo
10:11 asarch joined #mojo
10:30 damaya joined #mojo
10:43 irqq_ joined #mojo
10:46 damaya joined #mojo
10:49 Zoffix joined #mojo
10:59 memowe joined #mojo
10:59 memowe o/
11:03 firnsy joined #mojo
11:05 Zoffix \o
11:16 neilhwatson joined #mojo
11:25 mudler joined #mojo
11:30 mudler joined #mojo
11:48 d4rkie joined #mojo
11:54 ajr_ joined #mojo
12:02 Lee ah, the new TT plugin doesn't support includes in the DATA section
12:05 Lee that's why TtRenderer is subclassing a load of stuff
12:07 tencendur joined #mojo
12:20 hernan605 joined #mojo
12:49 d4rkie joined #mojo
12:55 sri \o
12:58 nic ~~o
13:06 gryphon joined #mojo
13:19 aborazmeh joined #mojo
13:22 sri i guess the renderer api needs to be changed to handled bundled templates differently
13:22 sri s/d//
13:24 sri http://mojolicio.us/perldoc/Mojolicious/Guides/Rendering#Adding-your-favorite-template-system
13:24 sri big problem here is that we have no fourth precedence level
13:24 sri (i was wrong when i said three yesterday)
13:24 sri for templates there is also inline
13:25 sri inline template > template file > DATA template > bundled template
13:26 sri bundled templates are currently dealt with manually, and get passed as inline templates
13:30 Lee which is what TtRenderer is doing: https://github.com/plicease/Mojolicious-Plugin-TtRenderer/commit/e64ce4c484e37d53ba402ef16875a7f9bab78a4c # although commit is from 2012
13:32 Grinnz get_data_template already does that second part
13:32 Grinnz lol
13:32 Grinnz i guess not if $options is undefined but why..
13:34 Grinnz as for includes of DATA, i'm planning to look into it but if there's no easy way i don't feel any real need to support that
13:36 Lee Grinnz: the second bit handles includes within the DATA section
13:36 Lee comment it out and tests fail related to wrappers/includes
13:37 Grinnz i see
13:43 sri oh, now that i think about it, there is a slightly more elegant solution :)
13:44 sri we already use a mojo/ prefix for bundled static files
13:44 sri that would work for fallback templates too
13:44 tencendur joined #mojo
13:49 sri also looks better in the logs
13:50 sri instead of "Rendering inline template..." twice you'd see "Rendering template "mojo/development.html.ep""
13:50 Grinnz ooh
13:50 nic that's a valuable gain
13:51 sri little less code too, 4 lines
13:58 good_news_everyon joined #mojo
13:58 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vWk4I
13:58 good_news_everyon mojo/master c810342 Sebastian Riedel: improve rendering of built-in templates to show actual template names in log messages
13:58 good_news_everyon left #mojo
14:01 sri makes so much sense in retrospect
14:01 nic sri++
14:02 sri what the log looks like now https://gist.github.com/anonymous/a48e86bbe1364e343613
14:05 memowe joined #mojo
14:08 sri i got confused yesterday because it is a tiny bit more complicated for static files :)
14:08 sri because of the bundled favicon
14:08 sri which needs to be overloadable from DATA sections as well as public directories
14:08 sri otherwise the mojo/* prefix alone would work there too
14:23 jontaylor I’m trying to debug a Mojo::Pg issue i’ve got, when I start my hypnotoad process up with 25 workers, it registers 25 DB connections to postgres
14:23 jontaylor if I go onto any page
14:23 jontaylor and rapdily refresh the page
14:23 jontaylor the connection number rises
14:24 jontaylor until I run out of connections
14:24 jontaylor after a couple of rounds of doing that i’m now up to 54 DB connections
14:25 mikegrb joined #mojo
14:26 sri non-blocking operations can result in more connections, but the number should go down again once those operations are finished
14:26 jontaylor I am seeing it go down, i’m down to 52 now
14:27 jontaylor maybe i’m getting a traffic spike every now and then
14:27 jontaylor thats pushing me over the 100 limit
14:27 sri been thinking about a method that enforces a connection limit
14:28 sri perhaps something as simple as $pg->db(sub { my ($pg, $db) = @_ })
14:29 sri "if you pass a callback no new connection will be created if the limit has been reached, and instead we wait for an already existing one to become available again"
14:31 jontaylor I would definately appreciate a connection limit, as its a limited resource
14:32 jontaylor I need to spend a bit of time ensuring that my own code is not the culpret, and then I need to build a test case to demonstrate it if its now
14:32 jontaylor s/now/not
14:34 sri if your code leaks, then it wouldn't help
14:37 d4rkie joined #mojo
14:40 Shaeto left #mojo
14:42 al joined #mojo
14:43 dvinciguerra joined #mojo
14:45 d4rkie joined #mojo
14:46 mikegrb joined #mojo
14:47 jb360 joined #mojo
14:47 jontaylor heh, just tried to kill my minion worker and its all like, nope, i’ll continue until i’m done thanks!
14:48 mikegrb dedication
14:49 hernan605 joined #mojo
14:49 jontaylor i have a backlog of a million jobs, but I reckon it’ll finish within the hour
14:55 CandyAngel I should just finish the current job as far as I am aware..
14:56 sri you better hurry up with that backlog
14:57 CandyAngel aidwonoda
14:57 CandyAngel It*
14:57 CandyAngel I swear this keyboard hates me
14:57 CandyAngel The reason is happens on other keyboard is yet to be determined..
14:57 jontaylor i was expecting it to just finish its current job, and then stop heh
14:58 jontaylor I need to make sure its not a bug in my freebsd rc script first though
14:58 jontaylor it might have sent the wrong signal
14:58 sri are you using the latest version? there was a bug recently
14:58 jontaylor the one with the SIGCHLD ?
14:58 sri no
14:58 jontaylor i think I might be caught by that
14:59 sri it would keep dequueing jobs if there is one still being worked on, even after receiving SIGINT/TERM
14:59 jontaylor its on 1.15
14:59 jontaylor after its finished i’ll carton bundle the latest version, do another deploy, and try again
14:59 sri yea, that has the bug
15:00 sri we are at 2.05 now
15:00 sri you missed 10 releases
15:00 jontaylor yikes
15:00 sri https://github.com/kraih/minion/blob/master/Changes#L49
15:01 jontaylor its funny because i’m new to carton, and i’ve had newer versions installed at the system level
15:01 jontaylor but forgot to use cartons bundling feature
15:09 thowe how do you restrict formats on a route when not using Mojolicious::Lite?  I can't seem to find where in the documentation that syntax/attributes are.
15:09 sri http://mojolicio.us/perldoc/Mojolicious/Guides/Routing#Formats
15:10 thowe ah, sweet
15:10 thowe thanks
15:12 hernan605 joined #mojo
15:12 stephen joined #mojo
15:23 CandyAngel Is it possible to intercept VERSION checks and load a compatibility module if an old version is called?
15:35 avenj CandyAngel: check out what strictures 2.x does f.ex
15:39 cpan_mojo Mojo-Webqq-1.5.8 by SJDY https://metacpan.org/release/SJDY/Mojo-Webqq-1.5.8
15:40 CandyAngel Thankies avenj
15:47 thowe how does one specify a format in url_for?  Or when building a Mojo::URL?
15:48 jberger the same way
15:48 CandyAngel Makes me much happier releasing this superlame API knowing I can change it gracefully :P
15:48 CandyAngel For both people who will use it :)
15:49 jberger oh, hmmm, perhaps not
15:49 thowe jberger, You know, I suspected as much, but I'm not quite confident enough to just try.  I should get over that.
15:49 jberger just trying is always good
15:49 jberger and I should do that before I answer :s
15:50 thowe oh, well, I guess we'll find out....
15:50 thowe oh, you already tried...
15:50 thowe OK, then the question stands..
15:51 jberger and I tried incorrectly :s
15:51 jberger yes, format works in url_fr
15:51 thowe I thought maybe I was just unable to find it in the docs again
15:51 thowe ah
15:51 jberger but I had a route that wasn't defined when I tried
15:51 thowe aha
15:53 jberger mojo eval -v 'app->url_for("whatever", whatever => "unicorn", format => "json")'
15:53 jberger I had to dig into the Mojo::HelloWorld app to remember what it was
15:53 jberger I thought perldoc plugin was loaded, it is not
15:57 PryMar56 joined #mojo
15:59 jberger a complete and unabiguous example
15:59 jberger perl -Mojo -E 'a("/hello" => { text => "hello there" } => "greet")->start' eval -v 'app->url_for("greet", format => "txt")'
16:05 lluad joined #mojo
16:13 mattastrophe joined #mojo
16:17 jberger oh! https://letsencrypt.org/2015/10/19/lets-encrypt-is-trusted.html
16:29 lluad I'm going to encrypt So Many Things when they go live.
16:30 jberger they are live
16:30 jberger that's the point
16:30 jberger or is the service still not available?
16:31 lluad Nope.
16:31 lluad Scheduled to go live Nov 16th.
16:31 lluad This is just a major milestone in them getting there.
16:33 jberger ok
16:33 jberger I had used the client when it only issued demo certs
16:34 lluad (It might mean that the certs you can get with their beta system are trusted, but I doubt it.)
16:34 jberger I guess I assumed that once they had cross-signed root cert then it would be a go
16:34 jberger no, those were dummy certs
16:34 jberger signed by something like "coolcerts.fake"
16:34 good_news_everyon joined #mojo
16:34 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vWIEg
16:34 good_news_everyon mojo/master d783170 Sebastian Riedel: mention url_for in formats section
16:34 good_news_everyon left #mojo
16:37 sh4 joined #mojo
16:45 jontaylor I’ve been trying to set the application_name parameter on a Mojo::Pg connection and not having much luck
16:45 jontaylor I can see from the code that adding a query parameter like ?application_name=blah on the end of the DSN should work
16:46 jontaylor but when I query pg_stat_activity I can see the connection has no name
16:51 * sri wonders if the mojo/* prefix thing needs to be mentioned at all
16:58 good_news_everyon joined #mojo
16:58 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vWIrj
16:58 good_news_everyon mojo/master dcfb9f2 Sebastian Riedel: no need to mention the "mojo/*" prefix
16:58 good_news_everyon left #mojo
16:58 sri yea, i think it's not as important
17:19 meshl joined #mojo
17:22 jontaylor I thought I had a workaround by running a query to set a variable on the connection
17:23 jontaylor but then new connections are created, and those wont have had that query executed upon them
17:24 sri http://mojolicio.us/perldoc/Mojo/Pg#connection
17:25 jontaylor excellent a hook!
17:27 trone joined #mojo
17:33 jontaylor is it unsafe to run a query inside a connection hook? I ask because i’m trying to do so and i’m getting deep recursion problems
17:36 jontaylor Right yes from looking at the code, it looks like using db() inside the connection hook, will then call _dequeue, which then emits the event again
17:40 jontaylor to work around the infinite loop i’ll change it to work on the dbh directly
17:41 sri i've added a usage example http://mojolicio.us/perldoc/Mojo/Pg#connection
17:42 jontaylor yep thats what i’m doing now
17:43 jontaylor might be worth adding a note not to use $pg->db() in that hook
17:44 sri disagree
17:44 sri every event in every mojo module gets passed the invocant
17:44 sri that you have to be careful with it is implied
17:46 jontaylor i think its non-obvious that calling db() in that hook is dangerous, mostly because i just made the mistake, and there is a whole army of idiots like me out there :)
17:47 sri what was your thinking behind that?
17:47 sri when you call ->db it creates a new connection, when you create a new connection the connection event gets emitted
17:47 sri how could that not result in recursion?
17:48 jontaylor you are obviously correct of course, i can’t argue with that logic
17:49 sri it's like the before_render hook and calling ->render
17:49 sri we do not mention that you shouldn't call ->render from it
17:50 sri if we listed all the methods you can't call from it... that would actually be a pretty big list ;p
17:51 sri or calling ->get from the start event in Mojo::UserAgent
17:52 jontaylor I actually made a few errors that lead me here
17:52 jontaylor my first was that I thought it was fine to perform every query by going through ->db
17:53 jontaylor which now I know might explain my tons of connections problem from earlier
17:53 sri anyway, my point is that i believe this is beyond the scope of the documentation, listing all methods you can't call is too much, people would just skip over the list because TLDR
17:54 sri the risk of recursion is simply implied with every event
17:55 sri guess the Mojo::EventEmitter description could mention it... but nobody reads that ;p
17:57 jontaylor so since I didn’t realise calling through ->db() would cause a connection, (i thought it just picked one from a pool), then i thought that connection happened at some stage earlier, and wouldn’t happen on every call to db()
18:05 thowe the angular documentation is completely impenetrable
18:08 sri so, i guess we'll have a letsencrypt toolchain for mojolicious soon?
18:09 Grinnz_ jontaylor: it picks one from a pool -or- makes a new connection
18:09 Grinnz_ the event is there so you know when the latter happens ;)
18:11 jontaylor Grinnz_: Indeed, the same logical failing means I was also doing $pg->db->query(), everywhere
18:11 Grinnz_ jontaylor: it's usually a good idea to do that, but not always
18:11 jontaylor instead of hitting $pg->db once at the top of an action, and then using that one instance
18:18 sri $pg->db->query() everywhere should be fine
18:19 sri not just fine, even better to avoid timeouts
18:20 sri only "downside" is the performance cost of a $dbh->ping call
18:20 sri even sths are still cached
18:32 jontaylor ahh great, I can revert this revision then :)
18:33 sri you've not tested it?
18:33 Grinnz_ the only time you don't want to do that is when you specifically need the same DBH for successive calls, in most of those cases you should be using transactions too
18:33 jontaylor its seemed to work fine both ways
18:34 jontaylor the reason i’m looking at it now, is because my 25 hynotoad workers can easily end up creating 100 db connections
18:34 jontaylor which hits the postgres default
18:35 jontaylor connection limit
18:35 sri are your queries non-blocking?
18:35 jontaylor all but one action are blocking
18:36 jontaylor its an action that collects metrics
18:36 jontaylor so I deal with the request, respond to the user, and then save the metrics later in a delay
18:36 sri blocking queries cannot result in more than one connection
18:36 sri if all your queries were blocking, you should have exactly one connection per worker
18:40 ZoffixW joined #mojo
18:44 disputin joined #mojo
18:48 jontaylor I’ve got a theory on whats going on, I think when i’m testing it i’m hammering it with too much load, and workers are getting replaced
19:01 Ulti joined #mojo
19:01 Ulti http://irclog.perlgeek.de/mojo/2015-10-07#i_11337307  ;___;
19:01 Ulti I care about P5 and P6, and even more for Mojolicious on P6 which I was just catching up on any chatter for
19:02 Ulti though I dont know if it counts to be a perl6 person by just using perl6 and not hacking on Rakudo
19:02 Ulti even "in production"
19:06 ZoffixW There's actually this that appeared on P6 modules list whose synopsis looks strikengly like Mojolicious https://github.com/shoichikaji/Frinfon/
19:09 Ulti oh neat thats one of the Crust people
19:10 Ulti I quite like the play on words, and I only ever write crusty apps anyway
19:12 Ulti ZoffixW if you used the mojo template thing with that it wouldn't be too shabby
19:14 irqq joined #mojo
19:17 trone There is a way to get a filehandle of the file from a form upload? the req->upload(foo)->asset is a Mojo::Asset::Memory
19:18 ZoffixW trone, there's no file, so there's no handle. But you can fake it, if you really have to: https://metacpan.org/source/ZOFFIX/Mojo-CSV-1.001002/lib/Mojo/CSV.pm#L37
19:18 trone Do I have to turn it into a Mojo::Asset::File?
19:18 trone ZoffixW: ah, thx, I go to read.
19:19 trone ZoffixW: yep, there is no file, but I'm looking for a perlish trick. :-)
19:19 trone mm, yep. it seems what I'm loooking for
19:28 trone ZoffixW++
19:28 ZoffixW \o/
19:29 sri funny this keeps coming up
19:29 sri yet everyone voted against ->asset->to_file
19:29 * sri shrugs
19:31 trone Indeed...
19:32 Akron joined #mojo
19:32 ZoffixW I'd vote against ->to_file too.
19:33 preaction hah, i had this exact thing yesterday as well...
19:33 ZoffixW lol
19:33 preaction and i also did not know about MojoCSV
19:33 ZoffixW It's fairly new
19:34 ZoffixW I wouldn't mind if it did the right thing when calling ->filehandle though. Make it a method of Mojo::Asset and let it figure out what sort of filehandle to make
19:35 preaction yeah, a filehandle would likely be all one needed. we're on 5.10, so it's got PerlIO. i'm certain there are some corner cases in that though
19:35 * ZoffixW nods
19:37 sri no
19:37 sri that's just bad
19:37 preaction oh, heh, XS would be one of them
19:37 sri fake filehandles don't work with a lot of stuff
19:37 sri and we'd end up with more user problems
19:38 sri definitive -1
19:40 ZoffixW sri, like what? (just curious.. since I am using one in Mojo::CSV)
19:42 thowe how the hell you supposed to avoid ambiguous column names when prefetching with DBIC?
19:43 ZoffixW Try asking in #dbix-class I recall there was a way, but that was over a year ago and I forget the answer
19:43 sri ZoffixW: fileno, sysread, syswrite, sysseek...
19:44 ZoffixW Ah. Definitely -1
19:44 sri anything that deals with a file descriptor
19:44 sri PerlIO can only fake operations on the highest level
19:46 sri i use fake filehandles all over the place in tests, but i don't think most perl users would know the difference
19:46 sri and just pass them along to third party modules, which then fail in funny ways
19:46 preaction right, but i've heard you shouldn't be using those things (sys*) unless you have a very specific need to
19:47 disputin joined #mojo
19:48 sri really? i try to avoid higher level functions actually, since there's always weird side effects i don't remember... newline transformation on windows, encoding issues...
19:49 sri maybe i'm just getting old, but have to real up on PerlIO magic every time i use it again
19:49 sri s/real/read/
19:51 preaction i mean, the only magic i use regularly is the fake filehandles
19:51 preaction but yeah, they've got no fileno, so XS code that isn't using PerlIO_* is screwed
19:51 Grinnz_ to_file is a better idea, so you can deterministically get a file asset
19:51 preaction and i imagine that it's not an easy thing to figure out
19:52 Grinnz_ the main problem i've had with fake filehandles is that they don't work on 5.6... for varying definitions of "problem" :P
19:53 sri http://perldoc.perl.org/PerlIO.html#Defaults-and-how-to-override-them
19:53 sri you know this kinda stuff
19:54 sri i don't actually work on windows, so this always comes back to bite me
19:55 jberger I think generally, since mojo is so good about dealing with the encode/decode at boundaries, that using the sys* functions is probably saner anyway
19:56 sri personally, i like "my $bytes = slurp 'foo.txt'; my $chars = decode 'UTF-8', $bytes;"
19:56 sri i know exactly what i get then
19:57 jberger yeah, I've started to like that too
19:57 sri perl6 is better there
19:57 jberger I especially have appreciated it with all the talk around File::Slurp and whatever the successor of the week is there
20:00 damaya joined #mojo
20:05 jontaylor I’m noticing when I stress test my app its only opening a max of 4 DB connections per worker
20:06 jontaylor i’m wondering if this line should be greater than or equal to, instead of greater than. https://github.com/kraih/mojo-pg/blob/master/lib/Mojo/Pg.pm#L87
20:07 jontaylor oh wait nvm
20:43 ajr_ joined #mojo
20:49 jb360 joined #mojo
21:13 mattastrophe joined #mojo
21:52 meshl joined #mojo
21:55 sri ohoh
21:55 sri i think the template change actually breaks old installations
21:56 sri can someone install github master over an existing version? and try the dev page?
21:56 sri MOJO_LOG_LEVEL=debug perl -Ilib -Mojo -E 'a({inline => "% die;"})->start' daemon
21:56 sri that should be enough to test it
21:58 * sri will try it on os x
21:59 sri interesting
22:00 sri it doesn't completely break here
22:00 sri but the production exception and not_found templates get found first
22:00 sri so the dev page doesn't work anymore
22:02 sri possible solution would be to move public and templates into another directory
22:03 sri not sure what to call the directory though
22:03 sri shared, dev, app...
22:04 sri core, internal, share
22:04 sri files
22:05 sri resources
22:05 dvinciguerra joined #mojo
22:15 good_news_everyon joined #mojo
22:15 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vWtlv
22:15 good_news_everyon mojo/master 0141cc9 Sebastian Riedel: move public and templates directories to avoid conflicts with older versions
22:15 good_news_everyon left #mojo
22:15 sri so, it's resources for now
22:17 disputin joined #mojo
22:18 Grinnz_ always a bit annoying how files from CPAN modules stick around when a newer version is installed
22:18 sri yea
22:21 Grinnz_ why was it finding the older ones anyway? shouldnt it have been looking for mojo/*?
22:21 good_news_everyon joined #mojo
22:21 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vWt8r
22:21 good_news_everyon mojo/master 3700492 Sebastian Riedel: use the name resources consistently
22:21 good_news_everyon left #mojo
22:21 Grinnz_ i like 'resources' btw :)
22:22 sri there is a leftover exception.html.ep in the templates directory
22:22 sri and exception.html.ep has a higher priority than mojo/exception.html.ep
22:22 sri so it basically overloads the fallback
22:23 sri like any other exception.html.ep template would in one of your templates directories
22:24 Grinnz_ ahh
22:24 Grinnz_ because $TEMPLATES is searched by template_path also
22:25 sri it's exception.development.*.* -> exception.*.* -> exception.development.html.* -> exception.html.* -> mojo/exception.html.*
22:25 sri yea, we now reuse all the normal infrastrucutre
22:25 sri which works because of the mojo/ prefix
22:27 ajr_ joined #mojo
22:27 sri (*.* for the first two is a placeholder for current_format.*)
22:28 sri oh, i guess the renaming will break a few packaging tools :S
22:31 good_news_everyon joined #mojo
22:31 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vWtRY
22:31 good_news_everyon mojo/master 2ffa43d Sebastian Riedel: mention changes to bundled files
22:31 good_news_everyon left #mojo
22:33 Grinnz_ how so?
22:35 sri they have the directory names hardcoded
22:35 sri that activestate thingy for example comes to mind
22:36 Grinnz_ ah
22:36 Grinnz_ yeah i guess that might be part of a spec file for RPM
22:36 * Grinnz_ really should get around to messing with rpm'ing cpan dists
22:37 disputin joined #mojo
22:54 disputin joined #mojo
23:25 trone I saw Mojo::Asset::File with cleanup(0) create a new temp file name every time to avoid overwrite.
23:26 trone so it provides safe temporary files as File::Temp ?
23:27 trone imho this is not enough enlightned in the Mojo::Asset::File docs.
23:28 trone s/enlightned/emphasized/
23:30 dvinciguerra joined #mojo
23:44 damaya joined #mojo

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