SQLite 3.35.0 is a significant release: has a bunch of really valuable new features in it sqlite.org/changes.html#v…
First up... math functions! sqlite.org/lang_mathfunc.… - sin/tan/cos/acos/asin, sqrt/pow/mod/log2, floor/ceil etc
I've wanted these a few times in the past and had to load them in as custom Python functions - great to have them in SQLite proper
ALTER TABLE DROP COLUMN !
SQLite's alter table has been pretty limited in the future, but those limitations are dropping off version by version
I built a bunch of tools for advanced alter table in sqlite-utils - glad to see them slowly going obsolete simonwillison.net/2020/Sep/23/sq…
I'm not going to pretend to understand the significance of "Generalize UPSERT [...] Allow multiple ON CONFLICT clauses that are evaluated in order" but it sounds like the kind of thing I'll find myself urgently needing to understand some time in the future!
"Add support for the RETURNING clause on DELETE, INSERT, and UPDATE statements."
I've been playing around with queues recently (I firmly believe that it's a GREAT idea to implement a queue in a RDBMS) and being able to update-and-return a random row to reserve it is very handy
... and finally, materialized CTEs. Datasette calculates multiple facets against filtered tables a lot, and I have a hunch that materialized CTEs could help dramatically speed this up. Filed a research issue with an example query here: github.com/simonw/dataset…
Even without the new materialized optimization, it looks like calculating multiple facets at once with a CTE might provide a solid performance boost - this query calculating facets for three columns returns in 35ms-125ms against SQLite 3.27.2 (Feb 2019) global-power-plants.datasettes.com/global-power-p…
Now that SQLite has math functions we can use abominable queries from this StackOverflow to find closest locations to a point!
These days I'm so keen on having every commit link to an underlying issue thread that I'll sometimes write some code, then file an issue and close it with a commit a few seconds later
The real value here is having somewhere to continue the discussion around a change. I'll frequently add screenshots and links-to-documentation to an already closed issue. Also great to link to from release notes.
It almost becomes an out-of-band documentation and commentary thread - somewhere you can really dig into the reason for a change without fear of clogging up the code with comments that will inevitably become out-of-date in the future
github.com/bertrandmartel… by Bertrand Martel does all of the actual work, I just added a paper-thin wrapper around it that writes the resulting Pandas DataFrames out to a SQLite database
Apple has gone to extraordinary lengths to make scroll bars invisible, and I hate it
Anyone seen a reliable pattern for having them appear in Safari / MobileSafari / Firefox / Chrome on macOS and iOS?
The ones on StackOverflow from a few years ago don't seem to work any more
To clarify: I want to have them visible for users of my web applications, so fixing this in macOS system preferences, while good for me, isn't the solution I'm after
I think I'm going to do the visual indication that there's more content offscreen thing - maybe with a shadow
TIL that witches are traditionally associated with pointy hats, cauldrons and cats because that's what women who sold beer they brewed wore to the market - cauldrons to carry the beer, pointy hats for visibility and cats to keep the mice away from the grain
It's long, well researched, neatly illustrated and brings copious citation footnotes. Here's the TLDR:
"TL;DR: Medieval or 16th century alewives were not the cause of the modern witch stereotype, which seems to have solidified in children’s chapbooks from the 18th century."
And I know it to be somewhere in Houston TX, does anyone know tricks I can use to figure out what the co-ordinate system is that's being used there, and how to turn it into lat/lon?
I tried running them through this "State Plane Coordinate System" against the various Texas options in the menu for this tool earthpoint.us/stateplane.aspx and looking for something close to 29.8 ,-95.6 but I didn't see anything that looked like a match
I'd really love a tool where you plug in mystery co-ordinates along with a "should be somewhere near this point" indication and it brute-force runs them through every co-ordinate system it can think of and shows you the closest matches
"Believing in QAnon tends to clear one’s social calendar, and Ms. Gilbert is no exception. She cut ties with her closest friends years ago, after arguing with them about Pizzagate. She is estranged from her sister, who tried and failed to stage an intervention over her Facebook"
It's all so sad. I check in on the QAnonCasualties subreddit occasionally and it's heart breaking reddit.com/r/QAnonCasualt…