Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Peaker
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
32 ms
·
301.
▲
by
Peaker
12y ago
I wasn't dissing C++ here (though I do believe C++ has quite a few downfalls..), just the STL. std::vector is completely reasonable implementation for a dynamic vector. std::map is somewhat unreasonable, because its non-intrusiveness r
302.
▲
by
Peaker
12y ago
The STL is an arbitrary collection of libraries. For any specific library within it, I might be able to. For example, the Linux kernel's list.h is far superior to std::list.
303.
▲
by
Peaker
12y ago
You can easily create interface vtables in C. These vtable (ptrs) don't have to be put into the objects themselves, which is a historic mistake that got thrown into C++ and other OO languages. The vtables can be passed as arguments to
304.
▲
by
Peaker
12y ago
The STL has huge mistakes like the completely useless "std::list". It also does a whole lot of unnecessary dynamic allocations due to the non-intrusive style used for all of its containers. I think the STL might be overhyped.
305.
▲
by
Peaker
12y ago
> C is not that fast. One of the major problems is that it's close to hardware. These days the most important factor to performance, in almost all programs, is memory accesses. Writing cache-friendly code is made relatively easy by
306.
▲
by
Peaker
12y ago
I get the same in C, with gcc's __attribute__((warn_unused_result)).
307.
▲
by
Peaker
12y ago
This kind of reasoning after-the-fact is easy. If it was the opposite, it would also not really be rocket science: "Good CEO's have immense values for companies. So of course companies would pay a lot more for those CEOs that do a
308.
▲
by
Peaker
12y ago
I agree that legs didn't actually evolve for walking exclusively. They evolved for a myriad of purposes, including walking, running, jumping, swimming, and more. The fact other parts of the body also evolved to facilitate these feature
309.
▲
by
Peaker
12y ago
Yes.
310.
▲
by
Peaker
12y ago
Wouldn't pool participants that use this extension to steal rewards be exposed to the pool simply due to their work being consistently challenged and thus lost? i.e: The pool would notice that certain participants contributions are con
311.
▲
by
Peaker
12y ago
Saying that "legs evolved for walking" is a completely legitimate statement. Something can be said to have evolved for a purpose -- as a short-hand for saying that random changes that helped that purpose increased fitness and were
312.
▲
by
Peaker
12y ago
Secret patents that can be accessed by anyone with a high-enough classification? It seems to defeat the original purpose of patents, which was to promote openness of inventions rather than secrecy.
313.
▲
by
Peaker
12y ago
Aren't blacked extremely over-represented in that list?
314.
▲
by
Peaker
12y ago
Not the same guy, but I moved to Haskell. Not due to Python 3, but because I've realized that to get the awesome features Python has, I don't have to give up the safety and performance I thought I had to.
315.
▲
by
Peaker
12y ago
I think people who enjoy dynamic typing have had bad experiences with bad static type systems earlier (C, C++, Java). Once you use a good static type system (ML, OCaml, Haskell) you see that dynamic typing isn't responsible for the joy
316.
▲
by
Peaker
12y ago
The IO stuff has almost nothing to do with monads. It is unfamiliar, but if you use static typing, at least reap the benefits of better error checking, no runtime null dereferences, etc.
317.
▲
by
Peaker
12y ago
Having raw pointers be represented as simple pointers, but accessed as if they were wrapped with an Option (or equivalent) could be nice. I agree that if the raw pointer is directly usable whether or not it may be null, then the pattern mat
318.
▲
by
Peaker
12y ago
Why are nullable Rust pointers checked with "is_null" and not pattern-matched against null vs. non-null?
319.
▲
by
Peaker
12y ago
The issue is about when the error is discovered. You can have "duck typing" in Haskell, for example, using type-classes. Instead of "letting the errors through" to run-time, you detect them at compile-time.
320.
▲
by
Peaker
12y ago
Completely ignoring errors relating to function calls with wrong argument counts does increase the probability of hidden bugs. That's not quite easy to avoid completely. Every time a function signature changes, all callers become buggy
321.
▲
by
Peaker
12y ago
> In fact, in haskell, everything is a function. There aren't any variables in haskell, but you can declare a function that takes no arguments and returns only one result This is a common myth [1]. [1]: http://conal.net&#
322.
▲
by
Peaker
12y ago
Inferior as compared with Western culture, I meant. Both Iran and Saudi Arabia are, IMO.
323.
▲
by
Peaker
12y ago
You mean there are significant subcultures of Saudi Arabia which don't place women as second class, support archaic death penalties for adultery, and would fall under the label "Saudi Arabian culture"?
324.
▲
by
Peaker
12y ago
It is not homogenous, but Saudi Arabian culture, for instance, is truly inferior.
325.
▲
by
Peaker
12y ago
It doesn't rely on anything. It's a correct optimization that does not change any behavior at all. It only speeds things up.
326.
▲
by
Peaker
12y ago
I have plenty of people I believe in. In the sense that almost whatever they say, I'd think really really hard before disagreeing. Even then, if I find them unconvincing, I'll eventually disagree. I personally don't hold Rob
327.
▲
by
Peaker
12y ago
If I analyzed the toolset I used years ago vs. now, I'd conclude the world is moving from Python to Haskell :)
328.
▲
by
Peaker
12y ago
Because side-by-side is very redundant, wasting almost half the screen on the exact same information. You don't have to "mentally apply" a patch, just ignore some lines of a certain color.
329.
▲
by
Peaker
12y ago
It depends on whether you delegate all memory allocations to the C file. In the C code I work on, dynamic memory allocations are considered expensive and problematic (fragmentation, runtime errors) so we prefer to move the responsibility fo
330.
▲
by
Peaker
12y ago
There are plenty of things Rob says I strongly disagree with, and even if you're very impressed with his work, your comment is still a very silly appeal to authority.
More ›