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

IRC log for #mojo, 2015-02-23

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

All times shown according to UTC.

Time Nick Message
00:09 tempire jberger: riche: We would just need a way to accept submitted talks, allow for editing, and have a way to display them.
00:10 tempire That could be all mct is for this year.
00:10 tempire You could use a github repo has the data store, so that they could be edited by anyone with write access to the repo
00:13 tempire Oh, now this is interesting: http://feeding.cloud.geek.nz/posts/list-of-open-source-conference/
00:25 riche I was just going to say I give up on it; I thought if they got 2015 up on friday, then I could help get it ready this weekend.  but I have been on them since Friday.  it is just a mess
00:25 riche in more than 2 days and not a single response from anyone who can get anything done
00:25 riche so whatever it is ... I don't care if it's a page that's manually updated by hand
00:26 riche even this guy BOOK said he has no control
00:27 riche so I say just do what need to be done ... fwiw ka yi could have had this done last week using wordpress
00:30 riche yah that looks promising ... five sided vomit
00:33 jberger riche: I have been tinkering
00:33 jberger can someone make some templates?
00:34 tempire jberger: specifics
00:34 purl specifics are that the query aliases the first table to "me"
00:42 jberger a page displaying a presentation
00:43 jberger a page for editing a presentation
00:43 jberger a day view of presentations and probably a three day view too
00:43 tempire If you have a functional page with basic inputs already defined and working, I'll look into it.
00:43 tempire page(s)
00:44 jberger and a user profile page (edit and view too)
00:44 tempire Such that I can easily check out a repo and run it without any set up.
00:44 jberger I don't nearly have enough yet
00:45 jberger so far I just have a rough db structure and basic accessors for users and conferences
00:45 jberger not even for presentations yet
00:46 jberger but you know that these things look like
00:46 jberger make up some dummy data and I can connect them later
00:47 jberger pretend you are making static pages for now
00:48 * sri hates doing design like that, it's so much easier to make something that already has a structure pretty
00:48 tempire I've played that game before.
00:48 tempire It doesn't work out well.
00:48 jberger ok well I don't have enough yet
00:49 jberger so what do you want me to say
00:49 jberger I can put what I have in a repo
00:49 jberger but it isn't much
00:49 tempire You don't have to say anything. Just let me know when it's working.
00:50 jberger I should be able to have presentations and attendance models in the next few days
00:51 jberger I think I have my basic pg design down now
00:51 tempire I know riche wants something up sooner rather than later, but a few days shouldn't matter, I don't think.
00:56 good_news_everyon joined #mojo
00:56 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/AVOj
00:56 good_news_everyon mojo/master 2053bf2 Sebastian Riedel: use IO::Poll consistently
00:56 good_news_everyon left #mojo
00:56 riche if someone could just get a splash on a vhost and move the a record pointer to a temporary site that would be good for now.  What is really bad is saying Mojoconf2015 is scheduled but everything goes to Mojoconf 2014
00:57 tempire I can probably do that.
00:57 riche I have no control of the domain name or else I would have done it myself by now
00:57 riche that's awesome
00:57 riche thanks
00:57 riche ka yi will thank you too
00:57 sri who controls the domain?
00:58 riche some guy in norway ...  checked a few days ago
00:58 tempire I suspect marcus or salve has access
00:58 riche i didnt recognize the name myself
00:59 * tempire asked salve
01:00 jontaylor joined #mojo
01:24 good_news_everyon joined #mojo
01:24 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/AVcI
01:24 good_news_everyon mojo/master 83a05c9 Sebastian Riedel: Mojo::Reactor::is_readable is not needed anymore
01:24 good_news_everyon left #mojo
01:57 cpan_mojo Statocles 0.039 by Doug Bell - http://metacpan.org/release/PREACTION/Statocles-0.039 (depends on Mojolicious)
02:01 preaction bam! beta time!
02:09 buu_ Are you ever going to achieve 0.1 ?
02:09 sjn joined #mojo
02:11 preaction no, most likely i'll go to 0.0999999
02:11 preaction but not 0.09999999, that'd be silly
02:33 buu -_
02:33 buu -
02:35 preaction but seriously, if i really have another 61 releases in this beta cycle (the run-up to 1.0), at 1-2 releases per week... i'd be extremely disappointed
02:37 buu You're going from 0.09 to 1.0 ?!
02:40 sri http://i3.kym-cdn.com/photos/images/facebook/000/505/362/3f4.gif
02:41 absolut_todd joined #mojo
02:42 buu Is that page supposed to load?
02:45 klapperl joined #mojo
02:53 jberger preaction++
02:54 * jberger just discovered sqlfiddle
02:55 preaction buu: it's not just a number! it has purpose! importance! MEANING! one does not simply apply version numbers! one meditates on the number until they become 1.0 with semver.
03:03 jberger http://cdn.meme.am/instances/500x/55414399.jpg
03:04 good_news_everyon joined #mojo
03:04 good_news_everyon [mojo] kraih tagged v5.82 at 83d0ec8: http://git.io/AVij
03:04 good_news_everyon left #mojo
03:05 good_news_everyon joined #mojo
03:05 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/AVPm
03:05 good_news_everyon mojo/master 01a7f8d Sebastian Riedel: bump version
03:05 good_news_everyon left #mojo
03:05 cpan_mojo Mojolicious 5.82 by Sebastian Riedel - http://metacpan.org/release/SRI/Mojolicious-5.82
03:09 noganex_ joined #mojo
04:29 hshong joined #mojo
04:32 irq joined #mojo
05:31 crab is it too late for me to say i think tests+docs=feature?
05:31 crab (i.e. status quo, if i understand correctly)
05:33 jberger crab, so you would accept removing documented api without notice because tests don't exist (something no user knows)
05:34 jberger in a perfect world, I absolutely agree
05:35 franzkafka joined #mojo
05:35 sri and this is the point where i mention daemonize/setuidgid and we only hear crickets :)
05:37 sri i think all the resonable people have agreed that tests+docs=feature is the only sensible way forward, but we can try to deprecate non-features and avoid user pain if the opportunity presents itself
05:37 sri no guarantees though
05:42 * sri kinda wants to release 6.0
05:45 sri *crickets*
05:53 buu DO IT
05:53 buu I mean, hi
05:59 maze joined #mojo
06:00 franzkafka joined #mojo
06:05 jberger didn't the setiudgid crisis pass
06:05 jberger anyway, I've made my point
06:06 jberger in the end, we have built a democracy of sorts here
06:06 jberger if people want to outvote me and remove documentated api without warning, when warnings are possible, then I guess there isn't anything I can do about it
06:07 jberger I don't WANT to be the bad guy here
06:07 jberger and I don't WANT to force feature or removal, these are words being effectively put into my mouth
06:10 Grinnz best-effort deprecation of things that are documented but not features seems like a reasonable policy
06:11 jberger notice I didn't even ask that the placeholder methods DO anything
06:58 Lee joined #mojo
07:10 dod joined #mojo
07:12 dod joined #mojo
07:20 tempire ssm has control over the domain
07:20 tempire I'll take care of it as soon as I have the splash page
07:20 tempire tomorrow est
07:20 tempire er, tomorrow mst
07:30 marcus o^O
07:43 tempire Unless marcus has more direct access.
07:52 marcus tempire: afraid we will have to wait for ssm. I do want oslo.pm to take over ownership of the domain tho.
07:53 marcus unless someone in the core is willing to start a mojo non-profit.
07:56 tempire why would that be necessary?
07:56 tempire It doesn't matter. oslo.pm is stable, they're the ones to handle it.
07:57 d4rkie joined #mojo
07:57 marcus tempire: well, I don't see it being a personal reliability/cost of a core member as being better than under oslo.pm which is a registered non-profit..
07:58 marcus :)
07:58 tempire Ok. I thought you meant for some legal matter.
07:58 marcus tempire: nah, I think having a mojo non-profit is a bit overkill at this point.
07:59 Vandal joined #mojo
08:01 tempire ssm is StartSiden, right?
08:08 eseyman joined #mojo
08:10 marcus tempire: No, I think he's working for linpro
08:11 marcus tempire: ttps://github.com/ssm
08:11 tempire Ah, ok.
08:12 tempire We bonded over cats.
08:12 tempire https://twitter.com/bjoernfan/status/471044508214628352
08:14 marcus cat bondage
08:27 crab meow
08:36 trone joined #mojo
08:42 AndrewIsh joined #mojo
08:50 odc joined #mojo
08:58 irq joined #mojo
09:19 inokenty joined #mojo
09:20 cpan_mojo Mojolicious-Plugin-RelativeUrlFor 0.051 by Mirko Westermeier - http://metacpan.org/release/MEMOWE/Mojolicious-Plugin-RelativeUrlFor-0.051
09:22 ssm tempire: Redpill Linpro (previously Linpro, which was bought by Redpill)
09:22 * ssm would like oslo.pm to take over the domain :)
09:31 irq joined #mojo
09:37 marcus ssm: I've started that discussion with Salve. Meanwhile, can we get the update to the pointer that tempire needs?
09:44 ssm Of course.  What is the update to the pointer that tempire needs?
09:45 cpan_mojo Contenticious 0.35 by Mirko Westermeier - http://metacpan.org/release/MEMOWE/Contenticious-0.35 (depends on Mojolicious::Plugin::RelativeUrlFor)
09:45 ssm marcus: ^^^
09:46 tempire ssm: You can point it to a cname/alias of mojoconf.mojocasts.com; I'll point that to the mojoconf2014 website until I have the new splash page sometime tomorrow.
09:46 jontaylor joined #mojo
09:47 ssm I can add a CNAME for "www.mojoconf.org", but I can not add a CNAME record for the domain itself.  I need an IP address there. (got ipv6?)
09:48 tempire Let's just do it tomorrow, then (this evening for you)
09:48 ssm www.mojoconf.org. 3600 IN CNAME mojoconf.mojocasts.com.
09:48 ssm updated
09:49 ssm I'll try using a http redirector for the domain itself, if that is enough.
09:49 nicomen tempire: I think you might need to let /mojoconf2014 redirect back to the original server too
09:49 sh4 joined #mojo
09:50 nicomen sorry /mojo2014
09:50 * ssm likes having a domain for each year
09:50 tempire ssm: just put it back for the moment, then.
09:50 ssm 2014.mojoconf.org
09:50 ssm http://2015.mojoconf.org/ -- and then a redirector / archive website on http://mojoconf.org
09:52 ssm that means the website for each year is kept as is, and people going to http://www.mojoconf.org/ and http://mojoconf.org/ are redirected to the current one.  No need to change URLs too, old URLs stay published forever
09:52 marcus forever is a rather long time.
09:52 ssm forever is until someone turns the power off :D
09:52 tempire mojoconf.org/2014 is prettier
09:53 tempire And conducive towards password storage and ssl
09:53 marcus Maybe we should stuff cloudflare in front of mojoconf.org ?
09:53 tempire why?
09:54 marcus they can handle dns and give you ssl for free
09:54 ssm and the same people making and hosting the website for each year.
09:54 marcus they also support pseudo-cnames
09:55 ssm and have a decent reputation…
10:04 d4rkie joined #mojo
10:13 franzkafka joined #mojo
11:04 sh4|2 joined #mojo
11:51 arthas joined #mojo
12:02 tempire I wonder if this really makes a difference: http://qntra.net/2015/02/the-superfish-funder-list/
12:03 d4rkie joined #mojo
12:30 riche tempire: imo it's no use shaming those funding a project.  bottom line is it was lenovo's lack of ethics that got it out to customers.
12:32 marcus I did an outline for a mojoconf talk btw.
12:33 marcus https://gist.github.com/marcusramberg/c50c5cbe58e80f051255
12:33 riche marcus: that's awesome.  it's exactly what we need right now ... other talks can come, but highlighting core dev talks early will boost early tix purchases
12:42 denny is there a simple way to format a number in a .ep template to always have 1 decimal place?
12:42 ssm riche: Lenovo (most likely) accepted a payment per install to include the SuperFish VisualSearch in the base Windows installation.  It looks like SuperFish hired Komodia to implement this with Komodia's MITM proxy to intercept HTTPS traffic so it could inspect and edit web pages to add ads. The Komodia SSL CA is the same for each install, also across other pieces of software, which is where the vulnerability
12:42 ssm is.
12:42 ssm riche: https://blog.filippo.io/komodia-superfish-ssl-validation-is-broken/ has a nice technical summary
12:44 riche ssm: I understand where you're coming from, but in the end it's still lenovo's problem. from basic due diligence to ethics, lenovo failed across the board
12:45 marcus I agree with Riche, if Lenovo didn't know, they were negligent, and still responsible.
12:46 ssm It is _also_ Lenovo's responsibility.  They installed adware on their customer's systems, which turned out to introduce massive security holes.
12:48 ssm Lenovo is only one of many who has used the Komodia MITM proxy, so it is not only Lenovo who has failed their customers.  Komodia is also used by several "I want to keep my children safe" filters people buy.
12:49 riche denny: I think you need to explain more because to me it can be done with printf
12:52 sjn ssm: didn't someone also just publish Komodia's private key+password for their MITM certs?
12:53 Grinnz one wonders if the security problem was just never brought up, or if management knew and ignored it
12:58 ssm sjn: true, but it also turned out that wasn't needed, since the Komodia proxy will re-sign anything, even bad certs.
12:58 ssm sjn: I made a timeline: http://fnord.no/posts/2015-02/superfish/
12:59 sjn whoa
12:59 sjn bloody hell, what a mess
12:59 Grinnz doesnt work for me
12:59 Grinnz oh there it goes
13:01 marcus oh my, php remote execution exploit. (CVE-2014-3670)
13:01 ssm . o O { it already says "PHP", there is no need to add "CVE" }
13:02 Grinnz :)
13:02 marcus PHP before 5.4.34, 5.5.x before 5.5.18, and 5.6.x before 5.6.2  <- probably a lot of the live php versions out there.
13:03 marcus redhat just shipped updated packages for rh6 and rh7.
13:06 ssm marcus: thanks for the heads up. Time to figure out how many servers need updating.
13:07 * Grinnz fortunately doesn't run any php on personal machines
13:08 bobkare ah, looks like it was fixed in debian in october so we should already be patched
13:10 riche sri's mocking of my 5.14 indirectly finds cygwin64 bug: https://cygwin.com/ml/cygwin/2015-02/msg00707.html
13:11 Grinnz \o/
13:12 Grinnz cygwin is redhat-maintained?
13:13 riche Grinnz: it used to be more direct
13:13 riche cygwin was by cygnus sol which became redhat like circa 1997
13:13 riche something like that
13:13 purl something like that is totally possible
13:14 riche but now it's more community maintained, but corinna is hired by redhat and I think is wholly dedicated resource to cygwin
13:15 Grinnz i see
13:27 neilhwatson joined #mojo
13:37 muraiki_ joined #mojo
13:40 amon joined #mojo
13:42 zivester joined #mojo
14:02 d4rkie joined #mojo
14:09 d4rkie joined #mojo
14:16 marmez left #mojo
14:21 d4rkie joined #mojo
14:21 d4rkie joined #mojo
14:23 Anon021 joined #mojo
14:31 gryphon joined #mojo
14:34 davido__ joined #mojo
14:36 csson joined #mojo
14:58 marty joined #mojo
15:00 asarch joined #mojo
15:01 zivester joined #mojo
15:08 bwf left #mojo
15:09 bwf joined #mojo
15:09 irq joined #mojo
15:12 d4rkie joined #mojo
15:12 d4rkie joined #mojo
15:37 * sri is not sure what to talk about at mojoconf
15:39 genio All the reasons that genio is awesome!  It might be too long of a talk, though.
15:39 romel hi guys. i have a Minion related question. how do i activate the enqueued task which is in 'inactive' state? maybe i am doing something wrong but tasks added with enqueue() are still in minion_jobs table with 'inactive' state and without worker assigned
15:39 sri could do "what's new in 6.0", like last year, or "more than you ever wanted to know about mojolicious internals", or something completely different like "how http/2 works"
15:40 genio I think how http/2 works and your ideas for future implementation in Mojo would be a good talk.
15:40 jberger romel: do you have a worker present?
15:40 jberger sri: I'd like to hear the internals talk
15:40 romel yes, i have started script/myapp minion worker
15:40 cfedde I need one like. "Why does our web team want to intermediate with node.js?
15:40 jberger tbh, I would be happy to go over those with you even if you don't give it as a talk
15:41 jberger master class or some such
15:41 jberger because clearly javascript, which was designed in 3 weeks, is the best language and it should do everything
15:44 sri gotta love how basically the entire language has changed again now with ES6
15:45 genio I'm not sure I get the point of some things....    function foo( ...bar){}  when 'argument' already exists, etc.
15:45 riche sri: I think it's virtually expected that you give that talk ;)
15:45 cpan_mojo Mojolicious-Plugin-Crypto 0.14 by Marco Romano - http://metacpan.org/release/NEMUX/Mojolicious-Plugin-Crypto-0.14
15:47 sri https://robots.thoughtbot.com/replace-coffeescript-with-es6
15:48 sri and that doesn't even cover let and generators
15:48 romel is there any obvious things i have to check to find out why enqueued tasks are not being performed?
15:49 sri you never enqueue tasks for starters
15:49 sri those are jobs, which perform a task
15:51 romel dear sri, i'm sorry but i didn't catch that :(
15:54 Grinnz_ "dear sri", what are you writing a letter? :P
15:55 romel nope. my english sucks and i'm trying to be kind
15:58 jberger romel: dear is rather formal and usually used in written letters, but in concept it's not wrong
15:58 jberger fwiw your english is quite good
15:58 Grinnz_ +1
15:58 purl 1
15:59 romel thanks!
15:59 jberger I can basically guarantee that your english is better than my (romel's first language)
16:00 jberger I speak a bit of french, but its been a decade since I've used it
16:00 jberger (oh gods, more than that)
16:00 cfedde time flies
16:00 Grinnz_ romel: anyway from what i understand (i haven't used minion) "tasks" are a routine to run, and "jobs" are running an instance of that routine
16:00 Grinnz_ so you enqueue a job, which performs a task
16:01 romel oh, i see. the 'starters' thing confused me
16:01 Grinnz_ romel: ah. "for starters" is an expression
16:01 cfedde nouns and verbs and noun.verbs and verb.nouns and ambiguity of spoken language mapping to the concrete implemenetation of a software abstraction.
16:02 Grinnz_ "first of all", "to start with"
16:02 romel got it :) thanks for explanation
16:09 d4rkie joined #mojo
16:11 Dandre hello,
16:11 Dandre please see http://pastebin.fr/38755
16:19 romel lol got it working by restarting minion worker. so do i have to restart it every time i made changes to appropriate subroutines?
16:20 romel seems it doesn't reload on it's own
16:22 jberger romel: yes, you will have to restart it
16:39 kwa joined #mojo
16:49 sri wonder if we should get rid of $c->param(['foo', 'bar']) in 6.0
16:50 jberger I've never used it
16:50 sri now with every_param there is little use for it anymore
16:50 sri used to be our protection mechanism from list context
16:50 jberger right, yeah, I think that's a good candidate for removal
16:53 sri anyone remember what we decided the 6.0 code name would be? :)
16:54 sri ah
16:54 sri Clinking Beer Mugs
16:54 romel sounds cool :)
17:03 bjoernfan tempire: I'll have a look at the photos from last year and I'll post them somewhere you can reach them. :)
17:04 jberger bjoernfan: o/
17:06 bjoernfan yo dude
17:06 bjoernfan Time to do my responsibility as a citizen and go to IKEA
17:07 jberger haha
17:09 good_news_everyon joined #mojo
17:09 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/AKDl
17:09 good_news_everyon mojo/master 5ec1a93 Sebastian Riedel: the next release will be 6.0
17:09 good_news_everyon left #mojo
17:09 sri \o/
17:11 bjoernfan Still bumping versions huh? Have I missed anything the last year? ;)
17:11 mikegrb \o/
17:11 sri there is one other thing... my @names = $c->param; do we have a problem with that one?
17:11 mikegrb bjoernfan: not much, only noticible thing is mojo now depends on catalyst
17:11 * mikegrb runs
17:12 sri there is no wantarray, but that method expects list context when called without args
17:12 sri and i'm not sure if we have a problem with mixing scalar and list context without wantarray
17:13 sri my $foo = $c->param('foo') vs my @names = $c->param;
17:15 sri i'm not proposing the removal
17:15 sri just wondering if maybe it should return an array ref
17:16 jberger mikegrb++
17:17 jberger sri: hmmmm, I see why you are thinking like that
17:18 jberger my first reaction is to leave it
17:18 ua_ joined #mojo
17:18 mst I tend towards '$c->param_names' which can always return an array
17:18 mst and $c->param with no arg does it, but eventually gets discouraged
17:18 mst in the name of 'eww'
17:18 jberger if ($c->param) { # do something with params }
17:18 jberger then again, as mst says, it can have a different name
17:18 mst having a subroutine be effectively
17:19 mst if (@_) { $hash{$_[0]} } else { keys %hash }
17:19 mst feels *really* weird to me
17:19 jberger does seem asymmetric
17:20 ua_ left #mojo
17:20 cfedde magical is always confusing unles the magic is right.
17:26 jberger sri: just another thought
17:27 jberger now that the poll reactor is closing in on EV performance for small deployments, should it be the default even if EV is installed?
17:27 jberger the reasoning would be that as we are getting more reactors available on CPAN perhaps EV shouldn't be preferred
17:27 jberger any thoughts?
17:29 sri jberger: that would be bad for interop with other event loops
17:29 jnbek i think there's too much thinking going on right now
17:29 jnbek making my brain hurt
17:29 jnbek ;-)
17:29 jberger sri: that's a fair point
17:29 jberger just throwing out ideas
17:33 tianon joined #mojo
17:37 sri jberger: cpan reactors are supposed to change the default http://mojolicio.us/perldoc/Mojo/Reactor#SYNOPSIS
17:37 sri $ENV{MOJO_REACTOR} ||= 'Mojo::Reactor::MyEventLoop';
17:37 sri always were
17:37 jberger and then explicitly use it in the app
17:38 jberger makes sense
17:41 irq joined #mojo
17:41 good_news_everyon joined #mojo
17:41 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/A6fL
17:41 good_news_everyon mojo/master 2a758b2 Sebastian Riedel: remove multi-name support from a few methods
17:41 good_news_everyon left #mojo
17:44 good_news_everyon joined #mojo
17:44 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/A6J3
17:44 good_news_everyon mojo/master a62e5df Sebastian Riedel: replace multi-name examples
17:44 good_news_everyon left #mojo
17:44 sri re my @names = ...
17:44 sri there are 3 cases
17:45 rofl_ left #mojo
17:45 sri Mojolicious::Controller, Mojo::Parameters and Mojolicious::Validator::Validation
17:46 sri Mojo::Parameter and Mojolicious::Validator::Validation could theoretically even use the nicer ->names
17:46 sri they all have an every_param method though
17:47 sri Mojo::Message::Request is a bit special... is proxies ->param and ->every_param to ->params->param and ->params->every_param
17:48 sri (so that's a theoretical 4th case)
17:49 sri which reminds me... we still have the kinda funny $c->req->params->params
17:50 punter joined #mojo
17:54 Grinnz_ sri: so i should set that default in my reactor classes?
17:55 Grinnz_ then the app would use Mojo::Reactor::X; use Mojo::IOLoop; or something like that?
18:03 sri now that i think about it, there's a problem
18:03 sri it doesn't work well with morbo and hypnotoad, since they load Mojo::IOLoop before loading the app
18:07 d4rkie joined #mojo
18:07 Grinnz_ hmm
18:10 good_news_everyon joined #mojo
18:10 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/A6nU
18:10 good_news_everyon mojo/master fb4a91f Sebastian Riedel: the MOJO_REACTOR environment variable has to be used manually
18:10 good_news_everyon left #mojo
18:11 sri i mean, it doesn't hurt, but won't always work for the singleton either
18:11 Grinnz_ right
18:11 Grinnz_ the only other option for that would be if there was some way to switch the singleton's reactor... which sounds like a terrible idea
18:12 sri Mojo::IOLoop->singleton->reactor(MyReactor->new)
18:12 Grinnz_ i suppose
18:13 odin22 joined #mojo
18:13 Grinnz_ dont think it helps much for an app though, the event loop will already be running on startup wont it
18:13 sri jberger, marcus, batman, tempire, crab: think about the my @names = $c->param thing
18:14 sri proposal so far is my @names = $c->param_names
18:14 sri (which i don't find particularly elegant)
18:15 Grinnz_ its descriptive
18:15 sri two of the four cases could also use ->names
18:15 sri $params->names and $validation->names
18:16 sri $c->param_names and $c->req->param_names would be the other two
18:16 sri with $c->req->param_names being kinda optional
18:16 sri (consistency question)
18:17 * tempire is going to do a talk explaining why functional programming is important, from a theoretical perspective
18:17 tempire sri: definitely an internals talk
18:17 mst sri: I quite like that, BUT admit that I did better at clarity than elegance; I was kinda hoping somebody would suggest a more elegant option that was just as clear :)
18:17 Grinnz_ with a params or validation object "names" isnt ambiguous, for a request or especially controller it is
18:17 tempire particularly if you can break it up into easily digestible settings
18:25 maze joined #mojo
18:27 dod joined #mojo
18:27 riche tempire: it would be good to have mojolicious/minion specific talks :)
18:28 Grinnz_ $ MOJO_REACTOR=Mojo::Reactor::POE POE_EVENT_LOOP=POE::Loop::IO_Poll hypnotoad script/myapp
18:28 Grinnz_ added to my Mojo::Reactor::POE synopsis... POE event loop detection is fun :P
18:30 jberger riche: I'm thinking about doing some kind of talk relating to the command-line functionality and planning your app for command line use
18:30 riche jberger: that's great!
18:31 jberger I rarely actually fire up my app anymore during development of this REST api I am working on
18:32 riche I always see questions/confusion on deployment, reverse proxy, hypnotoad, plack, etc.  The documentation is OK, but a case study i am certain would hit the mark
18:33 jberger riche: is that what you are working on as a talk?
18:33 riche nope
18:33 jberger just fishing?
18:33 riche I am less important here :)
18:33 jberger riche: I expect a talk from you!
18:34 riche lol ... well, if it gets accepted, ok
18:34 riche I don't assume anything
18:35 riche I would like to do something on modernization ... but have no specifics yet.  I would **love** having every core member have a talk synopsis by end of week
18:36 riche but ... trickling in is okay, will give ka yi more opportunity for keeping the twitter blood sugar level up
18:37 tempire Even if they all come in at once, twitter should still trickle
18:37 ua_ joined #mojo
18:39 punter joined #mojo
18:43 riche Agreed ...
18:43 riche I don't know what marcus just tweeted -- all I understand is Cthulhu so it piqued by interest
18:44 jberger good job twitter/bing
18:44 jberger Translated from German by Bing: Hastur gonna ph 'nglui mglw' nafh Cthulhu R 'r'lyeh wgah' nagl fhtagn.
18:44 * jberger ironic golf clap
18:45 Grinnz_ lol
18:46 riche jberger: maybe I'm just being dense because I've had to deal with jython all day but I still don't get it
18:47 jberger I have no idea either, but twitter and bing proudly translated it from German for me, resulting in the same text
18:47 d4rkie joined #mojo
18:47 riche o i c
18:47 riche duh got the "joke" now
18:48 cpan_mojo Mojo-Reactor-POE 0.006 by DBOOK - http://metacpan.org/release/DBOOK/Mojo-Reactor-POE-0.006
18:55 cpan_mojo Mojo-Reactor-IOAsync 0.003 by DBOOK - http://metacpan.org/release/DBOOK/Mojo-Reactor-IOAsync-0.003
18:57 tempire riche: It would help us all if you put together something that let us all know what you've got in mind in terms of schedule, look, feel, etc. Last year was a bit of a black box to the non-Norway people until we got there.
18:58 riche jberger: see "An example" -- http://www.yog-sothoth.com/wiki/index.php/R'lyehian  ...  Hasturs is another reference, but the 'gonna' throws me off
18:58 sri if i talk about mojolicious internals then someone else would have to cover minion and mojo-pg
18:58 riche tempire: yah ka yi is planning
18:58 tempire traveling, etc
18:58 tempire k
18:58 sri a 6.0 talk from me would cover minion and mojo-pg too
18:58 riche she will have it much more in order by end of week
18:59 riche merchandising and such isn't even worked out yet. but she's trying to get it all planned first
18:59 riche not 100% you know
18:59 riche but at least structured
19:00 sri i would really like to see more model centric talks
19:00 sri we are pretty weak in that regard
19:01 cpan_mojo Mojo-Reactor-Epoll 0.002 by DBOOK - http://metacpan.org/release/DBOOK/Mojo-Reactor-Epoll-0.002
19:01 sri perhaps our big weakness
19:01 jberger except dbic is an easy way for us to shrug it off
19:02 berov joined #mojo
19:02 trone joined #mojo
19:13 sri starting to wonder if we actually need my @names = $c->param
19:13 sri we have lists of names on the lower layers
19:13 sri it's just a correlated list
19:13 Grinnz_ you mean just the controller method?
19:14 Grinnz_ the controller one doesnt make a lot of sense to me to begin with
19:14 sri just the controller method without arguments
19:14 Grinnz_ right
19:14 Grinnz_ i would always use $c->req->param
19:16 sri personally, i've never actually used it
19:16 sri it was part of the original cargo culted ->param design from CGI.pm
19:18 Grinnz_ i also have a similar confusion with it as with $c->every_param
19:18 sri ?
19:18 Grinnz_ i.e. if i have both GET/POST parameters and route placeholders, does it return both? jus tone?
19:18 jberger yeah, I'm ok with nixing the behavior on the controller level
19:18 Grinnz_ just one*
19:19 Grinnz_ and if it returns both, is that useful anyway?
19:19 Grinnz_ (plus file uploads are in there too)
19:34 sri so my @names = $params->names or my $names = $params->names?
19:34 disputin joined #mojo
19:35 jberger I don't mind it being an array, but it does seem asymmetric to every_param then
19:35 sri true
19:36 sri i tend to use lists for functions and refs for methods
19:36 sri (these days)
19:36 jberger the only advantage I can see is: if ($params->names) { # there are params } else { # there aren't }
19:37 sri which is kinda meh with postderef
19:37 jberger exactly
19:37 sri if ($params->names->@*) {
19:37 jberger once that is non experimental I'm going to use that EVERYWHERE
19:38 jberger and returning arrayrefs will basically always happen in my code
19:38 * Grinnz_ probably wont
19:38 jberger (we don't need no stinking copies!)
19:38 jberger Grinnz_ is no fun anymore
19:38 Grinnz_ :P
19:38 Grinnz_ i just think it looks dumb
19:38 sri here's a task for everyone... find public methods in mojolicious that have a scalar *and* list context depending on args
19:38 Grinnz_ the asterisk
19:38 purl it has been said that the asterisk is a quantifier because it says how many times, see? or a potent symbol of pucker power or a software pbx or at http://www.asterisk.org/ or "If you want my business to rely on a self-supported IP PBX instead of going with a commercial vendor, well, it's my *." or "Nathan Hale" or a bad sign
19:39 sri Grinnz_: postderef is pretty much guaranteed to go stable
19:40 Grinnz_ postderef is great, @* is not
19:40 * tempire uses postderef everywhere unless it's @$thing
19:41 tempire or I'm not using arrayrefs, of course
19:49 jberger Grinnz_: you get that the * has to be there to disambiguate from slices right?
19:49 jberger tempire didn't much like them for the same reason until he saw that (IIRC)
19:52 tempire The * makes sense once you accept that it means "all" and not "glob"
19:53 tempire And unix came before perl, so I'm good with it.
19:53 tempire Actually, I guess * means every, not all.
19:53 * tempire really likes his 6+
19:53 genio I'm not sure I get how postderef makes it easier to read.  @{$thing} is as simple as $thing->@* to me
19:53 good_news_everyon joined #mojo
19:53 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/Aiml
19:53 good_news_everyon mojo/master 61f1e70 Sebastian Riedel: consistent scalar and list context
19:53 good_news_everyon left #mojo
19:53 tempire It's not about @$thing
19:54 tempire It's about $thing->{that}->{thing}->@*
19:54 tempire Better than @{$thing->{that}->{thing}}
19:54 genio great, now I'm going to be singing that song in my head
19:56 genio https://www.youtube.com/watch?v=csI_zJl7EpA#t=105
19:57 tempire Lauryn Hill supports postderefs
19:57 tempire And in 1998. She was ahead of her time.
19:57 franzkafka joined #mojo
19:57 genio indeed.
19:59 jberger It's not about @$thing
20:00 genio Maybe I've just been looking at references the "old" way so long that it doesn't seem any clearer to me.
20:00 jberger its about $thing->{that}->{thing}->@{1..2}
20:00 jberger Better than @{$thing->{that}->{thing}}{1..2}
20:00 jberger (I THINK I did the second one correctly? who is sure?)
20:01 Grinnz_ for slices its fine
20:01 jberger well once you get that, then * just come along for the ride
20:01 Grinnz_ no, still looks dumb :P
20:02 jberger looks like you then :-P
20:02 good_news_everyon joined #mojo
20:02 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/AiGf
20:02 good_news_everyon mojo/master adb21cd Sebastian Riedel: split up name listing into passed and failed methods for validated parameters
20:02 good_news_everyon left #mojo
20:02 jberger (hehehehe)
20:02 jberger </childish taunting>
20:03 sri ->failed and ->passed seemed appropriate
20:03 jberger I really need to start using the validation stuff
20:04 jberger I don't usually have the use-case for it
20:10 marmez joined #mojo
20:12 sri nobody bothered by $c->req->params->params?
20:13 sri i could see $c->req->params->pairs work
20:14 mst $c->req->paramception
20:14 sri yo dawg
20:14 Grinnz_ $c->req->duran->duran
20:14 mst sri: "Yo dawg ..." -- Benoit Mandelbrot
20:17 jberger mst: hahahhaa
20:18 jberger that maybe the best math joke I've heard in quite a while
20:20 reneeb joined #mojo
20:24 good_news_everyon joined #mojo
20:24 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/AiRF
20:24 good_news_everyon mojo/master 4d592b7 Sebastian Riedel: renamed params method in Mojo::Parameters to pairs
20:24 good_news_everyon left #mojo
20:25 sri it's also a good reminder not to put an odd number of elements in there
20:25 sri ok, that was my 6.0 todo list
20:26 sri tempire, jberger, marcus, batman, crab: if you have something on yours, now is the time
20:26 sri i expect the release to happen towards the end of the week
20:26 sri gotta write a blog post...
20:27 sri "we reached 6.0 first!"
20:29 oliver joined #mojo
20:29 sri OH RIGHT
20:29 sri the elephant in the room
20:29 purl the elephant in the room is probably that maint-5.10 is *already* de-facto abandonware
20:29 Grinnz_ lol
20:29 * sri pats purl
20:29 * purl pats sri back, harder
20:30 sri format detection on or off by default
20:30 Grinnz_ sri: 6.0 before what?
20:30 sri Grinnz_: i know you care about that one
20:30 Grinnz_ yes, off +1
20:31 sri just turning it off seems a bit short sighted
20:31 Grinnz_ that reminds me, i need to actually turn it off in my app
20:31 sri if we do that we might as well clean up the design
20:31 sri perhaps require a :format placeholder
20:32 sri not special casing it at all
20:32 sri only tiny problem there is the dot
20:32 Grinnz_ i wouldn't use it (JSON or bust!) so no opinion there
20:32 sri how do you capture "html" while still making .:format optional
20:33 jberger sorry, I'm big -1 on that
20:34 sri 1) disabling, or 2) redesign?
20:34 jberger disabling
20:34 purl i think disabling is enoug
20:34 Grinnz_ E_NOUG?
20:34 jberger its a huge selling point for people
20:34 sri interesting
20:34 Grinnz_ is it?
20:34 purl it's it!
20:35 jberger that is when their eyes go wide when I give my talk
20:35 sri that's news to me too
20:35 Grinnz_ websites that actually use formats in URLs are few and far between, the only use in a modern website is to retrieve API data in xml or json
20:35 Grinnz_ and all APIs are just going json now
20:35 jberger you can always find the couple people in the audience who have actually implemented a restful service, they about lose it
20:36 sri Grinnz_: ok, that;s bullshit
20:36 Grinnz_ which?
20:36 purl which is certainly not ideal
20:36 sri that there's no .html anymore
20:36 Grinnz_ in a website made with a framework?
20:36 sri a REST API can have a html representation too
20:36 Grinnz_ never seen one
20:36 jberger Grinnz_: hello there, glad to meet you
20:37 Grinnz_ you're a rest api?
20:37 jberger my apps all do that
20:37 jberger I guess if sri can be a robot, I could be a rest api
20:38 sri PATCH /jberger?cookie=1
20:38 jberger thanks sri
20:38 jberger sri botsnack (if you can get it before purl)
20:38 purl :)
20:38 Grinnz_ the syntax works like ('/' => [format => 0] => sub {}) if theres a callback right?
20:39 jberger yes
20:39 jberger but can't you just do app->defaults(format => 0)
20:39 Grinnz_ that would be nice as well
20:39 jberger there was another way IIRC
20:39 gryphon joined #mojo
20:40 jberger maybe not
20:40 jberger oh, under
20:41 jberger my $r = $app->routes->under([format => 0]);
20:41 jberger http://mojolicio.us/perldoc/Mojolicious/Guides/Routing#Formats
20:41 Grinnz_ right, i put it on the global under i already had
20:41 Grinnz_ you don't need a '/' for that?
20:42 jberger lifted straight from the doc
20:42 Grinnz_ parameter parsing too stronk
20:42 sri marcus, batman, tempire, crab: we need more opinions on this
20:43 jberger sri: unless you actually call for a vote, I submit that there needs to be a stonger voice for change than to staying pat
20:43 jberger I really would hate to see such a strong feature disabled by default
20:44 sri i consider myself neutral on this, so your vote counts atm
20:44 Grinnz_ if it is actually a strong feature i have no objection to leaving it, i assumed it wasn't relevant and was just a surprise
20:44 sri bringing it up because the topic keeps coming up every few months
20:44 Grinnz_ it's still a surprise and might be nice to be able to set globally
20:45 sri i regularly see people do "/foo/:bar" and "IT'S EATING MY FILE EXTENSION!!!1"
20:45 Grinnz_ right, thats the surprise part :P
20:46 jberger that's because they are using the wrong placeholder
20:46 jberger its right in the doc
20:46 sri yea
20:46 Grinnz_ yes, but without knowing about this feature, it should just not match
20:46 Grinnz_ (would be the assumption)
20:47 jberger http://mojolicio.us/perldoc/Mojolicious/Guides/Routing#Relaxed-placeholders
20:47 jberger I think perhaps adding a note there to say "this is especially useful when you want to match with an explicit file extention rather than relying on L<format detection>"
20:48 Grinnz_ maybe make it a FAQ entry
20:48 sri "Where did my file extension go?"
20:49 mst =item * Did you check behind the sofa?
20:50 Grinnz_ "To a happy place in the sky"
20:50 jberger HAHAHAH
20:51 jberger I love it
20:51 jberger and actually yes, a FAQ entry is probably advisable
20:52 Grinnz_ for me the FAQ is one of the only things i read thoroughly, i would definitely have known about it there (especially phrased as a question like that)
20:52 jberger does turning the format detection off change the behavior of :placeholder
20:52 jberger I don't think it does
20:52 riche yah but when writing routes too fast I have been hit by that more than once.
20:53 Grinnz_ jberger: no it would just make it not match something with an extension
20:53 Grinnz_ so i guess it depends what you consider "the behavior of :placeholder"
20:53 Grinnz_ heh
20:54 jberger the behavior is : doesn't match .
20:54 jberger # and * do
20:54 Grinnz_ yeah but with format detection on, that route can still match
20:54 Grinnz_ which could be considered different behavior
20:54 marmez joined #mojo
20:54 Grinnz_ just the section matched and assigned to the placeholder doesnt change
20:55 berov hey! can somebody tell me how Mojo finds the static path to /mojo/jquery.js when used via my applicatiation. I did not added it to app->static->paths
20:55 tempire What are we talking about? Removing format detection?
20:55 berov and I grepped in the code but could not find
20:55 Grinnz_ berov: static paths default to public/
20:55 berov I know :)
20:56 tempire YES TO FORMAT DETECTION
20:56 berov but my app has another public
20:56 Grinnz_ berov: then if its not in public/ it must be set somewhere
20:56 jberger berov: ./myapp.pl eval -V 'app->static->paths'
20:57 berov [
20:57 berov "/home/berov/opt/public_dev/Ado/public",
20:57 berov "/home/berov/opt/public_dev/Mojolicious-Plugin-SemanticUI/lib/Mojolicious/public"
20:57 Grinnz_ maybe jquery.js is coming from that other public?
20:57 berov and then I can use /mojo/jquery.js
20:57 berov how does it happen
20:57 berov ?
20:58 berov the only place
20:58 purl i guess the only place is London when they have a need for Perl coders, so I'm told, is in sysadmin/support.
20:58 berov is here https://github.com/kraih/mojo/blob/master/lib/Mojolicious.pm#L149
20:58 berov where static paths are set
20:59 berov or this is what I could find
21:00 berov purl: I do not care ;)
21:00 purl berov: huh?
21:00 Grinnz_ https://metacpan.org/pod/Mojolicious::Guides::FAQ#What-does-Worker-31842-has-no-heartbeat-restarting-mean this should link to heartbeat_timeout, not heartbeat_interval :)
21:00 ua_ joined #mojo
21:02 jberger berov: ./myapp.pl eval -v 'app->static->file("/mojo/jquery.js")->path'
21:03 jberger or are you saying you want to remove the default path?
21:03 jberger its kinda hard to know what you are asking
21:03 berov jberger: no
21:03 berov berov@u165:~/opt/public_dev/Ado$ bin/ado eval  -v 'app->static->file("/mojo/jquery.js")->path'
21:03 berov Can't call method "path" on an undefined value at (eval 320) line 1, <DATA> line 718.
21:04 berov ha I have a feeling
21:04 berov is it possible that morbo does it?
21:04 berov because I run my app with morbo?
21:05 jberger berov: so it doesn't serve the path /mojo/jquery.js then correct?
21:05 jberger why would morbo do anything
21:05 berov when i run my app with morbo and I go to /perldoc
21:06 jberger mojolicious comes with an internal-use-only bundled jquery
21:06 jberger mostly for the development 404 and 500 pages
21:06 jberger its not there, these aren't the jqueries you are looking for
21:07 berov let me explain...
21:07 berov I lload the PODRenedere plugin
21:07 berov and theere in the template there is <script src="/mojo/jquery/jquery.js"></script>
21:08 berov and I use it too in my templates and it just works.
21:08 berov how?
21:08 berov I want to find the place where it is done to understand and reuse the majic
21:09 berov the thing is the bundled jquery can be used while running my app
21:13 berov starting with morbo it has the same two paths only :( but jquery is loaded in the /perldoc page
21:17 berov jberger: :) can you explain this? http://paste.ubuntu.com/10377830/
21:18 jberger well first of all, that is a composite of the wrong things :-)
21:18 berov how the last line in the output gets resolved
21:18 berov like which wrong things?
21:18 jberger where did the [ ] output ... nevermind
21:19 jberger if I wanted to figure it out again, I would have to grep/ack aroung
21:19 berov ah I putted a warn in my startup method
21:19 jberger around
21:20 berov I searched for static->paths but may be should go to Static.pm
21:20 Grinnz_ app->static is a Static.pm
21:21 punter joined #mojo
21:21 berov EURICA! :)
21:21 berov # Bundled files
21:21 berov my $HOME   = Mojo::Home->new;
21:21 berov my $PUBLIC = $HOME->parse($HOME->mojo_lib_dir)->rel_dir('Mojolicious/public');
21:22 berov jberger: thanks for the patience :)
21:22 jberger np, I just really didn't have the answer at the tip of my tongue and I'm still $work-ing
21:23 berov ah,sorry
21:26 mst berov: EUREKA # FTFY
21:26 jberger E-MURICA
21:26 Grinnz_ eurica is like some europe-america conglomerate
21:28 berov mst: http://bg.urbandictionary.com/define.php?term=FTFY&amp;defid=7096722 ?
21:28 berov ;)?
21:28 purl ;) is the moe rewrite of catalyst
21:29 mst berov: yes, except not sarcastically - it's normally spelled 'eureka' so far as I know
21:30 berov ah because I used caps?
21:30 mst berov: no, because you said 'EURICA' instead of 'EUREKA'
21:30 berov ahhh, :) mixed Bulgarian with English :)
21:31 Grinnz_ heh
21:31 berov my bad
21:31 mst and most english-as-second-language speakers want that sort of thing pointed out, so I mention it and move on
21:32 mst I don't actually care that much, I much prefer being a grammar nazi to people who speak actual english and therefore I expect to know better
21:32 mst and if there aren't any actual english speakers handy, occasionally americans
21:32 good_news_everyon joined #mojo
21:32 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/AixV
21:32 good_news_everyon mojo/master a3629c3 Sebastian Riedel: fix typo in FAQ answer
21:32 good_news_everyon left #mojo
21:33 * jberger resembles that remark
21:33 berov I do not have ambitions in English :), just to mention and move on
21:35 genio heh.  us poor second-class English speaking americans
21:35 mst en_COLONIAL
21:36 jberger colonial see yorktown
21:36 * pink_mist always thought the spelling was 'heureka'
21:36 sri Grinnz_: you could have fixed that too
21:36 sri now, someone write that FAQ answer for format detection
21:37 sri because i have no clue what it should say
21:37 berov pink_mist: the correct should be in greek :)
21:38 sri εύρηκα
21:39 sri purl: no, eureka is <reply> εύρηκα!
21:39 purl okay, sri.
21:39 Grinnz_ sri: sure, if you want to wait 5 hours until i have time :)
21:39 berov sri: right :)
21:39 sri Grinnz_: i give you 2
21:39 Grinnz_ my boss won't like that
21:39 mst that's why you aren't going to tell him
21:40 Grinnz_ on second thought, i came in early today
21:42 Grinnz_ 16:35:37               <mst> en_COLONIAL
21:42 Grinnz_ en_BOSTON
21:43 Grinnz_ en_TEXAS
21:43 pink_mist en_CHAV
21:43 mst eh, I group together all english dialects that are scared of spelling words that contain the letter 'u'
21:43 mst en_CHAV is usually just scared of spelling
21:45 marcus en_clave
21:45 jberger mst: that was on purpose of course, Webster wanted to split national identity from england, so he intentionally chose lesser spellings in his dictionary
21:46 jberger back then there was no set spelling, but there were common forms
21:46 marcus I quite would like us to keep format detection too btw.
21:46 marcus but maybe we could document it differently.
21:47 Grinnz_ the option was to disable it by default, not remove it :P
21:48 pink_mist jberger: that's the best explanation for that I've heard =) jberger++ ... could you also explain why the US uses middle-endian dates? that still baffles the hell out of me
21:48 jberger pink_mist: that I have no idea about
21:48 Grinnz_ pink_mist: because we say "Feb 20th, 1995"
21:48 Grinnz_ so we write 2/20/1995
21:48 pink_mist you can just as easily say 20th of Feb, 1995
21:48 mst pink_mist++ # MIDDLE ENDIAN DATES
21:48 Grinnz_ pink_mist: but everyone in america would look at you funny
21:49 mst ok, so, the way -we- seem to do this
21:49 mst is people will say e.g. 'March 30th' standalone
21:49 jberger pink_mist: we also don't use the metric system, because MURICA
21:49 mst but if you add a year
21:49 genio We should just all get over ourselves and start writing 1995-02-20 to get rid of any ambiguity
21:49 mst it's '30th March 1983'
21:49 Grinnz_ genio++
21:49 pink_mist mst: 4 days after I was born, that :P
21:49 Grinnz_ i would do this on checks if i wasnt afraid it would get rejected
21:49 genio I do that on checks all the time
21:49 mst pink_mist: congratulations, you're 4 days older than me.
21:49 pink_mist hah, nice :P
21:49 genio I _always_ write my dates that way
21:50 mst back in the stone age when people still used cheques
21:50 genio both of you be quiet.  I'm feeling old
21:50 Grinnz_ mst: tell that to my electric company
21:50 Grinnz_ when i signed up the sheet of paper they gave me said "we're working on online access"
21:50 jberger s/cheques/checks/ # for the former colonists
21:50 Grinnz_ hah, right. their website barely has 10 pages which appear to be static
21:51 mst I limited my choice of electricity companies to those that let me sign up online, complete with screenshots of the automated system I'd be using
21:51 Grinnz_ mst: what is this "choice of electricity companies"
21:51 jberger THROW OFF THE YOLK OF OPPRESSION AND SPELL TYRE WITH AN "I" AS GOD INTENDED
21:51 mst Grinnz_: a thing that happens when you have a free market
21:51 genio mst: you have a choice of electric company?
21:52 Grinnz_ next he'll be saying they have a choice of cable provider
21:52 genio sorry, in my state of completely baffled, I completely missed that Grinnz_ already asked that
21:52 mst I don't think I can even get cable
21:52 mst I do, however, have a wide selection of ISPs, and fiber broadband
21:53 Grinnz_ i mean cable for internet, of course
21:53 Grinnz_ cable for tv, meh
21:53 * genio comes to live near mst
21:53 mst much of .uk isn't actually cabled for cable
21:53 mst whereas fibre to the cabinet is getting steadily more penetration now
21:53 Grinnz_ fios is ok, where its available, otherwise the phone companies idea of broadband doesnt even count as broadband according to the FCC now
21:54 mst I think mine's 30-odd down atm
21:54 Grinnz_ i have 50/25 cable because :populated area:
21:54 Grinnz_ also luckily this area has one of the less sucky cable providers
21:55 genio I get 36/10 and that's damn near the best they can offer.  I only have one option of ISP
21:55 genio for $69 + tax  per month
21:55 Grinnz_ oh, i could get AT&T's crappy ADSL that tries to pretend its competing if i wanted
21:55 sri not enough fibre in germany yet... at least on the west side
21:55 genio yea... that's not an option
21:56 bwf joined #mojo
21:56 genio I'll be in Germany for a few days in May for the first time. \o/
21:56 mst anyway. I'm not focusing worth shit so I'm giving up on today.
21:56 sri after the reunification they invested *ALL THE MONEYS* in the east, and they got all the fibre :/
21:56 Grinnz_ my 50/25 is $55 a month, they also have 105/something but that's like $110 a month
21:56 Grinnz_ lol
21:57 pink_mist I have 500/50 for 990 SEK a month, which comes to about 99£ a month, which comes to about $peanuts :P
21:57 sri well, at least i got 55/11
21:58 berov In the deep province in Bulgaria there is fibre
21:58 sri for like 29€
21:59 pink_mist oh, sorry, it's actually more like £76
21:59 berov north west Bulgaria the poorest place in Europe for less than 10EUR
21:59 genio damn.  every one of y'all have better options than backwards-ass Florida
21:59 berov altough here in Prague it is expensive and shitty
22:00 berov I should have stayed there :D
22:03 Grinnz_ pink_mist: wtf
22:03 berov http://www.netindex.com/download/2,70/Bulgaria/
22:03 Grinnz_ do you own a university pipe?
22:04 pink_mist Grinnz_: it's not even fiber; it's just regular cabel
22:04 Grinnz_ wat
22:07 jberger gods I miss my university pipe
22:07 Grinnz_ yeah that was nice
22:07 Grinnz_ except for the time i connected the wrong port on the router and started giving out DHCP addresses and they shut off my port
22:18 jberger oh like the time I tried to remotely update the ubuntu on a server of ours, and the university IT system detected the backup ssh on a non-standard port and blocked my host DURING A SYSTEM UPGRADE
22:19 Grinnz_ rekt
22:19 jberger nice irony that the backup ssh port is something ubuntu does to help ensure that even if you lose connectivity you can get back in
22:19 Grinnz_ for us they just didnt allow any ports other than 80
22:19 jberger oh, I wasn't just an undergrad student in a dorm
22:19 jberger they probably did that for them
22:20 Grinnz_ yeah, i guess the comp sci dept machines got exceptions heh
22:20 jberger as a physics grad student and a computer savvy one at that, I was given lots of hardware and perms
22:22 Grinnz_ i was going to go to grad school then i realized its just research... couldnt do it
22:22 Grinnz_ (in comp sci)
22:28 franzkafka joined #mojo
22:29 franzkafka What's the best way to grab the contents of a div, including children, etc? I am using all_contents, but it returns a Mojo::Collection object, and from Mojo::Collection documentation I can't figure out a method to just grab the content.
22:30 franzkafka from this <div class="blah"><a href="">adfa</a><b>Hello</b><p>Mojolicious</p></div> I want this <a href="">adfa</a><b>Hello</b><p>Mojolicious</p>
22:30 franzkafka I.e., all content in the div :D
22:32 Grinnz_ franzkafka: it would return a Collection of one <a> dom structure
22:32 Grinnz_ so you could just get the first element of the collection probably
22:32 Grinnz_ oh wait, i read your contents wrong
22:33 Grinnz_ the collection would have one element for each of those tags, <a> <b> and <p>
22:33 Grinnz_ you could just do $collection->join, probably
22:34 Grinnz_ (if you want it as a string only)
22:34 franzkafka Wow, this is probably the worst way to do this, but here's how I am doing it: $dom->at('#description')->all_contents->join("\n")->to_string
22:35 Grinnz_ no thats fine, the to_string would be automatic if you used it in a string context though
22:35 Grinnz_ if you want to do any further DOM stuff on the other hand, you should stick with the initial collection returned by all_contents
22:36 franzkafka ok, cool
22:36 franzkafka for this I just want to grab the contents of this div, tags and everything
22:37 Grinnz_ also
22:37 Grinnz_ $dom->content should work :P
22:38 jberger content is what you are looking for
22:38 jberger content != contents
22:38 jberger sri: there's a possible 6.0 thing
22:38 jberger disambiguate node vs dom operations
22:38 Grinnz_ such as?
22:38 jberger content vs contents
22:39 Grinnz_ those both operate on a node, one returns a string and one returns a collection
22:39 jberger eeeeeh, close
22:41 sri jberger: how?
22:41 jberger I don't know I hadn't gotten that far yet
22:42 sri :)
22:42 jberger there are so many functions where there are pairs of dom vs node operations
22:42 jberger it seems like there should be a solution
22:43 sri ->content can be called on all node types
22:43 * Grinnz_ just discovered the wonders of knockout.js so doesn't need any of this :)
22:44 d4rkie joined #mojo
22:45 sri jberger: not even sure what you mean with node and dom operations
22:45 sri almost all methods work on all node types
22:46 franzkafka Hm, content didn't seem to give me what I want, whereas all_contents->join("\n")->to_string did
22:46 sri franzkafka: that's just because you're using it wrong i suppose
22:46 Grinnz_ well, content isn't going to stick newlines in there, and all_contents is going to include the parent node
22:46 franzkafka Oddly, with content I get some of the child tags, but not all.
22:47 sri if you have to brute-force something in Mojo::DOM, you just don't know how ti use it right yet
22:47 Grinnz_ franzkafka: can you give example input and code?
22:47 franzkafka $dom->at('#description')->content gives me something different than $dom->at('#description')->all_contents->join("\n")->to_string
22:47 franzkafka @Grinnz_, sure. Give me a moment.
22:47 Grinnz_ yes, i just explained why it's different
22:49 sri jberger: perhaps what you really want is better names for ->contents and ->all_contents
22:49 sri i can't even think of alternatives though
22:51 franzkafka http://pastebin.com/wbWqDrhK
22:51 franzkafka There's an example. Line 9's output is different than line 10.
22:52 franzkafka Personally, with the documentation it's pretty easy to understand the difference between content and all_contents though.
22:52 d4rkie joined #mojo
22:55 franzkafka http://pastebin.com/GBHGG5sp
22:55 sri franzkafka: not different for me
22:55 franzkafka There it is with output from run
22:55 franzkafka wtf, really?
22:55 sri what difference do you mean, exactly?
22:56 sri BE SPECIFIC
22:56 franzkafka In the 2nd paste you can see the difference...
22:57 sri allright... i have to go TLDR
22:57 franzkafka ok'
22:57 franzkafka I will do that
22:57 franzkafka Here's output from content: You&#39;ll be challenged by dozens if not hundreds of other mice tTransformice is -literally- free to play. HATS!
22:58 jberger right, because content does not just join the contents with \n
22:58 franzkafka And here's the same area, from all_contents: You&#39;ll be challenged by dozens if not hundreds of other mice to be the best.
22:58 franzkafka <h2 class="bb_tag">The Ethical Free to Play Business Model</h2>
22:58 franzkafka The Ethical Free to Play Business Model
22:58 franzkafka Transformice is -literally- free to play. HATS!
22:58 franzkafka Ahhh, stupid paste
22:58 jberger those are not the same thing
22:58 franzkafka OK, well now I am confused.
22:59 franzkafka if I want all the content between two div tags, not stripped of html, you say "content is what you're looking for." when it seems that content doesn't give me what I am looking for.
23:00 sri time to step back, and make a minimal example
23:00 franzkafka And I accidentally pasted the output from content twice in the 2nd link, it didn't output it twice.
23:00 sri nobody is going to debug a wall of text
23:00 franzkafka heh
23:00 franzkafka don't worry about it, I don't really give a shit since all_contents is working
23:00 sri you may very well have found a bug
23:01 sri perhaps we'll never know
23:01 sri anyway, with that attitude, "i don't really give a shit" either
23:02 franzkafka sri, so far 100% of the time I think I've found a bug, I've really just screwed up and it falls on me. I don't have time right now to spend debugging this and providing you a better example. I provided a real example you can duplicate. If you can't be bothered to read a "wall of text," then I don't really give a shit. Sorry.
23:03 franzkafka What I am doing works. You have a clear example that you can actually run on a public site (steam), and I provided the output I am seeing.
23:12 Grinnz_ all_contents is giving you a whole lot of duplication, but content is returning the correct content for me, not what you pasted
23:12 Grinnz_ i think the problem is there are \r characters sprinkled in this output that's screwing up whatever you're copy pasting from
23:12 Grinnz_ (it screwed up when i directly output to the terminal as well, i had to output to less
23:13 Grinnz_ perl -Mojo -E 'say g("http://store.steampowered.com/app/335240/")->dom("\#game_area_description")->first->content' | less
23:13 Grinnz_ er, that backslash doesnt need to be there, but yeah
23:14 sri Grinnz++
23:14 sri lol
23:14 Grinnz_ the problem with all_contents is it gives you first the parent node (which is the same thing you get from content), then each of the nodes inside that, then each of the text inside that
23:14 Grinnz_ all of those separately
23:15 Grinnz_ its not useful for printing all together like you're trying to do
23:17 franzkafka OK, I don't think I'm getting the same content as you guys.
23:17 Grinnz_ did you try my command outputting to less?
23:18 Grinnz_ it's all there
23:18 franzkafka Grinnz_: With your one-liner, I am still getting the same thing as what I pasted.
23:19 sri back on topic, do we have better names for ->contents and ->all_contents?
23:19 Grinnz_ franzkafka: http://fpaste.org/189487/42473357/
23:19 Grinnz_ the top is from the one liner, the bottom is from chrome's dom editor
23:20 Grinnz_ they are the same
23:20 Grinnz_ apart from the dom editor not showing the ^Ms
23:20 Grinnz_ or rather, rendering them as newlines
23:21 franzkafka Grinnz_, are you in Linux or OS X? It works on my Linux box, but not on the Mac
23:21 Grinnz_ i'm on cygwin on windows heh
23:22 jberger content_nodes
23:22 Grinnz_ if you output it to a file, do you get the right thing when you open it in a text editor that works properly?
23:22 jberger ->nodes->content
23:22 riche Grinnz: "cat -A" is your friend
23:23 franzkafka I will record a video of this. Same script in Linux, different output than OS X. Output to a file, vim the file, pipe to less.
23:24 Grinnz_ same version of mojo?
23:24 Grinnz_ (just to be sure)
23:25 riche ls
23:25 riche ugh
23:25 franzkafka Hm, no actually. OS X has 5.80, Linux box has 5.81.
23:25 Adura Now thars your problem.
23:25 franzkafka Let me update Mojolicious to latest and see if it still happens. Thought I had latest installed.
23:26 Grinnz_ werent any changes to the dom class in that release that i know of
23:27 franzkafka OK, well I really have to finish this up, but when I am done I will look into it more.
23:27 franzkafka sri: you're an abrasive human being.
23:28 firnsy .oO( Pot this is Kettle over )
23:29 Adura I blame Perl.
23:30 Grinnz_ franzkafka: and no need for the video thing. you could pipe the file to a pastebin with fpaste or something like https://metacpan.org/pod/Mojolicious::Command::nopaste
23:31 firnsy pipe via cat -A, as riche suggested
23:31 Grinnz_ in fact, let me see how that comes out
23:31 franzkafka Grinnz_, thanks for all your help
23:31 Grinnz_ http://paste.fedoraproject.org/189494/42473430 if i use cat -A
23:32 riche when I just use wget there's a shitload of ^M in it
23:32 Grinnz_ i think the real question is why does steam put so many \r on their site
23:32 riche chrome is probably just stripping it
23:33 franzkafka sri: one other thing, if you need any servers (testing, whatever), let me know.
23:54 bpmedley joined #mojo

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