Jun 24, 2012

Using Sublime Text 2 with GoSublime


In Convinced by Sublime Text I already wrote about Sublime Text 2, my preferred editor I'm using under OS X and Linux. It's already very powerful out of the box. But together with the Package Control plugin and the large number of available packages it gets even better. Searching, installing, updating, removing, everything works like a charm.

Today I want to show you the GoSublime package by DisposaBoy. It provides

  • the well-known code completion of gocode by nsf,
  • own snippets for code-completion which intelligent - by type-comparison - try to use variables of the surrounding context,
  • simple adding and removing of imports,
  • direct jumps to imports, e.g. for defining an alias,
  • live error detection and highlighting using gotype; a list can be get with Cmd-. Cmd-E,
  • a build system simply based on the Go tools; so not only a go build or go test are possible, also variants like go test -i or go test -test.cpu 8 -test.v,
  • error cycling using F4/Shift-F4 (beside clicking on the error in the output window),
  • simple jump between the errors in different files and back,
  • formatting of the source with gofmt automatically when saving or by command and
  • directly run/play the current file.

Most of those commands can be accessed via the Cmd-. Cmd-. shortcut. Some or directly part of the plugin and so developed in Python. But a lot is done in MarGo, also developed by DisposaBoy, but in Go. Both tools are not yet done but grow fast. Every few days the automatic update of Package Control shows new changes and the change log is very interesting. Soon there will be

  • a system wide jump to the definition of a function or variable,
  • a display of Go docs in the editor and
  • a share of code from inside the editor in play.golang.org (it's already working in the developer releases of Sublime Text 2).

 So if you're a Go developer looking for a powerful environment try this duo.

Jun 17, 2012

Release 2.0.0 of the Common Go Library


I'm happy to announce the Release 2.0.0 of the Tideland Common Go Library. Most important part is the rework of the cells package for event-driven applications. Thanks to the early adopters of this package and their very useful hints. I hope they all now benefit from the modifications and don't have too much problems with the needed API changes. To give all of you a better introduction in how cells is working and has to be used I added a scenario simulating a shop with ordering, its stock, manufacturing and delivering.

Here are the changes:

Asserts

  • Better messages for a direct usage inside of editors
  • Renamed 'Substring' and 'Implementor' asserts

Cells

  • Larger rework with improvements of reliability, performance and convenience
  • Cell adding now lazy using a factory
  • Additional multiple cell adding and subscribing
  • Emits inside a cell now via an own type instead of a channel
  • Integrated configuration

Config

  • New package
  • Configuration is key/value based
  • Backends are configuration providers
  • Simple map based provider in this release; more to come

Monitoring

  • Simplified output of execution times
  • No more total time and theoretical operations per second

You'll find the library at http://code.google.com/p/tcgl/.