https://www.youtube.com/watch?v=BYjOp2NoDdc
And here are some more details in time series discords
Technical stuff, mostly
https://www.youtube.com/watch?v=BYjOp2NoDdc
And here are some more details in time series discords
From this HN thread I just discovered a file/info organization system called Johnny Decimal.
And it looks very very sane. And I think it can be easily combined with the person-action-object memory system I'm already using.
Going to try it and report back.
SQL's window functions are such a huge topic that some see them as a DSL inside SQL itself.
You can do amazing things in sql without window functions, but when you need sophisticated rankings, or sorting subgroups, or you feel you are struggling with `group by + having + order by`, window functions are usually the answer.
To me, Bruce Momjian's talk about window functions has been my default resource whenever I need a refresher.
But today I found a teaser of a book on window functions that's coming that looks very very good. I'll keep an eye on this page. Also, the pic is from that site, so it deserves a link from my high-traffic blog (you're welcome).
Motherduck is lately increasing their activity on the net, and they recently published a couple of interesting blogposts:
One, with the provocative-cliche of "Big Data is dead", which had quite a bit of traction in HN, and the other, a guest post, much more practical and "fun": "solving aoc with duckdb".
If you follow what happens in duckdbland, you'll know that the duckcon happened during FOSDEM2023. Here are the videos.
One of the talks (not in duckcon, but in FOSDEM), talks about pytohn+duckdb. It's very nice to be able to use pandas dataframes from duckdb with the 0 copy approach.
Another talk is about duckdb extensions. Very DWIM, and in general, the practical approach the team has is quite refreshing. Unfortunately, I don't do C++, so writing extensions is out of my league. But I started thinking what would it take to be able to write extensions in Lua(JIT?). Probably a low level wizard could make it happen quite fast. But performance wise... no idea.
Also, the biggest news: DuckDB 0.7.0 is out!
In kdb+ there's a great way of showing aggregated information called `aj` for asof join. This way of joining data is a neat way to get the "latest record" in a join.
These kinds of operations are already quite painful to do in plain sql when grouping by. Ever had to get the latest invoice of each customer? probably you had to nest a query on top of another one, or use a fancy "distinct on".
I realized though, that some analytical engines have something called `arg_max`, that can alleviate the pain when doing nested group by. And Duckdb already implements it! (discussion here)
First, let's create a table with a few values ready to group and get the max. Then, we'll want to get the id of the max of every group. At that point, arg_max just does the right thing.
Btw, look at that nice Duckdb's group by all.
REPLs are great, but they are only a part of the "have fun" experience.
Sometimes, you need data to work on a repl and to be able to simulate the "real world".
In clojure, I've used specmonstah and I quite like it. It can build nested structures nicely and once you configured the db schema and the specs of the individual properties, you can use it as a building block from your code, to generate trees of data.
For sql, I got pretty wild with generate_series, and `create table XXX as select` and you can get quite far with those.
But recently I discovered `dbgen` function in DuckDB and I'm pretty happy with it: this function (that comes bundled in any duckdb binary) can generate TPC-H sample databases, including (scale factor as a parameter!).
I find myself using it more and more in order to test some sql I have in mind that I'm not sure if it would work or not. It's really good that it gets you from "I wonder what would happen if...." to "aha, I see" in a shorter time than any of my previous approaches to scaffolding sample data for sql tests.
The usage is pretty simple:
`call dbgen(sf=0.1)`, and off you go!
I realized today I haven't mentioned Brian Cantwell Smith in this blog before. I'm not intimately familiar with his work, but I've read some parts of his papers, thesis, and talks.
And I can tell you, dear reader... if you're into meta/circular concepts, you'll have a great time reading his work.
Here are some links. The first one is a new talk by him, and later are works I've read and caused some impression on me. Look for more of his talks. All of them are pretty deep, and not " run on the mill" talk you find in youtube.
I find these themes pretty dense, but it's enjoyable to have a peek from time to time. Similar to Dennet's, Spolski's, and Hofstadter's
Have fun