Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Chattered
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
17 ms
·
31.
▲
by
Chattered
11y ago
Functors are modules that depend on another module. This works like a function whose argument is a module with type given by a signature. There isn't anything exactly analogous in Java. Functor application can introduce new type defini
32.
▲
by
Chattered
11y ago
Which means you are now forced to write the boilerplate pure = return (<*>) = liftM2 ($) In Scala, you get it for free for any monad.
33.
▲
by
Chattered
11y ago
I haven't coded in C++ for a very long time, but won't any implementation of that function, and additional templated functions which call it, only get checked at template expansion time? As I understand, buggy templated functions
34.
▲
by
Chattered
11y ago
I haven't used F# much, but aren't computation-expressions just a Haskell like do-notation, which you get for free because the async type constructors are a monad? Ocaml and Haskell should have this, at least, with lwt and its syn
35.
▲
by
Chattered
11y ago
Not generally true. I'd have given up on Haskell yonks ago if that's all type inference was good for. In many cases, I just can't figure out the types of arguments without stopping completely and thinking really hard, and I u
36.
▲
by
Chattered
11y ago
For some wider context of his views, check out his other articles, particularly http://www.faculty.ucr.edu/~eschwitz/SchwitzAbs/CrazyMind.ht... . I don't get the impression that Schwitzgebel takes analytic phi
37.
▲
by
Chattered
11y ago
I'm thinking of this line from the Hippocratic Oath, which I understand to be quite historical: "Whatever, in the course of my practice, I may see or hear (even when not invited), whatever I may happen to obtain knowledge of, if i
38.
▲
by
Chattered
11y ago
In terms of things I want hidden, the first thing that springs to mind is my medical records, which I'd like to keep between me and my doctor(s). My understanding is that, historically, governments and just about everyone have respecte
39.
▲
by
Chattered
11y ago
That FP subtracts from everything else can be switched around pretty easily. If you, as a client, can prove that you do not mutate the data structure that I hand back to you, then I don't have to worry about you corrupting my alias of
40.
▲
by
Chattered
12y ago
Its first compiler was written in Ocaml.
41.
▲
by
Chattered
12y ago
For some context, conal did the pioneering work on "classic" Functional Reactive Programming with Hudak, before the Haskell language had moved to monadic IO. Originally, IO in Haskell was done based on streams as in Miranda from w
42.
▲
by
Chattered
12y ago
> Aside, I agree on the List monad thing. I never ever use the list monad, why would I. I use monad library functions on lists happily, and use the do-notation, particularly when I'm thinking in terms of non-deterministic computatio
43.
▲
by
Chattered
12y ago
But if that external usb drive is mounted at the time (as in the case of the user this thread is about), then all data on that drive will be deleted. For this reason, the recommened way to use things like rsnapshot is to have your backup di
44.
▲
by
Chattered
12y ago
I switched from QWERTY to Dvorak over ten years ago, and I am crippled going back to QWERTY. I apologise routinely to students and colleagues whilst using their keyboards, explaining that I'm no longer used to the QWERTY layout.
45.
▲
by
Chattered
12y ago
The n is just n: it's the number you are subtracting from. Of course, it's impractically slow, but I believe it's just example code in a opening tutorial for the Nock language.
46.
▲
by
Chattered
12y ago
I'm not sure on the specifics here, but I'd have thought that subtraction would be O(n). To perform n - m on a simple register machine with only increment, you just count from m up to n (and count from 0 up to n, outputting 0 if y
47.
▲
by
Chattered
12y ago
The macros davidxc mentions are a big win. The important point about Lisp macros is that they are not a separate technology you have to learn, as you have with Camlp4. Once you know Lisp, you automatically know macros. Lisps are also much b
48.
▲
by
Chattered
12y ago
* you don't need to read AMOP to use CLOS. It's there if you want to know 'MORE'. Much more. Much more than you ever wanted to know about reflective OOP. Alan Kay of Smalltalk fame recommended the book as the best book o
49.
▲
by
Chattered
12y ago
In Haskell, I have the luxury of infix arithmetic, but I'll still happily write sum [a,b,c,d,e] when I have a lot of summands. It's just neater, especially when you format as sum [summand1 ,summand2
50.
▲
by
Chattered
12y ago
But how did you get the collection in the first place? If all you wanted to do was print the elements, you would have made it a collection of strings, and populated it by calling a "toString" function each time you added an elemen
51.
▲
by
Chattered
12y ago
Using the down arrow requires me to take my fingers off the home row.
52.
▲
by
Chattered
12y ago
http://www.sizefivegames.com/games/ben-there-dan-that/ It's an extremely self-referential parody of adventure games, made by guys who clearly love the genre. I found it a lot of fun.
53.
▲
by
Chattered
12y ago
I'm happy to be corrected, or pointed to relevant literature.
54.
▲
by
Chattered
12y ago
It comes from my knowledge of functional programming and the problems that come from trying to do this stuff by passing dictionaries. I'm not a Scala programmer, so maybe I've missed some subtleties, but I doubt it. Here's Ed
55.
▲
by
Chattered
12y ago
> If anything, typeclasses make a language less functional, since they're a language primitive which could be implemented with functions instead (by passing records explicitly) I'm not exactly sure what you're thinking of
56.
▲
by
Chattered
12y ago
I have to imagine the arguments or excuses that the author is parodying. I guess they are excuses that there are more violent games because violent interactions are easier to simulate than non-violent interactions. Rather than do a parody,
57.
▲
by
Chattered
12y ago
Speaking as your brother, the thing that tipped me onto the preconceptions thing was the odd student who, with no prior programming experience, declared "oh, I get it. It's just maths!" I was the TA on the Edinburgh Haskell c
58.
▲
by
Chattered
12y ago
Mathematicians prefer obscure technical terms to misleading and restrictive metaphors, because obscure terms force you to refer solely to (and eventually internalise) a precise and abstract definition. I think this is the case for functors,
59.
▲
by
Chattered
12y ago
I'm saying that punctuation has already solved this problem with the semi-colon. If you have two sentences where the second follows the other so closely that there is barely a breath in between, use a semi-colon rather than a stop. You
60.
▲
by
Chattered
12y ago
> An Oxford comma is not a flip switch in an author's voice, it's a decision made in the moment to maintain the flow of the idea. This is simply a run-on, not a use of an Oxford comma as I understand it. And these bother me a l
More ›