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,860 other subscribers

Archive for the ‘Go (golang)’ Category

Alan Turing Wrote Object-Oriented Code In C And Ran It On BEAM – De Programmatica Ipsum

Posted by jpluimers on 2025/07/16

I originally missed this as back then I was in the midst of managing trouble in my parental family, unaware I was already having rectum cancer. Then things went fast, not even including the Covid-19 years, so I was glad last year I got reminded of this mid-2019 article:

[Wayback/Archive] Alan Turing Wrote Object-Oriented Code In C And Ran It On BEAM – De Programmatica Ipsum writes a lot of interesting things on programming paradigms, starting with

In his rare 1994 book “Object-Oriented Programming In C” Axel Tobias Schreiner explains how to do inheritance, class methods, class hierarchies, and even how to raise exceptions using nothing else than pure, simple, pointer arithmetic-filled, ANSI C.

then arguing basically most of not all modern languages share the majority of programming paradigms and all these paradigms are repeats of the past:

These days, we are using the offsprings of multiple programming paradigms having unprotected sex with one another in a thoughtful orgy. PHP, C#, Perl, C++ and even Visual Basic have all closures, lambdas or anonymous functions now. F# and Scala can instantiate any class included in their corresponding vendor-provided frameworks. JavaScript implements functions as objects with a single method .call(). Haskell comonads are actually objects. Swift 1.0 implemented instance methods as curried functions.
But none of this is new. Smalltalk, arguably the precursor of object orientation, had collect and select methods which were the grandparents of our more common map and filter functional friends.

What sets modern languages apart is that they the majority covers all the paradigms you might need, just differing in how well they support the paradigm-du-jour.

It means programming language wars should have been a thing of the past for about two decades now.

Please let that sink in.

 

Oh: if you look for that ANSI C book, here it is: [Wayback/Archive] https://www.cs.rit.edu/~ats/books/ooc.pdf [Wayback PDF View/PDF View]

 

Via: [Wayback/Archive] De Programmatica Ipsum: “”In his rare 1994 book “Object…” – mas.to

--jeroen

Posted in .NET, C, C#, C++, Cloud, COBOL, Containers, Design Patterns, Development, Docker, Erlang, F#, Go (golang), Haskell, Infrastructure, Java, Java Platform, Kotlin, Kubernetes (k8n), ObjectiveC, OOP (Object Oriented Programming), Perl, Scala, Scripting, Software Development, Swift, VB.NET | Leave a Comment »

badamczewski/PowerUp: ⚡ Decompilation Tools and High Productivity Utilities ⚡

Posted by jpluimers on 2025/07/10

Below is a really cool tool-set for Visual Studio Code of which its development started when I was recovering from life-saving bowel-surgery during the series of procedures to get rid of my metastasised rectum cancer.

It supports decompilation of various languages (.NET C# and F#, GO, Rust and clang) into either x86 assembler or IR (Intermediate Representation, on the .NET side often also called IL for Intermediate Language) to research how well a compiler stack behaves.

[Wayback/Archive] badamczewski/PowerUp: ⚡ Decompilation Tools and High Productivity Utilities ⚡:

Read the rest of this entry »

Posted in .NET, C#, C++, Development, F#, Go (golang), Rust, Software Development | Leave a Comment »

GitHub: finding the oldest commit on large repositories

Posted by jpluimers on 2025/06/25

The manual process of getting back to the earliest commit of a GitHub repository is easy for small repositories, but for a large one it is very tedious.

TL;DR: there are various ways, but the easiest was the INIT Bookmarklet below.

Note: 2 weeks before the scheduled post made it to the front of the queue, I got a report¹ that it started to fail. Here it still works.

It’s hard to debug because of the functional programming approach taken.

Read the rest of this entry »

Posted in Bookmarklet, C, Conference Topics, Conferences, Development, DVCS - Distributed Version Control, Event, git, GitHub, Go (golang), JavaScript/ECMAScript, Power User, Scripting, Software Development, Source Code Management, Web Browsers | Tagged: , , | Leave a Comment »

GitHub – walles/moar: Moar is a pager. It’s designed to just do the right thing without any configuration.

Posted by jpluimers on 2025/05/08

Having used less for 40+ years now, I wonder how moar measures up to it: [Wayback/Archive] GitHub – walles/moar: Moar is a pager. It’s designed to just do the right thing without any configuration.

Features I at least expect are in [Wayback/Archive] less: display the contents of a file in a terminal | less Commands | Man Pages | ManKier.

Via [Wayback/Archive] Johan Walles recently commenting on [Wayback/Archive] linux – How can I have less automatically decompress xz files like it did with gz files on my old SUSE distro? – Super User.

--jeroen

Posted in *nix, *nix-tools, Apple, BSD, Development, Go (golang), Mac, Mac OS X / OS X / MacOS, Power User, Software Development | Leave a Comment »

Weather info in plain text or JSON

Posted by jpluimers on 2025/03/06

Two sites that can help you out getting weather info on the console:

wttr.in

wttr.in is developed by [Wayback/Archive] Igor Chubin (@igor_chubin) / X and looks at the request header to figure out what kind of output it sends.

It supports various output formats, so on my TODO list is to see how they do their mapping: always an opportunity to learn (it’s based on Python and Go so I am curious what libraries they use as well).

From the documentation:

wttr.in currently supports five output formats:

  • ANSI for the terminal;
  • Plain-text for the terminal and scripts;
  • HTML for the browser;
  • PNG for the graphical viewers;
  • JSON for scripts and APIs;
  • Prometheus metrics for scripts and APIs.

The ANSI and HTML formats are selected based on the User-Agent string.

There are more parameters in the documentation on the main page of the repository and through this command:

curl wttr.in/:help

The idea is derived from [Wayback/Archive] GitHub – schachmat/wego: weather app for the terminal.

Oh: Igor has more repositories at [Wayback/Archive] chubin (Igor Chubin) · GitHub (including [Wayback/Archive] GitHub – chubin/cheat.sh: the only cheat sheet you need which is hosted at [Wayback/Archive] cheat.sh; I thought I had blogged about that before, but found it only in a draft note mentioning that I got it via [WaybackSave/Archive] Nicolas Krassas on X: “The only cheat sheet you need cheat.sh)

7timer

A 7 timer JSON usage example is at [Wayback/Archive] Get Weather from 7Timer! · GitHub

It has documentation at

Output formats can be chosen from HTML, PNG, XML and JSON.

Via

[Wayback/Archive] Hacker Public Radio – hpr4266 :: What’s the weather?
Lee writes a script to check what the weather is like ~ The Technology Community Podcast

HPR is a great podcast series!

--jeroen

Posted in *nix, *nix-tools, ash/dash, bash, bash, Development, Go (golang), JavaScript/ECMAScript, JSON, Power User, Python, Scripting, Software Development, Web Development, XML/XSD | Leave a Comment »

Ghostbin – lightweight, but unmaintained

Posted by jpluimers on 2024/11/06

A while ago, I saw a [Wayback/Archive.is] Ghostbin url, a Pastebin type of text storage site, so I got curious.

It seems the code (mostly Go and JavaScript) is on GitHub, but unmaintained software for years.

Here are some URLs I found:

I got there via [Archive.is] Kristian Köhntopp on Twitter: “Using ML^wSQL to make Twitch a safe space. … Technology prevails!… “ who pointed to [Wayback/Archive.is] Ghostbin (part of a SQL script that tries to make Twitch a “safe” place). That was a follow-up on [Wayback/Archive.is] Reddit: Over 120GB of Twitch website data has been leaked online (source code, encrypted passwords, streamer payouts, etc.) : Twitch

Oh, I also learned about other open source paste systems: ZeroBin is unmaintained software as well ([Wayback/Archive.is] since mid 2016), but got forked into PrivateBin.

Some more links:

–jeroen

Read the rest of this entry »

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

Oh boy, VB.NET and JavaScript both have a `with` keyword too!

Posted by jpluimers on 2024/03/05

Last year, within a week, I saw two tweets of languages that, like Pascal, have a with statement as well:

  1. [Archive.is] Shawn Wildermuth 💻☕🎸🎥🎮 on Twitter: “JavaScript’s Forgotten Keyword (with)”
  2. [Archive.is] John Kaster #BlackLivesMatter on Twitter: “@suited_aces @marcocantu @delphijunkie @JimMcKeeth @jpluimers I present “with”… “

The first points to an article that shows the JavaScript implementation of with is very similar to the Pascal one: [Wayback] JavaScript’s Forgotten Keyword (with) – DEV Community.

Just in case some of my readers do not know my opinion of the Pascal with statement  (it even has it’s own blog category), I really think you should not use it Delphi: you should avoid the with statement as it makes your code less future proof.

The reason not to use it is called [Wayback] Accidental Shadowing in computer language speak (it also can rear its head when you define variables at different block levels like for instance this golang example: [Wayback] Warning for accidental variable shadowing with block scope – Technical Discussion – Go Forum).

Even the JavaScript specification advises against using the with keyword in [Wayback] with – JavaScript | MDN

**Warning:**Use of the with statement is not recommended, as it may be the source of confusing bugs and compatibility issues. See the “Ambiguity Contra” paragraph in the “Description” section below for details.

There have been various proposals to extend the Delphi implementation of the with statement to make it more resilient to Accidental Shadowing by forcing the usage to be prepended by a . (dot) or alias, as for instance seen in [Wayback] Re: “with” Coders are Monsters – delphi / [Wayback] delphi • View topic • “with” Coders are Monsters:

This is in fact what the second twitter messages pointed to: a VB.NET example doing just that: prepend with a dot: [Wayback] Maarten Balliauw on Twitter: “Looks like using With makes it pretty clean!… “

I was not even aware that VB.NET had it, but it has: [Wayback] With…End With Statement – Visual Basic | Microsoft Docs

And it has similar debugging issues as with Delphi as per [Wayback] The VB.NET ‘With’ Statement – embrace or avoid? – Stack Overflow:

Find the beginning of a With statement and set a breakpoint. Step to the next line (so you’re hiding the first line right under the if block). Highlight it, then ‘Add Watch’. You should see this: ‘With’ contexts and statements are not valid in debug windows.

–jeroen

Posted in .NET, Delphi, Development, Go (golang), JavaScript/ECMAScript, Pascal, Scripting, Software Development, VB.NET, With statement | Leave a Comment »

Julia Evans (b0rk on Twitter) does not just make cool zines (like the DNS one) but also cool sites (the DNS lookup one). It’ is better than Google Toolbox, IntoDNS and others

Posted by jpluimers on 2024/01/31

A while after writing notes on updating DNS info with bind DNS, b0rk (Julia Evans) posted about her DNS zine which got a reply about her DNS lookup tool. Below is part of that thread.

The reason I post is that – unlike the Google DNS ToolBox – you can bookmark her DNS tool link including the actual search part, which makes it far easier to do systems administration.

Examples:

There is a trace tool too:

The thread:

Read the rest of this entry »

Posted in Development, DNS, Go (golang), Internet, Power User, Software Development, Web Development | Leave a Comment »

Google Cloud Shell: tools, languages and “safe mode”

Posted by jpluimers on 2023/01/19

After publishing Free Linux cloud shell for Gmail users – shell in the browser that works in all locations I’ve been so far, the Google Cloud Shell got extended quite a bit.

There is now [Wayback/Archive] Safe Mode (which skips initialisation scripts):

If there’s a problem in your .bashrc or .tmux.conf files, Cloud Shell immediately close after connection. To resolve this, open Cloud Shell in safe mode by appending cloudshellsafemode=true to the URL. This restarts your Cloud Shell instance and logs you in as root, allowing you to fix any issues in the files.

To permanently delete all files in your home directory and restore your Cloud Shell home directory to a clean state, you can reset your Cloud Shell VM.

And there is support for way more [Wayback/Archive] tools and languages:

Read the rest of this entry »

Posted in .NET, C#, Cloud, Development, Go (golang), Google, GoogleCloudShell, Infrastructure, Java, Java Platform, JavaScript/ECMAScript, Node.js, Perl, PHP, Power User, Python, Ruby, Scripting, Software Development | Leave a Comment »

Hugo, a static website engine written in Go: I might eventually switch WordPress to it

Posted by jpluimers on 2022/11/23

A long time ago, when just recovering from my december 2019 rectum cancer radiation treatments, I asked what Hugo was, to which tiara fan Jenn happily replied “[Archive] Jenn on Twitter: “It is a static website engine written in Go, … ““.

Like me, writing down or trying stuff is her way to remember things: [Archive] Jenn on Twitter: “For some reason, handwriting terminal commands helps to cement them in my head.… “

In 2021, Isotopp moved over to Hugo and I kindly asked if in the future he would help me out if I wanted to move from WordPress to Hugo.

The thread:

I will need to find a way to schedule posts though.

Note I archived Isotopp’s full thread at [Wayback/Archive] Thread by @isotopp on Thread Reader App – Thread Reader App.

–jeroen


https://twitter.com/geekgalgroks/status/1213574787785744384

It is a static website engine written in Go, https://t.co/msgP26rYRM

Related tweets in August 2020:

https://twitter.com/isotopp/status/1299319847617286146

Wo ich arbeite scheint alles auf ein Markdown im Git und eine Variante von Hugo, Jekyll oder ähnlich zu konvergieren.

https://twitter.com/mausdompteur/status/1299320903524851713

Gitlab Pages für Gitlab Häuser, die nicht schon Jira haben. Mit Web IDE ist das online und Inline zu bedienen.

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