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 4,262 other subscribers

Archive for the ‘Go (golang)’ Category

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 Delphi, .NET, Software Development, Development, Scripting, VB.NET, JavaScript/ECMAScript, Pascal, With statement, Go (golang) | 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 »

STM32 Simulator Early Access by Wikwi Makes: sign up through this Google docs form

Posted by jpluimers on 2022/08/18

If you like working with STM32 and want to try out a new simulator for it (by [Wayback/Archive] Wokwi (@WokwiMakes)), then sign up at
[Wayback/Archive] https://docs.google.com/forms/d/e/1FAIpQLSfpuGcUI1YdsX6o5lBhit14GPBEh6L7MVTSSDEk_HJFvBgjUQ/viewform

Via [Wayback/Archive] Wokwi on Twitter: “Want to try out the new STM32 simulator? Sign-up for early access: link.wokwi.com/stm32-simulator 🤓” and [Wayback/Archive] tnt (@tnt).

–jeroen

Read the rest of this entry »

Posted in ARM, ARM Cortex-M, Assembly Language, Development, Go (golang), Hardware Development, Software Development, STM32 | Leave a Comment »