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

Type safe versus interpreted languages: which ones are safer?

Posted by jpluimers on 2022/10/06

An interesting thread by Kristian Köhntopp last year:

[Archive.is] Kristian Köhntopp on Twitter: “Python: >>> print(1+2+” = “+2+1) Traceback (most recent call last): File “”, line 1, in TypeError: unsupported operand type(s) for +: ‘int’ and ‘str’ Java: System.out.println(1+2+” = “+1+2); 3=12”

The examples from him and others in the thread:

Python:
>>> print(1+2+" = "+2+1)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: unsupported operand type(s) for +: 'int' and 'str'

Java:
System.out.println(1+2+" = "+1+2);
3=12

php8.1  -r 'print 1+2+" = "+2+1;'
PHP Fatal error:  Uncaught TypeError: Unsupported operand types: int + string in Command line code:1
Stack trace:
#0 {main}
  thrown in Command line code on line 1

php7.3  -r 'print 1+2+" = "+2+1;'
PHP Warning:  A non-numeric value encountered in Command line code on line 1

Node?
Chrome & FF dev console:
window.alert(1+2+" = "+1+2)
3 = 12

Sind ja immerhin verschiedene Sprachen.

SELECT Wert1 
FROM table1
WHERE Wert1 < AVG(Wert1);

DB2 vs. Oracle vs. MSSQL vs. ....

The joke is that Python actually does better than Java.

But in practice, this is a problem on many platforms, so it deserves constant attention, that’s why Kristian pointed to [Archive] Anna “Legacy Archaeologist” Filina on Twitter: “My annotated slides “Fantastic Bugs and How to Avoid Them” from @LonghornPHP:  #LonghornPHP”

[Wayback/Archive] Fantastic Bugs and How to Avoid Them – Speaker Deck

I’ve expanded the examples from the thread below. The results are interesting and consistent over versions of the various languages.

–jeroen

Read the rest of this entry »

Posted in Development, Java, Java Platform, JavaScript/ECMAScript, Node.js, PHP, Python, Scripting, Software Development | Leave a Comment »

viatsko/awesome-vscode: 🎨 A curated list of delightful VS Code packages and resources.

Posted by jpluimers on 2022/10/05

[Wayback/Archive.is] viatsko/awesome-vscode: 🎨 A curated list of delightful VS Code packages and resources.

It is a long and very readable categorised list of Visual Studio extensions and resourced often with small screencasts or screenshots.

The README in the repository is easier to read than the official site a [Wayback/Archive.is] awesome-vscode | 🎨 A curated list of delightful VS Code packages and resources. (as somehow there not all markdown rendered nicely).

Many other awesome lists can be found via [Wayback/Archive.is] sindresorhus/awesome: 😎 Awesome lists about all kinds of interesting topics.

Via [Wayback/Archive.is] html table editor vscode – Google Search.

–jeroen

Posted in Development, Software Development, vscode Visual Studio Code | Leave a Comment »

HTML / XML / RSS link checker – Visual Studio Marketplace

Posted by jpluimers on 2022/10/04

On my list of Visual Studio Code extensions to try (after I change the shortcuts, as direct Alt shortcuts are not a good idea, luckily those are configurable)

[Wayback/Archive.is] HTML / XML / RSS link checker – Visual Studio Marketplace (partly paraphrased):

VSCode extension that checks for broken links in an HTML, XML, RSS, PHP, or Markdown file.

Checks currently open file:

  • for broken links in anchor-href, link-href, img-src, and script-src tags in currently-open HTML or PHP file
  • both clearnet and onion (Tor) links
  • for badly-formatted mailto links, and duplicate local anchors (anchor-name, anchor-id)
  • for working HTTPS equivalents of HTTP links

Optionally checks for invalid characters and common mistakes (missing tag content, empty attribute value, more).

Also checks for errors in a small subset of semantic HTML tags (in HTML and PHP files): checks that each page has header, main, footer; checks that each heading is inside a section, article, or aside; checks that each section/article/aside has exactly one heading in it; checks that heading values are nested properly.

To see/change settings for this extension, open Settings (Ctrl+,) / Extensions / “HTML / XML / RSS link checker”.

To change the key-combinations for this extension, open File / Preferences / Keyboard Shortcuts and search for Alt+H or Alt+T or Alt+M or Alt+L.

–jeroen

Posted in .NET, Development, HTML, Lightweight markup language, MarkDown, Power User, RSS, Software Development, vscode Visual Studio Code, Web Development, XML, XML/XSD | Leave a Comment »

On my list of extensions to try in vscode: tab nine

Posted by jpluimers on 2022/10/03

I wrote about Visual Studio Code: blazingly fast text expansion with Emmet in september.

Another productivity extension that is on my list is [Wayback/Archive.is] Tabnine – Code Faster with the All-Language AI Assistant for Code Completion, autocomplete JavaScript, Python, TypeScript, PHP, Go, Java, node.js, Ruby, C/C++, HTML/CSS, C#, Rust, SQL, Bash, Kotlin, R – Visual Studio Marketplace.

The first thing I thought of when reading this is “oh, wasn’t this the GitHub open source AI code completion plugin controverse in mid 2021?”. It wasn’t. See links below.

Read the rest of this entry »

Posted in Development, Software Development, vscode Visual Studio Code | Leave a Comment »

Jelmer Visser on Twitter: “Doelwit van een flamewar op Twitter? Dat is vervelend. Zo doorsta je de storm. … 1/*”

Posted by jpluimers on 2022/10/02

Good thread: [Archive.is] Jelmer Visser on Twitter: “Doelwit van een flamewar op Twitter? Dat is vervelend. Zo doorsta je de storm. 1. Blijf kalm, reageer nergens op 2. Traceer de ergste aanjagers, herkenbaar aan quotetweets met meeste likes 3. Zoek naar je eigen naam met een sokpop voor screenshots van geblokte accounts 1/*”

–jeroen

Read the rest of this entry »

Posted in LifeHacker, Power User, SocialMedia, Twitter | Leave a Comment »

Note (typography) – Wikipedia; Footnote – PrintWiki

Posted by jpluimers on 2022/09/30

For my reference:

Typographical devices such as the asterisk (*) or dagger (†) may also be used to point to notes; the traditional order of these symbols in English is *, †, ‡, §, ‖, ¶.[1] Other symbols, including the #, Δ, ◊, ↓, and ☞, have also been used.[2][3]

Source: Note (typography) – Wikipedia

The most common sequence of footnote reference marks is:

  1. asterisk (*),
  2. dagger (†),
  3. double dagger (††),
  4. paragraph symbol (¶),
  5. section mark (§),
  6. parallel rules (||),
  7. number sign (#).

If more are required, they can be doubled up:

  • double asterisks (**),
  • double single daggers (††),
  • double double daggers (††††),
  • etc.

However, when many footnotes are used, it is more practical to use consecutive numbers to identify each footnote.

Source: [Wayback/Archive.is] Footnote – PrintWiki

–jeroen

Posted in LifeHacker, Power User | Leave a Comment »

Git (even recent versions) hanging after “Resolving deltas: 100%”

Posted by jpluimers on 2022/09/29

If you ever come across git hanging after completing “Resolving deltas: 100%“, then remember this can still happen with recent git versions; the below output was with git version 2.24.1.windows.2.

C:\bin>git clone https://wiert@gitlab.com/wiert.me/private/Windows/bin.git
Cloning into 'bin'...
remote: Enumerating objects: 74, done.
remote: Counting objects: 100% (74/74), done.
remote: Compressing objects: 100% (54/54), done.
remote: Total 1063 (delta 30), reused 39 (delta 15)
Receiving objects: 100% (1063/1063), 26.74 MiB | 516.00 KiB/s, done.
Resolving deltas: 100% (385/385), done.

or (after pressing Ctrl-C):

C:\bin>git clone https://wiert@gitlab.com/wiert.me/private/Windows/bin.git
Cloning into 'bin'...
remote: Enumerating objects: 74, done.
remote: Counting objects: 100% (74/74), done.
remote: Compressing objects: 100% (54/54), done.
remote: Total 1063 (delta 30), reused 39 (delta 15)
Receiving objects: 100% (1063/1063), 26.74 MiB | 516.00 KiB/s, done.
Resolving deltas: 100% (385/385), done.
fatal: index-pack failed

Retry after a while

Sometimes this is as easy as waiting until the remote system comes to its senses. In this case, waiting some 8 hours resolved it:

C:\bin>git clone https://wiert@gitlab.com/wiert.me/private/Windows/bin.git
C:\bin>git clone https://wiert@gitlab.com/wiert.me/private/Windows/bin.git
Cloning into 'bin'...
remote: Enumerating objects: 74, done.
remote: Counting objects: 100% (74/74), done.
remote: Compressing objects: 100% (54/54), done.
remote: Total 1063 (delta 30), reused 39 (delta 15)
Receiving objects: 100% (1063/1063), 26.74 MiB | 748.00 KiB/s, done.
Resolving deltas: 100% (385/385), done.

In my case this worked, even though GitLab did not show any problems in their status history: [WayBack] GitLab System Status History.

I waited (and succeeded) because of [WayBack] git – How to solve’fatal: index-pack failed’? – Stack Overflow.

Check the index and get the most recent

Some links that I want to check out later:

Searches

–jeroen

Posted in Development, DVCS - Distributed Version Control, git, Software Development, Source Code Management | Leave a Comment »

LPRng: RESOURCES – PostScript, Epson, HP, Xerox, PPD, etc

Posted by jpluimers on 2022/09/28

When writing Some links on PostScript books and online content, back from the days, I archived [Wayback] Index of /RESOURCES from the site hosting the [Wayback/Archive.is] LPRng Web Page (see also LPRng on Wikipedia):

The LPRng software is an enhanced, extended, and portable implementation of the Berkeley LPR print spooler functionality. While providing the same interface and meeting RFC1179 requirements, the implementation is completely new and provides support for the following features: lightweight (no databases needed) lpr, lpc, and lprm programs; dynamic redirection of print queues; automatic job holding; highly verbose diagnostics; multiple printers serving a single queue; client programs do not need to run SUID root; greatly enhanced security checks; and a greatly improved permission and authorization mechanism.

The source software compiles and runs on a wide variety of UNIX systems, and is compatible with other print spoolers and network printers that use the LPR interface and meet RFC1179 requirements.

Subdirectories (the PPD one goes one level deeper with both files and directories; XEROX just has a subdirectory with one file):

–jeroen

Posted in Development, EPS/PostScript, Hardware, HP Printer Drivers, Power User, Printer drivers, Printers, Software Development, Windows | Leave a Comment »

The Hardware Hacking Handbook | No Starch Press

Posted by jpluimers on 2022/09/27

Want: [Wayback] The Hardware Hacking Handbook | No Starch Press

The Hardware Hacking Handbook

Breaking Embedded Security with Hardware Attacks
by Colin O’Flynn and Jasper van Woudenberg
November 2021, 512 pp.
ISBN-13:
9781593278748
Print Book (PREORDER) and FREE Ebook, $49.99
Ebook (PDF, Mobi, and ePub), $39.99
Hardware Hacking Handbook Cover

Via:

Some topics in the book are listed in [Archive.is] Colin O’Flynn on Twitter: “A random thread about a few things that @jzvw and I packed into The Hardware Hacking Handbook (note – this twitter thread is an advertisement, don’t be tricked into thinking this will be some nice useful stand-alone content). Roughly following book order:”.

–jeroen

Read the rest of this entry »

Posted in Development, Hardware, Hardware Development, IoT Internet of Things, Network-and-equipment, Power User | Leave a Comment »

Krapte op de arbeidsmarkt? Kom eens van jullie luie gat, werkgevers! – NRC

Posted by jpluimers on 2022/09/26

Interessant stuk van Japke: [Wayback/Archive] Krapte op de arbeidsmarkt? Kom eens van jullie luie gat, werkgevers! – NRC

Via: [Wayback/Archive] Japke-d. Bouma on Twitter: “Krapte op de arbeidsmarkt? Ontsla je ‘HR’-afdeling.”

Geralateerd:

Read the rest of this entry »

Posted in Awareness | Leave a Comment »