Re: [go-nuts] Is go test the wrong tool to use for a pure test harness?

2023-08-13 Thread dave bronte
> On Sun, Aug 13, 2023, 18:28 dave bronte wrote: > >> Forgive me for what might at first glance look like a provocative subject >> line - it's not meant to be. >> >> The team that I work in has been asked to develop a system that will test >> a web service.

[go-nuts] Is go test the wrong tool to use for a pure test harness?

2023-08-13 Thread dave bronte
Forgive me for what might at first glance look like a provocative subject line - it's not meant to be. The team that I work in has been asked to develop a system that will test a web service. We won't have access to the source for the web service so we're going to need to test it in its deploye

[go-nuts] how to get the json line number when getting unmarshal errors?

2023-02-06 Thread dave
I'm getting the error panic: json: cannot unmarshal string into Go value of type map[string]*json.RawMessage but it does not tell me which line or section of my json is causing the issue. How can I see this? -- You received this message because you are subscribed to the Google Groups "golan

[go-nuts] Go 1.18: reflect implicit type conversion

2022-04-15 Thread Dave Keck
Hi all, In this code, the SetMapIndex line panics in Go <1.18, but it no longer panics in Go 1.18: type CustomString string m := reflect.ValueOf(map[CustomString]int{}) m.SetMapIndex(reflect.ValueOf("key"), reflect.ValueOf(0)) The panic ("value of type string is not assignable to typ

[go-nuts] icmpengine - a small golang ping library

2021-08-02 Thread dave seddon
G'day, I hope this is an appropriate place to post about a new little library. Recently I was looking for a basic ping library but didn't have much luck, so I hope the community will find this helpful: https://github.com/EdgeCast/icmpengine Feedback welcome. Kind regards, D

[go-nuts] how to access cmsg, udp and IP headers from go?

2021-06-20 Thread Dave Taht
is there a sane library or go library extension for getting to the cmsg information on a udp socket from go? In our case (bufferbloat.net) we are trying to get the "irtt" tool capable of seeing the SO_TIMESTAMP_NS information from the linux kernel on receipt of it's udp packets from across the

Re: [go-nuts] Gopls enabled by default in VSCode

2021-02-01 Thread Dhruvil Dave
Here's the related issue that refers to enabling `gopls` be default: https://github.com/golang/vscode-go/issues/1037 On Tue, Feb 2, 2021, 06:24 Tyler Compton wrote: > I can't find the announcement off hand, but I remember gopls being > announced as stable at least a few months ago. Like Brian,

Re: [go-nuts] Re: Interface Fields

2021-01-12 Thread Dave Protasowski
t(x.ID) > Print(y.ID) > ``` > I hope it helps. > > Henry > On Wednesday, January 13, 2021 at 8:34:00 AM UTC+7 Dave Protasowski wrote: > >> I'm doing some due-diligence and wondering if there's any old topics >> about extending interfaces to support field set

[go-nuts] Interface Fields

2021-01-12 Thread Dave Protasowski
nd it seems specific to generics. thanks, dave -- 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. To view this

Re: [go-nuts] Good books to learn Golang deeply?

2020-12-14 Thread Dhruvil Dave
I really liked "The Go Programming Language" by Alan Donovan and Brian Kernighan. They go through it all with quite a detailed approach. On Mon, Dec 14, 2020, 23:15 Facundo Yuffrida wrote: > I'm looking for recommended books to learn Golang deeply and also some > writer to follow his books and h

[go-nuts] Re: Using modules with private repos

2020-04-01 Thread Dave Mazzoni
With all the examples out there and a little experimentation, I found the solution I needed. Here's the tree from the 'top' directory: ├── dfs │ ├── dfs.go │ ├── dfs_test.go │ └── go.mod ├── first.go ├── go.mod └── ModuleDFS Here are the file contents starting from the top of the directory s

[go-nuts] Re: Using modules with private repos

2020-04-01 Thread Dave Mazzoni
I have become totally confused about using local modules. Please help -- I'll try to keep this short: I have a package (dfs) and a main package. I tried laying things out an using _ for local packages from your excellent post on github, but I still cannot get things to build correctly. I got the

[go-nuts] Re: The "leave "if err != nil" alone?" anti-proposal

2019-07-02 Thread Dave Cohen
On Friday, June 28, 2019 at 5:44:01 PM UTC-7, Tyler Compton wrote: > > If anyone hasn't seen it, an issue with the "proposal" tag was created > earlier on the Go issue tracker titled "Proposal: leave "if err != nil" > alone?" (here ). This issue seems to > have

[solved] Re: [go-nuts] ed25519 signature, expected non-deterministic

2019-04-19 Thread Dave Cohen
On Friday, April 19, 2019 at 7:44:42 AM UTC-7, Marvin Renich wrote: > > * Dave Cohen > [190419 10:25]: > > I'm working on code that signs a message with an ed25519 key. > > > > I expected that when signing the same message over and over, I'd get

[go-nuts] ed25519 signature, expected non-deterministic

2019-04-19 Thread Dave Cohen
t/*.go { "Format": "ssh-ed25519", "Blob": "BRnwjfCMNZiqRRJdkZi7Gh0sOdJzOcPVIu/wWxlpRjogRnGJT3yn0wH3Fz6WvAmdYakNY7qkKfgSWe+t9PXiCQ==" } Am I misunderstanding how the ed25519 package signs? Do I have a bug in the test code? I'm very eager

[go-nuts] Re: [golang-dev] does net.Conn.SetDeadLine makes syscall ?

2019-04-06 Thread Dave Cheney
In this case it looks like to be correct you must set the deadline before reading from the network, and given reading from the network can block, the cost of setting the deadline is small. On Sat, 6 Apr 2019 at 21:47, Santhosh T wrote: > > Hi Dave, > > my mistake, bufr is backed

Re: [go-nuts] Re: Forking/transfering a repository and import paths

2018-12-12 Thread Dave MacFarlane
> code, which severs the ties for the originating project. >>> >>> Is it possible to have: >>> >>> both repos >>> every repo with it's own import path >>> code exchange between them >>> >>> What are the options? > > --

Re: [go-nuts] Re: go language sensitive editor?

2018-11-22 Thread Dave MacFarlane
s.google.com/d/optout. > > -- > 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. > Fo

Re: [go-nuts] Generics: an unwelcome conclusion and a proposal

2018-10-16 Thread Dave MacFarlane
ing *instead of* contracts that exist in the current proposal? (Even in that case, how would a programmer use them in a generic function without their meaning being well defined?) (Also, does this mean the compiler wouldn't be able to make any optimization assumptions regarding whether an operat

Re: [go-nuts] Generics: an unwelcome conclusion and a proposal

2018-10-16 Thread Dave MacFarlane
t; > Can it even possibly be simpler than this? What, if anything, am I missing? > > > > > > -- > 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 i

Re: [go-nuts] Is this implementation of weak pointers safe?

2018-09-30 Thread Dave Cheney
guaranteed to run as they are tied to the gc cycle. In a well tuned application a finaliser can easily be delayed until the resource they are meant to mediate has been exhausted by overconsumption. Dave -- You received this message because you are subscribed to the Google Groups "golang

[go-nuts] Re: Canonical module arrangement in a multi-language project.

2018-09-27 Thread Dave Cheney
packages inside your module, replace it with whatever makes sense for your company and project. >From then on, your Go code can be built by changing into that subdirectory and running go build. Dave On Friday, 28 September 2018 09:48:54 UTC+10, Ian Bruene wrote: > > > I am workin

[go-nuts] Re: idiomatic code to find, if executable exists in golang

2018-09-26 Thread Dave Cheney
My suggestion is, rather than seeing if an executable exists, then executing it. Just execute it and if there is an error just pass it back to the caller. The difference between I tried to run the program but it wasn’t found and I tried to run the program but it failed for some reason shouldn’t

[go-nuts] idiomatic code to find, if executable exists in golang

2018-09-26 Thread Dave Cheney
Are you able to modify the original question. Why do you need to know if a binary exists? Presumably so you can execute it. If so then you can modify the original request and make the problem more tractable. -- You received this message because you are subscribed to the Google Groups "golang-

Re: [go-nuts] The If Statement: Switches are better except for a single condition (change my mind)

2018-09-24 Thread Dave Cheney
On Tuesday, 25 September 2018 10:22:52 UTC+10, Louki Sumirniy wrote: > > Using named return values and this construction you can drop all those > returns in each case block to outside the block. You only need to spend an > extra line if you have to break out of it by return or break. > Go is n

[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, send

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

2018-09-20 Thread Dave Cheney
Sorry, I probably wasn’t clear or didn’t understand that you were asking. I saw that you said GOPATH is not set, it because your code is inside $HOME/go, because of the rules of the default gopath introduced in 1.8, gopath IS actually set. To be extra sure, when I’m playing with go modules I u

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

2018-09-20 Thread Dave Cheney
I think because GOPATH is not set it is defaulting to $HOME/go (see Go 1.9 release notes, from memory). Try moving your code to another folder. On Friday, 21 September 2018 05:21:32 UTC+10, John wrote: > > Just started playing with modules recently. Having an issue I don't > understand, wonder

[go-nuts] Re: Local variable escapes to heap

2018-09-19 Thread Dave Cheney
If you pass more -m's to the compiler it will explain why Daves-MacBook-Pro(~/src) % go build -gcflags=-m=2 buffer.go # command-line-arguments ./buffer.go:12:6: cannot inline main: function too complex: cost 108 exceeds budget 80 ./buffer.go:15:21: buffer escapes to heap ./buffer.go:15:21: f

Re: [go-nuts] Re: I am not in favor of generics.

2018-09-19 Thread Dave Cheney
the points of view expressed are unlikely to change. Thank you Dave -- 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...@google

Re: [go-nuts] Interaction of signals with defer

2018-09-18 Thread Dave Cheney
kage > from the stdlib which gave me what i wanted. >> On Tue, Sep 18, 2018 at 7:55 PM Dave Cheney wrote: >> >> pkg /profile will do the paperwork for you so ^C works when profiling. >> >> -- >> You received this message because you are subscribed to the Google

Re: [go-nuts] Interaction of signals with defer

2018-09-18 Thread Dave Cheney
pkg /profile will do the paperwork for you so ^C works when profiling. -- 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.

[go-nuts] Re: Tour Of go Page 8 in Basics does not work.

2018-09-18 Thread Dave Cheney
It looks like the playground has cached this error. Please raise an issue, https://golang.org/issue/new and someone with admin powers will delete the faulty entry. On Tuesday, 18 September 2018 17:03:00 UTC+10, Reinhard Luediger wrote: > > Hey List, > > is this the right place to get the tour of

[go-nuts] Re: Run time error

2018-09-18 Thread Dave Cheney
Assuming you are using the master branch of go-ifps-api, this request is failing because RequestBuilder.shell is nil. This could happen for a variety of reasons, perhaps the lack of error handling in NewLocalShell. I recommend you handle this with the ipfs developers on https://github.com/ipfs

Re: [go-nuts] Periodic task when time.Ticker and time.Sleep are pretty expensive

2018-09-17 Thread Dave Cheney
I've confirmed this uses 14% on a random OS X machine. Please raise a bug, https://golang.org/issue/new On Monday, 17 September 2018 14:29:44 UTC+10, Robert Engels wrote: > > For reference, similar code under Java consumes 2.5 % CPU. > > I tested the Go code under OSX, and it is roughly 10%, whic

[go-nuts] Re: Ambiguity in generic interfaces

2018-09-13 Thread Dave Cheney
I think D solved this quite well https://dlang.org/spec/template.html In your example this might become type Foo(type T) interface {} type Bar(type T) interface { Foo!(T) } The exclamation point makes it clear this is the application of a T to the existing interface type Foo(type T). On Fr

[go-nuts] Re: go 1.11 and XP

2018-09-10 Thread Dave Cheney
Go 1.11 doesn't support XP. We don't test on XP and won't fix bugs reported against XP systems any more. If it's working for you, great!, but if it breaks, you get to keep both pieces. Dave On Tuesday, 11 September 2018 05:05:23 UTC+10, wilk wrote: > > Hi, > >

[go-nuts] Re: Opening brace can't be placed on a separate line killing the language for me

2018-09-08 Thread Dave Cheney
urage you to persist with Go beyond the minor syntactic issues. Dave On Saturday, 8 September 2018 18:09:31 UTC+10, Mohamed yousry wrote: > > I don't know about you guys but for me format and readability is > everything so when I first heard about the language that Care about

[go-nuts] Re: Performance regression of HTTP requests since Go 1.11

2018-09-05 Thread Dave Cheney
This looks like an issue related to dns resolution in your environment with go 1.11. I suggest building a reproducer using the net,Lookup* functions as the net/http package is not the problem. Once you have a reproduction case, please log an issue golang.org/issue/new Thanks. -- You recei

[go-nuts] Performance regression of HTTP requests since Go 1.11

2018-09-05 Thread Dave Cheney
Can you post the output from httpstat? -- 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://g

[go-nuts] Re: Working or Not

2018-09-02 Thread Dave Cheney
. Thanks Dave On Monday, 3 September 2018 13:42:12 UTC+10, John wrote: > > I am currently making a program with variables, but when I tried to run it > says that the variables are not defined. So below are may code for using > the variable: > > func showBoard() { >

Re: [go-nuts] Does runtime.RaceDisable not work in non-std library ?

2018-08-23 Thread Dave Cheney
appen if you have a type declared on sync.Pool, not *sync.Pool, or it could happen if you do something like this var x sync.Pool y := x Thanks Dave On Friday, 24 August 2018 13:46:10 UTC+10, nea...@gmail.com wrote: > > Hi lan, > > The sync.Pool has memory accesses in per-p private st

Re: [go-nuts] [Bug?] Error when running "go tool cover" on package name contains dot

2018-08-20 Thread Dave Cheney
Thanks for confirming this is a regression. On 20 August 2018 at 18:41, Shulhan wrote: > On Sun, 19 Aug 2018 16:13:00 -0700 (PDT) > Dave Cheney wrote: > >> Point of clarification, the package name doesn’t contain a dot, that >> is not permitted by the syntax of the package

[go-nuts] [Bug?] Error when running "go tool cover" on package name contains dot

2018-08-19 Thread Dave Cheney
issue. Thanks Dave -- 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.go

Re: [go-nuts] Re: Extending deadline for logging

2018-08-16 Thread Dave Cheney
n, what happens to the error, is it dropped? On Thursday, 16 August 2018 14:44:08 UTC+10, Dave Cheney wrote: > > What would happen if you write the error to spanner with a setting > context.Backgrond(), ie, no deadline? > > On 16 August 2018 at 13:57, Robert Bartoszynski wro

Re: [go-nuts] Re: Extending deadline for logging

2018-08-15 Thread Dave Cheney
hat to OtherService, with > the expectation that there should be x seconds left over for the write to > spanner. > > On Wed, Aug 15, 2018 at 8:10 PM Dave Cheney wrote: >> >> >> >> On Thursday, 16 August 2018 12:15:57 UTC+10, r...@google.com wrote: >>> &

[go-nuts] Re: Extending deadline for logging

2018-08-15 Thread Dave Cheney
On Thursday, 16 August 2018 12:15:57 UTC+10, r...@google.com wrote: > > As an example: > Client calls MyService with a deadline of 10 seconds. > MyService calls OtherService as part of responding. However, the call to > OtherService times out due to the deadline in 10 seconds. > MyService tries

[go-nuts] Re: Cross-compiled program for Raspberry Pi crashes

2018-08-13 Thread Dave Cheney
I don’t think that will help. The problem is not cross compilation. The problem is when run in a 32bit environment the offset of that field is not guaranteed to be aligned to 8 bytes. You’ve got a 50/50 chance that each allocation will be properly aligned. -- You received this message because

[go-nuts] Re: Cross-compiled program for Raspberry Pi crashes

2018-08-13 Thread Dave Cheney
No, it’s not a cross compilation issue. Well, yes and no, the rpi is a 32 bit platform so some structures have a different size causing the offset of the field to be 32 but aligned, not the required 64 bit aligned. The play example shows the address of the field is not aligned on a 8 byte boun

[go-nuts] Re: Cross-compiled program for Raspberry Pi crashes

2018-08-12 Thread Dave Cheney
This is likely to be issue https://github.com/golang/go/issues/599, https://play.golang.org/p/zZm-6zWwFoi On Monday, 13 August 2018 01:29:43 UTC+10, Stephan Mühlstrasser wrote: > > Hi, > > I'm developing my first Go program that is supposed to upload files into a > Google Cloud Storage bucket f

Re: [go-nuts] How to signal(sigint) blocking goroutine

2018-08-10 Thread Dave Cheney
The context value you pass into record isn't used and running record in its own goroutine doesn't really add anything because the main goroutine just waits for the other goroutine to exit. The exit the second goroutine will be at least 1 second, but could be much longer. On Saturday, 11 August

[go-nuts] go go1.10.3 fatal error: runtime: netpoll failed

2018-08-07 Thread Dave Cheney
As Ian explained on the GitHub issue you raised, RHEL5 is not supported by any version of Go - the 2.6.18 kernel is below our minimum requirements. Dave -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this grou

[go-nuts] buffer.WriteString Error case

2018-08-07 Thread Dave Cheney
So that it can be used interchangeably with *bufio.Writer. -- 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 opt

[go-nuts] Re: How should I avoid - literal copies lock value from

2018-08-07 Thread Dave Cheney
Pass a pointer, *Set into your Diff method. -- 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 htt

Re: [go-nuts] Performance hit when using goroutine

2018-05-22 Thread Dave Cheney
The execution tracer will show this as it tracks resources that goroutines block on. Seriously I’m just going to keep suggesting the execution tracer until you try it :) -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this

[go-nuts] Performance hit when using goroutine

2018-05-22 Thread Dave Cheney
The best tool to investigate this problem is the execution tracer. It will show you the activity of goroutines over time making is easy to spot contention. -- 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: How can I get the last followed URL use http.Client on 302 Redirections?

2018-05-21 Thread Dave Cheney
Please keep in mind that the Via header is supplied by he client (the browser) and there is not requirement that it maintains the full chain of custardy of all the urls it has passed though, nor is there any way for Go to know nor enforce that this list remains accurate. Sorry. -- You receive

Re: [go-nuts] Re: Go license and fitness for purpose

2018-05-17 Thread Dave Cheney
the scope of this mailing list. Please feel free to continue this discussion in other forums. Thanks Dave On Friday, 18 May 2018 05:39:59 UTC+10, matthe...@gmail.com wrote: > > Thanks for responding Michael. > > "decorative item not to be used off-road, in uneven terrain, or r

Re: [go-nuts] Re: go 1 on Ubuntu 18.04

2018-05-08 Thread Dave Cheney
Please allow me to clarify, anyone other than Jan never needs to set GOROOT. -- 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

Re: [go-nuts] Re: go 1 on Ubuntu 18.04

2018-05-07 Thread Dave Cheney
Top tip: you never need to set GOROOT. Please don’t set GOROOT, it’ll just cause confusing errors for you in the future. -- 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 e

[go-nuts] The jsgo playground: Edit and run Go in the browser, supporting arbitrary import paths.

2018-05-04 Thread dave
etc.). The unique feature of the jsgo playground is that it supports arbitrary import paths. Other Go playgrounds are limited to just the Go standard library. For more for more info: - compiler: https://github.com/dave/jsgo - playground: https://github.com/dave/play Take a look at

[go-nuts] Re: Windows OneDrive issue ..

2018-05-04 Thread Dave Cheney
This is issue https://github.com/golang/go/issues/22579 On Tuesday, 1 May 2018 20:38:26 UTC+2, xiof...@gmail.com wrote: > > I just discovered a problem running/compiling files that are > accessed/backed up by windows OneDrive > > (don't know when this started - worked a couple of months ago..) >

[go-nuts] Re: Goroutines memory leak

2018-04-30 Thread Dave Cheney
The leak is here httpClient := &http.Client{Timeout: timeout, Transport: &http.Transport{Dial : dialer.Dial}} If the httpClient value goes out of scope the connections attached to that will leak, along with their associated goroutines. On Monday, 30 April 2018 07:56:43 UTC+2, Tamás Gulácsi wrot

Re: [go-nuts] How does time reported by go test relate to the wall clock time?

2018-04-27 Thread Dave Cheney
Try upgrading to go 1.10. You’ll get build and test caching for free and you’ll see a small variance between the timings you reported. -- 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

Re: [go-nuts] Go list returning directory starting with underscore on Ubuntu

2018-04-24 Thread Dave Cheney
If the path start with _ then it is not within the list of directories in your GOPATH. -- 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...@g

[go-nuts] how do i upgrade to latest version of go?

2018-04-24 Thread Dave Cheney
It depends on how you installed ypthe previous version of go. Home brew is popular on the Mac so follow their instructions for upgrading a package installed via brew. If you used one of the options from the golang org website, simply remove /usr/local/go and follow the instruction on the websi

[go-nuts] schollz/peerdiscovery - Pure-Go library for cross-platform local peer discovery using UDP broadcast

2018-04-24 Thread Dave Cheney
Looking at the code for Discover it is possible you are discarding several errors whose contents may explain the issue you see on windows. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails

[go-nuts] Fancy Comments & Documentation

2018-04-19 Thread Dave Cheney
Try putting a blank line between your comment block and the next symbol. This will break the association between the comment block and the symbol and hide the former. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this gro

[go-nuts] Why isn't os.File an interface?

2018-04-09 Thread Dave Cheney
Please have a read of my talk on solid from 2016. https://dave.cheney.net/2016/08/20/solid-go-design Tldr: define an interface with the behaviour of the os.File that your function/method expects. -- You received this message because you are subscribed to the Google Groups "golang-nuts" grou

[go-nuts] Re: Language is a platform, which golang still does not pay attention to !!!

2018-04-05 Thread Dave Cheney
Indeed. Please do not conflate popularity with ubiquity. Formula one is a very popular sport, but not everyone needs to do 180mph down the straight away for their daily commute. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe fr

[go-nuts] Re: blocking profiler

2018-04-04 Thread Dave Cheney
et support for their product. On Wednesday, 4 April 2018 21:52:08 UTC+10, sothy shan wrote: > > > > On Tuesday, April 3, 2018 at 4:50:36 PM UTC+2, Dave Cheney wrote: >> >> I’ve not seen that problem before. I’d hazard a guess that it’s an >> incorrect go installation. Don

[go-nuts] Re: Scheduler discrepancy between Linux and OS X with Gosched()

2018-04-03 Thread Dave Cheney
04:12:40 UTC+10, brianbl...@gmail.com wrote: > > Hi Dave, thanks for the reply! > > It makes sense that the send c <- 0 is not guaranteed to transfer control > to the receiving goroutine. But is it not guaranteed that runtime.Gosched() > will at least check if another goroutin

[go-nuts] Re: blocking profiler

2018-04-03 Thread Dave Cheney
I’ve not seen that problem before. I’d hazard a guess that it’s an incorrect go installation. Don’t set goroot, basically ever. But it’s just a guess. Are you able to create a stand alone program that demonstrates the issue with the profile? Please consider raising a bug, golang.org/issue/new

[go-nuts] Re: Scheduler discrepancy between Linux and OS X with Gosched()

2018-04-02 Thread Dave Cheney
A printf, especially the first one in the program is likely to cause the goroutine going off to the write(2) syscall to block long enough that a new thread is created to replace it. Once the original thread comes back from the syscall it will find that it has nothing to do, as you set runtime G

[go-nuts] blocking profiler

2018-03-30 Thread Dave Cheney
It looks like you’re stopping the block profile immediately after starting it. Try github.com/pkg/profile which will take care of the plumbing for you. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop rece

[go-nuts] Re: Windows cgo complier

2018-03-29 Thread Dave Cheney
This windows build dependencies are captured here, https://github.com/golang/go/wiki/WindowsBuild On Thursday, 29 March 2018 00:17:32 UTC+11, Luke Mauldin wrote: > > Can someone please tell me what the golang team uses as the reference > windows x64 compiler? I have heard references to mingw64 b

Re: [go-nuts] Pass by value in struct not yielding expected result

2018-03-06 Thread Dave Cheney
On Wednesday, 7 March 2018 07:39:56 UTC+11, andrey mirtchovski wrote: > > maybe this will give you a hint: https://play.golang.org/p/ANIjc3tCdwp > > maps are reference types, but they still get passed by value. > Maps are pointers, pointers are values. -- You received this message because yo

[go-nuts] $PATH error.

2018-03-04 Thread Dave Cheney
Under the hood go get shells out to git to fetch source code. You need to install git. -- 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...@g

[go-nuts] Re: constructors vs lazy initialization

2018-03-03 Thread Dave Cheney
I prefer the later when possible because it enables callers to use the zero value of a type without explicit initialisation. On Sunday, 4 March 2018 11:37:43 UTC+11, Anmol Sethi wrote: > > How do you guys choose between constructors and lazy initialization? > > For example. > > Struct constructor

Re: [go-nuts] How to interpret runtime._ExternalCode in a profile?

2018-02-26 Thread Dave Cheney
Ahh, thank you. That was the missing piece of my understanding. -- 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 mor

Re: [go-nuts] How to interpret runtime._ExternalCode in a profile?

2018-02-25 Thread Dave Cheney
I don't understand how that could happen. time.Now calls time.now (which is in assembly) so the former shouldn't be inlined, or omitted from profiling. On Monday, 26 February 2018 14:02:13 UTC+11, Caleb Spare wrote: > > On a hunch, I profiled a benchmark which just calls time.Now in a loop. > In

[go-nuts] Is this a bug?

2018-02-25 Thread Dave Cheney
Type C conforms to the T1 interface? What did you expect? -- 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 opti

[go-nuts] Re: Build started to fail with 1.10

2018-02-23 Thread Dave Cheney
The failing line was added in december last year, https://github.com/golang/go/commit/7cba779cea5#diff-56c7df71bce32f8e50115128ae30941eR13 This also adds a dependency on time.h. Is time.h available in your build container? On Friday, 23 February 2018 20:09:02 UTC+11, Владислав Митов wrote: > >

Re: [go-nuts] Go += Package Versioning

2018-02-20 Thread Dave MacFarlane
(because you're explicitly outside of GOPATH..) - Dave On Tue, Feb 20, 2018 at 12:20 PM, Russ Cox wrote: > Hi everyone, > > I have a new blog post you might be interested in. > https://research.swtch.com/vgo. > > I'll try to watch this thread to answer any questions

[go-nuts] Re: Dero: CryptoNote protocol + smart contracts using golang

2018-02-18 Thread Dave Cheney
Is there a reason DERO chose to go with their own licence rather than a BSD, MIT, or Apache 2 licence? On Monday, 19 February 2018 16:10:14 UTC+11, 867crypt...@gmail.com wrote: > > Hello, my name is Serena, I’m the Community Manager at a blockchain > project called Dero. We use a protocol calle

Re: [go-nuts] About Go Compiler!

2018-02-18 Thread Dave Cheney
I recommend watching this presentation from Russ Cox about why the Go team decided to rewrite the compiler from C to Go. https://www.youtube.com/watch?v=QIE5nV5fDwA On Monday, 19 February 2018 11:44:23 UTC+11, Compiler wrote: > > Performance of C with Optimize not better of Go at more time?! >

Re: [go-nuts] About Go Compiler!

2018-02-18 Thread Dave Cheney
er : self compiler > > On Monday, February 19, 2018 at 3:22:27 AM UTC+3:30, Dave Cheney wrote: >> >> Stop. >> >> What do you want to do? >> >> Do you want to write a C compiler ? >> >> On Monday, 19 February 2018 10:47:24 UTC+11, Compiler wrote: >

Re: [go-nuts] About Go Compiler!

2018-02-18 Thread Dave Cheney
Stop. What do you want to do? Do you want to write a C compiler ? On Monday, 19 February 2018 10:47:24 UTC+11, Compiler wrote: > > https://groups.google.com/forum/#!topic/golang-nuts/24pSm-B3FqU > > On Monday, February 19, 2018 at 3:14:48 AM UTC+3:30, Dave Cheney wrote: >>

Re: [go-nuts] About Go Compiler!

2018-02-18 Thread Dave Cheney
background to the _problem_ you want to solve rather than asking random questions without context. > And they said they were not with the assembly and is generate executable > file using object file. > Who is they? Can you give some more context. > > On Monday, February 19,

Re: [go-nuts] About Go Compiler!

2018-02-18 Thread Dave Cheney
In theory, yes. In practice, I doubt it. On Monday, 19 February 2018 10:37:14 UTC+11, Compiler wrote: > > Can build only c(own) compiler using a c compiler(like gcc) without go > from this source?! > > > On Monday, February 19, 2018 at 2:48:26 AM UTC+3:30, Dave Cheney wrote:

Re: [go-nuts] About Go Compiler!

2018-02-18 Thread Dave Cheney
;> >> On Monday, February 19, 2018 at 2:49:40 AM UTC+3:30, Dave Cheney wrote: >>> >>> > which files require go-c compiler? >>> >>> The ones in the go 1.4distributuon that end in .c. >>> >> -- You received this message because you ar

Re: [go-nuts] About Go Compiler!

2018-02-18 Thread Dave Cheney
n /src/ compile using own c-compiler?! > > On Monday, February 19, 2018 at 2:49:40 AM UTC+3:30, Dave Cheney wrote: >> >> > which files require go-c compiler? >> >> The ones in the go 1.4distributuon that end in .c. >> > -- You received this message

Re: [go-nuts] About Go Compiler!

2018-02-18 Thread Dave Cheney
> which files require go-c compiler? The ones in the go 1.4distributuon that end in .c. -- 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...@

Re: [go-nuts] About Go Compiler!

2018-02-18 Thread Dave Cheney
> what files require the c compiler? The c files in the go 1.4 distribution. -- 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...@googlegroup

Re: [go-nuts] About Go Compiler!

2018-02-18 Thread Dave Cheney
I feel like we’ve had this same discussion a few months ago. Ian has mentioned that go 1.4 is no longer in use (it exists only in a very special case or bootstrapping from source). Can you please give some context to your questions so we may assist you better. -- You received this message beca

Re: [go-nuts] About Go Compiler!

2018-02-18 Thread Dave Cheney
In Go 1.4 the project contained both .go files and .c files. It shipped with two compilers, a go compiler, called gc, and a c compiler called cc. > /go/src/cmd/gc/go.y This is the input file for the yacc grammar for the Go 1.4 go compiler > /go/src/cmd/cc/cc.y This is the input file for the y

[go-nuts] Re: All Forms of Wishful Generics

2018-02-16 Thread Dave Cheney
I certainly don’t want what happened to C++ to happen to Go. If it’s a choice between obsolescence or being crushed under the weight of self inflicted complexity, I’ll gladly vote with my feet for the former. -- You received this message because you are subscribed to the Google Groups "golang

[go-nuts] Go on MIPS32

2018-02-15 Thread Dave Cheney
cgo is not go. -- 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/opto

[go-nuts] Re: is there an atexit?

2018-02-09 Thread Dave Cheney
Your program has a data race in the exitcode variable. -- 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

[go-nuts] Re: Why is there no standard `uuid` package?

2018-02-08 Thread Dave Cheney
Your argument that the stdlib grows a uuid package is really a call for stability. “3rd parties cannot provide us the stability we need, so the go team must”. I don’t think that is a fair expectation on the go team, especially as there is no clear standard for what a uuid is (having multiple inp

  1   2   3   4   5   6   7   8   9   >