Re: [go-nuts] Re: how do I make my function always run at exit in `go test`?

2019-01-10 Thread 김용빈
Hi, Justin. Thank you for the response. But it didn't work for me. that means when I terminate it with Ctrl+C, it doesn't print CLEANUP. I am using linux (manjaro) terminal now. 2019년 1월 10일 목요일 오후 2시 41분 24초 UTC+9, Justin Israel 님의 말: > > Oh, I see. Well also adding a signal handler for SIGINT

Re: [go-nuts] how do I make my function always run at exit in `go test`?

2019-01-10 Thread 김용빈
Yes, I am using TestMain. But signal.Notify is not helping me. 2019년 1월 10일 목요일 오후 2시 28분 10초 UTC+9, Justin Israel 님의 말: > > > > On Thu, Jan 10, 2019 at 6:24 PM 김용빈 > > wrote: > >> I tried signal.Notify but it seems it doesn't work. >> >> Then I find this: >> https://github.com/golang/go/issues/

Re: [go-nuts] Re: how do I make my function always run at exit in `go test`?

2019-01-10 Thread Justin Israel
On Thu, Jan 10, 2019, 9:14 PM 김용빈 wrote: > Hi, Justin. Thank you for the response. > > But it didn't work for me. that means when I terminate it with Ctrl+C, it > doesn't print CLEANUP. > > I am using linux (manjaro) terminal now. > I am not sure why it wouldn't work. I confirmed it on an Ubuntu

[go-nuts] gccgo: go tool: no such tool "vet"

2019-01-10 Thread Jan Mercl
I've installed gccgo using the distro package manager. It seems to work just fine except that I cannot run any tests. jnml@e5-1650:~/src/modernc.org/crt> go-8 version go version go1.10.3 gccgo (SUSE Linux) 8.2.1 20180831 [gcc-8-branch revision 264010] linux/amd64 jnml@e5-1650:~/src/moder

[go-nuts] Re: gccgo: go tool: no such tool "vet"

2019-01-10 Thread Jan Mercl
On Thu, Jan 10, 2019 at 4:46 PM Jan Mercl <0xj...@gmail.com> wrote: Copy/paste error: s/go test/go-8 test/, the output is shown correctly in the OP. (Verified. Twice now.) -- -j -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe f

Re: [go-nuts] Re: gccgo: go tool: no such tool "vet"

2019-01-10 Thread 'Than McIntosh' via golang-nuts
Can you send a link to the specific RPM you installed? Perhaps it is putting the "vet" tool in the wrong location. Something to try: % go test ... % strace -f -o trace.txt go test Then examine the trace output to locate the error ("no such tool"), walk back to see where it is trying to locate it,

Re: [go-nuts] Re: Wuffs: a new, memory-safe programming language

2019-01-10 Thread Jesper Louis Andersen
On Wed, Jan 9, 2019 at 7:07 PM Eric S. Raymond wrote: > > I agree. The class of old C program I am interested in is, however, > not generally limited by CPU but by network and (less commonly) disk > stalls. Again bear in mind that my type examples are NTP and DNS service. > A lot of other legac

Re: [go-nuts] Re: gccgo: go tool: no such tool "vet"

2019-01-10 Thread Jan Mercl
On Thu, Jan 10, 2019 at 5:16 PM Than McIntosh wrote: Thanks for the help. Comments inline. > Can you send a link to the specific RPM you installed? Perhaps it is putting the "vet" tool in the wrong location. The package was installed using YAST (openSUSE GUI package manager). Package name is gc

Re: [go-nuts] Re: gccgo: go tool: no such tool "vet"

2019-01-10 Thread 'Than McIntosh' via golang-nuts
Thanks. I downloaded what looks like your package from http://download.opensuse.org/repositories/openSUSE:/Leap:/15.0:/Update/standard/x86_64/gcc8-go-8.2.1+r264010-lp150.2.3.x86_64.rpm This package doesn't actually contain the "vet" command: $ rpm -q -filesbypkg -p gcc8-go-8.2.1+r264010-lp150.2.

Re: [go-nuts] Re: gccgo: go tool: no such tool "vet"

2019-01-10 Thread Jan Mercl
On Thu, Jan 10, 2019 at 5:42 PM Than McIntosh wrote: > meaning that it's in a malformed state. Not sure how it is being constructed, but I think you might want to get in touch with the package maintainer to let them know there is an issue. Thank you. I'll try to raise an issue if I can find wher

Re: [go-nuts] Re: Wuffs: a new, memory-safe programming language

2019-01-10 Thread Jesper Louis Andersen
On Wed, Jan 9, 2019 at 7:55 PM 'Thomas Bushnell, BSG' via golang-nuts < golang-nuts@googlegroups.com> wrote: > > I'm curious about why transpilation would have significantly mitigated the > Heartbleed bug. > > Heartbleed is a bug which relies on two things: - Failure to do proper bounds checking

Re: [go-nuts] Re: Wuffs: a new, memory-safe programming language

2019-01-10 Thread robert engels
Again, what is wrong with the bounds checking/memory protection library/technique for C I referred you to? Even a decrease in performance will probably still be on par or better than the equivalent Go program. Much simpler and efficient. > On Jan 10, 2019, at 10:49 AM, Jesper Louis Andersen >

Re: [go-nuts] Re: Wuffs: a new, memory-safe programming language

2019-01-10 Thread 'Thomas Bushnell, BSG' via golang-nuts
On Thu, Jan 10, 2019 at 8:50 AM Jesper Louis Andersen < jesper.louis.ander...@gmail.com> wrote: > On Wed, Jan 9, 2019 at 7:55 PM 'Thomas Bushnell, BSG' via golang-nuts < > golang-nuts@googlegroups.com> wrote: > >> >> I'm curious about why transpilation would have significantly mitigated >> the Hea

Re: [go-nuts] Re: Wuffs: a new, memory-safe programming language

2019-01-10 Thread Jesper Louis Andersen
This must have been before I started reading this thread, but I know of the CCured project by George Necula et.al, which is a C-to-C translator: https://web.eecs.umich.edu/~weimerw/p/p477-necula.pdf On Thu, Jan 10, 2019 at 6:22 PM robert engels wrote: > Again, what is wrong with the bounds chec

Re: [go-nuts] Re: Wuffs: a new, memory-safe programming language

2019-01-10 Thread Jesper Louis Andersen
On Thu, Jan 10, 2019 at 6:26 PM Thomas Bushnell, BSG wrote: > I'm not sure the second one here is right. Heartbleed does not depend on > unitialized memory as far as I can tell. It works to copy whatever lies > after the incoming request buffer back to the attacker. It happens that in > the actua

Re: [go-nuts] Re: Wuffs: a new, memory-safe programming language

2019-01-10 Thread robert engels
It was actually a different but related thread about converting C to Go…. the link I sent was https://www.doc.ic.ac.uk/~phjk/BoundsChecking.html > On Jan 10, 2019, at 12:20 PM, Jesper Louis Andersen > wrote: > > This must have been before I

Re: [go-nuts] Re: Wuffs: a new, memory-safe programming language

2019-01-10 Thread 'Thomas Bushnell, BSG' via golang-nuts
> > > * Even if we did this, the bug only turns into a packet of death. A packet >> of death on this scale is of almost the same level of annoyance and chaos. >> (Witness this week's firestorm about an email packet of death on some Cisco >> something or other.) >> >> > I did address this. If each r

Re: [go-nuts] Re: Wuffs: a new, memory-safe programming language

2019-01-10 Thread Jesper Louis Andersen
On Thu, Jan 10, 2019 at 7:39 PM Thomas Bushnell, BSG wrote: > >> The server crashes - that's how we handle "any other exception", as a > rule. > > I write Erlang for a living. We don't crash a server, ever, on a failure. Unless the failure is persistent :) > > I don't know what you mean by "just

[go-nuts] Hiring full-time. Remote/Local/Re-Location

2019-01-10 Thread chrispikul510
Hi guys, We at Komolog are looking to hire new talent. We are located in Istanbul, if you aren't, that's fine. Remote positions, and re-location are available. Our primary usage with Go is our JSON API service, as well as gRPC servers, and other worker services. Will need to be able to work wi

[go-nuts] Building the gollvm on OSX

2019-01-10 Thread vladimir . strackovski
Hello, has anyone managed to setup the GOLVVM on OSX (Mojave)? I'm following the instructions here https://go.googlesource.com/gollvm, but am stuck at: cmake -DCMAKE_BUILD_TYPE=Debug -DLLVM_USE_LINKER=gold -G Ninja ../llvm The error I get is: Host compiler does not support '-fuse-ld=gold'

Re: [go-nuts] Re: Wuffs: a new, memory-safe programming language

2019-01-10 Thread 'Thomas Bushnell, BSG' via golang-nuts
On Thu, Jan 10, 2019 at 10:49 AM Jesper Louis Andersen < jesper.louis.ander...@gmail.com> wrote: > On Thu, Jan 10, 2019 at 7:39 PM Thomas Bushnell, BSG > wrote: > >> >>> The server crashes - that's how we handle "any other exception", as a >> rule. >> >> > I write Erlang for a living. We don't cr

Re: [go-nuts] Building the gollvm on OSX

2019-01-10 Thread 'Than McIntosh' via golang-nuts
Hello, Building the Gollvm compiler (llvm-goc) on OS-X is (probably) doable with some hacking, but the bigger problem is that that the version of libgo (Go runtime and standard packages) has not yet been ported to the Mac-- at the moment only linux is supported. So even if you could compile things

Re: [go-nuts] Re: Wuffs: a new, memory-safe programming language

2019-01-10 Thread Jesper Louis Andersen
On Thu, Jan 10, 2019 at 9:00 PM Thomas Bushnell, BSG wrote: > > I think the paper you linked is exciting, and actually suggests that the > hard work which needs to be done will solve the problem without a change of > language. This fits my intuition: the things necessary to take advantage of > ty

[go-nuts] Go 1.12 Beta 2 is released

2019-01-10 Thread Dmitri Shuralyov
Hello gophers, We have just released go1.12beta2, a beta version of Go 1.12. It is cut from the master branch at the revision tagged go1.12beta2. Please try your production load tests and unit tests with the new version. Your help testing these pre-release versions is invaluable. Report any prob

[go-nuts] How to append nil using reflect

2019-01-10 Thread xinhu . liu90
Hi everyone, I want to append a nil value using reflect.Append(), but I got a panic: reflect: call of reflect.Value.Set on zero Value. This is my code. s := make([]interface{}, 10) v := reflect.ValueOf(nil) reflect.Append(reflect.ValueOf(s), v) So is there a way i can append nil? Currently I d

[go-nuts] Algorithm question: reversing text/template.Template.Execute efficiently

2019-01-10 Thread twpayne
As part of chezmoi , I want to reverse text/template.Template.Execute, i.e. given some template output, and some data that was used to generate that output, I want to generate the best possible input template that given the data generates the same output. The

Re: [go-nuts] How to append nil using reflect

2019-01-10 Thread Ian Lance Taylor
On Thu, Jan 10, 2019 at 3:40 PM wrote: > > I want to append a nil value using reflect.Append(), but I got a panic: > reflect: call of reflect.Value.Set on zero Value. > > This is my code. > > s := make([]interface{}, 10) > v := reflect.ValueOf(nil) > reflect.Append(reflect.ValueOf(s), v) > > So i

[go-nuts] golang for coding interviews

2019-01-10 Thread Naveen Neelakanta
Hi All, I wanted to use Golang for coding interviews, however, I can't import basic data structures like stack, heap, the queue on to IDEs. Is there a way to achieve this. Thanks, Naveen -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubs

Re: [go-nuts] golang for coding interviews

2019-01-10 Thread Tyler Compton
Hi Naveen, Others may disagree but my take is that Go is not a great coding interview language. The lack of many built-in data structures is a big one, but those closing curly braces and other syntax can be a big pain when writing on a whiteboard. In cases where only general programming knowledge

Re: [go-nuts] golang for coding interviews

2019-01-10 Thread Naveen Neelakanta
Awesome, thanks for the info! On Thu, Jan 10, 2019 at 6:37 PM Tyler Compton wrote: > Hi Naveen, > > Others may disagree but my take is that Go is not a great coding interview > language. The lack of many built-in data structures is a big one, but those > closing curly braces and other syntax can

[go-nuts] A read-only value (not read-only type) proposal

2019-01-10 Thread T L
I made an immutable value proposal: https://github.com/golang/go/issues/29422 and I'm looking for feedback for it. For example, are there any design flaws and shortcomings in it? Any improvement ideas are also welcome. -- You received this message because you are subscribed to the Google Groups

Re: [go-nuts] Re: Wuffs: a new, memory-safe programming language

2019-01-10 Thread Nigel Tao
On Fri, Jan 11, 2019 at 4:22 AM robert engels wrote: > Again, what is wrong with the bounds checking/memory protection > library/technique for C I referred you to? Even a decrease in performance > will probably still be on par or better than the equivalent Go program. Quoting from https://www.d

[go-nuts] Re: What are the reasonable reasons to use pointers?

2019-01-10 Thread T L
Every language uses pointers, either explicitly or implicitly? I think the question can be revised to "Are explicit pointers necessary?" No, it is not. Explicit pointers have both some advantages and disadvantages than implicit ones. Explicit pointers give programmers more controls, make runtime m

[go-nuts] Re: Can I say a stack overflow is a panic?

2019-01-10 Thread T L
According to what I know, there are some cases which will cause fatal errors instead of panic: * start a new goroutine by call a nil function value * out of memory * unlock of unlocked mutex * data races in map element access * stack overflow On Friday, January 4, 2019 at 10:43:24 AM UTC-5, 伊藤和也