[go-nuts] Re: Blog Article: Go Generics (and also mocking)

2024-01-08 Thread Corin Lawson
On Tuesday 9 January 2024 at 3:33:42 am UTC+11 Mike Schinkel wrote: It doesn't have to be imaginative nor obfuscated to be cognizant of naming conflicts. Thanks, you've convinced me that it needs to change so I'll do it now and I might steal that name (vermock)! On Tuesday 9 January 2024 a

[go-nuts] Blog Article: Go Generics (and also mocking)

2024-01-07 Thread Corin Lawson
I recently published a blog post about Go generics. I've found that there's lots of very good technical information about generics in Go, but I felt that they are lacking some gritty experience reports. https://medium.com/versent-tech-blog/go-generics-tips-tricks-and-pitfalls-4342b82f9eeb The

[go-nuts] Re: [ANN] GraphBLAS binding for Go

2023-09-25 Thread Corin Lawson
Fantastic work! I'm no authority on the subject of Go programming style but the CheckErrors and OK pattern seems very unusual. Can you tell me the reasons for that design choice? On Tuesday, 19 September 2023 at 10:13:54 pm UTC+10 Pascal Costanza wrote: > Hi, > > > I am happy to announce a libr

[go-nuts] Re: JSON Compare

2023-09-18 Thread Corin Lawson
What makes you say the existing packages are not maintained? They may simply be complete? On Friday, 15 September 2023 at 5:05:10 am UTC+10 Sapna Jayavel wrote: > I am implementing a method find difference between two JSON objects and it > has to drill down recursively. My usecase has very lar

[go-nuts] Re: go/wasm how to test browser APIs

2022-04-09 Thread Corin Lawson
I suppose you need to load and run the tests in browser... this might help: https://github.com/agnivade/wasmbrowsertest On Friday, 8 April 2022 at 9:31:59 pm UTC+10 mi...@ubo.ro wrote: > I'm trying to unitest a browser wasm/js application but it seems that the > browser objects are missing. I a

[go-nuts] Re: [ANN] Templatizer - A real templates engine to create dynamic repositories

2022-03-08 Thread Corin Lawson
Congrats! Such a project has been on my mind lately. I have a number of questions: 1. Why is there an option for 'secret' template parameters? Secrets should never be committed to a repository! 2. Is the `.templatizer.yml` file excluded from the output? Is it possible to exclude it? 3. Do you

[go-nuts] Re: Fuzz Testing in Go 1.18

2022-02-22 Thread Corin Lawson
Great job, a nice and gentle introduction. But what's with the 2 minute end screen? On Tuesday, 22 February 2022 at 3:53:07 am UTC+11 a.pl...@gmail.com wrote: > Hi, > > I recently made a video on fuzzing support in Go 1.18. I'd like to hear > your feedback if that's possible - https://youtu.be/

[go-nuts] Re: Yey another Error Handling proposal

2022-02-16 Thread Corin Lawson
Hi Vojta, Can you please provide some real world examples (e.g. link to open source project) or a code style guideline that promotes the use of that pattern of using a goto? I don't believe that it is idiomatic Go. Personally, I can count on one hand the number of times I've seen the usage of

[go-nuts] Re: scripting in Go

2022-01-25 Thread Corin Lawson
For my money, as a newcomer to the API, having both the long named function and the shorthand would be useful. I can see myself using M immediately, but some like W I'm not likely to remember as readily and longer names would help in adopting the library. (Also, what is the mnemonic for W?)

Re: [go-nuts] No time.Duration#UnmarshalText; is there a good reason?

2022-01-18 Thread Corin Lawson
te: > On Mon, Jan 17, 2022 at 9:53 PM Corin Lawson wrote: > > > > It seems obvious (to me) that the encoding.TextUnmarshaler interface > could be implemented for time.Duration (it is implemented for time.Time, > afterall). > > > > The fact that it is not gives

[go-nuts] No time.Duration#UnmarshalText; is there a good reason?

2022-01-17 Thread Corin Lawson
It seems obvious (to me) that the encoding.TextUnmarshaler interface could be implemented for time.Duration (it is implemented for time.Time, afterall). The fact that it is not gives me pause... is there a good reason that the stdlib has not done this? What issues am I facing if I do this: ht

Re: [go-nuts] Go 1.18 Type Parameter Inference

2021-12-21 Thread Corin Lawson
huh TIL... Thanks, I now see that there's no problem with the type inference. On Wednesday, 22 December 2021 at 4:48:02 pm UTC+11 Ian Lance Taylor wrote: > On Tue, Dec 21, 2021 at 9:42 PM Corin Lawson wrote: > > > > I'm new here, but write Go on a daily basis for fun

[go-nuts] Go 1.18 Type Parameter Inference

2021-12-21 Thread Corin Lawson
Hi! I'm new here, but write Go on a daily basis for fun and profit. The other day I wrote a giant type switch that was intended to organise a bag of various things into various bags each containing things of a single concrete type. For example: https://go.dev/play/p/fqYXEP2YG_9 (Note that th