[go-nuts] is this safe?

2017-11-21 Thread DV
I think that's a horrible idea in any language, honestly. You shouldn't be mutating the thing you're enumerating. -- 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 t

[go-nuts] test debugging woes

2017-11-17 Thread DV
I wish I could help you, but your description of the problem could not be more vague. Your post can be rewritten as "problem pls help". What library is this? Is it on GitHub? Can we look at it? What section of code is returning nil? Is nil the problem? Or is there a panic? What's your code lo

[go-nuts] cgo style question

2017-11-03 Thread DV
Which "style" of wrapping a C array in a Go slice is more idiomatic in this code - https://play.golang.org/p/6EbKl22MPQ - "arr1" or "arr2"? They both seem to produce the exact same result. I've seen the "arr2" style more often, but I don't understand why. The way I wrapped "arr1" seems more cle

Re: [go-nuts] "find" for Slices like "append"

2017-09-06 Thread DV
Go has never been a "let's include all possible methods for all possible use-cases for all possible users" type of language. It's just not in its DNA. You seem to like Python - so why not stick with Python? Do lots of C++ people complain about how Javascript doesn't let you do pointer arithmetic

[go-nuts] Re: Generics are overrated.

2017-08-09 Thread DV
On Tuesday, August 8, 2017 at 5:37:42 AM UTC-6, Haddock wrote: > > In my opinion generics added to Go would make Go really take off. > Currently Java developers would not change to Go. With Go having generics > this would change and more people would consider Go also when not coming > from Jav

Re: [go-nuts] Re: Generics are overrated.

2017-08-03 Thread DV
I think "need" is indeed one of those special words that means different things for different people. Go doesn't "need" generics and you technically don't "need" anything except air, water, food, a sharp spear, and shelter, to survive. I recently started toying with writing quick-n-dirty program

[go-nuts] Is there any golang package available for building mongodb query from plain logic expression string or URL?

2017-06-05 Thread DV
This seems pretty trivial, tbh. You just parse the URL query string and construct a JSON doc out of it? Go's philosophy in general is that it's better to just write the code yourself sometimes, even multiple times, than to pull in a dependency. Especially for something like this. Do you reme

[go-nuts] Which Go client for ElasticSearch?

2017-05-30 Thread DV
This might be an unpopular opinion, but you don't *need* an ES client. ES is just JSON over HTTP with a very well documented REST-ful API. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails

[go-nuts] Puzzle for golang guru.

2017-02-16 Thread DV
Very subtle fix: https://play.golang.org/p/xTEGpgIyP6 -- 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 golang-nuts+unsubscr...@googlegroups.com. For more options,

[go-nuts] Puzzle for golang guru.

2017-02-16 Thread DV
Very subtle fix: https://play.golang.org/p/xTEGpgIyP6 -- 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 golang-nuts+unsubscr...@googlegroups.com. For more options,