Re: [go-nuts] Re: pet peeve: it's Go not golang

2017-07-31 Thread simran
I was just being silly Skip :) Lang is itself (as opposed to Erlang) quite a popular surname in itself: https://en.wikipedia.org/wiki/Lang_(surname) Though it would be good to lighten the mood a little by making a jest :)(if we can't laugh at ourselves, we'll never improve :) In fact, i had a

Re: [go-nuts] Generics are overrated.

2017-07-31 Thread Henrik Johansson
I don't miss Javas generics so much for the ability to create generic libraries but for using them. Things like map, group, filtering etc is so much simpler to write (maybe not always read). And it is fine to loop explicitly by hand coding but with grouping and perhaps several levels of filtering

Re: [go-nuts] Re: No Allman-Style, No go!

2017-07-31 Thread ecstatic . coder
The irony is that I don't even use the automatic semi-colon insertion feature. I'm used to add them manually anyway, even in Go, as whenever possible I tend to program in a less idiomatic way (for loops, semi-colons, etc) which allows me to easily port substantial parts of my code from one

[go-nuts] Go Styleguide

2017-07-31 Thread hallo
Hey, I just released a Go Styleguide , please let me know what you think! -- 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

Re: [go-nuts] No Allman-Style, No go!

2017-07-31 Thread lockrecv
You like radish, we like meat. 在 2013年9月21日星期六 UTC+8下午10:04:09,Michael Daconta写道: > > Hi Remy, > > So, in the original program, to test the exact theory you mention, I added > all the semi-colons myself. > Like so: > > package main; > > import "fmt"; > > func main() > { > fmt.Printf("hello,

[go-nuts] Get a copy of reflect.Value's underlying value

2017-07-31 Thread eZio Pan
Hello, I want to build a "universal slice reverser" with reflect.MakeFunc. But I don't know how to get a copy of reflect.Value's underlying value, which make result not correct. Here is the code: package main import ( "fmt" "reflect" ) func reverse(in []reflect.Value) (out []reflect.Value) {

Re: [go-nuts] Get a copy of reflect.Value's underlying value

2017-07-31 Thread Jan Mercl
On Mon, Jul 31, 2017 at 4:18 PM eZio Pan wrote: > My code return [7 6 5 5 6 7], but excepting result is [7 6 5 4 3 2] https://play.golang.org/p/yraJZFDjS3 -- -j -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To

[go-nuts] Re: Generics are overrated.

2017-07-31 Thread Mandolyte
It's been many years since I was involved in developing complex systems (C++ and Java). But I agree, it was mostly lists and sets with searching and sorting. But I also used them for algorithms a good bit. Thus I would guess that the maintainers of GONUM libraries might benefit (anyone

Re: [go-nuts] Go import tree

2017-07-31 Thread roger peppe
I've needed to find out this kind of info lots of times in the past. I wrote a small tool named "showdeps" that includes the capability to find out why a dependency is present. You can run "showdeps -why somepackage" to find out why there is a dependency on somepackage, which prints a line

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

2017-07-31 Thread roger peppe
On 30 July 2017 at 08:22, Tristan Colgate wrote: > > > On Sat, 29 Jul 2017, 23:59 Shawn Milochik, wrote: > >> >>- You don't need generics to write Kubernetes. >> >> I've had no personal need for generics, but k8s client-go is the one case > I've

Re: [go-nuts] No Allman-Style, No go!

2017-07-31 Thread eric . pelzer
2013/9/21, Michael Daconta : > I assume you say this with tongue-in-cheek; however, I cannot believe this > design decision was made. For something to borrow so liberally from C only > > to enforce "one-true" bracing style is frankly ridiculous. > When someone has

[go-nuts] Is x/exp/shiny dead?

2017-07-31 Thread fazal
It was one of the things I was looking forward to, but I see almost no activity there, which makes me sad. Is it because it is mature enough for general use? There is a road-map for widgets but non are complete. I really hope it is not abandoned because Go really needs a GUI library that is

[go-nuts] tour.golang.org in Thai language

2017-07-31 Thread Pallat Anchaleechamaikorn
Dear all, I am sorry for the wrong subject email I sent lately. Please add this Thai language version of tour.golang.org by this URL https://go-tour-th.appspot.com. Thank you very much. Best Regards, Pallat Anchaleechamaikorn yod.pal...@gmail.com Tel. +66 8 0444 3253 -- You received

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

2017-07-31 Thread Tristan Colgate
Re-posting to the list. On Mon, 31 Jul 2017, 14:15 roger peppe, wrote: > On 30 July 2017 at 08:22, Tristan Colgate wrote: > >> >> >> On Sat, 29 Jul 2017, 23:59 Shawn Milochik, wrote: >> >>> >>>- You don't need generics to write

Re: [go-nuts] Go Styleguide

2017-07-31 Thread Robert Melton
On Mon, Jul 31, 2017, at 07:39, ha...@arne.me wrote: > Hey, I just released a Go Styleguide[1], please let me know what you think! This is great! Going to focus on criticisms because they have the most value, but I really think it is excellent. - Feels more like a best practices than a style

Re: [go-nuts] Get a copy of reflect.Value's underlying value

2017-07-31 Thread Josh Humphries
You have to use a temporary to swap the values: tmp := a.Interface() a.Set(b) b.Set(reflect.ValueOf(tmp)) *Josh Humphries* jh...@bluegosling.com On Mon, Jul 31, 2017 at 10:18 AM, eZio Pan wrote: > Hello, > I want to build a "universal slice reverser" with

Re: [go-nuts] Re: No Allman-Style, No go!

2017-07-31 Thread Ian Lance Taylor
On Mon, Jul 31, 2017 at 10:10 AM, Hrobjartur Thorsteinsson wrote: > Hi Mr. Bushnell, > The code block identifier, in Go are { }. They are already part of the > syntax if I'm not mistaken. > Go proudly aiming to be a simplifying, lowest common denominator language >

[go-nuts] Re: Logberry: Structured, Semantic Logging

2017-07-31 Thread opus5340
Hi Nate. I agree. Because I have implemented lumberjack and having troubles writing log files. Would you have a simple example package that executes all the key functionality? I realize this is two years passed... came across your code and wanted to try it. Thanks Victor On Tuesday,

Re: [go-nuts] Re: No Allman-Style, No go!

2017-07-31 Thread 'Thomas Bushnell, BSG' via golang-nuts
On Sat, Jul 29, 2017 at 10:36 AM wrote: > > But as Gofmt can ALREADY enforces this common coding style, and can be run > at any time, including before committing code on the depots, why should it > be enforced by the COMPILER too ? > The compiler does not enforce the

Re: [go-nuts] Re: No Allman-Style, No go!

2017-07-31 Thread Hrobjartur Thorsteinsson
Hi Mr. Bushnell, The code block identifier, in Go are { }. They are already part of the syntax if I'm not mistaken. Go proudly aiming to be a simplifying, lowest common denominator language makes sense to me. In that sense, the { signs tightly bound to declarations and control statements is

Re: [go-nuts] Re: No Allman-Style, No go!

2017-07-31 Thread John McKown
On Mon, Jul 31, 2017 at 12:12 PM, Ian Lance Taylor wrote: > ​ > > > > I think it's time to let this thread go back to sleep again. I think > that every possible point of view has already been expressed. > ​I agree. Not that anyone is impressed by that. [grin] > > The

[go-nuts] Re: Generics are overrated.

2017-07-31 Thread Tristan Colgate
On Mon, 31 Jul 2017, 18:21 roger peppe, wrote: > > > import hpaInformer informer > > > > myInformer := hpaInformer.New(sharedUnderlyingCacheThing) > > So... to me, the implementation of NewHorizontalPodAutoscalerInformer looks > pretty much exactly like what you've got there,

[go-nuts] Etiquette on reusing test code

2017-07-31 Thread Ren Thraysk
Wondering what the etiquette is for using test code from other packages, both from golang stdlib and /x/ ? Obviously the BSD like license stays, but is there an expected way of documenting the tests are modified versions written by other parties? Ren -- You received this message because you

Re: [go-nuts] Generics are overrated.

2017-07-31 Thread Olivier El Mekki
I can relate to Shawn's experience, here. I wrote a few programs in C, but mostly used interpreted and untyped languages professionally, before Go. When I started using Go, I fought for a while with the type system, just for the time to get used to it in general in daily usage. Once it was

[go-nuts] Re: Proper way to construct|format this code...

2017-07-31 Thread rogerjd
>From studying Go I learned: there is no need of if/else unless there is a statement after it which depends on it if else statement //depends on if/else branch/path Isn't it so? On Sunday, July 30, 2017 at 4:22:00 PM UTC-4, Eric Brown wrote: > > What is the standard way to construct|format

[go-nuts] Re: Is x/exp/shiny dead?

2017-07-31 Thread leonsal
You could take a look at G3N which is a 3D OpenGL game engine but it features a basic GUI with several widget types. You could check the available GUI widgets running the G3N Demo and selecting the GUI tests folder. It was one of the

[go-nuts] [ANN] Gokoban - 3D Puzzle Game written in Go!

2017-07-31 Thread Daniel Salvadori
Hi everyone, I made an open-source 3D puzzle game with Go. It's called Gokoban ! You control the Go gopher, and your objective in each level is to push the boxes until they are all on top of the yellow pads. There are elevators that help you reach high

[go-nuts] Getting Uid/Gid for a folder

2017-07-31 Thread Serguei Bezverkhi (sbezverk)
Hello, I am having trouble getting GID for a folder. I checked os.Stat api but it returns only permissions, there is no Uid or Gid. stat /mnt/disks/vol2 File: ‘/mnt/disks/vol2’ Size: 6 Blocks: 0 IO Block: 4096 directory Device: fc12h/64530dInode: 64

[go-nuts] Re: Convert from bool to integer (cgo)

2017-07-31 Thread jianzhangbjz
Hi, Any update about the C.CBool function supporting in CGO? BRs, Jian -- 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

Re: [go-nuts] Go Styleguide

2017-07-31 Thread hallo
Hey Robert, thank you very much for the feedback! Very glad you like (most of) it. I'll take your points into account tomorrow. -- 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,

Re: [go-nuts] Is x/exp/shiny dead?

2017-07-31 Thread Ian Lance Taylor
[ +nigeltao ] On Mon, Jul 31, 2017 at 1:25 PM, fazal wrote: > It was one of the things I was looking forward to, but I see almost no > activity there, which makes me sad. > > Is it because it is mature enough for general use? There is a road-map for > widgets but non are

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

2017-07-31 Thread Dan Kortschak
We use sets in the graph packages, but the number of set types is pretty limited (sets of nodes and sets of either int or int64) and map[T] works for that level of use. The only other place where it might be useful for us is in in place of generating float32 versions of float64 blas and lapack

Re: [go-nuts] Re: Convert from bool to integer (cgo)

2017-07-31 Thread Ian Lance Taylor
On Mon, Jul 31, 2017 at 7:21 PM, wrote: > > Any update about the C.CBool function supporting in CGO? You are asking for an update, but as far as I know nobody has requested this. Is it needed? How would C.CBool(i) differ from `i != 0`? The latter seems clearer and

Re: [go-nuts] Is x/exp/shiny dead?

2017-07-31 Thread Nigel Tao
On Tue, Aug 1, 2017 at 6:25 AM, fazal wrote: > It was one of the things I was looking forward to, but I see almost no > activity there, which makes me sad. It's certainly not very active right now. I work part time, for uninteresting reasons, and shiny is unfortunately

Re: [go-nuts] Is x/exp/shiny dead?

2017-07-31 Thread Daniel Skinner
As one of the persons reached out to for that effort (and I'm not a shiny contributor), my current unpublished work will eventually serve as a basis for some proposals to shiny for review that maybe after some testing and input from others will stand on its on merits, for such a proposal. Even as

Re: [go-nuts] Go goes crazy on math.Sin()

2017-07-31 Thread Ian Lance Taylor
On Sun, Jul 30, 2017 at 9:58 PM, peterGo wrote: > > Is this just a variation of https://github.com/golang/go/issues/6794 ? Thanks for the pointer. It could be. It's not the same code, but it's similar. Ian -- You received this message because you are subscribed to the

[go-nuts] Go Styleguide

2017-07-31 Thread Jérôme LAFORGE
Maybe you can take a look at https://peter.bourgon.org/go-best-practices-2016/ Some part of this Peter's practices are sweet. -- 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,