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

IRC log for #mojo, 2016-06-13

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

All times shown according to UTC.

Time Nick Message
00:00 dvinciguerra joined #mojo
00:28 vytas joined #mojo
02:30 noganex joined #mojo
02:32 good_news_everyon joined #mojo
02:32 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vocqe
02:32 good_news_everyon mojo/master 06bb833 Sebastian Riedel: use a more common header
02:32 good_news_everyon left #mojo
06:05 kes joined #mojo
06:19 kes When trying to upload with Mojo::UserAgent I get 500 Internal server error
06:19 kes What problem is?
06:19 kes http://paste.scsys.co.uk/522953
06:19 kes Uploading by browser works well
06:30 dod joined #mojo
06:33 Grinnz joined #mojo
06:35 dod joined #mojo
06:48 Atog joined #mojo
07:00 kes How to force Mojo to automatically set Content-Type at 'Content-Disposition' part?
07:02 dod joined #mojo
07:06 anparker kes: you can set headers in start event. https://metacpan.org/pod/Mojo::UserAgent#start
07:06 anparker there is content_dispisition helper for headers
07:07 anparker *disposition
07:08 AndrewIsh joined #mojo
07:11 anparker or maybe I just misunderstood you...
07:12 Atog joined #mojo
07:19 Vandal joined #mojo
07:31 kes I think my question is related to MIME type for uploads
07:34 kes anparker: http://paste.scsys.co.uk/522971
07:37 trone joined #mojo
07:43 trone joined #mojo
07:55 anparker as far, as I can see, there is no any content type detection https://metacpan.org/source/SRI/Mojolicious-6.64/lib/Mojo/UserAgent/Transactor.pm#L199-221
08:13 ashimema joined #mojo
08:22 ashimema joined #mojo
08:50 icjs joined #mojo
09:04 tim joined #mojo
09:11 ashimema can someone clarify something for me.. can one call $job->retry({delay => whatever}) from within the running minion job to stop it in it's tracks and set it to retry later?
09:13 ashimema i.e.: https://ssl.thorsen.pm/paste/145f2a06fa14
09:15 tim Can someone reproduce the error [Can't call method "steal_handle" on an undefined value] for this sample code? http://pastebin.com/QB6pQTsB
09:16 tim I think this is a small bug in Mojo::UserAgent.
09:56 meshl joined #mojo
10:16 nic hmm, I guess my hypnotoad config can stop setting lock_file
10:32 kaare joined #mojo
10:32 osfabibisi joined #mojo
10:53 dotan joined #mojo
11:07 sri ashimema: if you ->finish the job first, sure
11:07 tchaves joined #mojo
11:07 ashimema can you chain those methods?  i.e ->finish->retry();
11:08 * ashimema goes to play a bit more.. he must have got something else wrong ;)
11:08 sri now you're just being lazy
11:08 sri http://mojolicious.org/perldoc/Minion/Job#finish
11:10 punter joined #mojo
11:10 pink_mist ->tap('finish')->retry? :P
11:11 pink_mist or is that not how tap works? I forget :/
11:11 dvinciguerra joined #mojo
11:12 sri tim: could be a bug, could be user error
11:17 sri someone should look into it
11:17 tim the error only occurs if max_connections == 0
11:19 sri that does make it a likely bug
11:19 sri maybe open an issue
11:19 sri and simplify the test case if you want to get it fixed faster
11:19 sri there's already similar test cases in the test suite
11:20 sri t/mojo/websocket_proxy_tls.t and the like
11:21 tchaves joined #mojo
11:24 sri yea, looks like a bigger problem, and i don't have time
11:31 osfabibisi joined #mojo
11:34 dvinciguerra joined #mojo
12:07 kes When I do non-blocking requests are they run in parallel or one-by-one?
12:07 kes http://mojolicious.org/perldoc/Mojo/UserAgent#post
12:17 dotan joined #mojo
12:47 pink_mist yes, yes they are
12:51 ramortegui joined #mojo
12:52 marty joined #mojo
12:54 marty_ joined #mojo
13:08 kes ping_mist: parallel or one-by-one?
13:08 kes sorry
13:08 kes pink_mist: parallel or one-by-one?
13:08 bpmedley kes: mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#Concurrent-blocking-requests, may help.. If you use delay, then that can depend on how you setup the code..
13:10 * sri wonders what microsoft plans to do with linkedin
13:10 kes no, I just want to complete two same request at once. To emulate double submit button click.
13:12 bpmedley kes: you might try the delay setup referenced in the cookbook
13:15 kes bpmedley: http://paste.scsys.co.uk/523072
13:16 bpmedley kes: i see no delay being used
13:24 kes I do not want they will be blocking, just concurrent. I am confused by "Concurrent blocking requests". Requests blocking what? Maybe "Blocking concurrent requests?"
13:24 kes or "Sync concurrent requests"
13:27 bpmedley If you try the code, then there may be less confusion.
13:28 kes I have found answer here: http://mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#Non-blocking . That is the comment in example: # Concurrent non-blocking requests
13:28 gizmomathboy joined #mojo
13:34 dod joined #mojo
13:34 dabudabu https://developers.slashdot.org/story/16/06/12/1510251/interviews-ask-perl-creator-larry-wall-a-question
13:36 meshl joined #mojo
13:36 kes I study the code just now. It uses minions and "Sync concurrent requests" seems to me less confusing. From your link It will be impossible to say: I process first request now, or I process second request now. So I use this example: http://mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#Non-blocking
13:37 kes bpmedley: thanks. Your link helps
13:43 Kripton joined #mojo
13:48 cosimo joined #mojo
13:49 sri tim: it's definitely a bug and can be replicated with a simple test https://gist.github.com/anonymous/5ee3f5a30c762bc3060ee1f47d827d90
13:49 sri tim: please open an issue, and i'll take a look next time i have a few sponsored hours (or maybe someone else will fix it in the meantime)
13:50 sri definitely a bigger problem that requires some user agent refactoring
13:50 Trelane So, previously I'd talked about having this CSRF checking route plugin
13:50 Trelane I got it eventually to work with our code, and now I'm making it CPAN
13:51 Trelane If it fails the CSRF currently it renders text and sets a 400 status
13:51 Trelane What would be a good way to make this configurable to someone who didn't like my bare bones default behavior
13:52 sri Trelane: maybe a reply->csrf_failure helper your users can override?
13:53 sri along the lines of http://mojolicious.org/perldoc/Mojolicious/Plugin/DefaultHelpers#reply-not_found
13:56 tim I do not have a github account. Maybe someone else can create the issue?
13:58 Trelane tim: github accounts are free
13:58 sri takes like 5 seconds to create
14:00 Trelane sri: So I should defined a reply.bad_csrf helper and then someone can override that if they feel like?
14:00 Trelane That sounds sensible
14:00 sri yea
14:03 nic My search foo is failing.  Anyone got a link for how to run hypnotoad as a non-root user?
14:04 sri you mean workers?
14:04 nic yeah
14:04 sri got removed from core, there's a plugin now
14:04 nic My config is so old it's still trying to do it by naming the user
14:04 * nic sees if its a jhthorsen plugin
14:07 lluad joined #mojo
14:11 nic aha!  ::SetUserGroup
14:12 nic thanks Mr Book
14:14 ptolemarch joined #mojo
14:14 pink_mist Grinnz+
14:14 pink_mist err
14:15 pink_mist Grinnz++
14:15 pink_mist almost did a reverse google plus thing there
14:21 robinsmidsrod joined #mojo
14:27 sri tim: if you don't do it it will prolly get forgotten
14:28 jberger I can open the ticket
14:32 jberger tim / sri: https://github.com/kraih/mojo/issues/970
14:33 jberger tim (and sri too of course): feel free to expand the ticket as you see fit, I haven't had time to understand the problem but I didn't want a bug to fall off the radar for lack of a report
14:34 sri jberger++
14:34 Trelane Is there syntax where I can use route shortcuts in a Lite application?
14:35 Trelane short of app->routes->post(...)->the_shortcut_here
14:35 jberger Trelane: you can always just use more "full like" routing in lite
14:35 jberger my $r = app->routes;
14:35 Trelane yeah, okay.  I don't normally write lite apps
14:35 tim thanks jberger (i would have created the issue otherwise later)
14:36 Trelane but it seems to make sense when testing...
14:36 jberger Lite is just tiny sugar over the full app
14:36 jberger Trelane: yes it is useful in writing tests, in which case I often do just as I say (because I am more accustomed to full app routing)
14:37 jberger tim: ok, I was just concerned that you wouldn't :-P
14:37 jberger as I said before, still feel free to signup on github and add any detail you would like
14:38 tim ok :)
14:56 robinsmidsrod joined #mojo
15:05 meshl joined #mojo
15:55 odc joined #mojo
16:15 jabberwok joined #mojo
16:16 jabberwok https://github.com/lindleyw/pod-index    greatly cleaned up. with link to example index of Mojo::* + Mojolicious::*
16:39 PryMar56 joined #mojo
16:53 punter joined #mojo
17:25 Sound joined #mojo
17:27 sri yay, google is finally optimizing chrome again on os x and android
17:27 sri guess i'll have to use chrome canary until september
17:28 sri http://www.androidpolice.com/2016/06/13/google-preparing-big-optimizations-chrome-53-47-improvement-motion-mark-webkit/
17:28 * sri was getting really annoyed with it
17:28 Sound Hi!  My hypnotoad worker dies in s reproducible way every time I process a heavy file upload. I'm spitting some information to the logs, so I see it's handling the request, but suddenly I get "[debug] Worker 910 stopped" in the log. It has the same timestamp as the previous messages and it doesn't look like a timeout issue. I'm suspecting a memory limit, but the server has about 1GB free memory and swap.  Under what conditions can a worker terminate without any
17:28 Sound detail in the logs?
17:34 sri apple events get more lame every time
17:39 genio ugh.  so much apple watch
17:39 sri omg!
17:39 anparker they renamed it after all :)
17:39 sri so that's how they want to sell me a watch
17:39 sri to unlock my mac!
17:39 sri -.-
17:40 dod joined #mojo
17:40 genio yea.  sigh
17:42 genio It feels a lot like a crappy infomercial right now.          Opening cans is hard. It goes like this.   but now with the new whizbang, it's simple.    (cue woman with a smile while she opens a can)
17:45 Sound Interesting. The crash is caused by Imager trying to open a 14MB JPEG image and failing with "Unable to malloc 627731028.".  :-O
17:46 Sound That explains why the Mojolicious worker doesn't log any fatal error.  But still, wtf.
17:47 sri siri for mac is cool though
17:48 genio as is the Picture in Picture thing.  assuming it's not a Safari-only thing.  nobody uses Safari
17:48 dustinm joined #mojo
17:49 dod joined #mojo
17:49 sri i actually want to use safari, but i need to sync bookmarks with an android phone
17:51 genio at least I won't have to say "El Capitan" anymore
17:53 genio ugh.  I don't want others to be able to reply to my texts before unlocking the phone.  eww
17:54 sri yea, seriously
17:54 genio I'm not at all excited about this stuff.  all of this IOS 10 stuff is making me cringe
17:56 sri it certainly won't make me switch back from android
17:57 sri little surprised they don't allow macs to be unlocked with an iphone fingerprint
17:57 sri that might have made me consider an iphone
17:58 genio was that a watch-only feature?
17:58 sri think so
17:58 sri gotta sell those watches!
17:59 genio and now siri's reading our texts?
17:59 anparker many services for China...
17:59 pink_mist genio: you think she wasn't already?
18:00 genio ugh.
18:01 genio our phones are now facebook
18:02 genio show me a better MBP already.
18:03 sri they are moving suspiciously fast
18:03 sri something big must be planned for the second half
18:03 sri DON'T YOU DARE MAKE MY NEW MACBOOK LOOK OUTDATED!
18:04 genio hahaha
18:04 genio you, sir, are behind the times!
18:09 sri hahaha, showing bored people in the audience
18:21 sri home automation with siri is cool
18:28 tempire joined #mojo
18:30 sri please don't release imessage for android
18:36 genio oh, great.  now I'll get messages from apps
18:36 genio eww
18:37 sri no more imessage demos... please :(
18:37 genio yea, this is getting old.
18:41 jberger imessage is the worst
18:41 sri not much time left for hardware announcements
18:42 sri bet they'll do something silly, like letting u2 play songs for the last 15 minutes ;p
18:43 jberger mic drop car announcement?
18:45 sri maybe in a few years
18:47 sri definitely no hardware
18:58 anparker so, no need to worry about your new macbook
18:59 sri hahaha
19:03 sri allright, that was boring
19:18 punter joined #mojo
19:34 sri ooh, the real news start popping up
19:34 genio MS bought LinkedIn
19:34 sri macos sierra has a new file system
19:34 genio I wish I had $26.2 billion in cash to throw around
19:39 genio sri: What did they go with?
19:39 sri Apple File System ;p
19:40 sri apparently it's optimized for ssd
19:41 sri https://twitter.com/gruber/status/742436377841668096
19:41 sri you'd think they put this stuff in a keynote instead of the imessage nightmare
19:42 genio yea, I was looking all over and couldn't find anything
19:42 sri i guess tim cook only knows how to speak to consumers
19:42 genio I wonder if it will continue with the case sensitivity oddities of today
19:43 sri lots of apps depend on it
19:44 genio last I read it was really only Adobe products that had issue. I might have selective memory
19:44 sri still remember trying case-senstive hfs+ and world of warcraft not working anymore
20:12 punter joined #mojo
20:21 Bender joined #mojo
20:26 gizmomathboy joined #mojo
20:38 Grinnz_ i wonder if that's related to world of warcraft having case insensitive passwords :)
20:41 pink_mist haha, that would be hilarious
20:41 Grinnz_ "users keep typing passwords with caps lock on, what should we do?" "put a warning that says caps lock is on?" "nah, 1.5 million of our userbase won't understand"
20:52 Trelane okay, I'm being dumb.  Where's the documentation of what template name will be picked?
20:54 sri oh, the apple file system is case sensitive, that's gonna be a tough migration then
21:00 osfabibisi joined #mojo
21:07 bpmedley https://developer.apple.com/library/prerelease/content/releasenotes/General/WhatsNewInSafari/Articles/Safari_10_0.html
21:16 sri bpmedley: what about it?
21:37 bpmedley Cool stuff for us web devs.. :)
21:38 bpmedley We can do apple pay from the web..

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