Re: [go-nuts] import a "main" package

2017-09-24 Thread Ian Lance Taylor
On Sun, Sep 24, 2017 at 5:33 PM, wrote: > > The fact that importing a main package in a non main-package isn't supported > ought to be in the Go spec. Yes, probably. Want to open an issue about it at https://golang.org/issue ? Technically, from the language

Re: [go-nuts] import a "main" package

2017-09-24 Thread beach144
The fact that importing a main package in a non main-package isn't supported ought to be in the Go spec. On Thursday, December 15, 2016 at 1:43:45 PM UTC-6, Manlio Perillo wrote: > > However importing a main package in another main package works. > To summarize: > > 1) importing a main package

Re: [go-nuts] Go tour translation in Bulgarian

2017-09-24 Thread andrey mirtchovski
I don't have answers to your questions, but wanted to say "kudos" for the translation! andrey On Sun, Sep 24, 2017 at 8:40 AM, Krasimir Berov wrote: > > Hello all, > Some time ago I started translating "A tour of Go" to Bulgarian - "Разходка > в Go". > The source code is

Re: [go-nuts] Re: Bytconv where art thou

2017-09-24 Thread Peter Waller
On 15 September 2017 at 11:54, roger peppe wrote: > I suspect that this kind of performance issue may be fixed by better > compiler optimisation in the future (I think should be possible for > the compiler to notice that the string doesn't escape and pass a > pointer to the

Re: [go-nuts] Going crazy on golang maps

2017-09-24 Thread Chris Polderman
YES We have a winner! I really did not see that! Regards, Chris Op zaterdag 23 september 2017 18:32:25 UTC+2 schreef Jakob Borg: > > On 23 Sep 2017, at 15:27, Chris Polderman > wrote: > > > > func (hue *HueBridge) pollSensors(sensors *sensors.Sensors) { > >var

Re: [go-nuts] Re: How to read multi-page TIFF image?

2017-09-24 Thread Andrew O'Neill
A while ago I reading Adobe's doc's on SubIFD's since that is needed for decoding Nikon's RAW files. Is this a similar thing or is it just reading all the IFD's? I plan to implement a SubIFD decoder for tiff, unless someone else has done it. On Sun, Sep 24, 2017 at 8:21 PM Tad Vizbaras

Re: [go-nuts] Re: Proposal: Just Use GitHub

2017-09-24 Thread jimmy frasche
It's easy to focus on the darker turns that thread took, but it also led to a lot of good discussion. It got work restarted on https://github.com/golang/go/issues/18517 and led to the following issues being filed: - https://github.com/golang/go/issues/21980 -

[go-nuts] Re: How to read multi-page TIFF image?

2017-09-24 Thread Tad Vizbaras
Sad. Any chance to add multi page support to this? I am in desperate need for multi-page TIFF support. On Sunday, September 24, 2017 at 9:20:31 AM UTC-4, Guy Allard wrote: > > This package does not appear to support multi-page TIFs. Decoder > initialization only reads the 1st IFD. > > On

Re: [go-nuts] Simple web crawler question. How to avoid crawling visited links?

2017-09-24 Thread Sam Vilain
Why not be even more concurrent?Pass "to visit" links to a channel.Reader of channel holds the map, de-dupes and passes to worker channel.Multiple workers dequeue the channel and feed back into the "to visit" channel.SamOn Sep 24, 2017 10:13 AM, Michael Jones wrote:you

Re: [go-nuts] Simple web crawler question. How to avoid crawling visited links?

2017-09-24 Thread Michael Jones
you must remember where you've been. for example, you might: a. convert each candidate URL to a canonical form (absolute path) b. look for canonical url in a map before visiting. If it was not there, insert and visit, if it was there, do nothing this is enough. On Sun, Sep 24, 2017 at 4:05

[go-nuts] Simple web crawler question. How to avoid crawling visited links?

2017-09-24 Thread gdzack
Hi I am learning Golang concurrency and trying to build a simple Website crawler. I managed to crawl all the links of the pages of any depth of website. But I still have one problem to tackle: how to avoid crawling visited links that are previously crawled? Here is my code. Hope you guys can

[go-nuts] Re: How to read multi-page TIFF image?

2017-09-24 Thread Guy Allard
This package does not appear to support multi-page TIFs. Decoder initialization only reads the 1st IFD. On Friday, September 22, 2017 at 1:49:47 PM UTC-4, Tad Vizbaras wrote: > > No problem reading single page TIFF images using: "golang.org/x/image/tiff". > > It works great. > > > Question: how

Re: [go-nuts] Tiny FSM

2017-09-24 Thread dc0d
I've done F# for some years before but it's not always very fruitful to apply practices from other domains. Also I've already implemented other version of the runner engine (the Activate method) for (as an example) handling a final state. But I've been discouraged from doing many things in Go,

Re: [go-nuts] Tiny FSM

2017-09-24 Thread Jesper Louis Andersen
This method is common in functional programming as well. You are, essentially, computing a fixed point over the state machine (or in Rob's example a lexer state). That is, you are taking a set of state transitions and turning them into a function when looked at from the "outside". If you have a

Re: [go-nuts] Go on ARM 32bit and 64bit resources and groups

2017-09-24 Thread Dave Cheney
Yes On Thursday, 21 September 2017 07:26:51 UTC+7, Mandolyte wrote: > > Slightly different question... would this ARM approach work on a Samsung > Chromebook Plus which uses OP1 ARM, with Crouton installed? > -- You received this message because you are subscribed to the Google Groups

Re: [go-nuts] Re: Proposal: Just Use GitHub

2017-09-24 Thread Henrik Johansson
I am sorry but this type of straw man is not what Nate and others are arguing for. Never has anyone suggested we sacrifice quality for quantity but rather that more better than less to turn the old adage around. If code review can be done efficiently enough and by enough people then more

Re: [go-nuts] Tiny FSM

2017-09-24 Thread dc0d
Nice! At least I've not reinvented any wheel this time! Just rediscovered it! Thanks! On Sunday, September 24, 2017 at 12:43:51 PM UTC+3:30, Jan Mercl wrote: > > On Sun, Sep 24, 2017 at 11:07 AM dc0d > wrote: > > https://youtu.be/HxaD_trXwRE?t=14m7s > > -- > > -j >

Re: [go-nuts] Tiny FSM

2017-09-24 Thread Jan Mercl
On Sun, Sep 24, 2017 at 11:07 AM dc0d wrote: https://youtu.be/HxaD_trXwRE?t=14m7s -- -j -- 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

[go-nuts] Tiny FSM

2017-09-24 Thread dc0d
What cons (or pros) there might be in this implementation? type State func() (State, error) func (s State) Activate() (funcErr error) { next := s for next != nil && funcErr == nil { next, funcErr = next() } return } type FSM interface { Start() State } - Calling it a FSM (Finite

[go-nuts] Re: Proposal: Just Use GitHub

2017-09-24 Thread Nigel Vickers
On Thursday, 21 September 2017 04:27:19 UTC+2, Nate Finch wrote: > > https://github.com/golang/go/issues/21956 > > Wherein I suggest that not using GitHub for PRs and Reviews for the Go > Project itself is hurting the language and the community. > I have been lurking on this discussion until