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 2996 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…
  • johnbeetem
    johnbeetem over 12 years ago in reply to Former Member

    coder27 wrote:

     

    ... You don't see anyone suggesting to ... teach two sections of an introductory programming class, using

    two different languages, to see which section does better.

    I suspect the result will be that whichever has the better teacher who is more enthusiastic about the language being taught will do better.  For example, I'd do better teaching ASM than C++ because I love the simplicity and hands-on character of ASM versus the complexities of C++.  JMO/YMMV.

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

    If you're hung up on the word "revolution" I'll withdraw it, since it's not essential to my point.

     

    My point was to answer selsinork's correct observation that our computing systems have become bloated with so much unnecessary cruft that they behave like machines of yesteryear despite being far more capable on spec.  I offered Go as a very practical example of the removal of accumulated cruft, since it compiles extremely fast by combining an effective module system that eliminates deep traversals of dependencies and a language-aware build tool that uses knowledge of that module structure to reduce compilations to a minimum, without manual configuration.

     

    The result isn't in dispute.  Anyone can experience it for themselves by compiling the entire Go compiler suite in a few seconds and the entire modules library in a small number of minutes.  The gcc equivalents (if an analogous set were to be constructed as fairly as possible) would take many hours to build.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to johnbeetem
    I suspect the result will be that whichever has the better teacher who is more enthusiastic about the language being taught will do better.  For example, I'd do better teaching ASM than C++ because I love the simplicity and hands-on character of ASM versus the complexities of C++.  JMO/YMMV.

     

    Agreed.  That's why it isn't done, because everyone would dismiss the results as being biased

    by uncontrolled factors.   Similarly nobody suggests teaching programming with a class full of

    Windows PC compared to a class full of RPi's to test the theory that RPi's make for better learning,

    before proposing to buy millions of RPi's.

     

    But that's what sets apart pseudo science from real experimental science, where you routinely do

    experiments that control for extraneous factors to some degree of statistical significance.

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

    selsinork wrote:

     

    Arguing the merits of particular languages is something I try to avoid.

    My post was not about the language Go itself --- all I said about the language was that it is "nice enough" and "effective".  I tend to regard details of language syntax as decorative and semantics as all largely the same, at least among imperative languages.  In that sense Go is no different to C or Java or a thousand other languages of this family.

     

    What I've been describing here instead is how the Go implementation manages the dependencies between modules, and how its build tool capitalizes on that.  In many ways it's "just an implementation detail", but it's a crucial one if we don't want our development cycle to slow to a crawl.  As you wrote yourself, "we bloat the software with unnecessary junk".  Occasionally we need a purge.

     

    What I see a lot though is that Go is just number 315 added to a list that used to be smaller.

    BBB was board #731 added to a list that used to be smaller.  That doesn't mean that we should have ignored it.  image

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

    Morgaine Dinova wrote:

     

    The result isn't in dispute.  Anyone can experience it for themselves by compiling the entire Go compiler suite in a few seconds and the entire modules library in a small number of minutes.  The gcc equivalents (if an analogous set were to be constructed as fairly as possible) would take many hours to build.

    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.  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?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to morgaine
    What I've been describing instead here is how the Go implementation manages the dependencies between modules, and how its build tool capitalizes on that.

     

    I think that's a fair point.  But you have to take into account the effect of multi-core machines.

    If module A depends on C, and module B depends on C, and you change C, you might like

    to be able to compile A and B in parallel without first recompiling C.

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

    BBB was board #731 added to a list that used to be smaller.  That doesn't mean that we should have ignored it.  image

    But what can we say scientifically about it?

     

    We can say its ethernet isn't built on top of usb, but do we have experiments to show

    that ethernet speed is unaffected by usb traffic?

     

    Can we say that BBB doesn't have any of the types of USB and SD card problems

    that have plagued RPi?  Do we know anything about the USB hardware and/or driver?

     

    E14 sells both, but they apparently don't have any sort of side-by-side comparison

    beyond what connectors and such are provided.

    • 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:

     

    My post was not about the language Go itself

    I understand that, my point was that it's simply 'yet another language' I need to learn about. The merits of any particular one, or their supporting systems and compilers are largely irrelevant when I simply don't have the capability to keep all the details of all of them in my head at once.  You've made similar observations in other discussions, it's the limitations of us humans to keep a handle on all the details that's a big part of the problem.

     

    BBB was board #731 added to a list that used to be smaller.  That doesn't mean that we should have ignored it.  image

    Not saying we should ignore Go either. but that's part of the problem, which ones to pick ?   RPi is highly popular but has a ton of issues leading various of us to write it off for anything serious, should we ditch python because it's popular like the Pi image

    • 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:

     

    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, is littered with cases of the inferior choice 'winning'.

    VHS vs Betamax ?   RPi vs * ?

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

    selsinork wrote:

     

    I understand that, my point was that it's simply 'yet another language' I need to learn about. The merits of any particular one, or their supporting systems and compilers are largely irrelevant when I simply don't have the capability to keep all the details of all of them in my head at once.

    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.  The others are usually just combinations of the various features of other languages, often adding an elegant construct, and occasionally adding interesting semantics.  You can look up the details when needed.  I think LISP and Haskell and Icon and SNOBOL have some wonderful features, but they're really not well suited to the kind of programming I do these days which follows C semantics.  I've read a bit about Python and I've seen examples of Python code, and from what I can tell it's a nice follow-on to SETL and has nifty generators like Icon and Smalltalk.  Well, that's "groovy" and I'm glad people are having fun programming, but the C semantics work fine for me.

     

    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, just like some human languages are better suited to poetry while others are better suited to profanity or giving orders.  I personally find French to be the best language for expressing exasperation, and often use it when driving: Qu'est-ce q'il fabrique là?  Est-ce pour aujourd'*** ou pour demain?  When I took my data structures course, I had a choice of programming languages: Fortran IV, Algol (no recursion allowed), or MIX assembly language.  I'd sure hate to be stuck with those choices today.

     

    I do most of my programming in GalaxC.  Very flexible use of syntax with C semantics.  Works for me, but it will be a long time before you'll need to know anything about it for your job, so no need to add it to your list. 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