element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Single-Board Computers
  • Products
  • Dev Tools
  • Single-Board Computers
  • More
  • Cancel
Single-Board Computers
Forum Google Go on ARM
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Single-Board Computers to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 26 replies
  • Subscribers 59 subscribers
  • Views 3003 views
  • Users 0 members are here
  • debian
  • bbb
  • go
  • rasperry_pi
  • golang
  • arm
Related

Google Go on ARM

morgaine
morgaine over 12 years ago

Ealier today, selsinork wrote in another thread (new one here owing to my change of topic):

selsinork wrote:

 

Interestingly,  it's not so long ago that x86 systems were far less capable in terms of  memory, storage and likely CPU than today's ARM systems, yet were  perfectly capable of compiling everything required natively. How quickly  we forget, and how quickly we bloat the software with unnecessary junk  to the point this is no longer true.

That is so very true!!!

 

Software technology needs occasional revolutions too, just like society, to remove layers of accreted crud.  This happens so rarely in computing alas that we're up to our eyeballs in it and barely keeping our heads clear.  It is so rare that I'd like to highlight one relatively recent instance of it, although it is admittedly a revolution with a small 'r'  as it hasn't captured much mindshare in the computing industry.  It's the programming language Google Go.

 

It's not the Go language syntax nor semantics that are revolutionary,  although it is nice enough in both respects and has lots of very effective features especially for concurrent programming.  What is revolutionary about it is its implementation meme, which renouces the idea that building software is divorced from language definition and is performed by third party tools ("make" and its many equivalents in the commandline and IDE worlds) with limited knowledge of the language beyond syntax.  That almost universally prevalent idea has slowed down system building to a crawl right across the world of computing, and it's almost single-handedly reponsible for the problem you described.  (I'm referring to build time only here.)

 

Instead, Go provides integrated build tools and a software construction meme in which to compile a module requires looking only at its immediate dependencies, no further.  In other words, if module A is dependent on B, and B is dependent on C, then to compile A does not require looking at C.  (No explosion of header file lookups.)  Extrapolate this to complex systems with many layers of dependency in breadth and in which each dependency is itself dependent on multiple layers of dependency in depth, and as you can imagine, Go application building can be literally orders of magnitude faster than in most of the languages in common use today.  Many compiles are pretty much instantaneous despite having lots of dependencies.

 

That's "revolutionary" of the kind that removes decades of accumulated crud which has slowed down our systems to a crawl.  It's worth spreading the word about it.  Oh, and it works on ARM, not as efficiently as on x86 yet but it's improving all the time.  I think we should be using Go very widely for as much as possible outside the kernel.

 

Just today on one of my BBB's with Debian installed:

debian@bbb:#  apt-get install golang

...

Need to get 21.9 MB of archives.
After this operation, 81.4 MB of additional disk space will be used.

...

debian@bbb:$  go version

go version go1.0.2

debian@bbb:$  vi hello.go

debian@bbb:$  cat hello.go

package main

 

import "fmt"

 

func main() {
        fmt.Println("Hello, World!")
}

debian@bbb:$  go build hello.go

debian@bbb:$  ./hello

Hello, World!

debian@bbb:$

Viva la revolucion!  image

 

More seriously, it still has a long way to go in a few areas (integration/interoperation is one), but I see very good things ahead for Go.  I recommend that engineers add it to their toolbox and gradually expand their use over time.  Expect huge reductions in crud / time gains on large projects.

 

 

Morgaine.

  • Sign in to reply
  • Cancel

Top Replies

  • Former Member
    Former Member over 12 years ago in reply to morgaine +1
    Morgaine Dinova wrote: The result isn't in dispute. Anyone can experience it for themselves The result is rarely in dispute. At least not by anyone willing to do some simple comparisons. History, however…
  • morgaine
    morgaine over 12 years ago in reply to Former Member +1
    selsinork wrote: History, however, is littered with cases of the inferior choice 'winning'. VHS vs Betamax ? RPi vs * ? Yeah, but fortunately we can leave the discussions about "winning" to the respective…
  • morgaine
    morgaine over 12 years ago in reply to johnbeetem

    John Beetem wrote:

     

    When comparing the numbers, I'd want to know how much this is due to the amount of source code.  Since Go is fairly new, it probably hasn't accumulated anywhere near the number of libraries that GCC has.

    I tried to normalize for that difference, by saying "if an analogous set were to be constructed as fairly as possible".  Admittedly it doesn't really address the matter.  I suspect it's not really feasible to set up an accurate comparison.  Even if we tried to achieve feature parity by extra work on the Go libraries, someone would probably complain "Look, you used a more optimum algorithm there", and they might even be right.  The only thing that's certain is that compilation is fast.  The rest can probably be debated until the cows come home, and not wrongly.

     

    Also, what's the state of optimization in both cases?  I would think that a lot of GCC code is optimization and code generation for myriad platforms -- how does Go compare?

    It's a very good point, but from Go's lack of header files one instantly knows that the type of conditional compilation one finds in C systems to adapt code to different platforms just doesn't exist in Go.  I've read at least one article about how Go addresses this issue, and it seems to be through using different code trees for different platforms (Go has a concept of workspaces which are similar to include paths in C), so on each different platform you only build the modules written for that platform.  This isn't a problem, although it does require the engineer to split modules into platform-dependent and platform-independent parts.  That's good practice anyway though.

     

    That said, Go supports only a tiny number of platforms compared to the awesome tour de force that is gcc, so I'm certain that it has not encountered many of the problems that gcc has not only encountered but solved.  It's still early days for Go.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to johnbeetem

    Fortran IV, Algol (no recursion allowed), or MIX assembly language.  I'd sure hate to be stuck with those choices today.

     

    yeah, today you get Fortran 2008, MMIX, and all the recursion you want.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to johnbeetem

    John Beetem wrote:

     

    I used to collect programming language knowledge.  My opinion is that once you've learned enough  languages, you really don't need to know "all the details" of any of them except for the few you use on a day-to-day basis.

    Yep, and that's part of my point, with a good grasp of the 'how' the rest is just semantics. To a certain degree you can look up syntax and stuff, but to some extent or another I find myself thinking 'Oh yeah, they called that function something stupid in this language didn't they' when you can't find the thing you're looking for under anything obvious.  It's stuff like that wasting time that I don't like.

     

    I always encourage design of new programming languages.  I think we're far from getting it right, and different programming languages are suited to different sorts of problems,

    Oh, I agree that we're far from getting it right, but in the meantime we have to deal with the consequences of the mess we're left with.  Not entirely sure I agree that different languages are better suited to different problems and that comes down to them all being general enough to be useful, otherwise they're not popular enough to be known about., and a 'for' loop almost always works  exactly the same - if you can remember whether it's curly brackets, round ones or square ones and what order the params go in etc..

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • morgaine
    morgaine over 12 years ago in reply to Former Member

    selsinork wrote:

     

    History, however, is littered with cases of the inferior choice 'winning'. VHS vs Betamax ?   RPi vs * ?

     

    Yeah, but fortunately we can leave the discussions about "winning" to the respective teams of fanbois, and as engineers we'll just add our shiny new tool to our toolbox regardless.  From where I'm sitting right now I see a stack of Betamax tapes on the shelf, and there's a VHS box in the A/V rack.  I have Pi and BBB and Olimex and Arduino boards and many others, and they all have their niche.

     

    Hmmmm, this screwdriver really wins the contest against this hammer.  Oh wait, no, this chainsaw is absolutely FTW, I'm sure to assemble my IKEA furniture fastest with it ! image

     

    Perhaps IKEA furniture really is best assembled with a chainsaw, but that wasn't the point. image

     

    (Yes I know I'm preaching to the converted, heh)

     

    Not saying we should ignore Go either. but that's part of the problem, which ones to pick ?

     

    Because there are only 48 hours in the day, my approach is to gain just a small amount of practical acquaintance with each new tool that comes along so that the memory stays and the unexpressed fear of the unknown is defused, and then spend much longer reading up thoroughly on its background and features and people's experiences of its application.

     

    Engineers are not experts at everything, but they're damn good at knowing what tool might be worth trying if they've been exposed to it before --- the more breadth of exposure the better.  And only at that point do you allocate priceless time to dive in deep.

     

    (Conversely, without that prior exposure they will never know that they would have made a different choice if they had been suitably informed, and that's deeply unfortunate.)

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • johnbeetem
    johnbeetem over 12 years ago in reply to Former Member

    selsinork wrote:

     

    ... Not entirely sure I agree that different languages are better suited to different problems and that comes down to them all being general enough to be useful, otherwise they're not popular enough to be known about...

    I think a language becomes popular largely because it has a "killer application" or a fierce evangelist (or dictator) in the right environment.  For example, C spread quickly thanks to Unix in spite of Pascal being a more friendly language, and Java spread quickly since it allowed Internet applications to run on so many platforms.  According to my understanding of Wikipedia, Objective-C was nurtured by Steve Jobs at NeXT and he brought it back to Apple with him, where I believe it's the only allowed language for iPhone applications.  I haven't heard of its being used outside of Apple applications, but this could be because I'm not listening at the right places.  I don't know anything about Objective-C other than what's at Wikipedia, so feel free to correct and/or elaborate.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to morgaine

    Morgaine Dinova wrote:

     

    Perhaps IKEA furniture really is best assembled with a chainsaw, but that wasn't the point. image

    Give them some credit, they give you enough extra bits of metal and spare allen keys to build your own chainsaw.  My only ikea furniture is two desks and I swear I'll never need to buy allan keys again until the end of time image

     

    Way to go on thread drift BTW image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
<
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube