Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
marhee
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
31.
▲
by
marhee
2y ago
> C++ breaks parametricity even with normal templates I might be wrong here, but as I understand it "parametricity" means loosely that all instantiations use the same function body. To quote wikipedia: "parametricity is an
32.
▲
by
marhee
2y ago
Interesting points. > Implementing generics in this way breaks parametricity. Simply put, parametricity means being able to reason about functions just from their type signature. You can't do this when the function can do arbitrary
33.
▲
by
marhee
2y ago
I read it in Dutch.
34.
▲
by
marhee
2y ago
I believe one of the founders of Booking.com has had some similar experience (source: "De Machine", the book about Booking.com) and after 4 years of travelings & yoga etc. he sneaked back in into the company. Most of his cowor
35.
▲
by
marhee
2y ago
Side note: “write everything twice” (WET) is originally meant as a reaction to DRY (“don’t repeat yourself”). I think the author uses the credo here for something else (which is still good advice).
36.
▲
by
marhee
2y ago
Did you not offer to rewrite it in Python? I was a techical director at a company where we worked a lot with frontend contractors. Some loved typescript others were fans of vanilla js. When the balanced tipped there were rewrites from one t
37.
▲
by
marhee
2y ago
Why does “I contend” feel awkward to you? It is more specific than “I differ” because that could also mean that the author physically differs, which is awkward, while “contend” is specifically used for disagreement on some topic? Does “I co
38.
▲
by
marhee
2y ago
I believe “database independence” is an anti-pattern in 99% of the cases. Abybody with me? I’ve had great success by not using a database abstraction layer: - you can invest the time you spend on being a generalist on many databases to be a
39.
▲
by
marhee
2y ago
Coroutines are just multiple call stacks. If coroutine A calls coroutine B then B excutes on its on stack and can ‘yield’ a value back to A. Yielding is just a return across stacks without destroying the current stack. So A continued with t
40.
▲
by
marhee
2y ago
“Knowledge is not free; you have to pay attention”(Feynman)
41.
▲
by
marhee
2y ago
I believe metafont, created by Knuth for Tex, is an exception here in that it does use strokes.
42.
▲
by
marhee
2y ago
Worst case scenario you service is not available for a couple of hours. In 99% of business, customers are totally okay with that (if it's just not every week). IRL shops are also occasionally closed due to incidents; heck even ATMs and
43.
▲
by
marhee
2y ago
Interesting but I am not sure I understand this: >> contact-and-removal operation takes constant time, the worst-case time complexity of the algorithm is O(n). How is the contact-and-removal operation constant time? How can that assum
44.
▲
by
marhee
2y ago
> developers have a hope of being able to determine which #includes can be removed and which can't Can’t a modern compiler do that already? Didn’t google but seems an obvious compiler feature at the very least behind a warning flag.
45.
▲
by
marhee
3y ago
The Stugna anti-tank-guided-missile seems to indeed have this feature: "...that is connected to the firing unit by a cable, allowing it be used at distances up to 50 metres (160 ft) away" Source: https://en.wikipedia.or
46.
▲
by
marhee
3y ago
I suspect it is based on https://pkg.go.dev/runtime#Caller
47.
▲
by
marhee
3y ago
I remember "Dune 2" (1992) could use a co-processor? Not sure, we never had a machine with a co-processor but a friend had and he said that at start-up the game said something like "Co-processor found - let's use it!&quo
48.
▲
by
marhee
3y ago
Ha! Experiences forearm and shoulder pain. Proceeds to mention casually he's into rock climbing. DisplayS photos of games where (jerky) mouse mileage is, to put is mildly, excessive. Talking about elephants in the room here... I don&#x
49.
▲
by
marhee
3y ago
Yes, there is a generation number in the reference. It is checked against the generation number of the allocation that is stored in the allocation: void __check(GenerationalReference genRef) { uint64_t currentGeneration = *(uint64_t
50.
▲
by
marhee
3y ago
Yes, I am wondering too. How would it even stop use-after-free and double-free? The "check" function accesses the allocation because it needs the generation number of the allocation. So basically, the reference needs to access the
51.
▲
by
marhee
3y ago
It may be the case that you’re ambushed by critical reactions. Prime yourself before reading comments, get your guards up a little. This puts some distance between you and the comment(er). Your skin may still be hit, but not your soul. Seco
52.
▲
by
marhee
4y ago
> The problem is that doing that will very quickly tell you that modern society fucking sucks. Almost nothing works, everyone hates each other, things that are important get ignored because of greed, and most importantly, there's al
53.
▲
by
marhee
4y ago
> And I started taking antihistamines daily. Antihistamines can make you drowsy, ie. "brain foggy": (Quoting the web) Side effects of antihistamines * sleepiness (drowsiness) and reduced co-ordination, reaction speed and judgem
54.
▲
by
marhee
4y ago
You could reuse df (as the method presumably change df), in addition: - you have more room to comment what the intention of the code/call is - you have room to handle / check for errors For example, the "sort_values" and
55.
▲
by
marhee
4y ago
> The pipe operator, |>, passes the output of a function to the first argument of the next function. So, instead of writing something like: foo(bar(baz(new_function(other_function(my_input))))) You have the option to write: my_input
56.
▲
by
marhee
4y ago
> ...and began self-medicating with drugs and alcohol. Looking back, it was also during this time period that I had my first dissociative experiences, in which elements of my sense of self became separated in a way that impaired my abili
57.
▲
by
marhee
4y ago
Because of Price’s law: the square root of number of employees do about 50% of the work (that creates value). So 10.000 emmployees means 100 persons do 50% and 9900 the other 50%. This mean that a team of 4 is the most efficient size. Howev
58.
▲
by
marhee
4y ago
Better a small boss than a big servant, right? (Chinese proverb I believe) No need to hesitate - you've worked 10 years in FAANG, you'll get 10 jobs offers per month if needed. So, just do it. But remember, freedom is responsibil
59.
▲
by
marhee
4y ago
What's the advantage of this approximation in python/code? I can see it being useful analytically, but what's the advantage in code? The formula has an ^n in it, so doesn't it have the same complexity as n! ?
60.
▲
by
marhee
4y ago
"Lines" is short for "lines of code" I would say so comments and whitespace would not count. But holistically speaking you are right of course.
More ›