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

IRC log for #mojo, 2015-07-16

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

All times shown according to UTC.

Time Nick Message
00:40 genio Sometimes I aid my annoying queries with the use of SQL::Abstract
00:44 Kogurr joined #mojo
02:03 mattastrophe joined #mojo
02:09 noganex joined #mojo
02:15 thowe what's the best way to include a bit of layout template into other layouts?  So I can have header, nav, footer, but not include nav where I don't want it?  My include statements don't appear to pick up other layout template file names...
02:17 kaare joined #mojo
02:18 thowe doing something like "%= include 'default_top';" where default_top.html.ep is in my layouts directory doesn't seem to work
02:34 bpmedley thowe: http://mojolicio.us/perldoc/Mojolicious/Guides/Rendering#Content-blocks <-- Is this helpful?
02:36 thowe well, no.  I want to be able to make my layouts out of combinations of layout files.  For other templates, including additional ep files seems to work, but I want to include other layout files in layouts.  The include statements appear to be ignored.
02:37 thowe so I have in layouts: simple, default, header, footer, and nav.  simple includes header and footer, but default includes header nav and footer.
02:38 thowe That way I only need one header and one footer, but can have layouts that do or don't include the nav.  Otherwise I have to repeat myself with header data.
02:41 jberger I don't think layouts can have layouts
02:42 jberger Worst case scenario you can build header and footer helpers
02:42 jberger But even that is probably more than you need
02:44 thowe er, I don't want to have a layout, I just want to use include in a layout
02:44 thowe I mean, I don't want to layer layouts, just include in the layout
02:46 thowe Maybe I can just pass something in the stash to suppress the parts I don't want to display...
02:47 jberger That's possible too
02:47 thowe doesn't quite feel right though
02:47 jberger So let me see if I understand
02:48 jberger You want a layout that has a header and a nav and a footer
02:48 jberger And then you want a layout that has a header and a footer
02:48 jberger Without the nav
02:49 thowe Yeah, that's a basic example.  That way I am not repeating my header for different layouts
02:49 jberger So if you have a header template and a nav template and a footer template
02:50 thowe I want to use the same header for all alyouts, but only include the nav or other parts in some of them
02:50 jberger Can't you just make two layouts that only include what you want
02:51 thowe jberger, That's what I'm trying to do, but when I use the include statement to include the header or whatever, it doesn't seem to do anything
02:51 thowe I have "%= include 'default_top'" but no top is displayed.
02:52 thowe It's like the include statement isn't there.
02:53 jberger Probably can't find it
02:53 thowe where is it looking?
02:53 jberger You said you have the headers and footers in the layouts directory?
02:53 thowe I have a file name default_top.html.ep in the same dir
02:53 thowe yes...
02:53 jberger Move them to the templates
02:53 jberger They are not a layout
02:54 thowe OK, can I include layouts/default_top  ?
02:54 jberger Assuming that's you directory structure
02:55 thowe ah.
02:55 jberger But why would you want to think of a layout as a template?
02:55 jberger I mean it is
02:55 jberger But I think of layouts as just structural
02:56 thowe I thought I was too.  How do you mean?
02:56 jberger Layouts should be small and include lots of things
02:57 jberger Maybe some content_for
02:57 thowe Yeah, that's what I was trying to do.  They are just a couple lines long and including the parts I need, but I apparently didn't account for it starting in the root of templates dir
02:58 thowe My layouts are just include lines and an optional message display
02:58 jberger The only argument I'm making is that I wouldn't put default_top in the layouts directory at all, even if you can make it work by using the longer path
02:58 thowe I was apparently just tripped up by dir structure
02:58 jberger But it is mostly a semantic argument
02:59 thowe Yes, I see your point and I agree.  I only put it there because I assumed includes started in same dir.
02:59 jberger Right
02:59 jberger You're on the right track now, do as you see fit
02:59 thowe Now that you have dispelled my misconception, I will move them to templates dir
03:00 thowe And thanks!
03:01 jberger thowe++ # good word "dispel"
03:02 thowe The impending IPv4 runnout has spurred me to get cracking on moving my IP manager to Mojo.  I think it will make deployment easier for many.  The Catalyst version is just too heavy.  Also, in the process I have learned a few things that make it more better
03:02 thowe I also like "disabuse".  I use that one at work all the time when talking about educating the sales people...
03:05 thowe I love the adding a command to my mojo app thing.  Also, ep makes my recursive templates cleaner than they were under TT
03:10 jberger <3 ep
03:57 Lucas1 joined #mojo
04:26 phillipadsmith joined #mojo
04:33 melo joined #mojo
04:42 bjakubski joined #mojo
04:47 da5id joined #mojo
05:08 stephen joined #mojo
05:14 absolut_todd joined #mojo
05:15 _dave_ joined #mojo
05:16 jnbek joined #mojo
05:18 jzawodn sri: slides will be online tomorrow
05:18 jzawodn I'll do the talk again for the silicon valley perl mongers in ~2 weeks and it may be recorded too
05:46 cpan_mojo Mojolicious-Plugin-CGI-0.23 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-CGI-0.23
06:27 dod joined #mojo
06:30 jontaylor joined #mojo
06:32 dod joined #mojo
06:41 jontaylor batman: I read your comments on DO from the irclog :) sorry about dropping so soon after asking a question
06:44 jontaylor hmm, why have I not heard of https://stratopan.com before and why doesn’t it cost anything
06:44 jontaylor It looks much nicer than using pinto
06:44 jontaylor directly that is
07:02 berov joined #mojo
07:11 McA joined #mojo
07:12 trone joined #mojo
07:14 AndrewIsh joined #mojo
07:15 batman jontaylor: cool. yeah... the problem with heroku for me is mostly the pricing. i think the pricing model is awful :(
07:15 batman on the other side... with DO you have to become a sysadmin. making sure the system is secure and everything
07:16 batman but luckily, there's a bunch of articles on DO for doing that
07:17 batman i'm doing very basic stuff: just installing the latest available ubuntu, doing apt-get upgrade and locking down the server with ufw.
07:18 batman probably not the safest setup, but good enough for my data
07:18 eseyman joined #mojo
07:19 jontaylor batman: thats pretty much all the sysadmin you have to do
07:20 jontaylor Honestly pretty much all of us are also quite passable sysadmins and DBAs aren’t we?
07:20 batman is that a question, or statement? :)
07:20 jontaylor heh, statement
07:21 batman ah. well... "good enough" depends on the data you store and availability.
07:24 jontaylor I’m gonna go for one of these to start with https://www.ovh.co.uk/dedicated_servers/enterprise/2014-SP-64.xml, and upgrade it with SSDs
07:24 berov joined #mojo
07:24 jontaylor and run absolutely everything off a single server to start with
07:25 jontaylor i’ve made the mistake before of starting a new project, getting really excited about it, and ordering like 4 servers to set it up “properly”
07:26 jontaylor since as long as I backup the DB I can replace the entire thing in about 45 mintues from scratch, so it saves a lot
07:26 jontaylor if I then get more traffic I can get a second one and have better availability
07:26 jontaylor then eventually spin up VMs to be the app servers so i’d no longer be running DB and Web on the same box
07:27 tempire joined #mojo
07:27 batman yup. make sure your system can scale horizontally and you spin up a new server when required.
07:27 batman s/you spin/spin/
07:28 punter joined #mojo
07:28 jontaylor I really like the hybrid approach, of dedicated servers for DBs, and maybe one web app box, and then supplement with VM instances
07:28 batman jontaylor: have you considered using docker instead of vm?
07:29 jontaylor OVH have a nice set up where they will give you a virtual local network between your hosts
07:30 jontaylor I’ve not really looked into Docker too much, I have an irrational fear of new things until i’ve seen them battle tested, although I should not be so closed minded
07:30 batman haha. https://www.digitalocean.com/community/tags/docker?type=tutorials (the tutorials are generic. you don't need DO to make use of them)
07:31 batman haven't tried this myself (yet), but it looks very nice: https://www.digitalocean.com/community/tutorials/how-to-use-the-digitalocean-docker-application
07:32 Vandal joined #mojo
07:33 jontaylor batman: that actually looks ok, it looks like it wouldn’t be much work to adapt my existing server set up bash scripts to it
07:33 batman :)
07:34 cpan_mojo Mojo-Redis2-0.23 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Mojo-Redis2-0.23
07:35 jontaylor Usually I only use tools if they have either, 1. Reached ubiquity, 2 I could maintain it myself if I had to, 3. The opportunity cost of not using it would be significant
07:36 jontaylor so for example, I like Mojo because looking at the code, I could maintain it if it got abandoned
07:55 amon joined #mojo
08:08 jnbek joined #mojo
08:08 sivoais joined #mojo
08:17 batman anyone who knows if mojo sets $SIG{CHLD} in some special way?
08:17 batman i can't seem to find it in the code, but i was thinking maybe $^SOME_VARIABLE did it...
08:19 batman waitpid() returns -1, which makes me think *something* sets $SIG{CHLD} = "ignore";
08:20 CandyAngel Starting new project.. time to use perltidy
08:20 CandyAngel And stop being a scrub :P
08:20 batman this is the code: https://github.com/jhthorsen/mojo-ioloop-readwritefork/blob/master/lib/Mojo/IOLoop/ReadWriteFork.pm#L309 (yeah, i know i'm setting CHLD there, but i'm trying to make a version where i don't have to)
08:53 jontaylor batman: its only set in Perfork.pm as far as I can see
08:53 jontaylor Prefork*
08:55 CandyAngel So um.. I started using perltidy (with Mojolicious settings as start point).. it is saying all my coding so far is fine :D
08:57 CandyAngel On the flip side, critic is telling me is isn't tidy :|
09:02 CandyAngel Oh, it's ignoring my rc file
09:03 batman jontaylor: yeah. i know that. that's my code, which i'm trying to improve
09:04 jontaylor oh sorry I wasn’t aware of that
09:09 batman no problem.
09:10 CandyAngel Oh. -pbp outputs to stdout instead of to the .tdy file
09:10 CandyAngel Weird
09:17 batman yeah... something is up. https://ssl.thorsen.pm/paste/68442c71f872
09:17 batman jberger: ^ can you help me out?
09:20 batman hm... just starting Mojo::IOLoop gives the same result. both with ::EV and ::Poll
09:28 CandyAngel Any idea how I can stop perltidy from collapsing this: http://codepad.org/fjlVF0hn
09:32 CandyAngel Nevermind, I got it :)
09:32 CandyAngel -cab=0
09:33 batman jberger: nevermind. i'm on the wrong track :/
09:34 CandyAngel All the neverminds
09:34 batman i think EV is doing something funky
09:35 * batman is on the right track :)
09:40 ashimema are the Mojoconf2014 slides available anywhere..
09:40 ashimema just watching https://www.youtube.com/watch?v=UGufeknRHjQ but you cna't really read the slides ;)
09:41 ashimema aha..
09:41 ashimema zooming in on the first slide I found them ;0
09:41 ashimema silly me
09:42 ashimema but of course.. they're password protected :(
09:43 ashimema jberger.. any chance I could get a copy of your presentation?  looks like just what I'm currently wanting to learn about ;)
09:50 batman ashimema: https://github.com/jberger/MojoConf
09:51 ashimema aha..
09:51 ashimema thanks batman :)
09:51 batman you're welcome
09:51 ashimema wish I'd been able to attend.. looks like it was a good conferance.
09:51 ashimema was a little before I really got into mojo though
09:56 ashimema current getting my head around non-blocking as the majority of my app is currently blocking at the momently.  Wondering how to convert one of my helpers to being non-blocking.
09:57 ashimema and then using it as such in the controllers that reference it
10:10 CandyAngel perltidy is a pain. The behaviour I want was added in 2012.. but still has the same behaviour for me
10:10 CandyAngel same behaviour as before the 2012 change
10:10 CandyAngel And I have no idea what option, if any, is causing it :|
10:10 * CandyAngel just wants to code -.-
10:14 jontaylor CandyAngel: you are at risk at losing more time and effort to perltidy than you’ll ever save
10:14 jontaylor unless its a hobby thing you are working on that is
10:15 jontaylor I tend to stay away from it because you can’t get used to it, the second you work in a big team you can’t use it any more or else you end up “owning” all the code (according to git/svn)
10:16 CandyAngel Oh
10:16 CandyAngel I figured out what it was
10:19 CandyAngel I has like
10:19 CandyAngel The usual Module->new( key => value, key ...) or croak 'No workie';
10:20 CandyAngel The "or croak" was continuation indented.. which for some reason, made perltidy indent all the key=>value pairs twice :|
10:21 CandyAngel So I just removed the 'or'
10:32 buu Hrm https://metacpan.org/pod/Nile
10:32 buu That is a truly impressive list of dependencies
10:45 cpan_mojo Mojo-IOLoop-ReadWriteFork-0.13 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Mojo-IOLoop-ReadWriteFork-0.13
10:46 batman MAJOR IMPROVEMENT! ^^^ :)
10:57 neilhwatson joined #mojo
11:04 eitz joined #mojo
11:10 dvinciguerra joined #mojo
11:51 Lee_ joined #mojo
11:58 nic joined #mojo
11:59 ans joined #mojo
12:02 genio joined #mojo
12:04 mattastrophe joined #mojo
12:15 nic An app I'm working on has ->defaults(layout => 'general')
12:16 nic And I have an action that only ever responds with json
12:17 nic Should that action need to unset the layout?    ->render(json => $rs, layout => undef)
12:17 batman nic: $r = $app->routes->under("/api", {layout => undef});
12:18 nic batman: yeah, I use that in a separate part of the app
12:18 batman sorry. not under() .. i meant any()
12:18 nic The question is whether all actions returning json in that manner should be unsetting the default layout
12:19 batman nic: ok. then you're right. you could also go all fancy and check for headers and then set "layout" based on a condition, but i'm not sure if that is robust enough for you
12:19 nic That action started working when I added the layout pair, but of course that could be due to a problem in my app or client
12:19 nic ah, ok, thanks, batman
12:20 batman you can also do something like this: hook before_render => sub { my ($c, $args) = @_; delete $args->{layout} if $args->{json}; });
12:21 nic I'm happy adding the layout pair in each relevant location; I just didn't want to do it if it was wrong :)
12:21 batman nic: i wouldn't say wrong... but there sure is more than one way to solve this :)
12:21 nic I had been thinking that having the json pair in the ->render would mean it would ignore html-y stuff
12:22 batman i think we have come up with four solutions now
12:22 nic it's specifically the ->render() I'm wanting to understand better
12:25 nic I'm curious whether others are setting a default layout
12:25 nic It seems I'm the only one who ever has questions relating to it
12:26 nic <- is special
12:26 jontaylor i never set a default layout and always specify it in my templates
12:27 jontaylor because I think they “own” that attribute
12:28 nic My current project has 90+% of pages using one layout, and I always steer towards laziness :)
12:28 nic But another project uses layout switching for A/B testing, so it would be silly there
12:28 batman i like setting "layout" in defaults, since it makes it easier to change layout dynamically
12:29 jontaylor I always start a template by just copy pasting the first line from another
12:29 batman but i try to set it in the action or route definition, not directly in defaults()
12:29 jontaylor which always specified at least the layout, and the title
12:30 jontaylor but I guess it depends what you use the layout for, if for example you used it to do rebranding it would be silly to put it in the template
12:30 batman nic: you could also do <% layout $some_layout_variable_from_stash %>
12:31 nic yeah, I don't like that
12:31 nic If I need the template to set a layout I do it at the top "% layout 'blah'"
12:32 nic eg for our in-house copies of the development templates, we need "% layout undef;" at the top
12:37 arthas joined #mojo
12:46 zivester joined #mojo
12:48 mtths joined #mojo
12:57 dotan joined #mojo
13:01 jberger batman: thanks for pointing ashimema in the right direction for me
13:01 batman jberger: np :)
13:01 jberger ashimema: I've been meaning to update that talk
13:01 jberger It is on my list of todos
13:02 ashimema interesting?
13:03 ashimema I've been using that talk, plus your blog series, plus reading the code for your MojoForum app to try and work my way through it..
13:03 ashimema anything obviously wrong with those now I should be aware of?
13:04 jberger Nothing wrong
13:04 purl Nothing wrong is being done
13:04 jberger I just don't like the formatting anymore
13:04 ashimema coolios..
13:04 jberger And mango is no longer recommended
13:05 ashimema I did note that in the presentation you recommend a few techniques.. or rather syntax's that you've now changed in MojoForum..
13:05 ashimema I'm taking the App as the example.. assume it's just newer mojo versions ;0
13:05 jberger The delay helper is new since then
13:05 jberger I think I updated MojoForum for that
13:05 ashimema not even foudn that yet ;)
13:06 ashimema what I was noting as different was the change from $delay->on(error => blah); + $delay->wait unless $delay->ioloop_>is_running.
13:06 ashimema to ->catch()->wait
13:07 arthas joined #mojo
13:07 jberger Ah the wait behavior changed so you don't need unless ...
13:07 ashimema I figured..
13:07 ashimema and the catch?
13:07 purl the catch is, like, the new laptop comes with a metal rod in the side that pops out. You set the CPU speed by adjusting a metallic slider on the rod
13:07 jberger And catch is just literally on error
13:07 ashimema :)
13:08 jberger That's in Mojo::EventEmitter
13:08 ashimema coolios.. my hunches were right then :)
13:08 ashimema currently trying to tie this together with a ua call instead of your example db calls ;)
13:08 jberger It was added since the error event is special so it may as well have special methods to attach to it
13:09 jberger The only difference is that the ua doesn't give an error slot in the callback
13:10 jberger So I sometimes mimic one with 'die $tx->error->{message} if $tx->error
13:11 jberger ' # ocd
13:11 jberger But you don't have to do that one
13:12 ajr_ joined #mojo
13:12 ashimema interesting..
13:13 ashimema my brain is currently fuzzled ;)..
13:15 jberger That happens at this point in learning async
13:15 ashimema indeed..
13:15 purl indubitably
13:15 ashimema 'tis fun though
13:15 jberger If it didn't, I'd be worried
13:15 jberger That it is
13:16 jberger Wow that Nile module is ... interesting?
13:17 jberger New in 2014 and uses cgi::simple
13:17 jberger Depends on mongo and redis
13:17 jberger And perl tidy
13:17 purl perl tidy is saying to have equals for two consecutive variables lined up???
13:18 HtbaaPi Hello. Is there a Hypnotoad specialist in the house? :-)
13:18 HtbaaPi I'm getting 'Worker 22888 has no heartbeat, restarting' errors when my API is receiving file uploads.
13:18 jberger See faq
13:19 HtbaaPi any tips on tweaking the settings for Hypnotoad? I'm running with default settings, proxy => 1, workers => 8
13:19 HtbaaPi jberger: I did, can't figure it out, turning to here
13:19 jberger (Sorry for terse answer, getting ready for work)
13:21 CandyAngel Conflicting best practices are fun!
13:21 HtbaaPi could such an error also occur when the server is running out of memory?
13:21 CandyAngel Don't mix whitespace changes with actual code changes in the same commit
13:21 CandyAngel Make code pass perlcritic
13:24 mtths joined #mojo
13:26 HtbaaPi jberger: ah, reading the FAQ instead of the regular docs seems to give a solution. :-)
13:28 cpan_mojo Business-Payment-SwissESR-0.8.0 by OETIKER https://metacpan.org/release/OETIKER/Business-Payment-SwissESR-0.8.0
13:28 jberger HtbaaPi: are these large files, ie does it take a long time to upload?
13:29 jberger CandyAngel: personally I like critic even less than tidy
13:29 jberger Just have code ocd and you won't need either :p
13:29 HtbaaPi jberger: they can be large files and sometimes 3 at a time
13:30 jberger HtbaaPi: you say you read this: http://mojolicio.us/perldoc/Mojolicious/Guides/FAQ#What-does-Worker-31842-has-no-heartbeat-restarting-mean
13:30 jberger And things are taking a long time
13:30 jberger And you are messing with number of workers?
13:30 HtbaaPi jberger: the uploading is non-blocking inside a controller action. And only the uploads are failing (sometimes)
13:31 HtbaaPi I didn't mess with the number of workers. My guess is that the upload action is taking too long so hypnotoad thinks the worker times out
13:32 HtbaaPi I could probably fix that by making the upload controller action non-blocking
13:32 jberger Right, so the faq has a way to get around that, at least to check if that's the problem
13:32 HtbaaPi yup. I'm now extending the timeout to see if it makes a difference
13:34 cpan_mojo Mojolicious-Plugin-Qooxdoo-0.903 by OETIKER https://metacpan.org/release/OETIKER/Mojolicious-Plugin-Qooxdoo-0.903
13:37 ashimema now looking at http://mojolicio.us/perldoc/Mojolicious/Guides/Cookbook#Backend-web-services
13:38 ashimema I'm confused by why one get $ua, $tx but the 'Synchronizing events' example just gets a ?$tx?
13:38 ashimema I must be reading it wrong..
13:39 batman ashimema: delay() shift off the first argument ($ua)
13:40 ashimema oh.. really..
13:40 ashimema didn't realise that.
13:40 batman When I say delay(), I didn't mean the method... (Typo)
13:40 batman Look at the docs for Mojo::IOLoop::Delay
13:40 ashimema just digging them out now ;)
13:41 batman begin() creates a callback that by default "remove" the first argument.
13:41 jberger ashimema: the assumption is that you don't need the callback invocant anymore
13:42 ashimema makes sense I think..
13:42 ashimema I wasn't using the ua of course.. just hadn't spotted where it had gone ;)
13:42 ashimema thus trying to clear it up in my head ;)
13:44 jberger ashimema: the idea being that the next step might get lots of arguments if the previous one stated many things
13:44 ashimema makes sense completely..
13:44 ashimema so when you do your OCD addition of 'die $tx->error->{message}'
13:44 ashimema I asusme that's in the next step of the delay chain right..
13:44 CandyAngel jberger: I just commited the change, then commited the perltidy-induced whitespace change as 'perltidy' :P
13:45 jberger CandyAngel: that works
13:45 CandyAngel Just means there is a commit that won't pass perlcritic, but it is only on the develop branch so..
13:46 CandyAngel Hopefully it won't bother me
13:46 CandyAngel And I am OCD.. you should see what I am like with git-annex :P
13:46 jberger ashimema: yes
13:46 CandyAngel (thou shalt have sane commit history!)
13:46 jberger So that it conforms with everything else
13:47 jberger Actually my ocd comment was just about the trailing ' that I didn't include, and my ocd wanted it there
13:47 ashimema yeah.. I'm thinking I wan't to go along the same lines..
13:47 ashimema else I could end up in madness somewhere down the line ;)
13:47 ashimema lol
13:48 ashimema oh yeah.. I missed that ;)
13:48 jberger ashimema: the question is do you consider a failed http request to be an error
13:49 CandyAngel I was referring to: "14:29 <jberger> Just have code ocd and you won't need either :p"
13:49 ashimema fair point.. in this case I'm sure i do
13:49 CandyAngel either [critic or tidy
13:49 CandyAngel ]
13:49 gryphon joined #mojo
13:49 jberger And if so what do you want to throw, message or code or even the whole tx object
13:49 jberger CandyAngel: my ocd gets a lot of mention :0
13:53 CandyAngel It's so weird how things I thought I'd hate, I now hate the opposite
13:54 jberger CandyAngel: example?
13:54 purl Example (noun): A thing characteristic of its kind or illustrating a general rule.
13:54 CandyAngel 2010: Focus-follows-mouse.. eurch, sounds really sucky
13:54 CandyAngel *starts using i3*
13:54 * jberger kicks purl
13:54 * purl bites jberger!
13:54 CandyAngel 2015: "Argh, why do I have to click the window I want to type in. If I pointed the mouse over it, it means thats the one I want!"
13:59 CandyAngel I'm fairly sure it is because of something else
13:59 CandyAngel Like before, I had a sucky mouse that would randomly zoom across the screen if you weren't touching it
13:59 CandyAngel Or something like that
13:59 purl something like that is totally possible
14:00 CandyAngel But now, when I am at work, I'm constantly typing into the wrong window because I have to click to select
14:05 Lee joined #mojo
14:14 ashimema jbrger, thanks for all your help there.. I seem to have a nicely operating service now :)
14:15 jberger ashimema++
14:17 PryMar56 joined #mojo
14:26 ashimema now onto converting a few other prime candidates
14:27 buu Why would you select windows with a mouse anyway?
14:28 CandyAngel Mice are the only species that will select Windows on free choice?
14:29 CandyAngel (not sure if intentional setup or not)
14:31 vytas joined #mojo
14:32 CandyAngel buu: I'm on a Windows machine (because work) and it doesn't have focus-follows-mouse.. or I can't enable it if it does because control panel is empty
14:33 buu CandyAngel: This is why god gave us alt-tab
14:34 Onigiri CandyAngel: there's a powertoy app that gives you focus-follows-mouse in windows.
14:36 CandyAngel Clicking with the mouse is like.. 100x faster hitting alt-tab 40 times :|
14:36 CandyAngel faster than hitting*
14:38 pink_mist 40 times?! holy shit
14:39 CandyAngel I have a lot of windows open
14:39 CandyAngel Juggling data between several spreadsheets and several systems is fun!
14:40 CandyAngel At least my perl scripts run in the background and just get on with it :)
14:40 genio When I start getting that bad, I end up making mistakes.  Delete this fromt he testing system to see if that clears it up.  OH SHIT, that was live!
14:41 CandyAngel genio: I have VirtuaWin at least.. so there is some separation..
14:41 CandyAngel Oh, and we don't have testing systems, everything is live!
14:41 CandyAngel \o/
14:42 buu Why do you have 40 windows
14:42 buu This is monstrous
14:42 buu Use screen.
14:43 CandyAngel LIke.. Ctrl+a, Ctrl-d, screen?
14:43 buu yes?
14:43 purl yes is, like, the answer to the latest question
14:43 CandyAngel I'm using Windows.. because I have to.. because I'm at work
14:43 CandyAngel My home computer works sanely (except Firefox because argh, Firefox)
14:44 jberger s/screen/tmux/
14:44 jberger s/Windows/goddammed anything else/
14:44 genio although Ctrl+b is harder for my fingers to reach than Ctrl+a
14:45 CandyAngel :P
14:45 CandyAngel I really wish they'd let me just use Linux >.<
14:45 CandyAngel I keep being asked to do things that you could do with 'grep -wF'
14:46 CandyAngel But nooo.. not allowed :|
14:46 genio that's a nightmare issue for IT.  We've recently started allowing people to do that here and we have to fix their fuckups so frequently it monopolizes IT's time
14:46 batman joined #mojo
14:46 CandyAngel genio: Obviously, I've not told you the story of the black-and-white printer
14:47 genio Oh, you updated that but didn't use the utility we wrote for it... great, now we have to part it from the domain and rejoin it.  pls to be letting us go over and use your machine for an hour to fix your stupid
14:47 CandyAngel IT: "You need to put a colour ink cartridge in the printer"
14:47 genio oh, you changed the time on your machine to test something without thinking that the time diff from the domain controller would be a problem?  great, let us come fix your stupid now that you're locked out of your machine
14:47 CandyAngel Me: "It's a black and white printer. It only takes black ink catridges"
14:48 buu CandyAngel: install cygwin?
14:48 CandyAngel IT: "If it only took black catridges, how would it print grey?"
14:48 CandyAngel Me: *facedesks*
14:49 CandyAngel Me: "Do the new laptops have SSDs in them for impact protection?"
14:49 CandyAngel IT: "What's an SSD?"
14:49 genio oh, you decided to use a different windowing environment because it was more similar to windows so it would be more natural for you?  It broke your machine? Thanks for that.  Why the fuck do you feel like you need to use linux again?  Asshole!
14:50 genio letting idiots here who think they know how to linux use linux has been the single dumbest thing this company has done from an IT standpoint
14:50 CandyAngel Aw
14:51 CandyAngel Well, the IT here couldn't fix a toaster if the reason it was broken was that it wasn't plugged in so.. :P
14:51 CandyAngel "broken"
14:51 purl "broken" is probably strong.  i suppose English.pm is only broken if you consider regex speed important.
14:51 genio with only 12 people using linux here, we are fixing linux machines twice a week
14:52 genio the other ~250 people on mac/windows have about the same quantity of problems the 12 linux people do
14:52 CandyAngel Eh, I'd just be like.. "The only fix IT will provide for any Linux problems will be Windows"
14:52 genio we can't say that
14:52 genio we aren't allowed by management to say that
14:53 CandyAngel Because you officially support Linux?
14:53 genio the best part is that the web app those linux people write requires IE because it requires a click-once app.  So, they also need windows to test on.  So, they need a linux machine with a windows VM on that machine to test with.  Genius!!
14:54 CandyAngel Huh. Hm.
14:54 CandyAngel Shame you can't just like.. set it to dualboot, then be able to boot the WIndows in a VM
14:54 CandyAngel So if Linux breaks, they can just reboot into Windows
14:55 genio And we have even had people who work solely within Microsoft Visual Studio for Windows C# apps.  These geniuses requested linux.  They thankfully got denied by their director
14:55 CandyAngel (personally, I'm trying to get VT-d hardware so I can run my day-to-day Linux in a VM alongside a Windows VM, with a light Linux as host)
14:56 CandyAngel That's.. just weird
14:57 genio Most people don't realize how much stupid their IT department has to put up with.  IT departments can do stupid things as well, don't get me wrong... but damn it's just confusing from time to time the absurd requests we get
14:57 CandyAngel As the unofficial IT person here, I definitely understand :P
14:58 CandyAngel Even outside of "IT", I get downright impossible requests e.g. in Excel
14:58 CandyAngel "I want this graph that shows 10,000 data points across 300 ranges.. to be really simple"
14:59 CandyAngel Or like
14:59 CandyAngel I have a series that has values between 0 and 10 and one that is between 0-1000
14:59 CandyAngel Can you make it so you can clearly see the trend on both, without using log-axis or secondary axis because they are confusing
15:00 CandyAngel On one graph
15:00 jberger on a different topic, does anyone have a service discovery system they like?
15:01 CandyAngel Does "none" count?
15:02 jberger if you mean "they all suck" then yeah, that's a valid answer
15:05 jberger hahahaha https://twitter.com/rpaulwilson/status/621012591335342081/photo/1
15:30 jnbek joined #mojo
15:40 sh4 joined #mojo
15:48 Amurita joined #mojo
15:49 good_news_everyon joined #mojo
15:49 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vmzPH
15:49 good_news_everyon mojo/master da93dfc Sebastian Riedel: do not import everything from POSIX
15:49 good_news_everyon left #mojo
16:02 jberger sri: eeeep ^^
16:05 KindOne joined #mojo
16:08 jberger consul looks nice
16:09 Kogurr joined #mojo
16:10 Amurita joined #mojo
16:40 punter joined #mojo
16:56 dod joined #mojo
17:09 pink_mist https://i.imgur.com/wMKirZD.gifv
17:09 genio ALL HAIL
17:17 jberger ALL GLORY TO THE HYPNTOAD!!!!
17:20 genio crap.  I completely messed that one up, huh?
17:43 trone joined #mojo
17:48 kyshtynbai joined #mojo
18:22 jontaylor joined #mojo
18:30 _dave_ that is a very psychedelic toad
18:31 amon joined #mojo
18:38 disputin joined #mojo
18:58 batman jberger: i've taken a spin with your module and made this: https://github.com/Nordaaker/convos/blob/phantom/lib/Test/Mojo/Phantom.pm
18:58 batman jberger: it's not final, but it's an idea. feedback wanted
18:59 jberger why are you reimplementing it?
19:00 jberger why not just use it directly?
19:00 jberger https://github.com/Nordaaker/convos/blob/phantom/lib/Test/Mojo/Phantom.pm#L145-L196
19:12 sri intriguing http://rethinkdb.com/blog/rethinkdb-2.1-beta/
19:13 sri apparently they are actually testing it with jepsen
19:17 Grinnz_ https://metacpan.org/pod/Rethinkdb
19:18 sri lol https://api.metacpan.org/source/NJLG/Rethinkdb-0.09/lib/Rethinkdb/Base.pm
19:18 Grinnz_ i wonder where this was inspired ;)
19:19 Grinnz_ they didnt even change the copyright line, lol
19:20 sri current implementation actually looks very different
19:22 jberger I had forgotten that we had changed all the string eval
19:23 jberger I remember it being discussed (loudly IIRC) I forgot that we merged the changes
19:23 sri it's quite a bit faster
19:24 jberger multideref
19:24 jberger yummy
19:24 sri the wire protocol looks pretty simple, they moved from protobuf to plain json http://www.rethinkdb.com/docs/writing-drivers/
19:25 bd so is it already time to drop protobuf again?
19:26 * sri never used protobuf
19:26 jberger batman: I see telenor on the neo4j site, are you using it?
19:26 jberger I'm curious about it lately
19:31 berov1 joined #mojo
19:49 ans joined #mojo
19:54 batman jberger: no, i'm not using it
19:55 batman jberger: there are minor differences. like default "setup" (phantom)
19:55 batman (i also don't know who is using neo4j @work... ETOOMANYPEOPLE)
19:55 jberger re neo4j: sure I just thought I'd ask
19:56 batman also, i copy pasted the code to make it faster to make ti work as i wanted. i guess i could overload it and just pass on $opts
19:56 batman jberger: i suggested that my group should look into neo4j to make a graph of internet in norway, but no-one knew who to ask about the database, hehe...
19:56 batman s/hehe/it's so sad/ :P
19:57 jberger well, you are on their frontpage so I hope SOMEONE knows ;-P
19:58 batman jberger: haha. yeah, but we're ~ 4000 (iirc)
19:58 batman (people)
19:58 jberger they don't all rely on batman?!
19:59 jberger you're their resident superhero for gods sakes!
19:59 jberger :P
19:59 Grinnz_ he's the developer they deserve. but not the one they need right now
20:02 batman jberger: there's a lot more people who rely on me doing my job. but if i tell you more i have to kill you.
20:02 batman ;D
20:03 batman btw... the interesting part about my phantom extension is not the perl methods, it's what you can do inside phantom/webpage regarding testing
20:03 batman https://github.com/Nordaaker/convos/blob/phantom/lib/Test/Mojo/Phantom.pm#L38 <----
20:05 * batman is afk. need to socialize...
20:06 batman jberger: just one last thing... here is the test that use phantom: https://github.com/Nordaaker/convos/blob/phantom/t/phantom-login.t
20:06 tianon "organize according to the principles of socialism"
20:07 batman i also want to add elementDispatchEventOk("a", ...) or something like that
20:09 batman jberger: last thing... so if you don't have any feedback, i will just find a new "namespace" and make a module.
20:14 bin_005 joined #mojo
20:16 dexteruk joined #mojo
20:17 dexteruk Hi quick question about SSL im starting the application with https://ip:8443?cert=/etc/ssl/server.crt&key=/etc/ssl/server.key&ca=/etc/ssl/ca.crt
20:17 dexteruk but when i have the ca it does not work
20:17 dexteruk when i test it from the outside ssl cert test it does not return anything
20:18 dexteruk but if i remove the ca, the ssl check works but complains about no ca
20:18 dexteruk i seen no errors from morbo
20:18 dexteruk an the webhook needs a valid ca certificate for to talk to me
20:33 jberger batman: wait a little bit
20:33 jberger I'm going to have comments
20:33 jberger I'm just in the middle of some $work
20:34 jberger I'd rather make it easier for you to just use the module as-is rather than having to fork the code like this
20:46 PryMar56 joined #mojo
21:09 batman jberger: sweet! that's why i'm showing it to you...
21:09 batman i want to know 1) is this a good idea 2) how much can/will you "steal back"
21:09 mst batman: then the instant threat to fork seems weird.
21:10 batman mst: *language*
21:10 mst batman: *shrug* that's how it came across
21:10 batman i didn't mean it as a threat. i meant it as "i'm not expecting you do dig my code, and that's fine"
21:11 mst right. apparently you need a different phrasing for saying that, then :)
21:11 batman mst: i understood that the first time. also, i'm not forking anything. i'm using Mojo::Phantom
21:11 mst (yes, language is indeed hard)
21:12 batman i could say it in norwegian, if that's more helpful... i doubt it though.
21:12 batman (i get misinterpret in my own tongue)
21:12 Grinnz_ that's what lawyers are for.
21:12 batman yeah. i need a lawyer! :)
21:12 batman gordon doesn't cut it.
21:13 sri a criminal lawyer?
21:13 Grinnz_ a *criminal* lawyer
21:14 batman jberger: also... when i said different namespace, i meant that i think "Mojo::Test::Phantom" (what i call it now) is not a good name
21:14 jberger the commissioner is currently busy, can you leave him a message please :-)
21:14 * batman off to saving the city
21:14 batman back tomorrow
21:14 jberger batman, if you need to make a wrapper for it, put it under the Convos name
21:15 batman i'm not putting it under the convos name :)
21:15 * Grinnz_ really enjoys that the Arkham games continue to keep up the batman-disappearing-when-gordon-turns-his-back trope
21:15 jberger but I really don't think you are doing anything that can't be easily done given the api I present
21:15 batman jberger: I am using the api you present in Mojo::Phantom. look at the code again later when you have more time...
21:16 batman btw. *your* "perl" js object is not available inside evaluate(). if i'm missing out on something then please make a more complete example in either a unit test or in the SYNOPSIS
21:22 melo joined #mojo
21:25 jberger no, it shouldn't be available inside evaluate
21:25 jberger that's the whole point of the abstraction of the evaluate command
21:28 jberger your functions should call page.evaluate to get the value of the selector
21:28 jberger they shouldn't be available in the context of your page
21:44 disputin joined #mojo
21:52 cpan_mojo Mojolicious-Plugin-SizeLimit-0.004 by GRAF https://metacpan.org/release/GRAF/Mojolicious-Plugin-SizeLimit-0.004
21:59 lupi joined #mojo
22:10 disputin joined #mojo
22:41 neilhwatson joined #mojo
23:58 AndroUser joined #mojo

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