Re: [go-nuts] image Gray16 endianness

2017-01-10 Thread Pablo Rozas Larraondo
Thanks Dan. I'm just surprised that Gray16 uses big endian when, for example, Go's uint16 type uses the little endian convention. I guess I find this weird and I want to know if there is a reason for implementing Gray16 this way. On Wed, Jan 11, 2017 at 4:40 PM, Dan Kortschak <

Re: [go-nuts] image Gray16 endianness

2017-01-10 Thread Dan Kortschak
On Wed, 2017-01-11 at 16:21 +1100, Pablo Rozas Larraondo wrote: > I'm confused with image.Gray16 having pixel values represented in the > wrong order. It seems to me that image.Gray16 considers numbers to be > big endian instead of little endian. Why do you think that is the wrong order? Here is

[go-nuts] image Gray16 endianness

2017-01-10 Thread Pablo Rozas Larraondo
Hi, I'm confused with image.Gray16 having pixel values represented in the wrong order. It seems to me that image.Gray16 considers numbers to be big endian instead of little endian. I've created a small playground example to illustrate this: https://play.golang.org/p/bhYbuIkkOz Is there

[go-nuts] Re: Go 1.8 Release Candidate 1 is released

2017-01-10 Thread João Henrique Machado Silva
Awesome! Thanks!! Em terça-feira, 10 de janeiro de 2017 18:38:03 UTC-2, Chris Broadfoot escreveu: > > Hello gophers, > > We have just released go1.8rc1, a release candidate of Go 1.8. > It is cut from release-branch.go1.8 at the revision tagged go1.8rc1. > > Thank you to everyone who has helped

Re: [go-nuts] Compiling a really really large package

2017-01-10 Thread chad . retz
Good deal. Issue opened at https://github.com/golang/go/issues/18602 and I attached code to replicate. On Tuesday, January 10, 2017 at 3:31:11 PM UTC-6, Ian Lance Taylor wrote: > > On Tue, Jan 10, 2017 at 9:47 AM, > wrote: > > > > Is there any value in me reporting it?

[go-nuts] []struct{} vs. []*struct{}

2017-01-10 Thread Steve Roth
Suppose you are reading a list of structures, and you do not know in advance how many there will be. I'm trying to figure out when it's better to append them to a slice of structures, and when it's better to append pointers to them to a slice of pointers. It's easy enough to to the math on

[go-nuts] Re: bit twiddling API survey

2017-01-10 Thread notcarl via golang-nuts
Are bit rotations complied to single instructions? Specifically things like: var a uint32 (a << 5) | (a >> (32 - 5) On Monday, January 9, 2017 at 3:46:45 PM UTC-8, mo...@google.com wrote: > > Hello! > > I'm working on a proposal for a compiler/hardware supported bittwidling > API. See

Re: [go-nuts] Re: Go 1.8 Release Candidate 1 is released

2017-01-10 Thread Brad Fitzpatrick
App Engine has its own release cycle, but they're working on it. On Tue, Jan 10, 2017 at 3:06 PM, go-guy wrote: > Awesome! > > Is there any way that 1.8 can be made available to AppEngine when it's > released? > > On Tuesday, January 10, 2017 at 3:38:03 PM UTC-5,

[go-nuts] Re: Go 1.8 Release Candidate 1 is released

2017-01-10 Thread go-guy
Awesome! Is there any way that 1.8 can be made available to AppEngine when it's released? On Tuesday, January 10, 2017 at 3:38:03 PM UTC-5, Chris Broadfoot wrote: > > Hello gophers, > > We have just released go1.8rc1, a release candidate of Go 1.8. > It is cut from release-branch.go1.8 at the

[go-nuts] Re: bit twiddling API survey

2017-01-10 Thread Scott Pakin
On Monday, January 9, 2017 at 6:07:19 PM UTC-7, ma...@influxdb.com wrote: > > I haven't personally experienced a need for a bit twiddling API, but if > you're looking for other interesting operations, you might want to check > out the awesome-bits curated list of bitwise operations [1]. > > [1]

[go-nuts] Re: Poor performance of net.Dial() & friends

2017-01-10 Thread sjn via golang-nuts
On Tuesday, January 10, 2017 at 1:24:51 PM UTC-8, Dave Cheney wrote: > Dumb question, what about your design prevents you from pooling and reusing connected sockets? The requirements call for a new TCP connection each time. I proposed reusing connections but the customer isn't happy with

Re: [go-nuts] Compiling a really really large package

2017-01-10 Thread Ian Lance Taylor
On Tue, Jan 10, 2017 at 9:47 AM, wrote: > > Is there any value in me reporting it? If helpful, I may be able to toss a > large tarball up on Dropbox or something. It's not really high priority for > me either tbh because I know it would be difficult to stream the compilation

[go-nuts] Poor performance of net.Dial() & friends

2017-01-10 Thread Dave Cheney
Second dumb question, if your messages are 100 bytes long, why not use UDP? -- 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

Re: [go-nuts] cpu profiling in CGO

2017-01-10 Thread Ian Lance Taylor
On Tue, Jan 10, 2017 at 12:52 PM, Yucong Sun wrote: > > I've successfully compile and staticlly linked my C++ project and CGO , I > was trying to get on demand CPU profling to work, but it keeps generating > empty outputs. > > The CPU profiling page mentioned that if code

[go-nuts] Poor performance of net.Dial() & friends

2017-01-10 Thread Dave Cheney
Dumb question, what about your design prevents you from pooling and reusing connected sockets? -- 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

[go-nuts] cpu profiling in CGO

2017-01-10 Thread Yucong Sun
Hi, I've successfully compile and staticlly linked my C++ project and CGO , I was trying to get on demand CPU profling to work, but it keeps generating empty outputs. The CPU profiling page mentioned that if code built in C mode, i need to do something with SIGPROF , but no examples were

[go-nuts] best way to write a file handler to serve gzipped files

2017-01-10 Thread 'Anmol Sethi' via golang-nuts
Hello, I'm trying to write a http handler to serve gzipped files but if the client does not accept the gzip content-encoding, it falls back to identity. I see three ways to do this. First is dynamic gzipping. If a client supports it and a file is gzippable, I gzip the file on the fly and then

Re: [go-nuts] Compiling a really really large package

2017-01-10 Thread chad . retz
Is there any value in me reporting it? If helpful, I may be able to toss a large tarball up on Dropbox or something. It's not really high priority for me either tbh because I know it would be difficult to stream the compilation inside the same package w/ circular refs and therefore may not be

Re: [go-nuts] Reset Slice with Make Every Time?

2017-01-10 Thread wadekim991 via golang-nuts
On Tue, 1/10/17, Marvin Renich wrote: Subject: Re: [go-nuts] Reset Slice with Make Every Time? To: "golang-nuts" Date: Tuesday, January 10, 2017, 5:29 PM * Tomi Häsä [170110

[go-nuts] Re: How to know the listener

2017-01-10 Thread Nathan Kerr
Hi, You can use RemoteAddr from *http.Request to tell the difference. When the request comes through the unix socket, RemoteAddr is "" (i.e., blank). The source for my test server is at https://play.golang.org/p/m3h_L_ACks I used curl 127.0.0.1:3001 to test the tcp socket and curl-unix-socket

Re: [go-nuts] Re: error message with Go fonts

2017-01-10 Thread Mathieu Lonjaret
Ah thanks, I had forgotten to try reading that one. Here goes: $ 9p read 'font/Go Mono/11/font' 16 13 0x 0x001f x.bit 0x0020 0x003f x0020.bit ... On 10 January 2017 at 17:13, andrey mirtchovski wrote: > > Sorry, I don't understand what you mean

Re: [go-nuts] Re: error message with Go fonts

2017-01-10 Thread andrey mirtchovski
> Sorry, I don't understand what you mean by the textual Plan 9 font file. do $ 9p read 'font/Go Mono/11/font' instead. the second line should point to the glyph file for runes 0x0 to 0xff, something like: 0x 0x00ff x.bit -- You received this message because you are subscribed to the

[go-nuts] golang.org/x/crypto/nacl authentication support

2017-01-10 Thread Manlio Perillo
Hi. I need an high level crypto package, and x/crypto/nacl seems a good solution. However It only supports authenticated encryption. What about authentication (http://nacl.cr.yp.to/auth.html) ? Surely, compared to authenticated encryption, authentication is simple to implement. However I would

Re: [go-nuts] Reset Slice with Make Every Time?

2017-01-10 Thread Marvin Renich
* Tomi Häsä [170110 02:23]: > On Tuesday, January 10, 2017 at 1:49:37 AM UTC+2, kortschak wrote: > > On Mon, 2017-01-09 at 15:12 -0800, Tomi Häsä wrote: > > > Is this the correct way of resetting a slice? I mean do I always > > > need to use make to reset a slice? > > > >

[go-nuts] Sort between bitcoin addresses and number of pages

2017-01-10 Thread Anonymous
hello i'm a problem with source code of directory.io : As said in the title I'm on a project (GOLANG language) I recreated the site directory.io with as a modification the display of the final balance of each address (addresses included) And also put a filter of the kind the addresses beginning

[go-nuts] How to know the listener

2017-01-10 Thread hawk hsieh
I open a port 80 and a unix socket to listen http request simultaneously. I would like to determine where is the request coming from so that the request from unix socket is no need to be authorized. Maybe the first problem is to know the listener from http.ResponseWriter or *http.Request. I

Re: [go-nuts] Reset Slice with Make Every Time?

2017-01-10 Thread djadala
On Tuesday, January 10, 2017 at 9:52:06 AM UTC+2, Chetan Gowda wrote: Old data remains as it is in the existing allocation. It will be > overwritten as you fill up the slice again. This happens in case of group = group[:0], OP asks what happens in case of group = make( []Area, 0, MAX ),

[go-nuts] Re: error message with Go fonts

2017-01-10 Thread Mathieu Lonjaret
Sorry, I don't understand what you mean by the textual Plan 9 font file. The actual font is installed at /usr/share/fonts/truetype/go/Go-Mono.ttf , and I think acme accesses it through fontsrv. If I do $ 9p ls 'font/Go Mono/11/' I get: font x.bit x0020.bit x0040.bit ... x2660.bit xf800.bit

[go-nuts] [ANN] gtcp - TCP server framework that inherits battle-tested code from net/http(tips

2017-01-10 Thread neat cat
Hi all, I love go especially to write any server stuffs and wish if there was a generic server stuff that inherits battle-tested code from net/http (proper error handling, heuristic exponential backoff value working well in most cases and Close/Shutdown operations that will be introduced in 1.8

[go-nuts] Re: database/sql: special interest group

2017-01-10 Thread LMR
Great! Thank you. Much needed feature IMO On Monday, 9 January 2017 01:48:13 UTC+1, Daniel Theophanes wrote: > > In go1.8 I worked on adding a number of features to "database/sql". I hope > to address a few more needs in the go1.9 cycle. To that end I want to > gather some other voices who both