[go-nuts] Re: Validation checks in Go

2018-05-15 Thread David Skinner
I agree with Matt, using panic is fine when you are debugging. I do not usually do panic in production code unless it is because of the loss of some asset required to start. GO has robust error handling. You should write the function to return an error. If you deploy your program to a client s

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

2018-05-15 Thread David Skinner
Regarding this statement. > THE AUTHORS OF THIS SOFTWARE DID NOT INTENTIONALLY MAKE MISTAKES OR > INCLUDE PRACTICAL JOKES If you place software out in the wild, and you have a LICENSE with no warranty and indemnification and terms of service and imprint - You are not protected from frivolo

Re: [go-nuts] Checking IP against CIDR ranges

2018-05-15 Thread Bakul Shah
On Tue, 15 May 2018 17:38:26 -0700 XXX ZZZ wrote: XXX ZZZ writes: > > I'm trying to check an IP against a list of several CIDR ranges, so far the > most obvious way to do it seems to parse both the IP and the cidr ranges ( > ParseCIDR) and then do a net.contain() however, if we have more than 1

[go-nuts] Checking IP against CIDR ranges

2018-05-15 Thread XXX ZZZ
Hello, I'm trying to check an IP against a list of several CIDR ranges, so far the most obvious way to do it seems to parse both the IP and the cidr ranges ( ParseCIDR) and then do a net.contain() however, if we have more than 1 CIDR we have to loop checking one by one which imho is incredible u

[go-nuts] Re: Why does unmarshalling this API response return an unexpected EOF?

2018-05-15 Thread Luke IC
Cool, thanks. I've created a new issue on the `jsonpb` repo as well. On Tuesday, 15 May 2018 15:07:44 UTC+10, Tamás Gulácsi wrote: > > > 2018. május 14., hétfő 23:03:46 UTC+2 időpontban Luke IC a következőt írta: >> >> Thanks a lot, I went back and gave jsonpb a go and finally got it >> unmarshal

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

2018-05-15 Thread prades . marq
If you really have legal concerns you should talk to a lawyer. Asking for anonymous opinion on a forum isn't legal advice. This should certainly not be the place to discuss legal matters such as the scope of a license. I don't think anybody who answered you is actually a lawyer. If you come upon

Re: [go-nuts] ROC (Request-Oriented Collector)

2018-05-15 Thread rlh via golang-nuts
The current plan is to polish and publish our learnings by the end of next month (June 2018). On Sunday, May 13, 2018 at 11:48:45 PM UTC-4, Ian Lance Taylor wrote: > > [ +rlh, austin] > > On Sun, May 13, 2018 at 11:24 AM, Tanya Borisova > wrote: > > Hi! > > > > Is Golang team still working

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

2018-05-15 Thread matthewjuran
I get that we have to work with the legal system details and that they may cause strange terms. Thanks for sharing some of those US details. Isn’t there responsibility in putting tools out there publicly for anybody to use? Perhaps public distribution under the terms “don’t use this” is irrespo

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

2018-05-15 Thread John McKown
On Tue, May 15, 2018 at 11:17 AM, Matthias B. wrote: > On Tue, 15 May 2018 06:39:40 -0700 (PDT) > matthewju...@gmail.com wrote: > > > I don’t think I’m suggesting to not disclaim liability. I’m > > suggesting to claim that I didn’t hide anything to make a use break > > on purpose. It does add lia

[go-nuts] Verifying authenticity with certificate request

2018-05-15 Thread comexx
Hello, I'm following OpenGDPR guide to implement a client to comply with it. However, I struct in this step: https://github.com/opengdpr/opengdpr/blob/master/OpenGDPR_specification.md#88-callback-authentication Basically, I do have a certificate request I receive from an endpoint and need to v

[go-nuts] Re: dynamic programming or something else

2018-05-15 Thread matthewjuran
Hi Alex, You may want to have logic tests in place to be sure your improvements are correct. Capturing the complete call graph and CPU/memory usage using pprof may help reveal improvements. The visualization output has options you might want to adjust. Inspecting the assembly output is anothe

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

2018-05-15 Thread Matthias B.
On Tue, 15 May 2018 06:39:40 -0700 (PDT) matthewju...@gmail.com wrote: > I don’t think I’m suggesting to not disclaim liability. I’m > suggesting to claim that I didn’t hide anything to make a use break > on purpose. It does add liability, but this is liability that is > completely in the author’s

[go-nuts] Re: [ANN] Pion-TURN, a TURN server designed with ease of use and extensibility in mind

2018-05-15 Thread matthewjuran
My mistake, I see that there is more library code at https://github.com/pions/pkg Thanks, Matt On Tuesday, May 15, 2018 at 9:46:46 AM UTC-5, matthe...@gmail.com wrote: > > Hello, thanks for sharing here and thanks for the MIT license. Here’s a > code review. > > These are my unfiltered opinions

[go-nuts] Re: [ANN] Pion-TURN, a TURN server designed with ease of use and extensibility in mind

2018-05-15 Thread matthewjuran
Hello, thanks for sharing here and thanks for the MIT license. Here’s a code review. These are my unfiltered opinions. You may not agree with some or any of them, and some or all of them might not be reasonable to implement. My goal is to build an ideal way to write Go code by doing code review

Re: [go-nuts] Re: dynamic programming or something else

2018-05-15 Thread Bakul Shah
The O(lg n) recursion with memorization algorithm for computing fib(n) can be directly derived from its formula by repeated application of it. f(n)= f(n-1)+f(n-2)= 2*f(n-2)+f(n-3)=f(2)*f(n-2)+f)1)*(n-3)= 3*f(n-3)+2*f(n-4)=f(3)*f(n-3)+f(2)*f(n-4)= and so on until you reach an expression built with

[go-nuts] Re: [ANN] Dependencies for dummies

2018-05-15 Thread matthewjuran
Hello, I haven’t seen this pattern: src/vendor/github.com/fulldump/goconfig I’ve put vendored dependencies in the project: src/github.com/my/project/vendor/github.com/fulldump/goconfig Why are you doing it this way? Have you tried vgo? https://github.com/golang/vgo Matt On Sunday, May 13, 2

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

2018-05-15 Thread matthewjuran
I don’t think I’m suggesting to not disclaim liability. I’m suggesting to claim that I didn’t hide anything to make a use break on purpose. It does add liability, but this is liability that is completely in the author’s control unlike regular bugs or misuse that disclaiming other liability stil

[go-nuts] Re: Validation checks in Go

2018-05-15 Thread matthewjuran
What I’ve seen in the standard library was no named asserts like this, just if checks with panics. The panic functionality does what you’ve described. Personally I prefer the look of if+panic instead of another function for this. Matt On Monday, May 14, 2018 at 7:38:32 PM UTC-5, Tristan Muntsi

Re: [go-nuts] dynamic programming or something else

2018-05-15 Thread Jan Mercl
On Tue, May 15, 2018 at 2:23 AM Alex Dvoretskiy wrote: > I'm trying to solve a problem. Algorithm is correct, but too slow. Perhaps you can give me some ideas on how to improve running time? Fib() is fun: https://www.reddit.com/r/golang/comments/725mji/jff_a_proofofconcept_term_rewriting_system_

Re: [go-nuts] Re: dynamic programming or something else

2018-05-15 Thread Jesper Louis Andersen
Immediate idea would be to try to exploit https://en.wikipedia.org/wiki/Fibonacci_number#Matrix_form and its representation. This yields the memoization trick from above. If done correctly, it might be possible to get the O(lg n) run-time which would be highly desired. On Tue, May 15, 2018 at 6:

Re: [go-nuts] work stealing algorithm

2018-05-15 Thread Ian Lance Taylor
On Tue, May 15, 2018 at 5:11 AM, wrote: > > Got to read a book about concurrency in go by Katherine cox-Buday, o'Reilly > publications. it says that "Go’s work- > stealing algorithm enqueues and steals continuations" . Is it how work > stealing algorithm works? It's approximately how Go's work-s

[go-nuts] work stealing algorithm

2018-05-15 Thread prabesh
Got to read a book about concurrency in go by Katherine cox-Buday, o'Reilly publications. it says that "Go’s work- stealing algorithm enqueues and steals continuations" . Is it how work stealing algorithm works? -- You received this message because you are subscribed to the Google Groups "gola

[go-nuts] Re: [ANN] Dependencies for dummies

2018-05-15 Thread Gerardo Oscar JT
Updated script with option --parallel (enabled by default), up to 6x faster in a project with 10 dependencies :D El domingo, 13 de mayo de 2018, 22:12:59 (UTC+2), Gerardo Oscar JT escribió: > > Hi gophers! > > Golang do not have a canonical way to download dependencies. Glide is the > last one

Re: [go-nuts] golang maven plug-in 2.2.0 has been published in maven central

2018-05-15 Thread Igor Maznitsa
I am not angry at all :) because all my OSS tools I develop usually for my personal use and to feed my laziness and just share them imho today any attempt to keep some IT-ecosystem as pure one and based only on single technology or computer language will be too expensive, it is cheaper to use al

Re: [go-nuts] Re: RFC - Review request for a project done in Golang

2018-05-15 Thread Sankar P
In case someone is curios, I did refactor the code a lot more, to bring down the gocyclo complexity from 23 to 11. I feel that this should be in a better shape now. Thanks everyone for the comments. Let me know if you still find any scope for optimisation or cleanup. I would add some test cases to

Re: [go-nuts] golang maven plug-in 2.2.0 has been published in maven central

2018-05-15 Thread Wojciech S. Czarnecki
On Tue, 15 May 2018 08:30:36 +0200 Henrik Johansson wrote: > How in the name of anything does using Maven make life easier? > Hyperbole aside I am curious. How does it help? I think it can save some "corporate-grade" CI specialists from learning go101. The contractor comes in, makes 3k go lines

Re: [go-nuts] golang maven plug-in 2.2.0 has been published in maven central

2018-05-15 Thread Henrik Johansson
I have lived through all versions of Maven in large scale and the switch to the Go way has brought me nothing but joy and peace. Maven works, I agree, but thats it. it's not joyful and simple in the same way as Go's way of building that mostly (modulo versions) gets out of your way. I am impressed

Re: [go-nuts] golang maven plug-in 2.2.0 has been published in maven central

2018-05-15 Thread Igor Maznitsa
*short note for developers who knows nothing about maven* 1. maven is a well-documented cross-platform mature tool with long history 2. maven is open-source and small one 3. maven is accessible in popular OS softw