7 ms·
As someone who is 38, and has programmed in everything from 6510/68k/MIPS/ARM assembler to C/C++ to ActionScript/haxe/JavaScript to D to Python, et al, I also t
by georgemcbay 15y ago
As someone who is 38, and has programmed in everything from 6510/68k/MIPS/ARM assembler to C/C++ to ActionScript/haxe/JavaScript to D to Python, et al, I also think Go is pretty great.
In addition to the cool things in the language, I really love what they are doing with the build system. The Go programming I've been doing has been on Windows but targeting an ARM CPU (the PXA168 in the Chumby 8 device) and cross-compiling Go code requires simply setting a couple of environmental variables. Sooo much nicer than having to set up a full-on GNU-style cross-compiling setup and using different toolchains for all your different targets.
eg:
set GOOS=windows
set GOARCH=386
go build
Just built my project for Windows x86.
---
set GOOS=windows
set GOARCH=amd64
go build
Just built my project for Windows x64
---
set GOOS=linux
set GOARCH=ARM
set GOARM=5
go build
Just built my project for the Chumby device.
---
I highly recommend checking Go out and looking past any of the superficial allergies you have to it (I'm historically a braces-on-their-own-line guy, so getting used to the strict enforcement of the other style was a pain for me) and giving it at least a few weeks to sink in. If it still isn't your cup of tea after that, then that's fine, but it is well worth a look, IMO.
- tedunangst 15y agoWindows port details? I start at golang.org, link to http://golang.org/doc/install.html http://golang.org/doc/install.html. Says "A port to Microsoft Windows is in progress but incomplete." That in turn links to the world's least helpful wiki page: Page "WindowsPort" Not Found. Where do I find out more about the Windows port?
- enneff 15y agoGo 1 is about to be released. See the install docs for Go 1 at http://weekly.golang.org/doc/install http://weekly.golang.org/doc/install - these include windows instructions.
- tedunangst 15y agoThanks. If I was somehow supposed to know about the weekly site, I failed.
- enneff 15y agoNope, there's no way you could have known. We've been working on Go 1 for about six months now, but have resisted pushing people toward the weekly (unstable) snapshots until the most recent one, as the documentation story was incomplete and we didn't want to leave newbies out in the cold. We're nearly ready on all fronts now, and hope to pull the pin on Go 1 before the end of the month.
- deleted 15y ago[deleted]
- canop_fr 15y agoAs a coder who use mainly weekly (and now use godoc locally each time I need the package documentation), I still find it strange not to have links between release, weekly and tip on top of the documentation pages. Coders have to keep in mind the three links. I see a lot of questions on sites like stackoverflow that would probably not have been asked if the different documentations (and their existence) had been more visible. And I suppose this small problem won't stop with Go1 as I hope we'll see new progress in weekly as we're used to.
- enneff 15y agoYou won't see progress with weekly as you're use to that's the point of Go 1. We are hoping to spend some time actually using Go, rather than building it.
- drivebyacct2 15y agoYou have to build the standard libraries and cross compilers first. I've seen this pair of zsh functions around. It will build the necessary bits and will also build for win/mac/linux/freebsd in simple projects and zip up the results for distribution (You can link to the raw zips then on github). For others looking to do this with go: https://github.com/colemickens/scripts/blob/master/dotfiles/_zshrc_golang https://github.com/colemickens/scripts/blob/master/dotfiles/... (Minor editting is needed due to some assumed values $ARCH, $OS, etc)
- CamperBob 15y agoI'm historically a braces-on-their-own-line guy, so getting used to the strict enforcement of the other style was a pain for me Wait, what?
- FreakLegion 15y agovoid func() { } vs. void func() { } Does Go really enforce the latter? That would be incredibly silly.
- enneff 15y agoIt does, but for a good reason. Its so the parser can find the line endings without needing complicated rules and look-ahead. Go style is enforced mechanically with gofmt (http://weekly.golang.org/cmd/gofmt/ http://weekly.golang.org/cmd/gofmt/), anyway, so one typically drops the pretension of these kinds of style quibbles. It is more important to have one consistent style than to make everyone happy. The gofmt style forced me to change several of my own habits, but it was definitely worth it for my code to look like everyone else's. I've never encountered a Go programmer who hasn't become grateful for gofmt, in the end.
- FreakLegion 15y agoThanks for answering! I have no idea why someone downvoted your reply. People: downvoting is for mean and/or stupid comments, not things you disagree with. Anyway, in that case I imagine we'll see a Go preprocessor that takes all the line-initial braces and moves them up a break before sending code to the compiler. People get pretty worked up about this stuff.
- nakkiel 15y agoI work in a place where people don't use spaces and don't use empty lines to separate logical groups of lines. It's a real pain for me who is a code format junkie as our code ends up being an ugly pack of unrelated crap that's really hard to read. It's Python code and I find it uglier than some fairly large C++ project I used to work on. Anyway, I wish there was a gofmt in Python because at least, I'd drop all hopes of forging my own rules (silly junkies) and some basic clarity would be forced into our codebase. I know there are beautifiers but when such things are enforced and not negotiable, it's just so much simpler and people just stop caring as well.
- kaib 15y agoNice. How is the arm compiler holding up? I wrote the original 5g and ken did a large bug fix and optimizer sweep at some point so I'm interested in hearing how it has been going?
- georgemcbay 15y agoI haven't been inspecting the code of the arm compiler itself, but it has yet to fail me on my project, so kudos for the original implementation. Having previously worked for chumby industries (makers of those bean bag alarm clock internet device thigies) I've got a nice collection of ARMv5 class devices laying around waiting to become useful and it is nice to have a modern language that is relatively low level support development on them. Quite a few other projects out there with arm support only care about v7+.