Coder Social home page Coder Social logo

Hi there 👋

Embedded Programming is my passion

  • Still sticking with C (liking function pointer arrays) in micro-controllers.

My favorite PC language is Go

Why?

  • Go is open source, sponsored, professionally developed and used by Google.
  • Go is a multi-purpose language.
  • Go is object oriented.
    • Go uses composition instead of inheritance - programs get cleaner this way.
  • In Go interfaces are implicit - they need no explicit declaration.
    • This allows clean and simple APIs in your code without unneeded dependencies.
  • Go is easy to learn, to use and gives quick programming success.
  • Go is a compiled language, therefore checks a lot before building the code.
    • You get most errors at compile-time and not at run-time as with scripting languages (like Python). The Go compiler itself is fast. It allows script like usage of Go as well.
    • The Go program execution is fast.
      • Could be about half speed of a well written C program - not relevant for normal use cases. To get an equivalent "well written C programm" takes much longer than getting the Go program for a specific task.
  • Go is a managed language making memory leaks impossible.
    • No explicit memory allocation and free.
  • Go supports slices, a very light array management struct.
  • Go has pointers but no pointer arithmetic, making code more reliable this way.
  • Go is designed to use multi-core machines and single-core ones and allows easy multi-threading and inter-process communication.
    • Concurrent programming using Go rotines and channels allow efficient program structures.
    • Parallel execution allows to use the full multicore power of modern systems easyly.
    • Concurrency is not Parallelism by Rob Pike
  • The auto-formatting as languge part is very comfortable.
    • This allows a bunch of helper tools.
  • A testing environment comes with the language. Fuzzying is supported.
    • Simply create my_test.go files inside your Go package and run go test ./... in the project root.
  • You get a stand-alone runnable without libraries dependencies.
    • No missing library anymore.
    • No install ... before running an executable.
  • Many platforms are supprted, also mobile development.
  • Go has an integrated documentation System.
    • Just add comments to your functions.
  • Easy Visibility control: Packages export UppercaseFunction and hide lowerCaseFunction.
  • Go can use C/C++-code and vice versa, but crossing the border takes time, so avoid that in loops.
  • Compatibility: Legacy Go code runs on new Go versions.
  • Go has generics now.

Disadvantages?

  • Not made for small microcontrollers.
  • Not well suited for fast hard real-time applications on sub-millisecond level because of the stop-the-world garbage collector.
    • BUT: The GC gets better and better with new Go versions AND avoiding that Go uses the heap heavily, avoids GC at all.

More Information

Some Details

Examples

Learning

What I use Go for?

  • The Trice tool is written in Go.
  • Test tools stimulating embedded devices under test.

Thomas Höhenleitner's Projects

cobs icon cobs

COBS implementation in Go (Decoder) and C (Encoder & Decoder) with tests.

goiv icon goiv

Small and simple image viewer written in pure Go.

gostlink icon gostlink

Go library for using stlink rtt support based on gousb

gotty icon gotty

Share your terminal as a web application

hmp2020-go-bindings icon hmp2020-go-bindings

Rohde&Schwarz Power Supply HMP & NG series (HPM2020 tested) Remote Control with Go over USB (Virtual Com Port)

jaylink icon jaylink

Go bindings for the libjaylink library.

koreader icon koreader

An ebook reader application supporting PDF, DjVu, EPUB, FB2 and many more formats, running on Cervantes, Kindle, Kobo, PocketBook and Android devices

tcobs icon tcobs

short messages compression with COBS framing using implicit run-length-encoding, optimized for data containing statistically a bit more 0 and FF bytes in a row, as data often carry 16, 32 or 64 bit numbers with small values.

trice icon trice

🟢 super fast 🚀 and tiny 🐥 embedded device 𝘾 printf-like trace ✍ code, works also inside ⚡ interrupts ⚡ and real-time PC 💻 logging (trace ID visualization 👀)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.