HNHacker News
TopNewBestAskShowJobs

it

715 karma · joined August 9, 2009

http://github.com/ijt
submissionscomments
it··on Scrum disempowers developers
If there's a Scrum Master, what does that make everyone else involved?
it··on Toyorm – ORM for Go
It seems like it would be easier to talk to dbs if we had a way to work directly with tables in Go, but it's not clear how to do that without resorting to the empty interface. R is great at dealing with tables so maybe it could be looked to as an example.
it··on What I learned in 2017 writing Go
Delve's main doesn't seem all that exemplary. It's irritating to open up main only to find that the princess is in another castle.
it··on Why we switched from Python to Go
I think the if-statement one is clearer, but in terms of results they're both fine. At the same time, I usually don't see people put in the extra work to add these helpful messages to their assertions. Maybe one reason is because they make the code a little harder to read.
it··on Why we switched from Python to Go
The point I'm making here is that everyone knows 1!=2. It's not helpful for a test to tell you that because then you have to go hunting around to figure out what is wrong instead of it just giving you at least a rough idea right away. It does not depend on what you're used to.
it··on Why we switched from Python to Go
I'm surprised to see Go's error handling listed as a disadvantage. Go encourages writing good error messages, and that's one of my favorite things about the language.

To get a sense of it, take a look at a failing test in a language such as Python that uses asserts for testing and compare it to the equivalent written in Go. Quite often, the error message in Go will be clear and to the point. On the other hand, I've seen plenty of assertion based tests in other languages that report inane things like "1 != 2" or "true != false" when they fail.

Go encourages putting the effort into this up front. It pays off later when things go wrong and you want to know why.

it··on Apple to discontinue iPod Nano and Shuffle
It's really nice to have a small, dedicated device that just plays music and does it well even if you're in an area with poor reception.

Luckily, there seems to be a viable replacement for a small fraction of the cost: https://goo.gl/176cos.

it··on Toward Go 2
It's convenient to write this sort of optimistic code that Erlang encourages, but the error messages are often not very helpful. You'll often end up with a pattern matching failure and stacktrace that isn't very clear compared to a hand-written error message that you would get in Go.
it··on Evidence That Robots Are Winning the Race for American Jobs
That may be true in the short term but those robots aren't going to repair themselves or make more of themselves. Human beings will have to do that unless someone comes up with a major breakthrough.
it··on A researcher's response to people pointing out 150 errors in four of his papers
Unintentional irony: "The only new thing about it is the 150 errors—when does that every happen?"
it··on The JVM is not that heavy
I keep seeing plenty of evidence that the JVM is indeed heavy. When I was working at a startup and we were running Solr on the JVM, it kept running out of memory and crashing. When I tried using Clojure I was irritated by the startup time of the REPL on the JVM. More evidence: http://stackoverflow.com/questions/13692206/high-java-memory....

If you want something light like Clojure and don't need any Java libs, try Pixie. https://github.com/pixie-lang/pixie

If you want something light not like Clojure, Go is a great choice. It's fast to compile, fast to run and doesn't gobble up your memory unless you force it to.

it··on Stanford historian uncovers a grim correlation between violence and inequality
The title is a bit misleading. He uncovered a correlation between violence and equality.
it··on How insects like bumblebees do so much with tiny brains
Paramecia manage to do quite a lot without any brains at all [1]. They do have microtubules though [2].

[1] https://www.ebiomedia.com/the-biology-classics-paramecium-be...

[2] http://www.ruf.rice.edu/~bioslabs/studies/invertebrates/micr...

it··on Why are we all moving away from Apple?
How did this rambling article make it to the front page of HN?
it··on Lecture on Creativity (1991)
If he's right then to be creative, it would certainly not help to be doing Scrum in an open office plan. I'll have to commandeer empty meeting rooms to really get into the zone.
it··on Ask HN: What “old” programming languages will you still be using in 2017?
Erlang: immutability, pattern matching, quick compile times, the best implementations of QuickCheck, flexible distributed computing with async message passing.
it··on QuickCheck: A Lightweight Tool for Random Testing of Haskell Programs (2000) [pdf]
Gopter for Go can shrink examples: https://github.com/leanovate/gopter.
it··on Godbolt: Enter C, get Assembly
There's a Go version too: https://go.godbolt.org.
it··on Ask HN: Who is hiring? (December 2016)
Your site seems to be down.

http://downforeveryoneorjustme.com/appcues.com

it··on Why Erlang Matters
Here's a modified version that doesn't stall:

  package main

  import "fmt"
  import "runtime"

  func main() {
    go hog()
    for i := 0; ; i++ {
      fmt.Println(i)
    }
  }

  func hog() {
    for {
      runtime.Gosched()
    }
  }
it··on Why Erlang Matters
Here's a minimal example:

  package main

  import "fmt"

  func main() {
    go hog()
    for i := 0; ; i++ {
      fmt.Println(i)
    }
  }

  func hog() {
    for {
    }
  }
It stalls after about three seconds on go version 1.6.

Here's the issue on github:

https://github.com/golang/go/issues/543

it··on Safely Sharing Data: Reference Capabilities in Pony
For reference, here's the language homepage: http://www.ponylang.org/
it··on The Computer Language Benchmarks Game
This used to be a site where you could compare how two different language implementations performed on some problem. Now it seems to restrict which languages can be directly compared. It might be a good project for someone to bring back some of the old functionality.
it··on The unintentional side-effects of a bad concurrency model
Erlang doesn't require any programming effort to parse and marshal messages. You just send them and receive them.

  Pid ! {hello, world}

  receive
     {hello, world} ->
        io:format("Received hello.~n", [])
  end
it··on Big-Bang Disruption
When your battery runs out, you'll wish you had a paper map.
it··on Why Workers Are Losing the War Against Machines
People use machines for various things, but you could also say that machines use people to reproduce and continue functioning.
it··on The Retina MacBook Pro 13”
I'm not sure why he says the effective resolution is 1280x800. The resolution is 2560x1600. I just sold my 13" Air and bought a 13" rMBP; very happy with it so far.
it··on Living Without Time
The last sentence makes it clear that he is not living without time; he's living with time defined by organic rhythms of his body and the environment instead of time defined by the rhythms of machines. It sounds like something I would like to try.
it··on Why I went from Python to Go (and not node.js)
It would help a bit if the article included at least roughly equivalent Go code next to the Python code. The Go code is wordier, but maybe it takes less time to write because it doesn't require as many decisions (libraries etc.) as with Python.

        package main;

        import (
                "fmt"
                "net"
        )

        func main() {
                hosts := []string { "www.google.com", "www.example.com", "www.python.org" }
                c := make(chan string)
                for _, h := range(hosts) {
                        go get_ip(h, c)
                }
                for i := 0; i < 3; i++ {
                        fmt.Println(<-c)
                }
        }

        func get_ip(host string, c chan string) {
                addrs, err := net.LookupHost(host)
                if err != nil {
                        fmt.Println("Host not found:", host)
                        c <- host + ": <error>"
                        return
                }
                c <- host + ": " + addrs[0]
        }
it··on Elon Musk: "I would like to die on Mars"
Saying it that way makes it sound like a new retirement community. Why not say he would like to live on Mars? Maybe because it's a dead planet and not very livable.
← PreviousPage 5 of 6Next →