[go-nuts] Re: Reference to type satisfying a specified interface

2018-08-31 Thread Akram Ahmad
Gotcha, Eric. And OMG! Test conversions taking more than 9 hours *would* 
be, um, a slight problem!! Best of luck, plus I'm happy to hear that in Go 
you seem to have found a tool that fits the job :-)

Me too, I'm right there behind you in working on grokking and understanding 
the idioms  of the amazing 
language that is Go (I switched to Go full-time earlier this year). So far, 
so good.

 ~Akram

On Thursday, August 30, 2018 at 12:48:10 PM UTC-5, Eric Raymond wrote:
>
>
>
> On Thursday, August 30, 2018 at 1:32:18 PM UTC-4, Akram Ahmad wrote:
>>
>> Your work on porting *reposurgeon* (from Python into Go) for improved 
>> performance sounds very cool, Eric (BTW, your work in, and musings on, Lisp 
>> and UNIX have been a huge influence on my evolution as a programmer. Kudos 
>> for that!
>>
>
> Thanks for the kind words.
>
> I have rather been forced into this. In cooperation with the GCC devteam, 
> I'm trying to move their repository from Subversion to git.  It's so 
> freaking big and Python is so slow that test conversions are taking more 
> than 9 hours, with occasional OOMs because the  working set is so huge.  I 
> have got to reduce that cycle time, it is making forensics on the 
> malformations in the history effectively impossible.  
>
> Go seems to be a tool that fits the job - translation of a smaller 
> auxiliary program suggests I ca n reasonably expect a 40x speed increase -  
> but this is my first major project in it and I have not yet mastered the 
> language.
>
> Once I do, I expect it to replace C for all my new projects that would 
> otherwise have been C.  Also anything I would havew written in Python that 
> needs to perform at machine speeds rather than human speed.
>

-- 
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 options, visit https://groups.google.com/d/optout.


[go-nuts] Re: Reference to type satisfying a specified interface

2018-08-30 Thread Eric Raymond


On Thursday, August 30, 2018 at 1:32:18 PM UTC-4, Akram Ahmad wrote:
>
> Your work on porting *reposurgeon* (from Python into Go) for improved 
> performance sounds very cool, Eric (BTW, your work in, and musings on, Lisp 
> and UNIX have been a huge influence on my evolution as a programmer. Kudos 
> for that!
>

Thanks for the kind words.

I have rather been forced into this. In cooperation with the GCC devteam, 
I'm trying to move their repository from Subversion to git.  It's so 
freaking big and Python is so slow that test conversions are taking more 
than 9 hours, with occasional OOMs because the  working set is so huge.  I 
have got to reduce that cycle time, it is making forensics on the 
malformations in the history effectively impossible.  

Go seems to be a tool that fits the job - translation of a smaller 
auxiliary program suggests I ca n reasonably expect a 40x speed increase -  
but this is my first major project in it and I have not yet mastered the 
language.

Once I do, I expect it to replace C for all my new projects that would 
otherwise have been C.  Also anything I would havew written in Python that 
needs to perform at machine speeds rather than human speed.

-- 
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 options, visit https://groups.google.com/d/optout.


[go-nuts] Re: Reference to type satisfying a specified interface

2018-08-30 Thread Akram Ahmad
Your work on porting *reposurgeon* (from Python into Go) for improved 
performance sounds very cool, Eric (BTW, your work in, and musings on, Lisp 
and UNIX have been a huge influence on my evolution as a programmer. Kudos 
for that!

On Thursday, August 30, 2018 at 11:56:58 AM UTC-5, Eric Raymond wrote:
>
> I apologize if this seems like an elementary question, but web searches 
> and reading the Go documentation is not turning up an answer.
>
> I'm in the process of translating reposurgeon, an editor for 
> version-control histories, from Python into Go for improved performance, 
> .The central data structure is Repository, which consists mainly of a list 
> of events such as commits and tags.  In Python, I use the language's late 
> binding and simply declare a list of containing multiple object types named 
> Commit, Tag, etc.  There are also a number of lookup maps pointing at 
> objects in the main event list.  Because objects in Pytron are passed by 
> reference everything is fairly straightforward.
>
> I'm trying to translate this to Go in a type-safe way. To do this, I need 
> to be able to write two declarations: "Slice of pointers to objects 
> satisfying the Event interface" and "map of string keys to pointers to 
> objects satisfying the Event interface".  My attempts so far have yielded 
> very cryptic error messages and no success.
>
> Is it actually possible to restrict the main list's polymorphism in this 
> way and avoid casts?
>
>
>
>
>
>
>  
>

-- 
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 options, visit https://groups.google.com/d/optout.