Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Peaker
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
42 ms
·
421.
▲
by
Peaker
13y ago
"Addable" will not actually be more informative than "Monoid", to someone who doesn't know "Monoid". "Monoid" will be very informative to anyone who learned it from mathematics. A "Monoid&qu
422.
▲
by
Peaker
13y ago
Multimethods are not quite as powerful as type-classes. Type-classes can dispatch on any part of the type signature, whether it is an argument, result type, parameter to a type, etc.
423.
▲
by
Peaker
13y ago
I don't think people tend to write this kind of code, per se. Rather, it "evolves". It starts as: return foo == null ? error_handler(bar) : foo; And someone realizes error_handler actually does nothing, so replaces all
424.
▲
by
Peaker
13y ago
The staging area is sort of a UI for "interactive" commit. But one that can persist the partial commit state across multiple commands, or until you can finish the work tomorrow. An interactive commit interface which loses the ac
425.
▲
by
Peaker
13y ago
I think the people well-versed enough in git to use "git add -p" to review their own changes, and commit them separately, are the same people that would correctly test their commits. At least from my small sample size of people,
426.
▲
by
Peaker
13y ago
That's a bad example because this code does not use the Monoid abstraction, but rather the Buffer Operations abstraction which does expose performance costs.
427.
▲
by
Peaker
13y ago
If you split it into little parts, and those parts have no sensible meaning on their own or no sensible interface and semantics -- then you're absolutely right. Testing such parts will be difficult, too, because of this. But if instead
428.
▲
by
Peaker
13y ago
Because operational semantics (of contemporary computers, at least) are very different from a simple denotational semantics. We have to bridge that gap: 1) Either use a compiler that hides away the operational details 2) Or use a language t
429.
▲
by
Peaker
13y ago
The problem here is that you trust the organization to police itself, whereas it has little incentive to actually do so effectively. The cases of caught individuals seem to have gone under-punished, as they sound worthy of prison time. Also
430.
▲
by
Peaker
13y ago
I think having simple and direct denotational semantics necessarily means having relatively complex, indirect operational semantics (e.g: Haskell). Having a simple and direct operational semantics necessarily means having complex and indire
431.
▲
by
Peaker
13y ago
So, you're claiming this, despite 0 people having ever been sent to prison due to this?
432.
▲
by
Peaker
13y ago
> Imagine applying that idea to any other field, and keep in mind the unintended consequences The difference from other fields, is that the consequences in other fields are public. If a soldier shoots someone, that someone is dead and ca
433.
▲
by
Peaker
13y ago
In fp, those containers are known as modules.
434.
▲
by
Peaker
13y ago
If finding a job isn't difficult for you, would you stay? I wouldn't stay for a company that shows such contempt for its employees and such incompetent waste of everybody's time.
435.
▲
by
Peaker
13y ago
Isn't a common way of combining entropy sources just XOR'ing them together?
436.
▲
by
Peaker
13y ago
If the shares are given after an investment of $1 million, then 0.5% of the company is $5000, just by a conservative evaluation that takes only the investment value into account. If you think the shares have a guaranteed future value, the
437.
▲
by
Peaker
13y ago
It might reduce it, if it XORs away entropy that was previously XOR'd into it.
438.
▲
by
Peaker
13y ago
If the RNG instructions are malicious, they can reduce entropy, by for example XOR'ing into the result previous register values that held the previous entropy source values.
439.
▲
by
Peaker
13y ago
If your own government spies on you, it is a tool of tyranny, and easily destroys democracy. If some foreign government spies on you, it is unpleasant to think about, but it holds little to no power over you, so it's much less of an is
440.
▲
by
Peaker
13y ago
deterrence doesn't work when what you're doing is secret.
441.
▲
by
Peaker
13y ago
He sounds like quite a competent, intelligent "college dropout". Do you think him being a "dropout" means much?
442.
▲
by
Peaker
13y ago
autoconf is operating within difficult constraints (only /bin/sh and make are assumed to be installed), and uses shell scripts that write shell scripts that write shell scripts. A) autoconf is not similar at all to an API layer hi
443.
▲
by
Peaker
13y ago
The right way to resolve such bugs is to have abstraction layers that hide these awful hairiness. If hair regarding low-memory conditions, Internet Explorer and other things all appears in the same function, some abstractions are definitely
444.
▲
by
Peaker
13y ago
It isn't enough that they are obvious when they are pointed out explicitly. If they were obvious, you'd find other articles/authors explaining the same issues?
445.
▲
by
Peaker
13y ago
It's nice to be able to have productive discussion on the internet! We can agree on almost all points, I think. The CS 101 bit you mention is a good point: intrusiveness matters for asymptotics in CS, and should be taught in academia,
446.
▲
by
Peaker
13y ago
When you need to memmove your whole vector you're going to thrash a lot more of the cache lines than when you touch 2 neighbor cache lines.
447.
▲
by
Peaker
13y ago
The deepest insights are often obvious in hindsight.
448.
▲
by
Peaker
13y ago
This is a strawman. This isn't a useful case for lists. Since he needs to scan the list to find the position to add/remove to/from. If he used an intrusive list, the removal from a vector-with-list would be faster in a list a
449.
▲
by
Peaker
13y ago
> 1: you care about ordering - often you don't care about ordering and in that case, there is no need for a linked list because you can achieve O(1) insertion & removal then too: insertion can always be at the end, removal can b
450.
▲
by
Peaker
13y ago
I disagree. Will reply later, too long mto reply on my phone.
More ›