Is the video out yet?
Go in Go
131–140 of 156 posts
Re: Go in Go
#132Fun fact: what's common between Rob Pike, Bjarne Stroustrup, Larry Wall, Guido van Rossum, and so many other language inventors? They're all C programmers!
Re: Go in Go
#133Fun fact: what's common between Rob Pike, Bjarne Stroustrup, Larry Wall, Guido van Rossum, and so many other language inventors? They're all C programmers!
They have a beard?
Re: Go in Go
#134Re: Go in Go
#135Earlier quoted context omitted.
I never understood this sentiment. C isn't assembly exactly because there isn't necessarily a direct correlation between the instructions the programmer writes and the resulting machine code. To me, this is as contrived as the idea that Javascript is "LISP in Java's clothing" In what possible sense can it be described as an assembler?
Because C is a very low level language, it imposes very little architectural decisions on higher levels that could cause impedance mismatches. For example, you wouldn't want to implement a garbage collector in a garbage collected language; C won't get in your way. This is also why there are loads of C libraries out there: they can be used with bindings from essentially any other language, which is generally not true…
Remember that it also enforces the idea of types, scopes, blocks, functions, the heap and the data stack quite strictly. It might be a very low level language compared to something like Java, but in terms of being unassuming of architectural intent, I can't say that I agree that it is even in the same ballpark as any of the assembly languages I've used.
Re: Go in Go
#136Earlier quoted context omitted.
> is "all but impossible" correct? Yes. > whenever i see the "X is all but Y" phrase, it makes sense to me that X is not Y. It's not "X is not Y", it's "X is all but Y", that is, X is very nearly not Y. "All but impossible" means it's possible, but only barely.
And to make it extra confusing there's "X is anything but Y" idiom which basically means what pvinis says.
Re: Go in Go
#137Earlier quoted context omitted.
Finally, my moment! I submit my own library, which is really meant for two players and scoring...and like much of what I do, was purely pun-driven. Maybe one day I'll add AI: https://github.com/acityinohio/baduk
Have a look at the Go Text Protocol [1] and SGF [2]. If you add these then the strongest existing AIs can already play on your board. All that said you can of course write your own bots, but Copmputer Go isn't as easy as one might think. In fact it's still considered a much harder problem than Computer Chess. [1] http://www.lysator.liu.se/~gunnar/gtp/ [2] http://en.wikipedia.org/wiki/Smart_Game_Format
Re: Go in Go
#138Earlier quoted context omitted.
I don't know why I've been downvoted. Maybe my question wasn't clear. Since there is no need anymore for a C compiler in the Go toolset, how will the magic import "C" package work ?
If you want to use cgo you still need a C compiler for that. But it's the system C compiler (clang or gcc), not the one we deleted.
Re: Go in Go
#139Sorry for the noob question, but could someone help me understand how this is (conceptual) possible? I get that you can write a program which compiles language X to machine code, e.g. how python interpreting Go to write the assembly necessary would be technically possible. My question is, how is the compiler generated? If it's written in c, gcc -o compiler, but what is the piece I'm missing when it comes to Go compil…
Build the new version of the compiler with the previous version of the compiler
Rebuild the new version of the compiler with the new compiler from the previous step, that was built with the old compiler
Rebuild the new compiler with the new compiler from the previous step, that was also built with the new compiler, and that's your official binary
The initial creation of the language requires somebody to write a compiler for it in assembly or in some other language that already has one, but once you get that first one built, all the rest could be in their own language.
Re: Go in Go
#140Just out of curiosity, is this the first time a language is written using itself?
It's a sign of maturity to show that a language can bootstrap itself, prolog has been written in prolog, erlang was written with prolog first, then later rewritten in erlang, as other's have pointed out, it's pretty common for C/C++, Lisp, Assembly. This of course applies more to compiled languages.