Better HN
topnewbestaskshowjobs
Log inSign up

elbenshira

1,002 karma · joined Apr 30, 2009 (17y ago) · 175 submissions

http://elbenshira.com
Submissions

comment 1mo ago · link · parent

> Let’s be clear about what this means: it gives them access to the corporate bond market. What they’re lobbying for is that pension funds, life insurance, etc., can take exposure to these companies. Suddenly the everyman, your mom and dad, have significant exposure to these companies and their circular financing deals without even knowing it. This is disgusting.

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.

2.

A Stranger Used One Text Message to Steal My Digital Life(time.com ↗)

5 points · by elbenshira · 5mo ago · discuss

comment 3y ago · link · parent

For some reason I was thinking about Bob two days ago, ten years since I last interacted with him. I was just an intern at Square and he had just joined as CTO. But I remember how patient and inquisitive he was with me. Rest in peace, Bob.

4.

Change Is Inevitable: Designing Software in a Chaotic World(elbenshira.com ↗)

2 points · by elbenshira · 8y ago · discuss

comment 10y ago · link · parent

In this case, you think of `connectWords` as a function that takes two arguments. But since it is curried, you can also do this:

    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.

comment 11y ago · link · parent

In the article, I mention that linters for dynamic langs are crippled. Of course I use them when writing Ruby. But can any of these tools tell me:

  - 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?

comment 11y ago · link · parent

Yes, I may have failed in getting it across, but a big point is this: I don't think dynamic languages will suddenly die out. Instead, strongly-typed languages will become more convincing. We are seeing better tools, and they are becoming more ergonomic.

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.

http://elm-lang.org/blog/compilers-as-assistants

comment 11y ago · link · parent

A note on Typed Clojure: Ambrose is doing excellent work with it, and I'm excited to see it develop.

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.

comment 11y ago · link · parent

Yes, I did miss the ring spec. But as a beginner to ring, I'm not sure how I was suppose to know that such a document exist.

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!

10.

The End of Dynamic Languages(elbenshira.com ↗)

72 points · by elbenshira · 11y ago · 29 comments

comment 11y ago · link · parent

Yes, read this part: https://github.com/Gabriel439/post-rfc/blob/master/sotu.md#t... and https://github.com/Gabriel439/post-rfc/blob/master/sotu.md#r...

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).

comment 11y ago · link · parent

If I understand correctly, the ClojureScript compiler was written in Clojure (that is, you had to run the JVM to run the compiler), which spat out JS code and then compiled by Google Closure.

Would you be able to explain, at a high level, how ClojureScript bootstrapped itself, and how Google Closure comes into play?

comment 11y ago · link · parent

This is an acceptable description.

comment 11y ago · link · parent

I missed an opportunity here.

15.

The Universal Data Structure(elbenshira.com ↗)

189 points · by elbenshira · 11y ago · 99 comments

comment 11y ago · link · parent

Because these universities produce more students than tenure-track positions?

comment 12y ago · link · parent

A "map" is a graph.

comment 12y ago · link · parent

That article was what inspired me to write this blog post.

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.

19.

Understanding Transducers(elbenshira.com ↗)

62 points · by elbenshira · 12y ago · 15 comments

comment 12y ago · link · parent

Lots of research has gone into this, under the name Byzantine fault tolerance.

http://en.wikipedia.org/wiki/Byzantine_fault_tolerance

comment 12y ago · link · parent

Why not just use:

https://lastpass.com/

https://agilebits.com/onepassword

http://keepass.info/

comment 12y ago · link · parent

Classic: http://www.slideshare.net/guestbe92f4/how-to-design-a-good-a...

RESTful Web APIs (http://shop.oreilly.com/product/0636920028468.do) was a good starting point for understanding RESTful HTTP APIs.

comment 12y ago · link · parent

Don't immutable data structures give us most of the benefits? Clojure, for example, approaches this by preferring values over hidden, mutable state (e.g. classes). We see libraries like Om take advantage of the fact that comparing two complex structures (e.g. a hash map) is simply a reference equality test.

http://clojure.org/state

http://swannodette.github.io/2013/12/17/the-future-of-javasc...

comment 12y ago · link · parent

I'm a premium Evernote member, but I've also had lots of problems.

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.

comment 15y ago · link · parent

I remember an article about how Gowalla was bringing SV talent to Austin. Heh.

comment 15y ago · link · parent

I'm confused too. I read everything on their website and I think I get it but I don't. I remember it used to be that you had to be within the proximity of the business to use the money, but now they're all "it's flexible!".

comment 15y ago · link · parent

Why shouldn't they? With TDD and pairing, I'd say that their developers are the QA team.

comment 15y ago · link · parent

Alan writes useful things, but this is pretty much meaningless. He says so himself: "Developer are programmers to a greater or lesser extent. Computer scientists are programmers to a greater or lesser extent."

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.

comment 15y ago · link · parent

I wonder how Hacker Monthly (http://hackermonthly.com/) will pick out the "best" comments.
123456