Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
innguest
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
79 ms
·
661.
▲
by
innguest
12y ago
How is it that they have no relation to Haskell functors? > Functors are, roughly speaking, functions from modules to modules ( https://realworldocaml.org/v1/en/html/functors.html ) Functors in haskell have
662.
▲
by
innguest
12y ago
20 years for language X do not bring the same amount of benefits as 20 years for language Y, as can be clearly seen if we compare Javascript and OCaml.
663.
▲
by
innguest
12y ago
I agree with you. I do not think immutability is good just because of concurrency; in fact that is never my motivation for taking advantage of immutability. I do it because then I have fewer bugs than if I used mutable memory cells.
664.
▲
by
innguest
12y ago
I'm not sure if you're joking, but when you have immutable variables they're pretty much like the mathematical variables that we've learned in school, and the benefits from that can be extremely huge (to the point that c
665.
▲
by
innguest
12y ago
"Or, you could just avoid the OS altogether" [and get 40 million requests per second]: http://highscalability.com/blog/2014/2/13/snabb-switch-skip-...
666.
▲
by
innguest
12y ago
It is only "your god damned job" because you can't let go of the fact you're programming on some machine. You should be trying to abstract from that so your programs are more portable and less implementation-dependent. W
667.
▲
by
innguest
12y ago
It's better to use one-time passphrases, I think.
668.
▲
by
innguest
12y ago
Please do unto them what they would have done unto you. Not only do you stand to make some money but you'll be helping correct a bad behavior.
669.
▲
by
innguest
12y ago
I'd find it hard to justify nowadays understanding that there's a lot useful in Type theory but then ignoring Category theory. Even Object Orientation can be related to CT as coalgebras. The type system in Haskell is not complex a
670.
▲
by
innguest
12y ago
Amazing work nonetheless, I'm looking at slide 50 now. Very interesting concept. I had to google "unfree data types". This seems to refer to data types that are unstructured and therefore no one thought of a way to represent
671.
▲
by
innguest
12y ago
Does Egison implement the Pattern Calculus? http://en.wikipedia.org/wiki/Pattern_calculus
672.
▲
by
innguest
12y ago
No, even IORef is stateless. You will know if there's state in a language if you can build a function that returns different results given the same values over time; IORef does not allow you to do that.
673.
▲
by
innguest
12y ago
The problem with your approach is it produces this mess: http://qt-project.org/doc/qt-4.8/widgets-analogclock.html When you could instead say just what you mean in functional programming: http://elm-lan
674.
▲
by
innguest
12y ago
There are answers to those questions but they do not help you to understand functional programming as a practice. Because you're asking the equivalent of "But how does OOP distinguish stack from heap from storage?" and it
675.
▲
by
innguest
12y ago
Wow, that looks like what was trying to come out of Perl. Very cool snippet!
676.
▲
by
innguest
12y ago
> this uses mutable objects, but doesn't actually rely on mutating them That is actually a really good compromise and a style I tend to stick to when coding Ruby/Rails.
677.
▲
by
innguest
12y ago
He's pretending python compiles to something sane. FP spoils you with great compilers.
678.
▲
by
innguest
12y ago
Yes of course, I did not mean to imply there are only those two (that would be weird for the two to be "lists" and "functions" out of all things). What I mean is the current mainstream languages are not the best of any c
679.
▲
by
innguest
12y ago
But Lisp and Haskell are arguably the best in their categories, namely programming in lists and programming in functions. Those two abstractions are several times more powerful than the overly constrained abstractions imposed by OOP. The po
680.
▲
by
innguest
12y ago
Let me stress your point to the parent: > letting the compiler figure out which one to call when and obviating the runtime exception entirely. That is how FP eliminates a whole category of bugs. You have to have "experience", w
681.
▲
by
innguest
12y ago
That's great if every time you said "FP" you replace it with "procedural programming" because that's what you just illustrated. FP has nothing to do with procedural programming at all, it is fundamentally diffe
682.
▲
by
innguest
12y ago
It's not unfamiliar, you got it right, the map I'm talking about is exactly like that maps you described, in that they both contain directions (all the possible origin-destination relationships between all the places) and you can
683.
▲
by
innguest
12y ago
In FP, State is transformed into something more formalized, namely parameters passed to other functions. So no one in FP is punting on State, we simply don't need it to accomplish those same goals. It's different from saying "
684.
▲
by
innguest
12y ago
That's actually not simple at all because it assumes an implementation, that is, a machine with RAM that changes. For instance, what does = mean between domain and email.split ? Who is equal to who? That question is a question that stu
685.
▲
by
innguest
12y ago
Thank you for the correction!
686.
▲
by
innguest
12y ago
You're absolutely right, but I wasn't trying to explain it, just showing how easy and natural it gets once you get past the hump. I was assuming the author already understands the benefits of FP but finds it difficult, and I was s
687.
▲
by
innguest
12y ago
Ok so here's one way to solve that problem in FP: We define what we have first (after all this is mathematics): EmailList = a list of Email Email = a string that goes "something" then "@" then "domain" Now
688.
▲
by
innguest
12y ago
I think it's better to solve the "math is scary" attitude problem by first showing how it actually helps and is useful. FP gets a lot easier if you know some basic abstract math.
689.
▲
by
innguest
12y ago
Can you say a few things about the parts that don't make sense to you? That would help me identify what beginners struggle with, as I'm developing tutorials for that reason.
690.
▲
by
innguest
12y ago
The reason you might be perceiving this is because once you're past the learning curve hump, the concepts become extremely obvious and the definitions stick to your head. It takes me a few seconds to rewrite foldl from rote understandi
More ›