[go-nuts] Re: Oden Language 0.3.0 released

2016-06-13 Thread Tyler Compton
I believe it does, thank you. If I understand you correctly, Oden is to the Go community a bit like what Scala is to the Java/JVM community. On Sunday, June 12, 2016 at 3:17:15 PM UTC-7, Oskar Wickström wrote: > > Glad you like it! :) > > The latter suggestion fits the goals of Oden better. It

Re: [go-nuts] A question about passing arguments to closure

2016-06-13 Thread Henry
In "go func(int) { fmt.Println(i)}(i)", 'i' is passed as an argument, but it is not used. 'fmt.Println(i)' uses the variable 'i' that is inherited from the parent function, because 'i' is not defined by the function func(int) as an argument and the next available 'i' is the one inherited from

Re: [go-nuts] goxpath: An XPath 1.0 parser

2016-06-13 Thread Henrik Johansson
How does it compare to https://godoc.org/launchpad.net/xmlpath? I have been using it with great satisfaction but it is not complete to my knowledge xpath feature wise. mån 13 juni 2016 kl 01:48 skrev Chris Trenkamp : > https://github.com/ChrisTrenkamp/goxpath > > I've

[go-nuts] Re: [ANN] primegen.go: Sieve of Atkin prime number generator

2016-06-14 Thread alb . donizetti
> Current versions of golang are not as fast as GCC C/C++ optimized code by at least a factor of two This is, in general, not true at all: I've written numeric code as fast as C code compiled by GCC -O3 Il giorno martedì 14 giugno 2016 14:31:18 UTC+2, gordo...@gmail.com ha scritto: > > That's

[go-nuts] Is it possible to upload golang application to Mac App store?

2016-06-14 Thread liudan king
I developed an application that displays a icon in status bar to show network speed. I have packaged it to a standard mac app package (ns.app and ns.dmg) using command *codesign* and *appdmg.* The problem is that, when I try to upload it to app store using Application Loader, the loader can't

[go-nuts] [ANN] jsonmon 2.0.11

2016-06-14 Thread Vasily Korytov
jsonmon is a simple but powerful monitoring and alerting system. It has only two types of checks: shell and Web. More details at https://github.com/chillum/jsonmon/wiki Today the version 2.0.11 is released, it is a bug fix for the previous optimization release. Versions prior to 2.0.9 were

[go-nuts] Re: Save to store encryption key in Go executable?

2016-06-14 Thread Evan Digby
Unfortunately there's a reason why password managers still require a passphrase. It's simply not secure to store the key anywhere near the secure files. I'm not saying password managers are perfect--they have their own security issues--but it seems that you're attempting to closely mimic that

[go-nuts] How to properly get basename under DOS?

2016-06-14 Thread Tong Sun
I thought to get basename, we should use the official *path.Base* -- https://golang.org/pkg/path/#Base However, I just found out that it is *not working under DOS* -- https://play.golang.org/p/kfr0N50JWc package main import ( "fmt" "path" ) func main() { fmt.Println(path.Base("/a/b.c"))

Re: [go-nuts] How to properly get basename under DOS?

2016-06-14 Thread Jan Mercl
Package path is for *nix paths only. import "path/filepath" instead. On Tue, Jun 14, 2016, 18:55 Tong Sun wrote: > I thought to get basename, we should use the official *path.Base* -- > https://golang.org/pkg/path/#Base > > However, I just found out that it is *not working

Re: [go-nuts] Bitmasks on signed types

2016-06-14 Thread Rob Pike
Please read blog.golang.org/constants. -rob On Tue, Jun 14, 2016 at 10:47 AM, Jan Mercl <0xj...@gmail.com> wrote: > The untyped integer constant 0x represents a positive number not > representable by any int32 value. > > > On Tue, Jun 14, 2016, 19:45 Dave MacFarlane

[go-nuts] Re: Loading X509 Key Pair with invalid Certificate

2016-06-14 Thread Chris Johnson
Figured this out and wanted to reply in case anyone else hits it. Apparently the latest Ubuntu images on DockerHub (14.04.04) do not have the latest cert files baked into them. https://github.com/docker/docker/issues/5157 I just added the following to the Dockerfile that builds this

Re: [go-nuts] How to properly get basename under DOS?

2016-06-14 Thread Tong Sun
Like this? -- https://play.golang.org/p/jhK-vmmmdH package main import ( "fmt" "path/filepath" ) func main() { fmt.Println(filepath.Base("/a/b.c")) fmt.Println(filepath.Base(`C:\Program Files\Microsoft Visual Studio 9\Common7\IDE\devenv.exe`)) } The output is still exactly the same as

RE: [go-nuts] How to properly get basename under DOS?

2016-06-14 Thread John Souvestre
> Package path is for *nix paths only. import "path/filepath" instead. When should path be used? Or should it be deprecated in favor of path/filepath? John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of Jan

Re: [go-nuts] How to properly get basename under DOS?

2016-06-14 Thread Ian Lance Taylor
On Tue, Jun 14, 2016 at 10:00 AM, Jan Mercl <0xj...@gmail.com> wrote: > Package path is for *nix paths only. import "path/filepath" instead. I agree that path/filepath is what you want, but I would say it slightly differently. path is for what you find inside URLs, path/filepath is for paths in

[go-nuts] Bitmasks on signed types

2016-06-14 Thread Dave MacFarlane
Is this supposed to be legal in Go: var x int32 = 3 fmt.Printf("%d", x & 0x)? The language spec just says the bitwise operator "applies to integers only" and "yields a result of the same type as the first operand" that I can see, but it's giving me a compiler error: ./main.go:10:

[go-nuts] Re: Save to store encryption key in Go executable?

2016-06-13 Thread Haddock
Thanks for all the useful answers. All I want to do is to create an encryption program for simple home computing purposes. I once lost some encrypted files, because I lost the password. I think I did a typo when typing it in and didn't realize. So I thought I write my own encryption programm

Re: [go-nuts] Bitmasks on signed types

2016-06-14 Thread Matt Harden
Consider coercing them to int64, multiply, then shift and coerce back to Int26_6. I suspect that would be faster than splitting with shifts and ANDs, two int32 multiplies, shift and add. On Tue, Jun 14, 2016, 11:42 Dave MacFarlane wrote: > I'm not actually trying to do x &

Re: [go-nuts] Bitmasks on signed types

2016-06-14 Thread Dave MacFarlane
I'm not actually trying to do x & -1, that would be pointless, as you say. It was just the easiest way to demonstrate the behaviour that I didn't understand in a minimal way. I understand the problem now--I was thinking of 0x as a prefix representing a bitmask when used as a constant with a

Re: [go-nuts] Bitmasks on signed types

2016-06-14 Thread Michael Jones
I have fought this many times. What I almost always do is cast all variables involved as unsigned so that I can express the logical operations as desired. The exception is right shift which must be signed if the expected outcome for signed values is to happen. On Tue, Jun 14, 2016 at 1:08 PM,

Re: [go-nuts] Hi! I'm happy to announce the very first release of *nexer* 1.0.0b simple and easy to use and extend content based network multiplexer

2016-06-15 Thread Konstantin Khomoutov
On Tue, 14 Jun 2016 17:29:33 -0700 (PDT) Diego Cena wrote: > *nexer* is a simple and easy to use and extend content based network > multiplexer (or redirector) Could you please explain to the uninitiated in a couple of words what the heck "content-based network

Re: [go-nuts] Re: broadcasting on a set of channels

2016-06-15 Thread Ian Lance Taylor
On Tue, Jun 14, 2016 at 10:15 PM, wrote: > > What happens if the channel closes? > > I'm thinking about maintaining a list of channels (one for each websocket > client), then sending a message to all of them. The only problem is that > when the websocket client disconnects,

[go-nuts] [ANN] GopherPit.com - service to manage remote import paths

2016-06-15 Thread Janoš Guljaš
Hello all, I would like to announce GopherPit [0], a web service to serve and manage go-import and go-source HTML meta tags. [1] That is the base functionality, but it supports custom domains, subdomains under gopherpit.com, automatic TLS certificate generation from Let’s Encrypt, team management

Re: [go-nuts] Hi! I'm happy to announce the very first release of *nexer* 1.0.0b simple and easy to use and extend content based network multiplexer

2016-06-15 Thread Diego Cena
Sure Konstantin! It means you can route network traffic based on transmitted content. A minimalistic example is the ur ltunnel type. :-) On Wednesday, June 15, 2016 at 7:58:36 AM UTC-3, Konstantin Khomoutov wrote: > > On Tue, 14 Jun 2016 17:29:33 -0700 (PDT) > Diego Cena

Re: [go-nuts] Re: Golang Grep

2016-06-15 Thread ToSuNuS
Hi Steven, I want to use a word that the data from this function. for example; f := func() { grep(flag.Arg(0), flag.Arg(1)) } if f == "domain.com" { } or handle := exec.Command("echo", string(f[1])).Output() Examples of these subject. My purpose is to convert the string. Regards. On

[go-nuts] Re: polymorphism (for Go 2.0), new fast playground is live

2016-06-13 Thread adamw
I'd like to see changes to the standard library. Things that many people agree should be fixed but thwarted by go1 compat. The list is long and this mailing list is riddled with them. Possibly weeding out the standard library, kicking stuff to /x/. I'd provide generics through preprocessors

[go-nuts] Proposal: extend the "don't care" value to more uses

2016-06-13 Thread oli . gagnon4418
consider func Foo(a int, b string, x SomeStruct) It would be nice if it was possible to pass in the "don't care" value, a.k.a. "_" as one of the argument, as an alias for the default value of the type. pkg.Foo(a, b, _) This way if the user knows he doesn't care about the last value and

[go-nuts] Re: curious problem implementing RGB565 image

2016-06-13 Thread Dan Kortschak
Yes, that explains it. The simple summary is that I forgot the r,g,b,a are 16bit and was working with them as 8bit. This is why the image.RGBA worked, but the png decoded image did not - image.RGBA returned c|c<<8 for each channel, so the error was masked by having the low byte mimic the high

Re: [go-nuts] Re: Better sum types for go

2016-06-13 Thread as . utf8
Thanks! On Monday, June 13, 2016 at 3:27:51 AM UTC-7, Jesper Louis Andersen wrote: > > > On Mon, Jun 13, 2016 at 1:58 AM, wrote: > >> What research or other literature can you recommend on the topic of type >> theory? > > > Benjamin C. Pierce's "Types and Programming

[go-nuts] Re: How to get executed query string after execution.

2016-06-13 Thread Harry
Hi Dave, Now, I'm developping cache system of query result to redis or another key-value store. Stored data are supposed that seriarized result of query using key serialized query string exected actually. Harry 2016年6月14日火曜日 10時23分25秒 UTC+9 Dave Cheney: > > If there was a way to get the

Re: [go-nuts] Bitmasks on signed types

2016-06-15 Thread 'Keith Randall' via golang-nuts
I do x & (0x - 1<<32). On Tuesday, June 14, 2016 at 1:44:14 PM UTC-7, Michael Jones wrote: > > I have fought this many times. > > What I almost always do is cast all variables involved as unsigned so that > I can express the logical operations as desired. The exception is right > shift

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

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

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] 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.

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

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

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. >

[go-nuts] Treeless: distributed NoSQL key-value DB written in Go

2016-06-21 Thread David M.
Hi, I've just released Treeless (https://github.com/dv343/treeless), a new distributed NoSQL key-value DB written in Go. I have been focused on performance and simplicity and I think I have achieved good results. For example, Get performance is 20% slower compared to Redis, but Set

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

2016-06-21 Thread Micky
I guess that's for diplomatic reasons. If you watch talks of core contributors then I believe you'll know what I mean :) On Tue, Jun 21, 2016 at 5:15 AM, Rodrigo Kochenburger wrote: > Micky, I'm not sure where you're quoting from but they never said it's never > gonna happen. >

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

2016-06-21 Thread Jan Mercl
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 gopher and sent it to us. Hi Andrew, is / will be there be some public output of your little

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

2016-06-21 Thread Egon
On Monday, 20 June 2016 18:02:53 UTC+3, blue...@gmail.com wrote: > > > > > I am attempting to generate a random starfield, in go. This is something > that will need to

Re: [go-nuts] [ANN] primegen.go: Sieve of Atkin prime number generator

2016-06-21 Thread alb . donizetti
> Do you plan to include SSA for the x86 version as well? For an answer to this: yes, it seems like the plan is to port every supported architecture to SSA. It was discussed here: https://groups.google.com/d/msg/golang-dev/fSIl5Sbr4ek/10sgOsnDEAAJ Il giorno martedì 21 giugno 2016 03:39:41

[go-nuts] go get failing In Mac 10.11.4

2016-06-21 Thread DM
Hi On Mac OS X 10.11.4 *go get* is failing with the below error. jabongs-MacBook-Pro-4:florest debraj$ go get ./... go install github.com/jabong/florest/src/common/config: open /var/folders/lp /3q9_2mn51hd9s4yj_jcf3jxmgp/T/go-build823644730/github.com/jabong/ florest/src/common/config.a: no

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

2016-06-21 Thread Henry
I am not saying that generics is bad, but I am questioning whether generics is necessary. On Tuesday, June 21, 2016 at 3:45:08 PM UTC+7, andrew...@gmail.com wrote: > >> I was one of the generics supporters for Go in this forum, but now I am > not so sure. > > But why? > Generic types is the

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

2016-06-21 Thread Egon
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: >> >> >> >> >> I am attempting to generate

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

2016-06-21 Thread andrew . mezoni
>> I was one of the generics supporters for Go in this forum, but now I am not so sure. But why? Generic types is the same types as and the regular types. Difference only in that the regular types does not have a parameters but generic types are always have at least one parameter. This is why

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

2016-06-21 Thread Krzysztof Kowalczyk
My guess is that's because Mac filesystem is case preserving but not case-sensitive, meaning that in mac os "floRest" and "florest" is the same file/directory while on linux those are 2 distinct files. (you can configure mac filesystem to be case-sensitive as well, but that's not the default).

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

2016-06-21 Thread Matt Ho
I think I have to agree with most of the posters here about generics. In theory, I miss them. However, in practice, I find that there are usually only a few times during the course of a project where I wish I had generics. And then after writing a few lines of code to do what the generic

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

2016-06-21 Thread Hoping White
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 there is a no. > 在 2016年6月21日,下午10:39,Matt Harden

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()

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

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 := {} // ... foos := []Foo{} // ... k := "London" // ... return

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

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

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

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 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).

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

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

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

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: >

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

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

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 > >

[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: 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

[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] 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

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

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

[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] 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 >

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

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] 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.

[go-nuts] Getting a lot of i/o timeouts in Go 1.4

2016-06-16 Thread Mayank Jha
I am trying to run a large number of tcp connects https://play.golang.org/p/lNGWD-q028. However I am getting a lot of i/o timeouts. Is this a know issue, or I am missing something. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe

Re: [go-nuts] Re: [ANN] primegen.go: Sieve of Atkin prime number generator

2016-06-16 Thread gordonbgood
No real surprises with the no bounds checks option (-B), it just eliminated the array bounds checks with the rest of the code the same (version 1.7beta1): 0x00dd 00221 (main.go:37) MOVQDI, CX 0x00e0 00224 (main.go:37) SHRQ$5, DI 0x00e4 00228

Re: [go-nuts] [ANN] Mirror of Go SSA

2016-06-15 Thread JW Bell
>>I have to say that I don't see a big benefit to mirroring a github repo on github itself. There isn't another way to use the ssa package. On Tuesday, June 14, 2016 at 10:15:19 PM UTC-7, Ian Lance Taylor wrote: > > On Tue, Jun 14, 2016 at 7:07 PM, wrote: > > Mirror of the

Re: [go-nuts] Re: Is syscall.Mmap broken? Or am I?

2016-06-14 Thread Dave Mazzoni
Wow. You all are incredible -- your suggestion nailed it. Now I'm getting: ./peekgo 0x43c0 mem[0]:0x3020100mem[1]:0x7060504mem[2]:0xb0a0908 mem[3]:0xf0e0d0c ... which is PERFECT. Thanks! On Tue, Jun 14, 2016 at 6:05 PM, Ian Lance Taylor wrote: > On Tue,

[go-nuts] Hi! I'm happy to announce the very first release of *nexer* 1.0.0b simple and easy to use and extend content based network multiplexer

2016-06-14 Thread Diego Cena
*nexer* is a simple and easy to use and extend content based network multiplexer (or redirector) made with love and golang. Binaries: https://github.com/diegohce/nexer/releases/latest Source : https://github.com/diegohce/nexer

Re: [go-nuts] Re: Is syscall.Mmap broken? Or am I?

2016-06-14 Thread Dave Mazzoni
You're too kind. Now I don't feel like an idiot. Thanks again. On Tue, Jun 14, 2016 at 6:17 PM, Dave Cheney wrote: > It helps if you've hit the same issue before :) > > On Wed, Jun 15, 2016 at 8:14 AM, Dave Mazzoni wrote: > > Wow. You all are incredible --

[go-nuts] Re: Getting a lot of i/o timeouts in Go 1.4

2016-06-16 Thread Mayank Jha
Tried with Go 1.5, the problem persists. And the IP I gave was for showing purposes. I actually used an IP of a node which is a part of a closed network, and ran it from another node in the same network. On Thursday, June 16, 2016 at 1:44:56 PM UTC+5:30, Dave Cheney wrote: > > Go 1.4 isn't

Re: [go-nuts] Re: Golang Error - When marshelling data

2016-06-16 Thread Konstantin Khomoutov
On Thu, 16 Jun 2016 04:55:41 -0700 (PDT) User123 wrote: > Is it giving error since it has null values? > > I'm just not able to get it. Since this code works perfectly fine in > 1.4.2 A wild guess: 1) Your error message is: json: unsupported type: <-chan struct

Re: [go-nuts] caching of cgo compilation

2016-06-16 Thread Rob Pike
If you're testing a binary, go install will overwrite the installed version, which is usually not what you want. In that case, go build makes sense. -rob On Thu, Jun 16, 2016 at 1:17 AM, Dave Cheney wrote: > I don't understand why that flag even exists, if feels like a

[go-nuts] Re: Golang Error - When marshelling data

2016-06-16 Thread User123
Is it giving error since it has null values? I'm just not able to get it. Since this code works perfectly fine in 1.4.2 On Thursday, June 16, 2016 at 4:08:38 PM UTC+5:30, User123 wrote: > > I cannot provide the full code sincethere are some dependencies. > > I did fmt.println on the data that I

[go-nuts] Re: Getting a lot of i/o timeouts in Go 1.4

2016-06-16 Thread Dave Cheney
Have you adjusted th number of file descriptors available to your program, and the server you are connecting to? Have you used another program to verify that your target can handle the number of connections you are making? -- You received this message because you are subscribed to the Google

[go-nuts] Re: How to manage a web portal with multiple services without stopping and restarting everything at each release/fix?

2016-06-17 Thread Simon Ritchie
This is not a question about Go, but basic web infrastructure. However, it's one of those "best practice" questions which "everybody knows the answer to" and so you may be hard put to find out more without knowing where to start. First of all, I should point out that when you tweak your PHP

Re: [go-nuts] Re: [ANN] primegen.go: Sieve of Atkin prime number generator

2016-06-17 Thread
On Friday, June 17, 2016 at 2:30:12 AM UTC+2, gordo...@gmail.com wrote: > > > Modern x86 CPUs don't work like that. > > > In general, optimally scheduled assembly code which uses more registers > has higher performance than optimally scheduled assembly code which uses > smaller number of

Re: [go-nuts] Re: [ANN] primegen.go: Sieve of Atkin prime number generator

2016-06-17 Thread gordonbgood
I don't see the point of the exercise other than it proves that not putting the result of an operation back into the same register reduces the latency slightly for your processor (whatever it is?); I suspect that if you used any other register such as the unused AX register rather then the R11

[go-nuts] Re: Currying in Go

2016-06-17 Thread paraiso . marc
What is the point of doing that in a language that doesn't support auto currying ? There is none. You are not currying anything by the way, you just wrote 3 closures. Le vendredi 17 juin 2016 00:00:43 UTC+2, Zauberkraut a écrit : > > Hello, > > Go enables the evaluation of functions using

[go-nuts] Re: How to manage a web portal with multiple services without stopping and restarting everything at each release/fix?

2016-06-17 Thread Romano
Hi Tamás, thanks, I will have a look. I guess and hope that this is what I need. @Simon: thanks for the response with so many details. I have been working for years for projects with load balancers, HA, disaster recovery sites, and so on so your detailed answer can be really helpful to

[go-nuts] Re: Go 1.7 Beta 2 is released

2016-06-17 Thread paraiso . marc
Thanks, is there a way to know what to expect in later versions ( 1.8,1.9,1.10 and so forth ... ) ? Le vendredi 17 juin 2016 01:15:18 UTC+2, Chris Broadfoot a écrit : > > Hello gophers, > > We have just released go1.7beta2, a beta version of Go 1.7. > It is cut from the master branch at the

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

2016-06-21 Thread andrew . mezoni
>> I am not saying that generics is bad, but I am questioning whether generics is necessary. Please, do not panic. If you worry about the following things: - Generated code will grow when used generics - Generated code will be more complex when used generics - Execution performance will slow

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

2016-06-21 Thread Hoping White
Hi, all I wonder is there a way to hide command line arguments from programs like “ps”? I can rewrite argv parameter for main in c language, or use LD_PRELOAD to intercept libc_start_main, but all these methods do not be functional in go. Thanks. -- You received this message because you

Re: [go-nuts] Unmarshalling and tags

2016-06-21 Thread Nate Finch
I'd like to see something like this: type Payment struct { ActionType paypal.ActionType `xml,yaml,json:"actionType,omitempty"` ReceiverList paypal.ReceiverList `xml,yaml,json:"actionType,omitempty"` } -- You received this message because you are subscribed to the Google Groups

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

2016-06-21 Thread Ian Davis
On Tue, Jun 21, 2016, at 03:17 PM, andrew.mez...@gmail.com wrote: > >>increase in cognitive load to decipher chains of type definitions. > > Sorry, but who are members of this mail lists? > This is a first time when I hear about such loads such as the > `cognitive load`. > Also I am possible

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

2016-06-21 Thread Ian Davis
On Tue, Jun 21, 2016, at 01:45 PM, andrew.mez...@gmail.com wrote: > >>I am not saying that generics is bad, but I am questioning whether > >>generics is necessary. > > Please, do not panic. > If you worry about the following things: > - Generated code will grow when used generics > - Generated

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

2016-06-21 Thread Konstantin Khomoutov
On Tue, 21 Jun 2016 22:16:38 +0800 Hoping White wrote: > I wonder is there a way to hide command line arguments from > programs like “ps”? I can rewrite argv parameter for main in c > language, or use LD_PRELOAD to intercept libc_start_main, but all > these methods do not

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

2016-06-21 Thread andrew . mezoni
>> increase in cognitive load to decipher chains of type definitions. Sorry, but who are members of this mail lists? This is a first time when I hear about such loads such as the `cognitive load`. Also I am possible here a single person who does not know anything about the `cognitive load to

  1   2   3   4   5   6   7   8   9   10   >