Profile

Cover photo
Edward Muller
162 followers|30,718 views
AboutPostsPhotosYouTube+1's

Stream

Edward Muller

Discussion  - 
 
Dumb cgo Q:

How do I make a buffer that is usable with a C function that is called like so:  void fill_buf(void * const buf, const size_t size);

And then how do I call it?

I assumed it was something like

  buf := make([]byte, num)
  C.fill_buf((*C.char)(unsafe.Pointer(&buf[0])),C.size_t(num))

But apparently not
1
Roger Roach's profile photoEdward Muller's profile photoroger peppe's profile photoBrad Fitzpatrick's profile photo
6 comments
 
oh yeah, i'd forgotten that unsafe.Pointer was void*
Add a comment...

Edward Muller

Discussion  - 
 
Assuming you have a few different structs that implements a common interface, is there any way to make a map of the types and then do something like new(mapVariable["key"]) to get a new instance of the type that was looked up at "key" ?
1
Chris Hines's profile photoGraeme Connell's profile photoJimmy Zelinskie's profile photoroger peppe's profile photo
5 comments
 
Here's a similar technique to Graeme's but more direct:
http://play.golang.org/p/4rAhQO3ZNm
Add a comment...

Edward Muller

Shared publicly  - 
 
Yep
1
Add a comment...

Edward Muller

Shared publicly  - 
 
This is sad IMO, flying Birgin America is a pleasure compared to other airlines. I fly it whenever I can. It's the Apple of airlines.
1
Add a comment...

Edward Muller

Shared publicly  - 
 
OoOoOoO. Time for a trip down memory lane?
Fred Hicks originally shared:
1
Add a comment...
In his circles
392 people
Have him in circles
162 people
Rhys Elsmore's profile photo
Greg Nokes's profile photo
Sam Merritt's profile photo
Noah Zoschke's profile photo
Mindy Rose Tyler's profile photo
Matt Korn's profile photo
Matt Manning's profile photo
Andy Delcambre's profile photo

Edward Muller

Discussion  - 
 
Import a specific git ref?

Is it possible to import a git repo at a specific git reference? Perhaps a branch with a bug fix, or wanting to lock it to a specific release, etc.

This can obviously be done by importing the package, go get it, then cd to  where it was cloned to, then checkout the sha you want, I was just wondering if there was a way to record this somehow in your import statement.
2
1
Edward Muller's profile photoNiklas Schnelle's profile photoJason Travis's profile photoCaleb Spare's profile photo
6 comments
 
Would be a great feature request, maybe using tags or comments
Add a comment...

Edward Muller

Discussion  - 
 
Anyone know how I free the memory allocated for a struct in cgo? https://gist.github.com/4552031 #golang
1
Edward Muller's profile photoAndrew Wilkins's profile photo
2 comments
 
Oh cool.
Add a comment...

Edward Muller

Shared publicly  - 
 
Watching the first Mythbusters episode with L. Amazed at how much improved the production quality of current episodes is vs the original.
1
Add a comment...

Edward Muller

Shared publicly  - 
 
I have a motorcycle again! $1.4k later though. :-(
1
Gray Pawn's profile photo
 
+/- 1!
Add a comment...
People
In his circles
392 people
Have him in circles
162 people
Rhys Elsmore's profile photo
Greg Nokes's profile photo
Sam Merritt's profile photo
Noah Zoschke's profile photo
Mindy Rose Tyler's profile photo
Matt Korn's profile photo
Matt Manning's profile photo
Andy Delcambre's profile photo
Work
Occupation
Computer Geek
Story
Tagline
Geek, Motorcyclist, Occasional Runner, Slum Lord, Fat Man
Introduction
Geeker
Basic Information
Gender
Male
Edward Muller's +1's are the things they like, agree with, or want to recommend.
The Humble Indie Bundle #4 (pay what you want and help charity)
www.humblebundle.com

Pay what you want for a collection of awesome games, and help support two charities. All of the games are DRM-free and support Mac, Windows,

Adblock Plus for Google Chrome™ (Beta) - Chrome Web Store
chrome.google.com

Ads were yesterday! The successful extension Adblock Plus is now available for Google Chrome™.

YouTube - Arduino 101 #2 Motor Control
www.youtube.com

Create AccountSign In. Home. BrowseMoviesUpload. Hey there, this is not a commercial interruption. You're using an outdated browser, whi

Astronomy Without A Telescope – How Big Is Big?
www.universetoday.com

You may have seen one of these astronomical scale picture sequences, where you go from the Earth to Jupiter to the Sun, then the Sun to Siri

Decoration is best, except when it isn’t | Virtuous Code
devblog.avdi.org

Consider an adventure game, with objects representing player characters. class Character # ... end. A Character can be described: class Char

Freezing Your Tuples Off, Part 1
www.databasesoup.com

Given that it's currently around 50F, damp and foggy in San Francisco (so much for Indian Summer), my thoughts turn to freezing. Specificall

PostgreSQL: Documentation: 8.1: Operator Classes
www.postgresql.org

Operator Classes. An index definition may specify an operator class for each column of an index. CREATE INDEX name ON table (column opclass

Anti-capitalism 101 - Literate Programming
blog.steveklabnik.com

Anti-capitalism 101. People are often surprised to find out that I identify as an anti-capitalist. At least in America, many people see capi

sysadvent: Day 19 - Upstart
feedproxy.google.com

This article was written by Jordan Sissel (@jordansissel). In past sysadvents, I've talked about babysitting services and showed how to

WorkFlowy.com - Organize your brain.
workflowy.com

Press. Not since Dropbox has a new service had so much impact on me personally. I have it open at all times. ~ The Next Web. by Fatema Yasmi