Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Peaker
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
25 ms
·
211.
▲
by
Peaker
12y ago
So it's just a matter of abstracting less or more of the implementation details. In Haskell, the mutation necessary to implement pure, lazy computation is an implementation detail, just like manual memory management or quantum fluctuat
212.
▲
by
Peaker
12y ago
> Imperative languages really are closer to how our minds work everyday Why do you believe this? I think it is a cognitive bias at play, where you've been trained to think this way until it comes natural, and now it's hard to s
213.
▲
by
Peaker
12y ago
I learned Make, but it is just a terrible tool: A) It is a 2-phase build system (read DAG, traverse DAG) whereas code generation requires an N-phase build system (build some files, detect more dependencies, build more files, ...) B) It has
214.
▲
by
Peaker
12y ago
We established the cognitive bias to rationalize it as good. What would the cognitive bias to rationalize it as bad be? The reason I believe it is bad is because it violates the spirit of the 4th amendment. It gives incredible power to an o
215.
▲
by
Peaker
12y ago
I include myself, of course. But I don't work for the NSA, so I don't have any particular need to rationalize their behavior as good.
216.
▲
by
Peaker
12y ago
Less prone to cognitive biases, though. People all want to feel that they're doing good things, and not evil. They'll rationalize all sorts of things to believe that.
217.
▲
by
Peaker
12y ago
The NSA is looking for top talent. For them, the alternative is not hunger, but a slightly worse salary or less interesting job.
218.
▲
by
Peaker
12y ago
Unless your compiler strips them out!
219.
▲
by
Peaker
12y ago
Would you say these languages are impractical because of their stylistic choice to use operators? I think people have a preconception that "Haskell is not practical" -- and then anything that they do not find appealing becomes a s
220.
▲
by
Peaker
12y ago
You're assuming the information being returned is a boolean. As a static typing fanatic, I would not return an int to indicate a boolean result. if (0 == number_of_students(context, classroom))
221.
▲
by
Peaker
12y ago
The alias is just adding confusion. If I see such an alias in code, I would wonder where else that function is used in the function, and be confused that it isn't. Not to mention it becomes more verbose once you make that alias a const
222.
▲
by
Peaker
12y ago
That's why my rule is shorter first :-)
223.
▲
by
Peaker
12y ago
A lot of us find Yoda conditions easier to read: if(0 == very_long_function_name_here(param1, param2)) { Tells me a lot after I've read a little of the line, whereas: if(very_long_function_name_here(param1, param2) == 0) {
224.
▲
by
Peaker
12y ago
What exactly do you feel is obfuscated? There's $, backticks, >>=, >>, ++, ., and <-. All of these are very frequent things you use in Haskell, and deserve short notation. Besides >>, they're all learned in da
225.
▲
by
Peaker
12y ago
In C or C++, there are even more unfamiliar operators: >>= += <<= -= *= ... ?: ! ~ ^ % ...
226.
▲
by
Peaker
12y ago
It's very hard to get started with, indeed. Especially without mentoring. But this does not mean it's an impractical language.
227.
▲
by
Peaker
12y ago
It's a bit funny, the most unreasonable thing about emacs are its default key bindings... Some of the most frequent operations, like switching between buffers or windows takes 3 key strokes!
228.
▲
by
Peaker
12y ago
EDIT: I now see what you mean, sorry for misunderstanding. The feature sounds useful, but the reason I misunderstood you is that you used the same syntax that represents array-to-ptr degradation, which made me think you were confused :-) I&
229.
▲
by
Peaker
12y ago
No. An array has size (N * sizeof(element)). Arrays are immutable in their address in the same sense that any lvalue is immutable in its address. int x; int y[2]; The two declarations above are similar, one happens to be an (int).
230.
▲
by
Peaker
12y ago
Arrays are not necessarily located at compile-time-known positions. The compiler translates all symbolic names to addresses, regardless of whether it is an array or not.
231.
▲
by
Peaker
12y ago
C++ inherited this particular complexity from C, so it naturally falls out of a complexity comparison.
232.
▲
by
Peaker
12y ago
That's ordinary C89 behavior, not a C99 feature, and I'm pretty sure Microsoft supports it too. The C99 feature here is VLA (variable-length array), arrays whose length is a runtime value. If you change m and n to be constants, it
233.
▲
by
Peaker
12y ago
I know what the patents filed on my behalf entail. I know the claims. I collaborated on their "invention". The fact it was granted a patent is not very note-worthy. It is not representative of anything useful. It doesn't repr
234.
▲
by
Peaker
12y ago
I know how patents work and I'm listed as inventor on some. http://www.joelonsoftware.com/items/2013/07/22.html Is the reason why I claim most software patents are nonsense.
235.
▲
by
Peaker
12y ago
"Me with a patent and 25 years of innovation in key major products like the playstation network?" You might be an excellent engineer, but this is a terrible pitch for yourself. A software patent is meaningless to most software dev
236.
▲
by
Peaker
12y ago
Again, in your scenario read&write are symmetric. In Flash, they're not.
237.
▲
by
Peaker
12y ago
But the read and write are symmetric, of same sizes.
238.
▲
by
Peaker
12y ago
It's not RAM-like, because you can read small parts of keys, but have to write large ones.
239.
▲
by
Peaker
12y ago
Nameless writes save an indirection layer -- but quite a cheap one! They add significant latency to write operations, though, which is a high price to pay for such a small gain.
240.
▲
by
Peaker
12y ago
The C preprocessor, combined with the EVALn macros, is Turing-Complete-up-to-N-iterations, so not quite a bar stool.
More ›