This week's book giveaways are in the AI and JavaScript forums.
We're giving away four copies each of GANs in Action and WebAssembly in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

Head First Go: How is Go at working with hardware?

 
Ranch Hand
Posts: 574
VI Editor Chrome Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I write OS guts and device drivers, typically in C.  Would Go be appropriate in these hardware-centric domains?

 
Author
Posts: 22
5
Mac Ruby Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This isn't my area of expertise, but a bit of Googling confirmed my suspicions: while you probably can write device drivers and such in Go, you probably shouldn't. Compiled Go programs are a bit large - many of the simple programs from Head First Go are 2 megabytes apiece when compiled, for example. Also, while Go programs are generally almost as fast as C or C++ programs, performance is so critical in device drivers that the automatic garbage collection might make a Go driver too slow.

See this Quora thread for some more detailed answers.
 
Saloon Keeper
Posts: 21569
146
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On the other hand, if I'm not mistaken, a large part of the Docker Container management system is written in Go, and while that's not quite the same thing as talking to raw hardware, it's not too far off the mark.
 
Eliminate 95% of the weeds in your lawn by mowing 3 inches or higher. Then plant tiny ads:
Sauce Labs - World's Largest Continuous Testing Cloud for Websites and Mobile Apps
https://coderanch.com/t/722574/Sauce-Labs-World-Largest-Continuous
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!