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

IRC log for #mojo, 2016-05-25

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

All times shown according to UTC.

Time Nick Message
00:48 bpmedley https://github.com/kraih/minion/compare/master...brianmed:elected_recurring <-- any interest in perusal?
01:02 zivester joined #mojo
01:05 zivester joined #mojo
01:09 Grinnz joined #mojo
01:17 disputin joined #mojo
01:42 tchaves joined #mojo
01:46 cpan_mojo Mojo-Weixin-1.1.3 by SJDY https://metacpan.org/release/SJDY/Mojo-Weixin-1.1.3
01:47 ilbot2 joined #mojo
01:47 Topic for #mojo is now ūüćĽ cheers | http://mojolicious.org | http://irclog.mojolicious.org | http://code-of-conduct.mojolicious.org
01:55 indianowl joined #mojo
02:40 bc547 joined #mojo
02:43 mishantil joined #mojo
02:43 eseyman joined #mojo
02:48 mishanti1 joined #mojo
02:51 noganex_ joined #mojo
03:39 rabbit joined #mojo
03:44 rabbit I want to serve static w/ Apache and dynamic with Mojolicious. Well, I've got Mojo as the backend and Apache as the front end. That's working. But static is passing through mojo as well, which is not what I want. I do have an Alias setup for my static content, but Apache is ignoring this. Obviously, I'm missing a directive somewhere. Any clues?
03:45 rabbit Apache is ignoring this: Alias /syr/ /home/webc/wc251/syr/
03:46 rabbit Is the problem in here somewhere?
03:46 rabbit <Directory /home/webc/wc251/syr> Order Deny,Allow Require all granted </Directory>
04:02 lluad_ joined #mojo
05:16 inokenty-w joined #mojo
06:51 sri so, my brand new macbook broke :(
06:52 Adurah Your fault?
06:52 sri nope, fabrication problem, enter key is stuck
06:52 sri apparently a common problem with the butterfly switches
06:53 Adurah Now that'll teach you to type fast.
06:53 sri apple support is absolutely terrible as it turns out
06:54 mishanti1 sri: Did they tell you that you were holding on it wrong?
06:54 sri have to drive like 100km to get to an apple certified partner, who will send in the macbook for repair, for a few weeks or so
06:54 bpmedley wtf, that sux!!
06:54 bpmedley do you have a backup?
06:55 sri not yet, i might be screwed for a bit
06:55 stephan48 so essentially you even need to wipe it before you hand it in for support because you can't even remove the storage drive?
06:55 bpmedley Dang.  Apple is going downhill it seems.  Their support, in the past, was phenomenal..
06:56 sri i've dealt with apple support a few years back and they were great, sent me a new macbook before i sent back the old one... looks like service went down the drain
06:56 ribasushi bpmedley: us-side or eu-side?
06:56 sri apple de
06:56 bpmedley The earth is rotating only by the spinning of steve jobs in his grave..
06:57 bpmedley ribasushi: I've only dealt with us.
06:57 ribasushi prolly it is still ok in the us
06:57 Adurah I've only heard bad things since peoples asses started bending iPhones.
06:57 * ribasushi was servicing a thinkpad in warranty last year: markedly different experience in .de and in the .us (.de refused, .us took it when I went there for YAPC)
06:58 sri apparently apple outsourced all service in germany
06:59 ribasushi then again, if I remember correctly sri lives somewhat out of the way, so "driving 100km" (or more realistically taking a couple comfortable train rides) is hardly a chore ;)
07:00 ribasushi .oO( though the train ride *is* a hassle if your laptop doesn't work )
07:01 Lee i need to replace the battery in my macbook
07:01 sri well, few years back i had a thinkpad, and ibm service sent a tech to me to replace a mainboard
07:01 Lee it struggles to do 2 hours now
07:01 sri that was great service
07:01 sri bet they've changed too
07:01 ribasushi whoa...
07:02 sri the enter key even kinda works if i hit it right in the middle
07:03 sri the forums are full of people having the same issue
07:04 sri some have horror stories of 3 or more replacement keyboards :S
07:04 sri if i was still in the 2 week return window i'd get a dell now i guess
07:14 marcus sri: http://www.slate.com/content/dam/slate/blogs/business_insider/2014/12/18/_dude_you_re_getting_a_dell_guy_today_what_man_from_commercials_is_doing/10c8f60aa3streak.jpg.CROP.cq5dam_web_1280_1280_jpeg.jpg
07:14 marcus I wonder if apple will launch their new mbp before september. I guess probably not :(
07:15 marcus oh well, getting a first gen is a huge gamble anyways
07:15 bpmedley The gamble should last longer than a few days..
07:15 sri well, i lost the gamble on the second gen
07:16 marcus sri: Are you sure you can't just send it in to apple directly?
07:16 marcus I did that for my iphone screen replacement. ups came and picked it up
07:16 sri i specifically asked about it and they said no
07:16 marcus so weird
07:16 sri yea
07:17 sri doubt i ever spoke to an apple employee
07:17 sri just some shitty callcenter they outsourced to
07:18 sri i even have the 3 years of applecare... feeling pretty stupid now
07:19 marcus I guess it's more of a problem because you don't live in a big city :-/
07:20 sri we have ups here too ;p
07:20 marcus yeah. that bit is just bizarre
07:20 marcus Pretty sure it must be a german thing :p
07:20 marcus no americans would stand for that
07:23 ribasushi marcus: I am pretty sure that a Mac user in say French Lick, IN also isn't feeling much love when things break
07:24 marcus ribasushi: he'll probably be able to ship it in by ups, I'd say
07:25 marcus https://www.apple.com/support/products/faqs.html
07:26 ribasushi that much is true, scheduled pickups are one thing USians are good at (not just UPS, FedEx does it too)
07:28 sri looks like apple might have gotten rid of send in repairs this year in a lot of countries
07:40 sri damn, dell actually sends out techs in germany :o
07:41 sri wish i had done my research
07:52 sri anyone want to buy a new macbook with stuck key? -.-
07:55 Vandal joined #mojo
08:41 dod joined #mojo
08:45 nic One of my favourite laptops is still the Dell Inspiron I got in 2004
08:46 dod joined #mojo
08:50 osfabibisi joined #mojo
08:56 Jonis nic: 17 inch one? Weighed a metric ton?
08:57 Jonis I had one of those, was silver painted over white plastic, so the silver wore off eventually
08:59 Jonis had the keyboard break, dell sent me a new one with the instructions on how to swap it out myself
08:59 Jonis was neat
08:59 * sri was considering the xps 13
09:03 mishanti1 sri: I have a coworker who's got one of those. He's _very_ happy with it.
09:03 mishanti1 The display on it is gorgeous.
09:03 mishanti1 No wait, he's got the previous model.
09:05 nic Jonis: yes, that's the one.  still amazing.  but very worn
09:06 nic ok, not at all amazing by today's standards, but I really like it, mostly cos the screen has higher resolution than anything else I've seen
09:06 mishanti1 The old precision-laptops from Dell were also amazing.
09:07 mishanti1 Super-high resolution, could take a beating, and was real easy to service (after the warranty was expired).
09:08 * nic nods
09:08 mishanti1 I absolutely _loved_ my m60.
09:09 sri honestly, if i could get a good price for the macbook, i'd get an xps 13 now out of spite
09:10 mishanti1 sri: Sorry to hear that the purchase turned out to be a bad experience. Is ebay efficient as a sales-channel in Germany?
09:11 mishanti1 Or do you have any services that cater better to the German market?
09:15 sri not sure i'd want to sell something this expensive on ebay
09:18 Lee too late to return it for a refund?
09:20 sri 5 days too late :(
09:21 Lee dang :(
09:26 mishanti1 Hopefully they'll be able to provide you with a keyboard that works.
09:31 sri all apple phone support gave me was a list of 3 addresses of 3rd party service providers i can go to
09:31 sri 2 addresses were outdated
09:32 kaare joined #mojo
09:34 nic don't tell me, the giveaway was them ending in "BRD"?
09:36 dod joined #mojo
09:37 VVelox joined #mojo
10:27 nic If anyone needs to check their bank holidays in the year 9999, there's Mojar::Cron::Holiday::Kayaposoft  (->load(country => 'deu', year => 9999))
10:44 Kripton joined #mojo
11:06 CandyAngel Has anyone use Mojolicious commands with bash-completion?
11:19 dvinciguerra joined #mojo
11:39 eseyman joined #mojo
11:42 dantti_laptop|2 joined #mojo
11:45 marcus joined #mojo
11:46 marcus joined #mojo
12:05 McA joined #mojo
12:09 tinita hi, I have a mojolicious app in My::App. I would like to run it with morbo for development, and with hypnotoad in production
12:09 tinita morbo has an option --listen
12:09 tinita err, -l
12:09 tinita for hypnotoad i need config
12:09 jberger sri: :(
12:09 tinita i just don't know how my startup script has to look like
12:10 tinita at the moment it's just: Mojolicious::Commands->start_app('My::App');
12:10 tinita how do I put the configuration for 'listen' in there?
12:10 nic tinita: my advice is (to all beginners) run mojo generate app Testing
12:10 tinita and can I still run that with morbo?
12:11 nic look at the structure and the contents, and run from morbo and mojolicious
12:11 tinita nic: it's a script from a co worker
12:11 jberger sri: you could try to write negative things on social media
12:11 nic tinita: yes, look at the generated app and copy the bits you need
12:11 jberger Both about the laptop failure right after the return date and the customer service
12:11 jberger Sometimes companies jump into action then
12:12 jberger Apple might be big enough not to care
12:12 nic tinita: aside from those two servers, also run commands like "testing routes"
12:12 punter joined #mojo
12:13 tinita nic: what command is that?
12:13 tinita Unknown command "testing", maybe you need to install it?
12:13 nic tinita: Did you generate an example app?
12:13 tinita nic: yes
12:13 nic look at where it's put the script
12:14 nic (might be testing/script/testing)
12:14 tinita script/testing
12:14 nic there you go
12:14 tinita mojo script/testing routes
12:14 tinita -> Usage: ...
12:15 nic nope, that's not what I suggested
12:15 jberger tinita: load configuration using the Config plugin
12:15 nic you want script/testing routes
12:15 tinita jberger: I fond the manpage for this plugin, but I didn't know where to put my stuff
12:15 tinita i'm really lost
12:16 tinita so now, the script does this: Mojolicious::Commands->start_app('Testing');
12:16 jberger Did you read Growing?
12:16 tinita where do I load the config plugin?
12:16 jberger tinita: in the application class during startup
12:16 tinita err
12:17 nic tinita: in lib/Testing.pm you'll see sub startup {
12:17 jberger The script is nothing more than a loader
12:17 jberger tinita: have you only been using a Lite app?
12:18 tinita jberger: I can't really answer that, i think
12:18 tinita i have used Lite, and i used this mojolicious app written by a co worker
12:18 tinita but i haven't used it much, overll
12:18 jberger tinita: I'd suggest reading the Growing guide then
12:18 tinita i usually get lost and find Dancer easier to understand
12:19 jberger Full apps are really no different than lite ones
12:19 nic tinita: Which of the Guides have you read already?
12:19 tinita jberger: in the growing manpage, there is no single appearance of the word 'config' =)
12:20 jberger tinita: no you'd be learning about application structure
12:20 tinita the tutorial guide
12:20 tinita but that uses Lite
12:20 nic so you need to read Growing
12:21 jberger Read Growing and see that they aren't very different
12:21 jberger plugin Config => { ... };
12:22 jberger vs $app->plugin(Config => { ... });
12:22 tinita sometimes the documentation doesn't match what I need to learn it I guess
12:22 tinita and if I do this, does it still run with morbo?
12:23 jberger tinita: the documentation expects you want to learn the framework not just spot learn individual bits
12:23 jberger tinita: ...
12:23 nic tinita: which server you run your app on is independent of whether it's lite or full
12:24 tinita nic: no, i mean, if I put hypotoad config for hostname nd port in it
12:24 tinita jberger: well, this is trie for a lot of software
12:24 tinita jberger: and i'm not so new to software development
12:25 tinita jberger: it's just that I have more problems with the mojolicious way of documenting
12:25 tinita i'm sorry
12:25 tinita if everybody else gets it, then it's just my problem
12:26 jberger Honestly read Mojolicious/Lite.pm
12:26 jberger Or even just look at it
12:26 punter joined #mojo
12:27 jberger If that file is that small surely the difference between the two type of app has to be almost nil right?
12:27 nic I agree with tinita, at the very beginning it's quite bewildering and the differences seem huge
12:28 jberger This is going to sound snarky but i don't mean it as such
12:28 nic I've been using it since v2 and there are still some things I can't translate between lite and full
12:29 jberger Do you really think we'd write a framework application server that could handle our own framework's apps?
12:29 jberger Couldnt
12:29 jberger nic: ?
12:29 nic comprehension... score... low
12:29 jberger group is the only thing that doesn't translate
12:30 nic tinita: the hypnotoad-specific parts are in a specific section of the config, so don't impact anything else
12:30 jberger And IIRC group is mentioned in growing especially because of that
12:30 tinita nic: i see
12:30 jberger tinita: you don't need to use the Config plugin either
12:30 bpmedley tinita: Do you need a config example? http://mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#Hypnotoad <-- See the config example?
12:31 jberger The app's config method is just a hashref storage bucket
12:31 tinita bpmedley: thanks, i have been looking at this page yesterday, yes
12:31 jberger Set it any way you find convenient
12:31 bpmedley tinita: Do you see the myapp.conf section?
12:31 tinita bpmedley: but I thought I can do the config in the startup script
12:32 tinita bpmedley: that was my problem
12:32 bpmedley app->config(hypnotoad => {listen => ['http://*:80']}); <-- You could pass the hypnotoad config in
12:32 sri you wouldn't believe just how pissed i am right now
12:32 jberger sri: apple?
12:33 sri yea
12:33 nic tinita: you can set config values in the startup _method_ but that's unlikely to be better
12:33 jberger Yeah that sucks
12:33 tinita nic, jberger, bpmedley now that I know I have to do it in the app class I guess i'll make progress, thanks
12:34 nic eccellente
12:34 sri drove an hour to the repair shop, they told me they don't do repairs, that's the other branch, another 30 mins... then they told me their repair tech is over capacity and can't take any new work... so they can offer to ship the macbook somewhere else for repair, which would take at least 3 weeks...
12:34 sri fuck apple
12:34 jberger tinita: the startup method on the app class is basically what the entire body of the lite app is
12:34 bpmedley holy hell, that sux
12:36 jberger sri: agitate for a return
12:36 jberger As this is your livelihood three weeks is completely unacceptable
12:36 sri if i can actually get ahold of someone
12:37 sri the hotline goes to some random callcenter
12:37 nic sri: was there any delay in the original shipping?  In some circumstances the intial fortnight period can be extended (by law)
12:37 nic eg if it spent 4 days stuck in a depot through no fault of yours
12:38 jberger sri: ask the call center for escalation
12:38 nic Is this 'apple' you talk of a new startup that hasn't ironed out its business processes yet?
12:38 jberger nic++
12:45 gizmomathboy joined #mojo
12:49 CW joined #mojo
12:54 sri jberger: escalated 4 times, they are sending a replacement now
12:54 ramortegui joined #mojo
12:54 marcus sri \o/
12:54 marcus escalation works
12:55 sri still a week without good laptop :(
12:55 marcus just use an external keyboard for a week?
12:55 sri have to send it back first, then they send the replacement
12:55 marcus or does the stuck enter crap everything out?
12:55 marcus oh
12:55 sri yea
12:55 nic thank crunchy someone saw sense
13:02 tchaves joined #mojo
13:07 zivester joined #mojo
13:10 jberger sri: Oh good
13:11 jberger Better than it would have been anyway
13:12 jberger See this is why i keep a stack of old laptops laying around (note to tell wife next time she asks)
13:16 kes joined #mojo
13:19 ribasushi well, that escalated quickly.
13:22 jberger ribasushi++
13:26 genio sri: What happened?  Isn't that thing brand new?
13:26 genio ohh. keyboard
13:48 sri with my luck they'll send me a rose gold one
13:51 Jonis I could see you rocking that
13:51 Jonis Ironically
13:52 sri don't think i have the beard for it
13:52 ramortegui joined #mojo
13:52 Jonis Actually thought about gettign one of those myself, but I think I'd think it was hilarious for about two months.
13:52 Jonis Then I'd hate myself the rest of the time.
13:58 sri hmm, i guess i might be losing the windows license after the macbook replacement :(
14:02 genio I wouldn't think so.  You should be able to wipe the old machine and reuse the license, no?  I can't see a machine failure and replacement voiding a license
14:03 abra joined #mojo
14:10 sri ah, the windows 7 to 10 upgrade is still valid until july
14:10 cpan_mojo Mojolicious-Plugin-RenderCGI-0.071 by MCHE https://metacpan.org/release/MCHE/Mojolicious-Plugin-RenderCGI-0.071
14:14 cpan_mojo Mojolicious-Plugin-RoutesAuthDBI-0.501 by MCHE https://metacpan.org/release/MCHE/Mojolicious-Plugin-RoutesAuthDBI-0.501
14:17 dod joined #mojo
14:21 Kripton joined #mojo
14:37 futurefaster joined #mojo
14:45 dantti_laptop joined #mojo
14:45 itaipu joined #mojo
14:46 pink_mist sri: the 10 upgrade is bound to your 7 license, and the 7 license isn't bound to your hardware
14:46 pink_mist afaik
14:53 futurefaster left #mojo
15:03 zivester joined #mojo
15:16 ZoffixW joined #mojo
15:17 ZoffixW Any ideas for I can make this route that restarts the app actually render something useful? https://github.com/zoffixznet/perl6.party/blob/master/app.pl#L86  I kinda figured running `hypnotoad app.pl` would make it do the "hot restart" stuff and the current request would actually finish before the new app is started...
15:18 ZoffixW The behaviour right now is that I get a timeout from that request, BUT all other routes continue to work fine, so I suspect the app is restarted and this particular request just dies due to that restart
15:27 ZoffixW Seems like a Bad Idea(tm). My current attempts to have it working left 41 hypnotoads running my app
15:40 jberger sri has something setup for mojolicio.us, though I don't think its in the app, I think its a post-push hook or something
15:41 jberger the closest thing I have is this in the galileo initial setup app
15:42 jberger https://github.com/jberger/Galileo/blob/master/lib/Galileo/Command/setup.pm#L135
15:42 jberger that is a specialized mini-app that is a command run from the main app
15:43 jberger once they are done configuring the app it shuts itself down in that way
15:44 jberger note that "exit" there only works because I'm explicitly using the Daemon
15:44 jberger were it preforking that wouldn't work
15:49 jberger off topic: does someone have adobe illustrator?
15:49 jberger if so can you download this free logo zip and try to open the .ai file?
15:49 jberger http://www.logoopenstock.com/logo/preview/64812/scrible-b-letter-logo
15:50 jberger I'm wondering if the bundle is borked or if it just doesn't work with free tools
15:57 * VVelox does the hammer dance.
15:57 VVelox Planning writing something in mojolicious for media work is coming along well. :3
16:07 dvinciguerra joined #mojo
16:15 ZoffixW jberger, yeah, I can open it...
16:17 ZoffixW jberger, try this EPS: http://temp.perl6.party/scrible-B-letter-logo.eps
16:26 jberger ZoffixW: thanks!
16:26 jberger that works
16:29 dvinciguerra joined #mojo
16:30 ZoffixW Sweet
16:48 mcsnolte joined #mojo
16:51 itaipu joined #mojo
17:09 PryMar56 joined #mojo
17:16 dod joined #mojo
17:46 futurefaster joined #mojo
17:46 futurefaster left #mojo
18:06 punter joined #mojo
18:12 dave How does one know when a Mojolicious application is starting for the first time versus starting because a preforking implementation has started another application process?
18:14 perlpilot dave: I don't have an answer but .... why does one care?  :)
18:17 dave I have data that needs to be initialized only when the entire application restarts, not when a new preforked server process starts
18:23 marty dave:  I suppose you could check for the existence of hypnotoad.pid in the script/ directory.
18:24 dave does hypnotoad crash without cleaning up ever? :)
18:28 pink_mist it might.
18:28 marty Hypnotoad never crashes!  :)  Probably a better approach is to handle application state via some other mechanism.
18:28 pink_mist kill -9 will cause that on linux for example.
18:28 pink_mist it's not something hypnotoad is able to prevent
18:29 dave the curse of having to code for the fat finger
18:30 dave given where I'm about to deploy something, I have to think of everything :(
18:30 anparker afaik, hypnotoad load app when it start, before forking and reload it only on hot deploy
18:32 dantti_laptop joined #mojo
18:49 mishanti1 Just a quick clarification: if one is unsure if something is against the CoC, then the concensus is that it is right? Just looking for a clarification on that, not start a discussion. :)
18:52 pink_mist when you say "it is right", do you mean "it is against the CoC" or "it is right/just/good"?
18:54 mishanti1 pink_mist: That was a bit unclear yes. Typing like I talk is not a good idea. :) "Am I right to assume that if I do not know if something is against the CoC, then it is against the CoC?" <-- better?
18:54 pink_mist yes
18:55 mishanti1 Ok. Thanks.
18:57 pink_mist as in: that was a better phrasing
18:57 pink_mist I don't have an answer to your query
18:58 mishanti1 Ah. Well, thanks for weighing in on the phrasing. :)
19:03 jberger dave: I typically would have an initialization command that I'd run before starting
19:03 jberger ./myapp initialize && hypnotoad myapp
19:03 dave jberger: thanks, my mind was moving in that direction
19:04 dave so ./myapp initialize code would not be run on a hypnotoad -s myapp?
19:04 jberger nope
19:04 dave ahhh perfect :D thank you
19:04 jberger see for example my Galileo setup command
19:04 jberger (second time that has come up today
19:04 jberger )
19:05 dave ack sorry for not using the scrollback buffer
19:05 jberger that was in a totally different context
19:05 jberger you're fine
19:05 jberger https://github.com/jberger/Galileo/blob/master/lib/Galileo/Command/setup.pm
19:06 jberger that is an extreme example because it goes so far as to start a secondary webapp that the users use to configure the actual app
19:06 dave jeez
19:06 jberger but the concept is the same
19:06 dave good stuff tho
19:07 dave I'm trying to be simpler in my coding but that's not working so well :)
19:07 jberger ease of deployability (even by nontechnical users) was a goal of Galileo
19:07 dave so the gist is to make a package YourApp::Command::<command you want>
19:07 dave and then use the run method to run code for that command
19:08 jberger yes, but then you also have to add YourApp::Command to the app's command paths
19:08 jberger https://github.com/jberger/Galileo/blob/master/lib/Galileo.pm#L143
19:09 dave in the startup method? interesting
19:09 jberger otherwise you can make a command in the Mojolicious::Command:: namespace, but those are available to all mojolicious apps
19:09 dave yeah not a good idea I'd think
19:10 jberger those can be fun though: https://metacpan.org/pod/Mojolicious::Command::nopaste
19:10 dave and scary
19:29 Kripton joined #mojo
19:36 itaipu joined #mojo
20:56 dvinciguerra joined #mojo
21:43 eseyman joined #mojo
22:06 bpmedley dave: https://github.com/brianmed/AtStartup/blob/master/lib/Mojolicious/Plugin/AtStartup.pm#L20 <-- This is what I do.  I'm pretty sure that the hypnotoad ENV vars are not considered part of the public API at this time.
22:37 dave that's a nice implementation, but yeah what if those ENV vars change? I already have to go recode every Mojo::Exception->throw
22:38 tianon joined #mojo
22:58 disputin joined #mojo
23:03 absolut_todd joined #mojo

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