Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Lonely Wolf
Jan 20, 2003

Will hawk false idols for heaps and heaps of dough.
cgo dynamically links to existing C libraries.

You just can't create Go libraries that can themselves be dynamically linked†.

The statement remains a non sequitur, without further explanation. Though, presumably, it refers either to distribution or being able to dynamically load plugins to applications/libraries.


† Ian Lance Taylor recently said that he would like to make this a priority for Go 1.4 on the dev mailing list.

Adbot
ADBOT LOVES YOU

Lonely Wolf
Jan 20, 2003

Will hawk false idols for heaps and heaps of dough.
Interestingly it panics in the go playground (http://play.golang.org/p/wH-StrUZcT) but runs correctly locally

edit: well, no, misread the code. It doesn't print did something, but it doesn't panic.

edit2: the code didn't copy paste into vim correctly, panics locally as well. Having a fabulous day.

Lonely Wolf
Jan 20, 2003

Will hawk false idols for heaps and heaps of dough.
it was something simple: Master{} needs to be &Master{} as the execute method isn't defined on values of master and reflection unlike go proper doesn't automatically take the pointer.

http://play.golang.org/p/SLTLkRn7dk

Lonely Wolf
Jan 20, 2003

Will hawk false idols for heaps and heaps of dough.
If you don't give it anything more specific to encode into, that's what you're going to get.

http://play.golang.org/p/Vauuun8fRP

This is documented: http://golang.org/pkg/encoding/json/#Unmarshal

Lonely Wolf
Jan 20, 2003

Will hawk false idols for heaps and heaps of dough.

etatoby posted:

After all, relational algebra is what makes databases tolerable. I just wish they had a nicer syntax than SQL. (My idea of a nice syntax is APL, so I know I'm in the minority there.)

You might like ISBL, then: http://posted-stuff.blogspot.com/2009/01/databases-information-system-base.html (sorry, best link I can find—it was never big)

Lonely Wolf
Jan 20, 2003

Will hawk false idols for heaps and heaps of dough.
You're just using the wrong syntax for the composite literal, if I'm understanding the question:

https://play.golang.org/p/uebkyYxuCN

Lonely Wolf
Jan 20, 2003

Will hawk false idols for heaps and heaps of dough.
Missed the party, but you can just write

code:
for range someData {
   //loops len(someData) times
}
if you don't care about the index or value, as of go 1.4

Lonely Wolf
Jan 20, 2003

Will hawk false idols for heaps and heaps of dough.
The prototype was called vgo (for versioned go) but it's baked in at tip and just called modules now. It lands with 1.11 which should be coming out shortly.

You can play with it now by getting the vgo prototype, which I believe is still being kept in sync, or you can grab the latest beta: https://golang.org/dl/#go1.11beta3

Adbot
ADBOT LOVES YOU

Lonely Wolf
Jan 20, 2003

Will hawk false idols for heaps and heaps of dough.
also note that unlike most build systems the go tool does not allow any arbitrary commands to run so it's not like it can run rm -rf ~ or whatever

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply