[go-nuts] Re: A proposal for generic in go

2016-06-22 Thread Henry
Having completed an earlier project, my colleagues and I sat down to review the team performance and what we could do better next. My colleague proposed an intriguing idea and we decided to randomly pick two components of our past projects that could be implemented independently from the rest

Re: [go-nuts] feature request: allow literal digit underscore grouping

2016-06-22 Thread Matt Harden
Since the preference is local and/or personal, would it be better to do this in the editor, adding separation on loading a Go source file and removing it on save? It shouldn't be *too* hard to do it on all numbers over a certain length, while avoiding comments and strings. I suppose it would mess u

[go-nuts] Re: upx / darwin support

2016-06-22 Thread Miki Tebeka
Which version of Go are you using? According to https://github.com/pwaller/goupx upx should work well with go 1.6 (didn't check) On Wednesday, June 22, 2016 at 11:55:58 PM UTC+3, robfig wrote: > > Does anyone know a way to use upx (or comparable tool) to shrink Go darwin > binaries? (It already

Re: [go-nuts] Re: A proposal for generic in go

2016-06-22 Thread 'Thomas Bushnell, BSG' via golang-nuts
This is why I like this example. Generics induce people to write the wrong thing instead of thinking about the right thing. When you start thinking of the right thing, you often discover better solutions. I think the sort package's way of doing sorting and binary search are so clearly better than

Re: [go-nuts] golang.org/x/text/transform.Chain is not thread safe

2016-06-22 Thread Nigel Tao
+mpvl although my instinct is that this is all working as intended, and types are not goroutine-safe unless they explicitly say so. On Tue, Jun 21, 2016 at 2:33 PM, Ian Lance Taylor wrote: > On Mon, Jun 20, 2016 at 9:15 PM, wrote: >> I am guessing the same efficiency should be possible. Except

Re: [go-nuts] Re: A proposal for generic in go

2016-06-22 Thread Michael Jones
Yes, for floats with NANs and the like, you must specialize. My replacement for the standard library sort (3x to 10x faster in the common case) had to have more macro generators than expected just to handle the "uncomparables" in float32 and float64. You are right about that issue. P.S. By the wa

[go-nuts] [ANN] de: my programming text editor

2016-06-22 Thread Dave MacFarlane
I don't know why, but I just realized I announced this project on /r/golang but forgot about go-nuts. I've been working on a text editor (built in Go, of course) which tries to combine the things I like about acme with the things I use in vim, because I was getting annoyed going back and forth bet

Re: [go-nuts] Re: A proposal for generic in go

2016-06-22 Thread 'Thomas Bushnell, BSG' via golang-nuts
But Michael, that implementation isn't right for floats! Check out the actual source for math.Max. On Wed, Jun 22, 2016, 6:31 PM Michael Jones wrote: > The wonderful history of symbolic algebra at IBM (Scratchpad, Scratchpad > II) resulted in a third system, Axiom, that has always seemed to me a

Re: [go-nuts] Re: A proposal for generic in go

2016-06-22 Thread Michael Jones
The wonderful history of symbolic algebra at IBM (Scratchpad, Scratchpad II) resulted in a third system, Axiom, that has always seemed to me a bright lesson in types. It boldly goes into the topic with rigor, using category theory to decide what relationships make sense and what the nature of a

Re: [go-nuts] Re: A proposal for generic in go

2016-06-22 Thread 'Thomas Bushnell, BSG' via golang-nuts
Really? How would you implement math.Max with generics? Thomas On Wed, Jun 22, 2016, 5:45 AM Viktor Kojouharov wrote: > https://golang.org/pkg/math/ and https://golang.org/pkg/container/ are > just two stdlib packages that would greatly benefit from some kind of > generics. I'm pretty sure ther

[go-nuts] Re: GODEBUG=gctrace=1 vs. debug.GCStats

2016-06-22 Thread Caleb Spare
Yes, truncating the digits (instead of rounding) indeed explains it. Thanks Austin! On Wed, Jun 22, 2016 at 5:30 PM, Austin Clements wrote: > I think what you're seeing is simply rounding in the values printed by the > gctrace. You're correct that the two metrics are reporting the same thing. > I

[go-nuts] Re: GODEBUG=gctrace=1 vs. debug.GCStats

2016-06-22 Thread 'Austin Clements' via golang-nuts
I think what you're seeing is simply rounding in the values printed by the gctrace. You're correct that the two metrics are reporting the same thing. In fact, they come from the exact same time stamps internally. But formatting floating point numbers is hard. :) The gctrace printer simply truncates

[go-nuts] GODEBUG=gctrace=1 vs. debug.GCStats

2016-06-22 Thread Caleb Spare
Hi, I'm looking at GC statistics using both GODEBUG=gctrace=1 and debug.ReadGCStats. My question is: should the pause durations reported in debug.GCStats match the sum of the two STW phases listed in the gctrace? I ask because they are generally close but not the same. I have a trivial program (h

RE: [go-nuts] Go test to run over sub packages?

2016-06-22 Thread Dave Cheney
Permitting symlinks inside GOPATH would introduce all the problems of one source package having multiple locations that currently plague users of the vendor/ feature. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this gro

RE: [go-nuts] feature request: allow literal digit underscore grouping

2016-06-22 Thread John Souvestre
Ø The grouping of digits in big numbers is not universal. Several different systems are in use globally. This is unfortunate, but I don’t see it as a show-stopper. 100 and 1_000_000 and 100_ would all be legal and result in the same value. Although I personally prefer groups of 3,

Re: [go-nuts] Any keyboard players here?

2016-06-22 Thread Daniel Skinner
tgui-harm looks pretty interesting, I'll have to check it out this weekend. > Go is a very neat programming language, but it is not particulary fast. On my rather old computer a sampling frequency of 44100Hz caused problems, but 24000Hz did work my package dasa.cc/snd defaults to 44100 sample rat

Re: [go-nuts] Send us your gophers!

2016-06-22 Thread 'Andrew Gerrand' via golang-nuts
Yes, there will. Soon. On 21 June 2016 at 19:30, Jan Mercl <0xj...@gmail.com> wrote: > On Sat, May 21, 2016 at 8:28 AM 'Andrew Gerrand' via golang-nuts < > golang-nuts@googlegroups.com> wrote: > > > Renee French and I are doing a little secret project and would love it > if you would draw a gophe

[go-nuts] Re: Text template with same name - inconsistent errors

2016-06-22 Thread Evan Digby
Filed issue: https://github.com/golang/go/issues/16156 Thanks all. -- 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

[go-nuts] Re: [?] emulating an opengl shader in cpu bound functions

2016-06-22 Thread blueblank
Thanks for all the suggestions especially Egon, that put me ahead of my learning curve. I put most of the art pipeline I'm developing here: https://github.com/thr

[go-nuts] Re: [?] emulating an opengl shader in cpu bound functions

2016-06-22 Thread blueblank
On Tuesday, June 21, 2016 at 6:26:28 AM UTC-4, Egon wrote: > > > > On Tuesday, 21 June 2016 12:50:16 UTC+3, Egon wrote: >> >> >> >> On Monday, 20 June 2016 18:02:53 UTC+3, blue...@gmail.com wrote: >>> >>> >>>

[go-nuts] upx / darwin support

2016-06-22 Thread robfig
Does anyone know a way to use upx (or comparable tool) to shrink Go darwin binaries? (It already works extremely well for linux binaries) I saw a link to mpress which claims to do the same thing (brew install mpress), but the source site appears to have gone offline and I can't find a copy of

Re: [go-nuts] Text template with same name - inconsistent errors

2016-06-22 Thread Evan Digby
Thanks. That makes sense. In my case the only thing that raised question marks was the placing of the error (on execute vs parse)--made it fractionally harder to debug the issue I was experiencing. From there it caused me to dig deeper and come to the conclusion that it might be an issue for a

Re: [go-nuts] Text template with same name - inconsistent errors

2016-06-22 Thread Rob Pike
I'm not convinced there is a "why" other than "that's what happens". Feel free to file an issue. -rob On Wed, Jun 22, 2016 at 1:29 PM, Evan Digby wrote: > Hi Rob, > > Thanks! I'm using 1.6. I guess my question wasn't too clear now that I > read it back. > > The question isn't why I can redefin

Re: [go-nuts] Text template with same name - inconsistent errors

2016-06-22 Thread Evan Digby
Hi Rob, Thanks! I'm using 1.6. I guess my question wasn't too clear now that I read it back. The question isn't why I can redefine. More specifically, my question is why redefining by parsing an empty string returns an error on Execute. Why can't we redefine a template as empty string? If tha

Re: [go-nuts] Text template with same name - inconsistent errors

2016-06-22 Thread Rob Pike
You don't say what version of Go you are running, but as of Go 1.6, templates can be redefined, which supports the new 'block' feature. You are redefining a template, which used to be an error but is not any more. -rob On Wed, Jun 22, 2016 at 1:13 PM, Evan Digby wrote: > I'm noticing that if

[go-nuts] Text template with same name - inconsistent errors

2016-06-22 Thread Evan Digby
I'm noticing that if I accidentally create a second template with the same name but no content there is no error reported when I "parse" it, but then when I attempt to execute it I do see an error: https://play.golang.org/p/Rj3433vvju Is this expected behaviour? Why wouldn't it simply return an

RE: [go-nuts] Go test to run over sub packages?

2016-06-22 Thread John Souvestre
Ø Symlinks and the go tools should be avoided. Was this done intentionally? If so, why? If not, is it a bug which should be fixed? John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of Dave Cheney Sent: 2016

Re: [go-nuts] incorrect compiler error with invalid constants

2016-06-22 Thread Rob Pike
Yes, that is what is happening. -rob On Wed, Jun 22, 2016 at 10:44 AM, Manlio Perillo wrote: > Hi. > > With this example: > https://play.golang.org/p/OTyO37vYck > > the compiler reports that the Huge constant is invalid, but it also > reports a division by zero in the Huge/Huge expression. > I

Re: [go-nuts] Any keyboard players here?

2016-06-22 Thread Seb Binet
On Wed, Jun 22, 2016 at 6:37 PM, wrote: > Hello, > > I created a (kind of) organ or piano, to be played with a MIDI keyboard. > It has a GUI running in the terminal, thanks to the excellent termbox-go > library. It's only for Linux, but porting should not be too difficult. > PulseAudio is used fo

[go-nuts] incorrect compiler error with invalid constants

2016-06-22 Thread Manlio Perillo
Hi. With this example: https://play.golang.org/p/OTyO37vYck the compiler reports that the Huge constant is invalid, but it also reports a division by zero in the Huge/Huge expression. It should probably not report the error. The error is also reported by Go 1.6.2. It seems that the compiler is

Re: [go-nuts] feature request: allow literal digit underscore grouping

2016-06-22 Thread Rob Pike
My obligatory weekly reminder: blog.golang.org/constants. -rob On Wed, Jun 22, 2016 at 9:30 AM, Manlio Perillo wrote: > Il giorno mercoledì 22 giugno 2016 18:11:35 UTC+2, Bakul Shah ha scritto: >> >> I should've realized go automatically coerced float constants to ints. >> Which is worse but n

[go-nuts] Any keyboard players here?

2016-06-22 Thread wboe73
Hello, I created a (kind of) organ or piano, to be played with a MIDI keyboard. It has a GUI running in the terminal, thanks to the excellent termbox-go library. It's only for Linux, but porting should not be too difficult. PulseAudio is used for sound. In my humble opinion this software instr

[go-nuts] Re: windows gamepad access

2016-06-22 Thread leewitek
I have written a library that will do what you want, https://github.com/simulatedsimian/joystick On Wednesday, 22 June 2016 05:36:56 UTC+1, rbi...@cox.net wrote: > > Hi all, > I'm just getting started with Go and, for various reasons, want to run > under Windows 10. I need to read a game

Re: [go-nuts] feature request: allow literal digit underscore grouping

2016-06-22 Thread Manlio Perillo
Il giorno mercoledì 22 giugno 2016 18:11:35 UTC+2, Bakul Shah ha scritto: > > I should've realized go automatically coerced float constants to ints. > Which is worse but never mind :-) > > There is no coercion. As someone has already written, constants in go are untyped: https://golang.org/ref/spe

Re: [go-nuts] feature request: allow literal digit underscore grouping

2016-06-22 Thread Jan Mercl
On Wed, Jun 22, 2016 at 6:11 PM Bakul Shah wrote: > I should've realized go automatically coerced float constants to ints. Which is worse but never mind :-) Iff the untyped floating point constant is non imaginary and integral. -- -j -- You received this message because you are subscribe

Re: [go-nuts] feature request: allow literal digit underscore grouping

2016-06-22 Thread Bakul Shah
I should've realized go automatically coerced float constants to ints. Which is worse but never mind :-) > On Jun 22, 2016, at 8:57 AM, Jan Mercl <0xj...@gmail.com> wrote: > > On Wed, Jun 22, 2016 at 5:54 PM Bakul Shah wrote: > > That can be dealt with an output format. Just as the hex or octa

Re: [go-nuts] feature request: allow literal digit underscore grouping

2016-06-22 Thread Jan Mercl
On Wed, Jun 22, 2016 at 5:56 PM Andy Balholm wrote: > The same is true of brace styles :-P. Brace style is a matter of preference. Wrong digit grouping in a given place on Earth is wrong, not less preferred. -- -j -- You received this message because you are subscribed to the Google Groups

Re: [go-nuts] feature request: allow literal digit underscore grouping

2016-06-22 Thread Jan Mercl
On Wed, Jun 22, 2016 at 5:54 PM Bakul Shah wrote: That can be dealt with an output format. Just as the hex or octal or the "e" input format is lost. > ... in Go there is a slight inconsistency: 1e6 is an int but 1e-6 is a float. The literals 1e6 and 1e-6 are both untyped floating point constant

Re: [go-nuts] feature request: allow literal digit underscore grouping

2016-06-22 Thread Andy Balholm
The same is true of brace styles :-P. But my point is that by not allowing digit grouping, Go avoids style debates on that issue. The grouping could have been standardized with gofmt, but as it is, it is standardized by the compiler to a format that is universally understood (no grouping). And

Re: [go-nuts] feature request: allow literal digit underscore grouping

2016-06-22 Thread Bakul Shah
That can be dealt with an output format. Just as the hex or octal or the "e" input format is lost. With respect to the "e" notation Go seems to be an exception. Perhaps the sole one? Other prog languages I have used treat eas a floating pt. even in Go there is a slight inconsistency: 1e6 is an

Re: [go-nuts] feature request: allow literal digit underscore grouping

2016-06-22 Thread Jan Mercl
On Wed, Jun 22, 2016 at 5:27 PM Andy Balholm wrote: > Actually, the mention of gofmt brings up the issue of consistent formatting. If underscores in numbers were allowed, gofmt should automatically insert them for all numbers over a given length, and remove them for shorter numbers. The grouping

Re: [go-nuts] feature request: allow literal digit underscore grouping

2016-06-22 Thread Andy Balholm
Actually, the mention of gofmt brings up the issue of consistent formatting. If underscores in numbers were allowed, gofmt should automatically insert them for all numbers over a given length, and remove them for shorter numbers. Otherwise it would just be another opportunity for inconsistency,

Re: [go-nuts] feature request: allow literal digit underscore grouping

2016-06-22 Thread Michael Jones
Sorry, I sent that too soon. One argument against underscores in numbers and other discardable syntax is the tooling in Go to parse and regenerate go code, as in gofmt. It may be more complicated to keep the “original input format” around and that is a pretty good argument—unless that is alrea

Re: [go-nuts] feature request: allow literal digit underscore grouping

2016-06-22 Thread Michael Jones
> https://github.com/golang/go/issues/42 Michael Jones michael.jo...@gmail.com > On Jun 22, 2016, at 7:29 AM, Roger Pack wrote: > > Could you drop me a link to the discussion by chance? Seems this > feature is actually a reasonably common request :) -- You received this message because you ar

Re: [go-nuts] Re: Go 1.6.1 Link problem on Windows:

2016-06-22 Thread Roger Pack
FWIW this is not a failure, just a double define... and if the problem is in mingw-w64 then it won't be fixed in golang any version of course, though I'm not sure if that's the case or not. Cheers! On Wed, Jun 22, 2016 at 6:24 AM, wrote: > I am having the same issues with go1.6.2... I also tried

Re: [go-nuts] feature request: allow literal digit underscore grouping

2016-06-22 Thread Roger Pack
Could you drop me a link to the discussion by chance? Seems this feature is actually a reasonably common request :) On Tue, Jun 21, 2016 at 12:47 PM, Michael Jones wrote: > I asked for this a while back ("drop underscore between digits as in Ada") > and the answer was no. I try to ask just once.

Re: [go-nuts] Re: Goroutines vs OS threads

2016-06-22 Thread Tu Pham Anh
Thank you very much for your response, I think that at abstract level it is true. When we go into more detail, we will that GO optimize to have Routine context ( that some kind of Thread context), I think that at the conception level it some kind of yeild (conception ) to start to GORoutine. B

Re: [go-nuts] feature request: allow literal digit underscore grouping

2016-06-22 Thread Ian Lance Taylor
On Wed, Jun 22, 2016 at 6:50 AM, Manlio Perillo wrote: > On Wed, Jun 22, 2016 at 3:35 PM, Henrik Johansson > wrote: >> Really? > > Yes. > The problem is that many people coming from C like languages may > incorrectly assume that i is a floating point number. This doesn't strike me as a good rea

Re: [go-nuts] Re: Goroutines vs OS threads

2016-06-22 Thread Konstantin Khomoutov
On Wed, 22 Jun 2016 00:34:56 -0700 (PDT) tu.p...@zalora.com wrote: > I think that the idea of Goroutine come from > [https://en.wikipedia.org/wiki/Coroutine], This is hardly true: coroutines imply cooperative scheduling, where each coroutine explictly relinquishes control to some other coroutine

Re: [go-nuts] feature request: allow literal digit underscore grouping

2016-06-22 Thread Manlio Perillo
On Wed, Jun 22, 2016 at 3:35 PM, Henrik Johansson wrote: > Really? Yes. The problem is that many people coming from C like languages may incorrectly assume that i is a floating point number. Manlio > I find that counting digits in large numbers is harder, for me at > least, than expected. The

Re: [go-nuts] Re: A proposal for generic in go

2016-06-22 Thread 'Axel Wagner' via golang-nuts
On Wed, Jun 22, 2016 at 2:55 PM, Viktor Kojouharov wrote: > > And yet the 'K' and 'V' within the struct are generic types. A struct is > never simple. That's its whole point. > I don't know what you mean by that. A struct is very simple, it's flat data. > A lot of these 'applications' that you

Re: [go-nuts] feature request: allow literal digit underscore grouping

2016-06-22 Thread Henrik Johansson
Really? I find that counting digits in large numbers is harder, for me at least, than expected. The scientific notation is sweet. On Wed, Jun 22, 2016, 14:57 Manlio Perillo wrote: > Il giorno martedì 21 giugno 2016 18:35:13 UTC+2, Caleb Spare ha scritto: >> >> This was shut down without much dis

Re: [go-nuts] How to hide command line argument from ps

2016-06-22 Thread Sean Russell
On Tuesday, June 21, 2016 at 9:56:21 PM UTC-4, Lazytiger wrote: > Thanks for all the replies. I agree that there is a better way to do the > security jobs. I ask this question just for curiosity, to find out if there > is a equivalence way to do this in golang. From all the replies I assume > th

[go-nuts] [ANN] reform, a better ORM, reaches v1, moves to gopkg.in

2016-06-22 Thread Alexey “AlekSi” Palazhchenko
Hi, reform, an ORM based on non-empty interfaces, code generation, and initialization-time reflection, reached version 1. Code moved to https://github.com/go-reform/reform, and canonical import path now is gopkg.in/reform.v1. Expect new releases to be tagged, with proper changelogs, and SemVer

Re: [go-nuts] Re: A proposal for generic in go

2016-06-22 Thread Andrew Mezoni
>> The fact still remains that unlike a lot of other proposed languages additions that are immediately dropped, generics are still open for discussion by the language developers themselves. I think that the problerm only in the Go developers brcause them even does try to implement them experim

[go-nuts] Re: A proposal for generic in go

2016-06-22 Thread Sean Russell
On Tuesday, June 21, 2016 at 10:29:37 AM UTC-4, Henry wrote: > You still haven't provided any argument why generics is indispensable. That can't be the litmus for language feature inclusion; if it was, Go would resemble ASM. In my personal experience, something North of 50% of my non-trivial

Re: [go-nuts] Re: A proposal for generic in go

2016-06-22 Thread Egon
On Wednesday, 22 June 2016 15:32:53 UTC+3, Andrew Mezoni wrote: > > >> The version without generics is necessary to compare how well a > particular generics approach improves the current language and code. > > I am sorry but this is obviously that any useful feature (in the context > of solving p

Re: [go-nuts] feature request: allow literal digit underscore grouping

2016-06-22 Thread Manlio Perillo
Il giorno martedì 21 giugno 2016 18:35:13 UTC+2, Caleb Spare ha scritto: > > This was shut down without much discussion at > https://github.com/golang/go/issues/42. > > I agree that it's a nice feature. > > By the way, though, one nice aspect of Go is that because of how > untyped constants wor

Re: [go-nuts] Re: A proposal for generic in go

2016-06-22 Thread Viktor Kojouharov
On Tuesday, June 21, 2016 at 9:56:01 PM UTC+3, Axel Wagner wrote: > > The issue is, that a "KeyValuePair" (no matter if you implemented it > via generics or like you mention via interfaces) is a fundamentally useless > type and generics encourage people to add useless types. A "KeyValuePair V>"

[go-nuts] Re: A proposal for generic in go

2016-06-22 Thread Viktor Kojouharov
https://golang.org/pkg/math/ and https://golang.org/pkg/container/ are just two stdlib packages that would greatly benefit from some kind of generics. I'm pretty sure there are more packages in the stdlib that would be greatly improved. And that's just the standard library. On Tuesday, June 21

Re: [go-nuts] specific file cannot build

2016-06-22 Thread indev
Thank you very much. I understand that _arm.go file means DO BUILD ONLY ARM PROCESSOR. 2016년 6월 22일 수요일 오후 9시 39분 25초 UTC+9, Jan Mercl 님의 말: > > On Wed, Jun 22, 2016 at 2:32 PM > wrote: > > > How this "magic" can be occurred? > > The magic is described here: > https://golang.org/pkg/go/build/

Re: [go-nuts] specific file cannot build

2016-06-22 Thread Jan Mercl
On Wed, Jun 22, 2016 at 2:32 PM wrote: > How this "magic" can be occurred? The magic is described here: https://golang.org/pkg/go/build/#hdr-Build_Constraints -- -j -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this gr

Re: [go-nuts] Re: Go 1.6.1 Link problem on Windows:

2016-06-22 Thread Dorival Pedroso
oh, bad news... I was expecting this to be fixed in 1.7... On Wed, Jun 22, 2016 at 10:33 PM wrote: > I am having the same issues with go1.6.2... I also tried go1.7beta2 with > no luck. > C:\Go\pkg\tool\windows_amd64\link.exe: running gcc failed: exit status 1 > > c:/program files/mingw-w64/x86_6

[go-nuts] Re: Go 1.6.1 Link problem on Windows:

2016-06-22 Thread saurabh . deoras
I am having the same issues with go1.6.2... I also tried go1.7beta2 with no luck. C:\Go\pkg\tool\windows_amd64\link.exe: running gcc failed: exit status 1 c:/program files/mingw-w64/x86_64-4.8.1-posix-seh-rt_v3-rev2/mingw64/bin/../ lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/li

[go-nuts] Re: Goroutines vs OS threads

2016-06-22 Thread tu . pham
I think that the idea of Goroutine come from [https://en.wikipedia.org/wiki/Coroutine], the number of Goroutines are mapped to OS Threads. In my own opinion, Go maintain the Thread pool and task queue to dispatch the job. This pattern has been implemented in some modern JEE container. Hope that

[go-nuts] specific file cannot build

2016-06-22 Thread indev
Hi. I have a question about relation between building source code and its filename. When I try to build with *store_arm.go* file, I cannot build(compiler ignore this file). But after *just change filename of same source code*, it is built. How this "magic" can be occurred?

[go-nuts] Re: ANN: GoFlow - Flow-based programming package for Go

2016-06-22 Thread liewjoee
Hello Vladimir, Is there any further developement on goflow? I see that it has last updated since Nov 7, 2015. Are there any further intergration in goflow with noflo-ui? On Tuesday, February 14, 2012 at 4:18:23 AM UTC+10:30, Vladimir Sibirov wrote: > > I'm glad to announce GoFlow package: >

Re: [go-nuts] Re: A proposal for generic in go

2016-06-22 Thread Andrew Mezoni
>> The version without generics is necessary to compare how well a particular generics approach improves the current language and code. I am sorry but this is obviously that any useful feature (in the context of solving problems) improves the current language and code. Another question: how new

Re: [go-nuts] Getting a pointer in a type switch gives a *interface {} if case lists several options

2016-06-22 Thread Marvin Renich
* raidopah...@gmail.com [160621 18:02]: > I have encountered some unexpected and inconsistent behavior with type > switches. Can someone shed some light as to why Go behaves this way? > > Take a look at https://play.golang.org/p/YPV5YPtWF8 > > I would expect both of the switches to behave the s

Re: [go-nuts] Re: A proposal for generic in go

2016-06-22 Thread Egon
On Wednesday, 22 June 2016 13:02:20 UTC+3, andrew...@gmail.com wrote: > > >> You are not bringing anything new to the table here, except the attempt > to insult my intelligence, apparently. >> >> > I do not have any claims to anyone personally. > I only defend my own point of view. > > P.S. > >

Re: [go-nuts] Re: A proposal for generic in go

2016-06-22 Thread andrew . mezoni
>> You are not bringing anything new to the table here, except the attempt to insult my intelligence, apparently. > > I do not have any claims to anyone personally. I only defend my own point of view. P.S. Also I don't love to see or use some (not my own) code which written like a mess. If I ca

Re: [go-nuts] Re: A proposal for generic in go

2016-06-22 Thread 'Axel Wagner' via golang-nuts
You are not bringing anything new to the table here, except the attempt to insult my intelligence, apparently. There are huge software projects out there written in languages that are less type safe than go and the vast majority of code written is not reusable. Both also aren't absolutes. There is

[go-nuts] Re: windows gamepad access

2016-06-22 Thread Egon
On Wednesday, 22 June 2016 07:36:56 UTC+3, rbi...@cox.net wrote: > > Hi all, > I'm just getting started with Go and, for various reasons, want to run > under Windows 10. I need to read a gamepad (x360) which is read by a > Windows hid driver. I can't find any posts here or elsewhere that g

Re: [go-nuts] Re: A proposal for generic in go

2016-06-22 Thread andrew . mezoni
>> And my point is and was: It doesn't *need* to be both type safe *and* reusable, unless you are focusing your energy on writing frameworks or treating type safety as a goal solely for it's own sake. It does NEED to be BOTH type safe and reusable. 1. Type safety prevent the programmers to make

Re: [go-nuts] Re: A proposal for generic in go

2016-06-22 Thread Egon
As a general suggestion: Do not use fabricated examples, use concrete real-world examples. Fabricated examples make harder to examine the practical side of generics -- i.e. how would you solve a particular problem with/without generics. The fabricated examples can suggest a problem where there

Re: [go-nuts] Re: A proposal for generic in go

2016-06-22 Thread andrew . mezoni
Sorry for typo and possible spam but correct example here: type Foo interface { Get(key K) V Set(key K, val V) } func foo() (int, Foo) { // Typo: foo := &Foo{} foo := &fooStruct{} // ... foos := []Foo{} // ... k := "London" // ... return 55, foo2(foos, 55, k) } // This code is

Re: [go-nuts] Re: A proposal for generic in go

2016-06-22 Thread 'Axel Wagner' via golang-nuts
And my point is and was: It doesn't *need* to be both type safe *and* reusable, unless you are focusing your energy on writing frameworks or treating type safety as a goal solely for it's own sake. It's perfectly fine to write small stuff yourself (for example like this) with explicit types and it'

Re: [go-nuts] Re: A proposal for generic in go

2016-06-22 Thread andrew . mezoni
>> perfectly type safe. Perfectly type safe but not perfectly reusable. What If we slightly complicate the task? Now is my code and I want to see on your code exampe (perfectly type safe but and perfectly reusable) type Foo interface { Get(key K) V Set(key K, val V) } func foo() (int, Foo)

Re: [go-nuts] go get failing In Mac 10.11.4

2016-06-22 Thread Debraj Manna
Thanks Krzysztof that was the issue. For cloning the repo I used:- git clone https://github.com/jabong/florest/ So in mac my code checked out in a directory florest. But the actual repo name was https://github.com/jabong/floRest/ and in code it was referenced as floRest which was causing the issu

Re: [go-nuts] How to hide command line argument from ps

2016-06-22 Thread Manlio Perillo
It is possible to change the command line arguments, but how you do it is simply platform specific. You can look at how Nginx or PostgreSQL do it, just to name a few programs that need to change the command line to help user identity the role of each child process. Manlio Il giorno mercoledì 2

Re: [go-nuts] Re: A proposal for generic in go

2016-06-22 Thread 'Axel Wagner' via golang-nuts
I don't know what you are doing, here, but… func some() string { foo := struct{ Key string, Value int }{} // some code // compie error: Can't use foo.Key (type string) as int acceptInt(foo.Key) // compile error: mismatched types string and int if foo.Key == foo.Value {