Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
emih
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
emih
6mo ago
I like the story in the article, but I think it tries to create some drama where there isn't any. I think it's great that a lot of work is done using proof assistants, because clearly it's working out for researchers; diversi
2.
▲
by
emih
6mo ago
Mathematically it's quite pretty, and it gives you elegant partial application for free (at least if you want to partially apply the first N arguments).
3.
▲
by
emih
6mo ago
I didn't know Standard ML, that's interesting. And yeah I think this is the way to go. For higher-order functions like map it feels too elegant not to write it in a curried style.
4.
▲
by
emih
6mo ago
Those are nice examples, thanks. I was imagining you might achieve this optimization by inlining the function. So if you have getClosest(points, p) = findInTree(buildTree(points), p) And call it like myPoints = [...] map (getCl
5.
▲
by
emih
6mo ago
That's a very good point, I never thought really about how this relates to the execution model & graph reduction and such. Do you have an example of a function where this can make a difference? I might add something to the article
6.
▲
by
emih
6mo ago
Glad to hear the article did what I meant for it to do :) And yes, another comment mentioned that Scala supports this syntax!
7.
▲
by
emih
6mo ago
It's not that serious :)
8.
▲
by
emih
6mo ago
You can still do this though: let result = (barbalyze(c, d, $) . foobinade(a, b, $)) input Or if you prefer left-to-right: let result = input |> foobinade(a, b, $) |> barbalyze(c, d, $) Maybe what isn't clea
9.
▲
by
emih
6mo ago
Thanks for sharing, interesting to see that people writing functional languages also experience the same issues in practice. And they give some reasons I didn't think about.
10.
▲
by
emih
6mo ago
That's a fair point, they are all isomorphic. The distinction is mostly semantic so you could say they are the same. But I thought it makes sense to emphasize that the former is a feature of function types, and the latter is still tech
11.
▲
A case against currying
(emi-h.com)
118 points
by
emih
6mo ago
|
130 comments
12.
▲
Wordle as a Two-Player Game
(emi-h.com)
3 points
by
emih
7mo ago
|
0 comments
13.
▲
by
emih
7mo ago
Machine learning is definitely enabling writing _proofs_ within a proof assistant, and I'm sure it will help to make formal verification more viable in the future. Where it cannot (fully) replace humans, is writing the _theorems_ thems
14.
▲
by
emih
9mo ago
Graph coloring is NP-hard so it would be very difficult to replace it with an O(1) algorithm. If you mean graph coloring restricted to planar graphs, yes it can always be done with at most 4 colors. But it could still be less, so the answer
15.
▲
by
emih
10mo ago
You can't just put words in the author's mouth. It's also not true at all. For instance, teaching in primary school is a field that is dominated by women where I live, and I (and I agree with the points described in the artic
16.
▲
by
emih
1y ago
The Boost algorithm computes the vertex-biconnected components rather than the edge-biconnected components, which are two different but related concepts. Articulation points are also more related to vertex-biconnectedness than to edge-bicon
17.
▲
by
emih
1y ago
That one is intentional. Note: a tree edge (u, v) is a bridge if and only if low[v] is strictly greater than the entry time of u. Here 4 is the entry time of that node. (For convenience I made sure that the node labels are just the DFS entr
18.
▲
by
emih
1y ago
Whoops, you got me. Fixed! At some point I relabeled the vertices to match the DFS order, but I must have forgotten to update this example.
19.
▲
by
emih
1y ago
I used to get annoyed by these kinds of questions, but honestly I love talking about things I'm passionate about anyway and I want to get more people interested in the subject. So, I'm happy to answer questions like this and simul
20.
▲
by
emih
1y ago
Basically you get a bunch of problems (ranging from "check if a number is prime" to complicated graph theoretical problems) and some time to figure them out and code a correct & efficient solution. Often there are computer sci
21.
▲
Biconnected components
(emi-h.com)
53 points
by
emih
1y ago
|
20 comments