Live data from Hacker News

PhantomJS: Stepping down as maintainer

groups.google.com

71–80 of 236 posts

Re: PhantomJS: Stepping down as maintainer

#71
post #44

Earlier quoted context omitted.

It's a classic "public good" - an economic activity whose benefits are impractical or unworthwhile to deny to those who don't pay. Things like emergency services, last-mile road infrastructure, and environmental protection work. A special-case of positive externalities. These are a classic example used by economists of a natural place for government in the economy.

Which makes me wonder why governments don't give more grants for writing open source code. They do it for research, which is another thing that would otherwise probably not pay for itself. I guess if they started doing it a lot of commercial companies would complain to them about the competition.

Dutch government has explicitly funded quite some projects, e.g. libressl and libreoffice, but compared to budgets for closed source, it's still very little.

Here's a nice blog about how the UK deals with this.

https://governmenttechnology.blog.gov.uk/2016/12/15/next-ste...

As to infrastructure work, easiest way to help and still profit is to hire one or more developers that explicitly work on a set of FOSS libraries. That way you have that knowledge in-house and a connection into the community. Also, you'll have some highly motivated employees.

Re: PhantomJS: Stepping down as maintainer

#72
post #65

Also Firefox will get headless mode in few releases https://bugzilla.mozilla.org/show_bug.cgi?id=1338004

And while people wait, you can already do a 'poor mans' headless Firefox thanks to SlimerJS and xvfb. Phantomjs is less resource heavy if you're constantly spooling up and down lots of instances but I prefer SlimerJS w/ Firefox since it lets you keep up to date with a modern version of Firefox (rather than relying on sporadic QTWebkit updates from Phantomjs). If you're using Casperjs, SlimerJS is virtually a drop in…

One can use Xvfb to run normal Chrome as well (with few gotchas like --no-sandbox, --disable-gpu and dep on dbus-x11). A test I'm working on at the moment takes 28 seconds in PhantonJS and 6 in Chrome under Docker and Xvfb.

Re: PhantomJS: Stepping down as maintainer

#73
post #44
post #32

Open source software has to be one of the least efficient markets out there. If you sum up the very real value PhantomJS has delivered to very real companies over the last several years, napkin math tells me we wouldn't have the project being abandoned for being a "bloody hell" to work on.

It's a classic "public good" - an economic activity whose benefits are impractical or unworthwhile to deny to those who don't pay. Things like emergency services, last-mile road infrastructure, and environmental protection work. A special-case of positive externalities. These are a classic example used by economists of a natural place for government in the economy.

The question is reversed: open source software _is_ a positive externality, but happened almost always _without_ any government involvement (save for some rare exceptions like SELinux).

This is probably the reason it worked so good.

So, do we necessarily need governments for other positive externalities in the list?

Re: PhantomJS: Stepping down as maintainer

#74

I'm curious - What is the utility of headless browsers? Are there people who earn money by getting it to automatically fill out forms, enter competitions etc?

A few little personal things I've done with PhantomJS:

• A script that would go to Comcast's TV schedule for my area and make a list of all movies upcoming in the next two weeks on all channels that are included in my subscription. I could then grep that for a list of movies I've been looking for.

I couldn't just grab the page with curl and parse it, because JavaScript does most of the work. JavaScript fetches the listings, and when you advance the listings it it fetches the new listings and replaces the old ones on the page.

• A script that goes to the FCCs license information site and gets a list of all ham radio callsigns issued recently [1].

• A script that given a URL to a tactics problem on lichess gets the FEN for the position. I'd use this if I was doing tactics training there on my iPad and did not understand why my answer was wrong or why their answer was right.

I'd mail myself a link to the problem, and then later on my desktop I'd give that URL to this script and it would go to lichess to the problem page, and then from there to the board editor page for that position, and grab and give me the FEN, which I could then use to set up the position in Stockfish to analyze.

(This is no longer useful. They have made some changes at lichess and now they have a browser-based version of Stockfish on the problem pages, so I can answer my questions right there).

• A script that goes to everquest.com and gets the server population levels from the server population display on that page.

I don't think that there was anything in this one that actually needed a headless browser. As far as I recall it could have all been done with getting the page with curl and parsing it. It was just easier to do it in JavaScript using the DOM. (The lichess one may also have been that way).

[1] https://github.com/tzs/todays_hams

Re: PhantomJS: Stepping down as maintainer

#75
> Chrome is faster and more stable than PhantomJS. And it doesn't eat memory like crazy.

Wait, can someone tell me where to download this doesn't-eat-memory-like-crazy version of Chrome? Activity Monitor is showing me 2GB of Chrome processes right now and that's even with The Great Suspender having paused almost all my tabs.

Re: PhantomJS: Stepping down as maintainer

#76

> Chrome is faster and more stable than PhantomJS. And it doesn't eat memory like crazy. Wait, can someone tell me where to download this doesn't-eat-memory-like-crazy version of Chrome? Activity Monitor is showing me 2GB of Chrome processes right now and that's even with The Great Suspender having paused almost all my tabs.

I saw a trick where you can run Chrome and give it less memory, and it uses less memory. This is done using cgroups.

The blog post is somewhat old[1] and not in sync with the version that is in Git[2], you might find a way to do this without Docker (I was using an old version of Docker and kernel that couldn't get it to work. But I need the old version of Docker for reasons.)

Chrome will aggressively consume any memory you give it (up to a point?) to "make your browsing experience better" somehow. You're not wrong. But there is modern technology that can make it better. If you have a fast SSD, then Chrome can still use Swap to make your experience better. The later version in the Dockerfile linked on Git also leverages swapaccount with the seccomp setting.

This may be one great use of Docker for people that wouldn't yet have been convinced to use Docker for any serious reason.

[1]: https://blog.jessfraz.com/post/docker-containers-on-the-desk... [2]: https://github.com/jessfraz/dockerfiles/blob/master/chrome/s...

Re: PhantomJS: Stepping down as maintainer

#77

> Chrome is faster and more stable than PhantomJS. And it doesn't eat memory like crazy. Wait, can someone tell me where to download this doesn't-eat-memory-like-crazy version of Chrome? Activity Monitor is showing me 2GB of Chrome processes right now and that's even with The Great Suspender having paused almost all my tabs.

I'm not sure that the results should be expected to be the same in GUI and in headless mode. I don't know - I'm just saying this is not clear without a test or clarification from someone who knows how it all works.

Re: PhantomJS: Stepping down as maintainer

#78
post #9
post #2

Wow, I'm very impressed. At this stage it is a very wise decision to step down and to focus onto something else, rather than to hold on to a project that will eventually disappear. It takes a lot of courage to move on from a project that had to be maintained for several years and that had such a reach. We can only be thankful for all the good work that went into PhantomJS, and wish the maintainers the best of luck in…

He says in his message it's been a slog for some time, looks like a good time to be done with it. Open source is great, we all like it, but demanding unpaid jobs can get old, too.

And it makes sense. You want Chrome in your tests if your users are using Chrome. Very few (if any) of your users will ever visit your app with a headless PhantomJS browser, so it's not a platform that you should go out of your way to support.

I've been using Selenium Driver with Chrome in xvfb for my headless testing needs, and I've used PhantomJS for some automation things in the past where it was great, but since I switched I really haven't looked back!

I had things breaking subtly that I couldn't fix, and they did not manifest as problems in the Chrome browser or Selenium. I still don't know what was wrong, I just know that my Rails app won't pass its JavaScript functional tests if I use PhantomJS. When I did the evaluation of 3 test drivers, I found that the one with the actual browser in it was the one that worked most reliably.

Re: PhantomJS: Stepping down as maintainer

#79
This is sad, phantomjs is better stripped than Chromium headless, if you ever try to install Chromium on servers without X, it requires shit ton of dependencies, while phantomjs was properly modified requires only minimal library.

Re: PhantomJS: Stepping down as maintainer

#80
post #59

Earlier quoted context omitted.

The main problem for developers is that getting your company to pay for something like developer tools can be very hard and a long project. Ideally every team gets a budget and a credit card to do as they see fit, but in practice a lot of (especially bigger) companies have a whole acquisition process. It's not uncommon for the hours spent in getting a license for e.g. an editor to be far more expensive than the produ…

Why do you think open source tooling has no such hurdles? At these same "larger" companies, they're going to have an open source review board, and legal involved for each open source product you want to use. Just because you can download and use it on your local machine, doesn't mean you're not violating your corp policy and procedure.

Whats more surprising is the company I work for does have a support agreement with Oracle, although when we've run into problems that do need a technical expert from Oracle such as crash dumps and stack traces we're told to figure it out our-self.

Kind of defeats the whole reason to have a closed source system when you're still on the hook and charging out $500 per hour to clients.

Post reply on HN