FAQ
-Chris

On Thu, Jun 6, 2013 at 4:25 PM, wrote:

Today's Topic Summary

Group: http://groups.google.com/group/golang-nuts/topics

- GUI Toolkit Proposal <#13f1bcef3c1a5b64_group_thread_0> [5 Updates]
- Go concurrency slides <#13f1bcef3c1a5b64_group_thread_1> [3 Updates]
- DB-specific extensions and database/sql<#13f1bcef3c1a5b64_group_thread_2>[2 Updates]
- Proposal: Shared libraries in Go, take 2 (+linux/amd64
implementation) <#13f1bcef3c1a5b64_group_thread_3> [1 Update]
- Unexported assembly function help <#13f1bcef3c1a5b64_group_thread_4>[4 Updates]
- UTF8 encoding issues. <#13f1bcef3c1a5b64_group_thread_5> [2 Updates]
- Noob questions <#13f1bcef3c1a5b64_group_thread_6> [6 Updates]
- Why not provide a delete function in slices just like in maps?<#13f1bcef3c1a5b64_group_thread_7>[19 Updates]
- A proposal: Simplification of `map[string]interface{}` with
Assumptive Maps <#13f1bcef3c1a5b64_group_thread_8> [5 Updates]
- Tel scheme handling in HTML templates<#13f1bcef3c1a5b64_group_thread_9>[2 Updates]
- c/c++ (and Fortran!) libraries installation under $GOPATH/pkg<#13f1bcef3c1a5b64_group_thread_10>[3 Updates]
- [google-appengine-go] Re: App Engine Go 1.1 Beta<#13f1bcef3c1a5b64_group_thread_11>[1 Update]
- Left-leaning Red-Black Trees, again<#13f1bcef3c1a5b64_group_thread_12>[1 Update]
- Proposal for import/package simplification<#13f1bcef3c1a5b64_group_thread_13>[8 Updates]
- Are there a way to custom format a number in Golang?<#13f1bcef3c1a5b64_group_thread_14>[4 Updates]
- Why socket write is 10 times slow than c ?<#13f1bcef3c1a5b64_group_thread_15>[9 Updates]
- strings package at app-engine different?<#13f1bcef3c1a5b64_group_thread_16>[2 Updates]
- OCSP Stapling - tls.Certificate OCSPStaple<#13f1bcef3c1a5b64_group_thread_17>[2 Updates]
- AngularJS and parsePostForm (called by ParseForm on POST request in
the package net/http) <#13f1bcef3c1a5b64_group_thread_18> [1 Update]
- Resource temporarily unavailable <#13f1bcef3c1a5b64_group_thread_19>[4 Updates]
- syntax clarification <#13f1bcef3c1a5b64_group_thread_20> [4 Updates]
- Where and how to look for Go jobs?<#13f1bcef3c1a5b64_group_thread_21>[6 Updates]
- the best way to copy a string in go<#13f1bcef3c1a5b64_group_thread_22>[4 Updates]
- [ANN] GWK - Version 0.6a Released <#13f1bcef3c1a5b64_group_thread_23>[1 Update]
- Which goweb for rest? <#13f1bcef3c1a5b64_group_thread_24> [1 Update]

GUI Toolkit Proposal<http://groups.google.com/group/golang-nuts/t/39f2ac25db4dd899>

Mandolyte <cecil.new@gmail.com> Jun 05 05:31PM -0700

The Ubuntu folks are focused on MIR and mostly Qt/QML... any thoughts
on these?
...more<http://groups.google.com/group/golang-nuts/msg/7b51f468b9ec10c7>


Rob Thornton <rthornton128@gmail.com> Jun 06 09:45AM -0700

Speaking personally, until such time MIR has broad adoption amongst
most
distributions I certainly wouldn't dedicate any time to it. Are the
Ubuntu
folks concentrating on Qt/QML? Last I saw, and I ...more<http://groups.google.com/group/golang-nuts/msg/27dc8e5651ad192d>


Jeremy Wall <jwall@google.com> Jun 06 12:33PM -0500
look at the amount of code, nor have I the time right now to even attempt a
port, but it could be a practical way to make some progress on the Go GUI
front.
Ghost is actually pretty nice ...more<http://groups.google.com/group/golang-nuts/msg/b35a702d5a8bfef5>


gvdschoot@gmail.com Jun 06 11:01AM -0700

On Wednesday, June 5, 2013 5:43:34 PM UTC+2, André Moraes wrote:

gtk 3.x is different from gtk 2.x (they use something called object
inspection)
afaik, gtk 3.x don't have windows ...more<http://groups.google.com/group/golang-nuts/msg/cb01b15cee8dda57>

Kees Varekamp <kees@mroffice.org> Jun 06 03:19PM -0700

I would like to point out IUP (http://www.tecgraf.puc-rio.br/iup/) -
it's a
wonderful small windowing toolkit from Brazil that uses native
windowing
systems.

There is a Go binding for it too: ...more<http://groups.google.com/group/golang-nuts/msg/6bb1262e4a035e5f>

Go concurrency slides<http://groups.google.com/group/golang-nuts/t/9d3960c70c1e8361>

John Nagle <nagle@animats.com> Jun 06 10:54AM -0700

On 5/29/2013 10:36 AM, jeidsath@gmail.com
wrote:
I've written up three presentations on Go concurrency. These are meant for
beginning Go users. If anyone has the time to critique, I'd love
...more<http://groups.google.com/group/golang-nuts/msg/86e9a2b8e287fac0>


"André Moraes" <andrebq@gmail.com> Jun 06 05:03PM -0300

package main

import (
"fmt"
"time"
)

func sayit(messages chan string) {
for msg := range ...more<http://groups.google.com/group/golang-nuts/msg/ec117b7900efaf31>


Joel Eidsath <jeidsath@gmail.com> Jun 06 03:11PM -0700
That presents channels as a synchronization mechanism, not a data
transmission mechanism. There's no discussion of shared data and its
problems.
Thanks for the response, John. ...more<http://groups.google.com/group/golang-nuts/msg/8f3ec3295d6e969f>

DB-specific extensions and database/sql<http://groups.google.com/group/golang-nuts/t/799996cd4443f94a>

Maciek Sakrejda <maciek@heroku.com> Jun 06 02:52PM -0700

Is there an idiomatic (or otherwise, for that matter) mechanism for
adding
database-specific extensions in a driver.Driver implementation?
Specifically, I'm interested in adding Postgres ...more<http://groups.google.com/group/golang-nuts/msg/aa0780a487fd9883>


Arne Hormann <arnehormann@gmail.com> Jun 06 03:06PM -0700

I think it's best to add advanced functionality to the driver itself,
so
instead of
import _ "github.com/lib/pg"
you use
import "github.com/lib/pg"
and call it as pg.Listen(chanName). ...more<http://groups.google.com/group/golang-nuts/msg/4cfe3cf9588cd2ff>

Proposal: Shared libraries in Go, take 2 (+linux/amd64 implementation)<http://groups.google.com/group/golang-nuts/t/ce68d7906ac4c7a4>

Elias Naur <elias.naur@gmail.com> Jun 06 02:13PM -0700

I realized that initializing the go runtime from a library initializer
is
too risky. In particular, starting and waiting for a thread from
DllMain
will deadlock on windows. So I've moved the ...more<http://groups.google.com/group/golang-nuts/msg/894911a1116b03d3>

Unexported assembly function help<http://groups.google.com/group/golang-nuts/t/ae51afc3d8558686>

Jay Weisskopf <jayschwa@gmail.com> Jun 06 01:04PM -0700

I cannot find any official documentation on how to write assembly
functions
with a Go fallback. Based on what I can see in the standard library,
the
convention goes something like this:

foo.go ...more<http://groups.google.com/group/golang-nuts/msg/f5f789c17b42a97a>


Ian Lance Taylor <iant@golang.org> Jun 06 01:34PM -0700
automatically look for a lowercase version? When I remove the
assembly file,
I get a "missing function body" error, so there must be something about the
standard library examples.
...more<http://groups.google.com/group/golang-nuts/msg/878e5d80c7dc77ca>


Jay Weisskopf <jayschwa@gmail.com> Jun 06 04:45PM -0400

Thanks. It seems much clearer to me after reading that. I was getting
mixed
up about the fallback thing because I was previously looking at Sqrt,
which
provides an implementation for each arch, ...more<http://groups.google.com/group/golang-nuts/msg/14c9944e34368b0d>


Ian Lance Taylor <iant@golang.org> Jun 06 01:50PM -0700
that case.
So I should have all my bases covered (for now) so long as I provide a 386,
arm, and amd64 version? That is everything I see in the math package.
Yes, those are the only ...more<http://groups.google.com/group/golang-nuts/msg/f893fd0e126a2e60>

UTF8 encoding issues.<http://groups.google.com/group/golang-nuts/t/8e1ed4d25e208f22>

lfabian@cbinsights.com Jun 06 11:04AM -0700

Hi there! I'm having the next error when trying to create a JSON
*json: invalid UTF-8 in string: "Soci\xe9t\xe9 G\xe9n\xe9rale"*
This data comes from a MySQL table with utf8_unicode_ci charset.
...more<http://groups.google.com/group/golang-nuts/msg/1e4786df7ccbac12>


Andy Balholm <andybalholm@gmail.com> Jun 06 01:35PM -0700
This data comes from a MySQL table with utf8_unicode_ci charset.
Anyone can help me? How can I encode a string into UTF-8?
Thank you very much.
That string is in ISO-8859-1 or a similar ...more<http://groups.google.com/group/golang-nuts/msg/5cfe5ceb3465ab02>

Noob questions<http://groups.google.com/group/golang-nuts/t/f158f21d160c9764>

Jim Ellis <jimellis238@gmail.com> Jun 06 05:54AM -0700

ksug,

Thanks for the links to monit and supervisord.
I have a lot of information to sift through. I even found a g+ post by
Andrew Gerrand from a year ago that was showing how to use go via cgi
...more<http://groups.google.com/group/golang-nuts/msg/7bfcff8197b629fe>


Matt Silverlock <elithrar@gmail.com> Jun 06 06:28AM -0700
On Thursday, June 6, 2013 8:54:01 PM UTC+8, Jim Ellis wrote:

Then there is the barrier that has been my major problem, what to do to
get it where when I type in the website address in a ...more<http://groups.google.com/group/golang-nuts/msg/227ee4a56add9893>

Kiki Sugiaman <ksugiaman@gmail.com> Jun 06 12:55PM -0500
On 6/6/2013 7:54 AM, Jim Ellis wrote:
I have 1 very simple argument to make to support this.
If I can not get my web site to use a go program, then I do not have
any reason to write any go ...more<http://groups.google.com/group/golang-nuts/msg/3454f3ee01c0692c>

Jim Ellis <jimellis238@gmail.com> Jun 06 12:40PM -0700

Matt,

The comparison to php was a bit of a crude one. I would not be here
trying
to learn this if I did not think that go could do a lot more than php.
Actually, this is the first time in a ...more<http://groups.google.com/group/golang-nuts/msg/9b707ada4a048600>


Kiki Sugiaman <ksugiaman@gmail.com> Jun 06 03:15PM -0500
On 6/6/2013 2:40 PM, Jim Ellis wrote:

Will this cause a conflict between the go program and apache?
(this was one of the things I figured would be part of the "trial and
error".)
...more<http://groups.google.com/group/golang-nuts/msg/6ec5b008f6760fac>


Kiki Sugiaman <ksugiaman@gmail.com> Jun 06 03:30PM -0500

Also, take a look at various PaaS/cloud options like Google App
Engine.
I personally dislike PaaS' because I have to learn the specifics of
their API and I like root control of my OS. ...more<http://groups.google.com/group/golang-nuts/msg/6f053e4771636a0f>

Why not provide a delete function in slices just like in maps?<http://groups.google.com/group/golang-nuts/t/6f1db858ce399184>

houshuaiying@pinidea.com Jun 06 01:13AM -0700

When you need to remove something from a slice, the only thing you can
do
now is:

slice = append(slice[:i], slice[i+1:]...)

This is stupid because it's far beyond human logic: Why I need to
...more<http://groups.google.com/group/golang-nuts/msg/d6fe3d692edbda22>


Rob Pike <r@golang.org> Jun 06 06:09AM -0700

First, the implementation of "delete from slice" would be exactly the
same as the implementation of
slice = append(slice[:i], slice[i+1:]...)
Second, append only allocates when there isn't room. ...more<http://groups.google.com/group/golang-nuts/msg/f193733673bec57f>


Jan Mercl <0xjnml@gmail.com> Jun 06 03:09PM +0200

slice = append(slice[:i], slice[i+1:]...)
This is stupid because it's far beyond human logic: Why I need to
make a new
slice every time instead of just simply remove an element from the
...more<http://groups.google.com/group/golang-nuts/msg/9d34eda6b43966d9>


James Bardin <j.bardin@gmail.com> Jun 06 06:24AM -0700

and even more convincing...
http://play.golang.org/p/GJqfKed3mb

Absolutely no new slice instance is being made here. The existing
...more<http://groups.google.com/group/golang-nuts/msg/5f1768fc07f36e06>


Sebastien Binet <seb.binet@gmail.com> Jun 06 03:32PM +0200

Rob,
slice = append(slice[:i], slice[i+1:]...)
Second, append only allocates when there isn't room. Since deleting
doesn't require more space, this is not an allocating operation.
...more<http://groups.google.com/group/golang-nuts/msg/dd44475d86d3c784>


Frithjof Schulze <sfrithjof@gmail.com> Jun 06 03:33PM +0200

One can even do something like http://play.golang.org/p/IabKrc40eK

Does the spec actually guarantee that this will work?


...more<http://groups.google.com/group/golang-nuts/msg/5f9ff26ec2fd009a>


"Péter Szilágyi" <peterke@gmail.com> Jun 06 04:36PM +0300

I think this clause covers it:

"A slice therefore shares storage with its array and with other slices
of
the same array"

...more<http://groups.google.com/group/golang-nuts/msg/4d5bfa9ed2535a57>


Matthew Kane <matt@hydrogenproject.com> Jun 06 09:36AM -0400

If you don't need to preserve order, you can swap the item to be
deleted,
then shorten the slice by 1. This saves the work of moving every
element
over.

func delete(aslice []T, index int) ...more<http://groups.google.com/group/golang-nuts/msg/d7c5b102186c3785>


chris dollin <ehog.hedge@googlemail.com> Jun 06 02:37PM +0100

When you need to remove something from a slice, the only thing you can do
now is:
slice = append(slice[:i], slice[i+1:]...)
... removing the element with index i ...
...more<http://groups.google.com/group/golang-nuts/msg/31e2f1d962744d25>


Frithjof Schulze <sfrithjof@gmail.com> Jun 06 04:31PM +0200

Yes. But I was never sure if this has to be interpreted as "a slice
might
share storage" or
as "unless you append something beyond the capacity of a slice we
guarantee
that the slices will share ...more<http://groups.google.com/group/golang-nuts/msg/4a11ca5047591a62>


Reck Hou <reckhou@gmail.com> Jun 06 07:41AM -0700

I've
read
http://stackoverflow.com/questions/5020958/go-what-is-the-fastest-cleanest-way-to-remove-multiple-entries-from-a-slice,

there seems to be so many solutions about this problem, and many
...more<http://groups.google.com/group/golang-nuts/msg/aa789569111e8eff>


Jesse McNelis <jessta@jessta.id.au> Jun 07 12:41AM +1000
ie:
func delete( []T, int )
func delete(map[T]U, T)
For a map this does what it says and has constant cost.
For a slice this does a lot of unrelated copying and changes the
...more<http://groups.google.com/group/golang-nuts/msg/3e0d6ecf3db1be89>


Jan Mercl <0xjnml@gmail.com> Jun 06 04:45PM +0200
or "delete"(remove all elements in sliceA which exists in sliceB) like Ruby
or Javascript is convenient. Programmers have to built their own delete
function to do the trick for now.
...more<http://groups.google.com/group/golang-nuts/msg/bcb5f2e8f858dec1>


Robert Johnstone <r.w.johnstone@gmail.com> Jun 06 10:24AM -0700

The proposal from the OP has limited merit, but this argument is also
pretty silly. You might as well take a copy of the generated assembly
code, and complain about all the details that are ...more<http://groups.google.com/group/golang-nuts/msg/72ea37a0a9cad233>


John Nagle <nagle@animats.com> Jun 06 11:05AM -0700
On 6/6/2013 6:09 AM, Rob Pike wrote:

In short, the code you're complaining about is optimal in everything
except possibly keystrokes. Far beyond human logic, perhaps, but
computers have ...more<http://groups.google.com/group/golang-nuts/msg/a7fae78f5da737d8>

"Thomas Bushnell, BSG" <tbushnell@google.com> Jun 06 11:08AM -0700

What an excellent idea!

http://golang.org/pkg/container/list/


...more<http://groups.google.com/group/golang-nuts/msg/d7de6f3239849505>


John Nagle <nagle@animats.com> Jun 06 11:17AM -0700
On 6/6/2013 11:08 AM, Thomas Bushnell, BSG wrote:
What an excellent idea!
http://golang.org/pkg/container/list/
That's interface-based, so each item gets inflated by
an interface item, ...more<http://groups.google.com/group/golang-nuts/msg/c493004d50f9e630>


"Thomas Bushnell, BSG" <tbushnell@google.com> Jun 06 11:26AM -0700

You can also simply use pointers.

type myobject struct {
field1 type1
field2 type2
next *myobject
prevp **myobject
}

var mylist *myobject

Insert at front is
foo.next = mylist ...more<http://groups.google.com/group/golang-nuts/msg/4b814a51869b28dd>


Bob Hutchison <hutch-lists@recursive.ca> Jun 06 03:19PM -0400

In short, the code you're complaining about is optimal in everything
except possibly keystrokes. Far beyond human logic, perhaps, but
computers have their own cold logic.
...more<http://groups.google.com/group/golang-nuts/msg/ee5c8cd664187d60>

A proposal: Simplification of `map[string]interface{}` with Assumptive
Maps <http://groups.google.com/group/golang-nuts/t/b98d2cb6b67520fe>

David DENG <daviddengcn@gmail.com> Jun 06 09:09AM -0700

I may suggest a more conservative type deduction as follow:

for the following assignment:

m := {a: b, c: d}


the rule for the map is simple and clear: the type of the key is the
type ...more<http://groups.google.com/group/golang-nuts/msg/f04b0b86266f9e75>


Gustavo Niemeyer <gustavo@niemeyer.net> Jun 06 01:27PM -0300
A proposal: Simplification of `map[string]interface{}` with
Assumptive Maps
We write a lot of Go code, and most of it seems to be
`map[string]interface{}`.
This is definitely not true, at ...more<http://groups.google.com/group/golang-nuts/msg/a48e6d11182be9b8>


Mat Ryer <mat@stretchr.com> Jun 06 11:05AM -0600

Thanks for the link.

...more<http://groups.google.com/group/golang-nuts/msg/814ce2882495d5e>


Jason Moiron <jlmoiron@gmail.com> Jun 06 11:45AM -0700

When I first started writing Go code, I did this a lot:

type dict map[string]interface{}

mgo/bson does this too, for instance:
...more<http://groups.google.com/group/golang-nuts/msg/71438afb1f6d2249>


Kevin Gillette <extemporalgenome@gmail.com> Jun 06 12:08PM -0700

In that case, rog's suggestion is equivalent to yours, but can be done
now,
and only costs an extra byte -- e.g. m{"a": 1, "b": 2} instead of
{"a": 1,
"b": 2}

On Wednesday, June 5, 2013 ...more<http://groups.google.com/group/golang-nuts/msg/46fb6dcd30b00269>

Tel scheme handling in HTML templates<http://groups.google.com/group/golang-nuts/t/f93f6443ce41755b>

Nigel Tao <nigeltao@golang.org> Jun 06 10:22AM +1000

I believe that it's deliberate, but Mike Samuel is the authority on
html/template.


...more<http://groups.google.com/group/golang-nuts/msg/6829cb7de1c3e1a8>


Mike Samuel <mikesamuel@gmail.com> Jun 06 03:04PM -0400
observed in the output. (Though I believe specifying the scheme
textually as part of the attribute in the template itself exhibits
different behavior.)
This is done for URLs whose scheme ...more<http://groups.google.com/group/golang-nuts/msg/d2ba6b93d316877a>

c/c++ (and Fortran!) libraries installation under $GOPATH/pkg<http://groups.google.com/group/golang-nuts/t/93711767b9ecae9b>

Sebastien Binet <seb.binet@gmail.com> Jun 06 11:41AM +0200

hi there,

while waiting for issue[0] 5629 to be fixed and until go-1.2 is
released (so one gets [1]), I was wondering whether there was a
consensus where to install .so and/or .a C/C++ libraries ...more<http://groups.google.com/group/golang-nuts/msg/ac71c6c024708ebe>


Ian Lance Taylor <iant@golang.org> Jun 06 10:35AM -0700
or rather, install them under, say:
$GOPATH/pkg/$GOOS_$GOARCH/lib
?
Now that we have external linking, I hope that the SWIG shared
libraries can go away. So I don't think we should put ...more<http://groups.google.com/group/golang-nuts/msg/752e135ab9e2d257>


Sebastien Binet <seb.binet@gmail.com> Jun 06 08:55PM +0200

Ian,

That said, I don't understand why you want to install shard libraries
at all. The go tool won't build them. Are you talking about shared
libraries that are part of, and distributed ...more<http://groups.google.com/group/golang-nuts/msg/7e75c21196dab125>
[google-appengine-go] Re: App Engine Go 1.1 Beta<http://groups.google.com/group/golang-nuts/t/5751ccc191db8d94>

Philipp Schumann <philipp.schumann@gmail.com> Jun 06 10:24AM -0700

Hi everyone,

not sure what the status is for Go 1.1? Been out in the wild for over
a
month already...

Anyway, with api_version = go1.1beta, then dev_appserver.py gives me:
...more<http://groups.google.com/group/golang-nuts/msg/a9dd26aa5e33d433>

Left-leaning Red-Black Trees, again<http://groups.google.com/group/golang-nuts/t/84d0bcee193c9086>

niko.schwarz@googlemail.com Jun 06 09:32AM -0700

I re-implemented (partially) Left-leaning Red-Black Trees today.

The performance is quite nice, it's 323 ns/op for my attempt, while
petar's
GoLLRB package gets 1794 ns/op. Thus, it runs factor ...more<http://groups.google.com/group/golang-nuts/msg/84137fc1c853728d>

Proposal for import/package simplification<http://groups.google.com/group/golang-nuts/t/f5d13a4cad1c8b1d>

Morten Siebuhr <sbhr@sbhr.dk> Jun 06 03:07AM -0700

Hi all,

There seem to be broad consensus that something needs to be done about
imports in go, and a lot of discussion about how this should be solved.

I would like to propose to add .zip, .tar ...more<http://groups.google.com/group/golang-nuts/msg/bf239089427dbb70>


Dave Cheney <dave@cheney.net> Jun 06 11:03PM +1000

Hello,

Thank you for your proposal, I agree that something needs to be done
to help folks who have more demanding needs for package dependency
versioning.

Responding to your proposal, the go ...more<http://groups.google.com/group/golang-nuts/msg/a79144e959efea9d>


Jan Mercl <0xjnml@gmail.com> Jun 06 03:04PM +0200
There seem to be broad consensus that something needs to be done about
imports in go, and a lot of discussion about how this should be
solved.

I'm not participating in this consensus. ...more<http://groups.google.com/group/golang-nuts/msg/a6d13a0203bfeb56>


Morten Siebuhr <sbhr@sbhr.dk> Jun 06 06:26AM -0700

Den torsdag den 6. juni 2013 15.03.25 UTC+2 skrev Dave Cheney:
I apologise if I have misunderstood your proposal, could you please
provide some worked examples of go code that uses your ...more<http://groups.google.com/group/golang-nuts/msg/d6e664b0b97df637>

Morten Siebuhr <sbhr@sbhr.dk> Jun 06 06:45AM -0700

Den torsdag den 6. juni 2013 15.04.00 UTC+2 skrev Jan Mercl:
imports in go, and a lot of discussion about how this should be
solved.
I'm not participating in this consensus. ...more<http://groups.google.com/group/golang-nuts/msg/759cf23e92b22800>

James Bardin <j.bardin@gmail.com> Jun 06 06:48AM -0700

I think a common misconception is that the import path is the remote
location of the package, which it is not.
The import path is the path within your GOPATH that contains the
package. ...more<http://groups.google.com/group/golang-nuts/msg/a9801980ee54b4c>


Morten Siebuhr <sbhr@sbhr.dk> Jun 06 06:54AM -0700

Den torsdag den 6. juni 2013 15.48.07 UTC+2 skrev James Bardin:
If the package can't be found in your GOPATH, the go tooling takes a guess
at where to get the code based on the path, and tries ...more<http://groups.google.com/group/golang-nuts/msg/1c795c0b8d61f080>

Kamil Kisiel <kamil.kisiel@gmail.com> Jun 06 09:06AM -0700

What would it look like if the package were in a subdirectory of the
archive? Or would you expect a separate archive for each package?

For example if you get github.com/user/project/some/package ...more<http://groups.google.com/group/golang-nuts/msg/59d5f36aeb19e034>

Are there a way to custom format a number in Golang?<http://groups.google.com/group/golang-nuts/t/ebd91d89a7b2646c>

peterGo <go.peter.90@gmail.com> Jun 05 07:24PM -0700

Michael,

The C# format codes are derived from Microsoft Excel.

Number format codes

http://office.microsoft.com/en-us/excel-help/number-format-codes-HP005198679.aspx

Create a custom number ...more<http://groups.google.com/group/golang-nuts/msg/17951760103b2d5e>


peterGo <go.peter.90@gmail.com> Jun 05 08:01PM -0700

Michael,

Microsoft Excel has a bug in its Phone Number format code; 800 numbers
display as (1800) 123-4567, instead of 1-800-123-4567. The Microsoft
Excel
format code should be:
...more<http://groups.google.com/group/golang-nuts/msg/13f88f51385b4329>


peterGo <go.peter.90@gmail.com> Jun 05 08:08PM -0700

Here's a revised PhoneNo String method, which properly formats 800
numbers.

package main

import (
"fmt"
)

type PhoneNo struct {
phoneNo uint64
}

func NewPhoneNo(phoneNo uint64) ...more<http://groups.google.com/group/golang-nuts/msg/6d13dc4c1edf78ac>


Michael Jones <mtj@google.com> Jun 06 08:53AM -0700

Peter, thanks! I had no idea about this
excel-C#-case/if-conditional-formatting until this email thread, so
I've
learned something. It is a good day when you learn something.

I wonder if such ...more<http://groups.google.com/group/golang-nuts/msg/3fd7fb78484e6823>

Why socket write is 10 times slow than c ?<http://groups.google.com/group/golang-nuts/t/13e90c4a45cc5ccd>

steve wang <steve.wangbin@gmail.com> Jun 05 06:39PM -0700

If you switch TCP_NODELAY OFF for both clients, what's the result?
I got a result that the Go client is yet 3x slower.
I have added comments on the issue page. ...more<http://groups.google.com/group/golang-nuts/msg/b044c9f8679a02bf>


dlin <dlin.tw@gmail.com> Jun 05 08:29PM -0700

I packed the source and a Makefile together.

The test result is similar, but the Go version is much slower on my
testing(
for cpp, I put -O2 option).

$ ./server_cpp # use client2_go (NoDelay ...more<http://groups.google.com/group/golang-nuts/msg/f0d56c98660b88f5>


Jesse McNelis <jessta@jessta.id.au> Jun 06 01:53PM +1000
I packed the source and a Makefile together.
The test result is similar, but the Go version is much slower on my testing(
for cpp, I put -O2 option).
The other main difference between the ...more<http://groups.google.com/group/golang-nuts/msg/8a7b24f4deb3e7a5>


xoyohk@gmail.com Jun 05 06:36PM -0700

If you switch TCP_NODELAY OFF for both clients, what's the result ?
I have got a result that the go client is yet 3 times slower.
And I have added comments on the issue page. ...more<http://groups.google.com/group/golang-nuts/msg/cb147cf7714f12c3>


steve wang <steve.wangbin@gmail.com> Jun 05 11:44PM -0700
On Thursday, June 6, 2013 11:53:14 AM UTC+8, Jesse McNelis wrote:
here is that Go uses poll() under the hood and the C version doesn't.
Calling non-blocking IO is slow, but on real world loads ...more<http://groups.google.com/group/golang-nuts/msg/58ab7e2517330911>

Peter <syupei@gmail.com> Jun 06 03:24AM -0700

bad luck....

I just need to collect the data from a large number of clients, then
transfer them to other nodes by pub/sub information,

so , i will need High-performance network IO....


...more<http://groups.google.com/group/golang-nuts/msg/f52f1543e09c9523>


Dmitry Vyukov <dvyukov@google.com> Jun 06 02:35PM +0400

I just need to collect the data from a large number of clients, then
transfer them to other nodes by pub/sub information,
so , i will need High-performance network IO....
...more<http://groups.google.com/group/golang-nuts/msg/a1cce6301c04dc72>


Jesse McNelis <jessta@jessta.id.au> Jun 06 09:02PM +1000
Agreed. A program in real world rarely keeps sending data without receiving
or doing other I/Os.
Hence this issue is not a serious problem.
A real world program doesn't send 2 bytes per ...more<http://groups.google.com/group/golang-nuts/msg/66c05a0ed9714964>


Anssi Porttikivi <porttikivi@gmail.com> Jun 06 08:44AM -0700

I was expecting John Nagle here to comment on TCP_NODELAY usage ;-)
...more<http://groups.google.com/group/golang-nuts/msg/e090d32cb0924e2e>

strings package at app-engine different?<http://groups.google.com/group/golang-nuts/t/fa1829499a74561c>

josvazg <josvazg@gmail.com> Jun 06 07:40AM -0700

I was trying to use goweb (https://github.com/stretchrcom/goweb) on
app-engine (1.1). I also have a go 1.1 installation.


I was surprised to get this error on the browser and terminal:

...more<http://groups.google.com/group/golang-nuts/msg/39bbec24445fd9b5>


Georg Reinke <guelfey@gmail.com> Jun 06 05:15PM +0200
On 2013-06-06, josvazg wrote:
You received this message because you are subscribed to the Google
Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it,
...more<http://groups.google.com/group/golang-nuts/msg/8d5080ab1ed4a800>

OCSP Stapling - tls.Certificate OCSPStaple<http://groups.google.com/group/golang-nuts/t/402e453b2b325718>

Paul van Brouwershaven <paul@vanbrouwershaven.com> Jun 06 12:58AM
-0700

Hi Adam,

The attached file, ocsp_request.go contains a function CreateRequest
that
will return a DER encoded OCSP request for the supplied certificate
chain.
This file is created as part of ...more<http://groups.google.com/group/golang-nuts/msg/2bdf4aa415a8a3a0>


agl <agl@golang.org> Jun 06 08:08AM -0700

On Thursday, June 6, 2013 3:58:15 AM UTC-4, Paul van Brouwershaven
wrote:
will return a DER encoded OCSP request for the supplied certificate chain.
This file is created as part of your ...more<http://groups.google.com/group/golang-nuts/msg/26eb9562d291e88>
AngularJS and parsePostForm (called by ParseForm on POST request in the
package net/http)<http://groups.google.com/group/golang-nuts/t/41087911509ad73e>

mat@stretchr.com Jun 06 07:47AM -0700

Goweb works great with AngularJS and lets you easily write RESTful
data
services. Let me know if you have any questions.

see http://stretchr.org/goweb

Mat

...more<http://groups.google.com/group/golang-nuts/msg/f38476b2d7f6260c>

Resource temporarily unavailable<http://groups.google.com/group/golang-nuts/t/ff32b4ffc9addaa4>

dlin <dlin.tw@gmail.com> Jun 05 05:52PM -0700

I wrote a proxy program to collect some tcp input into a buffer then
transfer to another server.

The test environment is just in a local lan. One client
open/send/recv/close to this ...more<http://groups.google.com/group/golang-nuts/msg/5663266571270859>


Jesse McNelis <jessta@jessta.id.au> Jun 06 11:29AM +1000

runtime/cgo: pthread_create failed: Resource temporarily unavailable
SIGABRT: abort
PC=0x7f800773c1c9
You're running out of threads.
Which means either:
* The allowable threads per ...more<http://groups.google.com/group/golang-nuts/msg/5440d27900237bd4>


dlin <dlin.tw@gmail.com> Jun 05 07:58PM -0700

I just use specific IP, so I guess this is not caused by DNS problem.
I guess it is caused by 'goroutine leak' problem. Is there any trick
to
check 'gorutine leak' problem?

I saw the goroutine ...more<http://groups.google.com/group/golang-nuts/msg/d52311c865a4bf0d>


James Bardin <j.bardin@gmail.com> Jun 06 07:03AM -0700
On Wednesday, June 5, 2013 10:58:03 PM UTC-4, dlin wrote:
check 'gorutine leak' problem?
I saw the goroutine number from 1~6. And suddenly jump to 128417. Does
that matter?
...more<http://groups.google.com/group/golang-nuts/msg/776efc336856a04f>

syntax clarification<http://groups.google.com/group/golang-nuts/t/d152be511eea95a2>

John Wilson <wilsonfiifi@gmail.com> Jun 06 06:06AM -0700

Hi folks,

Can someone explain to me why the following doesn't compile:

*package main*
*import "fmt"*
*
*
*func getValue() (string, int) {*
* return "my value", 1*
*}*
*
* ...more<http://groups.google.com/group/golang-nuts/msg/bd3fc4275a7f787>


Jan Mercl <0xjnml@gmail.com> Jun 06 03:14PM +0200
}
fmt.Println(val)
}

The error message "prog.go:12: val declared and not used" is clear and
complete. The if statement has it's own scope withing the brackets.
There 'val is declared ...more<http://groups.google.com/group/golang-nuts/msg/47a2dc1d2216faef>


John Wilson <wilsonfiifi@gmail.com> Jun 06 07:00AM -0700

Thanks Jan.
Also got further clarification from the docs
: /doc/effective_go.html#redeclaration

On Thursday, 6 June 2013 13:14:00 UTC, Jan Mercl wrote:
...more<http://groups.google.com/group/golang-nuts/msg/e08941618a3ce9ad>


John Wilson <wilsonfiifi@gmail.com> Jun 06 07:02AM -0700

the docs http://golang.org/doc/effective_go.html#redeclaration
On Thursday, 6 June 2013 14:00:41 UTC, John Wilson wrote:
...more<http://groups.google.com/group/golang-nuts/msg/eacedd771d42d8cf>

Where and how to look for Go jobs?<http://groups.google.com/group/golang-nuts/t/7644e74dbdd41e25>

tomwilde <sedevelopers01@gmail.com> Jun 06 03:52AM -0700

I'm switching jobs and I'm trying to search for "go" on job portals
but
with little success.
Is there any standard idiom for Go job postings?
Any good sites for jobs in Europe?
...more<http://groups.google.com/group/golang-nuts/msg/75a7ac764d767d33>


Dave Cheney <dave@cheney.net> Jun 06 08:57PM +1000

I'll just leave this here

http://gopheracademy.com/jobs


...more<http://groups.google.com/group/golang-nuts/msg/c794e142c0af1e3f>


Damian Gryski <dgryski@gmail.com> Jun 06 03:57AM -0700

Le jeudi 6 juin 2013 12:52:58 UTC+2, tomwilde a écrit :
Is there any standard idiom for Go job postings?
Any good sites for jobs in Europe?
Thanks in advance for any advice!
...more<http://groups.google.com/group/golang-nuts/msg/28f50461bf66bda1>


tomwilde <sedevelopers01@gmail.com> Jun 06 04:00AM -0700

Thank you, I'm located in Zürich, Switzerland. Thank you guys for the
link!

On Thursday, June 6, 2013 12:57:58 PM UTC+2, Damian Gryski wrote:
...more<http://groups.google.com/group/golang-nuts/msg/302898a8a7fd5400>


Thomas Kappler <tkappler@gmail.com> Jun 06 05:46AM -0700
On Thursday, June 6, 2013 1:00:25 PM UTC+2, tomwilde wrote:

Thank you, I'm located in Zürich, Switzerland. Thank you guys for
the link!

I will present Go at WebTuesday Zurich next Tuesday (in ...more<http://groups.google.com/group/golang-nuts/msg/486742fd210c7788>


tomwilde <sedevelopers01@gmail.com> Jun 06 06:37AM -0700

Hell yeah! I don't use twitter though so I can't confirm my assistance
over
that link.

Cheers!

PS: Does it cost something?

On Thursday, June 6, 2013 2:46:14 PM UTC+2, Thomas Kappler wrote:
...more<http://groups.google.com/group/golang-nuts/msg/bb4dcec5f3edbfc7>

the best way to copy a string in go<http://groups.google.com/group/golang-nuts/t/9da30223d26de908>

Nigel Tao <nigeltao@golang.org> Jun 06 10:17AM +1000
The strings passed into this API tend to be of of two classes: string
literals and URL query strings supplied by another package.
Ah, I'm guessing that that's tens or hundreds of bytes. ...more<http://groups.google.com/group/golang-nuts/msg/4889f913d0b7fc1>


beevik <brett@beevik.com> Jun 05 06:10PM -0700
On Wednesday, June 5, 2013 5:17:41 PM UTC-7, Nigel Tao wrote:
allocate a new string for copys2. Future implementations might
'optimize' that, but for now you'd be able to see if it actually
...more<http://groups.google.com/group/golang-nuts/msg/b816be9d4de848b>


beevik <brett@beevik.com> Jun 05 06:31PM -0700
On Wednesday, June 5, 2013 6:10:57 PM UTC-7, beevik wrote:

I guess it just bothered me that the runtime could be doing
something "not
so obvious" like this.

Oops, I meant compiler. ...more<http://groups.google.com/group/golang-nuts/msg/e113c15428d98b85>


Ziad Hatahet <hatahet@gmail.com> Jun 05 08:51PM -0700

I wonder if this issue is partly due to the fact that Go lacks a way to
enforce runtime constants. Wouldn't one solution be to return a
constant
[]byte when casting string into a []byte?


-- ...more<http://groups.google.com/group/golang-nuts/msg/c3efc9586a721624>

[ANN] GWK - Version 0.6a Released<http://groups.google.com/group/golang-nuts/t/6e174454c09cc240>

buzzlight <dianming.song@gmail.com> Jun 05 07:02PM -0700

sorry for my bad English

1: view engine

add Temlate Func
---
eq //equal
eqs //format to string then compare
gt //greater than
le //less than
set //// set a map[string]interface{} ...more<http://groups.google.com/group/golang-nuts/msg/4c4f0e49aff18b42>

Which goweb for rest?<http://groups.google.com/group/golang-nuts/t/e9f339c54db4c60f>

mat@stretchr.com Jun 05 06:15PM -0700

Hey -

Goweb 2 has just launched and you can see our docs of how to get going
by
visiting https://github.com/stretchrcom/goweb

Add an issue if you have any questions, or visit our Google ...more<http://groups.google.com/group/golang-nuts/msg/7125f8cb4eb9df8a>

You received this message because you are subscribed to the Google Group
golang-nuts.
You can post via email <golang-nuts@googlegroups.com>.
To unsubscribe from this group, send<golang-nuts+unsubscribe@googlegroups.com>an empty message.
For more options, visit<http://groups.google.com/group/golang-nuts/topics>this group.

--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedJun 7, '13 at 12:58a
activeJun 7, '13 at 12:58a
posts1
users1
websitegolang.org

1 user in discussion

Chris Kelley: 1 post

People

Translate

site design / logo © 2022 Grokbase