News for hackers. Stuff that matters.

mbrukman

Show HN: Extract diagrams from PDF to SVG

https://github.com/mbrukman/pdf-extract-svg

I've noticed that many blog posts about papers (which are in PDF) use raster screenshots (JPG, PNG, etc.) of key diagrams, which makes it hard to zoom in on the details (e.g., on mobile) because they pixelate and turn blurry, unless the screenshot was taken at a much higher resolution than the space on the page, which enables some zooming in without much degradation.I wondered why they don't...

( Read More... | no comments | on HN )
Re:Ask HN: Share your personal site on Wednesday April 06, 2022 @06:18PM (#30938177)
https://misha.brukman.net

Most posts are about tech topics (solving a problem I ran into that I figured might also be of interest to others). Also some about typography, languages, etc.

Disclosure: I work at Google, but not on the Google Drive team specifically.

Sorry about the issue, folks! The Google Drive team is aware of it and is working on remediating it.

And thank you all for the many test cases! :)

Re:Fuchsia overview on Wednesday June 03, 2020 @04:52PM (#23408563)
That's a fair point, thanks for the clarification.
Disclosure: I work at Google, but not on Copybara.

I've seen Copybara used at Google in both directions: for some projects, the internal repo is the authoritative one, and for others, the external repo is authoritative.

Copybara is not prescriptive, you can go in either direction.

Re:Fuchsia overview on Sunday May 31, 2020 @04:37PM (#23372508)
Looking at the Canonical CLA [1], you're right that it allows Canonical the right to relicense contributions under any other license:

> 2.3 Outbound License

> Based on the grant of rights in Sections 2.1 and 2.2, if We include Your Contribution in a Material, We may license the Contribution under any license, including copyleft, permissive, commercial, or proprietary licenses. [...]

However, please note that my original comment [2] was asking for a CLA which prevents usage in a proprietary setting, while the project is under a permissive license like Apache/BSD/MIT (emphasis added):

> I've never seen an Apache/BSD/MIT project where the CLA (and only the CLA) prohibits commercial / proprietary / closed-source or any other use cases — if you have an example or two, could you please point them out?

[1] https://ubuntu.com/legal/contributors/agreement

[2] https://news.ycombinator.com/item?id=23365535

Re:Fuchsia overview on Saturday May 30, 2020 @07:52PM (#23365922)
I've responded to the CLA / licensing issues in a separate sibling comment (https://news.ycombinator.com/item?id=23365535); this comment is to respond to the rest of your post as it's a separate topic that's important in its own right.

> The OP makes the point that Google will find a way to use public contributions for Google’s own profit.

That's an opinion on motivations, not a statement of fact, so I am not agreeing or disagreeing with that. My comment was only about CLAs and open-source licensing, and what each of them enables you to do (or not) with someone else's source code, and how your contributions may be used by others after you submit them, not a statement or response to their opinion.

> The sheer size of the response above, let alone content, is what creates the tone of “talking past the customer” which is what has alienated so many people from Google. The problem I’ve repeatedly experienced in Google open source and as a Google Cloud customer (contract with Google FDEs on-site) is that Googlers just don’t listen. You can’t trample the customer with your own narrative no matter how correct and elegant it is.

I'm sorry you've had negative experiences in the past, and I'm sorry to read that my response on the distinction between CLA & open-source licenses came across as not listening or talking past the customer — that was not the intent at all.

If you're open to it, I'm happy to chat with you separately (you can easily find me on Twitter or LinkedIn and send me a message) whether you want to discuss this topic, or your other experiences with Google open-source projects, or Google Cloud, and I can try to help, or just listen. If not, that's fine, no worries.

> You can disagree, but you can’t deny the feelings of others. It just doesn’t work that way.

I'm sorry that came across as not listening; my comment was only to clarify the notion of CLAs and how they relate to open-source licenses, without delving into business goals and future roadmaps (which I have no visibility into, nor control of, in this case).

Everyone is entitled to their opinions or feelings on how a company might or might not use open-source software or their motivations for open-sourcing (or not) of a project, and I'm not here to debate, explain or defend any company's decision in that regard. Again, my comment was limited to the scope of what a CLA brings to an open-source license of a project.

Re:Fuchsia overview on Saturday May 30, 2020 @06:50PM (#23365535)
Disclaimer: I'm not a lawyer and this is not legal advice.

I've added a clarification separately, please take a look there first: https://news.ycombinator.com/item?id=23365469

> The point is that when a non-Googler contributes code, it’s non-proprietary since the non-Googler is by definition a non-Googler.

I think we are using different definitions of "proprietary". I'm using it to mean "non-open-source" [1], and you're using it to mean "employed by a specific company" (or something else); can you please clarify what you mean or rephrase what you're trying to say?

> What the CLA does not prohibit is proprietary use—- your lengthy answer. The OP makes the point that Google will find a way to use public contributions for Google’s own profit.

That's not the purpose of a CLA; that's the purpose of a project's license. That was the point of my post. Anyone can take a project with an Apache/BSD/MIT license (whether or not the project has a CLA, it's orthogonal), make a proprietary product from it, distribute it, sell it, etc. and they would be just fine doing it, without also sharing any of the source.

To put it another way, a CLA cannot restrict proprietary or commercial use of a patch or contribution, if the underlying project license is Apache/BSD/MIT, because all those licenses already allow commercial use, incorporating software into proprietary / closed-source products, etc. Such a CLA would be incompatible with the project's license.

I've never seen an Apache/BSD/MIT project where the CLA (and only the CLA) prohibits commercial / proprietary / closed-source or any other use cases — if you have an example or two, could you please point them out? I'm very curious to see how this would work in practice, because this seems like a strong contradiction, so I would be interested to see how this plays out in practice.

[1] https://en.wikipedia.org/wiki/Proprietary_software

Re:Fuchsia overview on Saturday May 30, 2020 @06:42PM (#23365483)
I've added a response to your earlier comment to clarify: https://news.ycombinator.com/item?id=23365469
Re:Fuchsia overview on Saturday May 30, 2020 @06:41PM (#23365469)
Sorry for not making it more clear; I was responding to the statement:

> Not really open. If you submit code, you grant a license to Google to use it in non-proprietary code.[1] So, at some point, once users and developers are locked in, Google can make later versions closed and proprietary enough to stop clones.

The CLA does not change anything about the license, and does not prevent or make it possible (or easier) to make proprietary versions of the software (or your contributions) — all those conditions are in the license itself, the CLA does not override or amend any terms of the license.

In other words, you can make the same argument about any Apache, BSD, or MIT software, while the poster is claiming that it's the CLA that enables making future releases proprietary, which is why I pointed out that the Google CLA is the same as the ASF CLA.

If the argument is that Apache/BSD/MIT licenses are "not really open" because they allow incorporating them into proprietary software without releasing code, that's a different argument and is really a distinction between the "permissive" licenses like Apache/BSD/MIT and the "copyleft" licenses like GPL, but again, that has nothing to do with the CLA.

Re:Fuchsia overview on Saturday May 30, 2020 @05:17PM (#23364811)
Disclosure: I work at Google (but not on Fuchsia), and I contribute quite a bit to open-source projects.

Disclaimer: I'm not a lawyer, this is not legal advice, etc.

I'm not sure what you mean by "you grant a license to Google to use it in non-proprietary code" — was that a typo and did you mean "proprietary"? In any case, Apache/BSD/MIT licensed code can already be used in proprietary code, the CLA does not change that.

The Google ICLA you cited [1] is basically the same as the ASF ICLA [2]; the gist is that you retain copyright of your contributions, you're not giving up your copyright — i.e., it's a copyright license, not a copyright assignment (as some other CLAs are).

And, naturally, anyone can fork it if they wish, or distribute proprietary, non-open-source versions of an Apache/BSD/MIT-licensed project, subject to appropriate attributions, if required, by the relevant licenses.

However, neither you (nor Google) can claim copyright over the entire project, because the copyrights are held by the relevant contributors. Changing the license for the entire project requires agreement from all copyright holders — for example, see what LLVM had to do when they chose to add a clause to their license [3].

[1] https://cla.developers.google.com/about/google-individual

[2] https://www.apache.org/licenses/icla.pdf

[3] https://llvm.org/foundation/relicensing/

Re:Running decade-old games in containers on Friday April 24, 2020 @06:01PM (#22973372)
Note that I'm not the owner/developer of that site, so I can only guess how it's implemented there. However, I can give you a general overview for why logins are typically required for such use cases.

While you're correct that cookies is a good way to identify users, they could be faked by other users (to steal or change your saved games), which is why websites typically have user accounts where you have to prove you know something (such as a password) in order to claim to be user id 12345.

If you don't have to prove anything to claim to be user 12345, then some creative users on the internet will write bots that will claim to be every possible user (in sequence), and either trash or delete their saved games, or do something else to affect them in the future.

Thus, we have the need for user accounts on websites to securely identify users and their settings, saved games, shopping carts, purchase history, etc.

If you're interested in learning more, take a look at:

* https://en.wikipedia.org/wiki/HTTP_cookie

* https://simple.wikipedia.org/wiki/HTTP_cookie

Hope this helps!

Re:Running decade-old games in containers on Friday April 24, 2020 @05:56PM (#22973337)
Just wanted to let you know that I fixed this (and a few other issues I found upon re-reading my post for the Nth time).

Thanks again for your help!

Re:Running decade-old games in containers on Thursday April 23, 2020 @04:35PM (#22961007)
Blog post author here.

It's easy to get a blog going with either GitHub or GitLab plus their "Pages" hosting environment, or Netlify.

Here's how you can do this with just GitHub Pages or GitLab Pages:

* https://pages.github.com/

* https://docs.gitlab.com/ce/user/project/pages/

Here's how I originally hosted my blog with Gitlab Pages using Hugo (a static site generator):

https://misha.brukman.net/blog/2019/05/building-a-site-with-...

and then ended up migrating to Netlify when I upgraded Hugo to a new version to support a different theme (Netlify has additional benefits, like automatic live previews):

https://misha.brukman.net/blog/2019/05/switching-hugo-theme/

And here's someone else's 1-hour walk-through of the same workflow:

https://brainfood.xyz/post/20190518-host-your-own-blog-in-1-...

It's pretty straight-forward process regardless of which approach you take. I hope this helps you get started with your own blog!

Re:Running decade-old games in containers on Wednesday April 22, 2020 @07:12PM (#22951203)
Blog post author here.

I haven't tried it myself (yet), but I don't see why Wine wouldn't work from a container, if you propagate access to the display into the container, as I have done in the Dockerfiles in my post.

Here are some quick references I found that suggest this works:

* https://github.com/scottyhardy/docker-wine

* https://blog.simos.info/how-to-run-wine-graphics-accelerated...

Re:Running decade-old games in containers on Wednesday April 22, 2020 @09:32AM (#22945338)
> Your email is nowhere to be found, so it's impossible to email you about typos or bugs. Typos in this case.

You're right, I don't post my email address on my blog, and yet it's widely available and discoverable (which leads to spam, so...). That said, you can find me on Twitter and LinkedIn, and send me a private message there.

Public comments on HN also work. :-)

Back to your original point:

> Anyways search for:

> Thus, it is imperative to avoid giving these containers running old software no access to the network

> and remove the "no" I suppose? I might be wrong. Only one 'no' there, so it should be gone, afaik.

You're absolutely right; that's a double negative—that "no" should either be dropped or replaced with "any". I'll fix that in a bit.

Thanks again for your careful reading and letting me know!

Re:Running decade-old games in containers on Wednesday April 22, 2020 @09:27AM (#22945291)
Thank you for the kind words! Glad to hear you enjoyed it.
Re:Running decade-old games in containers on Tuesday April 21, 2020 @03:28PM (#22938477)
Blog post author here.

Looks like Crysis (https://www.gog.com/game/crysis) is a Windows-only game, so you'll need a different approach than what I've described in my blog post, which is running Ubuntu inside containers.

If you want to play it on Linux, you may be able to do it using Wine (https://www.winehq.org/), which you can run directly, or inside a Docker container.

Alternatively, if you are using Windows, you may be able to utilize Windows containers (https://docs.microsoft.com/en-us/virtualization/windowsconta...), but that's not what I did in my blog post, so YMMV.

If you do try this out, let us know if it works for you!

Re:Running decade-old games in containers on Tuesday April 21, 2020 @03:05PM (#22938233)
Hi HN, blog post author here.

Rather than just posting the end result that worked, this is my trial-and-error "walthrough" of building a container from start to finish, in order to run several games from a while back.

Hopefully, this can get you started with playing these and other games again, or discovering them for the first time! Let me know what you think and if you'd like to see more of this in the future.

Re:Running decade-old games in containers on Tuesday April 21, 2020 @01:57PM (#22937488)
Blog post author here.

A virtual machine solution (such as VirtualBox) requires more CPU/RAM resources than a container, because you're running an extra copy of the entire operating system, in addition to your base system that you're always running.

A container is much more light-weight than a VM because it relies on the services of the underlying OS and just provides the runtime environment, but not the OS; please see https://www.backblaze.com/blog/vm-vs-containers/ for more detains on the distinction.

In any case, it would actually be more complex to use a VM, because I would first have to do a full installation of Ubuntu in the VM, before I could get started with installing the game, whereas with Docker, I can just build a container image starting with ubuntu:14.04 as a base, and have it working in seconds (minute or two once I started installing the required i386 packages, but that's unavoidable).

If you look at the end result, it's actually quite a simple Dockerfile, and the installation from start to playing will take you less time than installing a full Ubuntu distribution in a VM.

Re:Running decade-old games in containers on Tuesday April 21, 2020 @01:52PM (#22937418)
Blog post author here.

Yes, I'm planning to do this for much older games in the future, and you're also right that DOSBox does a lot of that for you!

One thing I've noticed is websites that let you play using old DOS games via DOSBox right from your browser (e.g., see https://www.dosgames.com/), so I was going to make a blog post for how to do that yourself, from scratch.

Would that be of interest?

Re:I ditched Google for DuckDuckGo on Monday December 02, 2019 @09:44PM (#21689450)
Hi Mats (or do you prefer Matsemann?),

I am an engineer on Google Search.

Sorry to hear about your experiences; I would like to better understand the issues that you're seeing and reproduce them on my end, so that I can file detailed bug reports for the folks working on those features. I would appreciate your help if you're open to that.

First, I compared Firefox on Android with Chrome on Android for a few queries and they seem to get very similar results (but we are likely using different queries). Would you be able to provide some sample queries where Firefox was receiving the results that led you to change its user agent and get different results?

I also visited several AMP pages on Firefox from Google search results (Reddit and BBC) and they were all scrollable, so it's likely that we're looking at different sites as well. Can you tell me which sites' AMP pages were non-scrollable for you?

Regarding the poor results for Norwegian searches: I wasn't getting the problematic URL for this query; will try reproducing this again later. If you have any other search queries for which the Norwegian results are bad (or have been declining in quality over time), if you're able, please share them with me as well: either here, or if you prefer, you can find me on Twitter and LinkedIn.

Thanks in advance!

Older »