oct
|
8 years ago
|
on: Block Comments Are a Bad Idea
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.
oct
|
9 years ago
|
on: Esoteric Topics in Computer Programming (2002)
I think you're thinking of `true`.
oct
|
10 years ago
|
on: Python wats
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)
oct
|
11 years ago
|
on: Reading Lamport, again
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.
oct
|
15 years ago
|
on: After 11 years, a new "Programming in Standard ML" [pdf]
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.
oct
|
15 years ago
|
on: Dynamic languages are static languages
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!
oct
|
15 years ago
|
on: Nintendo reserves the right to brick your 3DS if piracy detected
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.
oct
|
15 years ago
|
on: Eggcorn
I thought for a while that the word being used was "bellicose," like they were being confrontational by bulging out.
oct
|
15 years ago
|
on: Why Johnny can't code
oct
|
16 years ago
|
on: Common False Beliefs in Mathematics
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.
oct
|
16 years ago
|
on: I’m graduating with a CS degree but I don’t feel like I know how to program.
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?