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

IRC log for #mojo, 2016-02-19

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

All times shown according to UTC.

Time Nick Message
00:10 cpan_mojo Mojolicious-Plugin-PlainRoutes-0.05 by CTHOR https://metacpan.org/release/CTHOR/Mojolicious-Plugin-PlainRoutes-0.05
00:32 orev inside the run method of a Mojolicious::Command, first param ($c) is what?  I'm trying to call render_to_string on it but method is not found
00:33 orev also tried $c->app->render_to_string
00:33 orev I find it difficult to track down exactly where in the object hierarchy a lot of this stuff is
00:34 pink_mist surely it's your Mojolicious::Command object
00:34 preaction indeed. the Mojolicious::Command docs say it's $self, not $c
00:35 pink_mist I see a ->render_to_file but no ->render_to_string ... where did you get that from?
00:35 orev http://mojolicious.org/perldoc/Mojolicious/Guides/Rendering#Rendering-to-strings
00:36 orev ok, the self makes more sense
00:36 pink_mist that's a Mojolicious::Controller object
00:37 orev I am able to access my helpers through $self->app->helper_name
00:37 pink_mist I have no idea if it's possible to get at a controller object from a command
00:38 pink_mist and now I'm heading to bed, so good luck :P
00:38 orev ok, thanks :)
00:41 orev the $self->app appears to be a controller
00:42 orev maybe not
00:46 orev seems to work if I use Mojo::Template directlry
00:53 preaction what are you trying to do here?
00:53 preaction why do you need render_to_string?
00:54 orev I'm trying to send an email from inside the command.
00:54 orev reading the body text from a variable, then need to replace template stuff with real values
00:56 preaction if you put the body text in a DATA section, you could use render_data
00:56 orev no, it's coming from an external config file
01:01 preaction then likely using Mojo::Template directly is the way to go
01:01 orev yeah, it's a bit more raw than I was hoping.  render_to_string from the controller would work fine if it was available
01:03 jberger you can do $c->app->build_controller to get a generic controller object
01:04 orev from a ::command object?  I don't have $c, just $self
01:05 orev ok, well, that didn't fail with an unknown method :)
01:06 jberger the name of the variable doesn't matter
01:07 jberger the fact that its the first argument to the run method means its the "invocant" or otherwise said an instance of the class or subclass which called the method
01:07 jberger there are actually some render methods in the Command class http://mojolicious.org/perldoc/Mojolicious/Command#render_data
01:08 jberger but they are basically just wrappers around Mojo::Template
01:08 jberger which means no helpers etc
01:09 preaction right, but also no strings. only __DATA__
01:09 lluad joined #mojo
01:58 asarch joined #mojo
02:43 PryMar56 joined #mojo
02:59 bf joined #mojo
03:58 noganex_ joined #mojo
04:14 mspo can't mojo do this? https://github.com/timothycrosley/hug
04:15 preaction do what?
04:15 preaction do you mean Mojolicious::Lite?
04:16 mspo I mean also do cli stuff
04:16 preaction there's the mojo command, and your app's command can do the same things. is that what you mean?
04:17 preaction "cli stuff" is a pretty broad topic
04:17 mspo indeed
04:25 inokenty-w joined #mojo
04:41 bradjm joined #mojo
05:40 melo joined #mojo
06:08 davido joined #mojo
06:11 bf joined #mojo
06:46 cpan_mojo Mojolicious-Plugin-JSONRPC2-v2.0.0 by POWERMAN https://metacpan.org/release/POWERMAN/Mojolicious-Plugin-JSONRPC2-v2.0.0
07:33 Jonis -w 4
07:43 cpan_mojo Mojolicious-Plugin-Narada-v1.0.0 by POWERMAN https://metacpan.org/release/POWERMAN/Mojolicious-Plugin-Narada-v1.0.0
07:43 Vandal joined #mojo
07:51 cpan_mojo Mojolicious-Plugin-SecureCORS-v2.0.0 by POWERMAN https://metacpan.org/release/POWERMAN/Mojolicious-Plugin-SecureCORS-v2.0.0
08:10 bc547 joined #mojo
08:17 sugar joined #mojo
08:27 trone joined #mojo
08:39 osfabibisi joined #mojo
08:46 dhg joined #mojo
09:12 good_news_everyon joined #mojo
09:12 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/v2v0Y
09:12 good_news_everyon mojo/master d3bb456 Sebastian Riedel: no need to check for a placeholder
09:12 good_news_everyon left #mojo
09:23 dvinciguerra joined #mojo
09:28 dboehmer joined #mojo
09:30 mishanti1 What do people here use for logging in your mojo applications?
09:31 batman Mojo::Log
09:32 batman to file.
09:44 CandyAngel Mojo::Log
09:44 CandyAngel for everything :D
09:59 kes joined #mojo
10:00 kes does POST params take priority over GET params?
10:01 Adurah Sounds like you're asking a PHP question.
10:07 mishanti1 batman , CandyAngel : and you get useful information out by doing `app->log->format(sub { ... });` to get the proper output or have you chosen another solution?
10:07 sri Adurah: there is no need to be rude
10:08 CandyAngel mishanti1: I always change the format to ISO8601 :P
10:09 mishanti1 CandyAngel: I was thinking more along the lines of getting timing-information, useragent, various ip-addresses (users, intermediaries, etc) and those kinds of things.
10:09 kes descript why this question have rised: http://paste.scsys.co.uk/505850
10:10 CandyAngel Oh, no, I just add those to specific messages if I need them
10:11 kes Adurah: no, that is not PHP question
10:13 batman mishanti1: sounds like an accesslog and not a generic log method
10:14 batman mishanti1: https://metacpan.org/pod/Mojolicious::Plugin::AccessLog or https://metacpan.org/pod/Toadfarm::Plugin::AccessLog
10:20 Adurah php, rude... haha.
10:20 csson joined #mojo
10:23 batman kes: i would suggest using $c->req->... if you care
10:23 batman s/if/when/
10:24 * batman doesn't get why the question need answering :(
10:30 good_news_everyon joined #mojo
10:30 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/v2vQ4
10:30 good_news_everyon mojo/master 29dbd85 Sebastian Riedel: Add is_level method to Mojo::Log and deprecate level specific is_* methods
10:30 good_news_everyon left #mojo
10:30 sri jberger: i remember you wanted that change a few months back
10:33 CandyAngel Format change in Mojo::Log?
10:35 mishanti1 batman, CandyAngel : Thanks for the input. Will definitly look closer at M::P::AccessLog .
10:36 good_news_everyon joined #mojo
10:36 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/v2v78
10:36 good_news_everyon mojo/master 7075086 Sebastian Riedel: add a few examples for checking the log level
10:36 good_news_everyon left #mojo
10:39 batman mishanti1: i also use https://metacpan.org/pod/Mojolicious::Plugin::Logf to log structured data
10:41 CandyAngel sri: If there was a suggestion to change the log format to ISO8601, I ++ that
10:42 sri CandyAngel: we are utf-8 everywhere
10:43 sri umm
10:43 sri what am i talking
10:43 sri 8601 was the date format?
10:44 CandyAngel Yeah
10:44 sri if you can prove that it wouldn't have a big performance impact, a nicer date format might get accepted
10:45 CandyAngel I'm not sure if it is "nicer", but it is a standard and I'm a bit of a stickler for standards.. when they aren't bullied in by big companies *coughcough*
10:46 sri well, then you should give it a try
10:46 sri btw. around here we prefer RFC 3339 to ISO8601
10:48 * batman have never understood the difference :(
10:48 kes batman: so in all POST forms I will use $c->req->... that is not pretty.
10:48 batman kes: why?
10:49 sri RFC 3339 is more limited in scope
10:49 batman sri: oh. so RFC3339->isa(ISO8601) but not the other way around?
10:49 CandyAngel As long as it follows the general YYYY-mm-dd HH:MM:SS format, I don't mind
10:49 sri batman: yea
10:49 kes batman: that force me to think about GET/POST (query_param/body_param) I do not want to. I am lazy.
10:50 batman kes: WHY?
10:50 batman :(
10:50 batman sri: thanks :)
10:50 sri CandyAngel: Mojo::Date supports RFC 3339 btw.
10:52 dboehmer I am still looking for help with $c->req->url when the app is mounted with Plack::Builder
10:52 kes batman: compare: $self->param( 'name' ) VS $self->req->body_params->param( 'name' )
10:52 CandyAngel I'm probably strange in that I also always output timestamps in UTC, regardless of timezone
10:53 sri dboehmer: i don't think we have that many plack users
10:53 dboehmer if nobody has an idea i will file a bug against Plack::Builder or mojo but I am not even sure where the problem originates from
10:53 kes hr.... where is 'body_params' at http://mojolicious.org/perldoc/Mojo/Message/Request???
10:53 batman kes: but why do you care???
10:53 * batman gives up
10:54 dboehmer sri, do you know if it's plack::bullder not passing the request url to mojolicious or it might be mojolicious not correctly retrieving information from Plack?
10:54 sri dboehmer: i'm not a plack user myself
10:55 kes batman: have you look at: http://paste.scsys.co.uk/505850
10:55 dboehmer sri, then I'll try to file a bug at Plack::Builder. Of course I'll notify this project if the story turns out to affect Mojolicious
10:56 CandyAngel I also have a good reason for using YYYY-mm-dd, even though I'm the only one at my workplace who does
10:56 CandyAngel If I type the year last, sometimes I will put 2015
10:57 CandyAngel It never happens when I type the year first..
10:57 mishanti1 batman: M::P::Logf seems like a pretty good fit for some of the stats and things we need to retrieve for monitoring. :)
10:59 kes batman: when the param with same name present in both GET and POST the $self->param( 'name' ) will return value of GET param instead of more actual POST param. That is wrong and force me to use $self->req->body_params->param( 'name' )
11:00 kes this is the POST query so body_params should take precedence over GET params
11:00 kes s/GET params/query_params/
11:01 batman mishanti1: yeah. that's what i use it for :)
11:01 batman sri: https://ssl.thorsen.pm/paste/0c69b25e2e68 <-- guess there's a performance hit (RFC 3339)
11:01 sri and suplicated code
11:01 sri s/s/d/
11:02 kes and another question to sri: http://paste.scsys.co.uk/505851
11:02 sri kes: sorry, we have too much of a language barrier for discussions
11:03 batman sri: do you mean duplicate from Mojo::Date? if so: yes, i wanted to see if the copy/paste would speed it up :)
11:03 kes sri: np. I do not want to discuss. Just notice for you about DOC.
11:03 batman CandyAngel: you can replace $app->log->format(sub { ... }) and the code i just pasted if you want a different timestamp
11:03 sri batman: question if if the performance difference matters in the greater scheme of things
11:03 batman sri: yeah... not sure how to answer that question :/
11:04 kes there is no description for 'body_params' on the page: http://mojolicious.org/perldoc/Mojo/Message/Request#query_params
11:04 sri batman: rps benchmark with one of the apps in the examples folder with logging to STDERR?
11:05 batman kes: Mojo::Message::Request->isa(Mojo::Message)
11:05 batman sri: using wrk?
11:05 sri yes
11:06 * batman to the wrkmobile!!! nananana
11:06 sri MOJO_LOG_LEVEL=debug and -m production i think
11:06 batman sri: can i use examples/hello.pl ?
11:06 * sri nods
11:07 sri daemon over prefork too
11:07 sri prefork tends to have too much variance at least on my macbook
11:07 batman you want me to test _both_ daemon /and/ prefork..? (i was thinking i would just test daemon)
11:08 sri daemon only is good
11:08 batman excellent
11:08 sri if it works out we might need a Mojo::Util::epoch_to_datetime or so
11:08 sri which Mojo::Date and Mojo::Log can share
11:09 sri kes: thing is you want us to decide which one gets precedence, which is currently undefined, so you need a discussion first
11:14 sri kes: there are multiple ways you could go about it, find a) others that support your proposal, b) resources on the web that back up your proposal, maybe all other popular frameworks already work that way
11:14 kes because the method is POST so I was expecting body_params by calling $c->param( 'name' )
11:15 sri yea, i don't understand that sentence again
11:15 sri it doesn't work this way
11:15 kes )
11:15 kes ok. sorry
11:15 kes forget question
11:17 mishanti1 kes: The point is sri and the mojo core devs expect changes to be laid out with reason behind change, scope of the change and relevant background information such as convention, standards etc.
11:19 kes ok ok. I understand. I get the answer: "which is currently undefined"
11:19 mishanti1 kes: I believe it is perfectly ok to question current implementation (I'm sure I'll be corrected if I'm wrong), but there is a preference for establishing a common "base" so to speak when starting a discussion of something like the question you brought up here.
11:19 kes I will try to look for standards or frameworks
11:21 batman i also want to know why you care if the param comes from body or query.
11:21 batman i would say that's a client issue, and not a server issue.
11:23 sri mishanti1 is absolutely correct
11:24 sri and batman too, use cases matter
11:25 kes the param in query is old param and stay there because it is hardcoded into HTML: action = $c->req->query_path...Then user input new value in the form and press 'Send'. In the action which process this POST I should inspect body_params, not query_params. But $c->param returns first query_params
11:28 kes if form action is not defined the URL is reused by form.
11:28 kes oh. I came up a good example
11:28 kes I will send a link
11:29 mishanti1 kes: If I understand your use case correctly it is easy to argue that it is a design-flaw in the application that you have collision between query-parameters and POST'ed parameters, especially given that the spec for POST does not cover that particular use case.
11:31 batman mishanti1++
11:32 batman sri: https://ssl.thorsen.pm/paste/4e0929378936 <-- i can't get conclusive results :(
11:32 batman both tests seems to vary between 730 and 800 :(
11:32 cpan_mojo Swagger2-0.74 by ASHIMEMA https://metacpan.org/release/ASHIMEMA/Swagger2-0.74
11:32 sri batman: wow, that is a lot of variance for a daemon benchmark
11:33 batman yeah :/
11:33 sri batman: stop watching hd movies int he background! ;p
11:33 batman haha
11:33 mishanti1 batman: Yeah batman, close those incognito tabs.
11:33 batman sri: can you test if i push my local branch?
11:33 sri batman: i'll test with your earlier patch
11:34 batman oh... maybe i should stop "spotify-cpu-drainer.bin"
11:34 * batman runs another benchmark
11:36 sri batman: no measurable difference here
11:36 sri constantly between 729 and 733
11:36 sri 3 runs for each
11:37 sri for 10s with -c 100
11:37 batman master: 757.92/s, 804.63/s, 754.53/s, with_patch: 794.57/s, 723.48/s, 844.64/s
11:37 sri yea, that's too much variance in your environment, close the flash player or whatever
11:38 sri maybe your cpu clock rate changes a lot
11:40 kes http://paste.scsys.co.uk/505854
11:41 batman oh! i think iterm is draining my cpu because of the logging to STDERR :P
11:41 sri i'm using the osx terminal
11:41 kes I miss something again. Why body_params is plain string instead of Mojo::Parameters object?
11:41 sri anyway, i think a time format change like that might be fine
11:43 batman yeah, that's better: https://ssl.thorsen.pm/paste/90b44cd73a27 :)
11:43 batman mojo ... daemon ... 2>stderr.log
11:44 batman still some variations, but not as bad
11:44 batman sri: can i make a PR?
11:45 sri you know how you want to do it yet?
11:45 batman with Mojo::Util:: epoch_to_datetime() as wel
11:45 * sri nods
11:45 sri sure
11:49 batman should that function take care of decimals or should that still be a Mojo::Date feature?
11:51 sri it should
11:52 sri and that will teah you to ask better questions! ;p
11:52 sri *teach
11:53 sri epoch_to_datetime(Time::HiRes::time) should be fine
11:53 batman sorry. i don't follow. (about better questions)
11:53 sri "it should" says yes to both
11:54 asarch joined #mojo
11:54 sri a better question would have been if it should be in Mojo::Util or Mojo::Date
11:54 nic yay, improving the log date format will mean much less need for Mojolicious::Plugin::Log::Timestamp
11:54 batman sri: haha! yeah, get it now :)
11:56 sri batman: oh, it might also be worth trying Time::Piece for performance :o
11:56 sri just saw Time::Piece->datetime
11:58 sri i think it didn't work for Mojo::DOM, but Mojo::Log has much less requirements
11:58 sri umm
11:58 sri Mojo::Date, not Mojo::DOM
12:00 sri Time::Piece is so clunky
12:00 sri it almost works for so many things, but falls short just a little bit
12:01 sri yea, forget about it
12:02 batman cool. i can't see how Time::Piece->datetime() can be faster... it does so many things
12:04 batman i wonder if it's confusing to log with gmtime instead of localtime...
12:06 nic It should be whatever the box is using
12:07 sri ohoh, that's a big problem then
12:07 sri Mojo::Util::epoch_to_datetime doesn't work anymore
12:07 sri nic: you might have killed the feature
12:08 nic NOOOOOOOOOOOOOOOOOO
12:08 nic because localtime is too expensive?
12:08 sri Mojo::Date only generates zulu time
12:09 sri now you want Mojo::Log to generate local time
12:09 kaare joined #mojo
12:09 sri so, they can't use the same primitives... and things get ugly
12:10 sri i was in favor of the change because it was simple and clean
12:10 sri CandyAngel, batman: back to the drawing board!
12:12 good_news_everyon joined #mojo
12:12 good_news_everyon [mojo] jhthorsen created log-format-rfc-3339 (+1 new commit): https://git.io/v2fT7
12:12 good_news_everyon mojo/log-format-rfc-3339 230e0ed Jan Henning Thorsen: Changed the log timestamp to RFC3339...
12:12 good_news_everyon left #mojo
12:12 batman sri: could use the original patch i provided
12:12 batman though you would have to omit Z
12:13 sri fwiw, i like the look of your branch
12:14 sri but if more people want local time...
12:14 batman thanks :)
12:16 nic If the change doesn't make things worse for people with my wants then I don't see a problem, we can keep using Mojolicious::Plugin::Log::Timestamp
12:17 batman nic: it only changes the default log format. not the Mojo::Log api.
12:17 nic (shame it's hard for me to test right now, while my clock shows no distinction from UTC :) )
12:17 nic cool
12:17 sri i'm -1-ish on it now :(
12:18 sri i can already see the complaints about wrong time in the log
12:18 batman yeah :/
12:18 sri and custom time formatting in Mojo::Log is messy
12:18 sri hard to test...
12:19 sri this would be a great time for someone to make it work with Time::Piece ;p
12:20 good_news_everyon joined #mojo
12:20 good_news_everyon [mojo] jhthorsen pushed 1 new commit to log-format-rfc-3339: https://git.io/v2fI0
12:20 good_news_everyon mojo/log-format-rfc-3339 938556a Jan Henning Thorsen: Log with localtime instead of gmtime
12:20 good_news_everyon left #mojo
12:21 batman i just want the branch to stick around for a while...
12:21 batman what about "work with Time::Piece" ...?
12:23 sri this works https://gist.github.com/anonymous/8c5378857e1d1baab7f8
12:24 sri but slow
12:25 batman there's no real difference between that and my last commit is it...?
12:25 sri 730 rps vs 678 rps
12:25 batman except mine is one extra line of code
12:25 sri batman: yours is ugly to test
12:25 CandyAngel I'm fine with all logging using gmtime unless otherwise specified by the user.. but that's just selfish as that's what I do anyway
12:25 CandyAngel I never log in localtime
12:26 sri sorry, but i'm -1 on all proposals
12:26 CandyAngel /nick sri-1
12:26 sri Time::Piece would have been fine with me if it was faster
12:26 CandyAngel sr-1
12:26 batman CandyAngel..?
12:26 sri batman's first proposal will cause user complaints, and the second has ugly tests
12:27 CandyAngel batman: Hm? What?
12:27 sri i'm not going to veto if others of the core team vote differently though
12:27 * sri pokes marcusr, tempire, jberger  and crab
12:27 batman sri: i doubt they will use much time to vote on this :P
12:27 * batman drops it
12:28 batman i guess i could add it as an option to my Logf plugin
12:28 sri batman: hope my explanation for the vote on the second proposal makes sense
12:28 sri my problem is with having a hidden time formatting function, your tests only check for a basic format, not if the value actually makes sense
12:28 batman yes, indeed it does
12:29 batman it = explanation
12:29 dboehmer I wrote a little test script and with Plack it's actually possible to get the full URL even behind Plack::Builder
12:29 dboehmer maybe it's bug? https://github.com/kraih/mojo/issues/911
12:30 sri dboehmer: there is barely any infromation in that issue
12:31 sri dboehmer: we grab information from the env hash here https://github.com/kraih/mojo/blob/master/lib/Mojo/Message/Request.pm#L156
12:31 dboehmer sri, hmm, I don't know what else I could provide. I am no expert in Mojo internals yet. I provided a working example in Plack w/o any Mojo. what else would be useful?
12:31 dboehmer I'll dig into that
12:31 sri and the tests are here https://github.com/kraih/mojo/blob/master/t/mojo/psgi.t
12:32 sri please add more if there's something missing
12:33 sri dboehmer: thing is, i doubt anyone here actively uses plack, so finding someone to dig through that example will be tough
12:34 sri with a test case i'd give it a shot
12:36 sri dboehmer: these examples do work, right? http://mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#Plack-middleware
12:39 sri for me they do
12:39 dboehmer I used these as inspiration. in general it works. rendering is ok. it's only that i can't access $c->req->url. still looking into the code you linked
12:40 sri this works flawless, so i'm assuming something with your use of Plack::Builder might be wrong https://gist.github.com/anonymous/48f0302044ee548aa22f
12:43 sri you might want to try #plack
12:45 sri dboehmer: i'm gonna close your github issue, it's just too low on information
12:45 sri we only really use github for actual bugs and feature requests
12:46 sri support is here and on the mailing list
12:46 dboehmer sri, hmm, i Inserted a `mount => builder {app->start}` and it works. I though my example is simple enough but obviously there's something wrong in that ...
12:47 dboehmer sri, then my issue isn't suitable for your gh issues section. I might update the issue once I found my bug if you don't mind
12:47 sri sure
12:49 jberger I think I have no opinion on log formatting
12:49 jberger But I'm curious if Phil21 or preaction do
12:50 sri dboehmer: just to be thorough, i've tested this too, and it works https://gist.github.com/anonymous/3331032143a5544b6d91
12:51 dboehmer sri, most simple issue: I need to call $url->to_abs. my fault:(
12:51 dboehmer sri++
12:51 sri ouch
12:52 dboehmer sri, thank you for your efforts to identify the problem!
12:52 sri i'll let you close the issue then :)
12:54 cfedde joined #mojo
12:57 dhg joined #mojo
12:57 kes the $c->req->body_params is a string. How to force $c->req->body_params->param( 'name' ) to work?
12:57 dboehmer I have some vague feeling that Mojo::URL should return "something" when I get like 5 of its attributes. is $url->scheme on relative URL ever a useful action? but then I have no better suggestion as well
13:02 sri no
13:06 sri jberger, batman: isn't it pathetic how slow Time::Piece is in this case?
13:06 sri i can't get over just how bad it is
13:07 sri you can replicate the functionality in perl and it is faster!
13:07 jberger I think that was part of chansens's reason for Time::Moment
13:08 batman sri: haha
13:09 jberger IIRC Time::Piece was a convenience class
13:09 sri but, it's not convenient at all
13:10 sri there's actually a lot of xs code https://api.metacpan.org/source/ESAYM/Time-Piece-1.31/Piece.xs
13:11 sri https://thebodypacifist.files.wordpress.com/2013/04/you-are-bad-and-you-should-feel-bad2.jpg
13:11 jberger I've always had a nagging problem with it that it doesn't document its own strftime symbols
13:11 Adurah Do people really have issues with access to a compiler?
13:11 jberger Adurah: yes
13:11 jberger sadly
13:12 jberger .... and the Mojo::JSON slash escape is back again!
13:13 chansen jberger: It can't, Time::Piece uses strftime from your OS libc. What's even more fun is that strptime uses the C locale and strftime uses your OS locale ;)
13:14 jberger I expected that it was a libc thing
13:14 jberger didn't expect the locale differences though, ugh
13:15 jberger the nagging was that I wasn't sure, but it made me suspect that that was true, which means you can't use it to write cross platform code
13:15 jberger now you've confirmed that for me, thanks
13:17 jberger #ThatFeelingWhen someone doesn't document something that might have cross-platform implications giving the impression that its so they don't have to mention the cross-platform implications
13:28 cpan_mojo Mojolicious-Plugin-Logf-0.08 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-Logf-0.08
13:43 neilhwatson joined #mojo
13:46 ramortegui joined #mojo
14:13 sri i'd also like to hear more opinions on the log date/time format actually
14:14 sri if it mattered enough to people i wouldn't be oposed to a method i guess
14:14 sri Mojo::Log::datetime or so
14:14 sri my $formatted = $log->datetime($epoch)
14:16 sri or maybe another callback attribute
14:16 sri my $formatted = $log->datetime->($epoch)
14:17 sri $log->timestamp->($epoch)
14:17 sri yea, like that
14:21 batman sri: sounds just as easy to override $log->format() imo
14:22 sri batman: but you can't test that
14:22 sri because you don't know the exact time
14:22 batman what about *CORE::GLOBAL::gmtime = sub {} ?
14:23 sri you mean localtime
14:23 sri does that work back to 5.10?
14:24 batman so... this is the best answer i got: pretty sure i used that in 5.8.x
14:26 sri maybe it's not actually that important, considering everybody else dropped the topic
14:29 perlpilot joined #mojo
14:47 melo joined #mojo
14:51 gryphon joined #mojo
14:56 genio oooh, iTerm2 v3 features look neat
14:58 genio https://iterm2.com/version3.html?src=4
15:08 melo joined #mojo
15:10 dabudabu Sounds good
15:16 sugar joined #mojo
15:39 marty joined #mojo
15:52 jegade left #mojo
15:55 sri this keeps coming up too https://groups.google.com/forum/#!topic/mojolicious/iKdLk2GWJRA
16:07 * jberger never uses the generate commands
16:07 jberger It's so easy to just mint things myself
16:08 vicash the generate commands are great though. it really helps jump starting an application for new users
16:08 jberger Oh yeah it's good for new users
16:09 jberger I'm just saying I can't really comment
16:18 bc547 joined #mojo
16:18 geheimnis` joined #mojo
16:24 batman jberger: https://github.com/jhthorsen/mojo-steps ... what do you think? :)
16:24 batman ref the blocking/non-blocking discussion...
16:25 jberger batman: I'm literally about to go airplane mode
16:25 batman oh! safe trip :)
16:26 jberger It's this about trying to unify blocking and nonblocking code?
16:26 batman yes
16:26 jberger I'll look while on the plane but don't release it yet
16:27 jberger There's always a problem with these
16:27 jberger I've tried several times
16:27 batman no. no. i won't release it for quite some time.
16:27 batman not even sure if Mojo::Steps is something i should keep
16:28 jberger It scares me that begin has no method body
16:28 batman that's what makes it work :)
16:30 jberger Then that scares me even more
16:30 jberger :p
16:30 bradjm joined #mojo
16:30 * jberger 🎶 leaving on a jet plane 🎶
16:31 batman :)
16:32 jberger (gods I hate people with carry ons)
16:33 * batman never travel with extra luggage
16:33 batman i just had carry on when i went to malaysia
16:35 jberger batman: I don't understand this module at all
16:35 jberger wait doesn't start the loop?
16:35 batman no. you can't start the loop when you're in blocking mode
16:36 * jberger is completely lost
16:36 jberger o/
16:55 lluad joined #mojo
17:05 sri hehe, yea this is fun http://stackoverflow.com/questions/35498079/how-do-i-set-up-sni-support-for-mojolicious
17:06 good_news_everyon joined #mojo
17:06 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/v2JLU
17:06 good_news_everyon mojo/master c542378 Sebastian Riedel: use the correct term
17:06 good_news_everyon left #mojo
17:27 sri someone tell brian d foy to write a mojolicious book ;p
17:28 itd joined #mojo
17:43 itd Hi. What is the name of an element like 'q' in an URL like 'http://[::]/path?q' ?
17:43 sri query
17:58 good_news_everyon joined #mojo
17:58 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/v2JCV
17:58 good_news_everyon mojo/master d4887ce Sebastian Riedel: a few more Mojo::URL examples
17:58 good_news_everyon left #mojo
18:15 itd Thank you. (Wow, fast!) I have a query contains only one word (not a key=value pair). Is there a better way to check for this word than to look at the URL of the Mojo::Message::Request object in the route for '/path'? (I tried the param function without any luck.)
18:18 itd (Does this make any sense?)
18:18 marcus jberger: You're a any carry-on person? I can't believe this!
18:21 bwf $req->url->query
18:28 disputin joined #mojo
18:30 dhg joined #mojo
18:30 itd bwf: thank you, that looks good. :)
18:37 bf joined #mojo
19:00 itd left #mojo
19:04 cfedde joined #mojo
19:19 trone joined #mojo
19:27 PryMar56 joined #mojo
19:37 disputin joined #mojo
20:14 trone_ joined #mojo
20:29 sugar joined #mojo
20:29 taichi joined #mojo
20:35 jberger joined #mojo
20:36 jberger Gah of course my convos goes down right when I leave the house!
20:38 jberger I hope the power didn't go out
20:38 sri maybe the house burned down :o
20:38 jberger Don't even say that!
20:38 jberger When did I go offline?
20:39 sri 35 minutes ago
20:43 marcus I meant *anti* carry-on obviously
20:44 disputin joined #mojo
20:44 jberger If everyone has a carry on it takes forever to get on and off the plane
20:46 preaction but you have to have a carry-on to avoid the $25 checked-bag fee
20:46 jberger I pick frontier airlines BECAUSE they charge more for a carry on
20:48 jberger Means sometimes there's almost no carry ons
20:56 sri haha, retweet! https://twitter.com/neil_h_watson/status/700764731141783552
20:57 sri even though the typo hurts ;p
20:58 jberger The wife tells me it's super windy in Chicago now
20:59 sri the house flew away too?
21:00 preaction it is. it's 65° and super windy
21:00 sri http://big.assets.huffingtonpost.com/ozhousespinning.gif
21:00 * preaction cackles maniacally
21:00 taichi joined #mojo
21:00 pink_mist oh shit, preaction is the wicked witch of the west!
21:03 * CandyAngel steals everyones brain for a while
21:03 CandyAngel I'll bring them back later, I promise!
21:03 * CandyAngel goes back to coding her voxel engine
21:06 jberger Argh convos still uses render_not_found?
21:06 sri :O
21:06 * jberger weeps
21:07 jberger Somehow I knew this would happen
21:08 jberger I tried to setup a convos instance on my new server
21:08 jberger And it didn't work
21:08 jberger So I stopped
21:08 jberger Now I'm trying to hurriedly set it up again
21:08 jberger Since my home server is firewalled I can't get it up until I get home
21:09 bwf :q
21:11 bf joined #mojo
21:37 jberger_ joined #mojo
21:46 sugar joined #mojo
21:48 jberger well here I am on my new convos!
21:48 jberger I turned all the cpanfile suggested versions into exact versions
21:49 CandyAngel Yay
21:50 jberger I know batman has been working on a complete code rewrite but maybe I should adopt the old codebase for a while
22:03 sri so, now marcus, jberger and tempire have all dropped out of #mojo-core
22:03 sri maybe we should just close the channel
22:03 sri it's more annoying than useful
22:07 jberger I'm trying to remember what other channels I was in
22:08 sri the chanserv system just doesn't work, someone always drops out of the closed channels
22:09 sri think it's because you're not using old school irc clients
22:09 sri crab and me have never dropped i think
22:10 jberger yeah there's probably some autonegotiation we lack
22:10 sri convos strikes again
22:10 jberger but on this new server I SHOULD be much more stable
22:10 jberger (except for one planned restart i'm gonna need)
22:15 jberger at $job one of the perks is a colocated server in the datacenter
22:16 jberger not that anyone gives us an SLA, but we offer our customers 100% SLA (IIRC) so the datacenter isn't coming down
22:16 jberger if I go down its because my server did but lots of the other possible weak links are eliminated
22:16 sri *datacenter starts burning in the background*
22:16 jberger DUDE why do you keep saying things like that!
22:18 stephan48 just pointing out possible problems
22:20 * sri hides the gasoline and whistles innocently
22:20 jberger see if I give you hosting now!
22:20 jberger if I'm normally in a channel with any of you and am currently not in it, just ping me
22:24 hummeleBop joined #mojo
23:01 CandyAngel if I have a classA which takes a classB as an attribute and classA needs to react to an event emitted by classB, should I do $self->classB->on() in 'new' or 'warmup'?
23:02 CandyAngel or should I be doing like..
23:02 CandyAngel my $classA = ClassA->new;
23:02 CandyAngel my $classB = ClassB->new;
23:02 CandyAngel $classA->on('event' => sub { $classB->some_method });
23:03 CandyAngel I'm not sure where the responsibility for setting up the "link" is
23:07 CandyAngel And I explained that wrong.. argh
23:07 good_news_everyon joined #mojo
23:07 good_news_everyon [mojo] kraih tagged v6.47 at 7c04cdb: https://git.io/v2U0x
23:07 good_news_everyon left #mojo
23:09 good_news_everyon joined #mojo
23:09 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/v2UEY
23:09 good_news_everyon mojo/master e347f4c Sebastian Riedel: bump version
23:09 good_news_everyon left #mojo
23:27 CandyAngel sri: .. why are both donation items glitter shirts?
23:29 punter joined #mojo
23:33 CandyAngel Also, this is the brown I associate with Mojolicious: http://tinyurl.com/jqljgoo
23:39 sri CandyAngel: you asked that before ;p
23:40 CandyAngel They weren't both glitter before.. one with glowinthedark
23:40 CandyAngel one was*
23:40 sri oh right, i removed the glow in the dark recently
23:41 sri never sold one
23:41 CandyAngel Fair enough
23:41 bradjm late on this, but it's nice to see Mojo::UserAgent getting mentions on that tweet's stack overflow link
23:41 bradjm i just used it for a weekend project and it was really pleasant to work with
23:41 sri \o/
23:43 sri CandyAngel: the tie dye shirts are so cool, i want more folks to have those
23:43 sri so i think they'll stay normal now
23:43 sri without glow
23:45 sri there are a few more special prints i've not tried yet, like neon colors and metallic silver
23:46 sri and black glitter
23:46 sri :)
23:47 * sri still thinks gold glitter was the most classy
23:48 sri pink glitter on pink tie dye is a candidate for the next donation shirt :D

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