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

IRC log for #mojo, 2016-04-29

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

All times shown according to UTC.

Time Nick Message
00:31 tchaves joined #mojo
00:40 tchaves joined #mojo
00:45 tchaves1 joined #mojo
01:10 tchaves joined #mojo
01:46 ivi joined #mojo
02:23 noganex joined #mojo
03:23 bpmedley http://bmedley.org/mojo.pdf <-- I reworked Chapter 2.  Also, I added a "Forms" section so that the request/response cycle for POST forms can be explained.
03:24 bpmedley CW: Will you read Chapter 2 of http://bmedley.org/mojo.pdf and let me know if that would have been helpful earlier?
04:41 ivi joined #mojo
05:27 inokenty-w joined #mojo
05:43 punter joined #mojo
05:46 dod joined #mojo
05:51 dod joined #mojo
06:00 ivi joined #mojo
06:01 mmp joined #mojo
06:26 dod joined #mojo
06:32 ivi joined #mojo
07:14 AndrewIsh joined #mojo
07:36 dod joined #mojo
07:39 trone joined #mojo
07:43 asarch joined #mojo
07:50 ivi joined #mojo
07:52 Vandal joined #mojo
08:36 oalders joined #mojo
08:43 henq bbpmedley: wow, thx for your book , a hidden gem. Is it an idea to add the steps to secure ones mojo app, so that it runs under https?
08:44 icjs joined #mojo
09:13 Peppard joined #mojo
09:22 meshl joined #mojo
09:37 dod joined #mojo
09:41 bpmedley henq: I'll update the IDEAS file for future reference.. :)
09:52 sugar joined #mojo
10:00 inokenty-w joined #mojo
10:04 dod joined #mojo
10:34 icjs2 joined #mojo
10:58 icjs3 joined #mojo
11:07 tchaves joined #mojo
11:16 tchaves joined #mojo
11:32 dvinciguerra joined #mojo
12:12 henq bpmedley:  (pssst  its here…. http://blogs.perl.org/users/joel_berger/2016/03/super-easy-ssl-certs-for-mojolicious-apps.html  but would be nice to have it all in 1 place ;-0)
12:14 dod joined #mojo
12:18 bpmedley henq: Thx
12:33 meshl joined #mojo
12:53 asarch joined #mojo
12:55 ivi joined #mojo
12:57 dod joined #mojo
12:58 ramortegui joined #mojo
13:43 sri new macbook arrived \o/
13:44 bpmedley Do they still have stickers included?
13:45 genio sri's productivity for today as he plays with his new toy: zero :)
13:45 sri yea, and i'll need some time to get used to the new keyboard
13:46 sri the stickers are now in the color of the macbook
13:46 genio The keyboard's different?
13:46 sri complete redesign
13:46 genio ugh.  I really like the keyboards
13:47 sri feels good, and is very precise, but also very shallow, which is the part one needs to get used to
13:47 CW bpmedley: yah, looks good. My issue was, I just didn't find anywhere where it explains that routes to run methods on a page require the page to render using the $shift->render('name of page'); to prevent the route to redirect to a new page.
13:47 genio oh well, hopefully it turns out to be better.  but mac keyboards were already pretty awesome
13:49 dod joined #mojo
13:52 PopeF joined #mojo
13:53 mcsnolte joined #mojo
13:53 jberger "I just didn't find anywhere where it explains that routes to run methods on a page require the page to render using the $shift->render('name of page'); to prevent the route to redirect to a new page."
13:53 orev joined #mojo
13:53 jberger I don't understand
13:58 sri i'm gonna go broke from all the usb-c adapters
13:59 jberger welcome to mac
14:01 genio usb-c is a no go in my mind still
14:01 sri one connector to rule them all
14:02 sri soon everything will also use usb-c for audio
14:04 kwa Is it possible to remove the mojo.config from the development error output? (I want to hide the database credentials on fatal errors during development.)
14:05 preaction delete the key from the config hash once you've used it to connect?
14:06 kwa preaction: That seems sane. *thinks of potential repercussions*
14:08 bpmedley CW: How can I make the book more clear?
14:09 kwa preaction: I put it in a before_render hook - cheers mate.
14:09 kwa preaction++
14:17 odc joined #mojo
14:21 VVelox joined #mojo
14:25 CW bpmedley: Not sure I can really help with that. I never really played with things the way you do it in your book. I used the Mojolicious example to start with, and it seperates things out, where as it looks like your routes are local and doesn't work with multiple pages or how a single pages handles multiple method routes.
14:29 sugar joined #mojo
14:30 punter my mojo.vim doesn't paint this file correctly. Does yours? http://paste.scsys.co.uk/511946?ln=on&amp;submit=Format+it!
14:31 punter In particular the closing </div> in line 10 is all white
14:32 punter (doesn't match the color of the opening <div>)
14:33 bpmedley CW:  Multiple method routes?  What do you mean?
14:42 Lee joined #mojo
14:49 sugar joined #mojo
15:00 punter the colors with mojo.vim get much worse when the <div> has attributes
15:01 sri odd, i already don't mind the shallow keyboard
15:02 sri typing faster than ever
15:02 jberger sri: is it more like the magic keyboard?
15:03 sri it feels like something completely new
15:03 jberger I'm actually starting to notice the extra key travel on my macbook pro when I use its keyboard vs the magic keyboard
15:04 jberger I really like the magic keyboard though
15:04 sri i can see how this doesn't work for everyone
15:07 sri what i do notice is the size difference between 12" and 13"
15:09 sri this thing is unbelievably thin
15:10 kaare joined #mojo
15:10 * vicash uses the black Das Keyboard Ultimate and once you go black there is no going back to shitty laptop keyboards
15:27 genio my giant ogre hands can't use those tiny keyboards anyway.  I can use the one on the 15" mbp, but the 13" mba my wife has is annoying
15:29 sri the 12" keyboard is much better for big hands, the keys are huge
15:30 vicash if it works for Donald Trump, it should work for anybody ;)
15:43 sri wouldn't be surprised if they made a 14" version of this and called it the new macbook pro
15:46 vicash they have lost it. changing 1" here and there to justify profits. there is no innovation left in a laptop
15:51 lluad Macbook Pro needs more CPU - but I'd be very happy with a thin MBP with the MB keyboard and another USB port or two.
15:51 lluad (And I hope they come out with such a thing _before_ my first-gen rMBP dies altogether...)
15:51 stephan48 sri: did your macbook arrive?
15:52 stephan48 is it true that is just has a single usb port?
15:52 sri stephan48: yes
15:52 gtodd did you get a gold one!?!? :-)
15:52 stephan48 do they sell a usb hub with it?
15:52 sri space grey
15:53 sri http://irclog.perlgeek.de/mojo/2016-04-29#i_12409935
15:53 sri this 5w cpu is surprisingly powerful
15:54 sri doesn't throttle during my mojolicious rps benchmarks
15:54 stephan48 haha
15:55 sri it's at least 30% faster than my 2012 macbook air
15:55 vicash does it do NFC and Apple Pay as well ?
15:58 gtodd 5w ??
15:58 * gtodd basks in the warmth of his 125w desktop cpu
15:59 sri macbook air uses 15w cpus, and macbook pro 28w (i think)
16:00 gtodd ... I use as much electricity as 25 mbps :-\
16:00 sri no fan is pretty awesome, i can compile perl in total silence
16:04 PryMar56 joined #mojo
17:14 sri btw. that force touch trackpad is absolutely magical
17:35 asarch joined #mojo
17:39 sri so far only flash video can get the cpu so hot it has to throttle
17:48 meshl joined #mojo
17:51 vicash i have just disabled the flash plugin on my 2011 MBA. automatically gets HTML5 video to work on sites like youtube when they detect no flash available
17:54 sri hahaha, this is the first time i'm watching flash video without fan noise i guess :D
17:55 sri twitch sounds so different
17:55 genio Can we all just agree right now that Flash is to be stabbed to death?
17:55 Grinnz sites still use flash?
17:56 * Grinnz looks at youtube and twitch which don't
17:56 vicash this also has an added benefit of sites that use Flash cookies to track you in stealthy manner to not be able to do so, such as banks
17:56 genio espn, etc.  tons of places use flash
17:56 vicash Flash enables DRM
17:56 Grinnz vicash, I avoid that easily with Flashblock
17:56 Grinnz i.e. only flash I explicitly allow will run
17:57 Grinnz genio, ah well, luckily I don't watch sports :P
17:57 vicash I use Noscript and dont use Flashblock anymore. just disabled Flash outright. sick of all these updates all the time and have to restart all my open tabs
17:57 Grinnz actually I don't use flashblock anymore, chrome has an option now that does the same thing
17:58 Grinnz content settings -> plugins -> let me choose when to run plugin content
17:58 vicash yes Firefox has that too "Ask to Activate"
18:00 genio But, I can't even pay my Verizon bill without allowing all of their advertising. :(  The internet in the US is all ads all the time
18:00 Grinnz buh? I use adblock on verizon's site and pay just fine
18:00 vicash genio: just set up your credit card for autopay in Verizon and you dont have to even login
18:01 Grinnz adblockplus, that is
18:01 genio ABP + Ghostery and it goes nuts.  Although I was trying to pay a particular thing off (not the normal bill).  And to opt-out of their mobile tracking stuff I had to enable their tracking crap
18:02 vicash Noscript is great for this, just allow sites that are required. Adblock doesn't block trackers that don't show ads
18:02 vicash I use uBlock Origin + NoScript and works fine for me.
18:02 Grinnz note adblock and ABP are unrelated, because that isn't confusing ;)
18:02 genio :)
18:02 Grinnz the one without the plus is the one that caused all the internet rage
18:03 genio Now, if I could get this Charles Whitener from Missouri to stop using my email address for everything he does, it'd be great!
18:03 Grinnz ahahaha
18:04 genio Thank you for your order, Charles Whitener!    I know his full address but can't locate him with searches to find his actual email address
18:04 genio I'm going to have to send him an actual piece of mail asking him to just quit it!
18:05 vicash i have that problem too. i just delete those emails as they could be a phishing scam as well
18:05 Grinnz lol
18:06 genio Well, one of the many emails came from a doctor's office.  I replied to the doctor and they were very cooperative.
18:07 genio The address lookup shows two Whiteners living at the residence and it is a single family home.
18:08 vicash genio: send them this link: http://www.legacy.com/obituaries/dallasmorningnews/obituary.aspx?pid=171537395
18:08 vicash i do that sometimes, find an obituary of a person with the same name and send them an email saying they have died. the emails stop
18:08 genio https://www.facebook.com/charlesnwhiteneriii
18:09 genio I didn't realize my last name was so popular
18:09 genio (in Texas)
18:59 Kripton joined #mojo
19:02 basic6_ joined #mojo
19:18 jberger sri: clarification if you would
19:18 jberger the c10k script you have
19:18 jberger it reads to me that that is a single thread with 10k connections
19:18 jberger am I right in thinking that?
19:18 sri correct
19:19 jberger so that should even scale up with hypnotoad
19:19 jberger at least as far as hardware resources allow
19:19 jberger ?
19:19 sri sure
19:19 basic6_ joined #mojo
19:19 sri the goal was to find out how much memory we use
19:19 jberger thought so, just wanted to check before I told someone the wrong thing
19:20 sri as long as most connections are idle, multiple processes will not gain you much though
19:20 jberger I suppose that's true
19:20 sri managing idle sockets is very cheap as long as you have epoll/kqueue
19:21 jberger I did mention that to the person
19:33 basic6_ i have a strange case of requests "getting lost", i.e., the browser does not receive an answer. it's happening in hypnotoad. browser sent several requests, last one being a post request, all worked fine except for this last request - no error and no answer. no "POST" request is logged in the mojolicious log.
19:34 basic6_ however, near the end of the log, it tells me that it has restarted a worker: "Worker 123 stopped" and "Worker 456 started"
19:35 basic6_ i understand that this is not enough information for analysis. but maybe someone has an idea, maybe there is a configuration that i haven't tweaked right
19:35 mishanti1 basic6_: Is this behind a proxy of some sort?
19:36 sri basic6_: version?
19:44 sri not that it really matters, i know it's fixed in 6.60
19:48 basic6_ mishanti1: in this case no, just hypnotoad. i was wondering if i had my apache configured incorrectly but then i noticed that it also happens without apache
19:48 basic6_ sri: version 6.57 - fixed in 6.60? sounds great, i'll update right away
19:50 batman joined #mojo
19:56 jb360 joined #mojo
20:02 Lee joined #mojo
20:12 Vitrifur joined #mojo
20:32 basic6_ that's weird, i still see a request that isn't answered, although this one is processed and logged by mojolicious. maybe the update didn't work right, i'll try again
20:36 Lee joined #mojo
20:43 basic6_ i see a "Premature connection close" for the worker that handled both requests that were not answered. inactivity_timeout is set to 300 using helper
20:45 basic6_ i'm looking at the faq entry, it says the user agent closed the connection prematurely. that would have to be the browser in my case though
21:12 thowe_work joined #mojo
21:18 bpmedley basic6_: Do you have a smallish Mojolicious::Lite example app that shows the issue?
21:28 basic6_ bpmedley: no, unfortunately this part of the application is pretty complex and last time i tried to reduce it, the symptom went away after i removed an complex routine that couldn't be part of a a small example because it requires a remote server...
21:28 bpmedley basic6_: Does the issue happen under daemon?
21:28 odc joined #mojo
21:29 basic6_ oh you mean ./myapp.pl daemon? i'll give it a shot...
21:30 basic6_ but i have to say that the "Premature connection close" log entry is new. and it's caused by the exact same worker that processed those requests that were not answered...
21:49 basic6_ bpmedley: first test without errors using daemon instead of hypnotoad, but it happens kind of randomly so i keep trying. i used to use plackup -s FCGI (with socket file) and never had a problem, only after switching to hypnotoad
21:52 basic6_ i'll use morbo instead of daemon and try again, no errors so far
21:54 bpmedley basic6_: The reason I suggested daemon is because you can use Devel::Trace in a straightforward manner.  With this you can trace your running app and Mojo code.
21:59 bobkare joined #mojo
22:10 bpmedley basic6_: You can probably do the same with hypnotoad and programmatically controlling Devel::Trace
22:25 trwww joined #mojo
22:31 basic6_ so far - no errors using morbo (it only seems to happen with hypnotoad, but i will keep testing)
22:32 jberger basic6_: can you confirm that you are using the upgraded mojo?
22:32 jberger The install didn't fail or you are using the wrong local lib or something?
22:33 jberger Sounds exactly like the recent bug fix
22:37 basic6_ jberger: in the controller action, i logged $Mojolicious::VERSION and "6.60" was logged
22:39 bpmedley http://bmedley.org/mojo.pdf <-- Does anyone have time for skimming?  How does the layout and table of contents look?
22:39 basic6_ jberger: i'm trying to understand the "Premature connection close" error, i doubt that the user agent (the browser) closed the connection
22:43 bpmedley basic6_: Have you shown any code?
22:44 bpmedley The book is around 50 pages without screens shots.. :)
22:44 pink_mist basic6_: why do you doubt that? most browser tend to close connections.
22:44 pink_mist *browsers
22:45 basic6_ bpmedley: no, sorry, i haven't. last time i tried to reduce this piece of the application to a small-ish example, the symptoms went away when i removed some routine that doesnt work in a simple example
22:45 pink_mist bpmedley: I'm feeling a bit under the weather right now, so not sure when I'll have the energy to check the book again
22:45 bpmedley pink_mist: Don't fret!! You were a great help.
22:45 pink_mist good good =)
22:46 bpmedley pink_mist: Is it contagious?
22:46 pink_mist it's allergies
22:48 basic6_ pink_mist: well these requests only take a couple of seconds and i have had requests take like a minute (usually intentional, the app isn't that slow), the browser has always waited patiently and didnt decide to close any connection on its own. and i haven changed or switched the browser
22:49 bpmedley basic6_: I'm curious if some file gets closed or something goes out of scope.
22:49 basic6_ bpmedley: what do you mean? what should go out of scope?
22:51 bpmedley basic6_: Without seeing any code I would purely be guessing.  A lot of the time it's a $ua that goes out scope.
22:53 basic6_ bpmedley: there is no user agent (Mojo::UserAgent) in my code. the controller action (post request) receives a chunk of data and sends it to another server
22:54 bpmedley Understood; without code I'm just guessing.
22:55 basic6_ bpmedley: i know, yet i do appreciate your help (and everyone else's who's said something on the matter).
22:58 basic6_ at this point, i think i should do more tests. i believe that this only happens in hypnotoad but i'm not sure, so i'm trying morbo now. i need to do a lot of tests because it happens randomly. and maybe i'll try plackup/FCGI again because that always worked without any problems. i'll get back here when i have some news
23:02 sri hmm, unfortunate to see the new debug message cause this kind of confusion :(
23:03 mishanti1 Good to see areas where one can improve though. :) Keeps life from becoming boring.
23:08 bpmedley Next time we get a newbie can we point them at my book and see how bad it is?  :-O
23:12 good_news_everyon joined #mojo
23:12 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vw1I5
23:12 good_news_everyon mojo/master ffe7ea7 Sebastian Riedel: no longer log when a connection has been closed prematurely
23:12 good_news_everyon left #mojo
23:12 sri well, it was worth a try
23:16 bpmedley I've looked over several books.  Meteor's, Sinatra's, Django, and one or two more.  I believe mine shares several key points; however, I'm wondering what I should change next.. :)

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