Re: [go-nuts] What 5 things does Go need in 2017?

2016-09-12 Thread Michael Hudson-Doyle
On 12 September 2016 at 21:53, Dave Cheney wrote: > Ubuntu 12.04 LTS ships with Go 1.0. > Ubuntu 14.04 LTS ships with Go 1.2 > Ubuntu 16.04 LTS ships with Go 1.6 (I hope) > Yeah, 1.6 got into 16.04. > None of the LTS versions of Ubuntu ship with a supporter version of Go. >

Re: [go-nuts] What was the rationale behind using braces for scoping?

2016-09-08 Thread Michael Jones
There is ample evidence that “typographic block structure” via indenting is fragile in terms of potential error in the reality of cut-and-paste. This is not a comment on like/dislike in abstract, just on dislike when designing for high programmer productivity. -- You received this message

Re: [go-nuts] Re: In case you missed it: language benchmarks for Go 1.7, and language adoption

2016-08-30 Thread Michael Jones
I looked at that this morning and sped it up a little. From: 'Isaac Gouy' via golang-nuts Reply-To: Isaac Gouy Date: Tuesday, August 30, 2016 at 12:15 PM To: golang-nuts Subject: [go-nuts] Re: In case you missed

Re: [go-nuts] Re: ANNOUNCE: renderview

2016-08-27 Thread Michael Jones
I tried to build but was deterred by build woes. From: on behalf of mura Date: Saturday, August 27, 2016 at 9:06 AM To: golang-nuts Cc: Subject: [go-nuts] Re: ANNOUNCE: renderview

Re: [go-nuts] Re: Accessing Ms SQL Server with Go

2016-08-23 Thread Michael-John Turner
d or the Windows Authentication user id in the DOMAIN\User format. On Windows, if user id is empty or missing Single-Sign-On is used. (from the README). Cheers, MJ -- Michael-John Turner * m...@mjturner.net * http://mjturner.net/ -- You received this message because you are subscribed to t

Re: [go-nuts] Unary +

2016-08-20 Thread Michael Jones
Leadings zeroes signal the use of base 8. Have a look at this “base 10” calculator. https://play.golang.org/p/L0whPekuvG There was debate about this in early Go days. It is consistent with historical usage (C, and earlier, in Donald Knuth’s Art of Computer Programming.) Good summary at

Re: [go-nuts] Unary +

2016-08-19 Thread Michael Jones
My answer is philosophical, and possibly not what is wanted, but it is informed. Here goes: Backstory: Unary Minus, as taught in computer science and implemented in languages and instruction sets and so forth is slightly confusing and often confusingly described. x := -y // means get

Re: [go-nuts] Go 1.7 is released

2016-08-17 Thread Michael Banzon
PM, Dave Cheney <d...@cheney.net> wrote: > >> Until it's part of the ./all.bash test suite, it'll continue to break >> because it has never been proven to work. >> >> > On 17 Aug 2016, at 05:13, Michael Hudson-Doyle < >> michael.hud...@canonical.com> wr

Re: [go-nuts] Go 1.7 is released

2016-08-16 Thread Michael Hudson-Doyle
On 17 August 2016 at 08:31, Dave Cheney wrote: > Stripping go binaries is not tested and known to produce broken binaries. Stripping should be fine, and any problems produced by it should be reported as bugs. Please. > I recommend not doing this until strip/upx/whatever are

Re: [go-nuts] Increase speed of repeated builds

2016-08-11 Thread Michael Hudson-Doyle
On 12 August 2016 at 15:01, James Pettyjohn wrote: > I have a project which has become fairly large, I simple check of *.go, no > _test files (including all modules), it's up to 1300 files. > > The main module though is 60 files, about 1MB of go source. It is taking to >

Re: [go-nuts] Why is reflect.ValueOf(nil map).Interface() != nil?

2016-08-09 Thread Michael Jones
The interface is like an envelope. You “open it” to see what’s inside. Sending nothing (no envelope arrives) is not the same as sending an empty envelope (i.e., interface is non-nil, pointer within is nil). It never confused me, beyond my general confusion from thinking in similes and

Re: [go-nuts] Re: go process memory limits and gurantees

2016-08-09 Thread Michael Jones
First, a related question—if an attempt to allocate is about to fail, or succeeds while crossing a threshold of “low memory remaining” (if this is even knowable), does/should the runtime change the GC policy to be very aggressive and exploit all possible avenues to remedy? A low water / high

Re: [go-nuts] getting 403 forbidden when I try to access go plaground examples

2016-08-04 Thread Michael Bubb
hub. Much appreciated On Thu, Aug 4, 2016 at 12:18 PM, Ian Lance Taylor <i...@golang.org> wrote: > On Thu, Aug 4, 2016 at 8:52 AM, Michael Bubb <michael.b...@gmail.com> > wrote: > > > > Our chief data scientist at work was showing me an example of a prime >

[go-nuts] getting 403 forbidden when I try to access go plaground examples

2016-08-04 Thread Michael Bubb
Hello Our chief data scientist at work was showing me an example of a prime sieve in golang. He shared this with me: https://play.golang.org/p/49awp0a7jv I get a 403 forbidden when I try to access that or any other example ▶ curl -v https://play.golang.org/p/hmQb12rl5v * Trying

Re: [go-nuts] Re: How to check that a Go package has not been modified?

2016-08-03 Thread Michael Jones
there is no fame to be had. Just run the program again.")     return false } It reflects common understanding about the probability of hash collisions when using good hashes. -- Michael T. Jones From: <golang-nuts@googlegroups.com> on behalf of "atd...@gmail.com" &

Re: [go-nuts] checking for connection error?

2016-08-03 Thread Michael Banzon
Hi Victor, There are no "constant" errors in the sql package if thats what you are looking for. Generally if .Ping() returns an error there is no connection - afaik the error string might give some indication but it is totally up to the driver/database. If you want to sleep and try again later

Re: [go-nuts] Re: What lead to the versionning debate?

2016-07-29 Thread Michael Jones
needs to span the present and the future—whatever comes after intel/arm/power, linux/macOS/windows, sccs/rcs/git, vi/emacs/sublime, and so on in every dimension. It is hard to do at all, much less broadly and elegantly. -- Michael T. Jones From: <golang-nuts@googlegroups.com> on

Re: [go-nuts] Multi Variable Linear Regression (with r squared and p values)

2016-07-23 Thread Michael Jones
Surely this calculation is part of that regression module or a dependent module. On Jul 23, 2016 11:50 AM, wrote: > I'm trying to port over some code using linear regression (statsmodule > package) in python to golang. I need the library to give me r square and p > values

Re: [go-nuts] Re: problems receiving data from a GPS

2016-07-20 Thread Michael Jones
Final version: https://play.golang.org/p/nb-KHcw9vS From: Michael Jones <michael.jo...@gmail.com> Date: Wednesday, July 20, 2016 at 1:50 AM To: EdgarAlejandro Vintimilla <eavi...@gmail.com>, golang-nuts <golang-nuts@googlegroups.com> Cc: <egonel...@gmail.com> S

Re: [go-nuts] Re: problems receiving data from a GPS

2016-07-20 Thread Michael Jones
.@gmail.com> Subject: Re: [go-nuts] Re: problems receiving data from a GPS thanks guys I was converting the data to hex incorrectly https://play.golang.org/p/35Wgkrh4Rq now its equal to python On Tuesday, July 19, 2016 at 6:41:42 PM UTC-5, Michael Jones wrote: In response to the

Re: [go-nuts] Re: problems receiving data from a GPS

2016-07-19 Thread Michael Jones
In response to the call to help at every level of developer background, here an expository solution line by line. Don’t click if this is your homework. https://play.golang.org/p/UOf38Uh-MT All that is left is to understand the data payload formats. Michael -- You received

Re: [go-nuts] Re: problems receiving data from a GPS

2016-07-19 Thread Michael Jones
Detective mode here: family: http://www.castelecom.com/obd-gps-tracker details: http://www.castelecom.com/idd-213gl “DD-213GL is an intelligent on-board diagnostic device compatible with passenger and commercial vehicles, it features plug-and-play technology, could read diagnostic

Re: [go-nuts] Understanding HTTP server latencies

2016-07-18 Thread Michael Jones
When you move the rate up by 5x, from 1k => 5k, your wait time moves up by 2846x. That is suspicious in any system, language, etc. ;-) From: on behalf of Rayland Date: Monday, July 18, 2016 at 6:03 AM To: golang-nuts

Re: [go-nuts] Re: An efficient runtime expression evaluation

2016-07-18 Thread Michael Jones
Anything much faster than this needs vector operations in the interpreter so the “get to the OP function” overhead is once per time series rather than once per element in the series. From: on behalf of Egon Date: Monday, July 18, 2016 at

Re: [go-nuts] Generation of Strings - generation

2016-07-15 Thread Michael Jones
aab >> > > aac >> > > bac >> > > bab >> > > baa >> > > caa >> > > cab >> > > cac >> > > >> > > and so on. Then the total cost is n^n-1 digit changes. Though I do not >> > > kn

Re: [go-nuts] Re: Generation of Strings - generation

2016-07-14 Thread Michael Jones
The first time this came up I wrote code to generate general alphabet combinations as quickly as I could. The approach I used was a generator object that one calls to set the length and alphabet size, and a Next() function that is called repeatedly until it signals that all values have been

Re: [go-nuts] Hi, someone may help me converting this python code to GO

2016-07-10 Thread Michael Jones
Dan, i was guessing that the code was specifying a 16 bit integer for the running crc. That's why i am curious. On Jul 10, 2016 2:42 PM, "Jesper Louis Andersen" < jesper.louis.ander...@gmail.com> wrote: > > On Sun, Jul 10, 2016 at 5:07 AM, wrote: > >> def

Re: [go-nuts] Re: Hi, someone may help me converting this python code to GO

2016-07-10 Thread Michael Jones
I get “030a1x” as the result of my Go port. Is that what you expected? —— Michael Jones michael.jo...@gmail.com On Sun, Jul 10, 2016 at 6:10 AM, Kevin Powick <kpow...@gmail.com> wrote: Glad to see you put some effort into it yourself. -- You received this message because you are subs

Re: [go-nuts] Error vs. Panic: Should functions like strings.Repeat return an error value?

2016-06-30 Thread Michael Whatcott
Good point integer overflow. Thanks! On Thursday, June 30, 2016 at 10:30:46 AM UTC-6, Andy Balholm wrote: > > When a function is used incorrectly, a panic is appropriate. If the count > comes from an untrusted source, the caller should check that it is > non-negati!e (and not too large) before

Re: [go-nuts] Handling dynamic and unknown number of wait groups?

2016-06-30 Thread Michael Jones
.* Finally, I did not change the logic of the program to use a worker pool. It still spawns a goroutine for every URL visited. That is not bad, but neither is it necessary. Making this change would have made changes 1–5 less clear, and the goal here is clarity. Hope this helps, Michael Michael

[go-nuts] Error vs. Panic: Should functions like strings.Repeat return an error value?

2016-06-30 Thread Michael Whatcott
The blog post on error handling in go establishes the following guideline: > In Go, error handling is important. The language's design and conventions encourage you to explicitly check for errors where they occur (as distinct from the convention

Re: [go-nuts] 'Vectorizing' array arithmetic using parallel for loops?

2016-06-28 Thread Michael Jones
likely want is a set of worker process (~ncpus or 2x that) doing the work and a way to know when the work is done. Michael Jones michael.jo...@gmail.com > On Jun 28, 2016, at 5:01 PM, guyz...@gmail.com wrote: > > Hi, > > I'm attempting to optimize pair-wise operations over arrays

Re: [go-nuts] Question - type assertion x.(*T)

2016-06-28 Thread Michael Wain
Why would I use *T over just T ? Michael > On 28 Jun 2016, at 10:05, Jan Mercl <0xj...@gmail.com> wrote: > > On Tue, Jun 28, 2016 at 11:02 AM Michael Wain <michaelwain1...@gmail.com> > wrote: > > > So a := x.(*T) is the same as a := x.(T) ? > >

Re: [go-nuts] Question - type assertion x.(*T)

2016-06-28 Thread Michael Wain
So a := x.(*T) is the same as a := x.(T) ? Michael > On 27 Jun 2016, at 23:33, Axel Wagner <axel.wagner...@googlemail.com> wrote: > > Hm? It's this syntax: > https://golang.org/ref/spec#Type_assertions > using *T as the type. > >> On Mon, Jun 27, 2016 at 11:08

Re: [go-nuts] golang poll/epoll/select

2016-06-27 Thread Michael Soulier
On Saturday, June 25, 2016 at 9:03:59 PM UTC-4, Michael Soulier wrote: > > Hmm. Maybe I misunderstand how runsv connects the two. A simple shell test > seems to behave more as expected. I'll need to dig. > > I think I found it. On read I'm getting "resource temporarily unavail

[go-nuts] cgo not building on darwin

2016-06-25 Thread Michael Soulier
Experimenting with a little cgo, I did this package main /* #include #include static void _FD_SET(int sysfd, void *set) { FD_SET(sysfd, (fd_set*)set); } */ import ( "C" "unsafe" "syscall" ...etc Unfortunately, I'm getting this on my Mac when I try to build.

Re: [go-nuts] golang poll/epoll/select

2016-06-25 Thread Michael Soulier
On Friday, June 24, 2016 at 6:59:28 PM UTC-4, Ian Lance Taylor wrote: > > In Go you normally simply start a goroutine that reads from Stdin and > sends the data over a channel. > > Goroutines are cheap. > > Sure, but when you read and get an EOF you return immediately, so the goroutine would

Re: [go-nuts] golang poll/epoll/select

2016-06-25 Thread Michael Soulier
I thought I got select working but now it's returning immediately even without any input to stdin. // loop forever - we expect to be killed with a SIGTERM or SIGINT for { logger.Debug("going into select on stdin") var r_fdset syscall.FdSet for i := 0; i < 16; i++

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

2016-06-22 Thread Michael Jones
that is already there for input values in hex. Michael Jones michael.jo...@gmail.com > On Jun 22, 2016, at 8:14 AM, Michael Jones <michael.jo...@gmail.com> wrote: > >> https://github.com/golang/go/issues/42 > > Michael Jones > michael.jo...@gmail.com > >> On Jun 22, 2016

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 <rogerpack2...@gmail.com> wrote: > > Could you drop me a link to the discussion by chance? Seems this > feature is actually a reasonably common request

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

2016-06-21 Thread Michael Jones
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. 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

Re: [go-nuts] Bitmasks on signed types

2016-06-14 Thread Michael Jones
;> to > >>> >>> an unsigned equivalent first? > >>> >>> > >>> >>> - Dave > >>> >>> > >>> >>> -- > >>> >>> You received this message because you are subscribed to the Google

<    4   5   6   7   8   9