[go-nuts] Re: installing golang on MSWindows

2016-12-30 Thread mhhcbon
Are you looking for src directory ? tree -d -L 1 $GOROOT/src /home/mh-cbon/.gvm/gos/go1.7/src ├── archive ├── bufio ├── builtin ├── bytes ├── cmd ├── compress ├── container ├── context ├── crypto ├── database ├── debug ├── encoding ├── errors ├── expvar ├── flag ├── fmt ├── go ├── hash ├── html ├─

[go-nuts] installing golang on MSWindows

2016-12-30 Thread naha
I installed golang into c:\go using the msi installer. When I look in tc:\go\lib all I see is the "time" directory. Where's the rest of the standard go libraries? If I look at the zip archive I see nothing else und How do I get a complete installation? er lib as well. This seems wrong. --

[go-nuts] HTTP/2 Server Push - what is happening during 'Reading Push' ?

2016-12-30 Thread steve manuel
I know this is a Chrome thing, but my questions pertain more to what the server has actually sent prior to the "pushed" response seen in the screenshot below. [

[go-nuts] Re: monitoring io.Copy progress

2016-12-30 Thread contact . clouddie
Hi, I saw your very interesting answer. Does that mean that io.copy will Always call the underlying io.Read method ? Can you then update a counter rather than just print stuff in the Read function ? Thanks for your answer. -- You received this message because you are subscribed to the Google G

[go-nuts] Re: Why there is no container/set

2016-12-30 Thread buchanae . ohsu
Back to the original question, container/set seems like a great addition. It could have a nicer interface than map[T]U and a single best implementation. Can we talk about whether the owners of that package agree? On Saturday, December 3, 2011 at 1:32:02 AM UTC-8, James Chow wrote: > > I used "se

[go-nuts] Re: Do you guys use ORMs when working with SQL?

2016-12-30 Thread mhhcbon
did anyone effectively worked with https://github.com/relops/sqlc ? That s a great property to be able to compile time check the dal. Also i wonder how this, or that approach, could handle true modular integration with extensible schema and dependencies management. -- You received this messag

[go-nuts] Re: Do you guys use ORMs when working with SQL?

2016-12-30 Thread Henry
On Friday, December 30, 2016 at 7:43:13 PM UTC+7, parais...@gmail.com wrote: > > Go type system makes generalization impossible if you also need type > safety. Not only ORM are complicated but the fact that Go lacks generic > programming features makes a Go ORM API even more horrible to use, so

[go-nuts] Re: http: TLS handshake error from :: EOF

2016-12-30 Thread einthusan
We ran the SSL Labs test, shows that we do have TLS 1.0 … I don’t think anyone uses SSL3 anymore... Do they? On Thursday, December 29, 2016 at 1:06:51 PM UTC+5:30, Tamás Gulácsi wrote: > > Minimal TLS protocol version? Is SSL3, TLS1.0 allowed on server side? > AFAIK by default, no. > > 2016. dec

[go-nuts] Re: Another runtime.KeepAlive question

2016-12-30 Thread 'Keith Randall' via golang-nuts
On Friday, December 30, 2016 at 1:26:26 PM UTC-8, Justin Israel wrote: > > Hi, > > Regarding this thread: > https://forum.golangbridge.org/t/curious-about-runtime-keepalive-usage/3530 > > And also the original problem example from Russ: > https://github.com/golang/go/issues/15277#issuecomment-221

[go-nuts] Another runtime.KeepAlive question

2016-12-30 Thread Justin Israel
Hi, Regarding this thread: https://forum.golangbridge.org/t/curious-about-runtime-keepalive-usage/3530 And also the original problem example from Russ: https://github.com/golang/go/issues/15277#issuecomment-221768072 ... I just wanted to get clarification on this situation: func f(ptr *Object)

[go-nuts] I see the usage of interface{} everywhere why don't it get declare in standard library and given a common name?

2016-12-30 Thread Dave Cheney
interface{} doesn't have a name, it is an anonymous inline declaration of an interface type with no menthods. Most people think that it's cool that an interface with no methods can be satisfied by any value, but I think it's cool that each interface{} declaration declares a new type, which equiv

[go-nuts] Re: https://http2.golang.org/ shows http/2 disabled on chrome but it's not!

2016-12-30 Thread Mahdi Ziraki
something really strange happened, I tried my sample code with proxy and it responded with http/2 but when I used it without proxy it responded with http/1.1, how could this happen?! isn't it supposed to be the other way around?! On Friday, December 30, 2016 at 1:46:30 AM UTC+3:30, Dave Cheney

Re: [go-nuts] I see the usage of interface{} everywhere why don't it get declare in standard library and given a common name?

2016-12-30 Thread Jakob Borg
> On 30 Dec 2016, at 11:24, San wrote: > > Since the usage of the blank interface is so popular. It's not really *that* popular though, outside of some niche use cases, I think? In the main project I work on, the string "interface{}" occurs 138 times in 32879 lines of code - roughly four times

[go-nuts] Re: I see the usage of interface{} everywhere why don't it get declare in standard library and given a common name?

2016-12-30 Thread Sjon Kosse
I guess in this sense it could also make sense to give a name to the empty struct struct{}. Seems pretty superfluous but then again, there is byte for uint8 On Friday, December 30, 2016 at 6:38:02 PM UTC+1, San wrote: > > I have a question. > Since the usage of the blank interface is so popular.

Re: [go-nuts] I see the usage of interface{} everywhere why don't it get declare in standard library and given a common name?

2016-12-30 Thread Jesse McNelis
On Fri, Dec 30, 2016 at 9:24 PM, San wrote: > I have a question. > Since the usage of the blank interface is so popular. > Why does it not get declared in the standard library? > Giving it a name has been discussed many times. What would be a good name for it is still unclear. -- You received t

[go-nuts] I see the usage of interface{} everywhere why don't it get declare in standard library and given a common name?

2016-12-30 Thread San
I have a question. Since the usage of the blank interface is so popular. Why does it not get declared in the standard library? -- 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

Re: [go-nuts] Unexpected type switch case listing & equality behaviour for float64

2016-12-30 Thread Michael Jones
This is the Go designers trying to be helpful...the value of generic element is made as specific as possible in the guarded clause. Maybe this part of the spec should be clarified: "note...when multiple types...the least general applicable type." On Fri, Dec 30, 2016 at 9:09 AM, Uwe Dauernheim wr

Re: [go-nuts] Unexpected type switch case listing & equality behaviour for float64

2016-12-30 Thread Uwe Dauernheim
Apologies for not being more specific with a distilled exampled, the reason is that I don't understand if this is a bug or expected. Agreed I should have left the first lines out. I think Michael Jones summarised it quite well: > I think the problem is the unexpected type of g. In the "spread o

[go-nuts] Need advice how to structure directory paths and build env for go modules being called from c.

2016-12-30 Thread webuser1200
/src//folder1 /src//folder2 /src//folder3 ... Everything works fine with go build ./src//... I've recently added a module (/src//folder4) which calls go code from c and and this go folder is built with: go build --buildmode=c-archive -o libgolang.a I'm not sure what the best practices are her

Re: [go-nuts] Re: Unexpected type switch case listing & equality behaviour for float64

2016-12-30 Thread Michael Jones
I think the problem is the unexpected type of g. In the "spread out" switch clauses it is int/float/... but in the "all as one" case it is still a generic interface. On Fri, Dec 30, 2016 at 8:49 AM, Matt Harden wrote: > Values of different types cannot be compared in Go. *The int 0 cannot be > c

Re: [go-nuts] Unexpected type switch case listing & equality behaviour for float64

2016-12-30 Thread Jesse McNelis
On Sat, Dec 31, 2016 at 3:26 AM, Uwe Dauernheim wrote: > It seem a float64 of value 0.0 as types interface{} can't be compared equal > to 0 in an exhaustive case clause type list, but can be compared equal in > almost any other scenario. > > https://play.golang.org/p/t2u2GGp565 > > I find this une

Re: [go-nuts] Re: Unexpected type switch case listing & equality behaviour for float64

2016-12-30 Thread Matt Harden
Values of different types cannot be compared in Go. *The int 0 cannot be compared to the float64 0.0.* I think the first line in your example is probably confusing you because Go is coercing those untyped numbers to the same type (float64, I believe) at compile time, then comparing the same types a

Re: [go-nuts] Unexpected type switch case listing & equality behaviour for float64

2016-12-30 Thread Jan Mercl
Can you please reduce the example to a single failing case and state what's the expected outcome instead? I, for one, fail to spot where the perceived problem is (when reading it on the phone). On Fri, Dec 30, 2016, 17:26 Uwe Dauernheim wrote: > It seem a float64 of value 0.0 as types interface{

[go-nuts] Re: Unexpected type switch case listing & equality behaviour for float64

2016-12-30 Thread Uwe Dauernheim
A similarly unexpected behaviour occurs for int: https://play.golang.org/p/NP8_xHc1Rv On Friday, December 30, 2016 at 5:26:51 PM UTC+1, Uwe Dauernheim wrote: > > It seem a float64 of value 0.0 as types interface{} can't be compared > equal to 0 in an exhaustive case clause type list, but can be

[go-nuts] Unexpected type switch case listing & equality behaviour for float64

2016-12-30 Thread Uwe Dauernheim
It seem a float64 of value 0.0 as types interface{} can't be compared equal to 0 in an exhaustive case clause type list, but can be compared equal in almost any other scenario. https://play.golang.org/p/t2u2GGp565 I find this unexpected. Could someone explain how case clause type lists in type

RE: [go-nuts] Re: too many runtime.gcBgMarkStartWorkers ?

2016-12-30 Thread John Souvestre
Ø Any insight into why setting GOMAXPROCS > numCPU is a win might lead to improving the Go scheduler or perhaps Go / OS interaction. I’ve found it useful if you happen to have a number of compute-bound goroutines which don’t reschedule. Setting more processes than CPUs causes the kernel to

Re: [go-nuts] Do you guys use ORMs when working with SQL?

2016-12-30 Thread Andy Balholm
On Dec 30, 2016, at 4:43 AM, paraiso.m...@gmail.com wrote: > > Ultimately even if you stick to SQL you are just also writing your own ORM , > you just can't generalize code because of Go type system. There are really two separate (but related) issues in the ORM debate: the ORM design pattern, a

[go-nuts] Re: too many runtime.gcBgMarkStartWorkers ?

2016-12-30 Thread rlh
The default is GOMAXPROCS == numCPU and the runtime is optimized and tested for this. There are use cases involving co-tenancy where setting GOMAXPROCS < numCPU tells the OS to limit HW allocation and improves overall throughput when several programs are running concurrently. Setting GOMAXPROC

Re: [go-nuts] How has your company adopted Go ?

2016-12-30 Thread Jesper Louis Andersen
> > > Many businesses see switching to a new language or even using a new > language side by side with their existing language choice as a business > risk. > > > Jespers approach to using-a-new-language-for-your-project™, a slightly adopted version of Joe Armstrongs approach: Companies, once they

[go-nuts] Re: Do you guys use ORMs when working with SQL?

2016-12-30 Thread paraiso . marc
Go type system makes generalization impossible if you also need type safety. Not only ORM are complicated but the fact that Go lacks generic programming features makes a Go ORM API even more horrible to use, so I'm not surprised at all there is no appealing ORM for Go. People suggest code gener

Re: [go-nuts] Re: How to use ~/ in terminal with go program?

2016-12-30 Thread Aurélien Desbrières
> > There is no blah nor ~ in the original > code https://play.golang.org/p/CTbhTC50eE As is, it is able to interpret the ~ in direct execution but not on the request during execution. You have to execute that script on your machine not on the playground to see it works. -- You received t

[go-nuts] Do you guys use ORMs when working with SQL?

2016-12-30 Thread Henry
I use plain SQL. Since I deal with mostly financial data, I need to control how my data get changed. I don't want some ORMs doing some funky business which may inadvertently lead to data corruption. I usually write a mapper for every table in the database. If a table structure is changed, I just

Re: [go-nuts] Re: How to use ~/ in terminal with go program?

2016-12-30 Thread Konstantin Khomoutov
On Fri, 30 Dec 2016 06:12:46 + Aurélien DESBRIÈRES wrote: > > > The original code is https://play.golang.org/p/CTbhTC50eE > > > It is write to works as: > > > > > > go run gocat.go > > > > > > Here is how it works at this time. > > > > > > $ go run gocat.go > > > Which file would you like to