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

IRC log for #mojo, 2016-02-06

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

All times shown according to UTC.

Time Nick Message
00:00 renormalist joined #mojo
01:14 mcsnolte joined #mojo
02:53 kaare joined #mojo
03:28 noganex_ joined #mojo
03:42 mcsnolte joined #mojo
03:59 asarch There is an online IDE where you can test the code and see the results, what is its name?
04:04 asarch CodePen!
04:07 binary joined #mojo
04:07 binary Is using Delay the way to pass values to callbacks with IOLoop?
04:19 jberger binary: well, that's a part of it, but the way you ask the question makes me worried
04:20 jberger you wouldn't happen to have some code you could let me look over do you?
04:20 binary I actually have no code :-)
04:20 binary I had been using AnyEvent, and in AnyEvent you use closures to pass data to callbacks, but that didn't work in Mojo, is that right?
04:21 binary I was just reading over the docs for IOLoop, Delay and EventEmitter to get my head around how it all fits together and how I can use it to design nice event driven apps
04:22 Grinnz closures work the same in any code
04:23 binary hm
04:23 jberger binary: Mojo uses the same kind of closures (the pattern is called "continuation passing")
04:23 binary I'll put together a test case with what I was doing
04:23 jberger Delay helps organize them
04:23 jberger but under the hood its the same stuff
04:24 jberger in other news, I finally got up the courage to attempt a real cert with my ACME plugin
04:24 jberger https://jberger.pl/
04:24 jberger pay no attention to the 404, its an app without any routes
04:24 jberger look at the cert
04:24 jberger totally issued automatically
04:28 jberger time to start putting the polish on this thing and get it shipped to CPAN, hopefully this weekend
04:29 binary It's ok actually. I was doing something at the end of 18 hours of work and being up for 24 hours. There never was an issue :-)
04:30 jberger binary: no worries :-P
04:30 jberger get some sleep (or alternatively go get really drunk)
04:30 binary I'm up and fresh now, which is why I see my issue :)
04:31 binary The closure exists inside the sub { } but I was doing sub { my $something=1; do_something() } and wondering why $something wasn't in do_something. Which is not a closure and not anything lol
04:31 jberger hahahaha
04:32 binary And I Delay is quite simple really. It just seems to have 2 purposes, delaying a callback through creating anon subs that all need to be called at various points before the final callback, and running callsbacks in sequence
04:33 binary s/I//
04:33 binary So everything seems clear to me now
04:34 meredith as a bonus your left margin grows rightward much less
04:34 binary Do you ever use Mojo::EventEmitter just in a regular main program just to emit and process events, or is it usually meant to be subclassed inside a package and the package used in the main program?
04:34 binary meredith: Yep
04:35 jberger binary: I have used a raw instance of EventEmitter, yes
04:35 binary I really like everything in Mojo. I originally just discovered it through Mojo::UserAgent, which lead me to the event loop and event handling routines, but I'm going to start playing about with it for web stuff now too. Everything is really clean and has a nice design
04:35 gtodd joined #mojo
04:35 jberger mostly for test purposes, but yeah
04:35 binary I find a lot of the event stuff in Perl a bit clunky. I hadn't found something I really liked until Mojo
04:35 jberger Mojo is <3
04:35 binary Yeah, so it's ok for small programs I guess, but for anything fairly big you'd just create packages
04:35 jberger glad you like it too
04:36 binary I had used Catalyst before, but I'm going to make Mojo my main web framework, Lite for small stuff and RESTful apps, and the full mojo for big apps
04:36 meredith I've had a few things subclass eventemitter but they were relatively small scope, not like using it for a global event thing.
04:38 jberger meredith: subclassing from EventEmitter is the more common usage I'd think
04:38 jberger binary: you are welcome to use Lite if you want, I tend to reach for full apps almost always in my own stuff
04:40 binary You use the full mojo even for small web apps?
04:41 jberger usually
04:41 * binary nods
04:41 jberger lite is good for demos and tiny apps
04:41 binary So I'm as well just using the full mojo for everything then
04:41 jberger but for anything with more than a couple routes and/or templates I'm already reaching for full
04:41 jberger try it for yourself, this is just a personal preference thing
04:42 binary Yep
04:48 c--_ joined #mojo
05:18 davido joined #mojo
05:24 jberger just added automatic intermediate cert concatentation too
05:31 taichi joined #mojo
06:44 orev it might be interesting to add "url shortener" functions to mojo::util, such as in Short::URL.  The module is badly named because it just does the number encode/decode, and has nothing to do with urls
07:01 dod joined #mojo
07:07 dod joined #mojo
08:13 Vandal joined #mojo
08:19 dod joined #mojo
09:39 Vitrifur joined #mojo
09:43 sugar joined #mojo
09:46 punter joined #mojo
09:55 dod joined #mojo
10:18 dod joined #mojo
11:10 binary joined #mojo
11:12 binary I noticed the comment on http://stackoverflow.com/questions/16253879/is-mojoliciouss-morbo-good-for-production from jberger about real-time mojo features not working when usd with PSGI. I was going to use starman, but that would require PSGI wouldn't it? Is Hypnotoad just as fast as starman?
11:56 sri hypnotoad is faster than starman at https://www.techempower.com/benchmarks/
12:03 binary Awesome :-)
12:04 binary Mojo::Pg looks great too. I prefer the idea of getting back to just using SQL, especially with all the features in postgresql. DBIx::Class just restrains you too much, and SQL is already clean enough
12:05 binary I like how everything fits together in mojo
12:05 sri (mojolicious is really well positioned in that benchmark, most of the faster ones are compiled languages and/or cheat heavily with c code, like the python Meinheld stuff)
12:05 binary It's like a complete toolkit for creating modern awesome stuff
12:05 sri that's the idea
12:05 binary What is it you do for your dayjob, sri?
12:06 sri consulting
12:06 binary I take it you get a lot of Mojo work? :)
12:06 sri thinking about taking a real job again though
12:07 binary Yeah, it's fun working a real day job in a team
12:07 binary What kind of stuff would you like to do for a company?
12:10 sri think the perfect job for me would be something where i get to work 50% on some big web app, and 50% on open source stuff
12:10 binary Do you have a lot of time with the consulting to work on open source projects?
12:11 sri not as much as i would like, but much more than a full-time job would usually leave me ;p
12:11 binary Ehehe
12:11 sri if i take a normal job, i think i'd have to step back a bit from mojolicious
12:11 binary Well, thanks for all the awesome stuff you've done. Makes my life as an entrepreneur so much easier. How difficult things would be for startups without all the amazing open source tech
12:12 sri :)
12:12 binary How much would it cost to hire you full time btw?
12:12 binary Not that I can afford it just now, but when I grow I'm going to hire the best Perl devs
12:13 batman i think it sucks big time that i'm not able to give (significant) $$ back to you sri.
12:14 batman you're saving many companies a lot of time+money.
12:14 binary Yeah, it's lame that companies aren't donating more to open source
12:14 binary The Internet would be an utterly dire place without it
12:20 sri not sure what it would cost, depends on a lot of variables, like how much open source time i'd get ;)
12:21 * binary nods
12:21 batman i wonder if this is useful for anyone else: https://gist.github.com/jhthorsen/43ef9d8b11d4e76a253b
12:22 sri been thinking about giving google a try, but they want me in a different country, and open source work would get really tough :S
12:23 binary Yeah. Don't they give people 1 day a week to work on open source projects though?
12:24 sri from what i hear not anymore
12:24 binary Ouch
12:24 binary What would be your ideal ratio of company work to open souce work? 50/50 or 60/40 company/open source etc?
12:25 sri dunno, has anyone here tried something like that yet?
12:29 sri think you usually only hear about those employed 100% for open source work :)
12:29 binary Cool, well when I've launched my first internet marketing software products and I'm making enough profit I'll chat with you and see if there's something that works for us. Even just having you around would still be beneficial for the projects + other devs if you were doing 50-70% open source stuff
12:34 sri good luck
12:34 sri so, any minion uis need api changes yet? https://github.com/kraih/minion/issues/25#issuecomment-180752996
12:34 binary Thanks!
12:35 binary Oh yes, Minion. I'm using beanstalk just now. I need to read up on Minion to see if it'll suit me better
12:58 jberger My last two jobs don't have official open source time
12:58 jberger But they both have let me extract code from our applications (the non business value stuff) as modules
12:58 jberger Even on company time of that's available
13:00 binary What kind of things do you work on in your day job, jberger?
13:00 jontaylor joined #mojo
13:00 jberger Both are/were internal web apps
13:00 jberger For companies
13:00 binary Do you prefer internal company apps to customer facing stuff?
13:01 jberger I haven't ever really been a part of a client facing app actually come to think of it
13:01 jberger I don't think it'd matter much to me though
13:02 jberger I'm mostly backend
13:02 binary Yep
13:02 binary Aw no, minion needs postgresql 9.4
13:05 jberger binary: vicash just released a port that requires only 9.1
13:05 binary I'll upgrade later on. I was just having a peak just now. It looks really nice though
13:05 pink_mist Minion::Backend::Pg91 or so
13:05 binary pink_mist: Ah, nice
13:13 jontaylor joined #mojo
13:14 jontaylor joined #mojo
13:23 FloydATC joined #mojo
13:25 FloydATC Mojo noob here trying to do non-blocking mysql in a helper sub, is that even possible?
13:26 FloydATC I figure the template rendering would have to be put on hold somehow and then resumed when the results are ready
13:30 CandyAngel FloydATC: You want to use $controller->render_later to delay rendering: http://mojolicious.org/perldoc/Mojolicious/Guides/Rendering#Automatic-rendering
13:31 CandyAngel FloydATC: And delay in the IOLoop I think? http://mojolicious.org/perldoc/Mojo/IOLoop#delay
13:32 CandyAngel (I've not done what you are asking, so I'm not sure if this is the "best" way though, sorry)
13:33 FloydATC I understand half of that; render_later would put rendering on hold but what then? The delay loop has 2 subs; one to query and then 1 to collect the results - but how to resume?
13:35 sri http://mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#REAL-TIME-WEB
13:35 FloydATC the sub gets data but I don't understand how to get that data back into the template to have it finish rendering
13:35 FloydATC (reading)
13:44 jberger FloydATC: the template is rendered blocking
13:45 jberger collect the data in the controller, put it in the stash, then render it
13:45 good_news_everyon joined #mojo
13:45 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vglJi
13:45 good_news_everyon mojo/master 32c961c Sebastian Riedel: explain continuation-passing style in the cookbook too
13:45 good_news_everyon left #mojo
13:46 jberger I've been thinking about working up a talk or article on nonblocking fundamentals
13:46 jberger actually I
13:46 sri we could so use an introduction in the docs
13:46 FloydATC jberger: OK thanks, I'll rewrite
13:46 jberger i've kinda been thinking about it since tempire's class at mojoconf
13:47 jberger when he said "you can't return in a nonblocking callback" it really hit a cord for me
13:47 jberger (and yes you can return but only for control flow not for passing values)
13:48 jberger sri: hmmm, I could try my hand at that
13:50 sri not sure how and where it would fit in
13:50 sri but it would be nice
13:51 jberger my stack of things todo gets one deeper :-D
13:52 jberger I really have to get my ACME client shipped first
13:52 jberger last major thing to add is hmac signing the request/response between the acme client command and the server proper
13:52 jberger the nice thing is, they can just use the application secret
13:53 jberger after that I still need to add a poller for if the acme server is overworked generating the cert, but acme-tiny doesn't do that either
13:53 jberger so I can probably put that on a todo list
13:54 good_news_everyon joined #mojo
13:54 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vglUU
13:54 good_news_everyon mojo/master 82750b2 Sebastian Riedel: a few more documentation tweaks
13:54 good_news_everyon left #mojo
13:56 jberger preaction: I don't know if we have any "topic" for the office hours on thursday, but if nothing appears, can we sketch out an angular based minion frontend?
13:56 jberger my minion monitor code is fine for the backend
13:56 jberger the frontend is hacky
13:57 sri you do anything with queues yet?
13:57 jberger no, but that needs to be added
13:58 jberger stats by queue would almost certainly be a nice thing
13:58 jberger filter by queue too
13:58 jberger but like I said, todo stack depth is getting high
13:58 jberger and right now acme client has my priority
13:59 jberger because I think that would be a huge win for us
13:59 jberger "mojo can generate your ssl certs for you"
13:59 jberger that's a feature the other frameworks don't have
14:01 sri i linked this yesterday, which shows how kue does stats by queue https://cloud.githubusercontent.com/assets/1458008/5229932/76dd0e70-7716-11e4-9551-e87ce799d8dc.png
14:02 jberger oh I like that json dump on the side
14:03 jberger $current_job is going to need a minion ui at some point though
14:03 jberger so I think that will climb the priority stack in the upcoming months
14:09 sri $jbergers_employer++
14:12 sri i'm a little worried about ->stats performance
14:13 sri so easy to add more stuff... but keeping it fast enough...
14:16 mattp_ is minion::backend something that could translate to AMQP?
14:16 asarch joined #mojo
14:17 sri there's state requirements
14:17 jberger the transport might be, but how wuold you keep the data
14:17 sri but as a delivery mechanism, sure
14:18 mattp_ if im pushing ~100k-200k tiny jobs a day  I guess pg would still hold up
14:18 sri celery actually has delivery and state split up into two separate abstraction layers
14:18 sri my little macbook air throws around 1k jobs per second
14:19 jberger inserting jobs is just db writes
14:22 sri inserts shouldn't be the bottleneck though
14:22 sri the updates for the dequeue should be
14:22 jberger oh, I guess that makes sense
14:22 sri which SKIP LOCKED should help a lot with :)
14:23 jberger if the jobs lived in an amqp queue they would be easier to dequeue
14:23 sri to avoid lock contention
14:23 mitya joined #mojo
14:23 mattp_ would i just use the task name to route different jobs if I had jobs i want done by a specific cluster?
14:24 sri named queues
14:24 sri you tie workers you start to a list of named queues
14:25 mattp_ fair. ok
14:32 sri the fact that postgresql now has pub/sub makes delivering jobs pretty nice
14:36 jberger hahahaha
14:37 jberger "I present you with this lama looking race horse as a token of my appreciation :racehorse:" -- https://community.letsencrypt.org/t/retrieving-already-issued-certs/6694/12
14:37 jberger oh, darn I had hoped it was going to copy the character too
14:38 jberger https://cdn.discourse.org/business/images/emoji/emoji_one/racehorse.png?v=0
14:38 sri ????
14:40 sri http://i.imgur.com/jLZTk9I.jpg
14:40 jberger HAHAHAH
14:41 mitya joined #mojo
14:41 sri omg, there are so many good horse memes
14:42 sri i had no idea!
14:42 jberger dude, its amazing
14:42 jberger http://horseshipusa.com/wp-content/uploads/wp-responsive-photo-gallery/ab8473b900d60da4cdf35c8443866ba4.jpg
14:52 jberger hmmm if I want to reply saying "Unauthorized" but I don't want to use basic auth, can I still use 401?
14:52 jberger wikipedia says no
14:53 jberger well, its says I must then include WWW-Authenticate header
15:05 gtodd joined #mojo
15:21 taichi joined #mojo
15:51 jberger well, screw it, no WWW-Authenticate header for you
15:51 jberger that message doesn't leak to the public anyway
15:53 jberger ok hmac signing of interprocess communications is done
15:53 jberger means I'm MVP feature complete!
15:53 jberger time for some tests (ergh), doc and packaging
17:15 eseyman joined #mojo
17:19 good_news_everyon joined #mojo
17:19 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vglZR
17:19 good_news_everyon mojo/master 63ff05c Sebastian Riedel: mention arguments too
17:19 good_news_everyon left #mojo
17:19 sri think the section reads much better now http://mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#REAL-TIME-WEB
17:27 jabberwok continually better documentation ++
17:28 sri still looking for a better delay description than "Manage callbacks and control the flow of events"
17:29 sri "Flow control for non-blocking operations"
17:29 * sri shrugs
17:29 jberger I like that
17:30 jberger I don't mind a nod of the head to the fact that it does it via callbacks
17:30 jberger but I really don't know
17:32 sugar joined #mojo
17:32 sri async.js is struggling with descriptions too https://github.com/caolan/async
17:33 sri promises have it a little easier there ;p
17:34 PryMar56 joined #mojo
17:35 sri also don't like how Mojo::IOLoop::Delay talks about active events
17:36 sri "events" is such an abstract term
17:36 sri i'd like for those descriptions to get more straight to the point
17:36 jberger I like ->begin returning $end much better than wrapping the whole thing in another function which takes a callback as an argument
17:38 jberger I always read "active event counter" as "the active (event counter)" not "the (active event) counter"
17:38 jberger which is probably enough reason to reword it
17:39 jberger pending async task?
17:40 jberger or just pending task
17:40 jberger I think I like pending better than active
17:41 jberger task I like better than event (if only to avoid confusion with EventEmitter) but I'm not sure I like it a lot better
17:41 good_news_everyon joined #mojo
17:41 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vgln5
17:41 good_news_everyon mojo/master f401afc Sebastian Riedel: it is just an event counter
17:41 good_news_everyon left #mojo
17:41 sri maybe
17:41 jberger hehe or that
17:41 sri but "active" doesn't really add any valuable information
17:42 jberger you like removing active better than chaging it to pending?
17:42 sri yea
17:42 jberger ok
17:42 jberger I'm fine with that
17:42 sri still would like to remove the term "event" though
17:43 sri personally, i like pragmatic terms like "non-blocking operation" more now
17:44 sri i do wonder sometimes if people understand "async" better than "non-blocking"
17:44 jberger can we clarify "the returned callback needs to be called when the event has completed, to decrement the event counter again."
17:44 jberger "the returned callback needs to be called when the event has completed, because it decrements the event counter again."
17:45 sri don't find that more clear
17:46 sri maybe someone who recently learned this stuff would like to chime in? :)
17:53 tim joined #mojo
17:58 tim Is someone else getting those errors in a long running mojo app? http://pastebin.com/raw/VEKe3GQm I wonder if it is a bug in my code or a bug/memory leak in Net::DNS::Native...
17:58 sri still think the starting point needs to be the module description
17:59 sri tim: could be a leak anywhere
17:59 sri i imagine Net::DNS::Native might just be the first to notice
18:00 tim ok, unfortunately I have no idea how to debug this :(
18:09 dod joined #mojo
18:24 jabberwok I wonder, is the "inherits all (methods|events) from L<([^>]+)>" pattern suitably regular enough to write an automated document expansion?
18:26 sri i've only seen it in mojolicious related projects
18:27 osfameron this way lies https://metacpan.org/pod/distribution/OODoc/lib/OODoc.pod !
18:27 osfameron (which I'm amazed to see is still being maintained tbh)
18:29 jabberwok *nod*  it would be quite nice to have read docs for Mojo::UserAgent that when you look at the websocket stuff, delves into the rabbit-hole of  Mojo::Transaction::WebSocket which is a Mojo::Transaction which has a Mojo::UserAgent::Transactor which has a Mojo::EventEmitter which... ((brain explodes))
18:31 osfameron ah yes, I've had a similar complaint with Test::WWW::Mechanize::PSGI, where you never know if a method is actually documenter there, in TW::Mech, W::Mech, LWP::UserAgent, ...
18:31 osfameron makes me long for Javadoc
18:31 osfameron (almost)
18:37 good_news_everyon joined #mojo
18:37 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vgl8X
18:37 good_news_everyon mojo/master 30efdec Sebastian Riedel: callbacks are executed
18:37 good_news_everyon left #mojo
18:45 flow joined #mojo
18:46 flow hi!
18:46 flow I need some help with hypnotoad I am afraight
18:47 flow It simply ignores my settings of pid file and listen.
18:48 flow Can I paste a couple of lines of my start script?
18:48 sri use a paste site
18:49 jberger flow: use a paste site but due
18:49 jberger You know, I'm gonna stop ircing from my phone
18:49 jberger s/due/sure/
18:51 FloydATC Got it to work jberger, thanks a bunch! :-)
18:51 jberger Excellent
18:53 cpan_mojo Mojo-PgX-Cursor-0.502001 by NNUTTER https://metacpan.org/release/NNUTTER/Mojo-PgX-Cursor-0.502001
18:53 flow thanks, here is my paste, what is wrong? http://pastebin.com/JCLF0Xjg
19:04 jberger flow: that's an odd script
19:04 flow what is odd? :-)
19:04 jberger One doesn't normally instantiate the hypnotoad class directly
19:05 jberger Usually you should just use the script
19:05 flow it is what I read in perldoc Mojo::Server::Hypnotoad
19:05 jberger That's class reference documentation
19:05 flow you mean $Bin/server?
19:06 jberger Look in the cookbook guide
19:06 jberger Sorry I'm on my phone atm
19:06 sri flow: there is no way those attributes are in thr docs
19:07 jberger http://mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#Hypnotoad
19:07 jberger The guides are the primary documentation for user level stuff
19:08 sri jberger: it's not even in the class docs
19:09 flow that's odd
19:09 jberger flow: those are listed not as attributes but settings
19:10 jberger They are intended to be in the app config
19:10 flow ah, got it
19:11 jberger Yeah hypnotoad is an odd one because of the magic it has to do for zero downtime restarts
19:12 flow I, for one, vote for clarification in the docs ;)
19:12 sri jberger: i don't think that's relevant here
19:12 sri flow: like?
19:13 sri jberger: you should be able to configure the server from a script just fine
19:14 flow dunno, ... or rather cl. in my mind
19:14 sri ...
19:15 sri "i vote for... something"
19:16 flow I would prefer, right?
19:17 sri it literally links to the cookbook section jberger told you about already http://mojolicious.org/perldoc/Mojo/Server/Hypnotoad#SETTINGS
19:17 flow I am not a developer, just a user of mojolicious, alone with the documentatation
19:17 flow yeah and I did read it
19:17 sri then you are not the target audience
19:18 sri http://mojolicious.org/perldoc#BASICS
19:18 flow mom
19:18 sri the docs are for programmers
19:18 flow I am not a developer of mojolicious
19:18 flow but of my own software
19:18 flow using mojolicious
19:19 flow third party module user != end user
19:23 flow btw, my project still is up and running really well with daemon and morbo
19:25 punter joined #mojo
19:25 flow still=already (english not my native tongue)
19:26 sri i'm german too
19:27 flow in my project I have a script/ directory with a couple of invocation scripts
19:28 flow and "to rule them all" an init-style one
19:29 flow this is why I would fancy a script/hypnotoad
19:29 flow easily exchangable with script/morbo and the like
19:29 flow but there are problems
19:30 flow I must account for hypnotoad / prefork handling the signals
19:32 bpmedley flow : What distribution / os?
19:33 flow linux, and yeah I admit my init script is not portable at all
19:33 chansen jberger: Sorry! I'll try not to repeat that kind of behavior!
19:35 flow (for those who are interested: https://github.com/flowdy/FlowgencyTM/blob/master/script/daemon)
19:35 bpmedley flow : What I do with hypnotoad is simply launch via upstart init script
19:37 sri damn, looks like github is in trouble :S http://www.businessinsider.de/github-the-full-inside-story-2016-2
19:39 chansen sri: What did you expect? Majority of users is not paying subscriptions and the paying subscriptions doesn't make the revenue they are expecting!
19:40 jb360 joined #mojo
19:41 sri "The company has reportedly been cash-flow positive since its earliest days, and is expected to bring in more than $25 million this quarter..."
19:41 sri it's the vc curse
19:41 sri they would be fine if they hadn't taken vc money
19:42 sri now investors want to gut the company i imagine
19:44 flow They say nothing about whether they will meet the expectation, do they?
19:45 sri point is, they never lost money before
19:48 flow much belief and hearsay in the article.
19:48 sri hmm, TIL about https://cloud.google.com/source-repositories/
19:49 sri looks like they are giving it another try
19:49 chansen Certainly this is a scenario (which github.com) has prepared for, the question is what consequences it will bring? Advertisements?
19:51 genio "a former yahoo and flikr exec"  with the state of those companies, how does that get one brought into GitHub?
19:51 chansen LOL
19:51 sri lol
19:52 * genio amazes
19:53 jberger I've never understood how execs that run companies into the ground keep getting positions of authority
19:53 jberger the "(s)he's been there" seems to trump "(s)he's done this well"
19:54 genio They must be the world's greatest BSers.
19:54 meredith executives hire each other and the most important thing is to hire an exec for an exec job
19:54 meredith we wouldn't want to give a capable grunt all that authority and pay, they're _grunts_!
19:54 genio That does make me sad for GitHub though
19:54 chansen jberger: Seriously? It's about abandon the ship before it sink and sell it to the highest bidder! Seriously?
19:55 jberger chansen: I wish that didn't sound plausible ...
19:55 jberger success is extracting all the value and bailing before it dies
19:56 jberger vc almost always seems to be a bad idea, it forces you to think short-term
20:00 flow other topic: What is Mojolicious' counterpart to Mojolicious::Lite's app->config?
20:01 flow searching the docs to no avail.
20:01 flow $self->config?
20:01 genio Well, if you want a break from executive conspiracy, why not go with elongated skull people conspiracy theory:  https://www.youtube.com/watch?v=knRJt65k2NY
20:02 bpmedley flow : http://mojolicious.org/perldoc/Mojolicious/Plugin/Config
20:03 bpmedley flow : I'm confused, did you have a question about launching hypnotoad?
20:03 chansen jberger: VC can be a good idea if you have a clear business plan and a clear contract with the VC!
20:03 Vitrifur joined #mojo
20:04 jberger still reading that github article, this is a scary line "And these sales people want the company to create more products for them to sell. "
20:04 jberger chansen: yeah, and limit the exposure
20:04 pink_mist so, uh, when's the mass exodus scheduled for? >_>
20:05 flow bpmedley, yeah, and now I try to realize the advice
20:05 sugar joined #mojo
20:05 bpmedley flow : Do you want to look over my example upstart script?
20:05 jberger flow: app just returns the app instance
20:05 jberger the startup method gets the app instance as the first argument
20:07 chansen jberger: have you ever dealt with a VC?
20:07 jberger no, just seen the results
20:07 jberger and that's skewed of course because I'm sure I only see the bad outcomes
20:07 * jberger mea culpa
20:10 chansen It seems you have a bit of prejudice against VC's in general!
20:10 Vitrifur joined #mojo
20:10 meredith some of the vc stuff most visible to tech ppl is _SV_ VCs
20:12 Adura joined #mojo
20:13 flow bpmedley: For now I'd rather know if there is a way to have my App class configure Hypnotoad. I am not quite eager to restructure my code that short before launch of my tool demo site.
20:13 flow it does have short comings
20:14 flow but I hope they do not bite me as long the site is not open for auto-registration by anyone
20:14 flow everyone
20:14 mcsnolte joined #mojo
20:15 bpmedley http://mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#Hypnotoad <-- Did you see the subsection for Mojolicious::Plugin::Config?
20:16 jberger bpmedley: remember that it doesn't have to be the config plugin, just accessible via the config method
20:16 bpmedley jberger : I'd need an example to understand what you mean..
20:16 flow jberger, the config method is not documented in Mojolicious, is it?
20:17 jberger the app has a config methods whether or not you use the plugin
20:17 flow So I will try it
20:17 jberger flow: actually the parent class Mojo: http://mojolicious.org/perldoc/Mojo
20:17 jberger but yeah
20:18 flow ah ok, thx
20:20 jberger the config plugins just aid in loading a file into the app config, they don't create the config method
20:21 flow my configuration file is local.rc and source'd into a bash script
20:22 flow Another config file would confuse users
20:22 flow so I configure in the script
20:22 flow in the app
20:23 jberger flow: sounds very reasonable
20:47 * sri wonders if Mojo::Pg is now feature complete
20:50 mib_x6f875 joined #mojo
20:50 sri think nobody even noticed when i did this :) https://github.com/kraih/mojo-pg/commit/0df806174bf309ac1bb4ebbfc978d47501d0a05c
20:52 mib_x6f875 I would like to ask a question. What happens after startup, and then render() is called? Does the program exit after that, or are other subroutines called?
20:52 bpmedley mib_x6f875 : Do you have example code?
20:53 mib_x6f875 sure
20:54 mib_x6f875 http://mibpaste.com/FC6sjB
20:54 mib_x6f875 This called up acc_start_script() which does a ton, and then returns template name, title, and body
20:55 mib_x6f875 This file is located in test_app/lib/TestApp/Controller
20:55 mib_x6f875 It is called up via startup()
20:56 mib_x6f875 http://mibpaste.com/MrLu3f
20:56 jberger sri: I actually just saw that
20:56 mib_x6f875 The second file shows startup()
20:56 jberger a couple days ago
20:57 bpmedley mib_x6f875 : https://github.com/kraih/mojo/blob/master/lib/Mojolicious/Controller.pm#L161 <-- I think this code is called via render
20:57 jberger mib_x6f875: a mojolicious application is usually a persistent server
20:58 jberger though it can be run as a CGI script, in which case it would then exit after the request is served
20:58 jberger but I'd highly suggest getting into persistent servers if at all possible
20:58 mib_x6f875 So basically I do not and should not call exit after render, is that correct?
20:58 bpmedley mib_x6f875 : Correct!!
20:58 mib_x6f875 OK
20:58 mib_x6f875 Thanks.
20:59 mib_x6f875 I"m asking all of this because I want to know how to handle fatals.
20:59 mib_x6f875 I'm looking for a convenient way to handle fatal in my code
20:59 jberger mib_x6f875: btw, startup doesn't call the method, it sets up the routes that will then call the method when the router gets an appropriate request
20:59 jberger mib_x6f875: have you read the Guides?
20:59 mib_x6f875 yes, correct.
21:00 mib_x6f875 I have read quite a bit ...
21:00 sri http://mojolicious.org/perldoc/Mojolicious/Guides/Rendering#Rendering-exception-and-not_found-pages
21:00 jberger what sri said :-P
21:01 sri also before that http://mojolicious.org/perldoc/Mojolicious/Guides/Tutorial#Built-in-exception-and-not_found-pages
21:03 mib_x6f875 Thank you, bpmedley, jberger, sri. Have noted all of that. Thanks.
21:13 flow I, too, leave not without thanking you much, sri, jberger and bpmedley!
21:13 jberger flow: o.
21:13 jberger o/
21:14 flow new smilie I dunno it
21:14 bpmedley flow : I believe he's waiving
21:14 bpmedley \o/
21:14 bpmedley \o/  <-- happy
21:14 flow ah ;)
21:15 flow gn8, will return for questions and hanging around with you. mojolicious is a great piece of software
21:25 chansen sri: what do you expect? Non hard-core (the coders not familiarized with the code base in question or pretend to be) ++ your code regardless of review!
21:40 chansen ^^ has been repeated countless of times by core and non core members of the Mojo team!
21:41 * chansen I need some sleep, you know how to reach me, BBL
21:41 jberger chansen: what is this in relation to?
21:41 jberger ok
22:00 gtodd ++migrations :-D
22:00 gtodd I don't need sleep but I could use some pain killers and a drink
22:01 * jberger recommends one or the other, as do the labels of both :-P
22:02 gtodd hehe
22:03 gtodd a drink will help with deep thinking about deep questions like ... "How to keep Mojolicious secret enough so that it appears you have super powers and yet well known enough that you have a constant stream of work and $?"  ... hmmm ...
22:03 sri btw. now that the first season of the expanse is over, i have to say, that's great scifi!
22:04 Grinnz sadly syfy stopped letting me watch for free after the first 5 episodes :/
22:04 genio Did you read the books?  They did a pretty good job of sticking to the material
22:04 jberger gtodd++
22:04 jberger sri: I don't know man, I followed your last recommendation
22:05 jberger I don't think I even finished it
22:05 sri hehe
22:05 Grinnz id love to pay syfy $5 a month to watch their stuff online, but i'm certainly not paying $80 a month for tv service to do so
22:05 genio What onewas that?
22:05 jberger sri: what was that thing called
22:06 jberger Childhood's End or some permutation of those words
22:06 jberger yeah
22:06 sri i've told you about so much stuff!
22:06 gtodd for HistFic there's always "The Revenant"  ... on rainerland
22:06 genio ahh, yes.  That one was a letdown after episode 1
22:06 sri yea, horrible show
22:06 jberger I was home sick, I watched two episodes and couldn't do it anymore
22:06 sri first episode was good
22:07 jberger was just gonna say
22:07 genio jberger: If it's any consolation, the rest of the world felt the same about it :)
22:08 sri the expanse is just very well done
22:09 sri best scifi show since bsg maybe, we'll see next season
22:09 * sri did not read the books
22:09 genio sri: My only gripes about it are minor.  One of my favorite book characters was Chrisjen Avasarala.  She was a complete pottymouth in the books, but they obviously can't carry over her verbal wordsmithing in the show.  :/
22:10 Grinnz oh the one played by that woman with the voice
22:10 genio She was mean, smart, and a pottymouth.  What was not to like!?
22:10 sri the character is very interesting in the show
22:10 jberger I liked in BSG having the fake swear so they could do both
22:11 jberger Starbuck used that word to great effect a few times
22:11 sri the holden character seemed a bit weak
22:11 genio agreed
22:11 genio sri: accurate to the books for a while.  it seems like the 1st season stuck pretty much to book 1
22:11 genio so, he should get better
22:11 Grinnz jberger, yeah BSG and Farscape both used that well
22:12 sri ah
22:12 genio although, farscape...
22:12 genio ugh
22:12 jberger my favorite female character lately was the girl in Halt and Catch Fire, at least the first half of the first season
22:12 jberger haven't seen the second season yet
22:12 * sri loved farscape back in the days
22:12 jberger but they really broke her character the first season and it made me sad (redeemed it a bit at the end)
22:13 genio farscape was fun in a silly way for seasons 1 and 2.  It became unbearable after that
22:15 sri jberger: didn't i tell you to watch jessica jones?
22:15 jberger oh probably
22:15 jberger I'm not as into superheros
22:15 sri :o
22:15 genio sri: I'm waiting in anticipation for who they cast as this gigantic woman marine who's a complete badass (pardon the language) in the next few seasons of the expanse
22:15 Grinnz jberger, jessica jones is like barely a superhero show :P
22:16 jberger I always love the "discover their powers" beginnings and then get bored as they meet their inevitable comparably-powerful enemy
22:16 genio ?!?  You didn't watch Jessica Jones?
22:16 genio /devoice jberger
22:16 Grinnz well she doesnt discover her powers, she just kind of has them, if that helps
22:16 jberger part of why I liked The Watchman so much
22:16 sri netflix super hero shows are different
22:16 sri omg
22:16 sri you'll love the netflix shows!
22:17 jberger most of The Watchmen have no real powers and then the one guy is Omnipowerful, but doesn't care
22:17 sri they are very watchmen dark
22:17 jberger that does help my interest hearing that
22:17 sri daredevil too
22:17 sri sooooo dark
22:17 jberger I've also liked batman more that most people, again, dark and no true powers
22:17 jberger s/that/than/
22:18 genio jberger: I think you'll really like the netflix shows then.  They were so good that even my wife (who hates superpower shows) loved them
22:18 jberger any order of watching? daredevil vs jj?
22:19 Grinnz daredevil came first
22:19 sri doesn't matter too much, they are only connected by a nurse character
22:19 genio pretty hot nurse too.
22:19 jberger hmmm, hot nurses is a nice selling point
22:20 sri she says something like "i know other superheroes", that's all the connection i think
22:20 genio yea, the order in which you watch them won't really matter.
22:20 Grinnz jberger, batman was always my favorite hero/villain series for the same reasons. every villain is a different challenge and most of them are mindgames, rather than superpowers
22:20 sri both shows talk a little about the first avengers movie i think
22:21 genio in a very off-hand fashion though
22:21 preaction also luke cage, who's going to have his own show
22:22 genio I liked his character too.  I hope the show will be as good as the others
22:23 sri they've done a great job so far
22:23 jberger Season 1-2 of House of Cards was really good too
22:23 jberger Season 3 wasn't bad, it just wasn't what I was expecting/hoping for
22:23 sri season 3 was boring
22:23 jberger I had some very strong guesses to the direction of Season 3 and was completely wrong
22:24 sri basically nothing happened
22:24 genio I got so tired of explaining HoC to my wife that we just quit watching.  We constantly had to pause so I could explain what just went on (English as a third language and not very familiar with US politics)
22:24 jberger I assumed his "change of position" to that point was still only a stepping stone to something more
22:25 sri not sure what to think about the season of x-files yet
22:25 jberger and I assumed that his equally crafty wife's african NGO was going to come into play, if you get my meaning
22:25 genio watch for 5 minutes, talk about it for 10.  rinse and repeat
22:25 marcus My russian wife managed to follow HoC just fine. Subtitles helps tho
22:26 marcus I kind of agree about session 3 tho
22:26 pink_mist they need to update this for the new things http://cnet4.cbsistatic.com/hub/i/2015/04/30/828bbb20-dd6a-436a-8509-14f6557fd233/finalmarvelgraphicv4.jpg
22:26 jberger how cool would it have been if his "new job" was only to help her get to something ... even bigger
22:26 jberger I didn't want that to be the height of their scheme
22:28 jberger how does Guardians of the Galaxy fit in there?
22:28 sri i want to hate agents of shield for not being dark enough, but it's so much silly fun
22:28 Grinnz i definitely didnt know if i was going to like it at first, but i think season 2 i really got into i
22:28 Grinnz it
22:28 genio if you can get past the bad acting, AoS is good fun
22:29 sugar joined #mojo
22:29 jberger where do you guy get time for all this TV/Movie watching?
22:29 Grinnz hah
22:29 jberger all my free time goes to writing crazier and crazier modules
22:29 Grinnz and this is why my irc bot is still unreleased :P
22:29 sri still watching those shows on the treadmill :)
22:29 jberger sri: that's a good plan
22:29 jberger I need to do more of that
22:29 * jberger hates tredmills
22:29 sri you said that the last time too!
22:29 jberger yeah
22:29 jberger I know :(
22:30 Grinnz speaking of netflix my new chromecast is here
22:30 genio I need to make more use of my legs as well. stupid appendages
22:30 sri dunno, when i watch a show i just zone out and 45 minutes running is nothing
22:30 jberger I actually should probably get a desk tredmill if I was going to be honest with myself
22:30 genio sri++ # running 45 minutes straight is tough
22:31 sri doing it every day :D
22:31 * jberger prefers lifting
22:31 genio damn.
22:31 jberger not so easy to lift and watch sci fi
22:31 genio I can lift heavy objects and I do so 4-5 times per week, but cardio is no fun-o
22:32 sri can't do lifting anymore, bad back :/
22:33 jberger speaking of crazy modules, documentation is starting to materialize: https://github.com/jberger/Mojo-ACME
22:33 genio I finally broke the 1k pound mark in bench press + squats + deadlifts. :)
22:35 genio I need to do more cardio now and get rid of excess fat
22:45 sri talking about superheroes, i can't wait for deadpool
22:46 sri the marketing so far is off the charts
22:50 Grinnz if it doesnt live up to the hype
22:50 Grinnz lets just say its putting a lot of pressure on
22:51 CandyAngel sri: Can you add Mojo::Collection::do_what_candy_wants?
22:51 CandyAngel :P
22:51 sri CandyAngel: i'm in a good mood, sure thing
22:51 CandyAngel Yay
22:52 Grinnz Mojo::MindReader
22:53 CandyAngel I like the sound of that
22:53 CandyAngel I've just coded something and it works, but I feel it could be more gracious
22:54 CandyAngel And now I've said that, I have an idea
22:54 jberger CandyAngel: seen Mojo::Autobox ?
22:57 CandyAngel That's cool, but doesn't help :P
22:58 disputin joined #mojo
22:59 CandyAngel At the moment, I have Mojo::Collection with 'id3' and I want to iterate over that collection, run a method which adds more ids to it, without adding ones that are already in it
23:02 sri $collection->tap(sub { push @$_, @more })->uniq
23:02 jberger if you really want to continue chaining, there's tap as sri just said or make an ephemeral method
23:03 CandyAngel And I want it to keep doing that until it isn't finding any more ids
23:03 jberger $method = sub { my $c = shift; .... return $ }; $c->$method->to_array
23:03 jberger CandyAngel: what you actually want is a set
23:04 jberger https://metacpan.org/pod/Set::Equivalence
23:04 Grinnz an ordered set (an unordered set can be easily represented as hash keys)
23:05 jberger Grinnz: yeah, that's true too
23:05 jberger assuming your contents are stings
23:05 jberger strings
23:06 CandyAngel Just integers
23:06 CandyAngel I have another idea..
23:07 jberger integers would work as hash-keys too
23:07 batman yay! jberger and Grinnz like me :)
23:07 CandyAngel http://codepad.org/C0UPZjJj
23:08 Grinnz :)
23:08 sri i'm still amazed that some of the hacks in Mojo::Collection actually work
23:09 CandyAngel This isn't the first time my desire to use Mojo::Collection has led me away from neat code :P
23:09 sri like https://github.com/kraih/mojo/blob/master/lib/Mojo/Collection.pm#L77-L89
23:10 jberger sort and reduce are kinda crazy ;-P
23:10 mitya joined #mojo
23:11 Grinnz $a and $b are kinda crazy, tbh
23:12 * genio can't help but think of, "This is an A and B conversation, so C your way out!"
23:15 sri i like B
23:15 Grinnz B is too roundabout, A gets to the point
23:17 genio "Taco and burrito conversation, NACHOS!" ? better?
23:17 sri not much mexican food in germany :(
23:19 genio Not too much _real_ Mexican food here, either.  Lots and lots of americanized pseudo mexican food though
23:20 jberger https://youtu.be/m07ISfx_5b0?t=229
23:28 CandyAngel That code I posted works fine, and then I can get the ids with: my @ids = keys %seen;
23:28 CandyAngel yay
23:40 CandyAngel Thank you for the help ^_^
23:41 jberger CandyAngel: sweet
23:42 CandyAngel Now I just need to throttle the UA so I don't get blocked every time I run it :P
23:55 * jberger hides URLQueue
23:55 jberger I guess it isn't so much rate limited as concurrency limited
23:56 CandyAngel It's not concurrent, it's just really, really fast and it triggers their flood protection or something?
23:56 CandyAngel I'm only doing 1 get at a time

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