Re: [go-nuts] Re: C++ 11 to Golang convertor

2020-04-06 Thread Andy Balholm
Only 2 named c2go, though, which is the specific confusion I was trying to address. (ESR, in particular, seemed to think that elliotchance/c2go was basically the same tool that the Go team had used to translate the compiler and runtime.) By the way, if you want people to try gocc, a few

Re: [go-nuts] Re: C++ 11 to Golang convertor

2020-04-06 Thread Jan Mercl
On Mon, Apr 6, 2020 at 6:08 PM Andy Balholm wrote: > > In looking back over some of these old conversations about converting C to > Go, I realized that there is some confusion about the different programs > named "c2go". There are basically 2: Make it 3 please: modernc.org/gocc. Experimental,

Re: [go-nuts] Re: C++ 11 to Golang convertor

2020-04-06 Thread Andy Balholm
In looking back over some of these old conversations about converting C to Go, I realized that there is some confusion about the different programs named "c2go". There are basically 2: rsc/c2go is the program that was used to convert the Go runtime, compiler, and linker from C to Go. It is not

Re: [go-nuts] Re: C++ 11 to Golang convertor

2019-01-15 Thread Lucio
On Tuesday, 15 January 2019 13:43:55 UTC+2, Eric Raymond wrote: > > > Have you actually looked it what it outputs? > > If not, prepare to be horrified. Maintainability is an issue. > Maybe it's a silly thought... Back in the 1950s compilers needed to be small so as to be at all

Re: [go-nuts] Re: C++ 11 to Golang convertor

2019-01-15 Thread Eric S. Raymond
Jason E. Aten : > I came across this C to Go project. If you could revive the LLVM C output > you could compile C++ to C with LLVM and then apply it. > > https://github.com/elliotchance/c2go > > It's rough/incomplete but it might give you something useful. Have you actually looked it what it

[go-nuts] Re: C++ 11 to Golang convertor

2019-01-14 Thread Jason E. Aten
I came across this C to Go project. If you could revive the LLVM C output you could compile C++ to C with LLVM and then apply it. https://github.com/elliotchance/c2go It's rough/incomplete but it might give you something useful. -- You received this message because you are subscribed to the

Re: [go-nuts] Re: C++ 11 to Golang convertor

2019-01-07 Thread Dan Kortschak
Note there that cznic/cc has moved to gitlab, at https://modernc.org/cc On Mon, 2019-01-07 at 09:56 -0700, K Davidson wrote: > My original comment was in regaurd to c++11, but seeing as the > discussion > has drifted towards c, you may want to take a look at > https://github.com/xlab/c-for-go, it

[go-nuts] Re: C++ 11 to Golang convertor

2019-01-07 Thread K Davidson
My original comment was in regaurd to c++11, but seeing as the discussion has drifted towards c, you may want to take a look at https://github.com/xlab/c-for-go, it is based off of its based off of https://github.com/cznic/cc, and has been used to create go bindings for portaudio, libvpx, and a

Re: [go-nuts] Re: C++ 11 to Golang convertor

2019-01-05 Thread David Collier-Brown
Mr. Tiwari: Major ports are rather like major rewrites, in that if you think of the program as a tree, the parts that stay the same are the trunk and branches, and the parts that change are the leaves. If you draw a picture of the old program on a whiteboard, you have an (initial) design

Re: [go-nuts] Re: C++ 11 to Golang convertor

2019-01-05 Thread Drew Derbyshire
I am reminded of someone once asked how to go from Burlington MA to Waltham, when what he really wanted to do was go from Burlington to Logan Airport. (For the uninformed, via Waltham is not generally how most would do it.) This conversation is thoughtfully covering all angles of the C++ to

Re: [go-nuts] Re: C++ 11 to Golang convertor

2019-01-05 Thread Michael Jones
A rewrite will be better. Really. On Sat, Jan 5, 2019 at 10:11 AM Abhishek Tiwari wrote: > Hi Jake & Friends, > > Thank you so much for awesome response and great help. I am going through > all replies in detail one by one. > Actually, I am working on solving a job assignment : 8-10 C++ files

Re: [go-nuts] Re: C++ 11 to Golang convertor

2019-01-05 Thread Abhishek Tiwari
Hi Jake & Friends, Thank you so much for awesome response and great help. I am going through all replies in detail one by one. Actually, I am working on solving a job assignment : 8-10 C++ files need to be converted to Go. As far as the technical details of the code is concerned, seems its a

Re: [go-nuts] Re: C++ 11 to Golang convertor

2019-01-05 Thread Eric Raymond
On Friday, January 4, 2019 at 2:41:19 PM UTC-5, robert engels wrote: > > I still think it would be a nearly impossible task given the C code in the > wild - outside of threading, the common usage of ‘unions’ - there is no > way I know of to map these to a simple Go struct, or even several -

Re: [go-nuts] Re: C++ 11 to Golang convertor

2019-01-04 Thread robert engels
Isn’t an easier and better source of resource utilization just to farm out each program under consideration to “the crowd” and say, rewrite dnsd in Go. For security verification purposes, you’d be going through each line of the converted program anyway. I still think it would be a nearly

Re: [go-nuts] Re: C++ 11 to Golang convertor

2019-01-04 Thread Eric S. Raymond
Ian Lance Taylor : > To be honest, the second step, making the compiler (and linker) > idiomatic Go, is still in progress. I'm not even a bit surprised to hear that. :-) -- http://www.catb.org/~esr/;>Eric S. Raymond My work is funded by the Internet Civil Engineering Institute:

Re: [go-nuts] Re: C++ 11 to Golang convertor

2019-01-04 Thread Eric S. Raymond
jake6...@gmail.com : > On Thursday, January 3, 2019 at 5:46:39 PM UTC-5, Eric Raymond wrote: > > > > On Thursday, January 3, 2019 at 12:11:06 PM UTC-5, Jake Montgomery wrote: > >> > >> I would note that any tool that ports from C++, or even C, to Go is going > >> to produce ugly, unmaintainable,

Re: [go-nuts] Re: C++ 11 to Golang convertor

2019-01-04 Thread Ian Lance Taylor
On Fri, Jan 4, 2019 at 8:52 AM wrote: > > On Thursday, January 3, 2019 at 5:46:39 PM UTC-5, Eric Raymond wrote: >> >> On Thursday, January 3, 2019 at 12:11:06 PM UTC-5, Jake Montgomery wrote: >>> >>> I would note that any tool that ports from C++, or even C, to Go is going >>> to produce ugly,

[go-nuts] Re: C++ 11 to Golang convertor

2019-01-04 Thread jake6502
On Thursday, January 3, 2019 at 5:46:39 PM UTC-5, Eric Raymond wrote: > > On Thursday, January 3, 2019 at 12:11:06 PM UTC-5, Jake Montgomery wrote: >> >> I would note that any tool that ports from C++, or even C, to Go is going >> to produce ugly, unmaintainable, and non-idiomatic code, at best.

[go-nuts] Re: C++ 11 to Golang convertor

2019-01-03 Thread K Davidson
I read somewhere that you can do some of the needed work using swig++, but like others have said, I don't think it would produce perfectly ported idiomatic code out of the box... -kdd -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To

Re: [go-nuts] Re: C++ 11 to Golang convertor

2019-01-03 Thread Valentin Vidic
On Thu, Jan 03, 2019 at 02:46:39PM -0800, Eric Raymond wrote: > On the other hand, I believe graceful, comment-preserving C to idiomatic-Go > transpilation is almost possible. By 'almost' I mean that the tool would > pass through a small enough percentage of untranslated residuals for >

[go-nuts] Re: C++ 11 to Golang convertor

2019-01-03 Thread Eric Raymond
On Thursday, January 3, 2019 at 12:11:06 PM UTC-5, Jake Montgomery wrote: > > I would note that any tool that ports from C++, or even C, to Go is going > to produce ugly, unmaintainable, and non-idiomatic code, at best. > These are two different cases. I agree that graceful C++ to Go

[go-nuts] Re: C++ 11 to Golang convertor

2019-01-03 Thread jake6502
There are so, so many ways to go about porting functionality from one language to another. I hope you have seriously considered why you want to make such a port. The answer to that will likely, in part, drive your strategy. In addition the nature and size of the code base, and your timeline,