[go-nuts] Re: golang.org/x/tools/go/loader: file names of parsed *ast.File

2016-08-13 Thread Paul Jolly
On Saturday, 13 August 2016 21:58:37 UTC+1, Paul Jolly wrote: > > Am I missing something obvious here? > Please excuse the reply to self, but I have discovered what I was missing. For the sake of completeness, here is how the equivalent mapping is achieved in golang.org/x/tools/go/loader world:

[go-nuts] Re: Who wants to use Go to process your camera's raw files?

2016-08-13 Thread 'Paul' via golang-nuts
On Saturday, August 13, 2016 at 8:06:44 PM UTC+2, Klaus Post wrote: > > On Saturday, 13 August 2016 17:18:16 UTC+2, Paul wrote: >> >> From what I gather even Adobe uses [dcraw]. >> > > I am pretty sure it is the other way around. Observing for years, it seems > like dc is reverse engineering th

[go-nuts] [ANN] benchttp: HTTP server benchmarking tool

2016-08-13 Thread Sina Siadat
Hi all, I created Benchttp as an alternative to ApacheBench (ab). The code is idiomatic and easy to understand (open an issue if you find something that could be improved). I queue the requests via a buffered channel to limit the number of concurrent requests, and send them in their own gorout

Re: [go-nuts] keyed vs unkeyed fields

2016-08-13 Thread Ian Lance Taylor
On Sat, Aug 13, 2016 at 12:06 AM, Anmol Sethi wrote: > Thing is, since keyed fields are almost always better, why were unkeyed > fields even allowed for struct literals? I see what you mean in your example, > but I think it would be simpler to only have unkeyed fields. > > Was it a mistake or is

[go-nuts] golang.org/x/tools/go/loader: file names of parsed *ast.File

2016-08-13 Thread Paul Jolly
Let's assume I have parsed some code via parser.ParserDir and get to the *ast.Package of interest. I can now range the Files field (type map[string]*ast.File), taking the key as the file path. With loader.PackageInfo

[go-nuts] Re: go mobile : keyboard input, camera

2016-08-13 Thread danilolr
About the camera I think you best hope is use NDK (c++ bindings to android functions). But you are out of luck as most of the links I search do not provide a solution. The best answer I find is this : http://stackoverflow.com/questions/30328276/access-android-camera-with-ndk Not tested, but I d

[go-nuts] Biometric login (webauthn) in Go, need help in verifying signature

2016-08-13 Thread ayngling
With the very recent Windows Anniversary update, Edge now supports biometric authentication using Windows Hello (cf. https://developer.microsoft.com/en-us/microsoft-edge/platform/documentation/dev-guide/device/web-authentication/ ) I have some samples in C#, PHP and Node.js, and am trying to ma

Re: [go-nuts] Small complete examples which show the power of Go?

2016-08-13 Thread as . utf8
It's shorter, but it's harder for me to grasp what it does as easily as the first example. On Wednesday, August 10, 2016 at 2:09:58 AM UTC-7, Anmol Sethi wrote: > > You can shorten that by 6 lines > > package main > > import "net/http" > > func main() { > http.ListenAndServe(":8080",

[go-nuts] Re: Who wants to use Go to process your camera's raw files?

2016-08-13 Thread 'Paul' via golang-nuts
I don't know what the true story actually is, however some camera hardware makers such as Nikon are giving software developers a tough time by intentionally obfuscating their metadata. A lot of folks had big problems with that including adobe. I just mentioned "reverse engineering" to indicate

Re: [go-nuts] Re: Who wants to use Go to process your camera's raw files?

2016-08-13 Thread Klaus Post
On Saturday, 13 August 2016 17:22:29 UTC+2, Peter Herth wrote: > > Having a parallel version of the raw converter could yield conversion > times far faster then the original C. And it would be a neat Go library to > have. > For the biggest part, I would not expect you to be able to beat C code,

Re: [go-nuts] Re: Who wants to use Go to process your camera's raw files?

2016-08-13 Thread Klaus Post
On Saturday, 13 August 2016 17:22:29 UTC+2, Peter Herth wrote: > > Dcraw seems to be only partially gpl > Just to be clear, it is a "do what you want" license with only the Foveon decoding being GPL v2 (the RESTRICTED part). I have reimplemented the Foveon code here: https://github.com/klauspo

[go-nuts] Re: Who wants to use Go to process your camera's raw files?

2016-08-13 Thread Klaus Post
On Saturday, 13 August 2016 17:18:16 UTC+2, Paul wrote: > > From what I gather even Adobe uses [dcraw]. > I am pretty sure it is the other way around. Observing for years, it seems like dc is reverse engineering the Adobe DNG Converter. His color conversion matrices are definitely from that, an

[go-nuts] Re: Who wants to use Go to process your camera's raw files?

2016-08-13 Thread Klaus Post
On Wednesday, 27 July 2016 04:36:31 UTC+2, Jonathan Pittman wrote: > > Well me too! I am looking to see what level of interest there is in the > Go community to see this happen. I am also looking for people who are > interested in working on this. > (a bit late to the party) I am the author o

Re: [go-nuts] Re: Who wants to use Go to process your camera's raw files?

2016-08-13 Thread Peter Herth
Dcraw seems to be only partially gpl - otherwise Adobe couldn't use it in its products. Having a parallel version of the raw converter could yield conversion times far faster then the original C. And it would be a neat Go library to have. Peter On Sat, Aug 13, 2016 at 5:18 PM, 'Paul' via golang-n

[go-nuts] Re: Who wants to use Go to process your camera's raw files?

2016-08-13 Thread 'Paul' via golang-nuts
DCRAW pretty much does it all. Its straight C under GPLv2. Dave Coffin reverse engineered a lot of stuff to get it to work. It would be a sizable duplication of effort to try to do all that again. From what I gather even Adobe uses his stuff. It should be possible to reference his code base in

[go-nuts] Re: Have some troubles with connection of delve + Visual Studio Code under my Mac

2016-08-13 Thread Dmitriy Suhinin
Problem seems to solved. Who interested in that check please my happy path - https://github.com/Microsoft/vscode-go/issues/429#issuecomment-239611053 пятница, 12 августа 2016 г., 22:32:32 UTC+3 пользователь Dmitriy Suhinin написал: > > I can't run debug mode under Visual Studio Code. Everything

[go-nuts] Re: context race

2016-08-13 Thread djadala
On Saturday, August 13, 2016 at 4:56:45 PM UTC+3, upad...@gmail.com wrote: > > Now given receiving on a closed channel never returns, above is not safe. > I can check inside my second case if ctx.Err() is non nil, but its not a > very clean solution. > > receiving on *nil* channel never return

[go-nuts] context race

2016-08-13 Thread Dave Cheney
Receiving from a closed channel immediately returns the channel types zero value. -- 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...@google

[go-nuts] context race

2016-08-13 Thread upadhyay
Say I have: func DoSomething(ctx context.Context) { for { select { case <- ctx.Done(): return case <- time.After(time.Second) // do something } } } Based on the documentation of context: Successive calls to Done return the sa

Re: [go-nuts] what is the meaning of ENV GOEXE

2016-08-13 Thread Andy Xie
​thanks. Just run `go env` and see it and is curious about it. === Ning Xie 2016-08-13 20:01 GMT+08:00 Anmol Sethi : > I looked in the Go source code. You can’t actually set it as a environment > variable. It’s the value of the executable suffix. It’s set automatically > in build.go. Like

[go-nuts] xDT encoder / decoder

2016-08-13 Thread Joe Blue
There is a full implementation in js, so there is a starting point. I can also provide test data of course. https://www.npmjs.com/package/xdt -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emai

[go-nuts] xDT encoder / decoder

2016-08-13 Thread Joe Blue
https://en.m.wikipedia.org/wiki/XDT xDT is a format used in the German health system for data transfer. There are some Java open source e implementations but I need a golang one. If anyone knows of this or have an interest in writing this please contact me. Happy to pay someone to do this for m

Re: [go-nuts] what is the meaning of ENV GOEXE

2016-08-13 Thread Anmol Sethi
I looked in the Go source code. You can’t actually set it as a environment variable. It’s the value of the executable suffix. It’s set automatically in build.go. Like if running on windows, it is '.exe’ or for c-archives it is ‘.a’. I don’t think it matters for an end user. > On Aug 13, 2016, a

[go-nuts] what is the meaning of ENV GOEXE

2016-08-13 Thread andyxning
when run `go env`, i get the following output: ``` GOARCH="amd64" GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/andy/Github/go" GORACE="" GOROOT="/usr/local/go" GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64" GO15VENDOREXPERIMENT="1" CC="clang" GOGCCFLAGS="-fP

Re: [go-nuts] Invoking Golang executable on Mac OS X

2016-08-13 Thread Justin Israel
Maybe wrap it with Automator into an app? On Sat, 13 Aug 2016, 5:52 AM wrote: > Maybe this is more OS related than Go, since Go just produces a static > executable, so please feel free to lock this. > > I've built a simple tool, it works just fine in the terminal, both as a > local executable an

Re: [go-nuts] keyed vs unkeyed fields

2016-08-13 Thread Anmol Sethi
Thing is, since keyed fields are almost always better, why were unkeyed fields even allowed for struct literals? I see what you mean in your example, but I think it would be simpler to only have unkeyed fields. Was it a mistake or is there a even better reason? > On Aug 12, 2016, at 10:12 PM, N