Live data from Hacker News

PhantomJS: Stepping down as maintainer

groups.google.com

91–100 of 236 posts

Re: PhantomJS: Stepping down as maintainer

#91

How does this news fit in with Selenium?

Selenium won't really be impacted, as it's higher-level than PhantomJS.

This is also a great example of why it's smart to use Selenium or something like it for scripting the tests. You can easily swap out for another backend in Selenium, but if you wrote tests in pure PhantomJS, you're now stuck with a codebase that depends on unmaintained software.

Re: PhantomJS: Stepping down as maintainer

#92
post #78
post #9

Earlier quoted context omitted.

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…

You can use PhantomJS as the backend on a Selenium script, and this news clearly demonstrates the utility of a higher-level API than using PhantomJS directly. If your tests are in Selenium, changing backends is generally a small matter.

I started writing in Selenium instead of CasperJS (a PhantomJS frontend) because PhantomJS experienced intermittent bugs on the page I was trying to access. I think you're right that "real browsers" are still much more reliable for complex use cases, but the low profile of PhantomJS is definitely nice when it works.

Re: PhantomJS: Stepping down as maintainer

#93
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.

I think that in the US, we've been fighting for some long about how much to cut government, the idea of proposing to create a new category of spending just doesn't occur to Democrats. The closest they can come to imagining something new is free college (which is the same what we have now [free high school, college scholarships] but more so) and free daycare (which is like free preschool but younger).

Re: PhantomJS: Stepping down as maintainer

#94

Earlier quoted context omitted.

A great example would be PDF generation for things like invoices. Rather than generating a pdf with something like PHP or Java. Render a regular html page with all the css you want (super easy compared to drawing a PDF using PHP) and then proceed to use a pdf printer on that page. You could run such a thing as a microservice using a headless browser or PhantomJS. There are probably better ways to do this but that's o…

This sounds horrible.. In general all these html->pdf ways of generating pdfs sounds horrible -- why don't people use latex for this?

It is NOT horrible. However, Latex is another way of doing things. Perhaps your requirements should dictate which of the two you should go for!

Re: PhantomJS: Stepping down as maintainer

#96
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.

Yeah, I really think that open-source software shot itself in the foot by incorporating unlimited free sharing for every recipient into its mantra. Now everyone thinks that open-source has to mean impoverished, because despite all the happy vibes, very few people will pay for software that they could otherwise get for free.

You can make your software "source available", i.e., not open-source under activist definitions but still have a GitHub repo and all that, and restrict [heavy?] commercial use. I think it'd be interesting to see more open-source devs take that route and stop giving away the farm.

This will still allow people to use your stuff, developers will get familiar with the tooling and expect to be able to use it at work, and companies that have the dough can be compelled to pony up for a license.

On Windows, there is still an underappreciated market for cheap early-90s-shareware-style applications that are The GPL almost gets there, as it makes large-scale commercial use undesirable due to its infectious nature, which allows for dual-licensing, but with everything server-side nowadays, those stipulations are much less effective (have to go AGPL).

Re: PhantomJS: Stepping down as maintainer

#97
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.

> It's a classic "public good" - an economic activity whose benefits are impractical or unworthwhile to deny to those who don't pay.

Open source software is not a public good, in the economic sense. There are two criteria for being a public good: non-rivalry and non-excludability. Open-source software satisfies the first criterion (my using it doesn't prevent you from using it), but it's fairly excludable (I can prevent you from using it legally).

As developers, our instinct might tell us that it's not excludable because "if the source is there, nothing prevents me from using it", but when we're talking about goods which fall under copyright law, the legal aspect matters as well as the practicality. And in fact, open-source licenses (such as the GPL and the Apache licenses) can contain provisions which prevent people from using the licensed software under certain circumstances, while still being considered both free and open-source by the FSF and OSI respectively[0]

The real classic example of a public good is national security. Practically, there is literally no way that national security can be applied to people within a country on an individual basis, as opposed to a geographic one. For most threat models (e.g. espionage, (counter-)terrorism), the mitigations are things like "prevent terrorist attacks from happening". You can't apply the benefits of that only to people who have paid for the service - a terrorist attack either happens or it doesn't, and you can't choose who's a victim of it.

> These are a classic example used by economists of a natural place for government in the economy.

Even for things which are actually public goods, like national security, that's overstating the case greatly. Public goods are used as an example of a good for which an individual market cannot exist, but that doesn't mean that the only alternative is a government one.

The so-called "tragedy of the commons" is an appropriate (and ironic) example - despite the way that most people use the term, the town commons was actually something for which there were plenty of well-established codified rights, and these were not always negotiated or enforced by a government entity.

[0] For example, the Apache license contains a patent retaliation clause, which terminates your right to use the software in the event of a patent lawsuit. (Technically it doesn't revoke your right to the copyrighted code, but it does revoke your right to the underlying patents, which amounts to the same thing, because presumably the copyrighted code utilizes the underlying patents, or else it wouldn't be covered by the license in the first place).

Re: PhantomJS: Stepping down as maintainer

#98

> 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 assuming they are referring to: https://www.chromestatus.com/features/5678767817097216

Or something pretty close to it.

Re: PhantomJS: Stepping down as maintainer

#99
post #14

> I even bought the Mac for that! I did too, then found out you also needed a dev license for users being able to run your app. Supporting Mac/OSX is damn expensive if your app is free.

For iOS development I believe they got rid of that requirement, you can develop iOS apps (at least) using a personal dev account; only when you want to go to the app store do they ask for the license fee.

Unfortunately they limit app capabilities (such as iCloud, keychain access), so you can't use those even for your personal account.

Re: PhantomJS: Stepping down as maintainer

#100
post #58

Thank you for PhantomJS! Been using it for testing, generating PDFs and screenshot.

Yes, thanks PhantomJS! I'm wondering, are there any examples out there for generating screenshots on headless Chrome?

From the docs it sounds like it is largely compatible with Selenium https://chromium.googlesource.com/chromium/src/+/lkgr/headle...

If that is true, the takeScreenshot() should work as normal hopefully.

Post reply on HN