[go-nuts] Re: Error Handling

2016-11-26 Thread Christophe Meessen
Just for clarification, the function fn() must return an interface for this to work. -- 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] [urgent] need aguments to justify use of Go for a scientific application

2017-12-06 Thread Christophe Meessen
Hello, I'm a computer scientist in charge of developing an image processing pipeline for telescope images. It will also have a web server and DB connection. The project is going through reviews by external experts, and the problem I'm facing is that my proposal to use Go is about to be

Re: [go-nuts] Re: [urgent] need aguments to justify use of Go for a scientific application

2017-12-06 Thread Christophe Meessen
t" approach. ons 6 dec. 2017 kl 11:43 skrev Volker Dobler <dr.volker.dob...@gmail.com <mailto:dr.volker.dob...@gmail.com>>: I know about https://go-hep.org probably Sebastien can elaborate more if and how it is used at CERN. V. On Wednesday, 6 December 2017 10:56:

Re: [go-nuts] Re: [urgent] need aguments to justify use of Go for a scientific application

2017-12-06 Thread Christophe Meessen
(Other systems doing it right: Haskell, Erlang, OCaml, Elixir, ...) On Wed, Dec 6, 2017 at 2:34 PM Christophe Meessen <christophe.mees...@gmail.com <mailto:christophe.mees...@gmail.com>> wrote: Thanks far all the answers. Sebastien Binet is a colleague and he is indee

[go-nuts] Re: Custom types for use with range (Go 2)

2018-08-07 Thread Christophe Meessen
If considering user defined Ranger interface, I would strongly suggest to look at D's equivalent. The interface is simple and there are many use of it. It is trivial to develop a reverse range or ranges that traverse data structures (e.g. binary trees) in different ways (once you have

[go-nuts] Safeness of using reflect.Type as a map key instead of reflect.Type.Name() ?

2018-08-18 Thread Christophe Meessen
I need to index data by type and I have two options: - use a string as key and index the string returned by reflect.Type.Name() - use reflect.Type as key I have the impression that indexing by reflect.Type would be slightly more speed and space efficient, but I'm unsure if the relation between

[go-nuts] Can't print GO2 draft documents with firefox 61.0.1 (64 bits) Ubuntu

2018-09-05 Thread Christophe Meessen
Hello, when I try to print the draft documents, only the first page is printed. It's not related with the printer because I get the same result when I try to print in a document (pdf). Is it possible to provide the documents also in pdf format ? -- You received this message because you are

Re: [go-nuts] Why can't we use < > for the Go generic parameters ?

2018-09-06 Thread Christophe Meessen
I understand your example, but it wouldn't be a problem anymore with a special character like a $ sign. D use the !. -- Bien cordialement, Ch.Meessen > Le 6 sept. 2018 à 09:56, Jan Mercl <0xj...@gmail.com> a écrit : > > On Thu, Sep 6, 2018 at 9:49 AM Christophe Meessen >

[go-nuts] Re: Can't print GO2 draft documents with firefox 61.0.1 (64 bits) Ubuntu

2018-09-06 Thread Christophe Meessen
Thank you for the suggestions peterGo, but that is my current browser. I finally used Chrome to print. Le mercredi 5 septembre 2018 10:10:22 UTC+2, Christophe Meessen a écrit : > > Hello, > > when I try to print the draft documents, only the first page is printed. > I

[go-nuts] Why can't we use < > for the Go generic parameters ?

2018-09-06 Thread Christophe Meessen
I know about the problems it raised with C++, but Go is different. Go2 draft restricts generic parameters to types. The only case where there might eventually be an ambiguity is with specialized functions in expressions. I would like to determine if it's still possible to use < > and avoid

[go-nuts] Elastic synchronised logging : What do you think ?

2019-03-17 Thread Christophe Meessen
What you did is decouple production from consumption. You can speed up the production go routine if the rate is irregular. But if, on average, consumption is too slow, the list will grow until out of memory. If you want to speed up consumption, you may group the strings in one big string and

[go-nuts] Re: Elastic synchronised logging : What do you think ?

2019-03-17 Thread Christophe Meessen
Please replace 'case ticker.C' with 'case <-ticker.C' in my previous code. -- 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: Can’t get latest package version with modules

2019-10-01 Thread Christophe Meessen
name]". When present, a "go get" will download and install all dependencies. Sorry for the noise. Le mardi 1 octobre 2019 08:59:55 UTC+2, Christophe Meessen a écrit : > > When GOPATH is defined (~/go), > > go get -u github.com/XXX/go-YYY@latest > > doesn’t wor

[go-nuts] Re: Can’t get latest package version with modules

2019-10-01 Thread Christophe Meessen
modules was used everywhere. The rules are non-intuitive and not explicit. Le lundi 30 septembre 2019 11:17:11 UTC+2, Christophe Meessen a écrit : > > Solved the issue with the command: > > go get -u github.com/XXX/go-YYY@latest > > Is there another way ? > > Le lu

[go-nuts] Re: Any support for proxy certificates (RFC3820) ?

2019-09-24 Thread Christophe Meessen
Answering to my self. In case someone else is sharing the need, I found this Go package that provides support for x509 proxy certificates. https://gitlab.cern.ch/flutter/go-proxy Le lundi 23 septembre 2019 14:31:51 UTC+2, Christophe Meessen a écrit : > > Hello, > I need to writ

[go-nuts] Can’t get latest package version with modules

2019-09-30 Thread Christophe Meessen
I have a small go program to test a third party package stored on github. I’m using go1.13.1 with no GOPATH defined. Code is in ~/go/src. When I first tried to compile the program, there was an error in the third party package. I submitted a pull request to fix it and the manager merged it.

[go-nuts] Re: Can’t get latest package version with modules

2019-09-30 Thread Christophe Meessen
Note that the third party package has no tags. Le lundi 30 septembre 2019 11:01:17 UTC+2, Christophe Meessen a écrit : > > I have a small go program to test a third party package stored on github. > I’m using go1.13.1 with no GOPATH defined. Code is in ~/go/src. > > Whe

[go-nuts] Re: Can’t get latest package version with modules

2019-09-30 Thread Christophe Meessen
Solved the issue with the command: go get -u github.com/XXX/go-YYY@latest Is there another way ? Le lundi 30 septembre 2019 11:01:17 UTC+2, Christophe Meessen a écrit : > > I have a small go program to test a third party package stored on github. > I’m using go1.13.1 with

[go-nuts] Inconsistent rounding with float printf ?

2019-12-06 Thread Christophe Meessen
I have noticed that printf performs an apparently inconsistent rounding of floating point values. I divide a big number by 1000 and printf the resulting value with "%.1f". Here is the code: https://play.golang.org/p/e7dD3c6IHq2 I would expect the rounding rule to be "round away from zero" as

[go-nuts] Re: Inconsistent rounding with float printf ?

2019-12-06 Thread Christophe Meessen
I can't change expectations. It is to convert a byte count into a human readable byte count ( with kB, MB, ... units). I found out that I can produce the expected result by using math.Round. See here https://play.golang.org/p/UorDwbKlLj5 For my use case, I ended up converting "manually" the

[go-nuts] Any support for proxy certificates (RFC3820) ?

2019-09-23 Thread Christophe Meessen
Hello, I need to write go code dealing with proxy certificates (RFC3820). They are sometimes referred to as Grid Security Infrastructure (GSI) certificates I couldn’t find anything related in crypto or x/crypto. Any suggestion ? -- You received this message because you are subscribed to the

[go-nuts] Re: Memory leak or GC feature ?

2020-03-06 Thread Christophe Meessen
> > On Friday, 6 March 2020 14:11:37 UTC+1, Christophe Meessen wrote: >> >> I wanted to check my program for go routine and memory leaks. In doing so >> I detected what resemble a memory leak while my program was doing nothing. >> >> Here is a minimal program

[go-nuts] Re: Memory leak or GC feature ?

2020-03-06 Thread Christophe Meessen
UTC+1, Christophe Meessen a écrit : > > The documentation of the GC() function states: > > "GC runs a garbage collection and blocks the caller until the garbage > collection is complete. It may also block the entire program." > > Based on the documentation, I assumed

[go-nuts] Memory leak or GC feature ?

2020-03-06 Thread Christophe Meessen
I wanted to check my program for go routine and memory leaks. In doing so I detected what resemble a memory leak while my program was doing nothing. Here is a minimal program that reproduces the problem. The program collects and prints the total number of bytes allocated and the number of

[go-nuts] Is the GC recovering storage when full slice expression reduce capacity ?

2020-01-10 Thread Christophe Meessen
It is possible to reduce the capacity of a slice by using the full slice expression (https://golang.org/ref/spec#Slice_expressions). Now consider the following code where a is a 1MB slice. I then create b, a slice of a, but with a much smaller capacity. Finally, I change the value of a so that

[go-nuts] [generics] is generics with constrain needed ?

2020-06-17 Thread Christophe Meessen
Reading the document "Type parameters - Draft desing" of June 16, 2020 (https://go.googlesource.com/proposal/+/refs/heads/master/design/go2draft-type-parameters.md), I wonder if these two following function definitions are not equivalent and thus interchangeable func Stringify(type T

[go-nuts] It is said that future Macs will use ARM, is golang ready for this move ?

2020-06-10 Thread Christophe Meessen
There is a rumor that Apple will announce at the WWDC2020, the 22 june, that the Macs of generation 2021 and beyond will use ARM processors in place of the Intel processors. Is Golang ready to follow this move ? Will I be able to compile and run my go programs on ARM Macs ? -- You received

Re: [go-nuts] Unexpected circular type definition limitation

2023-06-15 Thread Christophe Meessen
The following playground example shows the problem: https://go.dev/play/p/1kC2j57M_fW Le 15/06/2023 à 10:28, Jan Mercl a écrit : On Thu, Jun 15, 2023 at 10:16 AM christoph...@gmail.com wrote: It is possible to define two structures globally with mutual type dependency as this: type A