diff options
Diffstat (limited to 'gemfeed')
| -rw-r--r-- | gemfeed/2024-07-05-random-weird-things.gmi | 7 | ||||
| -rw-r--r-- | gemfeed/2025-02-08-random-weird-things-ii.gmi | 251 | ||||
| -rw-r--r-- | gemfeed/2025-02-08-random-weird-things-ii.gmi.tpl | 91 | ||||
| -rw-r--r-- | gemfeed/atom.xml | 429 | ||||
| -rw-r--r-- | gemfeed/index.gmi | 3 | ||||
| -rw-r--r-- | gemfeed/random-weird-things-ii/css-conway.png | bin | 0 -> 150862 bytes | |||
| -rw-r--r-- | gemfeed/random-weird-things-ii/go-font-code.png | bin | 0 -> 88459 bytes | |||
| -rw-r--r-- | gemfeed/random-weird-things-ii/sqlite-gem.png | bin | 0 -> 121177 bytes |
8 files changed, 616 insertions, 165 deletions
diff --git a/gemfeed/2024-07-05-random-weird-things.gmi b/gemfeed/2024-07-05-random-weird-things.gmi index 88134dc2..7c8fa044 100644 --- a/gemfeed/2024-07-05-random-weird-things.gmi +++ b/gemfeed/2024-07-05-random-weird-things.gmi @@ -1,9 +1,12 @@ -# 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.gmi 2024-07-05 Random Weird Things - Part Ⅰ (You are currently reading this) +=> ./2025-02-08-random-weird-things-ii.gmi 2025-02-08 Random Weird Things - Part Ⅱ + ``` /\_/\ WHOA!! ( o.o ) @@ -15,7 +18,7 @@ WHOA!! ( o.o ) ## Table of Contents -* ⇢ Random Weird Things +* ⇢ Random Weird Things - Part Ⅰ * ⇢ ⇢ 1. `bad.horse` traceroute * ⇢ ⇢ 2. ASCII cinema * ⇢ ⇢ 3. Netflix's Hello World application diff --git a/gemfeed/2025-02-08-random-weird-things-ii.gmi b/gemfeed/2025-02-08-random-weird-things-ii.gmi new file mode 100644 index 00000000..31b5eccb --- /dev/null +++ b/gemfeed/2025-02-08-random-weird-things-ii.gmi @@ -0,0 +1,251 @@ +# Random Weird Things - Part Ⅱ + +> Published at 2025-02-08T11:06:16+02: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. This is the second run. + +=> ./2024-07-05-random-weird-things.gmi 2024-07-05 Random Weird Things - Part Ⅰ +=> ./2025-02-08-random-weird-things-ii.gmi 2025-02-08 Random Weird Things - Part Ⅱ (You are currently reading this) + +``` +/\_/\ /\_/\ +( o.o ) WHOA!! ( o.o ) +> ^ < > ^ < +/ \ MOEEW! / \ +/______\ /______\ +``` + +## Table of Contents + +* ⇢ Random Weird Things - Part Ⅱ +* ⇢ ⇢ Go Programming +* ⇢ ⇢ ⇢ 11. Official Go font +* ⇢ ⇢ ⇢ 12. Go functions can have methods +* ⇢ ⇢ macOS +* ⇢ ⇢ ⇢ 13. ß and ss are treated the same +* ⇢ ⇢ ⇢ 14. Colon as file path separator +* ⇢ ⇢ 15. Polyglots - programs written in multiple languages +* ⇢ ⇢ 16. Languages, where indices start at 1 +* ⇢ ⇢ 17. Perl Poetry +* ⇢ ⇢ 18. CSS3 is turing complete +* ⇢ ⇢ 19. The SQLite codebase is a gem +* ⇢ ⇢ 20. The biggest shell programs + +## 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: + +=> ./random-weird-things-ii/go-font-code.png 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: + +```go +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: + +```sh +❯ 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: + +```sh +❯ 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: + +=> ./2014-03-24-the-fibonacci.pl.c-polyglot.gmi 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: + +```lua +arr = {10, 20, 30, 40, 50} +print(arr[1]) -- Accessing the first element +```` + +```sh +❯ 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: + +```perl +# (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 +``` + +=> ./2008-06-26-perl-poetry.gmi 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. + +=> https://stackoverflow.com/questions/2497146/is-css-turing-complete 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: + +=> ./random-weird-things-ii/css-conway.png + +=> https://github.com/propjockey/css-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: + +=> ./random-weird-things-ii/sqlite-gem.png 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! + +=> https://github.com/oils-for-unix/oils/wiki/The-Biggest-Shell-Programs-in-the-World The Biggest Sell Programs in the World + +My Gemtexter (bash) is only 1329 LOC as of now. So it's tiny. + +=> ./2021-06-05-gemtexter-one-bash-script-to-rule-it-all.gmi 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 diff --git a/gemfeed/2025-02-08-random-weird-things-ii.gmi.tpl b/gemfeed/2025-02-08-random-weird-things-ii.gmi.tpl index ab0b0b35..35b7c4f0 100644 --- a/gemfeed/2025-02-08-random-weird-things-ii.gmi.tpl +++ b/gemfeed/2025-02-08-random-weird-things-ii.gmi.tpl @@ -1,5 +1,7 @@ # Random Weird Things - Part Ⅱ +> Published at 2025-02-08T11:06:16+02: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. This is the second run. << template::inline::index random-weird-things @@ -18,10 +20,21 @@ Every so often, I come across random, weird, and unexpected things on the intern ### 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: + +=> ./random-weird-things-ii/go-font-code.png 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 -Have a look at this snippet: +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: ```go package main @@ -45,7 +58,7 @@ func main() { } ``` -It runs just fin: +It runs just fine: ```sh ❯ go run main.go @@ -55,16 +68,17 @@ It runs just fin: 2025/02/07 22:56:14 Example 4: Bar ``` +## macOS -## MacOS X +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, there is the "sarp s", written ß. ß is treated the same as ss on MacOS X. +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 X, 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"). +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 X file system still treats them as the same filename due to its handling of Unicode characters. This can sometimes lead to unexpected behavior: +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: ```sh ❯ touch Maß @@ -86,12 +100,19 @@ So, even though "Maß" and "Mass" are not strictly equivalent, the MacOS X file ### 14. Colon as file path separator -MacOS x colon as file path separator https://social.jvns.ca/@b0rk/113041293527832730 -and https://narrativ.es/@janl/113041301678495651 +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 that is written in such a way that it can be executed in multiple programming languages without modification. This is typically achieved by leveraging syntax overlaps or crafting code that is valid and meaningful in each targeted language. Polyglot programs are often created as a challenge or for demonstration purposes to showcase language similarities or clever coding techniques. +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: @@ -99,16 +120,16 @@ Check out my very own polyglot: ## 16. Languages, where indices start at 1 -Array indices start at 1 instead of 0 in some programming languages, which is 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. +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) +* Fortran +* MATLAB +* Lua +* R (for vectors and lists) +* Smalltalk +* Julia (by default, although zero-based indexing is also possible) `foo.lua` example: @@ -126,9 +147,9 @@ One-based indexing is more natural for human-readable, mathematical, and theoret ## 17. Perl Poetry -Perl Poetry is a playful and creative practice within the programming community where Perl code is written in the form of a poem. These poems are crafted to be both syntactically valid Perl code and to 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. +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 Peotry of my own: +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: ```perl # (C) 2006 by Paul C. Buetow @@ -176,18 +197,40 @@ This is perl, v5.8.8 built for i386-freebsd-64int ## 18. CSS3 is turing complete -CSS3 is turing complete https://stackoverflow.com/questions/2497146/is-css-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. + +=> https://stackoverflow.com/questions/2497146/is-css-turing-complete Is CSS turing complete? -## 19. SQLite codebase is a gem +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. -sqlite codebase is a gem https://wetdry.world/@memes/112717700557038278 +Check out this 100% CSS implementation of the Conways Game of Life: +=> ./random-weird-things-ii/css-conway.png + +=> https://github.com/propjockey/css-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: + +=> ./random-weird-things-ii/sqlite-gem.png SQLite Gem + +Source: + +=> https://wetdry.world/@memes/112717700557038278 ## 20. The biggest shell programs -The Biggest Shell Programs in the World https://github.com/oils-for-unix/oils/wiki/The-Biggest-Shell-Programs-in-the-World via @wallabagapp -I hope you had some fun. E-Mail your comments to `paul@nospam.buetow.org` :-) +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! + +=> https://github.com/oils-for-unix/oils/wiki/The-Biggest-Shell-Programs-in-the-World The Biggest Sell Programs in the World -other related posts are: +My Gemtexter (bash) is only 1329 LOC as of now. So it's tiny. + +=> ./2021-06-05-gemtexter-one-bash-script-to-rule-it-all.gmi 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 diff --git a/gemfeed/atom.xml b/gemfeed/atom.xml index 043d3398..9df1f07e 100644 --- a/gemfeed/atom.xml +++ b/gemfeed/atom.xml @@ -1,12 +1,296 @@ <?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://www.w3.org/2005/Atom"> - <updated>2025-02-02T10:58:29+02:00</updated> + <updated>2025-02-08T11:06:16+02:00</updated> <title>foo.zone feed</title> <subtitle>To be in the .zone!</subtitle> <link href="gemini://foo.zone/gemfeed/atom.xml" rel="self" /> <link href="gemini://foo.zone/" /> <id>gemini://foo.zone/</id> <entry> + <title>Random Weird Things - Part Ⅱ</title> + <link href="gemini://foo.zone/gemfeed/2025-02-08-random-weird-things-ii.gmi" /> + <id>gemini://foo.zone/gemfeed/2025-02-08-random-weird-things-ii.gmi</id> + <updated>2025-02-08T11:06:16+02:00</updated> + <author> + <name>Paul Buetow aka snonux</name> + <email>paul@dev.buetow.org</email> + </author> + <summary>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.</summary> + <content type="xhtml"> + <div xmlns="http://www.w3.org/1999/xhtml"> + <h1 style='display: inline' id='random-weird-things---part-'>Random Weird Things - Part Ⅱ</h1><br /> +<br /> +<span>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.</span><br /> +<br /> +<a class='textlink' href='./2024-07-05-random-weird-things.html'>2024-07-05 Random Weird Things - Part Ⅰ</a><br /> +<a class='textlink' href='./2025-02-08-random-weird-things-ii.html'>2025-02-08 Random Weird Things - Part Ⅱ (You are currently reading this)</a><br /> +<br /> +<pre> +/\_/\ /\_/\ +( o.o ) WHOA!! ( o.o ) +> ^ < > ^ < +/ \ MOEEW! / \ +/______\ /______\ +</pre> +<br /> +<h2 style='display: inline' id='table-of-contents'>Table of Contents</h2><br /> +<br /> +<ul> +<li><a href='#random-weird-things---part-'>Random Weird Things - Part Ⅱ</a></li> +<li>⇢ <a href='#go-programming'>Go Programming</a></li> +<li>⇢ ⇢ <a href='#11-official-go-font'>11. Official Go font</a></li> +<li>⇢ ⇢ <a href='#12-go-functions-can-have-methods'>12. Go functions can have methods</a></li> +<li>⇢ <a href='#macos'>macOS</a></li> +<li>⇢ ⇢ <a href='#13--and-ss-are-treated-the-same'>13. ß and ss are treated the same</a></li> +<li>⇢ ⇢ <a href='#14-colon-as-file-path-separator'>14. Colon as file path separator</a></li> +<li>⇢ <a href='#15-polyglots---programs-written-in-multiple-languages'>15. Polyglots - programs written in multiple languages</a></li> +<li>⇢ <a href='#16-languages-where-indices-start-at-1'>16. Languages, where indices start at 1</a></li> +<li>⇢ <a href='#17-perl-poetry'>17. Perl Poetry</a></li> +<li>⇢ <a href='#18-css3-is-turing-complete'>18. CSS3 is turing complete</a></li> +<li>⇢ <a href='#19-the-sqlite-codebase-is-a-gem'>19. The SQLite codebase is a gem</a></li> +<li>⇢ <a href='#20-the-biggest-shell-programs-'>20. The biggest shell programs </a></li> +</ul><br /> +<h2 style='display: inline' id='go-programming'>Go Programming</h2><br /> +<br /> +<h3 style='display: inline' id='11-official-go-font'>11. Official Go font</h3><br /> +<br /> +<span>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. </span><br /> +<br /> +<span>Check out some Go code displayed using the Go font:</span><br /> +<br /> +<a href='./random-weird-things-ii/go-font-code.png'><img alt='Go font code' title='Go font code' src='./random-weird-things-ii/go-font-code.png' /></a><br /> +<br /> +<a class='textlink' href='https://go.dev/blog/go-fonts'>https://go.dev/blog/go-fonts</a><br /> +<br /> +<span>The design emphasizes simplicity and readability, reflecting Go's philosophy of clarity and efficiency.</span><br /> +<br /> +<span>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 :-) </span><br /> +<br /> +<h3 style='display: inline' id='12-go-functions-can-have-methods'>12. Go functions can have methods</h3><br /> +<br /> +<span>Functions on struct types? Well, know. Functions on types like <span class='inlinecode'>int</span> and <span class='inlinecode'>string</span>? 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:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre><b><u><font color="#000000">package</font></u></b> main + +<b><u><font color="#000000">import</font></u></b> <font color="#808080">"log"</font> + +<b><u><font color="#000000">type</font></u></b> fun <b><u><font color="#000000">func</font></u></b>() <b><font color="#000000">string</font></b> + +<b><u><font color="#000000">func</font></u></b> (f fun) Bar() <b><font color="#000000">string</font></b> { + <b><u><font color="#000000">return</font></u></b> <font color="#808080">"Bar"</font> +} + +<b><u><font color="#000000">func</font></u></b> main() { + <b><u><font color="#000000">var</font></u></b> f fun = <b><u><font color="#000000">func</font></u></b>() <b><font color="#000000">string</font></b> { + <b><u><font color="#000000">return</font></u></b> <font color="#808080">"Foo"</font> + } + log.Println(<font color="#808080">"Example 1: "</font>, f()) + log.Println(<font color="#808080">"Example 2: "</font>, f.Bar()) + log.Println(<font color="#808080">"Example 3: "</font>, fun(f.Bar).Bar()) + log.Println(<font color="#808080">"Example 4: "</font>, fun(fun(f.Bar).Bar).Bar()) +} +</pre> +<br /> +<span>It runs just fine:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>❯ go run main.go +<font color="#000000">2025</font>/<font color="#000000">02</font>/<font color="#000000">07</font> <font color="#000000">22</font>:<font color="#000000">56</font>:<font color="#000000">14</font> Example <font color="#000000">1</font>: Foo +<font color="#000000">2025</font>/<font color="#000000">02</font>/<font color="#000000">07</font> <font color="#000000">22</font>:<font color="#000000">56</font>:<font color="#000000">14</font> Example <font color="#000000">2</font>: Bar +<font color="#000000">2025</font>/<font color="#000000">02</font>/<font color="#000000">07</font> <font color="#000000">22</font>:<font color="#000000">56</font>:<font color="#000000">14</font> Example <font color="#000000">3</font>: Bar +<font color="#000000">2025</font>/<font color="#000000">02</font>/<font color="#000000">07</font> <font color="#000000">22</font>:<font color="#000000">56</font>:<font color="#000000">14</font> Example <font color="#000000">4</font>: Bar +</pre> +<br /> +<h2 style='display: inline' id='macos'>macOS</h2><br /> +<br /> +<span>For personal computing, I don't use Apple, but I have to use it for work. </span><br /> +<br /> +<h3 style='display: inline' id='13--and-ss-are-treated-the-same'>13. ß and ss are treated the same</h3><br /> +<br /> +<span>Know German? In German, the letter "sarp s" is written as ß. ß is treated the same as ss on macOS.</span><br /> +<br /> +<span>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").</span><br /> +<br /> +<span>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:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>❯ touch Maß +❯ ls -l +-rw-r--r--@ <font color="#000000">1</font> paul wheel <font color="#000000">0</font> Feb <font color="#000000">7</font> <font color="#000000">23</font>:<font color="#000000">02</font> Maß +❯ touch Mass +❯ ls -l +-rw-r--r--@ <font color="#000000">1</font> paul wheel <font color="#000000">0</font> Feb <font color="#000000">7</font> <font color="#000000">23</font>:<font color="#000000">02</font> Maß +❯ rm Mass +❯ ls -l + +❯ touch Mass +❯ ls -ltr +-rw-r--r--@ <font color="#000000">1</font> paul wheel <font color="#000000">0</font> Feb <font color="#000000">7</font> <font color="#000000">23</font>:<font color="#000000">02</font> Mass +❯ rm Maß +❯ ls -l + +</pre> +<br /> +<h3 style='display: inline' id='14-colon-as-file-path-separator'>14. Colon as file path separator</h3><br /> +<br /> +<span>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:</span><br /> +<br /> +<pre> +ADFS::4.$.Documents.Techwriter.Myfile +</pre> +<br /> +<span>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.</span><br /> +<br /> +<a class='textlink' href='https://social.jvns.ca/@b0rk/113041293527832730'>https://social.jvns.ca/@b0rk/113041293527832730</a><br /> +<br /> +<h2 style='display: inline' id='15-polyglots---programs-written-in-multiple-languages'>15. Polyglots - programs written in multiple languages</h2><br /> +<br /> +<span>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.</span><br /> +<br /> +<span>Check out my very own polyglot:</span><br /> +<br /> +<a class='textlink' href='./2014-03-24-the-fibonacci.pl.c-polyglot.html'>The <span class='inlinecode'>fibonatti.pl.c</span> Polyglot</a><br /> +<br /> +<h2 style='display: inline' id='16-languages-where-indices-start-at-1'>16. Languages, where indices start at 1</h2><br /> +<br /> +<span>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.</span><br /> +<br /> +<span>Languages with One-Based Indexing:</span><br /> +<br /> +<ul> +<li>Fortran</li> +<li>MATLAB</li> +<li>Lua</li> +<li>R (for vectors and lists)</li> +<li>Smalltalk</li> +<li>Julia (by default, although zero-based indexing is also possible)</li> +</ul><br /> +<span><span class='inlinecode'>foo.lua</span> example:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>arr = {<font color="#000000">10</font>, <font color="#000000">20</font>, <font color="#000000">30</font>, <font color="#000000">40</font>, <font color="#000000">50</font>} +print(arr[<font color="#000000">1</font>]) <i><font color="silver">-- Accessing the first element</font></i> +</pre> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>❯ lua foo.lua +<font color="#000000">10</font> +</pre> +<br /> +<span>One-based indexing is more natural for human-readable, mathematical, and theoretical contexts, where counting traditionally starts from one.</span><br /> +<br /> +<h2 style='display: inline' id='17-perl-poetry'>17. Perl Poetry</h2><br /> +<br /> +<span>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.</span><br /> +<br /> +<span>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:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre><i><font color="silver"># (C) 2006 by Paul C. Buetow</font></i> + +Christmas:{time;<i><font color="silver">#!!!</font></i> + +Children: <b><u><font color="#000000">do</font></u></b> <b><u><font color="#000000">tell</font></u></b> $wishes; + +Santa: <b><u><font color="#000000">for</font></u></b> $each (@children) { +BEGIN { <b><u><font color="#000000">read</font></u></b> $each, $their, wishes <b><u><font color="#000000">and</font></u></b> study them; <b><u><font color="#000000">use</font></u></b> Memoize<i><font color="silver">#ing</font></i> + +} <b><u><font color="#000000">use</font></u></b> constant gift, <font color="#808080">'wrapping'</font>; +<b><u><font color="#000000">package</font></u></b> Gifts; <b><u><font color="#000000">pack</font></u></b> $each, gift <b><u><font color="#000000">and</font></u></b> <b><u><font color="#000000">bless</font></u></b> $each <b><u><font color="#000000">and</font></u></b> <b><u><font color="#000000">goto</font></u></b> deliver +or <b><u><font color="#000000">do</font></u></b> <b><u><font color="#000000">import</font></u></b> <b><u><font color="#000000">if</font></u></b> not <b><u><font color="#000000">local</font></u></b> $available,!!! HO, HO, HO; + +<b><u><font color="#000000">redo</font></u></b> Santa, <b><u><font color="#000000">pipe</font></u></b> $gifts, to_childs; +<b><u><font color="#000000">redo</font></u></b> Santa <b><u><font color="#000000">and</font></u></b> <b><u><font color="#000000">do</font></u></b> <b><u><font color="#000000">return</font></u></b> <b><u><font color="#000000">if</font></u></b> <b><u><font color="#000000">last</font></u></b> one, is, delivered; + +deliver: gift <b><u><font color="#000000">and</font></u></b> <b><u><font color="#000000">require</font></u></b> diagnostics <b><u><font color="#000000">if</font></u></b> <b><u><font color="#000000">our</font></u></b> $gifts ,not break; +<b><u><font color="#000000">do</font></u></b>{ <b><u><font color="#000000">use</font></u></b> NEXT; time; <b><u><font color="#000000">tied</font></u></b> $gifts} <b><u><font color="#000000">if</font></u></b> broken <b><u><font color="#000000">and</font></u></b> <b><u><font color="#000000">dump</font></u></b> the, broken, ones; +The_children: <b><u><font color="#000000">sleep</font></u></b> <b><u><font color="#000000">and</font></u></b> <b><u><font color="#000000">wait</font></u></b> <b><u><font color="#000000">for</font></u></b> (<b><u><font color="#000000">each</font></u></b> %gift) <b><u><font color="#000000">and</font></u></b> try { to => <b><u><font color="#000000">untie</font></u></b> $gifts }; + +<b><u><font color="#000000">redo</font></u></b> Santa, <b><u><font color="#000000">pipe</font></u></b> $gifts, to_childs; +<b><u><font color="#000000">redo</font></u></b> Santa <b><u><font color="#000000">and</font></u></b> <b><u><font color="#000000">do</font></u></b> <b><u><font color="#000000">return</font></u></b> <b><u><font color="#000000">if</font></u></b> <b><u><font color="#000000">last</font></u></b> one, is, delivered; + +The_christmas_tree: formline <b><u><font color="#000000">s</font></u></b><font color="#808080">/ /childrens/</font>, $gifts; +<b><u><font color="#000000">alarm</font></u></b> <b><u><font color="#000000">and</font></u></b> <b><u><font color="#000000">warn</font></u></b> <b><u><font color="#000000">if</font></u></b> not <b><u><font color="#000000">exists</font></u></b> $Christmas{ tree}, @t, $ENV{HOME}; +<b><u><font color="#000000">write</font></u></b> <<EMail + to the parents to buy a new christmas tree!!!!<font color="#000000">111</font> + <b><u><font color="#000000">and</font></u></b> send the +EMail +;<b><u><font color="#000000">wait</font></u></b> <b><u><font color="#000000">and</font></u></b> <b><u><font color="#000000">redo</font></u></b> deliver until <b><u><font color="#000000">defined</font></u></b> <b><u><font color="#000000">local</font></u></b> $tree; + +<b><u><font color="#000000">redo</font></u></b> Santa, <b><u><font color="#000000">pipe</font></u></b> $gifts, to_childs; +<b><u><font color="#000000">redo</font></u></b> Santa <b><u><font color="#000000">and</font></u></b> <b><u><font color="#000000">do</font></u></b> <b><u><font color="#000000">return</font></u></b> <b><u><font color="#000000">if</font></u></b> <b><u><font color="#000000">last</font></u></b> one, is, delivered ;} + +END {} <b><u><font color="#000000">our</font></u></b> $mission <b><u><font color="#000000">and</font></u></b> <b><u><font color="#000000">do</font></u></b> <b><u><font color="#000000">sleep</font></u></b> until <b><u><font color="#000000">next</font></u></b> Christmas ;} + +__END__ + +This is perl, v5.<font color="#000000">8.8</font> built <b><u><font color="#000000">for</font></u></b> i386-freebsd-64int +</pre> +<br /> +<a class='textlink' href='./2008-06-26-perl-poetry.html'>More Perl Poetry of mine</a><br /> +<br /> +<h2 style='display: inline' id='18-css3-is-turing-complete'>18. CSS3 is turing complete</h2><br /> +<br /> +<span>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. </span><br /> +<br /> +<a class='textlink' href='https://stackoverflow.com/questions/2497146/is-css-turing-complete'>Is CSS turing complete?</a><br /> +<br /> +<span>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.</span><br /> +<br /> +<span>Check out this 100% CSS implementation of the Conways Game of Life:</span><br /> +<br /> +<a href='./random-weird-things-ii/css-conway.png'><img src='./random-weird-things-ii/css-conway.png' /></a><br /> +<br /> +<a class='textlink' href='https://github.com/propjockey/css-conways-game-of-life'>CSS Conways Game of Life</a><br /> +<br /> +<span>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.</span><br /> +<br /> +<h2 style='display: inline' id='19-the-sqlite-codebase-is-a-gem'>19. The SQLite codebase is a gem</h2><br /> +<br /> +<span>Check this out:</span><br /> +<br /> +<a href='./random-weird-things-ii/sqlite-gem.png'><img alt='SQLite Gem' title='SQLite Gem' src='./random-weird-things-ii/sqlite-gem.png' /></a><br /> +<br /> +<span>Source:</span><br /> +<br /> +<a class='textlink' href='https://wetdry.world/@memes/112717700557038278'>https://wetdry.world/@memes/112717700557038278</a><br /> +<br /> +<h2 style='display: inline' id='20-the-biggest-shell-programs-'>20. The biggest shell programs </h2><br /> +<br /> +<span>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!</span><br /> +<br /> +<a class='textlink' href='https://github.com/oils-for-unix/oils/wiki/The-Biggest-Shell-Programs-in-the-World'>The Biggest Sell Programs in the World</a><br /> +<br /> +<span>My Gemtexter (bash) is only 1329 LOC as of now. So it's tiny.</span><br /> +<br /> +<a class='textlink' href='./2021-06-05-gemtexter-one-bash-script-to-rule-it-all.html'>Gemtexter - One Bash script to rule it all</a><br /> +<br /> +<span>I hope you had some fun. E-Mail your comments to <span class='inlinecode'>paul@nospam.buetow.org</span> :-)</span><br /> +<br /> +<a class='textlink' href='../'>Back to the main site</a><br /> + </div> + </content> + </entry> + <entry> <title>f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts</title> <link href="gemini://foo.zone/gemfeed/2025-02-01-f3s-kubernetes-with-freebsd-part-3.gmi" /> <id>gemini://foo.zone/gemfeed/2025-02-01-f3s-kubernetes-with-freebsd-part-3.gmi</id> @@ -2458,7 +2742,7 @@ jgs \\`_..---.Y.---.._`// </content> </entry> <entry> - <title>Random Weird Things</title> + <title>Random Weird Things - Part Ⅰ</title> <link href="gemini://foo.zone/gemfeed/2024-07-05-random-weird-things.gmi" /> <id>gemini://foo.zone/gemfeed/2024-07-05-random-weird-things.gmi</id> <updated>2024-07-05T10:59:59+03:00</updated> @@ -2469,12 +2753,15 @@ jgs \\`_..---.Y.---.._`// <summary>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.</summary> <content type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml"> - <h1 style='display: inline' id='random-weird-things'>Random Weird Things</h1><br /> + <h1 style='display: inline' id='random-weird-things---part-'>Random Weird Things - Part Ⅰ</h1><br /> <br /> <span class='quote'>Published at 2024-07-05T10:59:59+03:00</span><br /> <br /> <span>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.</span><br /> <br /> +<a class='textlink' href='./2024-07-05-random-weird-things.html'>2024-07-05 Random Weird Things - Part Ⅰ (You are currently reading this)</a><br /> +<a class='textlink' href='./2025-02-08-random-weird-things-ii.html'>2025-02-08 Random Weird Things - Part Ⅱ</a><br /> +<br /> <pre> /\_/\ WHOA!! ( o.o ) @@ -2487,7 +2774,7 @@ WHOA!! ( o.o ) <h2 style='display: inline' id='table-of-contents'>Table of Contents</h2><br /> <br /> <ul> -<li><a href='#random-weird-things'>Random Weird Things</a></li> +<li><a href='#random-weird-things---part-'>Random Weird Things - Part Ⅰ</a></li> <li>⇢ <a href='#1-badhorse-traceroute'>1. <span class='inlinecode'>bad.horse</span> traceroute</a></li> <li>⇢ <a href='#2-ascii-cinema'>2. ASCII cinema</a></li> <li>⇢ <a href='#3-netflix-s-hello-world-application'>3. Netflix's Hello World application</a></li> @@ -8587,138 +8874,4 @@ jgs (________\ \ </div> </content> </entry> - <entry> - <title>Gemtexter 1.1.0 - Let's Gemtext again</title> - <link href="gemini://foo.zone/gemfeed/2022-08-27-gemtexter-1.1.0-lets-gemtext-again.gmi" /> - <id>gemini://foo.zone/gemfeed/2022-08-27-gemtexter-1.1.0-lets-gemtext-again.gmi</id> - <updated>2022-08-27T18:25:57+01:00</updated> - <author> - <name>Paul Buetow aka snonux</name> - <email>paul@dev.buetow.org</email> - </author> - <summary>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.</summary> - <content type="xhtml"> - <div xmlns="http://www.w3.org/1999/xhtml"> - <h1 style='display: inline' id='gemtexter-110---let-s-gemtext-again'>Gemtexter 1.1.0 - Let's Gemtext again</h1><br /> -<br /> -<span class='quote'>Published at 2022-08-27T18:25:57+01:00</span><br /> -<br /> -<span>I proudly announce that I've released Gemtexter version <span class='inlinecode'>1.1.0</span>. What is Gemtexter? It's my minimalist static site generator for Gemini Gemtext, HTML and Markdown written in GNU Bash.</span><br /> -<br /> -<a class='textlink' href='https://codeberg.org/snonux/gemtexter'>https://codeberg.org/snonux/gemtexter</a><br /> -<br /> -<span>It has been around a year since I released the first version <span class='inlinecode'>1.0.0</span>. 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.</span><br /> -<br /> -<pre> --=[ typewriter ]=- 1/98 - - .-------. - _|~~ ~~ |_ - =(_|_______|_)= - |:::::::::| - |:::::::[]| - |o=======.| - jgs `"""""""""` -</pre> -<br /> -<h2 style='display: inline' id='table-of-contents'>Table of Contents</h2><br /> -<br /> -<ul> -<li><a href='#gemtexter-110---let-s-gemtext-again'>Gemtexter 1.1.0 - Let's Gemtext again</a></li> -<li>⇢ <a href='#what-s-new'>What's new?</a></li> -<li>⇢ ⇢ <a href='#automatic-check-for-gnu-version-requirements'>Automatic check for GNU version requirements</a></li> -<li>⇢ ⇢ <a href='#backticks-now-produce-inline-code-blocks-in-the-html-output'>Backticks now produce <span class='inlinecode'>inline code blocks</span> in the HTML output</a></li> -<li>⇢ ⇢ <a href='#cache-for-atom-feed-generation'>Cache for Atom feed generation</a></li> -<li>⇢ ⇢ <a href='#input-filter-support'>Input filter support</a></li> -<li>⇢ ⇢ <a href='#revamped-git-support'>Revamped <span class='inlinecode'>git</span> support</a></li> -<li>⇢ ⇢ <a href='#addition-of-htmlextras-and-web-font-support'>Addition of <span class='inlinecode'>htmlextras</span> and web font support</a></li> -<li>⇢ ⇢ <a href='#sub-section-support'>Sub-section support</a></li> -<li>⇢ ⇢ <a href='#more'>More</a></li> -</ul><br /> -<h2 style='display: inline' id='what-s-new'>What's new?</h2><br /> -<br /> -<h3 style='display: inline' id='automatic-check-for-gnu-version-requirements'>Automatic check for GNU version requirements</h3><br /> -<br /> -<span>Gemtexter relies on the GNU versions of the tools <span class='inlinecode'>grep</span>, <span class='inlinecode'>sed</span> and <span class='inlinecode'>date</span> and it also requires the Bash shell in version 5 at least. That's now done in the <span class='inlinecode'>check_dependencies()</span> function:</span><br /> -<br /> -<!-- Generator: GNU source-highlight 3.1.9 -by Lorenzo Bettini -http://www.lorenzobettini.it -http://www.gnu.org/software/src-highlite --> -<pre>check_dependencies () { - <i><font color="silver"># At least, Bash 5 is required</font></i> - <b><u><font color="#000000">local</font></u></b> -i required_version=<font color="#000000">5</font> - IFS=. <b><u><font color="#000000">read</font></u></b> -ra version <<< <font color="#808080">"$BASH_VERSION"</font> - <b><u><font color="#000000">if</font></u></b> [ <font color="#808080">"${version[0]}"</font> -lt $required_version ]; <b><u><font color="#000000">then</font></u></b> - log ERROR <font color="#808080">"ERROR, </font>\"<font color="#808080">bash</font>\"<font color="#808080"> must be at least at major version $required_version!"</font> - <b><u><font color="#000000">exit</font></u></b> <font color="#000000">2</font> - <b><u><font color="#000000">fi</font></u></b> - - <i><font color="silver"># These must be the GNU versions of the commands</font></i> - <b><u><font color="#000000">for</font></u></b> tool <b><u><font color="#000000">in</font></u></b> $DATE $SED $GREP; <b><u><font color="#000000">do</font></u></b> - <b><u><font color="#000000">if</font></u></b> ! $tool --version | grep -q GNU; <b><u><font color="#000000">then</font></u></b> - log ERROR <font color="#808080">"ERROR, </font>\"<font color="#808080">$tool</font>\"<font color="#808080"> command is not the GNU version, please install!"</font> - <b><u><font color="#000000">exit</font></u></b> <font color="#000000">2</font> - <b><u><font color="#000000">fi</font></u></b> - <b><u><font color="#000000">done</font></u></b> -} -</pre> -<br /> -<span>Especially macOS users didn't read the <span class='inlinecode'>README</span> carefully enough to install GNU Grep, GNU Sed and GNU Date before using Gemtexter.</span><br /> -<br /> -<h3 style='display: inline' id='backticks-now-produce-inline-code-blocks-in-the-html-output'>Backticks now produce <span class='inlinecode'>inline code blocks</span> in the HTML output</h3><br /> -<br /> -<span>The Gemtext format doesn't support inline code blocks, but Gemtexter now produces <span class='inlinecode'>inline code blocks</span> (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.</span><br /> -<br /> -<h3 style='display: inline' id='cache-for-atom-feed-generation'>Cache for Atom feed generation</h3><br /> -<br /> -<span>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 <span class='inlinecode'>.gmi</span> file to decide whether anything of the content has changed or not.</span><br /> -<br /> -<h3 style='display: inline' id='input-filter-support'>Input filter support</h3><br /> -<br /> -<span>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:</span><br /> -<br /> -<!-- Generator: GNU source-highlight 3.1.9 -by Lorenzo Bettini -http://www.lorenzobettini.it -http://www.gnu.org/software/src-highlite --> -<pre>./gemtexter --generate <font color="#808080">'.*hello.*'</font> -</pre> -<br /> -<h3 style='display: inline' id='revamped-git-support'>Revamped <span class='inlinecode'>git</span> support</h3><br /> -<br /> -<span>The Git support has been completely rewritten. It's now more reliable and faster too. Have a look at the <span class='inlinecode'>README</span> for more information.</span><br /> -<br /> -<h3 style='display: inline' id='addition-of-htmlextras-and-web-font-support'>Addition of <span class='inlinecode'>htmlextras</span> and web font support</h3><br /> -<br /> -<span>The <span class='inlinecode'>htmlextras</span> folder now contains all extra files required for the HTML output format such as cascading style sheet (CSS) files and web fonts.</span><br /> -<br /> -<h3 style='display: inline' id='sub-section-support'>Sub-section support</h3><br /> -<br /> -<span>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.:</span><br /> -<br /> -<a class='textlink' href='https://foo.zone'>The foo.zone main site</a><br /> -<a class='textlink' href='https://foo.zone/notes'>The notes sub-section (with different fonts)</a><br /> -<br /> -<h3 style='display: inline' id='more'>More</h3><br /> -<br /> -<span>Additionally, there were a couple of bug fixes, refactorings and overall improvements in the documentation made. </span><br /> -<br /> -<span>Overall I think it's a pretty solid <span class='inlinecode'>1.1.0</span> release without anything groundbreaking (therefore no major version jump). But I am happy about it.</span><br /> -<br /> -<span>E-Mail your comments to <span class='inlinecode'>paul@nospam.buetow.org</span> :-)</span><br /> -<br /> -<span>Other related posts are:</span><br /> -<br /> -<a class='textlink' href='./2024-10-02-gemtexter-3.0.0-lets-gemtext-again-4.html'>2024-10-02 Gemtexter 3.0.0 - Let's Gemtext again⁴</a><br /> -<a class='textlink' href='./2023-07-21-gemtexter-2.1.0-lets-gemtext-again-3.html'>2023-07-21 Gemtexter 2.1.0 - Let's Gemtext again³</a><br /> -<a class='textlink' href='./2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.html'>2023-03-25 Gemtexter 2.0.0 - Let's Gemtext again²</a><br /> -<a class='textlink' href='./2022-08-27-gemtexter-1.1.0-lets-gemtext-again.html'>2022-08-27 Gemtexter 1.1.0 - Let's Gemtext again (You are currently reading this)</a><br /> -<a class='textlink' href='./2021-06-05-gemtexter-one-bash-script-to-rule-it-all.html'>2021-06-05 Gemtexter - One Bash script to rule it all</a><br /> -<a class='textlink' href='./2021-04-24-welcome-to-the-geminispace.html'>2021-04-24 Welcome to the Geminispace</a><br /> -<br /> -<a class='textlink' href='../'>Back to the main site</a><br /> - </div> - </content> - </entry> </feed> diff --git a/gemfeed/index.gmi b/gemfeed/index.gmi index 929f6ba0..27f8044f 100644 --- a/gemfeed/index.gmi +++ b/gemfeed/index.gmi @@ -2,6 +2,7 @@ ## To be in the .zone! +=> ./2025-02-08-random-weird-things-ii.gmi 2025-02-08 - Random Weird Things - Part Ⅱ => ./2025-02-01-f3s-kubernetes-with-freebsd-part-3.gmi 2025-02-01 - f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts => ./2025-01-15-working-with-an-sre-interview.gmi 2025-01-15 - Working with an SRE Interview => ./2025-01-01-posts-from-october-to-december-2024.gmi 2025-01-01 - Posts from October to December 2024 @@ -14,7 +15,7 @@ => ./2024-09-07-projects-i-support.gmi 2024-09-07 - Projects I financially support => ./2024-08-05-typing-127.1-words-per-minute.gmi 2024-08-05 - Typing `127.1` words per minute (`>100wpm average`) => ./2024-07-07-the-stoic-challenge-book-notes.gmi 2024-07-07 - 'The Stoic Challenge' book notes -=> ./2024-07-05-random-weird-things.gmi 2024-07-05 - Random Weird Things +=> ./2024-07-05-random-weird-things.gmi 2024-07-05 - Random Weird Things - Part Ⅰ => ./2024-06-23-terminal-multiplexing-with-tmux.gmi 2024-06-23 - Terminal multiplexing with `tmux` => ./2024-05-03-projects-i-currently-dont-have-time-for.gmi 2024-05-03 - Projects I currently don't have time for => ./2024-05-01-slow-productivity-book-notes.gmi 2024-05-01 - 'Slow Productivity' book notes diff --git a/gemfeed/random-weird-things-ii/css-conway.png b/gemfeed/random-weird-things-ii/css-conway.png Binary files differnew file mode 100644 index 00000000..c29d1d8b --- /dev/null +++ b/gemfeed/random-weird-things-ii/css-conway.png diff --git a/gemfeed/random-weird-things-ii/go-font-code.png b/gemfeed/random-weird-things-ii/go-font-code.png Binary files differnew file mode 100644 index 00000000..630cccfe --- /dev/null +++ b/gemfeed/random-weird-things-ii/go-font-code.png diff --git a/gemfeed/random-weird-things-ii/sqlite-gem.png b/gemfeed/random-weird-things-ii/sqlite-gem.png Binary files differnew file mode 100644 index 00000000..f3c3ceb6 --- /dev/null +++ b/gemfeed/random-weird-things-ii/sqlite-gem.png |
