diff options
| author | Paul Buetow <paul@buetow.org> | 2025-02-08 11:12:36 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-02-08 11:12:36 +0200 |
| commit | 6c4b170afe6cee2c9dbd2cc117b597b8fd544590 (patch) | |
| tree | c890e637df6778d38677abcff668500f7b863e42 /gemfeed | |
| parent | 30e7bf7e59b13e8348403a4cba3684cdbd1410cc (diff) | |
Update content for md
Diffstat (limited to 'gemfeed')
| -rw-r--r-- | gemfeed/2025-02-08-random-weird-things-ii.md | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/gemfeed/2025-02-08-random-weird-things-ii.md b/gemfeed/2025-02-08-random-weird-things-ii.md index 3bd8973b..00d7100e 100644 --- a/gemfeed/2025-02-08-random-weird-things-ii.md +++ b/gemfeed/2025-02-08-random-weird-things-ii.md @@ -18,22 +18,32 @@ Every so often, I come across random, weird, and unexpected things on the intern ## Table of Contents * [⇢ Random Weird Things - Part Ⅱ](#random-weird-things---part-) +* [⇢ ⇢ 11. The SQLite codebase is a gem](#11-the-sqlite-codebase-is-a-gem) * [⇢ ⇢ Go Programming](#go-programming) -* [⇢ ⇢ ⇢ 11. Official Go font](#11-official-go-font) -* [⇢ ⇢ ⇢ 12. Go functions can have methods](#12-go-functions-can-have-methods) +* [⇢ ⇢ ⇢ 12. Official Go font](#12-official-go-font) +* [⇢ ⇢ ⇢ 13. Go functions can have methods](#13-go-functions-can-have-methods) * [⇢ ⇢ macOS](#macos) -* [⇢ ⇢ ⇢ 13. ß and ss are treated the same](#13--and-ss-are-treated-the-same) -* [⇢ ⇢ ⇢ 14. Colon as file path separator](#14-colon-as-file-path-separator) -* [⇢ ⇢ 15. Polyglots - programs written in multiple languages](#15-polyglots---programs-written-in-multiple-languages) -* [⇢ ⇢ 16. Languages, where indices start at 1](#16-languages-where-indices-start-at-1) -* [⇢ ⇢ 17. Perl Poetry](#17-perl-poetry) -* [⇢ ⇢ 18. CSS3 is turing complete](#18-css3-is-turing-complete) -* [⇢ ⇢ 19. The SQLite codebase is a gem](#19-the-sqlite-codebase-is-a-gem) +* [⇢ ⇢ ⇢ 14. ß and ss are treated the same](#14--and-ss-are-treated-the-same) +* [⇢ ⇢ ⇢ 15. Colon as file path separator](#15-colon-as-file-path-separator) +* [⇢ ⇢ 16. Polyglots - programs written in multiple languages](#16-polyglots---programs-written-in-multiple-languages) +* [⇢ ⇢ 17. Languages, where indices start at 1](#17-languages-where-indices-start-at-1) +* [⇢ ⇢ 18. Perl Poetry](#18-perl-poetry) +* [⇢ ⇢ 19. CSS3 is turing complete](#19-css3-is-turing-complete) * [⇢ ⇢ 20. The biggest shell programs ](#20-the-biggest-shell-programs-) +## 11. The SQLite codebase is a gem + +Check this out: + +[](./random-weird-things-ii/sqlite-gem.png) + +Source: + +[https://wetdry.world/@memes/112717700557038278](https://wetdry.world/@memes/112717700557038278) + ## Go Programming -### 11. Official Go font +### 12. 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. @@ -47,7 +57,7 @@ The design emphasizes simplicity and readability, reflecting Go's philosophy of 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 +### 13. 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: @@ -87,7 +97,7 @@ It runs just fine: For personal computing, I don't use Apple, but I have to use it for work. -### 13. ß and ss are treated the same +### 14. ß 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. @@ -113,7 +123,7 @@ So, even though "Maß" and "Mass" are not strictly equivalent, the macOS file sy ``` -### 14. Colon as file path separator +### 15. 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: @@ -125,7 +135,7 @@ I can't reproduce this on my (work) Mac, though, as it now uses the APFS file sy [https://social.jvns.ca/@b0rk/113041293527832730](https://social.jvns.ca/@b0rk/113041293527832730) -## 15. Polyglots - programs written in multiple languages +## 16. 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. @@ -133,7 +143,7 @@ Check out my very own polyglot: [The `fibonatti.pl.c` Polyglot](./2014-03-24-the-fibonacci.pl.c-polyglot.md) -## 16. Languages, where indices start at 1 +## 17. 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. @@ -160,7 +170,7 @@ print(arr[1]) -- Accessing the first element One-based indexing is more natural for human-readable, mathematical, and theoretical contexts, where counting traditionally starts from one. -## 17. Perl Poetry +## 18. 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. @@ -210,7 +220,7 @@ This is perl, v5.8.8 built for i386-freebsd-64int [More Perl Poetry of mine](./2008-06-26-perl-poetry.md) -## 18. CSS3 is turing complete +## 19. 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. @@ -226,16 +236,6 @@ Check out this 100% CSS implementation of the 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) - -Source: - -[https://wetdry.world/@memes/112717700557038278](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! |
