Googles new programming language: Go

A place to discuss the implementation and style of computer programs.

Moderators: phlip, Moderators General, Prelates

Osha
Posts: 727
Joined: Wed Dec 03, 2008 3:24 am UTC
Location: Boise, Idaho, USA

Googles new programming language: Go

Postby Osha » Wed Nov 11, 2009 10:05 am UTC

Anyone else take a look at Go yet?
The syntax is pretty similar to C, it has garbage collection, no header files (yay!), no automatic type conversion, and some pretty nifty interface stuff (basically it looks like if you give a type all the methods in an interface, it'll implicitly satisfy that interface. Meaning *anything* that has get(int) and set(int) methods would satisfy any interface with just those two function definitions).
And it appears to play pretty nice with UTF-8 characters.
It seems fast and small enough, my netbook was able to compile it from source in a few minutes.

I fiddled around with it awhile, looks like the standard library is fairly large given the age of the language, but not large enough to satisfy my rougelike game programming needs! :o
Interfacing with C code is quite tricky, with just an example and a makefile to guide you, but I've got a good start in figuring it out.

Documentation is minimal at best, be prepared for lots of dumpster diving.

But I ramble! Look! It's hello world (with Japanese):

Code: Select all

package main

import "fmt"

func main() {
  fmt.Printf("Hello, 世界\n")
}

User avatar
Earlz
Gets Obvious Implications
Posts: 785
Joined: Sat Jun 09, 2007 8:38 am UTC
Location: USA
Contact:

Re: Googles new programming language: Go

Postby Earlz » Wed Nov 11, 2009 2:34 pm UTC

looks about like a cross between python and C plus being UTF-8 fully compatible.. So I would guess that strlen and such all are utf-8 by default?
My new blag(WIP, so yes it's still ugly..)
DEFIANCE!
Image
This is microtext. Zooming in digitally makes it worse. Get a magnifying glass.. works only on LCD

Two9A
Posts: 194
Joined: Sat Jul 26, 2008 11:22 pm UTC
Location: The smogbound wastes of northern England
Contact:

Re: Googles new programming language: Go

Postby Two9A » Wed Nov 11, 2009 3:00 pm UTC

I browsed quickly through their Effective Go guide, and it looks like iterating over a string will get you the byte position for each character, whether it's Unicode-extended or not. So iterating over "nihongo" (in Japanese) would net you 0, 3, 6 for the byte positions of the three characters.

It's interesting, but not enough for me to turn away from C++. I've invested too much time in trying to decipher C++ to leave it now :mrgreen:
The Unofficial "Making xkcd Slightly Worse" Archive [Incomplete]: xkcdsw.com
Articles that fall out of my head about once a month: imrannazar.com

0xBADFEED
Posts: 687
Joined: Mon May 05, 2008 2:14 am UTC

Re: Googles new programming language: Go

Postby 0xBADFEED » Wed Nov 11, 2009 3:11 pm UTC

One serious problem I see is a lack of Generics/Type-substitution mechanism. Otherwise looks like cool, clean language.

User avatar
lulzfish
Posts: 1214
Joined: Tue Dec 16, 2008 8:17 am UTC

Re: Googles new programming language: Go

Postby lulzfish » Wed Nov 11, 2009 3:55 pm UTC

I couldn't get it to compile, even after installing Mercurial (wtf), downloading the source code (wtf why do I need Mercurial to do that?!), installing all the other shit (bison??) and calling all.bash.

It gave me a few dozen "No rule to make $GO_ROOT/Make." and shit itself.
I deleted everything and I'll try again in a few hours / days.

Edit: Apparently there was a part of the install doc that I missed where you have to set a bunch of environment variables. This is very strange and I do not like it.
Last edited by lulzfish on Wed Nov 11, 2009 6:05 pm UTC, edited 1 time in total.

User avatar
Berengal
Superabacus Mystic of the First Rank
Posts: 2707
Joined: Thu May 24, 2007 5:51 am UTC
Location: Bergen, Norway
Contact:

Re: Googles new programming language: Go

Postby Berengal » Wed Nov 11, 2009 5:47 pm UTC

Part of me wants to say it's just new syntax for an old paradigm, but another part wants it to be the new C. Heavy on the operational semantics, nice and clean core. The concurrency primitives are nice (Squeak certainly had a good point), but I have to wonder if they couldn't refactor parts of it into a library and only retain a smaller, more generic subset of the primitives in the language. Type inference is nice, but lack of sexy types detracts a bit. The interfaces make for a nice subtyping model.

It's a bit too punny though.
It is practically impossible to teach good programming to students who are motivated by money: As potential programmers they are mentally mutilated beyond hope of regeneration.

MysteryBall
Posts: 314
Joined: Wed Jul 29, 2009 2:47 pm UTC

Re: Googles new programming language: Go

Postby MysteryBall » Wed Nov 11, 2009 7:42 pm UTC

So why exactly do we need another language to add to the long list we already have?

User avatar
You, sir, name?
Posts: 6983
Joined: Sun Apr 22, 2007 10:07 am UTC
Location: Chako Paul City
Contact:

Re: Googles new programming language: Go

Postby You, sir, name? » Wed Nov 11, 2009 7:47 pm UTC

Cue wrote:So why exactly do we need another language to add to the long list we already have?


Because we can write new languages?
I edit my posts a lot and sometimes the words wrong order words appear in sentences get messed up.

User avatar
Arancaytar
Posts: 1642
Joined: Thu Mar 15, 2007 12:54 am UTC
Location: 52.44°N, 13.55°E
Contact:

Re: Googles new programming language: Go

Postby Arancaytar » Wed Nov 11, 2009 8:48 pm UTC

It gave me a few dozen "No rule to make $GO_ROOT/Make." and shit itself.
I deleted everything and I'll try again in a few hours / days.

Edit: Apparently there was a part of the install doc that I missed where you have to set a bunch of environment variables. This is very strange and I do not like it.


Well, it compiled out of the box for me after setting the env vars, so that's not their fault. Keeping in mind that you're compiling the first release of this software from source, the install process is pretty easy. Though admittedly, they could be making it easier by using configure. That'd tell them the architecture, and you could just use the --prefix option.

I've been taking it for a spin on some of the easy Euler problems. The syntax is fairly intuitive, as long as you ignore the tutorial when it tells you the statement-separating semicolon is optional in some cases. It's really easier to just put it everywhere.

I feel a bit ambivalent about the way type declarations are post-fixed:

var number uint64 = 42

func calculate(number int) int {

}


The := declaration+assignment operator is kind of neat, too.

I haven't had a chance to mess around with slices yet, which could prove pretty cool. It'd be a bit like having Python's arrays in C.
"You cannot dual-wield the sharks. One is enough." -Our DM.
Image

User avatar
lulzfish
Posts: 1214
Joined: Tue Dec 16, 2008 8:17 am UTC

Re: Googles new programming language: Go

Postby lulzfish » Wed Nov 11, 2009 10:13 pm UTC

Cue wrote:So why exactly do we need another language to add to the long list we already have?

Because there actually seems to be a lack of compiled languages. The only ones I'm aware of are C++ and ancestors, and maybe D. (I don't know anything about D).

I need to read through the tutorials some more before I can figure out what to do with it.

User avatar
You, sir, name?
Posts: 6983
Joined: Sun Apr 22, 2007 10:07 am UTC
Location: Chako Paul City
Contact:

Re: Googles new programming language: Go

Postby You, sir, name? » Wed Nov 11, 2009 10:25 pm UTC

lulzfish wrote:
Cue wrote:So why exactly do we need another language to add to the long list we already have?

Because there actually seems to be a lack of compiled languages. The only ones I'm aware of are C++ and ancestors, and maybe D. (I don't know anything about D).


I don't know if that's actually true, though. Whoever edited their wikipedia articles seems to have found a similar amount compiled and interpreted languages.

On the other hand, you are right in the sense that the set of languages appropriate for systems programming is somewhat limited.
I edit my posts a lot and sometimes the words wrong order words appear in sentences get messed up.

User avatar
Xanthir
My HERO!!!
Posts: 5330
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex
Contact:

Re: Googles new programming language: Go

Postby Xanthir » Wed Nov 11, 2009 10:29 pm UTC

lulzfish wrote:
Cue wrote:So why exactly do we need another language to add to the long list we already have?

Because there actually seems to be a lack of compiled languages. The only ones I'm aware of are C++ and ancestors, and maybe D. (I don't know anything about D).

I need to read through the tutorials some more before I can figure out what to do with it.

Um?

Quite a lot of languages are compiled. In fact, almost every 'serious' language is. Hell, even *javascript* is compiled (JITed, but still…).
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))

fazzone
Posts: 186
Joined: Wed Dec 10, 2008 9:38 pm UTC
Location: A boat

Re: Googles new programming language: Go

Postby fazzone » Thu Nov 12, 2009 12:58 am UTC

Or, this could be political. Now that Oracle technically owns Java, this could be Google's shot across Oracle's bow; saying "If you try to privatize Java or mess with it, we'll convince everyone to leave and jump on board Go instead". Maybe not, because this language is fairly significantly different from Java, but it was probably considered. Related, I don't really see corporate-developed (even by Google) languages as really the way to go; I think that Java was a step in the wrong direction, and that it could have been so much more if it had been completely open from the start. But who knows?
*/

qbg
Posts: 586
Joined: Tue Dec 18, 2007 3:37 pm UTC

Re: Googles new programming language: Go

Postby qbg » Thu Nov 12, 2009 1:11 am UTC

I'm not liking the name because it is causing me to misread sentence fragments such as:
fazzone wrote:... and jump on board Go instead ...

User avatar
cerbie
Posts: 934
Joined: Sat Jul 05, 2008 5:14 am UTC
Location: USA

Re: Googles new programming language: Go

Postby cerbie » Thu Nov 12, 2009 1:18 am UTC

Cue wrote:So why exactly do we need another language to add to the long list we already have?
Because most languages we have now suck. So we try to fix those problems we know by making a new one, then discovering the problems the new one has, and so on.

Then, +1 Berengal, and +1 fazzone. I like corporate research languages (Fortress, FI), because they tend to do things that most people don't yet want, but really have needed for the last 10 years :), but the organically grown ones that implement those things should reign, in the end.
DSenette: (...) on the whole, even a trained killer cow is kind of stupid.

User avatar
Earlz
Gets Obvious Implications
Posts: 785
Joined: Sat Jun 09, 2007 8:38 am UTC
Location: USA
Contact:

Re: Googles new programming language: Go

Postby Earlz » Thu Nov 12, 2009 1:37 am UTC

Xanthir wrote:
lulzfish wrote:
Cue wrote:So why exactly do we need another language to add to the long list we already have?

Because there actually seems to be a lack of compiled languages. The only ones I'm aware of are C++ and ancestors, and maybe D. (I don't know anything about D).

I need to read through the tutorials some more before I can figure out what to do with it.

Um?

Quite a lot of languages are compiled. In fact, almost every 'serious' language is. Hell, even *javascript* is compiled (JITed, but still…).


I do not considered JIT compiled as a compiled language.. err, static compiled. There is a lack of statically compiled languages..
The only ones I can name off are C, C++, D, Delphi/Pascal, and um... thats it. I'm sure theres some stuff like a statically compiled LISP or Haskell and other niche languages that a significant amount of people use.. but this is all of the statically compiled languages used by a significant amount of industry. Oh wait, I think COBOL still counts as significant in some evil way
My new blag(WIP, so yes it's still ugly..)
DEFIANCE!
Image
This is microtext. Zooming in digitally makes it worse. Get a magnifying glass.. works only on LCD

rabuf
Posts: 15
Joined: Thu Mar 20, 2008 2:30 pm UTC

Re: Googles new programming language: Go

Postby rabuf » Thu Nov 12, 2009 1:55 am UTC

Earlz wrote:The only ones I can name off are C, C++, D, Delphi/Pascal, and um...


...Fortran, BASIC (yech!), Forth, Common Lisp, Ada, Dylan, Eiffel, SML, OCaml...

stephentyrone
Posts: 778
Joined: Mon Aug 11, 2008 10:58 pm UTC
Location: Palo Alto, CA

Re: Googles new programming language: Go

Postby stephentyrone » Thu Nov 12, 2009 2:09 am UTC

There is a lack of statically compiled languages...


I dispute this claim in general, but it is especially false in the domain of systems programming, at which go is ostensibly targeted.

Compiled languages relevant that are to my job as an OS programmer: C, C++, Objective-C, Fortran, D.
Interpreted languages relevant to my job: Shell scripting. Sometimes I use python as a calculator.
Language in which I do most of my programming: Assembly

Whatever the penetration of the flavor-of-the-month interpreted language (and non-fotm languages) into non-systems tasks, system programming will continue to be dominated by compiled languages for the foreseeable future.
GENERATION -16 + 31i: The first time you see this, copy it into your sig on any forum. Square it, and then add i to the generation.

User avatar
Earlz
Gets Obvious Implications
Posts: 785
Joined: Sat Jun 09, 2007 8:38 am UTC
Location: USA
Contact:

Re: Googles new programming language: Go

Postby Earlz » Thu Nov 12, 2009 2:55 am UTC

stephentyrone wrote:
There is a lack of statically compiled languages...


I dispute this claim in general, but it is especially false in the domain of systems programming, at which go is ostensibly targeted.

Compiled languages relevant that are to my job as an OS programmer: C, C++, Objective-C, Fortran, D.
Interpreted languages relevant to my job: Shell scripting. Sometimes I use python as a calculator.
Language in which I do most of my programming: Assembly

Whatever the penetration of the flavor-of-the-month interpreted language (and non-fotm languages) into non-systems tasks, system programming will continue to be dominated by compiled languages for the foreseeable future.


Um, Fortran is still a significant language?
My new blag(WIP, so yes it's still ugly..)
DEFIANCE!
Image
This is microtext. Zooming in digitally makes it worse. Get a magnifying glass.. works only on LCD

rabuf
Posts: 15
Joined: Thu Mar 20, 2008 2:30 pm UTC

Re: Googles new programming language: Go

Postby rabuf » Thu Nov 12, 2009 3:21 am UTC

Earlz wrote:Um, Fortran is still a significant language?


Yes. In engineering, mathematics, and high performance computing fortran is still commonly used. There is a massive amount of code written for it which supplies the basic (and not so basic) algorithms the practitioners in these fields require. Code that has been examined, debugged and optimized over years, in some cases decades.

User avatar
darkspork
Posts: 532
Joined: Tue Sep 23, 2008 12:43 am UTC
Location: Land of Trains and Suburbs

Re: Googles new programming language: Go

Postby darkspork » Thu Nov 12, 2009 4:24 am UTC

Xanthir wrote:
lulzfish wrote:
Cue wrote:So why exactly do we need another language to add to the long list we already have?

Because there actually seems to be a lack of compiled languages. The only ones I'm aware of are C++ and ancestors, and maybe D. (I don't know anything about D).

I need to read through the tutorials some more before I can figure out what to do with it.

Um?

Quite a lot of languages are compiled. In fact, almost every 'serious' language is. Hell, even *javascript* is compiled (JITed, but still…).


FYI, Google's V8 Javascript engine compiles Java into machine code before running it
Shameless Website Promotion: Gamma Energy
My new esoteric programming language: GLOBOL
An experiment to mess with Google Search results: HARDCORE PORNOGRAPHY HARDCORE PORNOGRAPHY

User avatar
phlip
Restorer of Worlds
Posts: 7556
Joined: Sat Sep 23, 2006 3:56 am UTC
Location: Australia
Contact:

Re: Googles new programming language: Go

Postby phlip » Thu Nov 12, 2009 6:37 am UTC

darkspork wrote:FYI, Google's V8 Javascript engine compiles Java into machine code before running it

Why would a Javascript engine touch Java at all?

Code: Select all

enum ಠ_ಠ {°□°╰=1, °Д°╰, ಠ益ಠ╰};
void ┻━┻︵​╰(ಠ_ಠ ⚠) {exit((int)⚠);}
[he/him/his]

User avatar
Arancaytar
Posts: 1642
Joined: Thu Mar 15, 2007 12:54 am UTC
Location: 52.44°N, 13.55°E
Contact:

Re: Googles new programming language: Go

Postby Arancaytar » Thu Nov 12, 2009 8:00 am UTC

Typo.

darkspork wrote:FYI, Google's V8 Javascript engine compiles Java into machine code before running it


Well, you could call every script language "compiled" because the interpreter builds an internal representation rather than parsing every line every time that line is executed. (And a compiler doesn't have to produce machine code either, it's just a translator from one language into another, usually simpler).
"You cannot dual-wield the sharks. One is enough." -Our DM.
Image

User avatar
Berengal
Superabacus Mystic of the First Rank
Posts: 2707
Joined: Thu May 24, 2007 5:51 am UTC
Location: Bergen, Norway
Contact:

Re: Googles new programming language: Go

Postby Berengal » Thu Nov 12, 2009 3:28 pm UTC

Arancaytar wrote:Well, you could call every script language "compiled" because the interpreter builds an internal representation rather than parsing every line every time that line is executed. (And a compiler doesn't have to produce machine code either, it's just a translator from one language into another, usually simpler).

I think perl might disagree with you, especially considering it's possible to write perl programs that are only syntactically valid on tuesdays.

Anyway, I just wanted to link to this.

(As an aside, except for the typo, Java is a perfect example of a statically compiled language. And a JITed language. And an interpreted language. It has all the flexibility and succinctness of manifestly typed static languages combined with the safety of dynamically interpreted languages. Go Java!)
It is practically impossible to teach good programming to students who are motivated by money: As potential programmers they are mentally mutilated beyond hope of regeneration.

User avatar
lulzfish
Posts: 1214
Joined: Tue Dec 16, 2008 8:17 am UTC

Re: Googles new programming language: Go

Postby lulzfish » Thu Nov 12, 2009 4:33 pm UTC

And Lua is also compiled, but not to native code. I was definitely thinking of "compiled to native code right away with no bullshit" languages, and I seem to have derailed the thread by asking everyone to define where compiling stops and interpretation starts.

So yeah, I heard Go has concurrency built in or something? Is that working out well?

User avatar
Outchanter
Posts: 669
Joined: Mon Dec 17, 2007 8:40 am UTC
Location: South African in Americaland

Re: Google's new programming language: Go

Postby Outchanter » Fri Nov 13, 2009 8:42 am UTC

Anyone else think their variable declaration syntax looks a little Pascal-ish? I wonder if that's for compilation speed - IIRC Pascal compilers have often been faster than their C counterparts simply because the language is easier to parse.
~ You will eat a tasty fortune cookie. Oh look, it came true already! ~

User avatar
Arancaytar
Posts: 1642
Joined: Thu Mar 15, 2007 12:54 am UTC
Location: 52.44°N, 13.55°E
Contact:

Re: Googles new programming language: Go

Postby Arancaytar » Fri Nov 13, 2009 9:18 am UTC

considering it's possible to write perl programs that are only syntactically valid on tuesdays.


Syntactically? I really would like to see that level of awesome. Got an example?

I'm not sure how much easier it is to parse "var something uint = 0" than it is to parse "uint something = 0". Though on second thought, you could have a stricter initial match, not having to look for all type keywords at the start of a line. So I guess it might become a bit faster.
"You cannot dual-wield the sharks. One is enough." -Our DM.
Image

User avatar
TheChewanater
Posts: 1279
Joined: Sat Aug 08, 2009 5:24 am UTC
Location: lol why am I still wearing a Santa suit?

Re: Googles new programming language: Go

Postby TheChewanater » Fri Nov 13, 2009 9:19 pm UTC

I get this every time I try to compile it. I thought maybe it was an error with Google or something, but I tried it again today and it said the same thing.

I have all of the dependencies installed, and I'm completely sure the path variables are correctly set.

Ubuntu 9.10 x86
Kernel 2.6.31-9-rt

Spoiler:

Code: Select all

--- FAIL: net.TestDialGoogle
   -- 74.125.19.99:80 --
   -- www.google.com:80 --
   Dial("tcp", "", "www.google.com:80") = _, dial tcp www.google.com:80: lookup www.google.com. on 192.168.1.254:53: no answer from server
   Dial("tcp4", "", "www.google.com:80") = _, dial tcp4 www.google.com:80: lookup www.google.com. on 192.168.1.254:53: no answer from server
   Dial("tcp4", "", "www.google.com:80") = _, dial tcp4 www.google.com:80: lookup www.google.com. on 192.168.1.254:53: no answer from server
   Dial("tcp6", "", "www.google.com:80") = _, dial tcp6 www.google.com:80: lookup www.google.com. on 192.168.1.254:53: no answer from server
   -- 74.125.19.99:http --
   -- www.google.com:http --
   Dial("tcp", "", "www.google.com:http") = _, dial tcp www.google.com:http: lookup www.google.com. on 192.168.1.254:53: no answer from server
   Dial("tcp4", "", "www.google.com:http") = _, dial tcp4 www.google.com:http: lookup www.google.com. on 192.168.1.254:53: no answer from server
   Dial("tcp4", "", "www.google.com:http") = _, dial tcp4 www.google.com:http: lookup www.google.com. on 192.168.1.254:53: no answer from server
   Dial("tcp6", "", "www.google.com:http") = _, dial tcp6 www.google.com:http: lookup www.google.com. on 192.168.1.254:53: no answer from server
   -- 074.125.019.099:0080 --
   -- [::ffff:74.125.19.99]:80 --
   -- [::ffff:4a7d:1363]:80 --
   -- [0:0:0:0:0000:ffff:74.125.19.99]:80 --
   -- [0:0:0:0:000000:ffff:74.125.19.99]:80 --
   -- [0:0:0:0:0:ffff::74.125.19.99]:80 --
FAIL
make[1]: *** [test] Error 1
make[1]: Leaving directory `/root/go/src/pkg/net'
make: *** [net.test] Error 2
ImageImage
http://internetometer.com/give/4279
No one can agree how to count how many types of people there are. You could ask two people and get 10 different answers.

User avatar
Arancaytar
Posts: 1642
Joined: Thu Mar 15, 2007 12:54 am UTC
Location: 52.44°N, 13.55°E
Contact:

Re: Googles new programming language: Go

Postby Arancaytar » Fri Nov 13, 2009 10:12 pm UTC

But your network functions?

This seems to be part of the make test target, which shouldn't be essential, really. It should be possible to run make install even if the self-test fails. However, the build structure seems a bit unfamiliar, with the central Make file replaced by a bash script...
"You cannot dual-wield the sharks. One is enough." -Our DM.
Image

User avatar
TheChewanater
Posts: 1279
Joined: Sat Aug 08, 2009 5:24 am UTC
Location: lol why am I still wearing a Santa suit?

Re: Googles new programming language: Go

Postby TheChewanater » Fri Nov 13, 2009 10:30 pm UTC

Arancaytar wrote:But your network functions?

This seems to be part of the make test target, which shouldn't be essential, really. It should be possible to run make install even if the self-test fails. However, the build structure seems a bit unfamiliar, with the central Make file replaced by a bash script...


There's no makefile, so that doesn't work.
ImageImage
http://internetometer.com/give/4279
No one can agree how to count how many types of people there are. You could ask two people and get 10 different answers.

User avatar
You, sir, name?
Posts: 6983
Joined: Sun Apr 22, 2007 10:07 am UTC
Location: Chako Paul City
Contact:

Re: Googles new programming language: Go

Postby You, sir, name? » Fri Nov 13, 2009 10:45 pm UTC

TheChewanater wrote:
Arancaytar wrote:But your network functions?

This seems to be part of the make test target, which shouldn't be essential, really. It should be possible to run make install even if the self-test fails. However, the build structure seems a bit unfamiliar, with the central Make file replaced by a bash script...


There's no makefile, so that doesn't work.


But it seems to be compiled with make. -->

Code: Select all

make[1]: *** [test] Error 1
make[1]: Leaving directory `/root/go/src/pkg/net'
make: *** [net.test] Error 2

Are you sure it isn't just hidden/disguised somehow?
I edit my posts a lot and sometimes the words wrong order words appear in sentences get messed up.

User avatar
TheChewanater
Posts: 1279
Joined: Sat Aug 08, 2009 5:24 am UTC
Location: lol why am I still wearing a Santa suit?

Re: Googles new programming language: Go

Postby TheChewanater » Fri Nov 13, 2009 11:07 pm UTC

Hmm... There's a Make file in /src/libcgo, but it keeps saying nothing needs to be done.

There are also .o files and a file called "libcgo.so". It's clearly compiled, but "make install" doesn't work. Just to see what would happen, I tried running it just to see what would happen, and it segfaults (just as a .so should, right?). Does this use some nonstandard method for installing?
ImageImage
http://internetometer.com/give/4279
No one can agree how to count how many types of people there are. You could ask two people and get 10 different answers.

User avatar
You, sir, name?
Posts: 6983
Joined: Sun Apr 22, 2007 10:07 am UTC
Location: Chako Paul City
Contact:

Re: Googles new programming language: Go

Postby You, sir, name? » Fri Nov 13, 2009 11:31 pm UTC

TheChewanater wrote:Hmm... There's a Make file in /src/libcgo, but it keeps saying nothing needs to be done.

There are also .o files and a file called "libcgo.so". It's clearly compiled, but "make install" doesn't work. Just to see what would happen, I tried running it just to see what would happen, and it segfaults (just as a .so should, right?). Does this use some nonstandard method for installing?


It's probably just hidden somewhere out of sight.

Code: Select all

for i in `find`; do file $i; done | grep "make"


Might be worth a shot.

Though it may also be temporarily generated by some script, I guess. You could write a script to override "make" that copies all makefiles in the current working directory to some safe place, and then simply passes on it's arguments to the real make, and exits like it does.
I edit my posts a lot and sometimes the words wrong order words appear in sentences get messed up.

User avatar
TheChewanater
Posts: 1279
Joined: Sat Aug 08, 2009 5:24 am UTC
Location: lol why am I still wearing a Santa suit?

Re: Googles new programming language: Go

Postby TheChewanater » Sat Nov 14, 2009 12:19 am UTC

Grep didn't find anything I wasn't aware of, but I ran anything it found anyway. ./Make.bash seems to work (it doesn't give any errors), and it appears to make everything, but now what? Make install does nothing. All I'm left with is some binary files.

I just went ahead and chmod +x'd everything and ran them. The '8g' command is there, so I guess it's installed.
ImageImage
http://internetometer.com/give/4279
No one can agree how to count how many types of people there are. You could ask two people and get 10 different answers.


Return to “Coding”

Who is online

Users browsing this forum: No registered users and 7 guests