HNHacker News
TopNewBestAskShowJobs

collinmanderson

2,545 karma · joined September 26, 2014

submissionscomments
collinmanderson··on Firefox on the brink?
Nice. I totally noticed that FireFox was nearing 2% rule a few months ago:

https://news.ycombinator.com/item?id=36776603

Glad this is getting more exposure.

In my opinion 2% is probably too high.

"There were 5.40 billion sessions over the past 90 days.".

2% is 108 million sessions in the last 90 days.

collinmanderson··on Rust std fs slower than Python? No, it's hardware
Ahh ok so to be correct you have to keep reading until you get an empty read?

Maybe I don’t need to query the file size at all?

collinmanderson··on Rust std fs slower than Python? No, it's hardware
BTW, I've always thought Python uses way too many syscalls when working with files. Simple code like this uses something like 9 syscalls (shown in the article):

    with open('myfile') as f:
        data = f.read()
I'm not much of a C programmer myself. but I at least reported part of the issue to Python: https://bugs.python.org/issue45944

This is the fastest way to read a file on python that I've found, using only 3-4 syscalls (though os.fstat() doesn't work for some special files kernel files like those in /proc/ and /dev/):

    def read_file(path: str, size=-1) -> bytes:
        fd = os.open(path, os.O_RDONLY)
        try:
            if size == -1:
                size = os.fstat(fd).st_size
            return os.read(fd, size)
        finally:
            os.close(fd)
collinmanderson··on Draggable objects
Have you looked at html's built-in draggable="true" attribute and drag events?

Are there shortcomings with the built-in feature compared to your code?

https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement...

https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement...

https://developer.mozilla.org/en-US/docs/Web/HTML/Global_att...

collinmanderson··on CNET is deleting old articles to try to improve its Google Search ranking
Exactly. This should be solvable without actually deleting the pages. I assume they're only removing articles with near-zero backlinks, so a noindex,nofollow should generally be fine, but if crawl budget is an issue robots.txt and sitemap can help.
collinmanderson··on Intent to approve PEP 703: making the GIL optional
> No-GIL mode is optional

Long term the plan is to 100% remove the GIL from python.

From the article:

> Long-term, we want no-GIL to be the default, and to remove any vestiges of the GIL (without unnecessarily breaking backward compatibility). We don’t want to wait too long with this, because having two common build modes may be a heavy burden on the community (as, for example, it can double test resources and debugging scenarios), but we can’t rush it either. We think it may take as much as five years to get to this stage.

Under base assumptions it also says:

> We want to be very careful with backward compatibility. We do not want another Python 3 situation, so any changes in third-party code needed to accommodate no-GIL builds should just work in with-GIL builds (although backward compatibility with older Python versions will still need to be addressed).

collinmanderson··on A list of recent hostile moves by Google's Chrome team
I've been trying out Firefox on MacOS this week. Been using Chrome since ~2009, Firefox before that. Here are some annoyances so far:

- No download bar to show actual downloads (downloaded files are hidden under a menu icon)

- No built-in page translate

- Search: is in bottom left rather than top-right which is pretty standard in most UIs.

- Search: would be nice if "Highlight All" were on by default (though it's caused me problems on Chrome with large documents so I can see off by default having some advantage.)

- Search: most of those options should probably be hidden under "advanced" or some expandable menu.

- I don't like the scrolling tab view where I can only see less than 10 tabs at once. I'd rather they get really tiny like on Chrome rather than totally hidden. Otherwise it's unclear to me at a glance how many tabs I have open.

- Youtube seems to have higher CPU usage compared to chrome (at least on MacOS x86, non-fullscreen)

- Tabs are too easy to mute and seem less intuitive which ones are playing.

- Dev tools doesn't have the “lighthouse” audit tool.

- Would be nice if cmd+shift+n shortcut matched webkit/blink behavior. I'm slowly learning to use cmd+shift+p instead, but being consistent with all the other browsers would be nice.

collinmanderson··on A list of recent hostile moves by Google's Chrome team
What do you use for ad blocking on Safari?
collinmanderson··on A list of recent hostile moves by Google's Chrome team
What do you use for ad blocking on Safari?
collinmanderson··on Jujutsu: A Git-compatible DVCS that is both simple and powerful
Google should go back to slapping a huge "Beta" label on every single product.
collinmanderson··on Firefox has surpassed Chrome on Speedometer
Firefox has 2.2% usage on US government websites according to https://analytics.usa.gov/

If it falls below 2% it may lose official support on .gov websites according to https://designsystem.digital.gov/documentation/developers/#b...

collinmanderson··on Monzo's Tone of Voice Guide
This looks like a very nice guide for writing clearly.

> In 2010, US attorney Sean Flammer ran an experiment. He asked 800 circuit court judges to side with either a traditional ‘legalese' argument, or one in what he called ‘plain English'. The judges overwhelmingly preferred the plain English version (66% to 34%), and that preference held no matter their age or background.

> Put yourself in your reader's shoes when you're writing; what are they going to be most interested in? We're often tempted to explain why we've done something before we tell people what the thing actually is — especially if it's bad news or an uncomfortable message. But if your first question is what does my reader really need to know, then you can't go wrong. Are they more interested in the process we took to decide something, or how that decision affects them? (Hint: it's almost always the latter.) That doesn't mean we shouldn't explain our reasons, it just means we should explain what the impact is first.

collinmanderson··on Github.com is down
"down" could be a good name for a python image library plugin/extension.

https://github.com/python-pillow/Pillow

collinmanderson··on XML is the future
One benefit of containers is easy rollback.
collinmanderson··on Llama.cpp: Full CUDA GPU Acceleration
The good news is they're working towards encouraging a standard .venv in project directory.

https://peps.python.org/pep-0704/

collinmanderson··on Llama.cpp: Full CUDA GPU Acceleration
Could you say more what you don’t like about venv compared to how other languages do it?
collinmanderson··on The Rust I wanted had no future
> The transition was slow

Here's the timeline the way I think about it:

- 2008-2012 Python 3 becoming usable (byte formatting, six library)

- 2012-2016 Libraries (Django, etc) becoming compatible

- 2016-today Applications (Trac, Ansible, Chrome, etc) becoming compatible.

It took a lot of time for the ecosystem to be ready. Yes, there was a lot of stubbornness, but that's reality.

There are many things that could have been done to make the transition go smoother.

collinmanderson··on MySQL for Developers
Yeah Vimeo often requires a referrer header to be sent to prevent embedding the video on other websites.
collinmanderson··on Python's “disappointing” superpowers
> What's missing here is an Ienumerable from c#. That's basically anything that can be iterated like a list. So a function could take this enumerable and convert it to a list but should probably reject everything else.

Python has an Iterable type class for this.

https://docs.python.org/3/library/typing.html#nominal-vs-str...

https://docs.python.org/3/library/collections.abc.html#colle...

collinmanderson··on Bleach 6.0.0 Release and Deprecation
Yes. This is really interesting.

Sounds like html5lib has been asking for funding, but doesn't look like there's much progress. https://github.com/html5lib/html5lib-python/issues/361

collinmanderson··on Google Is Sunsetting Optimize
Yes I was surprised too, but if GA4 has a different optimize platform then that would make sense considering how fast they're getting rid of classic Google Analytics.
collinmanderson··on CDC File Transfer
I don’t believe that Google docs concurrent editing came from wave. I thought they were separate though I might be wrong.
collinmanderson··on Omg.lol – A lovable web page and email address
> Edit 2: The price is even the same! $19.95 vs $20

$19.95 per month vs $20 per year.

collinmanderson··on Microsoft is preparing to add ChatGPT to Bing
"I'm sorry, but I am a text-based AI language model..."
collinmanderson··on An interactive guide to Flexbox
I just learned about gap from this article. Amazing. Yes dealing with margins between things but not on the edges was super annoying.

I guess it’s time I drop IE11 support.

https://caniuse.com/?search=gap

collinmanderson··on Blip: A tool for seeing your internet latency
I've used pingplotter too. Good stuff.

Also https://ping.pe/ is good.

collinmanderson··on Dozens of malicious PyPI packages discovered targeting developers
"you'd still have to contend with the transitive dependencies written by smaller organizations or individual contributors" - generally these are the higher risk dependencies anyway and should probably be used with extra caution anyway.
collinmanderson··on Dozens of malicious PyPI packages discovered targeting developers
Only secures installation, not runtime, but still helpful. I'm not a package maintainer, but I do wish that packages were not allowed to run any code at install-time.
collinmanderson··on Dozens of malicious PyPI packages discovered targeting developers
Darn. Maybe the solution is to use vs-code client in the browser? Like vscode.dev or https://github.com/coder/code-server ? It limits what keyboard shortcuts and extensions are available, but at least it's in a secure sandbox on the client side.
collinmanderson··on How Wine works 101
> How can distributing a user-space shared library, no matter how fully loaded with ancient security holes, decrease the amount of security of your system?

They probably want to put pressure on publishers to use newer libraries that don’t need administrative permission, so hopefully eventually getting a version of the program that doesn’t need admin. Encouraging better security hygiene.

I agree that user-space compromise is still really really really bad.

← PreviousPage 7 of 32Next →