Re: [go-nuts] Does go dep support post install script like in php composer?

2018-08-27 Thread Miguel Angel Rivera Notararigo
Do you use a Makefile? .PHONY: deps deps: dep ensure path/to/the/script.sh -- 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

[go-nuts] Re: What is the proper way to delete a key which holding a pointer in a map

2018-08-27 Thread keith . randall
FYI shrinking maps on delete is issue 20135 . On Monday, August 27, 2018 at 12:13:00 PM UTC-7, Kasun Vithanage wrote: > > thanks this answer will work > > On Monday, August 27, 2018 at 9:56:16 PM UTC+5:30, Jake Montgomery wrote: >> >> Just to be clear,

Re: [go-nuts] `exec: "gcc": executable file not found in $PATH` when compiling as a module

2018-08-27 Thread Kevin Bowrin
>From Russ Cox on Twitter: Because the pre-built packages are non-module builds and can’t be reused. Sorry. Disable cgo for now or install gcc. https://twitter.com/_rsc/status/1034143103509311493?s=19 On Mon., Aug. 27, 2018, 5:14 p.m. , wrote: >

[go-nuts] Re: `exec: "gcc": executable file not found in $PATH` when compiling as a module

2018-08-27 Thread thepudds1460
Hi all, In a separate (short) forum, Russ wrote: "Because the pre-built packages are non-module builds and can’t be reused. Sorry. Disable cgo for now or install gcc." I suspect these are related as well: #26993 -- "cmd/go: prebuilt net/http not used"

[go-nuts] `exec: "gcc": executable file not found in $PATH` when compiling as a module

2018-08-27 Thread kjbowrin
https://gist.github.com/kevinbowrin/5f93152fdac23529e06a3a38cde88ce8 Compiling this little program: package main import ( "fmt" "net/http" ) func main() { x, _ := http.NewRequest("GET", "https://google.com;, nil) fmt.Println(x) } in the GOPATH works fine.

[go-nuts] Re: GoAWK: an AWK interpreter written in Go

2018-08-27 Thread Scott Pakin
On Friday, August 24, 2018 at 3:13:25 PM UTC-6, Ben Hoyt wrote: > > I recently wrote an AWK interpreter in Go: > https://github.com/benhoyt/goawk > > It's a pretty simple implementation: hand-rolled lexer, recursive-descent > parser, and tree-walk interpreter. It's pretty complete according to

[go-nuts] Re: What is the proper way to delete a key which holding a pointer in a map

2018-08-27 Thread Kasun Vithanage
thanks this answer will work On Monday, August 27, 2018 at 9:56:16 PM UTC+5:30, Jake Montgomery wrote: > > Just to be clear, the memory used by the values *are *freed. In your > example, those are the Person structs. It is only the internal memory used > by the map that is not freed. See

[go-nuts] Re: What is the proper way to delete a key which holding a pointer in a map

2018-08-27 Thread jake6502
Just to be clear, the memory used by the values *are *freed. In your example, those are the Person structs. It is only the internal memory used by the map that is not freed. See https://play.golang.org/p/fWOIbvjFjyB. In that test, the "internal" memory that is not freed is about 14 bytes per

[go-nuts] Does go dep support post install script like in php composer?

2018-08-27 Thread 'Tony Bamboni' via golang-nuts
Hi, I read the dep documentation but was not aware of any hint in it if go dep can handle post install script like in PHP composer. How nice would be a solution to start a bash script automatically right after dep install is executed. -- You received this message because you are subscribed

Re: [go-nuts] What is the proper way to delete a key which holding a pointer in a map

2018-08-27 Thread ojucie
Replace your 1 billion entry map with a large number of small maps. When you need to remove an entry you just substitute a small map. -- 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

[go-nuts] sync.(*Map).Load: relocation target sync/atomic.(*Value).Load not defined when building for ios_arm

2018-08-27 Thread Steeve Morin
Hey folks, I'm trying to build a project with Bazel on with buildmode=c-archive, and I'm running into the following issue on ios_arm and Go 1.11 only: sync.(*Map).Load: relocation target sync/atomic.(*Value).Load not defined sync.(*Map).Store: relocation target sync/atomic.(*Value).Load not

[go-nuts] How to post Form data using Go WASM?

2018-08-27 Thread Tad Vizbaras
I am struggling to get this working. How to post Form data to the web server using Go WASM? Do I use fetch API or XMLHttpRequest? -- 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,

Re: [go-nuts] internal compilation error while compiling gccgo from source solaris 10

2018-08-27 Thread Amandeep Gautam
Hi Ian, Thank you so much for the help. Both of those options did not work. Somehow, the program was able to get buggy libmpfr. I think it might be because I am using /usr/ccs/bin/ld and that ld is giving preference to libraries in /usr/lib. In my case, /usr/lib/libmpc.so.3 pointed to

[go-nuts] How to make UDP server performance better?

2018-08-27 Thread Zhuo Meng
Hi, Gophers I'm doing benmarking for my GoNTPd . I found that my implement is only can handle about 100Kpps (kilo packets per second) per goroutine while ntpd can handle about 170 Kpps. on Intel Xeon E312 The pprof

Re: [go-nuts] What is the proper way to delete a key which holding a pointer in a map

2018-08-27 Thread Kasun Vithanage
Yeah saw that, but what about a map with around 10 entries. this will add a lot of overhead i guess. On Monday, August 27, 2018 at 3:13:39 PM UTC+5:30, Jan Mercl wrote: > > On Mon, Aug 27, 2018 at 11:38 AM Kasun Vithanage > wrote: > > > I simply want to delete the memory allocated by

Re: [go-nuts] What is the proper way to delete a key which holding a pointer in a map

2018-08-27 Thread Jan Mercl
On Mon, Aug 27, 2018 at 11:38 AM Kasun Vithanage wrote: > I simply want to delete the memory allocated by Value too. When i checked memory with MemStats, its still same as when i added entries to map See https://github.com/golang/go/issues/20135#issuecomment-297490415 "The only available

Re: [go-nuts] What is the proper way to delete a key which holding a pointer in a map

2018-08-27 Thread Kasun Vithanage
I simply want to delete the memory allocated by Value too. When i checked memory with MemStats, its still same as when i added entries to map On Monday, August 27, 2018 at 3:02:53 PM UTC+5:30, Hau Ma wrote: > > I think there is a major different: the memory allocated for key "index" > in

Re: [go-nuts] What is the proper way to delete a key which holding a pointer in a map

2018-08-27 Thread Hau Ma
I think there is a major different: the memory allocated for key "index" in hashmap, if you assign m[index] to nil, the allocated memory for hashed key "index" still exist, when delete the allocated memory will be deleted as well. Both will have same affect on the pointer to struct, it will be

[go-nuts] Re: os.WriteFile not writing files in long running process

2018-08-27 Thread Manlio Perillo
No, the file is not flushed on close. https://linux.die.net/man/2/close "A successful close does not guarantee that the data has been successfully saved to disk, as the kernel defers writes. It is not common for a file system to flush the buffers when the stream is closed. If you need to be

[go-nuts] What is the proper way to delete a key which holding a pointer in a map

2018-08-27 Thread Kasun Vithanage
I've a map which has set of keys and pointing to some structs like this. In here i allocate lot of entries and trying to delete them. But the memory usage is not shrinking. According to this issue it seems how go behave at this point. In there its

[go-nuts] Re: os.WriteFile not writing files in long running process

2018-08-27 Thread Paweł Szczur
No. On Friday, August 24, 2018 at 6:47:01 PM UTC+2, dja...@gmail.com wrote: > > Hi, > did you write files in /tmp on linux ? > (and there is daemon that clean old files in /tmp ?) > > Regards, > Djadala > > > -- You received this message because you are subscribed to the Google Groups