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

IRC log for #mojo, 2015-02-26

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

All times shown according to UTC.

Time Nick Message
00:01 good_news_everyon joined #mojo
00:01 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/AxRW
00:01 good_news_everyon mojo/master 4f5c1b3 Sebastian Riedel: the fatal log level is always active
00:01 good_news_everyon left #mojo
00:02 sri and that should be the last two app->log->log and $c->match->match
00:17 * pink_mist irrationally wonders if there are any references to the space pope being reptilian in Mojo .... I guess the raptor logo?
00:20 riche did you guys say 5.75 is bad version?
00:21 riche I keep seeing 5.77, 5.78 as bad
00:21 jberger there is one that's only change is something like fixes performance regression, you want that
00:21 riche nah
00:21 riche I deployed 5.75 for a client and was wondering if there was something fundamentally wrong
00:21 sri don't got pre-5.80
00:22 good_news_everyon joined #mojo
00:22 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/AxV8
00:22 good_news_everyon mojo/master 35c697d Sebastian Riedel: fix subroutine order
00:22 good_news_everyon left #mojo
00:23 sri better yet, wait for 6.0 tomorrow ;p
00:23 riche I did have some issue with rendering template on is_limit_exceeded
00:23 jberger but 6.0 has breaking changes
00:23 riche similar to what is in I think the cookbook
00:24 sri well, if you want to version with the most deprecation warnings, that would be the last 5.8x
00:24 sri s/to/the/
00:25 bpmedley Another odd question: Is there a known solution to run a CGI.pm script from within Mojolicious?  Perhaps using the Mount plugin to support multiple scripts?
00:30 jberger bpmedley: batman has a library that translates lots of mojo data to CGI stype
00:30 jberger style
00:31 Grinnz https://metacpan.org/pod/Mojolicious::Plugin::CGI
00:31 jberger don't know if that will get you all the way there, but it should help
00:31 bpmedley Thx
00:31 jberger actually, it looks like it will
00:31 jberger batman++
00:31 Grinnz havent tried it yet but it might be nice to use soon
00:32 Grinnz although i might just take a few days and convert the last of the CGI scripts...
00:32 Grinnz heh
00:32 jberger Grinnz: I recommend that all-in-all, but when that is not an option, better that than nothing
00:34 Grinnz i was going to use it so that we could switch wholesale to using nginx on another server but it looks like there are other roadblocks to that anyway
00:47 tempire ok, I have a basic splash page up
00:47 tempire Just have to wait for ssm
00:47 tempire We could do conf.mojolicio.us in the meantime, if anyone wants.
00:47 riche great!
00:48 riche I think wait
00:48 riche can you send a link out in email so we can see your page?
00:49 ispyhumanfly joined #mojo
00:58 riche tempire: looks pretty darn good.  thanks very much
00:59 diginet_ joined #mojo
01:00 kaare joined #mojo
01:01 disputin joined #mojo
01:04 zivester joined #mojo
01:08 marmez left #mojo
01:14 sri tempire++
01:14 sri even a big photo of nyc at the top would have worked with that design
01:20 sri btw. jquery calls ->child_nodes just .contents() http://api.jquery.com/contents/
01:20 sri :o
01:21 riche not very smart, because content is many times confused with text()
01:21 sri contents, not content
01:22 riche is an element content?
01:22 riche it composes content
01:22 sri all child nodes are contents
01:23 riche it's like saying the shelves in a bookcase is also content
01:33 riche yeah I know what my talk will be on now ... you guys might cringe on it though
01:35 riche it will be "Integrating Mojo with SharePoint"
01:35 Grinnz hahaha
01:38 riche laugh, but virtually every large organization has sharepoint.  wouldn't it be nice to know how to transparently fetch content from it and deliver through mojo?
01:38 Grinnz i'm sure, for them :)
01:40 riche and once they realize how easy it is, and how fun it can be, perhaps those very same organizations will consider perl development again.
01:40 riche perl development ... as a core platform, not as a bandaid for edge cases.
01:41 riche yes, I spend most of my time outside the echo chamber ;)
01:42 riche anyways, the talk will probably be rejected
01:42 riche heh
01:42 Grinnz yeah, anything we can do to make people realize what perl and mojo can do
01:46 asarch joined #mojo
01:52 good_news_everyon joined #mojo
01:52 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/AxxB
01:52 good_news_everyon mojo/master 993416f Sebastian Riedel: rename node and type methods in Mojo::DOM to type and tag
01:52 good_news_everyon left #mojo
01:53 sri this one may be a little controversial
01:53 sri but it's the correct terminology... and if it doesn't get switched around now... it never will
01:53 sri ->tag for the .tagName property in the DOM API (in case that's not obvious)
01:54 * sri is digging through the dom specs
01:55 sri i'll post a chart with old and new method names to the list once the release is announced
01:59 riche imo it's the right thing to do.  if anything it decreases the learning (or relearning) curve
02:01 bpmedley https://gist.github.com/brianmed/94a1e51ca99fda53266b  <— What am I doing wrong?  I’m not seeing “Hello” in the logs.
02:01 maze joined #mojo
02:03 marty sri++
02:07 good_news_everyon joined #mojo
02:07 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/Ape9
02:07 good_news_everyon mojo/master 409d32e Sebastian Riedel: the correct name is matches
02:07 good_news_everyon left #mojo
02:12 good_news_everyon joined #mojo
02:12 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/ApfP
02:12 good_news_everyon mojo/master 5724735 Sebastian Riedel: double negation is not necessary
02:12 good_news_everyon left #mojo
02:40 klapperl_ joined #mojo
02:41 tempire Should I do training on non-blocking again? Just a revamped version of last year?
02:45 riche is there anything documented on Mojolicious::Lite and Test::Mojo?
02:45 bpmedley My opinion is that non-blocking is one of the more difficult features to grasp and may not be readilly apparent to a newbie.  A lot of people are coming from Apache and may not even realize Mojolicious does non-blocking and the resources it can save.
02:45 riche tempire: imo yes + pg
02:46 bpmedley So, yes, to answer your question.
02:49 riche per my prior question i meant for the two together... I am looking at mojo/t/mojolicious and finding some examples but I was hoping for something ... regimented
02:54 asarch When I do: mojo generate app MyApp::Server, where should I put my own plugins?
02:54 bpmedley riche: https://gist.github.com/brianmed/55d89e85d89398ddde6e  <— $ perl gogo.pl gogo
02:55 bpmedley asarch: I believe you can put them in ./lib and it will work.
02:55 riche bpmedley: yah I am doing similar
02:55 bpmedley What is the issue?
02:55 purl hmmm... the issue is the same one. popl is just following the source and came across sub effective_group_id which has conditional return statements
02:55 riche i don't like having tests and code in the same file
02:56 franzkafka joined #mojo
02:58 riche ugh I think I am just going to convert it to a real app, the template number and complexity is getting larger anyways
02:58 good_news_everyon joined #mojo
02:58 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/ApOl
02:58 good_news_everyon mojo/master 0d4ef05 Sebastian Riedel: mention a test name in the tutorial
02:58 good_news_everyon left #mojo
02:59 sri http://mojolicio.us/perldoc/Mojolicious/Guides/Tutorial#Testing
02:59 sri how did you miss that?
03:00 ispyhumanfly joined #mojo
03:00 jberger bpmedley: did you get the answer to your question?
03:00 riche sri: i tried that but it puked on me
03:00 bpmedley riche: https://gist.github.com/brianmed/e65ee7b21f21dfd421f8
03:00 bpmedley jberger: No, I’m helpless.. :)
03:01 sri riche: so your solution is to ignore the docs? Oo
03:02 riche sorry man
03:02 bpmedley sri: I think riche wants something slightly different than what the docs articulate.  It would seem they want a test script that is loadable from the Mojolicious::Lite script.  Is that correct?
03:02 jberger bpmedley: I don't think you can call the websocket method in blocking form
03:03 bpmedley Interesting.
03:03 sri bpmedley: i don't know, the question was very vague
03:03 bpmedley jberger: That actually makes a bit of sense, now that I think about it.. :)
03:04 sri and what jberger said
03:04 bpmedley riche: Is that correct?  Did you want a test script that is loadable from the Mojolicious::Lite script?
03:04 riche bpmedley: no ... sri knows what I am looking for
03:04 riche but i must be doing something dumbass
03:05 sri if something in the guides doesn't work, please point it out!
03:05 * sri cracks the whip
03:05 jberger riche: sorry can you explain again what you are looking for?
03:06 jberger there have been too many threads going on here
03:06 noganex joined #mojo
03:07 riche jberger: sri re-kicked me in the right direction.
03:07 sri \o/
03:08 jberger ~o/
03:08 jberger \o~
03:08 jberger omfg! tempire, I think we should have a mojo-dance-party!
03:09 * jberger wonders if he just killed the whole conference
03:09 sri http://i1.kym-cdn.com/photos/images/facebook/000/100/646/Im-Here-to-kick-ass-and-chew-bubble-gum-and-im-all-out-of-bubble-gum.jpg
03:09 riche sounds like a major liability to me, jberger
03:09 riche lol
03:09 jberger us old men are going to break many many hips
03:10 riche but if we do, I will play all my CAPSULE albums to drive people insane
03:10 tempire https://www.youtube.com/watch?v=Zzl-sQy811Q
03:10 sri if by dance you mean nodding my head i'm in
03:11 sri tempire: "not available in your country"
03:11 tempire germans don't dance
03:11 sri can confirm
03:13 bpmedley So, I’m trying to setup a Devel::WebDB module that can communicate with a browser; the initial goal would be to do a “live” code trace.  I was hoping to use WebSockets for this, however, I may be limited in that realm.
03:13 riche https://www.youtube.com/watch?v=9Wl_uQOABxg
03:13 jberger gods i love flight of the conchords
03:14 jberger oh they wrote sri's song too
03:15 bpmedley https://gist.github.com/brianmed/b5f09efaf16697b711dc  <— See how line 42 trys to send a message to the remote box.  I’m wondering of a different way to do that.
03:16 jberger https://www.youtube.com/watch?v=WGoi1MSGu64#t=52
03:17 riche yeah fly cathay pacific ... they have all season 2 on the ife
03:17 jberger bpmedley: my eyes!1
03:17 bpmedley :-0
03:18 jberger BINARY SOLO!!!
03:18 purl o/`   0000001 00000011 000000111 00001111    o/`
03:18 riche sri: I am basically following the doc to the hilt and the .t is looking in ../script even though I have that require in it
03:18 jberger hahahahahaha
03:18 purl LOLCON 6 reached.
03:18 jberger I didn't know purl knew that one
03:18 jberger it is even the right solo
03:19 jberger botsnack
03:19 purl thanks jberger :)
03:26 tempire wat
03:26 tempire mojoconf.com is available
03:27 riche sri: nope it works
03:27 riche sighs I missed
03:28 riche "put it in t" ... I was trying to run the .t directly (which is what I'm used to) ... lesson learned
03:33 tempire Well there we go.
03:33 tempire http://mojoconf.com/
03:35 jberger tempire++
03:36 riche very good!
03:44 tempire Let me say it here so we're all clear this year: Official twitter tag is #mojoconf2015
03:44 tempire So we prevent last years debacle
03:45 tempire I mean unless we decide otherwise. But let's say here for sure before anyone starts tweetering.
03:45 tempire And I'll put it on the site too.
03:48 jberger tempire: question, are we worried about year-by-year bleadover?
03:48 jberger why not just #mojoconf?
03:49 tempire I don't know. I just know we had a huge discussion last year and decided on mojoconf2015
03:49 tempire I don't remember why.
03:49 tempire We can have that discussion again when europe wakes up.
03:49 jberger half the people are going to do #mojoconf whether we tell them to again
03:49 tempire That's true enough.
03:50 jberger I don't mind the impression that we have more traffic by having the scrollback go to past years :)
03:50 tempire #mojoconf does seem simpler and cleaner
03:51 riche and takes less on the character count .. and less prone to typos
03:51 jberger #mojoconf2o1S
03:51 riche will happen
03:53 punter joined #mojo
04:06 riche so weird .. testing this and req->upload->headers->content_type is undef
04:06 riche the file upload example in Test::Mojo doesn't say anything about having to harness anything special...
04:08 jberger bpmedley: https://gist.github.com/jberger/67f795b8c367c5a83c70
04:08 jberger oh wait, some more ick to remove
04:09 jberger ok much better
04:10 bpmedley Understood; sorry for the confusion, I was trying to integrate WebSockets with the perl debugger’s DB::DB loop.
04:11 jberger the original example was certainly not
04:12 jberger I assumed that the DB was then for ... debugging
04:13 bpmedley I was probably too vague.  I’m trying to send JSON to a web server that has a browser client connected to it via WebSockets.  Does that make sense?
04:14 jberger that is kinda what we do with websockets, yes
04:14 jberger are you trying to make a browser based debugger?
04:15 bpmedley Correct.
04:15 bpmedley That’s the tricky part, the JSON has to be sent from DB::DB, I believe.
04:16 jberger I have no idea if that is possible
04:16 jberger I'm learning about the debugger tomorrow at chicago.pm
04:16 franzkafka I saw someone earlier mention Mojo::Pg
04:17 franzkafka I've been waiting for it to be production ready. Has that happened?
04:17 jberger but something tells me I'm not going to learn about its event loop (is it really called that?)
04:17 bpmedley I’m not sure what demons call DB::DB.. :)
04:17 firnsy franzkafka: it gets heavy production use here
04:18 jberger franzkafka: I imagine that if if the Mojo::Pg isn't marked experimental, then its production ready
04:18 franzkafka sweet! I'm ditching DBD::Pg then!
04:18 jberger (note that it uses DBD::Pg internally)
04:18 jberger (so you're not really ditching it, you are sweeping it under the rug)
04:18 franzkafka @jberger, true :D
04:19 franzkafka Atom + Seti theme is a thing of beauty
04:19 franzkafka I may just ditch vim
04:28 irq joined #mojo
04:34 riche sri: in Test::Mojo, there is an example for testing file upload.  I think maybe the 'content =>' part should be changed to 'file =>'?
04:40 bpmedley jberger: I got it working; although, it’s not pretty..
04:43 punter joined #mojo
04:46 hshong joined #mojo
04:50 bpmedley perhpas tomorrow
04:52 franzkafka messing with mojo::pg non-blocking and loving it
04:53 franzkafka sri++
04:53 franzkafka sri, do you check private messages?
04:55 riche I am just perplexed why content_type is not being set when I am running tests but is fine when running under prefork or anything else
04:55 riche anyways its getting too late now... tomorrow
05:04 jberger I think I have decided to use this as the background of my talk: https://www.youtube.com/watch?v=fsXhtJ9BTJA
05:04 jberger not quite sure why
05:04 * jberger probably needs to sleep
05:07 franzkafka ok, getting 'wide character in subroutine entry' errors with Mojo::Pg
05:08 franzkafka Is there any way to encode every value in a hashref?
05:08 franzkafka Or do I have to do each one individually?
05:09 good_news_everyon joined #mojo
05:09 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/Apoz
05:09 good_news_everyon mojo/master edd4313 Sebastian Riedel: more diverse WebSocket tests
05:09 good_news_everyon left #mojo
05:11 tempire Added a travel page
05:11 tempire With hotels and such
05:12 franzkafka are you guys doing another mojo conf?
05:12 franzkafka what's the url?
05:12 franzkafka ok, it's in the united states
05:29 inokenty-w joined #mojo
05:33 good_news_everyon joined #mojo
05:33 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/ApPT
05:33 good_news_everyon mojo/master 7894739 Sebastian Riedel: just use the event loop
05:33 good_news_everyon left #mojo
05:36 marmez joined #mojo
05:42 sri can't say $tx->connection($socket) is my favorite feature... but i also can't really think of an alternative
05:48 ispyhumanfly joined #mojo
05:48 sri perhaps an api to feed connection ids to the keep-alive queue
05:58 good_news_everyon joined #mojo
05:58 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/ApM6
05:58 good_news_everyon mojo/master 1712764 Sebastian Riedel: no custom sockets for now
05:58 good_news_everyon left #mojo
05:58 sri it's easy to bring back if there is demand, but i'm not sure there is
05:59 sri i'm especially interested in the use cases
06:02 franzkafka intersting, so query returns a mojo::pg::results object but there's no method to get the id of that inserted row?
06:05 tempire franzkafka: see the returning clause
06:05 tempire http://www.postgresql.org/docs/8.2/static/sql-insert.html
06:06 franzkafka I'm just using last_insert_id from dbh and it's working
06:07 romel_ joined #mojo
06:10 franzkafka yeah, last_insert_id is working. I just modified Mojo::Pg::Result and added a last_insert_id method there.
06:13 davido_ joined #mojo
06:17 avenj joined #mojo
06:34 xdg joined #mojo
06:59 hlin joined #mojo
07:24 dod joined #mojo
07:28 marmez left #mojo
07:29 dod joined #mojo
07:33 Vandal joined #mojo
07:35 Dandre1 joined #mojo
07:37 Dandre joined #mojo
07:53 batman bpmedley: i wrote M::P::CGI for work and it works very well. (we got a lot of weird cgi-scripts...)
07:54 batman bpmedley: the nice thing is that it runs in a fork (non-blocking), so you can handle other things at the same time
07:56 batman that might also suck, if you're used to something like ModPerl::Registry
07:56 batman patches are welcome, but i don't think i care enough to make it myself
08:21 eseyman joined #mojo
08:31 trone joined #mojo
09:01 trone I need a reality check ;-) Mojo::JSON had an object implementation? I see only function here https://metacpan.org/pod/Mojo::JSON , but I believe to remember a sort of Mojo::JSON->decode / ->encode , etc.
09:02 trone Ah, I found in changelog: 5.73  2015-01-24 Removed deprecated object-oriented Mojo::JSON API
09:10 jontaylor joined #mojo
09:11 irq joined #mojo
09:17 bpmedley batman: Cool stuff, thanks.
09:25 fhelmber_ joined #mojo
09:43 meshl joined #mojo
09:54 batman bpmedley: you're welcome. let me know if anything is...weird :)
10:08 jontaylor joined #mojo
10:14 btyler sri: re $tx->connection($socket) for UserAgent -- is there any way I can fix https://metacpan.org/pod/Mojo::UserAgent::UnixSocket to keep working? it depends on passing a specially-wrapped-up IO::Socket::UNIX to Mojo::UserAgent, but perhaps there's a better way
10:20 noganex_ joined #mojo
10:30 punter joined #mojo
10:36 inokenty-w joined #mojo
10:49 elik joined #mojo
10:52 elik joined #mojo
10:58 amon joined #mojo
11:02 irq_ joined #mojo
11:10 jontaylor joined #mojo
11:19 trone joined #mojo
11:19 riche joined #mojo
11:28 riche I have a form that's doing file upload.  in the post callback there's a check for content_type.  This is undef when running through Test::Mojo. Is there something I need to do from the UA to get this set?
11:42 meshl joined #mojo
11:46 riche http://gist.github.com/rpcme/16e712d9effbcf0593b9
11:46 alnewkirk joined #mojo
11:47 AndrewIsh joined #mojo
12:04 riche I guess I need to put in Content-Type in the header manually huh
12:17 gatitskiy joined #mojo
12:17 riche what I did to "fix" it.  Should Mojo::UserAgent be adding the header automagically?  https://gist.github.com/rpcme/0e24773bf94b530df601
12:19 nicomen you mean it should magically guess what kind of format you want to post as?
12:20 riche it's posting a file.  browsers 'autodetect' so why not Mojo::UserAgent?
12:24 riche bah I think checking for mime type is BS anyway.  I think I will just async check what the file is after posting
12:26 riche File::MimeInfo isn't even looking at the file, it's just looking at the extension. sighs
12:35 nicomen riche: but there is a difference between posting a binary file and www-encoded-form values or other things
12:35 nicomen I guess you could at least just tell it it's an octet-stream?
12:36 nicomen Content-Type: application/octet-stream
12:36 purl i heard application/octet-stream was usually set to save to file
12:36 nicomen Content-Disposition: attachment; filename="picture.png"
12:46 neilhwatson joined #mojo
12:51 riche sometimes it's application/x-zip as well.
12:51 riche but with some subset of extensions, yes it's application/octet-stream
12:52 riche if I rename to say ear.txt, File::MimeInfo says it's text... it doesn't even look at the file
12:53 riche and I only write code that's unit testable, so if I can't consistently test the content type that way then I won't code it that way
12:55 ver joined #mojo
12:57 jberger riche: see modules that include the name magic
12:57 jberger I think there are a few
12:57 riche yes File::Type and File::MimeInfo
12:57 riche I know of them, have dealt with them for years
12:57 jberger ok
12:58 riche I just am a little disappointed that Mojo::UserAgent doesn't do this for file uploads like what browsers apparently do
12:58 jontaylor joined #mojo
12:59 riche I spent several hours last night thinking it was something I was doing wrong
12:59 Lee what does the IETF RFC say about this?
12:59 Lee i know some MIME modules on CPAN have features that are outside the RFCs to make coding easier
12:59 jberger sri: I was going to remind you that about Unix sockets but btyler beat me to it
13:00 riche Lee: I have zero problem setting the header myself
13:05 Lee cool!
13:06 sri btyler, jberger: no, that module could not work anymore
13:06 riche sighs and setting the accept attribute doesn't do anything
13:07 riche anyways I don't think there's anything short term that can be done with it, just going to move on
13:09 btyler sri: ok, bummer. I'll nuke it after 6.0 is released
13:09 sri if you want to argue for keeping custom socket support, please go ahead https://github.com/kraih/mojo/commit/1712764315fbee14c9a1d03de48833ed064191a5
13:10 btyler preferred over discussion here?
13:11 sri i noticed that Mojo::UserAgent::UNIX has pretty shitty tests though, doesn't cover keep-alive and redirects
13:12 sri or cookies
13:12 btyler yes yes, it was my first cpan module :P
13:12 riche it's not rendering template when file upload size exceeded as well, but i need to narrow the case in order to discuss it here
13:12 sri if i bring back custom sockets, i want to be sure it's the right thing to do
13:13 btyler anyways, I'm not hacking on the stuff I was when I first wrote it, so it isn't a huge deal, it was just awfully nice not to have to bring in HTTP::Tiny::UNIX to talk to docker when I was already writing a mojo app
13:13 sri are we sure custom sockets should be implemented with $tx->connection($socket) and not some kind of generic socket factory perhaps?
13:15 pink_mist because that sounds like java :P
13:16 marcus How about a socket factory factory?
13:16 rshadow joined #mojo
13:17 sri the factory pattern is all over mojolicious
13:17 sri it's just not spelled out like you would in java
13:24 rshadow Hello.
13:24 rshadow I use Test :: Mojo. In this case, my application has i18n.
13:24 rshadow I do so:
13:24 rshadow my $t = Test::Mojo->new('MyApp');
13:24 rshadow $t->get_ок('/test')->content_like(qr{Good});
13:24 rshadow but the test fails because the answer comes in Russian: Здравствуйте
13:25 rshadow How can I set the default "Accept-Language" header for $t->ua
13:25 rshadow ?
13:26 rshadow (my application automatically detects the language using this header)
13:27 jberger if the case for Unix sockets relates to talking to docker I wonder if batman or marcus have opinions
13:27 btyler sri: I don't have much insight to offer RE the rightness of custom sockets in the internals, but I wouldn't mind sprucing up the M::UA::UnixSocket tests if they end up sticking around. if not, I'll either kill it or rewrite it do something crazy (like set up a TCP proxy in front of the desired unix socket for the UA to talk to)
13:28 Lee rshadow: $t->ua->on(start => sub { $tx->req->headers->header( foo => 'bar' ); });
13:28 sri jberger, tempire, marcus, batman, crab: think i'd like a vote on reverting this https://github.com/kraih/mojo/commit/1712764315fbee14c9a1d03de48833ed064191a5
13:28 Lee (missing a my ( $ua,$tx ) = @_; in there BTW)
13:28 btyler jberger: that was just my particular itch. docker certainly isn't the only thing to do http over unix://
13:29 marcus jberger: docker also allows you to listen to http
13:30 pink_mist ->get_ok('/test', { 'Accept-Language' => 'some_LANG' })->...
13:31 btyler marcus: yes, but the docker docs are pretty clear about why that's not the standard: http://docs.docker.com/articles/basics/#bind-docker-to-another-hostport-or-a-unix-socket
13:34 rshadow Lee: Thank U! It works.
13:35 marcus btyler: I think it's fine to listen to 127.0.0.1 if you control that server.
13:35 sri also, are there more use cases for custom sockets? or should we perhaps have native support for UNIX sockets?
13:35 Lee rshadow: pink_mist's solution is better if you only need the header for one test
13:37 btyler marcus: of course, but it is documented as a "you can do this, but you'd better know what you're doing" sort of thing
13:37 marcus btyler: yeah, def.
13:39 ispyhumanfly joined #mojo
13:40 btyler sri: I remember asking about that, I think you mentioned they'd been supported in the past and then removed, but my git log -S'UNIX socket' is failing to turn up suggestive UA commits, so I must be mistaken
13:42 btyler ah, yes, found the log, curse this untrustworthy memory. apologies
13:42 dotandimet joined #mojo
13:47 dod joined #mojo
13:49 ver joined #mojo
13:49 rshadow Lee: I need your example. Not to update all of the tests.
13:49 Lee yep, makes sense then
13:53 rshadow pink_mist: Thank you, too.
13:53 pink_mist you're very welcome
13:55 dod1 joined #mojo
14:05 ignacio_ joined #mojo
14:06 zivester joined #mojo
14:08 jberger I really have no opinion on the matter, I was just making sure that the interested parties were talking
14:08 jberger unless native unix sockets could help fork_call? but then again that wouldn't be cross platform
14:08 jberger pipely does a good job of smoothing that over already
14:12 maze joined #mojo
14:13 asarch joined #mojo
14:39 sri so, no support for unix sockets?
14:43 sri well, i'm not going to run after people for this
14:44 sri can't say i didn't try
14:45 sri for future reference, this is where people could have voted for unix sockets
14:45 btyler no word in support of symmetry between daemons and UA? :)
14:45 sri core support would have to include both
14:46 btyler oh, I see. CHANGES doesn't mention when daemons lost it, I guess
14:46 btyler just adding
14:46 odc what would be the advantage of unix sockets over pipely? @ jberger
14:47 odc speed?
14:47 purl speed is too subjective, I think.
14:47 jberger odc: I'm not sure that there would be one tbh, just thinking out loud
14:49 ispyhumanfly joined #mojo
15:01 gryphon joined #mojo
15:08 oalders joined #mojo
15:16 Ptolemarch joined #mojo
15:23 arthas joined #mojo
15:31 batman sri: i'm not sure if i follow the custom socket patch
15:32 batman sri: does it mean that you can make Mojo::UA to talk over -anything- that's a filehandle?
15:34 doby joined #mojo
15:36 batman if so, who wants it back?
15:38 cpan_mojo Mojolicious-Plugin-MimeTypes 0.04 by Stefan Adams - http://metacpan.org/release/SADAMS/Mojolicious-Plugin-MimeTypes-0.04
15:41 btyler batman: scroll up a tad more :P it meant that a module could easily allow the UA to support communicating over unix domain sockets
15:42 btyler which was handy for talking to the docker API, which serves http over a unix socket
15:42 btyler (by default)
15:45 Dandre joined #mojo
15:46 mst I <3 things serving http over unix socket
15:47 mst it's my favourite way to deploy starman w/nginx
16:04 icjs sri, thanks for the advices yesterday - with mojo 5.82 we see an improvement in req/sec. what i'm seeing is that clients=1, and workers=<number of concurrent users you want to serve at peak>
16:06 icjs also "wrk" gives me much more consistent results than "ab" - i am using that and see ~80 req/sec with workers=24/clients=1 on a 4-core machine
16:07 icjs but in a 1m test with t=24 c=24 i see the load av hover around 5, i think the safe rule-of-thumb is the loadav should ideally go no more than # of cores
16:07 mst not really
16:07 icjs however web traffic is "spiky" and this is a stress test really
16:07 mst what you want to look at is CPU usage, memoru usage, and I/O wait time
16:07 mst plus load on your backend datastores
16:07 mst and try and maximise resource utilisation
16:08 gryphon joined #mojo
16:08 mst the CPU and memory usage info from top if, IME, more useful for that than straight load average
16:12 icjs mst, i'll study what top says again - thank
16:12 mst icjs: basically, you're trying to maximise utilisation of multiple different resources
16:13 mst icjs: so a single number is never going to be ideal as a measure :)
16:13 icjs mst, yep - its nice to have a simple rule of thumb sometimes though :)
16:14 mst icjs: sure, and my simple rule of thumb is "start with workers at 1.5x cores, observe I/O, CPU, and memory consumption and tweak"
16:16 icjs mst, what tools do you use? just top, iotop ?
16:18 mst so far, top plus poking things with a stick has been sufficient to get me to a point where the bottleneck is the datastore rather than the web heads
16:18 mst the last time that wasn't my bottleneck, I pre-generated most of my GET responses and served them from disk instead
16:25 sh4 joined #mojo
16:27 riche nicomen: you are a nano editor user, right?
16:28 nicomen riche: yes, heh
16:28 nicomen or that's the editor with the least pain that I find installed in most remote servers that I alter code on.
16:29 riche cool. how good is it with ep files?  I think I just about "had it" with emacs web-mode
16:29 nicomen not good at all I would guess
16:29 riche lol k
16:29 nicomen it has a simplistic regex based syntax highlighting that might take the editor down a times
16:30 riche alright.  perhaps I should try atom
16:31 nicomen for desktop editing I use geany
16:31 nicomen and the other day I gave padre a new try, and after tweaking it, it seems ok
16:31 riche geany works well with ep?
16:31 nicomen no idea
16:34 mst riche: by "works well with", do you mean "I require syntax highlighting because I can't read code myself" ?
16:34 mst because, y'know, I find ex-vi works well with everything
16:34 mst but I turn syntax highlighting off because I don't want training wheels
16:34 riche i don't need the highlighting i need the indenting.  emacs is driving me nuts with what it thinks is the "right" indenting
16:35 mst oh, yeah, I don't use auto-indent either
16:35 riche good for you
16:35 * Grinnz_ wonders if anyone other than mst shares this view
16:35 mst if typing the indent by hand is getting painful, you probably wanted to refactor the code anyway
16:35 mst subroutines are a good thing :)
16:36 riche wtf subroutines in markup?
16:36 mst well, template fragments or whatever
16:47 denny [Thu Feb 26 16:44:23 2015] [warn] Use of uninitialized value $str in substitution (s///) at /usr/local/share/perl/5.14.2/Mojo/Util.pm line 338.
16:47 denny is there any way to find out what code is causing that?
16:47 mst Devel::Confess
16:47 purl somebody said Devel::Confess was nicer but your finger macros haven't adjusted yet
16:47 Grinnz_ wat
16:47 Grinnz_ purl: forget Devel::Confess
16:47 purl Grinnz_: I forgot devel::confess
16:49 mst purl, Devel::Confess is like Carp::Always but nicer, the only trouble is getting the relevant finger macros adjusted
16:49 purl OK, mst.
16:49 mst there we go
16:49 mst bloody infobot, picking up on things I say like it was designed to do
16:49 Grinnz_ lol
16:58 riche sri: thanks for writing the atom package for mojolicious.  works well.
17:02 nicomen riche: thanks for asking though, finally got around fixing the simple syntax highlighter to be slightly nicer ;)
17:02 sri riche: all i did was use the convert tool on my textmate bundle :)
17:02 sri atom is nice though, lagging a bit sometimes, but nice
17:04 riche I just needed a little sanity with this Lite app, emacs kept pushing mojo tags to col 1 ... super annoying.
17:06 mst this is the reason I gave up on auto-indent
17:06 mst hitting space a lot doesn't mess up my train of thought
17:06 mst dealing with auto-indent doing something I didn't expect does
17:07 Ptolemarch joined #mojo
17:08 Grinnz_ i dont use any auto indent other than "indent the next line the same as the current one"
17:09 Grinnz_ mostly because thats all my editors have available, but i feel like it would probably be annoying anyway :P
17:09 riche that is what emacs normally does for me.  but in this case, I was hitting enter on eol and the line went to 1 and so did the next line
17:10 riche I just think both cperl-mode and web-mode are unsuitable for Lite apps
17:18 riche nicomen: cool.  I also like nano for fast edits.  I just haven't gotten around to get a standard .nanorc on all my machines.
17:19 Grinnz_ riche: i finally threw one around to all my logins a week or two ago, helps a lot :)
17:19 mst I carry http://trout.me.uk/X11/vimrc around with me
17:19 Grinnz_ riche: unfortunately, the version of nano on RHEL6 and such requires each syntax highlighting config to be specified individually, which kind of sucks
17:19 mst for when I can't be bothered installing a proper vi
17:19 riche it's hella fast for crazy long config files like what websphere has
17:28 icjs syntax highlighting is really useful though, eg. reading a long-ass crontab file - iits easier to "key in" to the cron you want info on. autoindent in vim mostly works, i especially like visually-select broken indentation in vim and then simply pressing "="
17:29 tempire I've never used custom sockets
17:30 tempire So I have no use cases
17:30 tempire sri^
17:31 jberger riche: https://github.com/jberger/dotfiles/blob/master/.vimrc
17:31 jberger single-file-deploy vim with modules
17:31 jberger <3
17:31 jberger including vim-perl with mojo extensions
17:32 mst icjs: I've been working without for so long that my mental parser is fast enough
17:32 mst it's a slightly masochistic approach, but it pays off over time
17:32 mst since I can often spot bugs that people who're used to synhi's breakdown of a piece of code miss
17:33 jberger so far, vim-perl seems to mostly get it right
17:33 jberger it doesn't get $dbh->do(<<'SQL', undef, $arg, $arg); very well
17:33 jberger everything after there heredoc tag looks like a string
17:34 jberger but that's my biggest complaint
17:34 riche jberger: nice.  that's like how my .emacs looks ;)
17:34 Grinnz_ http://ur1.ca/jt31g normal nanorc, http://ur1.ca/jt31e RHEL6 nanorc :/
17:34 riche jberger: it's just the Lite app I have had trouble with.
17:34 mst jberger: check you're using mauke's, and then if you get stuck ask him on f#perl
17:34 jberger mst: ah, is someone looking at that?
17:35 jberger cool
17:35 riche and I've got a thing called a deadline, and don't have time to screw around with lisp
17:35 mst jberger: he's been maintaining a version of a vim perl plugin for aages
17:35 mst jberger: I've no idea whether his is the official one or not
17:35 jberger I've just been using the github repo
17:35 mst jberger: just that if you break his, he'll probably care
17:35 mst "the github repo" <- don't make me kill a cat
17:35 Grinnz_ lol
17:36 jberger https://github.com/jberger/dotfiles/blob/master/.vimrc#L24
17:36 jberger https://github.com/vim-perl/vim-perl
17:36 jberger its active, and IIRC its the one that petdance set up
17:37 jberger but if there is a better place to be getting it, I can always change
17:37 mst right, but petdance can't code his way out of a paper bag
17:38 jberger I don't think he works on it much any more
17:38 dod joined #mojo
17:39 jberger TIL quickfix mode
17:39 jberger tempire++ site is looking great
17:43 * sri hates heredocs for sql
17:45 jberger sri: but they are so perfect for that
17:45 sri it looks totally out of place
17:45 * Grinnz_ hasnt found a perfect solution for quoting sql
17:46 Grinnz_ i tend to use 'SELECT blah ' .\n 'FROM blah ' . etc, to keep the errors from spanning multiple lines
17:46 sri imo this is the way to go https://github.com/kraih/minion/blob/master/lib/Minion/Backend/Pg.pm#L31
17:47 Grinnz_ unless theres some quote operator that leaves whitespace but trims newlines and multiple spaces :)
17:47 sri who cares about extra whitespace
17:47 Grinnz_ error log as i mentioned
17:47 jberger this doesn't seem out of place: https://github.com/jberger/MCT/blob/master/lib/MCT/Model/Presentation.pm#L31-L38
17:47 Grinnz_ it annoys me a lot ;)
17:48 * tempire uses sql::abstract
17:48 tempire except it always wants to use ?, as far as I can tell, so sometimes I can't use it.
17:54 Grinnz_ if i could use postgres i'd have even less use for constructing queries thanks to arrays
17:54 * Grinnz_ laments
17:55 sh4 joined #mojo
18:04 tempire sri: marcus: jberger: crab: batman: We need consensus on the official twitter tag for mojoconf
18:04 tempire #mojoconf or #mojoconf2015
18:04 tempire I think it should be #mojoconf
18:05 tempire Last year we decided on #mojoconf2014, but I don't recall why
18:05 jberger tempire: you know I agree, because I talked you out of #mojoconf2015 last night :-)
18:06 Ptolemarch joined #mojo
18:08 riche it would be nice if there was a script listening to mojoconf2015 and forwarding to mojoconf ... regardless of what we say, like what was said last night ppl are going to do whatever
18:08 Grinnz_ twitter doesnt really work like that :P
18:08 Grinnz_ you could have it retweet i guess?
18:09 jberger does a search for a short hashtag pick up the long hashtag?
18:09 riche of course thats what i meant
18:09 jberger since it is contained?
18:09 dotandimet joined #mojo
18:09 jberger I can't remember
18:09 Grinnz_ jberger: probably
18:09 riche just semantics
18:09 Grinnz_ twitter search isnt really about hashtags
18:09 Grinnz_ theyre just a convenient mechanism
18:09 jberger then yes the short one should pick up the long one
18:10 jberger I was just curious if a hashtag search had an implied \b at the end
18:10 jberger /$hashtag\b/ would only match #mojoconf and not #mojoconf2015
18:10 Grinnz_ why doesnt twitter have a search box on its front page when you're not logged in? annoying
18:11 riche because they can't compute and market bio data without logging in
18:11 Grinnz_ you can still just go to a user page and then search :P
18:12 Grinnz_ jberger: on the other hand, it looks like all searches have implied \b
18:13 jberger hmmm too bad
18:14 batman tempire: +1 on #mojoconf tag
18:22 jberger does anyone know if there is a good test idiom for "this test script is going to fail, so stop, but don't stop the harness"
18:22 jberger BAIL_OUT stops the harness
18:22 Grinnz_ die?
18:22 * purl exited with signal 255
18:25 meshl joined #mojo
18:26 sri tempire: i vote #mojoconf, same as last year
18:26 tempire Settled, then.
18:27 tempire #mojoconf
18:27 sri i think it became #mojoconf2014 because people were already using it
18:29 jberger ssm: can we convert https://github.com/mojoconf into an organization
18:29 jberger keep the old mojoconf.github.io as a repo, but drop tempire's new site and the MCT repos in there too
18:34 batman +1
18:34 purl 1
18:36 batman tempire: can we get https://mojoconf.com/ ?
18:36 tempire why
18:37 batman because we're going to submit user data, such as talks and similar
18:41 irq joined #mojo
18:56 go|dfish joined #mojo
19:05 marmez joined #mojo
19:11 meshl joined #mojo
19:25 berov joined #mojo
19:32 Grinnz_ jberger: ok, i think i found an issue but i'm not sure how to reliably reproduce it lol
19:33 Grinnz_ jberger: two fork calls get set up, both get forked, then one returns and the other one receives the close event instead of the parent
19:35 jberger Grinnz_: no really?! balls that was fixed once already
19:36 Grinnz_ http://fpaste.org/191077/49793751/
19:37 * sri is writing the 6.0 blog post
19:39 jberger Grinnz_: not that I don't believe you, but I don't believe you
19:40 jberger two parallel forks can't have that happen, that I can see
19:40 jberger are you reusing the object? that is a little hinkey
19:40 Grinnz_ jberger: nope
19:40 Grinnz_ i'm using the helper that creates the object in the delay
19:40 jberger https://github.com/jberger/Mojo-IOLoop-ForkCall/blob/master/lib/Mojo/IOLoop/ForkCall.pm#L87
19:41 jberger that is supposed to prevent that problem
19:41 Grinnz_ right, but the close event doesnt get called in the real parent, which makes my stuff blow up
19:42 Grinnz_ that "got close for" i put right before that line
19:42 jberger can you make a minimal example please?
19:42 jberger I'm having a very hard time seeing how this could happen
19:43 Grinnz_ i can try but it's extremely intermittent
19:45 jberger when the wrong parent's close gets called, it should just bail early and you never see the difference
19:45 Grinnz_ yeah, but if that close doesn't get called, the process doesn't get reaped
19:45 Grinnz_ so it needs to call the right parent's close :P
19:46 jberger that isn't a real process
19:46 jberger its just the file handle which was forked into both children
19:46 jberger oh, ait
19:46 jberger but if the parent goes away first, then perhaps it gets a life of its own?!
19:47 Grinnz_ the parent isnt going away in this instance
19:47 jberger ye, gods this stuff is weird
19:47 jberger then there should be no reaping problem
19:47 jberger the close method is not responsible for reaping that process
19:47 jberger only the true parent should be doing that
19:52 Grinnz_ jberger: http://fpaste.org/191088/49803171/
19:52 Grinnz_ this is actually reproducing it consistently
19:54 Grinnz_ so the other problem is, if it doesn't reap the process it also never emits the finish event or the clalback
19:55 Grinnz_ thats probably the actual issue i'm having
20:02 Grinnz_ hmm
20:02 Grinnz_ i guess in that script its getting called in both
20:05 Grinnz_ nevermind, i guess i didnt manage to reproduce whatevers going on yet :P
20:05 dotandimet joined #mojo
20:07 punter joined #mojo
20:09 jberger oh yeah, you have to be careful about how you start multiple of these certainly
20:10 jberger you are using the newest versions of forkcall and mojo, correct?
20:10 Grinnz_ yeah, just updated them yesterday
20:10 jberger cool
20:13 Grinnz_ i have a feeling this is another module hanging because of the forking, gonna try some stuff
20:36 jberger Grinnz_: I really am curious what you find
20:44 sri hmm, looking at the visitor stats of mojolicio.us, there's literally hundreds of people browsing the docs every day, 60-70% returning
20:50 punter joined #mojo
20:55 genio that's good
20:56 sri only seeing the complaints here can really skew your perception
20:59 genio I tend see it positively.  Having this lively of a discussion area where issues and resolutions are constantly being talked about tells me that it's a great module that's getting lots of use.
21:00 jberger sri: that's really cool to know, thanks for sharing
21:00 mst if you don't have a steady stream of complaining users, worry
21:00 mst also it makes a nice change from the steady stream of newbie questions
21:00 jberger I'm really proud of our docs actually
21:01 jberger mst: what does "worker has no heartbeat mean?" :-)
21:02 mst jberger: it means that hypnotoad does hearbeat checks on its worker processes to determine when one has shat itself or otherwise deadlocked, and that the maximum time for a response to that query has been exceeded
21:02 mst (he says, absolutely guessing because it's funnier that way)
21:02 jberger hahahhahahha
21:03 jberger you definitely faked me out
21:03 mst did I guess right?
21:03 jberger purl: mongolian cluster fuck!
21:03 * purl chainsaws jberger
21:04 * genio pushes purl down the stairs
21:04 purl Hey! *thump* ow! *bang* argh! *bam* son of a *thump* *crunch* whimper...
21:04 mst docs suggest yes
21:04 jberger mst: carrying the joke beyond its logical conclusion :-)
21:07 riche joined #mojo
21:09 jberger sri: did you change the Types method to mapping?
21:11 sri mappings
21:11 purl mappings are in a static table in HTTP::Body
21:11 sri no wait
21:11 sri mapping :)
21:11 sri app->types->types was odd
21:12 sri actually, i think i've renamed all ->foo->foo cases
21:12 sri there were like 5 or 6
21:13 sri ->params->params
21:13 sri ->log->log
21:13 sri ->match->match
21:13 jberger I see one more in Tutorial
21:13 sri oh noes
21:13 jberger under content negotiion
21:13 marcus mst is our resident heartbeat expert.
21:13 jberger I would fix, but I'm rushing out the door
21:13 jberger o/
21:13 marcus He has been stopping heartbeats for many years.
21:13 sri i don't see it
21:14 sri jberger: app->types->type() is fine
21:14 mst I'd hug my chainsaw at this point but that tends to end badly.
21:16 rwp joined #mojo
21:19 relberger joined #mojo
21:20 marcus ooh, redisconf 2015 in sf in march. so wish I could go.
21:23 good_news_everyon joined #mojo
21:23 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/xJgQ
21:23 good_news_everyon mojo/master e8467c6 Sebastian Riedel: use last_modified in example too
21:23 good_news_everyon left #mojo
21:27 jberger sri: oh ok
21:27 jberger sorry about the noise then
21:27 * jberger is on the train platform
21:31 marcus jberger: don't jump!
21:31 jberger seems the trains are delayed
21:31 jberger if I jumped now I would only risk spraining an ankle
21:40 Ptolemarch joined #mojo
21:59 sri allright, guess i've got my blog post ready
21:59 sri 6.0 time?
22:02 ribasushi ooooh perl6? \o/
22:04 * sri sets ribasushi on fire
22:09 * jberger gets the marshmallows
22:10 jberger sri: http://m.quickmeme.com/img/53/537cbcb6d24c4b67f4abf0da57d76fed6a7578f0ba5332d088b86d6a3f152224.jpg
22:12 marty joined #mojo
22:13 Ptolemarch joined #mojo
22:13 Grinnz_ jberger: it was CGI::Session, must have been doing stupid shit when forked, i just wrote my own replacement for it and i can't cause the issue anymore
22:13 jberger Grinnz_++
22:14 jberger hmmmm I wonder if I should put in a warning about additional forking
22:14 Grinnz_ the DESTROY for CGI::Session has always been a problem but i avoided it before by explicitly flushing on every update
22:14 Grinnz_ i guess that wasnt enough in this case
22:15 jberger why were you using fork call in an app that also had CGI session?
22:15 good_news_everyon joined #mojo
22:15 good_news_everyon [mojo] kraih tagged v6.0 at 75cc810: http://git.io/xJbA
22:15 good_news_everyon left #mojo
22:15 jberger just curious
22:15 Grinnz_ CGI::Session doesnt really have anything to do with CGI
22:15 jberger \o/
22:15 Grinnz_ oh snap
22:16 jberger when you play the Arnold meme, it gets real
22:17 cpan_mojo Mojolicious 6.0 by Sebastian Riedel - http://metacpan.org/release/SRI/Mojolicious-6.0
22:17 good_news_everyon joined #mojo
22:17 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/xJNF
22:17 good_news_everyon mojo/master 657b079 Sebastian Riedel: bump version
22:17 good_news_everyon left #mojo
22:18 sri \o/
22:19 Grinnz_ boom
22:20 kaare joined #mojo
22:21 jberger sri++
22:23 firnsy sri++
22:23 firnsy mojo++
22:40 firnsy RPMs rebuilt, app unit tests passing and now running 6.0 in production
22:47 kaare joined #mojo
22:59 Grinnz_ firnsy: you got balls man
23:01 Grinnz_ jberger: so i take it the reason both the second child and the parent receive the close event is that the second child was the parent when the first child was forked... i guess theres no easy way to dela with that other than what you did
23:01 sri and out https://twitter.com/kraih/status/571082617996644353
23:02 Grinnz_ either way, glad to be rid of CGI::Session for good... that module is a clusterfuck
23:04 sri submitted it to hackernews too, if anyone feels like upvoting ;p
23:16 punter upvoted hackernews
23:22 sri \o/
23:25 sri haha, just realized the 5.0 tweet had 44 retweets, release right after mojoconf might be best for pr
23:30 sri mentioned mojoconf, but left details for another post
23:41 punter joined #mojo
23:41 riche joined #mojo
23:46 sri lol
23:46 sri we forgot to vote on the template fix
23:47 sri ¯\_(ツ)_/¯
23:48 pink_mist time for 6.01! :P
23:53 bpmedley Congrats on another release.
23:55 kayi joined #mojo
23:57 sri no hn frontpage this time i guess
23:59 sri it's a really bad time for a release though
23:59 sri i bet the perl6 comments would have been fun this time

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