Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
alex_smart
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
91.
▲
by
alex_smart
2y ago
>Some people call futures monads. Well that's because they are. And it is one of my favorite examples to explain the power of monads actually. Most humans prefer programming in the async/await style compared to using promises&#
92.
▲
by
alex_smart
2y ago
Haha the good old circular dependency problem. I am still surprised there are people in the industry that can’t recognise and solve these problems. It is such a classic pattern and its use arises in the wild all the time.
93.
▲
by
alex_smart
2y ago
Sure, but use of those patterns is not idiomatic in Python.
94.
▲
by
alex_smart
2y ago
>They eventually added a ServeHTTP() interface to grpc-go as an experimental way to use the HTTP server from the Go standard library but using that method results in a significant loss of performance. I don't quite see how that is p
95.
▲
by
alex_smart
2y ago
> The languages that dominated the 2000s (Ruby, Python, Javscript, PHP) were all more or less derived from Smalltalk One of these is not like the others. Javascript derives from Lisp (first-class functions, lambdas, closures), not Smallt
96.
▲
by
alex_smart
2y ago
The Hindi output is garbage.
97.
▲
by
alex_smart
2y ago
THIS right here is why I use emacs. Not that something like this is not possible with other open-source software, but the number of steps required to compile, debug, identify change required, compile, rerun, it is usually not worth your tim
98.
▲
by
alex_smart
2y ago
The majority of users are men on all dating sites and apps.
99.
▲
by
alex_smart
2y ago
Today: Don’t hire or train junior developers. Five years later: Why can’t I find any senior developers? Shocked pikachu face.
100.
▲
by
alex_smart
2y ago
Not according to constructivists.
101.
▲
by
alex_smart
2y ago
>You lose absolutely nothing. If you later want to handle the two cases differently, most IDEs allow you to inline the set_deadline method in a single key stroke. Problem with unintentional coupling isn't that you can't undo it
102.
▲
by
alex_smart
2y ago
>It's not like webpage space is expensive. It is not the webpage space. It is people's limited attention spans and ability to focus. A complex example is needed to properly motivate certain concepts, but too complex an example
103.
▲
by
alex_smart
2y ago
Almost all programming tutorials and even books to a certain extent suffer with the problem of terrible examples. Properly motivating most design patterns requires context of a sufficiently complex codebase that tutorials and books simply d
104.
▲
by
alex_smart
2y ago
On mac, iterm2 has excellent tmux integration. You start tmux in control mode (tmux -CC) and it opens a new window for that session with all the multiplexing handled by the terminal instead. You get to use all of your normal terminal keyboa
105.
▲
by
alex_smart
2y ago
> Branching on "expression type" and column type in your first example is also unnecessary It’s not?
106.
▲
by
alex_smart
2y ago
Consider evaluating an expression like "col1 + col2 == col3" A tree based evaluator has to do something like - for (int i = 0; i < df.size(); i++) { // switch on expression type (column, binary operator,
107.
▲
by
alex_smart
2y ago
I found this by looking at spark source code to figure out what they were doing under the hood to deal solve this problem. :)
108.
▲
by
alex_smart
2y ago
I recently implemented my own expression evaluator in java for in-memory data frames, and once you think about doing that deeply, you very quickly understand the need for bytecode. If you directly evaluate the expression using a tree repres
109.
▲
by
alex_smart
2y ago
One thing that wasn't mentioned in the article that I wished it did was the size of the compiled binary with and without final. Only reason I would expect the final version to be slower is that we are emitting more code because of inli
110.
▲
by
alex_smart
2y ago
In case you didn’t know, doesn’t delete the commit. You can use `git reflog` to find the commits you were recently on and recover your code.
111.
▲
by
alex_smart
3y ago
Not sure if you’re being facetious? There were not 100 people of the same calibre as JvN in the US or even the world surely.
112.
▲
by
alex_smart
3y ago
Probably not. The figure is the right order of magnitude.
113.
▲
by
alex_smart
3y ago
I meant 3 tries in total, not just the random guesses.
114.
▲
by
alex_smart
3y ago
Excellent work! We can also probably prove that 3 guesses are not enough by some sort of adversarial argument. That is, instead of having the color be fixed at the start, imagine that the game picks the colors adversarially to try to make t
115.
▲
by
alex_smart
3y ago
Assuming the score is 100-Euclidean distance, you should be able to triangulate to the correct answer after three random guesses. Triangulation will give you two candidates for the correct colour, so if you choose between them randomly you
116.
▲
by
alex_smart
3y ago
Great-grandparents? The window for grandparents might be closing! If you have your kids at 35, and your kids have their kids 35, you are 75 by the time the grandchild turns 5. The amount of quality time you might have to spend with your gra
117.
▲
by
alex_smart
3y ago
IMHO, the good old method of skimming through the table of contents, reading the preface and perhaps the first couple of chapters is going to be a much higher fidelity indicator of whether a book is worth your time than reading an AI genera
118.
▲
by
alex_smart
3y ago
To check what the actual zero-abstraction version of the select_all_matches function would run in, I created a simple c++ function that accepts the string buffer and the simply calls buffer.find until it finds all matches and pushes the ma
119.
▲
by
alex_smart
3y ago
It matters if the pre-money valuation at which the new shares are issued is inaccurate. You own 10% of a company that was valued in the last round of funding at 10 million dollars. You have put in significant amount of work since and compan
120.
▲
by
alex_smart
3y ago
And what is wrong with someone figuring out for themselves and explaining to others why some suggestion makes sense logically, rather than just quoting the manual?
More ›