[go-nuts] WebAssembly as a target

2016-06-18 Thread 'Mihai B' via golang-nuts
I don't think we can expect anything before wasm supports GC (i.e. Phase 3 on wasm roadmap). Once GC is supported(not very soon) Go could be compiled through llgo[0]. One issue could be the binary size(.i.e due /reflect) - Mihai [0] https://llvm.org/svn/llvm-project/llgo/trunk/README.TXT -- Yo

[go-nuts] Re: Discussion on "Vendoring edge case, critical problem"

2016-06-18 Thread Dave Cheney
Nope, vendoring remains unsuitable for library authors. On Sunday, 19 June 2016 15:14:57 UTC+10, Tyler Compton wrote: > > A user brought up a problem with the current vendoring setup regarding > exposing types of a vendored dependency. There was a lot of great > discussion and it seemed like the

[go-nuts] Discussion on "Vendoring edge case, critical problem"

2016-06-18 Thread Tyler Compton
A user brought up a problem with the current vendoring setup regarding exposing types of a vendored dependency. There was a lot of great discussion and it seemed like there was a consensus that something needed to change, but I don't see that anything had come of it. Here is the discussion: htt

Re: [go-nuts] Powersets and append() confusion

2016-06-18 Thread Sonia Keys
See also full slice expressions Bug fix using full slice expressions: https://play.golang.org/p/25wqGsZZ8O On Saturday, June 18, 2016 at 2:40:54 PM UTC-4, Oliver Schmid wrote: > > Thanks for the help Jakob. Now the docs about *append()* editing in

[go-nuts] Re: WebAssembly as a target

2016-06-18 Thread Dmitri Shuralyov
I would be very interested in this. I think GopherJS has shown how compelling it can be to be able to write Go that can run in the browser. It serves as a great preview of that ability, enabling one to experiment and prototype things. But to really get the best performance, minimum file size, e

[go-nuts] Re: When should I use the connection pool?

2016-06-18 Thread Chris Hines
Note that the implementation of database/sql has been updated since that article was written so that it behaves much better under the conditions described. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop

[go-nuts] Re: benchmarking not working (always) go1.7beta

2016-06-18 Thread 'simon place' via golang-nuts
and the conclusion is. Encoding got a decent bit faster. whilst, decoding got noticeably slower. earlier on i had already found conversion to int16 was a lot slower than int32, so Iā€™d was already up. /* Hal3 Sun Jun 19 00:53:10 BST 2016 go version go1.7beta2 linux/amd64 BenchmarkPCM8b

[go-nuts] Re: Proposal to remove _test files from gocyclo checks

2016-06-18 Thread Conner Hewitt
Eep, just realized gocyclo is a private project at https://github.com/fzipp/gocyclo, sorry! On Saturday, June 18, 2016 at 6:48:32 PM UTC-5, Conner Hewitt wrote: > > I think it would be best if the gocyclo tool ignored _test files, and in > turn Test functions. > > Testing is one of the cases whe

Re: [go-nuts] Re: [ANN] primegen.go: Sieve of Atkin prime number generator

2016-06-18 Thread gordonbgood
On Saturday, June 18, 2016 at 12:21:21 AM UTC+2, gordo...@gmail.com wrote: On Friday, June 17, 2016 at 4:48:06 PM UTC+2, gordo...@gmail.com wrote: > > I am not on a high end Intel CPU now, but when I was I found that with a > > buffer size adjusted to the L1 cache size (8192 32-bit words or 32 >

[go-nuts] Re: benchmarking not working (always) go1.7beta

2016-06-18 Thread 'simon place' via golang-nuts
OK got it, i wasn't using a package level var to store the result. -- 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 m

[go-nuts] Proposal to remove _test files from gocyclo checks

2016-06-18 Thread Conner Hewitt
I think it would be best if the gocyclo tool ignored _test files, and in turn Test functions. Testing is one of the cases where you may have to use a lot of 'for', 'if', and other statements, which gocyclo produces warnings on. An example is my project where I'm at complexity of 17, just 2 over

[go-nuts] Re: benchmarking not working (always) go1.7beta

2016-06-18 Thread 'simon place' via golang-nuts
thanks, i was guessing something like that, these are very short pieces of linear code. so i did try; using returned values, repeating the test 10x in the loop, and adding stop/start. the code's on github, (https://github.com/splace/signals) but this is a selective test, so its really buried,

[go-nuts] Re: benchmarking not working (always) go1.7beta

2016-06-18 Thread Dave Cheney
Without seeing the code (hint, hint) I'm guessing that your benchmark got optimised away. Here are some links with suggestions on how to make your benchmark reliable. http://dave.cheney.net/2013/06/30/how-to-write-benchmarks-in-go#compiler-optimisation http://talks.godoc.org/github.com/davechene

[go-nuts] benchmarking not working (always) go1.7beta

2016-06-18 Thread 'simon place' via golang-nuts
any ideas? i've run out. this only happens with one program, and only in go1.7beta1(and 2). (i notice PASS is now at the end rather than the start. FWIW) see below /* Hal3 Sat Jun 18 21:52:37 BST 2016 go version go1.7beta1 linux/amd64 BenchmarkPCM8bitEncode-220 0.

Re: [go-nuts] Re: encoding/json: any way to receive number literal "10.0" into integer field?

2016-06-18 Thread C Banning
Or: https://play.golang.org/p/VjFJGUI27W On Friday, June 17, 2016 at 4:33:20 PM UTC-6, Matt Harden wrote: > > https://play.golang.org/p/8R6QmYw_28 > > On Fri, Jun 17, 2016 at 3:08 PM Evan Digby > wrote: > >> To further this, if you do need your internal model to be a concrete >> struct rather th

[go-nuts] Re: Go 1.7beta1 performance (compression)

2016-06-18 Thread alb . donizetti
Are you saying that the go1.7beta compiler generates for the following loop: for val < 2 { runLength = (runLength << 1) | int(val) srcIdx++ significantly worse code than go1.6.2? If you can isolate the problem, I'd say it's worth to open an issue about this. Il giorno sabato 18 giugno 2016 22:0

[go-nuts] Go 1.7beta1 performance (compression)

2016-06-18 Thread flanglet
I have tested the performance of the newly released 1.7beta1 against a set of compression algorithms I have been working on. Here are the results for the compression of the Silesia Corpus. The tests were performed on a desktop i7-2600 @3.40GHz, Win7, 16GB RAM In the encoding and decoding time

[go-nuts] WebAssembly as a target

2016-06-18 Thread bourget . alexandre
After the Google I/O 2016 presentations where we saw WebAssembly in action, are there any thought of having a WebAssembly target for the Go compiler ? What are you thoughts on that and/or timeline ? Alexandre -- You received this message because you are subscribed to the Google Groups "golang

Re: [go-nuts] Powersets and append() confusion

2016-06-18 Thread Oliver Schmid
Thanks for the help Jakob. Now the docs about *append()* editing in place make more sense to me. For those interested someone also sent me a fix: https://play.golang.org/p/dbYTO2h8Sw On Saturday, June 18, 2016 at 10:50:10 AM UTC-7, Jakob Borg wrote: > > 2016-06-18 19:16 GMT+02:00 Oliver Schmid

Re: [go-nuts] Powersets and append() confusion

2016-06-18 Thread Jakob Borg
2016-06-18 19:16 GMT+02:00 Oliver Schmid : > Hi. I made a string only version of the powerset function on Rosetta Code > and ran into a bug where a slice input to append() [one, two, three, four] > seems to be replaced by [one, two, three, five]. What. Note that append() doesn't necessarily return

[go-nuts] Powersets and append() confusion

2016-06-18 Thread Oliver Schmid
Hi. I made a string only version of the powerset function on Rosetta Code and ran into a bug where a slice input to *append()* [one, two, three, four] seems to be replaced by [one, two, three, five]. What. Here's the bug on the Go Playground

[go-nuts] generating interfaces from proto3 (grpc)

2016-06-18 Thread Sankar
Hi I've a proto3 file: == message Any { } message InsertParams { Any Record = 1; } service myService { rpc Insert (InsertParams) returns (InsertResponse); } where I have an "Insert" API which expects a InsertParams struct as the parameter. However, the InsertParams struc

[go-nuts] Re: When should I use the connection pool?

2016-06-18 Thread Danilo Cicerone
Thanks Simon, that helps me a lot. -- 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://group

Re: [go-nuts] Re: [ANN] primegen.go: Sieve of Atkin prime number generator

2016-06-18 Thread āš›
On Saturday, June 18, 2016 at 12:21:21 AM UTC+2, gordo...@gmail.com wrote: > > On Friday, June 17, 2016 at 4:48:06 PM UTC+2, gordo...@gmail.com wrote: > > > I am not on a high end Intel CPU now, but when I was I found that with > a buffer size adjusted to the L1 cache size (8192 32-bit words or 3

Re: [go-nuts] Re: [ANN] primegen.go: Sieve of Atkin prime number generator

2016-06-18 Thread āš›
On Saturday, June 18, 2016 at 6:15:11 AM UTC+2, gordo...@gmail.com wrote: > > Here is a golang version of Daniel Bernstein's "eratspeed", which is a > straight translation of his C code to golang without any changes other than > as necessary to make it work: https://play.golang.org/p/Sd6qlMQcHF.

[go-nuts] Re: export struct method to C-code as callback (cgo-related)

2016-06-18 Thread Andrey Salnikov
Thank you all guys for your replies! it helps me to understand how it works! really helpful! :) On Friday, June 17, 2016 at 8:32:53 PM UTC+6, Andrey Salnikov wrote: > > Hello, > > Could you guys please help me. > > I can't find how to export method function which belongs to some go-struct > to

Re: [go-nuts] Re: go1.7beta2 prints "too many values in struct initializer" when I ran "go test" for gopkg.in/vmihailenco/msgpack.v2

2016-06-18 Thread Hiroaki Nakamura
2016-06-18 11:42 GMT+09:00 Dave Cheney : > This could be caused by setting GOROOT to a value that does not match the > `go` binary in your path. If you have another version of Go installed, > please remove it, unset GOROOT, and follow the installation instructions on > the Go website. This worked,

[go-nuts] EncodeInt and DecodeInt functions in https://github.com/dineshappavoo/basex/

2016-06-18 Thread Dinesh Appavoo
Basex - [base62] Youtube like id generator : Introducing EncodeInt and DecodeInt functions to basex library. They basically do exactly the same functionality as Encode and Decode but use raw *big.Int args/ret value instead of strings. Also this release has some optimizations. Thanks Christian M

[go-nuts] Re: When should I use the connection pool?

2016-06-18 Thread Simon Ritchie
Every database offers a limited number of connections because each of them eats resources. If you are using your database in a commercial environment, you configure your database with a maximum number of connections. If you don't do that, the DB will configure some default maximum, it won't o