Re: [go-nuts] Underlying arrays and their slices passed to functions

2018-01-05 Thread Frank Davidson
Thanks, all!!! Frank On Friday, January 5, 2018 at 4:25:33 AM UTC-5, Ian Davis wrote: > > On Thu, 4 Jan 2018, at 6:55 PM, Frank Davidson wrote: > > Thanks!!! Very helpful blog post!! > > So, in proc, the slice header is copied, then an entirely new array is > created - []by

Re: [go-nuts] Underlying arrays and their slices passed to functions

2018-01-04 Thread Frank Davidson
original array? On Thursday, January 4, 2018 at 1:23:33 PM UTC-5, Jan Mercl wrote: > > On Thu, Jan 4, 2018 at 7:08 PM Frank Davidson > wrote: > > > I'm sure this has probably been answered before, but I have a question > about when a slice's underlying array is co

[go-nuts] Underlying arrays and their slices passed to functions

2018-01-04 Thread Frank Davidson
I'm sure this has probably been answered before, but I have a question about when a slice's underlying array is copied? In this code: https://play.golang.org/p/TnMFo-rYKzq package main import ( "fmt" ) func main() { out := []byte{1, 2, 3, 4} fmt.Println(out) proc(out) fmt.Println(out) proc2(o

[go-nuts] Re: Go Community Charity Work?

2017-12-29 Thread Frank Davidson
nally the > pharmaceutical industry may partially or completely already be doing > manufacturer-verifying barcodes. > > We need input from industry experts before proceeding. > > Matt > > On Thursday, December 28, 2017 at 12:34:08 PM UTC-6, Frank Davidson wrote: &g

[go-nuts] Re: Go Community Charity Work?

2017-12-28 Thread Frank Davidson
I saw this which seems to say using a QR code is freely allowed: http://www.qrcode.com/en/faq.html On Thursday, December 28, 2017 at 11:19:27 AM UTC-5, matthe...@gmail.com wrote: > > Here's the aztec patent that's in the public domain: > http://www.adams1.com/patents/US5591956.pdf > > For QR it

[go-nuts] Re: Go Community Charity Work?

2017-12-28 Thread Frank Davidson
activity. > > Using github.com/boombuler/barcode may be the right choice. I wanted to > get something down, but we do still need a specification for this project. > > Matt > > On Thursday, December 28, 2017 at 10:50:41 AM UTC-6, Frank Davidson wrote: >> >> Matt

[go-nuts] Re: Go Community Charity Work?

2017-12-28 Thread Frank Davidson
. > > Using github.com/boombuler/barcode may be the right choice. I wanted to > get something down, but we do still need a specification for this project. > > Matt > > On Thursday, December 28, 2017 at 10:50:41 AM UTC-6, Frank Davidson wrote: >> >> Matt - You s

[go-nuts] Re: Go Community Charity Work?

2017-12-28 Thread Frank Davidson
Matt - You saw this library, correct? https://github.com/boombuler/barcode On Thursday, December 28, 2017 at 11:19:27 AM UTC-5, matthe...@gmail.com wrote: > > Here's the aztec patent that's in the public domain: > http://www.adams1.com/patents/US5591956.pdf > > For QR it seems that the "patent i

[go-nuts] Re: Go Community Charity Work?

2017-12-27 Thread Frank Davidson
You mean a fraudster sets up a site under "bauer.com", gets a CA's cert, and then starts creating labels for bad drugs that follows our system? Can they do that? If so, I think you're right, we should have a server registry of "recognized" manufacturers. Maybe it holds their domain name and a

[go-nuts] Re: Go Community Charity Work?

2017-12-27 Thread Frank Davidson
Let's use QR codes then! Do we have to have a central registry/key server if we verify a domain's certificate? Isn't that enough to tell us that that domain and, hence, that public key is owned by that manufacturer? Or am I getting something wrong? How does Chrome know that a site's cert is goo

[go-nuts] Re: Go Community Charity Work?

2017-12-26 Thread Frank Davidson
need a server as the domain's certificate from a valid CA would serve this purpose. Thoughts? Cheers! Frank On Tuesday, December 26, 2017 at 2:37:44 PM UTC-5, Tamás Gulácsi wrote: > > On Tuesday, December 26, 2017 at 10:42:34 AM UTC-6, Frank Davidson wrote: >> >> Mi

[go-nuts] Re: Go Community Charity Work?

2017-12-26 Thread Frank Davidson
Might make sense to port https://github.com/zxing to Go? Seems a popular library and I think it was created by Google folks. On Tuesday, December 26, 2017 at 11:29:44 AM UTC-5, Frank Davidson wrote: > > I'm not sure we could encrypt codes for them as we would not have their >

[go-nuts] Re: Go Community Charity Work?

2017-12-26 Thread Frank Davidson
ll them if the > distributor verified part of the block, if it has been previously scanned > by a consumer, who the distributor is, what the expected product is, and > who made it, all of which can be compared to the label. > > Matt > > On Tuesday, December 26, 2017 at 9

[go-nuts] Re: Go Community Charity Work?

2017-12-26 Thread Frank Davidson
Yes, that's the Aztec library I saw for creating the codes. Looking now for a good OS library for reading them... I'm thinking the sequence would go something like this: 1. Manufacturer creates key pair 2. They register their public key with our central server 3. The public key is post

[go-nuts] Re: Go Community Charity Work?

2017-12-24 Thread Frank Davidson
I think the verification would have to happen online? But a lot of places are getting online and also, it doesn't have to be perfect. If it stopped 70% of the fraud and the stupid fraudsters, that's still plenty? On Sunday, December 24, 2017 at 2:07:51 PM UTC-5, Damian Gryski wrote: > > In crypt

[go-nuts] Re: Go Community Charity Work?

2017-12-24 Thread Frank Davidson
The UUID (or similar). The aztec code would be unique for each bottle. Also, the manufacturer could provide verification of that bottle provenance in terms of dates, when it was first verified, etc. A fraudster could copy a whole pallet, but it would be a heck of a lot of work and they'd have

Re: [go-nuts] Re: Donating to Go/Go-adjacent causes

2017-12-24 Thread Frank Davidson
haps start another thread for the project? > > Matt > > > On Sunday, December 24, 2017 at 10:25:04 AM UTC-6, Frank Davidson wrote: >> >> So, it's funny the timing of this... >> >> A few weeks ago, I saw this report on the PBS NewsHour: >> >>

[go-nuts] Go Community Charity Work?

2017-12-24 Thread Frank Davidson
A few weeks ago, I saw this report on the PBS NewsHour: https://www.pbs.org/newshour/show/fighting-the-public-health-threat-of-counterfeit-drugs

[go-nuts] Re: Donating to Go/Go-adjacent causes

2017-12-24 Thread Frank Davidson
So, it's funny the timing of this... A few weeks ago, I saw this report on the PBS NewsHour: https://www.pbs.org/newshour/show/fighting-the-public-health-threat-of-counterfeit-drugs I have just (as in haven't even started putting code in GitHub yet) started to work on an app which I was thinkin

Re: [go-nuts] Re: go and cygwin!

2017-12-16 Thread Frank Davidson
Created issue #23155 https://github.com/golang/go/issues/23155 -- 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

Re: [go-nuts] Re: go and cygwin!

2017-12-16 Thread Frank Davidson
Can you install ancillary programs like mosh and openSSH, etc, on Git Bash? I’ll open an issue, but I would think that the Go team probably doesn’t want to be chasing around every possible shell/emulator and not sure I’m a good enough programmer to create a decent pull request! Frank On Sat, Dec

[go-nuts] Re: go and cygwin!

2017-12-15 Thread Frank Davidson
I'm having trouble with go get and cygwin. I get a bad directory: davidfr@mybox ~/gocode $ go get golang.org/x/tools/cmd/... # cd .; git clone https://go.googlesource.com/tools C:\cygwin\home\davidfr\gocode\src\golang.org\x\tools Cloning into 'C:\cygwin\home\davidfr\gocode\src\golang.org\x\tools'

Re: [go-nuts] Infinite loops

2017-04-18 Thread Frank Davidson
Thanks, Ian! That's exactly my use case... On Tuesday, April 18, 2017 at 2:11:45 PM UTC-4, Ian Davis wrote: > > On Tue, 18 Apr 2017, at 05:58 PM, Jan Mercl wrote: > > On Tue, Apr 18, 2017 at 6:57 PM Frank Davidson > wrote: > > > Which loop uses the least c

Re: [go-nuts] Infinite loops

2017-04-18 Thread Frank Davidson
Thank, Jan! Just out of curiosity, why is that? On Tuesday, April 18, 2017 at 12:58:53 PM UTC-4, Jan Mercl wrote: > > On Tue, Apr 18, 2017 at 6:57 PM Frank Davidson > wrote: > > > Which loop uses the least computer resources? > > select{} > > -- > > -j >

[go-nuts] Infinite loops

2017-04-18 Thread Frank Davidson
Hi All, Which loop uses the least computer resources? for { } or for { time.Sleep(1 * time.Second) } or another type of infinite loop? Cheers, Frank -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and sto

[go-nuts] Re: Bufio vs. Writing to Disk

2017-01-19 Thread Frank Davidson
Thanks, Tomas! Very helpful! Do you know if it's important to run Flush() on the gzip writer? Frank On Thursday, January 19, 2017 at 12:00:44 AM UTC-5, Tamás Gulácsi wrote: > > The bufio.NewWriter is unneeded here, as both the gzip.Writer and > csv.Writer are buffered. > > The concept of csv.

[go-nuts] Bufio vs. Writing to Disk

2017-01-18 Thread Frank Davidson
Hi, I have some code to write out a .csv file and then gzip it. I am using a bufio.NewWriter to link the two: x := gzip.NewWriter(outputFile) outBuf := bufio.NewWriter(x) w := csv.NewWriter(outBuf) It seems slow. Would I be better off just writing first a .csv file to disk and then gzi

[go-nuts] Local Godoc, Playground and imports

2017-01-04 Thread Frank Davidson
Hi all, So, I have a local godoc running and I start it with the following bash script: #!/bin/bash export GOROOT=/go export GOHOME=/go /usr/local/go/bin/godoc -http=:8071 -play=true -index I have the the packages I want to index in the /go directory. It works fine except for when I want to

[go-nuts] godoc "Error communicating with remote server."

2016-10-03 Thread Frank Davidson
Hi, I'm running godoc in the following manner: nohup ./godoc -http=:8071 -goroot=/godoc -play=true & but when I try to play the examples in my docs in the Playground I'm getting the error: "Error communicating with remote server." Are there ports or anything I have to have open? I would think

[go-nuts] Re: Type Scope?

2016-09-13 Thread Frank Davidson
ber 13, 2016 at 2:41:46 PM UTC-4, Frank Davidson wrote: > > I think I'm having some type of mental lapse, but can anyone tell me why > this doesn't print out "It works!" nor give me an error? It simply prints > an empty string... > > https://play.golang.org/p/

[go-nuts] Type Scope?

2016-09-13 Thread Frank Davidson
I think I'm having some type of mental lapse, but can anyone tell me why this doesn't print out "It works!" nor give me an error? It simply prints an empty string... https://play.golang.org/p/9oG0S8kfM3 package main import "fmt" type fetcher struct { names string } func (f fetcher) Set(tname