What's the problem? Fund managers—who are in a position to understand the risks more than your everyday investor—can decide if they want buy these bonds or not, just like any other public corporate bond.
1,002 karma · joined April 30, 2009
What's the problem? Fund managers—who are in a position to understand the risks more than your everyday investor—can decide if they want buy these bonds or not, just like any other public corporate bond.
let prefix = connectWords "Hello "
world = prefix "world"
bob = prefix "bob"
in ...
`world` is "Hello world", and `bob` is "Hello bob". That is the power of currying. A maybe more useful example is specifying the mapping function in `List.map` without supplying the list to map over. This allows you to use the same map with multiple lists. - When two equivalent anonymous functions can be extracted out?
- When a library method already exists for an expression?
- When you fail to match every possible result in a case statement?Elm's latest blog post said it really well:
> Compilers should be assistants, not adversaries. A compiler should not just detect bugs, it should then help you understand why there is a bug.
But I wished there was a bigger push from the top, from Rich himself, on "first-classing" typed Clojure. Aim for 100% annotation coverage for the most popular libraries. Start with core (maybe it already is? I haven't kept up) and ring, then move outwards from there.
Library writers will be more motivated to add annotations if the big libraries are doing it.
For the most part, Ring is well-documented. But, as you noted, human-typed doc strings go only so far. I applaud the writers of ring in their discipline, but certainly we can do better than depending on human discipline.
You even noted, I picked "less well-documented libraries." I didn't pick them because they were not well-documented—I picked them because I'm using them!
From my (short) time with Haskell, I've found the type system to be the best I've ever used. It really does feel like it's helping you, instead of getting in the way. And so it feels more like a dynamic language than other strongly typed languages I've used (e.g. Scala, Java).
Below is a simple example, but look, no types to type!
>> let plus1 = (+1)
>> plus1 10
11
>> :t plus1
plus1 :: Num a => a -> a
You can ask for the type by `:t plus1`.I've also used Clojure, and I do really like Lisps, but I don't think untyped languages give enough benefit for all the problems it causes. I'm excited, however, about Typed Clojure (and Typed Racket).
Would you be able to explain, at a high level, how ClojureScript bootstrapped itself, and how Google Closure comes into play?
In short, the key insight of the blog post is this (via untested javascript):
You can define transforming functions like map and filter via reduce (e.g. foldleft or, for Ruby, inject) instead. For example,
map([...], function (x) { return x + 1; });
Can be written as: // append (x + 1) to the result collection
reduce([...], [], function (result, x) { return append(result, plusOne(x)); });
But notice that, above, we explicitly chose `plusOne` and `append`. If we allow a user to pass in any function instead, then we have a higher-order function: function mapping(f) {
return function (reducing) {
return function (result, input) {
return reducing(result, f(input));
}
};
}
Now we can do: var xform = mapping(plusOne)(append);
reduce([...], [], xform);
`xform` is a transducer.RESTful Web APIs (http://shop.oreilly.com/product/0636920028468.do) was a good starting point for understanding RESTful HTTP APIs.
http://swannodette.github.io/2013/12/17/the-future-of-javasc...
The iOS app is slow and clunky. I hate using it. It crashes all the time, especially when I'm trying to take snapshots of a document with many pages (and all previous snapshots simply disappear).
The desktop app is better, but they really could improve the writing experience. Pasting HTML blobs is impossible, and so is formatting my notes the way I want (I use TextExpander for sanity).
Evernote is great when it works, but they really need to fix their stability and bug problems.
Why put ourselves into different camps? Why can't I write poetical Rails code during the day and read the latest research papers on type theory at night? Placing ourselves in these artificial camps hinders us from exploring new places and ideas. This is why I'm tempted to call myself an artist or inventor (though to much ridicule) instead of a programmer or developer or computer scientist.
Some theory may not be practical, but learning to think the way theorists think is very, very practical. And a lot of fun.
Then a really cool opportunity came, and I accepted that offer because you can't just sit in a rotting pool for two months.
A friend of mine stayed in the rotting pool and was told at the beginning of summer that no one at Google wanted him.
This was 2009-2010. I hope Google changed their ways.
And probably more useful, as the author asserts in his paper.