From 96448ab4c75bd7d81e7c7b47f5ba9db69083709a Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 8 Feb 2025 11:07:20 +0200 Subject: Update content for html --- gemfeed/atom.xml | 429 +++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 291 insertions(+), 138 deletions(-) (limited to 'gemfeed/atom.xml') diff --git a/gemfeed/atom.xml b/gemfeed/atom.xml index 33f115ad..93e7a372 100644 --- a/gemfeed/atom.xml +++ b/gemfeed/atom.xml @@ -1,11 +1,295 @@ - 2025-02-02T10:58:29+02:00 + 2025-02-08T11:06:16+02:00 foo.zone feed To be in the .zone! https://foo.zone/ + + Random Weird Things - Part Ⅱ + + https://foo.zone/gemfeed/2025-02-08-random-weird-things-ii.html + 2025-02-08T11:06:16+02:00 + + Paul Buetow aka snonux + paul@dev.buetow.org + + Every so often, I come across random, weird, and unexpected things on the internet. I thought it would be neat to share them here from time to time. This is the second run. + +
+

Random Weird Things - Part Ⅱ


+
+Every so often, I come across random, weird, and unexpected things on the internet. I thought it would be neat to share them here from time to time. This is the second run.
+
+2024-07-05 Random Weird Things - Part Ⅰ
+2025-02-08 Random Weird Things - Part Ⅱ (You are currently reading this)
+
+
+/\_/\           /\_/\
+( o.o ) WHOA!! ( o.o )
+> ^ <           > ^ <
+/   \    MOEEW! /   \
+/______\       /______\
+
+
+

Table of Contents


+
+
+

Go Programming


+
+

11. Official Go font


+
+The Go programming language has an official font called "Go Font." It was created to complement the aesthetic of the Go language, ensuring clear and legible rendering of code. The font includes a monospace version for code and a proportional version for general text, supporting consistent look and readability in Go-related materials and development environments.
+
+Check out some Go code displayed using the Go font:
+
+Go font code
+
+https://go.dev/blog/go-fonts
+
+The design emphasizes simplicity and readability, reflecting Go's philosophy of clarity and efficiency.
+
+I found it interesting and/or weird, as Go is a programming language. Why should it bother having its own font? I have never seen another open-source project like Go do this. But I also like it. Maybe I will use it in the future for this blog :-)
+
+

12. Go functions can have methods


+
+Functions on struct types? Well, know. Functions on types like int and string? It's also known of, but a bit lesser. Functions on function types? That sounds a bit funky, but it's possible, too! For demonstration, have a look at this snippet:
+
+ +
package main
+
+import "log"
+
+type fun func() string
+
+func (f fun) Bar() string {
+        return "Bar"
+}
+
+func main() {
+        var f fun = func() string {
+                return "Foo"
+        }
+        log.Println("Example 1: ", f())
+        log.Println("Example 2: ", f.Bar())
+        log.Println("Example 3: ", fun(f.Bar).Bar())
+        log.Println("Example 4: ", fun(fun(f.Bar).Bar).Bar())
+}
+
+
+It runs just fine:
+
+ +
❯ go run main.go
+2025/02/07 22:56:14 Example 1:  Foo
+2025/02/07 22:56:14 Example 2:  Bar
+2025/02/07 22:56:14 Example 3:  Bar
+2025/02/07 22:56:14 Example 4:  Bar
+
+
+

macOS


+
+For personal computing, I don't use Apple, but I have to use it for work.
+
+

13. ß and ss are treated the same


+
+Know German? In German, the letter "sarp s" is written as ß. ß is treated the same as ss on macOS.
+
+On a case-insensitive file system like macOS, not only are uppercase and lowercase letters treated the same, but non-Latin characters like the German "ß" are also considered equivalent to their Latin counterparts (in this case, "ss").
+
+So, even though "Maß" and "Mass" are not strictly equivalent, the macOS file system still treats them as the same filename due to its handling of Unicode characters. This can sometimes lead to unexpected behaviour. Check this out:
+
+ +
❯ touch Maß
+❯ ls -l
+-rw-r--r--@ 1 paul  wheel  0 Feb  7 23:02 Maß
+❯ touch Mass
+❯ ls -l
+-rw-r--r--@ 1 paul  wheel  0 Feb  7 23:02 Maß
+❯ rm Mass
+❯ ls -l
+
+❯ touch Mass
+❯ ls -ltr
+-rw-r--r--@ 1 paul  wheel  0 Feb  7 23:02 Mass
+❯ rm Maß
+❯ ls -l
+
+
+
+

14. Colon as file path separator


+
+MacOS can use the colon as a file path separator on its ADFS (file system). A typical ADFS file pathname on a hard disc might be:
+
+
+ADFS::4.$.Documents.Techwriter.Myfile
+
+
+I can't reproduce this on my (work) Mac, though, as it now uses the APFS file system. In essence, ADFS is an older file system, while APFS is a contemporary file system optimized for Apple's modern devices.
+
+https://social.jvns.ca/@b0rk/113041293527832730
+
+

15. Polyglots - programs written in multiple languages


+
+A coding polyglot is a program or script written so that it can be executed in multiple programming languages without modification. This is typically achieved by leveraging syntax overlaps or crafting valid and meaningful code in each targeted language. Polyglot programs are often created as a challenge or for demonstration purposes to showcase language similarities or clever coding techniques.
+
+Check out my very own polyglot:
+
+The fibonatti.pl.c Polyglot
+
+

16. Languages, where indices start at 1


+
+Array indices start at 1 instead of 0 in some programming languages, known as one-based indexing. This can be controversial because zero-based indexing is more common in popular languages like C, C++, Java, and Python. One-based indexing can lead to off-by-one errors when developers switch between languages with different indexing schemes.
+
+Languages with One-Based Indexing:
+
+
    +
  • Fortran
  • +
  • MATLAB
  • +
  • Lua
  • +
  • R (for vectors and lists)
  • +
  • Smalltalk
  • +
  • Julia (by default, although zero-based indexing is also possible)
  • +

+foo.lua example:
+
+ +
arr = {10, 20, 30, 40, 50}
+print(arr[1]) -- Accessing the first element
+
+
+ +
❯ lua foo.lua
+10
+
+
+One-based indexing is more natural for human-readable, mathematical, and theoretical contexts, where counting traditionally starts from one.
+
+

17. Perl Poetry


+
+Perl Poetry is a playful and creative practice within the programming community where Perl code is written as a poem. These poems are crafted to be syntactically valid Perl code and make sense as poetic text, often with whimsical or humorous intent. This showcases Perl's flexibility and expressiveness, as well as the creativity of its programmers.
+
+See this Poetry of my own; the Perl interpreter does not yield any syntax error parsing that. But also, the Peom doesn't do anything useful then executed:
+
+ +
# (C) 2006 by Paul C. Buetow
+
+Christmas:{time;#!!!
+
+Children: do tell $wishes;
+
+Santa: for $each (@children) { 
+BEGIN { read $each, $their, wishes and study them; use Memoize#ing
+
+} use constant gift, 'wrapping'; 
+package Gifts; pack $each, gift and bless $each and goto deliver
+or do import if not local $available,!!! HO, HO, HO;
+
+redo Santa, pipe $gifts, to_childs;
+redo Santa and do return if last one, is, delivered; 
+
+deliver: gift and require diagnostics if our $gifts ,not break;
+do{ use NEXT; time; tied $gifts} if broken and dump the, broken, ones;
+The_children: sleep and wait for (each %gift) and try { to => untie $gifts };
+
+redo Santa, pipe $gifts, to_childs;
+redo Santa and do return if last one, is, delivered; 
+
+The_christmas_tree: formline s/ /childrens/, $gifts;
+alarm and warn if not exists $Christmas{ tree}, @t, $ENV{HOME};  
+write <<EMail
+ to the parents to buy a new christmas tree!!!!111
+ and send the
+EMail
+;wait and redo deliver until defined local $tree;
+
+redo Santa, pipe $gifts, to_childs;
+redo Santa and do return if last one, is, delivered ;}
+
+END {} our $mission and do sleep until next Christmas ;}
+
+__END__
+
+This is perl, v5.8.8 built for i386-freebsd-64int
+
+
+More Perl Poetry of mine
+
+

18. CSS3 is turing complete


+
+CSS3 is Turing complete because it can simulate a Turing machine using only CSS animations and styles without any JavaScript or external logic. This is achieved by using keyframe animations to change the styles of HTML elements in a way that encodes computation, performing calculations and state transitions.
+
+Is CSS turing complete?
+
+It is surprising because CSS is primarily a styling language intended for the presentation layer of web pages, not for computation or logic. Its capability to perform complex computations defies its typical use case and showcases the unintended computational power that can emerge from the creative use of seemingly straightforward technologies.
+
+Check out this 100% CSS implementation of the Conways Game of Life:
+
+
+
+CSS Conways Game of Life
+
+Conway's Game of Life is Turing complete because it can simulate a universal Turing machine, meaning it can perform any computation that a computer can, given the right initial conditions and sufficient time and space. Suppose a language can implement Conway's Game of Life. In that case, it demonstrates the language's ability to handle complex state transitions and computations. It has the necessary constructs (like iteration, conditionals, and data manipulation) to simulate any algorithm, thus confirming its Turing completeness.
+
+

19. The SQLite codebase is a gem


+
+Check this out:
+
+SQLite Gem
+
+Source:
+
+https://wetdry.world/@memes/112717700557038278
+
+

20. The biggest shell programs


+
+One would think that shell scripts are only suitable for small tasks. Well, I must be wrong, as there are huge shell programs out there (up to 87k LOC) which aren't auto-generated but hand-written!
+
+The Biggest Sell Programs in the World
+
+My Gemtexter (bash) is only 1329 LOC as of now. So it's tiny.
+
+Gemtexter - One Bash script to rule it all
+
+I hope you had some fun. E-Mail your comments to paul@nospam.buetow.org :-)
+
+Back to the main site
+
+
+
f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts @@ -2458,7 +2742,7 @@ jgs \\`_..---.Y.---.._`// - Random Weird Things + Random Weird Things - Part Ⅰ https://foo.zone/gemfeed/2024-07-05-random-weird-things.html 2024-07-05T10:59:59+03:00 @@ -2469,12 +2753,15 @@ jgs \\`_..---.Y.---.._`// Every so often, I come across random, weird, and unexpected things on the internet. I thought it would be neat to share them here from time to time. As a start, here are ten of them.
-

Random Weird Things


+

Random Weird Things - Part Ⅰ



Published at 2024-07-05T10:59:59+03:00

Every so often, I come across random, weird, and unexpected things on the internet. I thought it would be neat to share them here from time to time. As a start, here are ten of them.

+2024-07-05 Random Weird Things - Part Ⅰ (You are currently reading this)
+2025-02-08 Random Weird Things - Part Ⅱ
+
 		       /\_/\
 WHOA!! 	     ( o.o )
@@ -2487,7 +2774,7 @@ WHOA!! 	     ( o.o )
 

Table of Contents



-
-
- - Gemtexter 1.1.0 - Let's Gemtext again - - https://foo.zone/gemfeed/2022-08-27-gemtexter-1.1.0-lets-gemtext-again.html - 2022-08-27T18:25:57+01:00 - - Paul Buetow aka snonux - paul@dev.buetow.org - - I proudly announce that I've released Gemtexter version `1.1.0`. What is Gemtexter? It's my minimalist static site generator for Gemini Gemtext, HTML and Markdown written in GNU Bash. - -
-

Gemtexter 1.1.0 - Let's Gemtext again


-
-Published at 2022-08-27T18:25:57+01:00
-
-I proudly announce that I've released Gemtexter version 1.1.0. What is Gemtexter? It's my minimalist static site generator for Gemini Gemtext, HTML and Markdown written in GNU Bash.
-
-https://codeberg.org/snonux/gemtexter
-
-It has been around a year since I released the first version 1.0.0. Although, there aren't any groundbreaking changes, there have been a couple of smaller commits and adjustments. I was quite surprised that I received a bunch of feedback and requests about Gemtexter so it means that I am not the only person in the universe actually using it.
-
-
--=[ typewriter ]=-  1/98
-
-       .-------.
-      _|~~ ~~  |_
-    =(_|_______|_)=
-      |:::::::::|
-      |:::::::[]|
-      |o=======.|
- jgs  `"""""""""`
-
-
-

Table of Contents


-
-
-

What's new?


-
-

Automatic check for GNU version requirements


-
-Gemtexter relies on the GNU versions of the tools grep, sed and date and it also requires the Bash shell in version 5 at least. That's now done in the check_dependencies() function:
-
- -
check_dependencies () {
-    # At least, Bash 5 is required
-    local -i required_version=5
-    IFS=. read -ra version <<< "$BASH_VERSION"
-    if [ "${version[0]}" -lt $required_version ]; then
-        log ERROR "ERROR, \"bash\" must be at least at major version $required_version!"
-        exit 2
-    fi
-
-    # These must be the GNU versions of the commands
-    for tool in $DATE $SED $GREP; do
-        if ! $tool --version | grep -q GNU; then
-            log ERROR "ERROR, \"$tool\" command is not the GNU version, please install!"
-            exit 2
-        fi
-    done
-}
-
-
-Especially macOS users didn't read the README carefully enough to install GNU Grep, GNU Sed and GNU Date before using Gemtexter.
-
-

Backticks now produce inline code blocks in the HTML output


-
-The Gemtext format doesn't support inline code blocks, but Gemtexter now produces inline code blocks (means, small code fragments can be placed in the middle of a paragraph) in the HTML output when the code block is enclosed with Backticks. There were no adjustments required for the Markdown output format, because Markdown supports it already out of the box.
-
-

Cache for Atom feed generation


-
-The Bash is not the most performant language. Gemtexter already takes a couple of seconds only to generate the Atom feed for around two hand full of articles on my slightly underpowered Surface Go 2 Linux tablet. Therefore, I introduced a cache, so that subsequent Atom feed generation runs finish much quicker. The cache uses a checksum of the Gemtext .gmi file to decide whether anything of the content has changed or not.
-
-

Input filter support


-
-Once your capsule reaches a certain size, it can become annoying to re-generate everything if you only want to preview the HTML or Markdown output of one single content file. The following will add a filter to only generate the files matching a regular expression:
-
- -
./gemtexter --generate '.*hello.*'
-
-
-

Revamped git support


-
-The Git support has been completely rewritten. It's now more reliable and faster too. Have a look at the README for more information.
-
-

Addition of htmlextras and web font support


-
-The htmlextras folder now contains all extra files required for the HTML output format such as cascading style sheet (CSS) files and web fonts.
-
-

Sub-section support


-
-It's now possible to define sub-sections within a Gemtexter capsule. For the HTML output, each sub-section can use its own CSS and web font definitions. E.g.:
-
-The foo.zone main site
-The notes sub-section (with different fonts)
-
-

More


-
-Additionally, there were a couple of bug fixes, refactorings and overall improvements in the documentation made.
-
-Overall I think it's a pretty solid 1.1.0 release without anything groundbreaking (therefore no major version jump). But I am happy about it.
-
-E-Mail your comments to paul@nospam.buetow.org :-)
-
-Other related posts are:
-
-2024-10-02 Gemtexter 3.0.0 - Let's Gemtext again⁴
-2023-07-21 Gemtexter 2.1.0 - Let's Gemtext again³
-2023-03-25 Gemtexter 2.0.0 - Let's Gemtext again²
-2022-08-27 Gemtexter 1.1.0 - Let's Gemtext again (You are currently reading this)
-2021-06-05 Gemtexter - One Bash script to rule it all
-2021-04-24 Welcome to the Geminispace
-
Back to the main site
-- cgit v1.2.3