Hacker News new | past | comments | ask | show | jobs | submit login
Go 1 Beta App Engine SDK now available (groups.google.com)
43 points by luriel on Feb 5, 2012 | hide | past | favorite | 4 comments



This is something I've done recently in Go: it's actually an exercise I first read about in an Erlang book. It's the book "Erlang Programming". In the book he describes this exercise: "Implement a simulated world inhabited by carrots, rabbits, and wolves. Rabbits roam this world eating carrots that grow in random patches. When they have eaten enough carrots, the rabbits get fat and split in two. Wolves run around eating up the rabbits; if they manage to catch and eat enough rabbits, the also get fat and split. Rabbits and wolves within a certain distance of each other broadcast information on food and predators. If a rabbits finds a carrot patch, other rabbits will quickly join him. If a wolf finds a rabbit, the pack would start chasing it."

I've written this now in Erlang, and in Scala, and most recently in Go. It took me way more than a weekend, I'll confess.


As a side note, I've been wanting to do some exploratory programming in Go to get to know the language for some time now. Can anyone comment on similar weekend-ish projects they've done in Go that they found to exercise the language's strengths and/or unique traits particularly well and would be worth implementing myself?


Things I like about Go:

The compilation speed is super fast which makes it feel like you are developing with a scripting language as opposed to a statically typed language. I typically edit code, run the tests and correct my errors without any noticeable time lost waiting.

The Go parser and pretty printer are exposed as a libraries in the Go distribution which allows for interesting meta-programming.


I recently implemented a library for http://martinfowler.com/eaaDev/EventSourcing.html . I also just wanted to get more practice. Go channels match perfectly for this topic. The new "go" command is a great step forward for rapid development. TDD in seconds.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: