It looks to me like the big benefit is being able to use just one hand for this. I'd be more likely to use the watch, too, but this would be great for people with one arm, for example.
HN user
franey
https://johnfraney.ca
For anyone looking to use this, I recommend using this CSS before the closing body tag. It disables the fade effect for visitors who prefer reduced motion, and the old page fades out while the new one fades in. (I've got an optional rule that keeps my header in place while the rest of the content fades out/in)
@media (prefers-reduced-motion: no-preference) {
body > header {
view-transition-name: header;
}
@view-transition {
navigation: auto;
}
::view-transition-old(root) {
animation: fade-out 0.3s ease;
}
::view-transition-new(root) {
animation: fade-in 0.3s ease;
}
@keyframes fade-in {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes fade-out {
from { opacity: 1; }
to { opacity: 0; }
}
}I had a Pebble Time Round, too, and it was great. For me the Pebble hit a sweet spot for a smart-enough watch that allowed me to keep my phone in my pocket. I could get notifications and reply to them right from the watch. I have a Withings SteelHR now, and it's great as a watch + activity tracker, but not being able to dictate replies to the notifications I get means I reach for my phone more now than I did with my Pebble
This post might have some hot takes and I'm no expert, but over the past decade I've found these rules of thumb to be helpful when reviewing and writing user stories.
If you have some other tips, I'd be happy to hear them!
It is something that distinguishes them, certainly. As someone who switched from using Vue to React at my day job, dev tooling & editor support have been the things that stand out the most to me. React works well with Vite, which has helped make it easier to use, and I've been migrating projects away from Webpack + Jest to Vite + Vitest, which saves a lot of dependency maintenance. I definitely miss Vue 3's VS Code extension when I work in React, though.
Generally I'll write a post when I try to do something that's difficult to find an example of online. I don't get a _ton_ of traffic, but writing prose is a nice change from writing code.
We're getting pretty off topic, but it wasn't what they were protesting that was illegal, it was how they did it. For a US comparison, First Amendment rights don't include a right to occupy city streets for weeks, even if you're doing it to protest the government.
It wasn't, no. It was meant to clarify for other readers that people didn't have their bank accounts frozen for protesting COVID; they had their bank accounts frozen for financially supporting or participating in an illegal occupation of a city centre.
Your point stands that governments/courts decide what is illegal and that they have the power to freeze bank accounts when those accounts are used to fund illegal activities.
For people not familiar with Canadian politics, this summary missed some important nuance. Bank accounts were frozen for some people who donated money to support an illegal occupation of part of Canada's capital city, Ottawa. The occupation was a mix of people protesting COVID measures and others demanding that Justin Trudeau resign.
https://www.cbc.ca/news/politics/emergency-bank-measures-fin...
You bet. I've played around with AVIFS and it can autoplay and loop. I made gif2avif.com for fun, but I can't promise that it will work well.
That was a great MVP plan for that feature! Figuring out what not to build is a great way to save development time.
I'm over a decade into web development, and I still reference it every week. Last week I thought I should start a blog post about how, for me, it's the single best resource on the web. I sure hope it stays that way!
This is a good point about complexity. I started with pip + virtualenv, and I'd recommend pip + venv to anyone learning Python. venv is in the standard library, so there's official documentation for it.
I picked up Pipenv when a point-point release of a dependency broke a production deployment. Pipenv's dependency locking meant that I wouldn't get surprised like that again.
Part of why this topic comes up so much is the desire to run with a language before learning to walk with it, perhaps. I'm a big fan of Poetry, but I like it because I know what it gives me compared to vanilla pip and a setup.py file.
Installing dependencies at the OS level will get you far as a beginner. And when the time comes that you need a virtual environment, you'll probably know.
I think this is a good basic overview of the dependency management landscape. I have a few things to add.
One is that because Python has been around for so long, it's easy to find outdated or conflicting advice about how to manage Python packages.
I think it's important to stress that pyenv isn't strictly a dependency manager, too, and depending on your OS, isn't necessary. (Supported Python versions are in the AUR[0].)
A lot of pain from Python 2 -> 3 is that many operating systems were so slow to switch their default Python version to 3. Unless something has changed in the last month or so, Mac OS _still_ uses Python 2 as the default.
It's a shame to see Python take a beating for OS-level decisions.
Poetry does a good job of managing/publishing a package without having to custom-code a setup.py. I have a blog post about it but I don't want to spam. Poetry works well for a package of average complexity, and it's configured entirely in pypyroject.toml. I don't have experience publishing something complicated with it, though.
Pipenv has had a couple releases recently, but I've had an easier time with Poetry. Poetry is almost always[0] faster than Pipenv, and I find its commands more intuitive.
I've been meaning to take another look at Pipenv, but the huge pause without a release makes me nervous that it could happen again.
[0] https://johnfraney.ca/posts/2019/11/19/pipenv-poetry-benchma...
I'm not sure how awesome it is, but I like to write about a particular problem that I came across and solved recently or an experiment that I tried, like writing a Vue app using a Python-to-JavaScript transpiler. I mostly write about Python and Vue, sometimes veering into CSS, Markdown, and TypeScript. Instead of just giving the solution, I try to walk through the problem and give background and bad jokes along the way.
I think of Poetry as the Yarn of Python packaging for two main reasons (apart from package locking, which is the biggest similarity): the commands are more intuitive and the lockfile starts with a different letter from the dependency file. I don't know how many times I open package-lock.json instead of package.json because I tab-complete from my shell. Same with Pipfile and Pipfile.lock for anyone using Pipenv.
I wrote this post[0] that compares Poetry and Pipenv if you're interested and talks about some of their differences. Poetry has both add and install commands, whereas Pipenv only has an install command, for instance.
[0] https://johnfraney.ca/posts/2019/03/06/pipenv-poetry-benchma...
I second this. Poetry is a great all-in-one tool for dependency and package management. I've written a few blog posts about it, and I remain happy with it. The Poetry team has done a great job making quality of life improvements to the tool, and it's actively maintained. It's worth checking out.
I've used both and recommend Poetry. It's got a larger feature set (it can be used to manage packages _and_ publish packages), it's faster, and it's more actively developed (measured by releases). Pipenv's last release was 2018-11-26, and Poetry has been publishing pre-releases as recently as three days ago to prepare for v1.0.0.
I did a quick comparison here[0], and I'm planning to do an update with the latest version of Poetry.
[0] https://johnfraney.ca/posts/2019/03/06/pipenv-poetry-benchma...
That could be getting at what confused me about the article. The author mentions the crosstown LRT favourably, and that will link up to the UP commuter/airport line I mentioned, adding another stop.
LRT linking to commuter rail lines, subway lines, and bus stops is something the author didn't really mention, but it certainly seems to be the strategy for that line in Toronto.
The author is against cutting funding for bus routes, which is reasonable. I guess I just don't see how that is also an argument against using LRT for arterial transportation into downtown cores. If the retort to that is "budgets", then we need increased funding for public transportation, not fewer trains.
I got that impression, too. There wasn't much mention of bus/streetcar-plus-train transit strategy, which certainly happens in Toronto.
One thing I'm surprised this article didn't mention is commute times. To get from Weston Station (northwest of downtown) to Union Station takes:
- 22-minute drive (or 1h in rushour)
- 1.25-hour bus ride
- 13-minute LRT ride
LRT (light rail transit) really is an excellent way to get into the downtown core from distances and in time frames that were previously only manageable by car.
I've used this wrapper[0] for Firefox's reader mode[1], and it worked well:
What distro? I have a T495s and I haven't had any issues with it running Arch.
I asked Lenovo support about this, and the rep said a customizable version would be available withing two months. I'm in Canada, but I imagine the US won't be later than here.
'Everybody' is singular, and 'their' is (generally) plural. One way to resolve that conflict would be to rewrite the second clause to say "...as one ought to do when one falls into deep water in one's clothes". Using 'one' isn't very common in North America in my experience.
I recently took Poetry for a spin when releasing Flake8 Markdown[1], and I thought it might be helpful to walk through the process of making a package using Poetry, from start to finish.
I found it more straightforward than using setup.py and twine, which I used for other packages.
How are you publishing to PyPI these days?
By far my favourite remap in (Neo)vim is to map : to ; and ; to ,
I don't know how many thousand key presses I've saved by not having to hit "Shift" for every command.
" Use ; rather than : for commands
nore ; :
nore , ;This is a little project I put together to help ensure that the code examples in my Pelican-built blog are correct and to build a package using Poetry[1].
It's a thin wrapper around Flake8[2] that extracts backtick-style Python code blocks from Markdown files, pipes those code blocks to flake8, and updates flake8's stdout output with line numbers from the original file.
Thanks for looking!
[1] https://poetry.eustace.io/