3,099 karma · joined October 24, 2016
https://github.com/b0o
Even if it selects all the right elements, syntax highlighting doesn’t work which is an issue for me since a lot of the articles I read involve code.
These are issues with every reader mode I’ve tried – iOS Safari, iOS/desktop Firefox, desktop Chrome.
I wish there were a standard CSS media type that sites could implement, like `@media reader`, to help specify which elements should be included and to support things like syntax highlighting.
For example, a jar of Jalapenos, product photo: https://i.imgur.com/mprWr6R.jpg
In reality, the jar's cross-section isn't circular as it appears, it's an ellipse/oval: https://i.imgur.com/dXDUOR9.png
Only the first photo was included in the item listing. When the groceries were delivered and I pulled out the jar, I was so surprised by the odd football-like shape that I couldn’t stop laughing for a few minutes at how well they’d fooled me.
Another common thing to see is familiar product packaging that is just “scaled down”. Everything about the packaging looks the same or very similar, but smaller - especially fonts. This deceives the eye into believing the product is much larger. I recently fell for this when shopping for some conditioner. The packaging is not exactly the same but close enough to fool me at a glance:
What I bought: https://i.imgur.com/MdAuhS0.png
What I expected: https://i.imgur.com/MGxdD0d.png
I'm inclined the believe this is on purpose because in real life, the fonts are way too small to read comfortably. If not trying to mislead, I would expect the packaging to be designed to be legible, right?
It's especially frustrating because I usually would've just paid more for the larger size.
The gist of it is that you can check out sections of code that you want to work on as a plain text file and you can do whatever you’d do with a text file: open it in your editor, syntax highlighting, copy/paste, whatever floats your boat. The cool part is that the “Unison codebase manager” (ucm) watches the scratch files and re-parses them whenever a file changes. I presume any syntax or type errors will be immediately shown in the ucm output. Cool, you say, but we can already do that with file watchers like `entr` and traditional languages, so why should I care? Well, it goes further.
You can start a line with a > character followed by an expression and the expression will be evaluated when you save the file, printing the output inside of ucm. It’s basically a REPL that you control from your editor. Cooler still, building on this concept is the `test>` prefix which, you guessed it, creates a unit test and runs it inside ucm, showing you whether it passed or not. And as a consequence of Unison’s content-addressable nature, after a test has run for a given expression’s content hash, the result is cached and the test doesn’t need to be re-run unless the hash changes (impure functions are soooo 2020). After you’re done with the scratch file, you can run `add` in ucm to add either certain parts (I think) or all of the work you’ve done in the scratch file to the source codebase, and this includes the tests that you wrote along with their cached values (I think)!
I personally find this workflow to be very compelling. To me, this approach is much akin to the source control that we do today, but it's actually aware of the context and meaning of the changes. Git, on the other hand, relies on weak heuristics to figure out what changed between versions of text-based files.
I am very happy to see projects that push beyond the boundaries of the paradigms we’ve been stuck in for the past 60+ years. I also find it quite funny that Hacker News, a forum centered around startups, can often be so conservative when it comes to new technologies.
[0]: https://www.unisonweb.org/docs/tour
[1]: https://www.unisonweb.org/docs/tour#unisons-interactive-scra...
It partially inspired me to start keeping a list of similar learning content over at https://github.com/b0o/awesome-by-example
Circumstances around the COVID-19 lockdowns have been very unusual. If you consider the hundreds of millions (+?) of books in libraries around the world that were temporarily inaccessible to people, including children and students, I feel the IA's actions were somewhat justified, perhaps not legally, but at least morally. Young people losing months worth of time that could have been spent reading and learning constitutes an emergency in my mind, and the IA stepped up to help lessen the societal damages.
You could consider that because these many millions of book licenses were temporarily "invalidated" by circumstance, the Internet Archive simply rebalanced the scales by providing the same people who would have been deprived of books at their local/school library a similar means to access them. Such a scenario probably never even crossed the mind of anyone involved in IP law before COVID-19, but if it had there might be some provisions on the books for cases like this.
On another note, I would actually expect publishers' sales to increase during the lockdowns for the above reasons of books being held in purgatory at libraries. That publishers should profit from a global crisis in this way seems wrong.
Again, none of this is to say that the Internet Archive's actions were legally justified, but I think to equate them to pure piracy is ignoring the nuance and context of this extraordinary situation.
I desperately hope the publishers drop the suit and come to an agreement with the IA that doesn't result in the loss of this treasure trove of knowledge or the end of the organization.
- of course, command completion
- type `echo $` and press tab - fzf through all your environment variables
- type `command ` and press tab - fzf through all programs available in your PATH
- type `builtin ` and press tab - fzf through all of zsh's builtin functions
- select multiple results at once, they'll be concatenated with spaces
- pick files, with the ability to press / to select a directory and automatically restart fzf-tab inside of it
The short answer is to use git tags. You need to include the `v`, e.g. `v1.2.3`. If you don't use git, I don't know the answer.