[go-nuts] Re: Handling connection retries on a highly-available service

2019-02-12 Thread marc . zahn
> > What about queuing > I cannot edit my post so a new answer here with more explanation: Just have a RabbitMQ or whatever in between and every logging sends a message to it while the logging service consumes it. As long as the logging service is down the messages remain in the queue. Your r

[go-nuts] Re: Handling connection retries on a highly-available service

2019-02-12 Thread marc . zahn
What about Queuing? -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/

[go-nuts] Re: Missing well-known IPv4 address

2019-02-12 Thread mikioh . public . networking
unlike ipv6, ::1/128, we may use any address in the ipv4 loopback address block 127.0.0.0/8. https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml perhaps it might be better to keep the standard library away from the folklore like "127.0.0.1 is my address,

Re: [go-nuts] Re: url.parse issue if the first character of a url is a number

2019-02-12 Thread mikioh . public . networking
if you are talking about https://play.golang.org/p/0oIfvatzysI, it's better to file an issue. -- 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+unsubsc

[go-nuts] Re: Enumerate query result fields using "github.com/go-ole/go-ole/oleutil"

2019-02-12 Thread Curtis Paul
This does what I need... oleutil.ForEach() On Sunday, February 10, 2019 at 2:09:39 PM UTC-7, Curtis Paul wrote: > > Any ideas on how I can get a list of fields (not values) after executing > something like this? > > resultRaw, _ := oleutil.CallMethod(service, "ExecQuery", "SELECT * FROM > Win32_

Re: [go-nuts] Enumerate query result fields using "github.com/go-ole/go-ole/oleutil"

2019-02-12 Thread Curtis Paul
Using this "github.com/go-ole/go-ole" "github.com/go-ole/go-ole/oleutil" how does the sql package fit in? On Monday, February 11, 2019 at 1:00:29 AM UTC-7, Lutz Horn wrote: > > > Any ideas on how I can get a list of fields (not values) after executing > > something like this? > > Try these: >

Re: [go-nuts] Go vs C speed - What am I doing wrong?

2019-02-12 Thread Bakul Shah
According to the C standard: If the quotient a/b is representable, the expression (a/b)*b + a%b shall equal a. In your example, dividing x by -1 would make x +2147483648, which is not representable in int32_t. May be this is why -2147483648/-1 also exceptions out? Nitpicking:

Re: [go-nuts] Re: Go vs C speed - What am I doing wrong?

2019-02-12 Thread Nigel Tao
On Wed, Feb 13, 2019 at 11:23 AM Nigel Tao wrote: > Yes, both the Go code and the C code will panic if y is zero. Still, > "-2147483648 % -1" has a sensible mathematical definition (zero), and > C fails to calculate it. I forgot to mention that, even with a mod-by-zero, Go lets you recover the pa

[go-nuts] database/sql changes and proposals

2019-02-12 Thread Daniel Theophanes
In order to help keep database/sql driver developers and the maintainers of database/sql on the same page, I'm going to start to posting issues and proposals to the following group: https://groups.google.com/forum/#!forum/golang-sql If you are a driver developer, I would recommend subscribing to

Re: [go-nuts] Re: Go vs C speed - What am I doing wrong?

2019-02-12 Thread Nigel Tao
On Mon, Feb 4, 2019 at 5:34 AM Miki Tebeka wrote: > A bit of profiling shows that the modulo operator takes most of the time: C's modulo operator is faster, but can crash if you look at it funny. $ cat x.c #include int main(int argc, char** argv) { int x = -2147483648; int y = -1; printf

Re: [go-nuts] Re: url.parse issue if the first character of a url is a number

2019-02-12 Thread Shulhan
On Tue, 12 Feb 2019 09:35:38 -0800 (PST) jake6...@gmail.com wrote: > I can not speak directly to Go's version, but according to the IETF > standards, a domain name can not start with a digit. So they are in > fact malformed. > It used to, but then RFC 1123 section 2.1 relaxed the syntax to all

Re: [go-nuts] A Measure of Hash Function Collisions

2019-02-12 Thread Michael Jones
Serhat, some ideas for you... https://play.golang.org/p/7QPy5wa-9eO On Tue, Feb 12, 2019 at 9:23 AM Damian Gryski wrote: > For more information on hash function goodness tests, check out > https://github.com/demerphq/smhasher > > Damian > > On Tuesday, February 12, 2019 at 5:23:39 AM UTC-8, Serh

[go-nuts] Re: url.parse issue if the first character of a url is a number

2019-02-12 Thread jake6502
I can not speak directly to Go's version, but according to the IETF standards, a domain name can not start with a digit. So they are in fact malformed. On Sunday, February 10, 2019 at 9:23:54 PM UTC-5, Nathan Xu wrote: > > What I said is the url content without http/https . > > On Sunday, Febr

Re: [go-nuts] Is it practical to auto rearrange struct fields to reduce paddings in Go?

2019-02-12 Thread Damian Gryski
Check out https://github.com/dominikh/go-tools/tree/master/cmd/structlayout and https://github.com/dominikh/go-tools/tree/master/cmd/structlayout-optimize On Wednesday, February 6, 2019 at 8:20:06 PM UTC-8, Kurtis Rader wrote: > > > Is it practical to auto rearrange struct fields to reduce padd

Re: [go-nuts] A Measure of Hash Function Collisions

2019-02-12 Thread Damian Gryski
For more information on hash function goodness tests, check out https://github.com/demerphq/smhasher Damian On Tuesday, February 12, 2019 at 5:23:39 AM UTC-8, Serhat Şevki Dinçer wrote: > > On Saturday, February 9, 2019 at 5:23:14 PM UTC+3, Serhat Şevki Dinçer > wrote: >> >> On Fri, Feb 8, 201

[go-nuts] View http open connections

2019-02-12 Thread jose . alberto . coelho
I was trying to get current HTTP connections in HTTP.Server. Internally transport tracks it under connPerHostCount. However, I don't see a way of getting this value. I tried this: type HTTPRequestMetrics struct { activeConnections int64 next http.Handler } func HTTPRequestMetri

Re: [go-nuts] A Measure of Hash Function Collisions

2019-02-12 Thread Serhat Şevki Dinçer
On Saturday, February 9, 2019 at 5:23:14 PM UTC+3, Serhat Şevki Dinçer wrote: > > On Fri, Feb 8, 2019 at 7:42 PM Michael Jones wrote: > > clustering: > > https://www.cs.cornell.edu/courses/cs3110/2014fa/lectures/13/lec13.html > > > > careful hash functions often treat short inputs specially.