Better HN
topnewbestaskshowjobs
Log inSign up

oct

21 karma · joined Apr 4, 2010 (16y ago) · 11 submissions

Submissions

comment 9y ago · link · parent

OCaml actually has correct block comments by his definition (and no line comments). This does lead to the odd fact that you can't have an unterminated string literal in a comment, which usually isn't a problem, but can be surprising.

comment 10y ago · link · parent

I think you're thinking of `true`.

comment 11y ago · link · parent

OCaml's parsing rules are pretty opaque sometimes. For example, if you have an "if" statement that's just performing effects (not returning a value), you may run into behavior like this:

    # let x = ref 0;;
    val x : int ref = {contents = 0}
    # let y = ref 0;;
    val y : int ref = {contents = 0}
    # if false then
        x := 1;
        y := 1;
      ;;
    - : unit = ()
    # (!x, !y);;
    - : int * int = (0, 1)
    # y := 0;;
    - : unit = ()
    # if false then
        let z = 1 in
        x := z;
        y := z;
      ;;
    - : unit = ()
    # (!x, !y);;
    - : int * int = (0, 0)

comment 12y ago · link · parent

The causal ordering defined in the paper is stronger than that. It says that if process P performs event A and later sends a message to process Q, then any event that occurs in Q after Q receives the message causally follows A. I don't think the blog post was meant to imply that the order of events within a single process does not need to be respected, though it doesn't specifically distinguish the single process case.

comment 15y ago · link · parent

Just because Haskell is purer that doesn't mean ML is pointless. Under the right circumstances even a functional program can benefit from mutable state. One example (perhaps the only real example; I don't know) can be found in the SML New Jersey implemetation of splay trees, which modifies the tree during certain operations.

Even without the purity question there are other things to consider. ML is evaluated strictly, for example. I don't know much Haskell but I don't believe it has any direct counterpart to ML's functors, either. There are probably many other differences. Haskell is definitely more popular and is still a niche language, so the reason you don't hear much about ML's benefits is probably just because it has so few users.

comment 15y ago · link · parent

I am pretty sure the Carnegie Mellon remark was just saying that a CMU CS graduate would have learned this already. Which is true, since the blog author (Bob Harper) teaches a course there which covers this very topic!

comment 15y ago · link · parent

Is there precedent for this? I can recall stories about getting cut off from a service if modding is detected but not about this sort of thing.

comment 16y ago · link · parent

I thought for a while that the word being used was "bellicose," like they were being confrontational by bulging out.

comment 16y ago · link · parent

Here is a recent HN discussion of the same article: http://news.ycombinator.com/item?id=1448424

comment 16y ago · link · parent

Apostol's Calculus would probably fit your needs. I do not remember its discussing applications at all, unlike the Salas and Hille book according to online descriptions of it. From what you wrote it does not look like you are concerned with that, though.

comment 16y ago · link · parent

This is a good description of my position as well. Unfortunately it seems like this is something that does not get taught at schools much, and I will admit to having been trying to learn everything from school when I should be doing more independent work. Does anyone know any useful resources on how to proceed from this point? Or does it require just working on a larger-scale project and figuring things out along the way?