off-topic

https://github.com/clojurians/community-development/blob/master/Code-of-Conduct.md Clojurians Slack Community Code of Conduct. Searchable message archives are at https://clojurians-log.clojureverse.org/
Eric Auld 2021-06-15T16:09:31.413500Z

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”?

1
Dimitar Uzunov 2021-06-15T16:18:24.413900Z

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 …)

👍 1
Dimitar Uzunov 2021-06-15T16:20:39.416100Z

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

vncz 2021-06-15T16:20:49.416400Z

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”

vncz 2021-06-15T16:21:28.417200Z

TL;DR: send data over the wire. Data won.

☝️ 2
simongray 2021-06-17T07:12:28.458100Z

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.

👍 1
simongray 2021-06-17T07:13:48.458300Z

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.

👍 1
Eric Auld 2021-06-15T16:23:47.417400Z

By “data” you mean something more like a vector and less like a raw, bloated string?

vncz 2021-06-15T16:24:15.417600Z

Correct

Eric Auld 2021-06-15T16:25:09.417800Z

In principle, what could a “machine interface” for Unix look like, generally? Having a hard time imagining it.

Dimitar Uzunov 2021-06-15T16:26:24.418900Z

I would imagine something like Ansible, K8s or Nix

walterl 2021-06-15T16:34:14.425600Z

> 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 😝

walterl 2021-06-15T16:37:50.425700Z

The two examples you gave ("comma in the right place", and "`HAVING` clause comes after the WHERE") are, for example, completely solved by HoneySQL

vncz 2021-06-15T16:40:42.425900Z

I am not familiar with the specific library you’re mentioned but I took a quick look and that gets the point, yes 🙂

Eric Auld 2021-06-15T16:45:15.426100Z

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?

seancorfield 2021-06-15T16:46:06.426400Z

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).

vncz 2021-06-15T16:48:50.426700Z

Not only is a wasted layer, but it’s brittle. Managing error is hard and most of the time unsuccessful

dpsutton 2021-06-15T17:00:06.427300Z

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

borkdude 2021-06-15T17:27:38.427700Z

I'm also using honeysql more and more, flexibility ftw! and also inspectability!

nate sire 2021-06-15T17:50:10.428600Z

Anytime I open the Slack client... it crashes. I am guessing it has a memory leak.

nate sire 2021-06-15T17:50:48.429900Z

I have seen many workspaces slow down... very little traffic... It could be the problem for many. The app is not working.

nate sire 2021-06-15T17:51:20.430700Z

I tried to run it on a desktop with 4gb of ram... And it crashes.

nate sire 2021-06-15T17:51:49.431200Z

I guess I need to upgrade to 32 GB :rolling_on_the_floor_laughing:

seancorfield 2021-06-15T17:51:59.431400Z

Run it in a web browser?

nate sire 2021-06-15T17:52:08.431700Z

ok... I remember doing that

nate sire 2021-06-15T17:52:25.432300Z

but it always tries to force me to use the app

nate sire 2021-06-15T17:52:37.432500Z

I will try

nate sire 2021-06-15T17:53:58.432900Z

Lightning blew out 3 of my ram modules

😬 1
nate sire 2021-06-15T17:54:13.433400Z

my friend found them... slightly burned on the edges

nate sire 2021-06-15T17:54:39.433900Z

used a flashlight to see the slightly burned enamel

nate sire 2021-06-15T17:57:13.434500Z

thanks @seancorfield I found the link hidden behind the popup... to open the browser... I miss this way of using the app

Ruy Valle 2021-06-15T20:03:20.435600Z

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

2
😄 6
Tero Matinlassi 2021-06-16T08:10:27.437700Z

Reminds me of https://codewithrockstar.com/

javahippie 2021-06-15T20:13:29.435800Z

Looks very similar to Arnold C https://github.com/lhartikk/ArnoldC

walterl 2021-06-15T22:06:00.436700Z

https://github.com/thesephist/tabloid

mauricio.szabo 2021-06-15T23:49:18.437Z

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!

👀 1