The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,861 other subscribers

Archive for the ‘Go (golang)’ Category

variables – What is “_,” in a Golang declaration? – Stack Overflow

Posted by jpluimers on 2020/09/29

As a (then) go lang n00b, the less upvoted answers helped me e lot: [WayBack] variables – What is “_,” in a Golang declaration? – Stack Overflow:

  • The Go compiler won’t allow you to create variables that you never use.

    for i, value := range x {
       total += value
    }

    The above code will return an error message “i declared and not used”.

    Since we don’t use i inside of our loop we need to change it to this:

    for _, value := range x {
       total += value
    }
  • _ is the blank identifier. Meaning the value it should be assigned is discarded.

    Here it is the value of example key that is discarded. The second line of code would discard the presence boolean and store the value in prs.
    So to only check the presence in the map, you can discard the value. This can be used to use a map as a set.

–jeroen

Posted in Development, Go (golang), Software Development | Leave a Comment »

learning golang

Posted by jpluimers on 2020/05/21

Interesting course: [WayBack] Go: The Complete Developer’s Guide (Golang) | Udemy Master the fundamentals and advanced features of the Go Programming Language (Golang)

It covers:

  • Basics / Hello world
  • Structs
  • Pointers
  • Interfaces
  • Channels / Go Routines

–jeroen

Posted in Development, Go (golang), Software Development | Leave a Comment »

GitHub – Purik/AIO: Coroutine-based multithreading library for Delphi

Posted by jpluimers on 2019/08/06

On my list of things to try: [WayBack] GitHub – Purik/AIO: Coroutine-based multithreading library for Delphi which are similar to what golang does.

Coroutine-based multithreading library for Delphi. Contribute to Purik/AIO development by creating an account on GitHub.

Via [WayBack] What you think about coroutine-based multithreading concurrency in Delphi like GoLang https://github.com/Purik/AIO Probably evolution paths, actuality… – Павел Миненков – Google+

–jeroen

Posted in Delphi, Development, Go (golang), Software Development | Leave a Comment »

It was all Greek to me: Iota · golang/go

Posted by jpluimers on 2019/05/21

Context is king!

Being Dutch, my association with iota was the phrase “Ik snap er geen iota van” (English: “It’s all Greek to me”), basically indicating iota is extremely small, similar to [WayBack] Iota | Definition of Iota by Merriam-Webster:

1an infinitesimal amount jot  (did not show an iota of interest)
2the 9th letter of the Greek alphabet — see alphabet table

But the first time, I saw iota used in golang, I actually confused it with [WayBack] itoa – C++ Reference, because I am more than slightly wordblind.

So code like this was all Greek to me at first, not understanding the conversion from integer to ASCII**, and slightly later, not understanding iota to be extremely small either. Heck, its usage indicates it is small from infinitesimal:

const (
    _           = iota // ignore first value by assigning to blank identifier
    KB ByteSize = 1 << (10 * iota)
    MB
    GB
    TB
    PB
    EB
    ZB
    YB
)

So it took me a bit of thought to realise that it actually had to mean something completely different, so I found

It makes me wonder why they named it like this.

Slightly related:

–jeroen

Read the rest of this entry »

Posted in C++, Development, Go (golang), Software Development | Leave a Comment »

gdbgui – browser based debugger for C, C++, go, rust, Fortran. Modern gdb frontend.

Posted by jpluimers on 2019/03/05

[WayBack] gdbgui – browser based debugger for C, C++, go, rust, Fortran. Modern gdb frontend.: gdbgui (gnu debugger graphical user interface)

Via: [WayBack] Browser-based debugger for C, C++, go, rust, and more – written in Python with Flask. https://github.com/cs01/gdbgui Easy installation via PyPI: pip i… – Joe C. Hecht – Google+

–jeroen

Posted in C, C++, Debugging, Development, Fortran, GDB, Go (golang), Python, Scripting, Software Development | Leave a Comment »

The Way of the Gopher – Digg Data – Medium

Posted by jpluimers on 2019/02/19

Interesting read, especially about the node event-loop which tries to mask it is single threaded by doing cooperative multi-tasking: [WayBackThe Way of the Gopher – Digg Data – Medium – Making the Switch from Node.js to Golang.

It mentions [WayBack] GitHub – gengo/goship: A simple tool for deploying code to servers.

Via: [WayBackJonas Bandi on Twitter: “There’s that alarm that goes off in my brain when I read about something being fast and easy and production-level.”

https://twitter.com/jbandi/status/1026868884266278912

–jeroen

Posted in Development, Go (golang), JavaScript/ECMAScript, Node.js, Scripting, Software Development | Leave a Comment »

Trying to get golang working on a new system I learned a few things…

Posted by jpluimers on 2018/12/04

From a G+ post a while ago, but they still hold after seeing much more golang projects: [WayBack] Trying to get golang working on a new system I learned a few things today: … – Jeroen Wiert Pluimers – Google+

This is too bad as it indicates a lot of golang programmers are not that aware of maintaining projects for the longer term, nor about the real meaning of cross platform over time.

  • many golang developers have a hate relationship towards non-standard systems, especially Windows, likely because history has not proven to them yet that systems over time are distinctly different, even in the same family of operating systems
  • much golang tooling radiate “showing progress or logging is for whimps, it it takes time, wait, or watch a process monitor like ps, task manager or activity monitor), like for instance this issue that has been open for a year https://github.com/golang/dep/issues/1001 [WayBack]
  • few golang developers understand that there are older versions of make (especially the Borland one) with different syntaxes. The ones that do not, sort of get mad, failing to understand developing software is 80+% maintenance, meaning keeping old stuff around so you are sure you can build things depending on that old stuff.
  • many of the Makefile entries are filled with bashisms which makes it hard to use with different shells

Fun: [WayBack] Capitalization of GoLang should actually be golang. It’s also not automatic… | Hacker News

–jeroen

Posted in Development, Go (golang), Software Development | Leave a Comment »

brew install go in a mac is easy with homebrew

Posted by jpluimers on 2018/06/07

Installing go in one go:

$ brew install go
Updating Homebrew...
...
==> Downloading https://homebrew.bintray.com/bottles/go-1.10.2.sierra.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/48/4823ec642228f0a3746fe490ebd33f935d1c53424638792c20035ce0c3e8281e?__gda__=exp=1525363605~hmac=ff794ae42583750331da7067db58f71993bbe870b5833fc08e79908ed2afcc06&
######################################################################## 100.0%
==> Pouring go-1.10.2.sierra.bottle.tar.gz
==> Caveats
A valid GOPATH is required to use the `go get` command.
If $GOPATH is not specified, $HOME/go will be used by default:
  https://golang.org/doc/code.html#GOPATH

You may wish to add the GOROOT-based install location to your PATH:
  export PATH=$PATH:/usr/local/opt/go/libexec/bin
==> Summary
🍺  /usr/local/Cellar/go/1.10.2: 8,161 files, 336.8MB

–jeroen

Posted in Development, Go (golang), Software Development | Leave a Comment »

A Tour of Go

Posted by jpluimers on 2018/04/10

[Archive.isA Tour of Go

and

Paw is a full-featured and beautifully designed Mac app that makes interaction with REST services delightful.Whether you are an API maker or consumer, Paw helps you build HTTP requests, inspect the server’s response and even generate client code.

[WayBackPaw – The most advanced API tool for Mac

via:

–jeroen

Posted in Development, Go (golang), Software Development | Leave a Comment »

GitHub – keith-turner/ecoji: Encodes (and decodes) data as emojis

Posted by jpluimers on 2018/03/14

[WayBack] GitHub – keith-turner/ecoji: Encodes (and decodes) data as emojis:

Ecoji 🏣🔉🦐🔼

Ecoji encodes data as 1024 emojis, its base1024 with an emoji character set. As a bonus, includes code to decode emojis to original data.

Sick. Works splendid when all your systems are fully nice to Unicode.

None are. So there’s a German word for it:

Nein

Via:

 

–jeroen

Read the rest of this entry »

Posted in Development, Encoding, Fun, Go (golang), Software Development, Unicode | Leave a Comment »