HNHacker News
TopNewBestAskShowJobs

BarkMore

1,454 karma · joined October 14, 2010

submissionscomments
BarkMore··on Ask HN: What book have you given as a gift?
Economics in One Lesson by Henry Hazlitt.
BarkMore··on Go Packaging Proposal Process
Any change will be in the tools, not the language. The compatibility promise explicitly states that the tools can change (https://golang.org/doc/go1compat#tools).
BarkMore··on Go Packaging Proposal Process
I understand that the tools will need to be changed, but what needs to be changed in the language? Because import paths are strings interpreted by the tools and not the language, there seems to be good separation between the language and issues of source code organization, packaging, etc.
BarkMore··on How Microsoft Plans to Beat Google and Facebook to the Next Tech Breakthrough
The phrase does not imply that the strategy is beneficial to the company. Microsoft employees often used the phrase when they thought the strategy is detrimental to an individual product and the company as a whole.

Gates was directly responsible for imposing strategy tax during his time at Microsoft.

BarkMore··on How Microsoft Plans to Beat Google and Facebook to the Next Tech Breakthrough
Strategy tax is where an individual product is constrained in some way to further the overall goals of the company. For example, Microsoft killed a project to port SQL Server to Linux because the product would help to strengthen Linux as a competitor to Windows.

The term has been used inside Microsoft since the 1990s (and maybe before that time).

BarkMore··on Microsoft is killing off the Internet Explorer brand
IE4 was the first browser with dynamic HTML (DHTML).

Microsoft evangelized the combination of DHTML, Javascript and ActiveX data controls to build applications similar to what we now call AJAX. Microsoft was ignored for various reasons.

Microsoft introduced XMLHttpRequest and evangelized DHTML, Javascript and XMLHttpRequest. They were ignored again.

It was not until the introduction of Gmail and Adaptive Path's coining of the term AJAX that people finally got it. By this time, Microsoft had already put IE on the back burner.

BarkMore··on The birth of Microsoft's new web rendering engine
IE's HTML rendering code was completely replaced with the Trident rendering engine in IE 4. Trident did not use or derive from Mosaic code.
BarkMore··on Go 1.4 is released
I was going to suggest that you report this as an issue at https://github.com/golang/mobile, but issues are disabled on that repo.
BarkMore··on Show HN: Jason – A new JSON Library for Go
The jason package implementation decodes the entire JSON object to an interface{} using the standard encoding/json package.
BarkMore··on Show HN: Jason – A new JSON Library for Go
Passing a pointer to a struct is just one way to use the standard Go package. You can also pass a pointer to an interface{}, []interface{} or map[string]interface{} depending on how much of the structure you know. You can also use these types in struct fields.
BarkMore··on Suggestions for setting up a Go project
GitHub has the meta tag on some, but not all of the pages where 'go get' expects to find the tag. An example of a page without the tag is https://github.com/golang/lint/golint?go-get=1.
BarkMore··on Suggestions for setting up a Go project
It's interesting that GitHub added the meta tag given that 'go get' and similar tools like godoc.org don't look for the tag on GitHub. These tools have knowledge about GitHub baked in.

Also, GitHub does not include the meta tag on all pages where 'go get' would expect to find the meta tag. For example, the tag is not on the page https://github.com/golang/lint/golint?go-get=1.

BarkMore··on Underscore.go
It's possible to 'go get' this package using the import path "github.com/tobyhede/underscore.go/src". This import path does not follow Go conventions because the last element of the path is not the same as the package name. Otherwise, the path "github.com/tobyhede/underscore.go/src" follows Go conventions.
BarkMore··on A curated list of Go frameworks, libraries and software
Also, the permission request to edit the wiki is a one time request. Once you have permission, you are free to edit the project page or any other page on the community wiki.
BarkMore··on A curated list of Go frameworks, libraries and software
A more comprehensive curated list: https://code.google.com/p/go-wiki/wiki/Projects

A list with no curation: http://godoc.org/-/index

BarkMore··on A curated list of Go frameworks, libraries and software
Sending an email is not very onerous. Contributions to the go-wiki are welcome.
BarkMore··on Golang 1.4 Internal Packages
The mechanism for specifying visibility has nothing to do with the issue.

The Java approach for standard packages is nearly identical to what's proposed for Go. Anything in the com.sun. (or whatever they call it now) namespace is considered internal, even though it's publically accessible.

BarkMore··on Golang 1.4 Internal Packages
Which languages have solved this problem?
BarkMore··on Golang 1.4 Internal Packages
Backwards compatible changes to the language is allowed in Go 1.x.
BarkMore··on Reading and Writing Redis Protocol in Go
The statement

    value, err := redis.Integer(client.Do("GET", "mykey"))
sets the int variable "value" to the decimal integer stored in "mykey". The variable err is set to a non-nil value if the value cannot be parsed as a decimal integer, the key is missing, the key is not a redis string, the connection is broken or any other error.

This method of error handling is convenient because the application only needs to check for one error. The alternative is to do something like:

    v, err := client.Do("GET", "mykey")
    if err != nil {
       // handle command error
    }
    p, ok := v.(string)
    if !ok {
        // handle error where p is not a redis string
    }
    i, err := strconv.ParseInt(string(p))
    if err != nil {
       // handle parse error
    }
There is no trap. If the connection to the server is healthy and the value stored for "mykey" is a decimal encoded integer, then redis.Integer(client.Do("GET", "mykey")) returns that integer.
BarkMore··on How I Judge the Quality of Documentation
See http://blog.golang.org/godoc-documenting-go-code for Go documentation guidelines. Use the godoc tool included with the Go distribution to read package documentation locally. Use godoc.org to view documentation on the web. The documentation for your package is at http://godoc.org/github.com/sergiotapia/smitego .
BarkMore··on Spark web server
The type bytesHandler is a slice of bytes:

    type bytesHandler []byte
The code

    func (h bytesHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
	w.Write(h)
    }
is a method declaration for the type bytesHandler. The (h bytesHandler) specifies id and type of the method receiver.
BarkMore··on Big changes to Erlang
Go's := (short variable declaration) is closer to Erlang's => (introduce a new key) then it is to Erlang's := (update an existing key).
BarkMore··on A RESTful Micro-Framework in Go
The html/template package seems to address the use case, but it comes up short in several ways. One example is defining a site template with sections that are optionally specified in a page specific template.
BarkMore··on What Go Might Be Like With Generics
Go does not generate code at runtime.
BarkMore··on Benchmarking Nginx with Go
If all you want is binding to port 80/443, then it's simpler to use iptable port forwarding than Nginx.
BarkMore··on Go on App Engine: tools, tests, and concurrency
The App Engine tools use GOPATH.
BarkMore··on Build a Christmas List with Martini
This is not the recommended way to run Go applications, including those using Martini. Use "go build" or "go install" to build a binary and then execute the binary.
BarkMore··on Writing HTTP Middleware in Go
The GP's comment is about request context, not handler context.
BarkMore··on A simple virtualenv for Go
What makes the recommended approach in the workspace documentation "global"?
← PreviousPage 2 of 10Next →