Re:Experience porting 4k lines of C code to go
by alttab on Tuesday June 21, 2011 @10:55PM
(#2681479)
I interpreted his comment as "it doesn't look like you learned Go."
If you are porting direct C logic to Go you could be missing a lot of potential idioms that could differentiate Go from C or python further. You said yourself it was easier to implement parsing with slices.
I think a more effective task is "understand what the 4k lines of C do, and then throw it away and re-write it as if it was written in Go in the first place." Your miles may vary.
Re:Experience porting 4k lines of C code to go
by nvictor on Tuesday June 21, 2011 @04:37PM
(#2680294)
I am impressed with the AppEngine version of our beloved (now dead) JoS forum. Great job.
Re:Experience porting 4k lines of C code to go
by kristianp on Tuesday June 21, 2011 @09:19PM
(#2681201)
I was curious, so I looked it up: http://blog.kowalczyk.info/software/fofou/manifesto.html
One, this was an opportunity to learn Go.
Two, writing a converter is way above my head and quite likely theoretically (and practically) impossible. I've definitely had to make some decisions that I don't think even the cleverest compiler could (like noticing that array.[c|h] and buffer.[c|h] could be replaced with native Go arrays/slices easily so I didn't have to port that at all, just change the callers to Go equivalents).