HN user

nkh

1,201 karma
Posts17
Comments88
View on HN

What a welcome post. The whole reason I come here is to get thoughtful input from smart people, and not what I could get myself from an LLM. While we are at it; Think your own thoughts as well :) I know how easy it is to "let it come up with a first draft" and not spend the real effort of thinking for yourself on questions, but you'll find it's a road to perdition if you let yourself slip into the habit. Thanks to all the humans still here!!

The Clojure ecosystem embraced react early and built on top of it (with OM, Reagent and Re-Frame (for SPAs). The UI = f(applicationState) is definitely viewed as the correct approach. In other words, gather all your application state in one place. Whenever it changes, pass all of it to a single function to produce the next version of your UI.

Replicant takes this idea and runs with it, narrowing it down even further: The function is a pure function that returns the new UI as data. Replicant uses this representation to update the DOM accordingly.

That’s it. No partial updates, no mutable objects, no network activity from UI components. It’s basically a templating system. You give it data, and it returns a view. Whether that data comes from a DB or any other place, it's just a clojure data structure. Here is the article that most of this comment is lifted from: https://replicant.fun/top-down/

One thing I've always liked about the Clojure community, is that they are obessesed with state. I think they have correctly identified, that when things go sideways, it is because state management was involved in some way. This is a cool front end approach using datastar to put all of the state on the backend and side step front end state management entirely. There are some other really interesting things happening with electric clojure and a new "framework" called Replicant. Of all of them, Replicant seems the most intriguing to me personally. If it didn't exist, I think I would be trying to use datastar as this article outlines.

S3 Tables 2 years ago

If I am currently querying s3 parquet files with DuckDb, could I still do that with s3 tables, and what other advantages does this offer?

All these solvers use branch and bound to explore the solution space and "fathom" (i.e. eliminate candidate search trees if the lowest possible value for the tree is above an already found solution). The upper bound that the solver calculates via pre-solve heuristics and other techniques does vary from solver to solver. However, they all have a place for "Upper bound", and there are mechanisms in all of these solvers for updating that value in a current solve.

If this paper were a complementally orthogonal implementation from everything that exists in these solvers today, if it can produce a new upper bound, faster than other techniques, it should be fairly plug and play.

I have an undergrad OR degree, and I have been a practitioner for 18 years in LP/MIP problems. So I understand the current capacities of these solvers, and have familiarity with these problems. However, I and am out of my depth trying to understand the specifics of this paper, and would love to be corrected where I am missing something.

Why would it need to replace them? From the article, they claim they have found a way to reduce the upperbound faster when searching large Integer problems. I don't see how that effects the current searching process. All of these solvers you can enter in an upperbound yourself if you have knowledge of the problem and know a previous solution. So it seems if this is just a programmatic way of reducing the upper bound, it should fit right in with current approaches. What am I missing?

For now, the new algorithm hasn’t actually been used to solve any logistical problems, since it would take too much work updating today’s programs to make use of it. But for Rothvoss, that’s beside the point. “It’s about the theoretical understanding of a problem that has fundamental applications,” he said.

I don't see how "it would take to much work updating today's programs". Most domain specific models call out to Gurobi, CPLEX, or FICO solvers for large problems, and open source ones like SCIP for the small ones. There is a standard MPS format where you can run exchange models between all of these solvers, and the formulation of the problem shouldn't change, just the solving approach inside the solver.

Can someone enlighten me? I could see if they are arguing, this will require a new implementation, and if so, there is a ton of benefit the world would see from doing so.

I wondered that initially as well. There are many factors at play:

1. Doing that would juice it. https://en.wikipedia.org/wiki/Streisand_effect

2.Each of these institutions brands itself on providing quality information, and in the US we pride ourselves on the first amendment. So the brand hit for censoring isn't worth it.

3. Chomsky is/was tenured and couldn't be fired the same way a journalist could

If you look at manufacturing consent, they make it clear that good stuff can get through media. It is just so much harder, and therefore there is less of it overall. But that doesn't mean nothing can get through.

"When fox news called Arizona their viewers left them -- so fox jumped on election denial precipitating events which led to Jan 6th. What is the analysis here, say?"

From the first filter in the article: Mass media firms are big corporations. Often, they are part of even bigger conglomerates. Their end game? Profit. And so it’s in their interests to push for whatever guarantees that profit. Naturally, critical journalism must take second place to the needs and interests of the corporation.

"it doesn't explain the existence of trump in the first place: his base chose him."

2015/2016 Trump was a ratings goldmine. See point #1 about media profits.

When type checking is needed, I find the Truss library* does the trick quite well.

As for the syntax, there is very little, which can make it a harder lift but once you have the hang of it you won't deal with the issues identified in the parent comment.

* https://github.com/taoensso/truss

For what it's worth (speaking only for myself), I could not live without the threading macros (-> and ->>) in Clojure. Below is an example of some very involved ETL work I just did. For me this is very readable, and I understand if others have other preferences.

(defn run-analysis [path]

  ;load data from converted arrow file
  (let [data (load-data path)]

    (-> data
        ;; Calc a Weeknumber, Ad_Channel, and filter Ad_Channel for retail
        add-columns
        ;; Agg data by DC, Store, WeekNum, Item and sum qty and count lines
        rolled-ds
        ;; Now Agg again, this time counting the weeks and re-sum qty and lines
        roll-again)))

;;Run the whole thing

(time (run-analysis arrow-path))

This code processes 27 million lines in 75 seconds (shout out to https://techascent.github.io/tech.ml.dataset/100-walkthrough... library)

DuckDB is "column oriented" vs "row oriented". I have found it 10x* faster for queries on data your size compared to SQLite or MySQL or Postgres. The added advantage of it being a single file is very nice as well.

*I use the HoneySQL (clojure) library to programmatically build up queries and execute them via the JDBC driver.

We should buy the assets put them in a social wealth fund (like Norway's). https://www.peoplespolicyproject.org/projects/social-wealth-...

It's a very good way to get out of this feedback loop, and I don't ever see anyone mention this very obvious solution.* The linked paper shows all of the different mechanisms that it could be accomplished. But when people go bust, it's even more straight forward.

* Obviously, the reason it isn't talked about in main stream circles is that it would work really well (as it does in Norway and Alaska) and dispossess the ultra wealthy (and the ultra wealthy own those outlets). But thought I'd share the idea here if case people haven't been exposed to it.

This Russell quote seems appropriate:

Thus, to sum up our discussion of the value of philosophy; Philosophy is to be studied, not for the sake of any definite answers to its questions, since no definite answers can, as a rule, be known to be true, but rather for the sake of the questions themselves; because these questions enlarge our conception of what is possible, enrich our intellectual imagination and diminish the dogmatic assurance which closes the mind against speculation; but above all because, through the greatness of the universe which philosophy contemplates, the mind also is rendered great, and becomes capable of that union with the universe which constitutes its highest good.

Bertrand Russell -The Problems of Philosophy

Hey Kevin, what led you deprecate cljs-d3 in favor of C2? In your Clojure conj talk, you mentioned a JS implementation change caused your code to break. Was that the main motivation, or where there other reasons?