Hi, folks, there’s a comment that Rich Hickey makes in his talk https://youtu.be/MCZ3YgeEUPg?t=2550 which I don’t understand. He’s using the metaphor of musical instrument design for language design. At 43:40 he calls our attention to the fact that “these things (i.e. old synthesizers) had a machine interface first…and then they put a human interface (i.e. knobs) on it…Imagine if someone had built something without any machine interfaces, but primarily with human interfaces…” and he gives SQL and Unix as examples. What does he mean by this? How do SQL and Unix have “human interfaces” but no “machine interfaces”?
In UNIX you have the shell which was invented with human interaction, but ended used as a scripting language. SQL afaik was also intended to be used for ad-hoc queries, hence the natural language-like syntax (select something from database where …)
since the design focused on the UI first it ended up being inferior (proof being the tons of different shells, management tools, configuration management and interpreted languages for UNIX) and ORMs for SQL
Or also, think about the fact that SQL Statements would be data structures, a software could easily analyze them be like “I think I’m gonna send this modified query to the database server, and I’ll do this additional filter here on the application server directly because I know better how to do that”
TL;DR: send data over the wire. Data won.
I think in the Clojure community we often say “data” (since that is what Rich Hickey says), but what we really mean is structured data.
And in Clojure terms that structured data is a composition of the built-in data literals rather than some DSL contained in a string of bytes.
By “data” you mean something more like a vector and less like a raw, bloated string?
Correct
In principle, what could a “machine interface” for Unix look like, generally? Having a hard time imagining it.
I would imagine something like Ansible, K8s or Nix
> Imagine instead a “sql” that would not be a gigantic string, but instead a series of data structures; a new where clause would not be some weird string concatenation, but just a new element pushed into a vector or something like that (Datalog? :trollface:). -- @vincenz.chianese I haven't worked with Datalog before, but this description is exactly why I've come to love HoneySQL's approach: it retains the expressiveness of vanilla SQL (mostly), while actually applying the structure from Structured Query Language. That last part is why we generally use ORMs over SQL: so we know the SQL is correct. HoneySQL might not guarantee correct SQL (especially when mixing in raw SQL bits), but for 95+% of your queries, it will. On top of that it's easier to manipulate the structure of the SQL by using normal, built-in data structure operations. TL;DR: I ❤️ HoneySQL for the reason you described above 😝
The two examples you gave ("comma in the right place", and "`HAVING` clause comes after the WHERE
") are, for example, completely solved by HoneySQL
I am not familiar with the specific library you’re mentioned but I took a quick look and that gets the point, yes 🙂
I’m still learning programming, but I think I understand what you mean. There don’t exist the analog of “system calls” you can make from, say, Python into the *nix OS to do things like cat
. Instead you have to instruct the system to run a shell script to do those things, which is a wasted layer. Is that right?
We love the composability of HoneySQL at work: we can pass a “query” (data structure) into a function and it can easily add new columns to be selected and a new join clause and additional where clauses and pass back that updated “query” (data structure).
Not only is a wasted layer, but it’s brittle. Managing error is hard and most of the time unsuccessful
i recently had to make a 5 table union all query, and being able to introspect the individual queries, gather all the columns, and backfill the missing columns (selecting null) into the other queries greatly simplified the whole thing
I'm also using honeysql more and more, flexibility ftw! and also inspectability!
Anytime I open the Slack client... it crashes. I am guessing it has a memory leak.
I have seen many workspaces slow down... very little traffic... It could be the problem for many. The app is not working.
I tried to run it on a desktop with 4gb of ram... And it crashes.
I guess I need to upgrade to 32 GB :rolling_on_the_floor_laughing:
Run it in a web browser?
ok... I remember doing that
but it always tries to force me to use the app
I will try
Lightning blew out 3 of my ram modules
my friend found them... slightly burned on the edges
used a flashlight to see the slightly burned enamel
thanks @seancorfield I found the link hidden behind the popup... to open the browser... I miss this way of using the app
today I learned there is a language called Tabloid, and it is hilarious:
DISCOVER HOW TO fibonacci WITH a, b, n
RUMOR HAS IT
WHAT IF n SMALLER THAN 1
SHOCKING DEVELOPMENT b
LIES! RUMOR HAS IT
YOU WON'T WANT TO MISS b
SHOCKING DEVELOPMENT
fibonacci OF b, a PLUS b, n MINUS 1
END OF STORY
END OF STORY
EXPERTS CLAIM limit TO BE 10
YOU WON'T WANT TO MISS 'First 10 Fibonacci numbers'
EXPERTS CLAIM nothing TO BE fibonacci OF 0, 1, limit
PLEASE LIKE AND SUBSCRIBE
Reminds me of https://codewithrockstar.com/
Looks very similar to Arnold C https://github.com/lhartikk/ArnoldC
One more satisfied user of HoneySQL here too 🙂. I even hacked some "ad-hoc queries" over a chatbot for people to make queries, and because it's all data structures, I was also able to make joins automatically!