Re: [go-nuts] Re: Generic alternatives: new basic types?

2018-09-21 Thread Lucio De Re
On 9/22/18, Michael Jones wrote: > these seem excellent points all around. > > one area of difficulty seems to me the lack of operator overloading. now, > hold your breath, i'm not arguing for it here. but it highlights a kind of > structural issue that is in the air around the discussion of

[go-nuts] Re: YANG related Go tools/packages

2018-09-21 Thread Tamás Gulácsi
My Google search for "YANG" showed the Wikipedia page as the first result; that page (https://en.wikipedia.org/wiki/YANG#Implementations) lists several language bindings, goyang (https://github.com/openconfig/goyang) the FIRST, which has an .proto dumper example, too. I don't think this needed

Re: [go-nuts] Re: Using modules with go test ./...

2018-09-21 Thread Scott Cotton
Hi all, I for one would also consider the interface an improvement if as part of making modules work outside of a "main module" included making go test ./... work as before. Perhaps ./... could mean find each top level module in src/ and test. I am not sure what the modules implementors

[go-nuts] YANG related Go tools/packages

2018-09-21 Thread Tharaneedharan Vilwanathan
Hi All, I am trying to get my hands dirty with YANG, converting yang to .proto, JSON, etc. Can someone give me some pointers on what packages I should try and/or provide some pointers? I tried to search and use but somehow I have trouble finding tutorials etc to begin with. Appreciate your help.

Re: [go-nuts] Golang, how dare you handle my checks! (Critique of error proposal)

2018-09-21 Thread Sameer Ajmani
That's quite an interesting wiki page, thanks for sharing. On Thu, Sep 13, 2018 at 2:46 PM Liam Breck wrote: > The contents of the feedback wiki are interesting. The Go 2 error proposal > hasn't seen much support, and there are lots of counter-proposals... > >

Re: [go-nuts] Re: Generic alternatives: new basic types?

2018-09-21 Thread Michael Jones
these seem excellent points all around. one area of difficulty seems to me the lack of operator overloading. now, hold your breath, i'm not arguing for it here. but it highlights a kind of structural issue that is in the air around the discussion of generics. consider: i instantiate a tree type

Re: [go-nuts] How can I run a method in a subprocess in golang?

2018-09-21 Thread Justin Israel
On Sat, Sep 22, 2018, 8:24 AM 'ggyft' via golang-nuts < golang-nuts@googlegroups.com> wrote: > My use case is that I am designing a scheduler that schedules various > health checks (go method) periodically. Earlier I want to model run them in > a new goroutine. But I ran into problems when I want

[go-nuts] Adding packages for the lang

2018-09-21 Thread Dave Cheney
Additions to the language are handled via a written proposal process. https://github.com/golang/proposal/blob/master/README.md -- 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,

[go-nuts] Adding packages for the lang

2018-09-21 Thread Hunter Breathat
Hey does anyone know if we can request commits to add some basic Functionality to the lang core ex. A Node struct? Or a PriorityQueue? Jw As they are some pretty common structs that used and was just wondering. I know we could host them on our own git{github,gitlab, git platfrom}. But is

[go-nuts] Re: x/mobile: forcing IntelliJ to fully reload changes to AAR

2018-09-21 Thread Elias Naur
Hi, Since the gradle has no maintaner anymore (https://github.com/golang/go/issues/25314) so I deleted its mention from the Wiki page. I think you're better off not using the plugin and manually rebuild the AAR file with gomobile bind. - elias On Friday, September 21, 2018 at 8:13:20 PM

[go-nuts] How can I run a method in a subprocess in golang?

2018-09-21 Thread 'ggyft' via golang-nuts
My use case is that I am designing a scheduler that schedules various health checks (go method) periodically. Earlier I want to model run them in a new goroutine. But I ran into problems when I want to design timeout for each method. Basically go seems not able to kill goroutine and clean up

[go-nuts] Re: Generic alternatives: new basic types?

2018-09-21 Thread Lucio
On Friday, 21 September 2018 11:52:40 UTC+2, Louki Sumirniy wrote: > > This is something that I have seriously considered to be the right way for > Go to express other generic types. I am in fact in the middle of a project > at the moment where I have created a pair of generic byte buffer

[go-nuts] Re: Golang, how dare you handle my checks! (Critique of error proposal)

2018-09-21 Thread Liam
See also this comprehensive list of possible Go 2 error handling requirements on golang-dev: https://groups.google.com/d/topic/golang-dev/4x7Fv_wIiZg/discussion On Monday, September 10, 2018 at 6:11:16 AM UTC-7, Liam wrote: > > > "Golang, how dare you handle my checks!" > A Critique of the Go

Re: [go-nuts] Re: Using modules with go test ./...

2018-09-21 Thread John
Thanks for the reply. Other that the bug I encountered, this seems to be the behavior. This new "mod" behavior for ./... at least for "go test" seems to be a step backwards. It assumes a kind of test methodology based around a certain type of file layout. If I am at the top of my src/ and I

[go-nuts] x/mobile: forcing IntelliJ to fully reload changes to AAR

2018-09-21 Thread Damien Radtke
I've been playing around with building an Android application using Go by binding the Go code into an AAR library that Android can use: https://github.com/golang/go/wiki/Mobile#building-and-deploying-to-android-1 I've come up with a successful build setup that utilizes the gobind gradle plugin

[go-nuts] Re: go mobile android release?

2018-09-21 Thread Damien Radtke
Only thing I can think of would be to define build tags for each Android version, and then pass that through to gomobile. On Thursday, September 20, 2018 at 4:07:18 PM UTC-5, Scott Cotton wrote: > > Howdy Gophers, > > Noob question for go mobile. I was wondering if anyone knows a good way > to

Re: [go-nuts] Re: Using modules with go test ./...

2018-09-21 Thread thepudds1460
> "What I would expect with 'go test ./...' is behavior similar to what I had before modules." Hi John, all, Just to expand slightly on the points from Dave, Scott, and Paul... I suspect part of what you are encountering is that in general: 1. Modules are opt-in for Go 1.11, so by

[go-nuts] Re: A simplified generics constraint system.

2018-09-21 Thread alanfo
Thanks to all those who have had the patience to read this proposal and made comments on, or criticisms of, it. Having carefully considered the points made, I have concluded that the current proposal falls short in two important respects: 1. It doesn't deal adequately with numeric precision

[go-nuts] database/sql/driver: how to return *sql.Rows?

2018-09-21 Thread Tamás Gulácsi
For the discussion, see https://groups.google.com/forum/#!topic/golang-sql/HNvcgScdyt8 TL;DR Oracle may return a cursor (resultset, rows), but the driver cannot turn it into a proper *sql.Rows with the nice Scan functionality. I've found a hack (make the driver return the driver.Rows in a Query

[go-nuts] Re: discuss database/sql feature request: add ability to retrieve driver.Driver by registered driver name.

2018-09-21 Thread Bas Van Beek
Because we don't want it to proliferate through your entire code base and packages as sql.DB is a struct, not an interface. It needs to be completely invisible to your code base once set-up. On Friday, September 21, 2018 at 5:32:24 PM UTC+2, Tamás Gulácsi wrote: > Why do you want to wrap the

[go-nuts] Re: Why google doesnt make jdbc like library for go?

2018-09-21 Thread Tamás Gulácsi
Oracle does not publish the specification of its SQL.Net protocol, so no clean room implementation is possible. Either Oracle provides such a driver, or you have to use what it provides: OCI. A small help in the right direction is github.com/oracle/odpi and gopkg.in/goracle.v2 - it does NOT

[go-nuts] Re: discuss database/sql feature request: add ability to retrieve driver.Driver by registered driver name.

2018-09-21 Thread Tamás Gulácsi
Why do you want to wrap the driver? Why not just the db? 2018. szeptember 21., péntek 15:32:40 UTC+2 időpontban Bas Van Beek a következőt írta: > > > The preferred method of working with database/sql is to use registered > driver names to identify which driver to use for connecting to the

Re: [go-nuts] Re: Using modules with go test ./...

2018-09-21 Thread John
Paul, thanks for the explanation. But I think maybe either I'm missing something or I'm not explaining something correctly. What I would expect with "go test ./..." is behavior similar to what I had before modules. That behavior would be that the go tool would recursively run all tests from

Re: [go-nuts] Re: Why google doesnt make jdbc like library for go?

2018-09-21 Thread Ian Davis
On Fri, 21 Sep 2018, at 3:36 AM, ascarra...@gmail.com wrote: > He has a valid point. Most of the enterprise applications uses Oracle > DB. I for one is looking for an oracle driver similar to what JDBC > does (a simple to use, no separate installation needed). All of Go > oracle drivers available

[go-nuts] discuss database/sql feature request: add ability to retrieve driver.Driver by registered driver name.

2018-09-21 Thread Bas Van Beek
The preferred method of working with database/sql is to use registered driver names to identify which driver to use for connecting to the database. OpenCensus now has instrumentation for database/sql by allowing database drivers to be wrapped with the ocsql

[go-nuts] AF_UNIX sockets on Windows in a golang release?

2018-09-21 Thread lars
Hello, I'm interested in using the AF_UNIX sockets for Windows support that was recently merged into master (https://go-review.googlesource.com/c/go/+/125456), but it missed the go-1.11 release. Is there a way to tell what release will contain it, and if it's possible to know, roughly when

[go-nuts] Re: Why google doesnt make jdbc like library for go?

2018-09-21 Thread ascarrasca
He has a valid point. Most of the enterprise applications uses Oracle DB. I for one is looking for an oracle driver similar to what JDBC does (a simple to use, no separate installation needed). All of Go oracle drivers available uses Oracle Instant Client. I am currently in a hunt to migrate

[go-nuts] Improving Go's error handling syntax

2018-09-21 Thread Louki Sumirniy
I think that the issue with dealing with multiple conditions and certain pre-defined response patterns is at the centre of the error handling problems. My suggestion is here: https://github.com/golang/go/issues/27794 and centers around extensions of the return and switch syntax. The solution

[go-nuts] Re: Generic alternatives: new basic types?

2018-09-21 Thread Louki Sumirniy
This is something that I have seriously considered to be the right way for Go to express other generic types. I am in fact in the middle of a project at the moment where I have created a pair of generic byte buffer types, one is the regular kind, the other uses memguard locked buffers, for

Re: [go-nuts] Re: why does go reverse the order of name and type? "i int" vs "int i"

2018-09-21 Thread 'Thomas Bushnell, BSG' via golang-nuts
On Fri, Sep 21, 2018 at 11:07 AM Louki Sumirniy < louki.sumirniy.stal...@gmail.com> wrote: > in programming languages putting the type first basically only appears in > C and its (ill-born) children. > Like that's literally wrong. I prefer Go's order, which borrows from Pascal. But C's order is

Re: [go-nuts] Re: why does go reverse the order of name and type? "i int" vs "int i"

2018-09-21 Thread Louki Sumirniy
in programming languages putting the type first basically only appears in C and its (ill-born) children. But the reversal of word order like this is also present in norse and slavic languages with the definite article. It's actually the counter-intuitive pattern, and having learned to speak

Re: [go-nuts] Re: Using modules with go test ./...

2018-09-21 Thread Paul Jolly
John, Scott is on the money with this response: > I think you need to have a main module defined so there must be a go.mod in > cwd or upwards The way to ensure that you are in a valid module context is simply: go env GOMOD which will return the path to the current (or main) module context

[go-nuts] Announce: go-pry web - interactive Go REPL in Browser with WebAssembly

2018-09-21 Thread Tristan Rice
Hi everyone! I ported my Go REPL go-pry to WebAssembly and runs completely in the browser. It's designed to be a more interactive alternative to the Go Playground. You can check it out at: https://gopry.rice.sh/ The other neat thing about this is that it can be used