diff options
| author | Paul Buetow <paul@buetow.org> | 2025-10-11 15:26:26 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-10-11 15:26:26 +0300 |
| commit | 7ce4d3f1313135c4e2d49a97f9318e99fdfbad41 (patch) | |
| tree | 93e5a492eacc390366c86a91bd7690e44be017f0 | |
| parent | 81c2749d79089d89b007e15fac0b387730fec550 (diff) | |
Update content for html
| -rw-r--r-- | about/resources.html | 200 | ||||
| -rw-r--r-- | gemfeed/2021-07-04-the-well-grounded-rubyist.html | 5 | ||||
| -rw-r--r-- | gemfeed/2025-10-11-the-well-grounded-rubyist-notes.html | 253 | ||||
| -rw-r--r-- | gemfeed/atom.xml | 387 | ||||
| -rw-r--r-- | gemfeed/index.html | 1 | ||||
| -rw-r--r-- | index.html | 3 | ||||
| -rw-r--r-- | uptime-stats.html | 2 |
7 files changed, 607 insertions, 244 deletions
diff --git a/about/resources.html b/about/resources.html index 80a4cf23..be4c644e 100644 --- a/about/resources.html +++ b/about/resources.html @@ -51,65 +51,65 @@ <br /> <ul> <li>Amazon Web Services in Action; Michael Wittig and Andreas Wittig; Manning Publications</li> -<li>Higher Order Perl; Mark Dominus; Morgan Kaufmann</li> +<li>Raku Fundamentals; Moritz Lenz; Apress</li> <li>Think Raku (aka Think Perl 6); Laurent Rosenfeld, Allen B. Downey; O'Reilly</li> -<li>Effective awk programming; Arnold Robbins; O'Reilly</li> -<li>Programming Ruby 3.3 (5th Edition); Noel Rappin, with Dave Thomas; The Pragmatic Bookshelf</li> -<li>Learn You a Haskell for Great Good!; Miran Lipovaca; No Starch Press</li> -<li>Raku Recipes; J.J. Merelo; Apress</li> -<li>Tmux 2: Productive Mouse-free Development; Brain P. Hogan; The Pragmatic Programmers </li> -<li>Ultimate Go Notebook; Bill Kennedy</li> -<li>Distributed Systems: Principles and Paradigms; Andrew S. Tanenbaum; Pearson</li> -<li>Developing Games in Java; David Brackeen and others...; New Riders</li> -<li>Systemprogrammierung in Go; Frank Müller; dpunkt</li> -<li>C++ Programming Language; Bjarne Stroustrup;</li> -<li>The Practise of System and Network Administration; Thomas A. Limoncelli, Christina J. Hogan, Strata R. Chalup; Addison-Wesley Professional Pro Git; Scott Chacon, Ben Straub; Apress</li> -<li>DevOps And Site Reliability Engineering Handbook; Stephen Fleming; Audible</li> -<li>97 things every SRE should know; Emil Stolarsky, Jaime Woo; O'Reilly</li> -<li>Hands-on Infrastructure Monitoring with Prometheus; Joel Bastos, Pedro Araujo; Packt </li> -<li>The Docker Book; James Turnbull; Kindle</li> <li>Programming Perl aka "The Camel Book"; Tom Christiansen, brian d foy, Larry Wall & Jon Orwant; O'Reilly</li> -<li>The Go Programming Language; Alan A. A. Donovan; Addison-Wesley Professional</li> +<li>The Kubernetes Book; Nigel Poulton; Unabridged Audiobook</li> +<li>Object-Oriented Programming with ANSI-C; Axel-Tobias Schreiner</li> <li>Site Reliability Engineering; How Google runs production systems; O'Reilly</li> -<li>Chaos Engineering - System Resiliency in Practice; Casey Rosenthal and Nora Jones; eBook</li> -<li>Concurrency in Go; Katherine Cox-Buday; O'Reilly</li> -<li>Data Science at the Command Line; Jeroen Janssens; O'Reilly</li> -<li>Modern Perl; Chromatic ; Onyx Neon Press</li> +<li>The Practise of System and Network Administration; Thomas A. Limoncelli, Christina J. Hogan, Strata R. Chalup; Addison-Wesley Professional Pro Git; Scott Chacon, Ben Straub; Apress</li> <li>Effective Java; Joshua Bloch; Addison-Wesley Professional</li> -<li>Object-Oriented Programming with ANSI-C; Axel-Tobias Schreiner</li> -<li>Polished Ruby Programming; Jeremy Evans; Packt Publishing</li> -<li>DNS and BIND; Cricket Liu; O'Reilly</li> -<li>The Kubernetes Book; Nigel Poulton; Unabridged Audiobook</li> -<li>Go Brain Teasers - Exercise Your Mind; Miki Tebeka; The Pragmatic Programmers</li> -<li>Systems Performance Tuning; Gian-Paolo D. Musumeci and others...; O'Reilly</li> -<li>The DevOps Handbook; Gene Kim, Jez Humble, Patrick Debois, John Willis; Audible</li> -<li>21st Century C: C Tips from the New School; Ben Klemens; O'Reilly</li> -<li>Learn You Some Erlang for Great Good; Fred Herbert; No Starch Press</li> +<li>Data Science at the Command Line; Jeroen Janssens; O'Reilly</li> <li>Java ist auch eine Insel; Christian Ullenboom; </li> -<li>Funktionale Programmierung; Peter Pepper; Springer</li> -<li>Clusterbau mit Linux-HA; Michael Schwartzkopff; O'Reilly</li> -<li>The KCNA (Kubernetes and Cloud Native Associate) Book; Nigel Poulton</li> +<li>Perl New Features; Joshua McAdams, brian d foy; Perl School</li> +<li>Ultimate Go Notebook; Bill Kennedy</li> +<li>Systemprogrammierung in Go; Frank Müller; dpunkt</li> +<li>The DevOps Handbook; Gene Kim, Jez Humble, Patrick Debois, John Willis; Audible</li> <li>The Pragmatic Programmer; David Thomas; Addison-Wesley</li> <li>Kubernetes Cookbook; Sameer Naik, Sébastien Goasguen, Jonathan Michaux; O'Reilly</li> +<li>Hands-on Infrastructure Monitoring with Prometheus; Joel Bastos, Pedro Araujo; Packt </li> +<li>Raku Recipes; J.J. Merelo; Apress</li> +<li>Distributed Systems: Principles and Paradigms; Andrew S. Tanenbaum; Pearson</li> +<li>21st Century C: C Tips from the New School; Ben Klemens; O'Reilly</li> +<li>Learn You Some Erlang for Great Good; Fred Herbert; No Starch Press</li> <li>Leanring eBPF; Liz Rice; O'Reilly</li> -<li>Perl New Features; Joshua McAdams, brian d foy; Perl School</li> -<li>Raku Fundamentals; Moritz Lenz; Apress</li> -<li>Terraform Cookbook; Mikael Krief; Packt Publishing</li> <li>Pro Puppet; James Turnbull, Jeffrey McCune; Apress</li> +<li>Learn You a Haskell for Great Good!; Miran Lipovaca; No Starch Press</li> +<li>DNS and BIND; Cricket Liu; O'Reilly</li> +<li>Go Brain Teasers - Exercise Your Mind; Miki Tebeka; The Pragmatic Programmers</li> +<li>C++ Programming Language; Bjarne Stroustrup;</li> +<li>97 things every SRE should know; Emil Stolarsky, Jaime Woo; O'Reilly</li> +<li>Systems Performance Tuning; Gian-Paolo D. Musumeci and others...; O'Reilly</li> +<li>Effective awk programming; Arnold Robbins; O'Reilly</li> +<li>Chaos Engineering - System Resiliency in Practice; Casey Rosenthal and Nora Jones; eBook</li> +<li>The Docker Book; James Turnbull; Kindle</li> +<li>Polished Ruby Programming; Jeremy Evans; Packt Publishing</li> +<li>The KCNA (Kubernetes and Cloud Native Associate) Book; Nigel Poulton</li> +<li>The Go Programming Language; Alan A. A. Donovan; Addison-Wesley Professional</li> +<li>Terraform Cookbook; Mikael Krief; Packt Publishing</li> +<li>Developing Games in Java; David Brackeen and others...; New Riders</li> +<li>DevOps And Site Reliability Engineering Handbook; Stephen Fleming; Audible</li> +<li>Programming Ruby 3.3 (5th Edition); Noel Rappin, with Dave Thomas; The Pragmatic Bookshelf</li> +<li>Higher Order Perl; Mark Dominus; Morgan Kaufmann</li> +<li>Clusterbau mit Linux-HA; Michael Schwartzkopff; O'Reilly</li> <li>100 Go Mistakes and How to Avoid Them; Teiva Harsanyi; Manning Publications</li> +<li>Concurrency in Go; Katherine Cox-Buday; O'Reilly</li> +<li>Tmux 2: Productive Mouse-free Development; Brain P. Hogan; The Pragmatic Programmers </li> +<li>Funktionale Programmierung; Peter Pepper; Springer</li> +<li>Modern Perl; Chromatic ; Onyx Neon Press</li> </ul><br /> <h2 style='display: inline' id='technical-references'>Technical references</h2><br /> <br /> <span>I didn't read them from the beginning to the end, but I am using them to look up things. The books are in random order:</span><br /> <br /> <ul> -<li>Relayd and Httpd Mastery; Michael W Lucas</li> -<li>Algorithms; Robert Sedgewick, Kevin Wayne; Addison Wesley</li> <li>Understanding the Linux Kernel; Daniel P. Bovet, Marco Cesati; O'Reilly</li> -<li>Go: Design Patterns for Real-World Projects; Mat Ryer; Packt</li> +<li>Implementing Service Level Objectives; Alex Hidalgo; O'Reilly</li> <li>Groovy Kurz & Gut; Joerg Staudemeier; O'Reilly</li> +<li>Relayd and Httpd Mastery; Michael W Lucas</li> +<li>Go: Design Patterns for Real-World Projects; Mat Ryer; Packt</li> <li>BPF Performance Tools - Linux System and Application Observability, Brendan Gregg; Addison Wesley</li> -<li>Implementing Service Level Objectives; Alex Hidalgo; O'Reilly</li> +<li>Algorithms; Robert Sedgewick, Kevin Wayne; Addison Wesley</li> <li>The Linux Programming Interface; Michael Kerrisk; No Starch Press </li> </ul><br /> <h2 style='display: inline' id='self-development-and-soft-skills-books'>Self-development and soft-skills books</h2><br /> @@ -117,42 +117,42 @@ <span>In random order:</span><br /> <br /> <ul> -<li>The Joy of Missing Out; Christina Crook; New Society Publishers</li> -<li>The Off Switch; Mark Cropley; Virgin Books (RE-READ 1ST TIME)</li> -<li>The Phoenix Project - A Novel About IT, DevOps, and Helping your Business Win; Gene Kim and Kevin Behr; Trade Select</li> +<li>Digital Minimalism; Cal Newport; Portofolio Penguin</li> <li>Psycho-Cybernetics; Maxwell Maltz; Perigee Books</li> +<li>Who Moved My Cheese?; Dr. Spencer Johnson; Vermilion</li> +<li>Coders at Work - Reflections on the craft of programming, Peter Seibel and Mitchell Dorian et al., Audiobook</li> +<li>The Joy of Missing Out; Christina Crook; New Society Publishers</li> +<li>Ultralearning; Scott Young; Thorsons</li> +<li>Eat That Frog!; Brian Tracy; Hodder Paperbacks</li> <li>The 7 Habits Of Highly Effective People; Stephen R. Covey; Simon & Schuster UK</li> -<li>Ultralearning; Anna Laurent; Self-published via Amazon</li> -<li>Solve for Happy; Mo Gawdat (RE-READ 1ST TIME)</li> +<li>Deep Work; Cal Newport; Piatkus</li> +<li>The Phoenix Project - A Novel About IT, DevOps, and Helping your Business Win; Gene Kim and Kevin Behr; Trade Select</li> +<li>The Daily Stoic; Ryan Holiday, Stephen Hanselman; Profile Books</li> +<li>Stop starting, start finishing; Arne Roock; Lean-Kanban University </li> <li>Meditation for Mortals, Oliver Burkeman, Audiobook</li> +<li>The Complete Software Developer's Career Guide; John Sonmez; Unabridged Audiobook</li> +<li>The Obstacle Is The Way; Ryan Holiday; Profile Books Ltd</li> +<li>So Good They Can't Ignore You; Cal Newport; Business Plus</li> +<li>The Power of Now; Eckhard Tolle; Yellow Kite</li> +<li>The Off Switch; Mark Cropley; Virgin Books (RE-READ 1ST TIME)</li> +<li>Time Management for System Administrators; Thomas A. Limoncelli; O'Reilly</li> +<li>97 Things Every Engineering Manager Should Know; Camille Fournier; Audiobook</li> +<li>Influence without Authority; A. Cohen, D. Bradford; Wiley</li> +<li>The Bullet Journal Method; Ryder Carroll; Fourth Estate</li> <li>Slow Productivity; Cal Newport; Penguin Random House</li> -<li>Consciousness: A Very Short Introduction; Susan Blackmore; Oxford Uiversity Press</li> +<li>Ultralearning; Anna Laurent; Self-published via Amazon</li> <li>101 Essays that change the way you think; Brianna Wiest; Audiobook</li> -<li>Stop starting, start finishing; Arne Roock; Lean-Kanban University </li> -<li>Eat That Frog!; Brian Tracy; Hodder Paperbacks</li> +<li>Atomic Habits; James Clear; Random House Business</li> <li>Staff Engineer: Leadership beyond the management track; Will Larson; Audiobook</li> -<li>Coders at Work - Reflections on the craft of programming, Peter Seibel and Mitchell Dorian et al., Audiobook</li> -<li>The Bullet Journal Method; Ryder Carroll; Fourth Estate</li> -<li>Time Management for System Administrators; Thomas A. Limoncelli; O'Reilly</li> -<li>Buddah and Einstein walk into a Bar; Guy Joseph Ale, Claire Bloom; Blackstone Publishing</li> +<li>Consciousness: A Very Short Introduction; Susan Blackmore; Oxford Uiversity Press</li> <li>Never Split the Difference; Chris Voss, Tahl Raz; Random House Business</li> +<li>Getting Things Done; David Allen</li> +<li>Solve for Happy; Mo Gawdat (RE-READ 1ST TIME)</li> <li>The Good Enough Job; Simone Stolzoff; Ebury Edge</li> -<li>97 Things Every Engineering Manager Should Know; Camille Fournier; Audiobook</li> -<li>So Good They Can't Ignore You; Cal Newport; Business Plus</li> -<li>Soft Skills; John Sommez; Manning Publications</li> -<li>Search Inside Yourself - The Unexpected path to Achieving Success, Happiness (and World Peace); Chade-Meng Tan, Daniel Goleman, Jon Kabat-Zinn; HarperOne</li> -<li>Who Moved My Cheese?; Dr. Spencer Johnson; Vermilion</li> -<li>Influence without Authority; A. Cohen, D. Bradford; Wiley</li> -<li>Ultralearning; Scott Young; Thorsons</li> -<li>The Power of Now; Eckhard Tolle; Yellow Kite</li> -<li>Digital Minimalism; Cal Newport; Portofolio Penguin</li> -<li>The Complete Software Developer's Career Guide; John Sonmez; Unabridged Audiobook</li> -<li>Atomic Habits; James Clear; Random House Business</li> <li>Eat That Frog; Brian Tracy</li> -<li>Deep Work; Cal Newport; Piatkus</li> -<li>The Obstacle Is The Way; Ryan Holiday; Profile Books Ltd</li> -<li>The Daily Stoic; Ryan Holiday, Stephen Hanselman; Profile Books</li> -<li>Getting Things Done; David Allen</li> +<li>Search Inside Yourself - The Unexpected path to Achieving Success, Happiness (and World Peace); Chade-Meng Tan, Daniel Goleman, Jon Kabat-Zinn; HarperOne</li> +<li>Buddah and Einstein walk into a Bar; Guy Joseph Ale, Claire Bloom; Blackstone Publishing</li> +<li>Soft Skills; John Sommez; Manning Publications</li> </ul><br /> <a class='textlink' href='../notes/index.html'>Here are notes of mine for some of the books</a><br /> <br /> @@ -161,22 +161,22 @@ <span>Some of these were in-person with exams; others were online learning lectures only. In random order:</span><br /> <br /> <ul> +<li>Structure and Interpretation of Computer Programs; Harold Abelson and more...; </li> +<li>Ultimate Go Programming; Bill Kennedy; O'Reilly Online</li> <li>The Ultimate Kubernetes Bootcamp; School of Devops; O'Reilly Online</li> -<li>Functional programming lecture; Remote University of Hagen</li> +<li>Developing IaC with Terraform (with Live Lessons); O'Reilly Online</li> +<li>MySQL Deep Dive Workshop; 2-day on-site training</li> +<li>AWS Immersion Day; Amazon; 1-day interactive online training </li> +<li>Linux Security and Isolation APIs Training; Michael Kerrisk; 3-day on-site training</li> <li>Apache Tomcat Best Practises; 3-day on-site training</li> -<li>F5 Loadbalancers Training; 2-day on-site training; F5, Inc. </li> -<li>Cloud Operations on AWS - Learn how to configure, deploy, maintain, and troubleshoot your AWS environments; 3-day online live training with labs; Amazon</li> <li>Red Hat Certified System Administrator; Course + certification (Although I had the option, I decided not to take the next course as it is more effective to self learn what I need)</li> -<li>Structure and Interpretation of Computer Programs; Harold Abelson and more...; </li> +<li>Scripting Vim; Damian Conway; O'Reilly Online</li> +<li>Functional programming lecture; Remote University of Hagen</li> +<li>Cloud Operations on AWS - Learn how to configure, deploy, maintain, and troubleshoot your AWS environments; 3-day online live training with labs; Amazon</li> +<li>Algorithms Video Lectures; Robert Sedgewick; O'Reilly Online</li> <li>Protocol buffers; O'Reilly Online</li> -<li>MySQL Deep Dive Workshop; 2-day on-site training</li> +<li>F5 Loadbalancers Training; 2-day on-site training; F5, Inc. </li> <li>The Well-Grounded Rubyist Video Edition; David. A. Black; O'Reilly Online</li> -<li>Ultimate Go Programming; Bill Kennedy; O'Reilly Online</li> -<li>Linux Security and Isolation APIs Training; Michael Kerrisk; 3-day on-site training</li> -<li>Algorithms Video Lectures; Robert Sedgewick; O'Reilly Online</li> -<li>Developing IaC with Terraform (with Live Lessons); O'Reilly Online</li> -<li>Scripting Vim; Damian Conway; O'Reilly Online</li> -<li>AWS Immersion Day; Amazon; 1-day interactive online training </li> </ul><br /> <h2 style='display: inline' id='technical-guides'>Technical guides</h2><br /> <br /> @@ -194,20 +194,20 @@ <span>In random order:</span><br /> <br /> <ul> -<li>Modern Mentor</li> -<li>Wednesday Wisdom</li> -<li>The Changelog Podcast(s)</li> -<li>Cup o' Go [Golang]</li> +<li>Pratical AI</li> +<li>Hidden Brain</li> +<li>BSD Now [BSD]</li> +<li>The ProdCast (Google SRE Podcast)</li> <li>Backend Banter</li> -<li>Maintainable</li> <li>Dev Interrupted</li> -<li>Deep Questions with Cal Newport</li> <li>Fallthrough [Golang]</li> -<li>The ProdCast (Google SRE Podcast)</li> +<li>The Changelog Podcast(s)</li> <li>Fork Around And Find Out</li> -<li>BSD Now [BSD]</li> -<li>Hidden Brain</li> -<li>Pratical AI</li> +<li>Deep Questions with Cal Newport</li> +<li>Modern Mentor</li> +<li>Maintainable</li> +<li>Cup o' Go [Golang]</li> +<li>Wednesday Wisdom</li> <li>The Pragmatic Engineer Podcast</li> </ul><br /> <h3 style='display: inline' id='podcasts-i-liked'>Podcasts I liked</h3><br /> @@ -216,38 +216,38 @@ <br /> <ul> <li>Java Pub House</li> -<li>Modern Mentor</li> -<li>CRE: Chaosradio Express [german]</li> -<li>Ship It (predecessor of Fork Around And Find Out)</li> <li>FLOSS weekly</li> <li>Go Time (predecessor of fallthrough)</li> +<li>Ship It (predecessor of Fork Around And Find Out)</li> +<li>CRE: Chaosradio Express [german]</li> +<li>Modern Mentor</li> </ul><br /> <h2 style='display: inline' id='newsletters-i-like'>Newsletters I like</h2><br /> <br /> <span>This is a mix of tech and non-tech newsletters I am subscribed to. In random order:</span><br /> <br /> <ul> -<li>Monospace Mentor</li> -<li>Ruby Weekly</li> -<li>VK Newsletter</li> -<li>Golang Weekly</li> <li>The Valuable Dev</li> -<li>byteSizeGo</li> -<li>The Pragmatic Engineer</li> -<li>Register Spill</li> -<li>Applied Go Weekly Newsletter</li> <li>The Imperfectionist</li> <li>Andreas Brandhorst Newsletter (Sci-Fi author)</li> <li>Changelog News</li> +<li>byteSizeGo</li> +<li>The Pragmatic Engineer</li> +<li>Applied Go Weekly Newsletter</li> +<li>Monospace Mentor</li> +<li>Register Spill</li> +<li>Ruby Weekly</li> +<li>Golang Weekly</li> +<li>VK Newsletter</li> </ul><br /> <h2 style='display: inline' id='magazines-i-liked'>Magazines I like(d)</h2><br /> <br /> <span>This is a mix of tech I like(d). I may not be a current subscriber, but now and then, I buy an issue. In random order:</span><br /> <br /> <ul> +<li>LWN (online only)</li> <li>Linux Magazine</li> <li>Linux User</li> -<li>LWN (online only)</li> <li>freeX (not published anymore)</li> </ul><br /> <h1 style='display: inline' id='formal-education'>Formal education</h1><br /> diff --git a/gemfeed/2021-07-04-the-well-grounded-rubyist.html b/gemfeed/2021-07-04-the-well-grounded-rubyist.html index 6d92a11f..7e5551c5 100644 --- a/gemfeed/2021-07-04-the-well-grounded-rubyist.html +++ b/gemfeed/2021-07-04-the-well-grounded-rubyist.html @@ -133,6 +133,11 @@ Hello World <br /> <span>E-Mail your comments to <span class='inlinecode'>paul@nospam.buetow.org</span> :-)</span><br /> <br /> +<span>Other Ruby-related posts:</span><br /> +<br /> +<a class='textlink' href='./2025-10-11-the-well-grounded-rubyist-notes.html'>2025-10-11 Key Takeaways from The Well-Grounded Rubyist</a><br /> +<a class='textlink' href='./2021-07-04-the-well-grounded-rubyist.html'>2021-07-04 The Well-Grounded Rubyist (You are currently reading this)</a><br /> +<br /> <a class='textlink' href='../'>Back to the main site</a><br /> <p class="footer"> Generated with <a href="https://codeberg.org/snonux/gemtexter">Gemtexter 3.0.1-develop</a> | diff --git a/gemfeed/2025-10-11-the-well-grounded-rubyist-notes.html b/gemfeed/2025-10-11-the-well-grounded-rubyist-notes.html new file mode 100644 index 00000000..e9eba28d --- /dev/null +++ b/gemfeed/2025-10-11-the-well-grounded-rubyist-notes.html @@ -0,0 +1,253 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<title>Key Takeaways from The Well-Grounded Rubyist</title> +<link rel="shortcut icon" type="image/gif" href="/favicon.ico" /> +<link rel="stylesheet" href="../style.css" /> +<link rel="stylesheet" href="style-override.css" /> +</head> +<body> +<p class="header"> +<a href="https://foo.zone">Home</a> | <a href="https://codeberg.org/snonux/foo.zone/src/branch/content-md/gemfeed/2025-10-11-the-well-grounded-rubyist-notes.md">Markdown</a> | <a href="gemini://foo.zone/gemfeed/2025-10-11-the-well-grounded-rubyist-notes.gmi">Gemini</a> +</p> +<h1 style='display: inline' id='key-takeaways-from-the-well-grounded-rubyist'>Key Takeaways from The Well-Grounded Rubyist</h1><br /> +<br /> +<span class='quote'>Published at 2025-10-11T15:25:14+03:00</span><br /> +<br /> +<span>Some time ago, I wrote about my journey into Ruby and how "The Well-Grounded Rubyist" helped me to get a better understanding of the language. I took a lot of notes while reading the book, and I think it's time to share some of them. This is not a comprehensive review, but rather a collection of interesting tidbits and concepts that stuck with me.</span><br /> +<br /> +<a class='textlink' href='./2021-07-04-the-well-grounded-rubyist.html'>My first post about the book.</a><br /> +<br /> +<h2 style='display: inline' id='the-object-model'>The Object Model</h2><br /> +<br /> +<span>One of the most fascinating aspects of Ruby is its object model. The book does a great job of explaining the details.</span><br /> +<br /> +<h3 style='display: inline' id='everything-is-an-object-almost'>Everything is an object (almost)</h3><br /> +<br /> +<span>In Ruby, most things are objects. This includes numbers, strings, and even classes themselves. This has some interesting consequences. For example, you can't use <span class='inlinecode'>i++</span> like in C or Java. Integers are immutable objects. <span class='inlinecode'>1</span> is always the same object. <span class='inlinecode'>1 + 1</span> returns a new object, <span class='inlinecode'>2</span>.</span><br /> +<br /> +<h3 style='display: inline' id='the-self-keyword'>The <span class='inlinecode'>self</span> keyword</h3><br /> +<br /> +<span>There is always a current object, <span class='inlinecode'>self</span>. If you call a method without an explicit receiver, it's called on <span class='inlinecode'>self</span>. For example, <span class='inlinecode'>puts "hello"</span> is actually <span class='inlinecode'>self.puts "hello"</span>.</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"># At the top level, self is the main object</font></i> +p <b><u><font color="#000000">self</font></u></b> +<i><font color="silver"># => main</font></i> +p <b><u><font color="#000000">self</font></u></b>.<b><u><font color="#000000">class</font></u></b> +<i><font color="silver"># => Object</font></i> + +<b><u><font color="#000000">def</font></u></b> foo + <i><font color="silver"># Inside a method, self is the object that received the call</font></i> + p <b><u><font color="#000000">self</font></u></b> +<b><u><font color="#000000">end</font></u></b> + +foo +<i><font color="silver"># => main</font></i> +</pre> +<br /> +<span>This code demonstrates how <span class='inlinecode'>self</span> changes depending on the context. At the top level, it's <span class='inlinecode'>main</span>, an instance of <span class='inlinecode'>Object</span>. When <span class='inlinecode'>foo</span> is called without a receiver, it's called on <span class='inlinecode'>main</span>.</span><br /> +<br /> +<h3 style='display: inline' id='singleton-methods'>Singleton Methods</h3><br /> +<br /> +<span>You can add methods to individual objects. These are called singleton methods.</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>obj = <font color="#808080">"a string"</font> + +<b><u><font color="#000000">def</font></u></b> obj.shout + <b><u><font color="#000000">self</font></u></b>.upcase + <font color="#808080">"!"</font> +<b><u><font color="#000000">end</font></u></b> + +p obj.shout +<i><font color="silver"># => "A STRING!"</font></i> + +obj2 = <font color="#808080">"another string"</font> +<i><font color="silver"># obj2.shout would raise a NoMethodError</font></i> +</pre> +<br /> +<span>Here, the <span class='inlinecode'>shout</span> method is only available on the <span class='inlinecode'>obj</span> object. This is a powerful feature for adding behavior to specific instances.</span><br /> +<br /> +<h3 style='display: inline' id='classes-are-objects'>Classes are Objects</h3><br /> +<br /> +<span>Classes themselves are objects, instances of the <span class='inlinecode'>Class</span> class. This means you can create classes dynamically.</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>MyClass = Class.new <b><u><font color="#000000">do</font></u></b> + <b><u><font color="#000000">def</font></u></b> say_hello + puts <font color="#808080">"Hello from a dynamically created class!"</font> + <b><u><font color="#000000">end</font></u></b> +<b><u><font color="#000000">end</font></u></b> + +instance = MyClass.new +instance.say_hello +<i><font color="silver"># => Hello from a dynamically created class!</font></i> +</pre> +<br /> +<span>This shows how to create a new class and assign it to a constant. This is what happens behind the scenes when you use the <span class='inlinecode'>class</span> keyword.</span><br /> +<br /> +<h2 style='display: inline' id='control-flow-and-methods'>Control Flow and Methods</h2><br /> +<br /> +<span>The book clarified many things about how methods and control flow work in Ruby.</span><br /> +<br /> +<h3 style='display: inline' id='case-and-the--operator'><span class='inlinecode'>case</span> and the <span class='inlinecode'>===</span> operator</h3><br /> +<br /> +<span>The <span class='inlinecode'>case</span> statement is more powerful than I thought. It uses the <span class='inlinecode'>===</span> (threequals or case equality) operator for comparison, not <span class='inlinecode'>==</span>. Different classes can implement <span class='inlinecode'>===</span> in their own way.</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"># For ranges, it checks for inclusion</font></i> +p (<font color="#000000">1</font>..<font color="#000000">5</font>) === <font color="#000000">3</font> <i><font color="silver"># => true</font></i> + +<i><font color="silver"># For classes, it checks if the object is an instance of the class</font></i> +p String === <font color="#808080">"hello"</font> <i><font color="silver"># => true</font></i> + +<i><font color="silver"># For regexes, it checks for a match</font></i> +p /llo/ === <font color="#808080">"hello"</font> <i><font color="silver"># => true</font></i> + +<b><u><font color="#000000">def</font></u></b> check(value) + <b><u><font color="#000000">case</font></u></b> value + <b><u><font color="#000000">when</font></u></b> String + <font color="#808080">"It's a string"</font> + <b><u><font color="#000000">when</font></u></b> (<font color="#000000">1</font>..<font color="#000000">10</font>) + <font color="#808080">"It's a number between 1 and 10"</font> + <b><u><font color="#000000">else</font></u></b> + <font color="#808080">"Something else"</font> + <b><u><font color="#000000">end</font></u></b> +<b><u><font color="#000000">end</font></u></b> + +p check(<font color="#000000">5</font>) <i><font color="silver"># => "It's a number between 1 and 10"</font></i> +</pre> +<br /> +<h3 style='display: inline' id='blocks-and-yield'>Blocks and <span class='inlinecode'>yield</span></h3><br /> +<br /> +<span>Blocks are a cornerstone of Ruby. You can pass them to methods to customize their behavior. The <span class='inlinecode'>yield</span> keyword is used to call the block.</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">def</font></u></b> my_iterator + puts <font color="#808080">"Entering the method"</font> + <b><u><font color="#000000">yield</font></u></b> + puts <font color="#808080">"Back in the method"</font> + <b><u><font color="#000000">yield</font></u></b> +<b><u><font color="#000000">end</font></u></b> + +my_iterator { puts <font color="#808080">"Inside the block"</font> } +<i><font color="silver"># Entering the method</font></i> +<i><font color="silver"># Inside the block</font></i> +<i><font color="silver"># Back in the method</font></i> +<i><font color="silver"># Inside the block</font></i> +</pre> +<br /> +<span>This simple iterator shows how <span class='inlinecode'>yield</span> transfers control to the block. You can also pass arguments to <span class='inlinecode'>yield</span> and get a return value from the block.</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">def</font></u></b> with_return + result = <b><u><font color="#000000">yield</font></u></b>(<font color="#000000">5</font>) + puts <font color="#808080">"The block returned #{result}"</font> +<b><u><font color="#000000">end</font></u></b> + +with_return { |n| n * <font color="#000000">2</font> } +<i><font color="silver"># => The block returned 10</font></i> +</pre> +<br /> +<span>This demonstrates passing an argument to the block and using its return value.</span><br /> +<br /> +<h2 style='display: inline' id='fun-with-data-types'>Fun with Data Types</h2><br /> +<br /> +<span>Ruby's core data types are full of nice little features.</span><br /> +<br /> +<h3 style='display: inline' id='symbols'>Symbols</h3><br /> +<br /> +<span>Symbols are like immutable strings. They are great for keys in hashes because they are unique and memory-efficient.</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"># Two strings with the same content are different objects</font></i> +p <font color="#808080">"foo"</font>.object_id +p <font color="#808080">"foo"</font>.object_id + +<i><font color="silver"># Two symbols with the same content are the same object</font></i> +p :foo.object_id +p :foo.object_id + +<i><font color="silver"># Modern hash syntax uses symbols as keys</font></i> +my_hash = { name: <font color="#808080">"Paul"</font>, language: <font color="#808080">"Ruby"</font> } +p my_hash[:name] <i><font color="silver"># => "Paul"</font></i> +</pre> +<br /> +<span>This code highlights the difference between strings and symbols and shows the convenient hash syntax.</span><br /> +<br /> +<h3 style='display: inline' id='arrays-and-hashes'>Arrays and Hashes</h3><br /> +<br /> +<span>Arrays and hashes have a rich API. The <span class='inlinecode'>%w</span> and <span class='inlinecode'>%i</span> shortcuts for creating arrays of strings and symbols are very handy.</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"># Array of strings</font></i> +p %w[one two three] +<i><font color="silver"># => ["one", "two", "three"]</font></i> + +<i><font color="silver"># Array of symbols</font></i> +p %i[one two three] +<i><font color="silver"># => [:one, :two, :three]</font></i> +</pre> +<br /> +<span>A quick way to create arrays. You can also retrieve multiple values at once.</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>] +p arr.values_at(<font color="#000000">0</font>, <font color="#000000">2</font>, <font color="#000000">4</font>) +<i><font color="silver"># => [10, 30, 50]</font></i> + +hash = { a: <font color="#000000">1</font>, b: <font color="#000000">2</font>, c: <font color="#000000">3</font> } +p hash.values_at(:a, :c) +<i><font color="silver"># => [1, 3]</font></i> +</pre> +<br /> +<span>The <span class='inlinecode'>values_at</span> method is a concise way to get multiple elements.</span><br /> +<br /> +<h2 style='display: inline' id='final-thoughts'>Final Thoughts</h2><br /> +<br /> +<span>These are just a few of the many things I learned from "The Well-Grounded Rubyist". The book gave me a much deeper appreciation for the language and its design. If you are a Ruby programmer, I highly recommend it. Meanwhile, I also read the book "Programming Ruby 3.3", just I didn't have time to process my notes there yet. </span><br /> +<br /> +<span>E-Mail your comments to <span class='inlinecode'>paul@nospam.buetow.org</span> :-)</span><br /> +<br /> +<span>Other Ruby-related posts:</span><br /> +<br /> +<a class='textlink' href='./2021-07-04-the-well-grounded-rubyist.html'>2021-07-04 The Well-Grounded Rubyist</a><br /> +<br /> +<a class='textlink' href='../'>Back to the main site</a><br /> +<p class="footer"> + Generated with <a href="https://codeberg.org/snonux/gemtexter">Gemtexter 3.0.1-develop</a> | + served by <a href="https://www.OpenBSD.org">OpenBSD</a>/<a href="https://man.openbsd.org/relayd.8">relayd(8)</a>+<a href="https://man.openbsd.org/httpd.8">httpd(8)</a> | + <a href="https://foo.zone/site-mirrors.html">Site Mirrors</a> + <br /> + Webring: <a href="https://shring.sh/foo.zone/previous">previous</a> | <a href="https://shring.sh">shring</a> | <a href="https://shring.sh/foo.zone/next">next</a> +</p> +</body> +</html> diff --git a/gemfeed/atom.xml b/gemfeed/atom.xml index d2f437a8..22dc3466 100644 --- a/gemfeed/atom.xml +++ b/gemfeed/atom.xml @@ -1,12 +1,256 @@ <?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://www.w3.org/2005/Atom"> - <updated>2025-10-02T11:30:14+03:00</updated> + <updated>2025-10-11T15:25:15+03:00</updated> <title>foo.zone feed</title> <subtitle>To be in the .zone!</subtitle> <link href="https://foo.zone/gemfeed/atom.xml" rel="self" /> <link href="https://foo.zone/" /> <id>https://foo.zone/</id> <entry> + <title>Key Takeaways from The Well-Grounded Rubyist</title> + <link href="https://foo.zone/gemfeed/2025-10-11-the-well-grounded-rubyist-notes.html" /> + <id>https://foo.zone/gemfeed/2025-10-11-the-well-grounded-rubyist-notes.html</id> + <updated>2025-10-11T15:25:14+03:00</updated> + <author> + <name>Paul Buetow aka snonux</name> + <email>paul@dev.buetow.org</email> + </author> + <summary>Some time ago, I wrote about my journey into Ruby and how 'The Well-Grounded Rubyist' helped me to get a better understanding of the language. I took a lot of notes while reading the book, and I think it's time to share some of them. This is not a comprehensive review, but rather a collection of interesting tidbits and concepts that stuck with me.</summary> + <content type="xhtml"> + <div xmlns="http://www.w3.org/1999/xhtml"> + <h1 style='display: inline' id='key-takeaways-from-the-well-grounded-rubyist'>Key Takeaways from The Well-Grounded Rubyist</h1><br /> +<br /> +<span>Some time ago, I wrote about my journey into Ruby and how "The Well-Grounded Rubyist" helped me to get a better understanding of the language. I took a lot of notes while reading the book, and I think it's time to share some of them. This is not a comprehensive review, but rather a collection of interesting tidbits and concepts that stuck with me.</span><br /> +<br /> +<a class='textlink' href='./2021-07-04-the-well-grounded-rubyist.html'>My first post about the book.</a><br /> +<br /> +<h2 style='display: inline' id='the-object-model'>The Object Model</h2><br /> +<br /> +<span>One of the most fascinating aspects of Ruby is its object model. The book does a great job of explaining the details.</span><br /> +<br /> +<h3 style='display: inline' id='everything-is-an-object-almost'>Everything is an object (almost)</h3><br /> +<br /> +<span>In Ruby, most things are objects. This includes numbers, strings, and even classes themselves. This has some interesting consequences. For example, you can't use <span class='inlinecode'>i++</span> like in C or Java. Integers are immutable objects. <span class='inlinecode'>1</span> is always the same object. <span class='inlinecode'>1 + 1</span> returns a new object, <span class='inlinecode'>2</span>.</span><br /> +<br /> +<h3 style='display: inline' id='the-self-keyword'>The <span class='inlinecode'>self</span> keyword</h3><br /> +<br /> +<span>There is always a current object, <span class='inlinecode'>self</span>. If you call a method without an explicit receiver, it's called on <span class='inlinecode'>self</span>. For example, <span class='inlinecode'>puts "hello"</span> is actually <span class='inlinecode'>self.puts "hello"</span>.</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"># At the top level, self is the main object</font></i> +p <b><u><font color="#000000">self</font></u></b> +<i><font color="silver"># => main</font></i> +p <b><u><font color="#000000">self</font></u></b>.<b><u><font color="#000000">class</font></u></b> +<i><font color="silver"># => Object</font></i> + +<b><u><font color="#000000">def</font></u></b> foo + <i><font color="silver"># Inside a method, self is the object that received the call</font></i> + p <b><u><font color="#000000">self</font></u></b> +<b><u><font color="#000000">end</font></u></b> + +foo +<i><font color="silver"># => main</font></i> +</pre> +<br /> +<span>This code demonstrates how <span class='inlinecode'>self</span> changes depending on the context. At the top level, it's <span class='inlinecode'>main</span>, an instance of <span class='inlinecode'>Object</span>. When <span class='inlinecode'>foo</span> is called without a receiver, it's called on <span class='inlinecode'>main</span>.</span><br /> +<br /> +<h3 style='display: inline' id='singleton-methods'>Singleton Methods</h3><br /> +<br /> +<span>You can add methods to individual objects. These are called singleton methods.</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>obj = <font color="#808080">"a string"</font> + +<b><u><font color="#000000">def</font></u></b> obj.shout + <b><u><font color="#000000">self</font></u></b>.upcase + <font color="#808080">"!"</font> +<b><u><font color="#000000">end</font></u></b> + +p obj.shout +<i><font color="silver"># => "A STRING!"</font></i> + +obj2 = <font color="#808080">"another string"</font> +<i><font color="silver"># obj2.shout would raise a NoMethodError</font></i> +</pre> +<br /> +<span>Here, the <span class='inlinecode'>shout</span> method is only available on the <span class='inlinecode'>obj</span> object. This is a powerful feature for adding behavior to specific instances.</span><br /> +<br /> +<h3 style='display: inline' id='classes-are-objects'>Classes are Objects</h3><br /> +<br /> +<span>Classes themselves are objects, instances of the <span class='inlinecode'>Class</span> class. This means you can create classes dynamically.</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>MyClass = Class.new <b><u><font color="#000000">do</font></u></b> + <b><u><font color="#000000">def</font></u></b> say_hello + puts <font color="#808080">"Hello from a dynamically created class!"</font> + <b><u><font color="#000000">end</font></u></b> +<b><u><font color="#000000">end</font></u></b> + +instance = MyClass.new +instance.say_hello +<i><font color="silver"># => Hello from a dynamically created class!</font></i> +</pre> +<br /> +<span>This shows how to create a new class and assign it to a constant. This is what happens behind the scenes when you use the <span class='inlinecode'>class</span> keyword.</span><br /> +<br /> +<h2 style='display: inline' id='control-flow-and-methods'>Control Flow and Methods</h2><br /> +<br /> +<span>The book clarified many things about how methods and control flow work in Ruby.</span><br /> +<br /> +<h3 style='display: inline' id='case-and-the--operator'><span class='inlinecode'>case</span> and the <span class='inlinecode'>===</span> operator</h3><br /> +<br /> +<span>The <span class='inlinecode'>case</span> statement is more powerful than I thought. It uses the <span class='inlinecode'>===</span> (threequals or case equality) operator for comparison, not <span class='inlinecode'>==</span>. Different classes can implement <span class='inlinecode'>===</span> in their own way.</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"># For ranges, it checks for inclusion</font></i> +p (<font color="#000000">1</font>..<font color="#000000">5</font>) === <font color="#000000">3</font> <i><font color="silver"># => true</font></i> + +<i><font color="silver"># For classes, it checks if the object is an instance of the class</font></i> +p String === <font color="#808080">"hello"</font> <i><font color="silver"># => true</font></i> + +<i><font color="silver"># For regexes, it checks for a match</font></i> +p /llo/ === <font color="#808080">"hello"</font> <i><font color="silver"># => true</font></i> + +<b><u><font color="#000000">def</font></u></b> check(value) + <b><u><font color="#000000">case</font></u></b> value + <b><u><font color="#000000">when</font></u></b> String + <font color="#808080">"It's a string"</font> + <b><u><font color="#000000">when</font></u></b> (<font color="#000000">1</font>..<font color="#000000">10</font>) + <font color="#808080">"It's a number between 1 and 10"</font> + <b><u><font color="#000000">else</font></u></b> + <font color="#808080">"Something else"</font> + <b><u><font color="#000000">end</font></u></b> +<b><u><font color="#000000">end</font></u></b> + +p check(<font color="#000000">5</font>) <i><font color="silver"># => "It's a number between 1 and 10"</font></i> +</pre> +<br /> +<h3 style='display: inline' id='blocks-and-yield'>Blocks and <span class='inlinecode'>yield</span></h3><br /> +<br /> +<span>Blocks are a cornerstone of Ruby. You can pass them to methods to customize their behavior. The <span class='inlinecode'>yield</span> keyword is used to call the block.</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">def</font></u></b> my_iterator + puts <font color="#808080">"Entering the method"</font> + <b><u><font color="#000000">yield</font></u></b> + puts <font color="#808080">"Back in the method"</font> + <b><u><font color="#000000">yield</font></u></b> +<b><u><font color="#000000">end</font></u></b> + +my_iterator { puts <font color="#808080">"Inside the block"</font> } +<i><font color="silver"># Entering the method</font></i> +<i><font color="silver"># Inside the block</font></i> +<i><font color="silver"># Back in the method</font></i> +<i><font color="silver"># Inside the block</font></i> +</pre> +<br /> +<span>This simple iterator shows how <span class='inlinecode'>yield</span> transfers control to the block. You can also pass arguments to <span class='inlinecode'>yield</span> and get a return value from the block.</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">def</font></u></b> with_return + result = <b><u><font color="#000000">yield</font></u></b>(<font color="#000000">5</font>) + puts <font color="#808080">"The block returned #{result}"</font> +<b><u><font color="#000000">end</font></u></b> + +with_return { |n| n * <font color="#000000">2</font> } +<i><font color="silver"># => The block returned 10</font></i> +</pre> +<br /> +<span>This demonstrates passing an argument to the block and using its return value.</span><br /> +<br /> +<h2 style='display: inline' id='fun-with-data-types'>Fun with Data Types</h2><br /> +<br /> +<span>Ruby's core data types are full of nice little features.</span><br /> +<br /> +<h3 style='display: inline' id='symbols'>Symbols</h3><br /> +<br /> +<span>Symbols are like immutable strings. They are great for keys in hashes because they are unique and memory-efficient.</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"># Two strings with the same content are different objects</font></i> +p <font color="#808080">"foo"</font>.object_id +p <font color="#808080">"foo"</font>.object_id + +<i><font color="silver"># Two symbols with the same content are the same object</font></i> +p :foo.object_id +p :foo.object_id + +<i><font color="silver"># Modern hash syntax uses symbols as keys</font></i> +my_hash = { name: <font color="#808080">"Paul"</font>, language: <font color="#808080">"Ruby"</font> } +p my_hash[:name] <i><font color="silver"># => "Paul"</font></i> +</pre> +<br /> +<span>This code highlights the difference between strings and symbols and shows the convenient hash syntax.</span><br /> +<br /> +<h3 style='display: inline' id='arrays-and-hashes'>Arrays and Hashes</h3><br /> +<br /> +<span>Arrays and hashes have a rich API. The <span class='inlinecode'>%w</span> and <span class='inlinecode'>%i</span> shortcuts for creating arrays of strings and symbols are very handy.</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"># Array of strings</font></i> +p %w[one two three] +<i><font color="silver"># => ["one", "two", "three"]</font></i> + +<i><font color="silver"># Array of symbols</font></i> +p %i[one two three] +<i><font color="silver"># => [:one, :two, :three]</font></i> +</pre> +<br /> +<span>A quick way to create arrays. You can also retrieve multiple values at once.</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>] +p arr.values_at(<font color="#000000">0</font>, <font color="#000000">2</font>, <font color="#000000">4</font>) +<i><font color="silver"># => [10, 30, 50]</font></i> + +hash = { a: <font color="#000000">1</font>, b: <font color="#000000">2</font>, c: <font color="#000000">3</font> } +p hash.values_at(:a, :c) +<i><font color="silver"># => [1, 3]</font></i> +</pre> +<br /> +<span>The <span class='inlinecode'>values_at</span> method is a concise way to get multiple elements.</span><br /> +<br /> +<h2 style='display: inline' id='final-thoughts'>Final Thoughts</h2><br /> +<br /> +<span>These are just a few of the many things I learned from "The Well-Grounded Rubyist". The book gave me a much deeper appreciation for the language and its design. If you are a Ruby programmer, I highly recommend it. Meanwhile, I also read the book "Programming Ruby 3.3", just I didn't have time to process my notes there yet. </span><br /> +<br /> +<span>E-Mail your comments to <span class='inlinecode'>paul@nospam.buetow.org</span> :-)</span><br /> +<br /> +<span>Other Ruby-related posts:</span><br /> +<br /> +<a class='textlink' href='./2021-07-04-the-well-grounded-rubyist.html'>2021-07-04 The Well-Grounded Rubyist</a><br /> +<br /> +<a class='textlink' href='../'>Back to the main site</a><br /> + </div> + </content> + </entry> + <entry> <title>f3s: Kubernetes with FreeBSD - Part 7: k3s and first pod deployments</title> <link href="https://foo.zone/gemfeed/2025-10-02-f3s-kubernetes-with-freebsd-part-7.html" /> <id>https://foo.zone/gemfeed/2025-10-02-f3s-kubernetes-with-freebsd-part-7.html</id> @@ -14031,145 +14275,4 @@ DC on fire: </div> </content> </entry> - <entry> - <title>Gemtexter 2.1.0 - Let's Gemtext again³</title> - <link href="https://foo.zone/gemfeed/2023-07-21-gemtexter-2.1.0-lets-gemtext-again-3.html" /> - <id>https://foo.zone/gemfeed/2023-07-21-gemtexter-2.1.0-lets-gemtext-again-3.html</id> - <updated>2023-07-21T10:19:31+03: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 `2.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-210---let-s-gemtext-again'>Gemtexter 2.1.0 - Let's Gemtext again³</h1><br /> -<br /> -<span class='quote'>Published at 2023-07-21T10:19:31+03:00</span><br /> -<br /> -<span>I proudly announce that I've released Gemtexter version <span class='inlinecode'>2.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 /> -<pre> --=[ typewriters ]=- 1/98 - .-------. - .-------. _|~~ ~~ |_ - _|~~ ~~ |_ .-------. =(_|_______|_) - =(_|_______|_)= _|~~ ~~ |_ |:::::::::| - |:::::::::| =(_|_______|_) |:::::::[]| - |:::::::[]| |:::::::::| |o=======.| - |o=======.| |:::::::[]| `"""""""""` - jgs `"""""""""` |o=======.| - mod. by Paul Buetow `"""""""""` -</pre> -<br /> -<h2 style='display: inline' id='table-of-contents'>Table of Contents</h2><br /> -<br /> -<ul> -<li><a href='#gemtexter-210---let-s-gemtext-again'>Gemtexter 2.1.0 - Let's Gemtext again³</a></li> -<li>⇢ <a href='#why-bash'>Why Bash?</a></li> -<li>⇢ <a href='#switch-to-gpl3-license'>Switch to GPL3 license</a></li> -<li>⇢ <a href='#source-code-highlighting-support'>Source code highlighting support</a></li> -<li>⇢ <a href='#html-exact-variant'>HTML exact variant</a></li> -<li>⇢ <a href='#use-of-hack-webfont-by-default'>Use of Hack webfont by default</a></li> -<li>⇢ <a href='#html-mastodon-verification-support'>HTML Mastodon verification support</a></li> -<li>⇢ <a href='#more'>More</a></li> -</ul><br /> -<h2 style='display: inline' id='why-bash'>Why Bash?</h2><br /> -<br /> -<span>This project is too complex for a Bash script. Writing it in Bash was to try out how maintainable a "larger" Bash script could be. It's still pretty maintainable and helps me try new Bash tricks here and then!</span><br /> -<br /> -<span>Let's list what's new!</span><br /> -<br /> -<h2 style='display: inline' id='switch-to-gpl3-license'>Switch to GPL3 license</h2><br /> -<br /> -<span>Many (almost all) of the tools and commands (GNU Bash, GMU Sed, GNU Date, GNU Grep, GNU Source Highlight) used by <span class='inlinecode'>Gemtexter</span> are licensed under the GPL anyway. So why not use the same? This was an easy switch, as I was the only code contributor so far!</span><br /> -<br /> -<h2 style='display: inline' id='source-code-highlighting-support'>Source code highlighting support</h2><br /> -<br /> -<span>The HTML output now supports source code highlighting, which is pretty neat if your site is about programming. The requirement is to have the <span class='inlinecode'>source-highlight</span> command, which is GNU Source Highlight, to be installed. Once done, you can annotate a bare block with the language to be highlighted. E.g.:</span><br /> -<br /> -<pre> - ```bash - if [ -n "$foo" ]; then - echo "$foo" - fi - ``` -</pre> -<br /> -<span>The result will look like this (you can see the code highlighting only in the Web version, not in the Geminispace version of this site):</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">if</font></u></b> [ -n <font color="#808080">"$foo"</font> ]; <b><u><font color="#000000">then</font></u></b> - echo <font color="#808080">"$foo"</font> -<b><u><font color="#000000">fi</font></u></b> -</pre> -<br /> -<span>Please run <span class='inlinecode'>source-highlight --lang-list</span> for a list of all supported languages.</span><br /> -<br /> -<h2 style='display: inline' id='html-exact-variant'>HTML exact variant</h2><br /> -<br /> -<span>Gemtexter is there to convert your Gemini Capsule into other formats, such as HTML and Markdown. An HTML exact variant can now be enabled in the <span class='inlinecode'>gemtexter.conf</span> by adding the line <span class='inlinecode'>declare -rx HTML_VARIANT=exact</span>. The HTML/CSS output changed to reflect a more exact Gemtext appearance and to respect the same spacing as you would see in the Geminispace. </span><br /> -<br /> -<h2 style='display: inline' id='use-of-hack-webfont-by-default'>Use of Hack webfont by default</h2><br /> -<br /> -<span>The Hack web font is a typeface designed explicitly for source code. It's a derivative of the Bitstream Vera and DejaVu Mono lineage, but it features many improvements and refinements that make it better suited to reading and writing code.</span><br /> -<br /> -<span>The font has distinctive glyphs for every character, which helps to reduce confusion between similar-looking characters. For example, the characters "0" (zero), "O" (capital o), and "o" (lowercase o), or "1" (one), "l" (lowercase L), and "I" (capital i) all have distinct looks in Hack, making it easier to read and understand code at a glance.</span><br /> -<br /> -<span>Hack is open-source and freely available for use and modification under the MIT License.</span><br /> -<br /> -<h2 style='display: inline' id='html-mastodon-verification-support'>HTML Mastodon verification support</h2><br /> -<br /> -<span>The following link explains how URL verification works in Mastodon:</span><br /> -<br /> -<a class='textlink' href='https://joinmastodon.org/verification'>https://joinmastodon.org/verification</a><br /> -<br /> -<span>So we have to hyperlink to the Mastodon profile to be verified and also to include a <span class='inlinecode'>rel='me'</span> into the tag. In order to do that add this to the <span class='inlinecode'>gemtexter.conf</span> (replace the URI to your Mastodon profile accordingly):</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">declare</font></u></b> -xr MASTODON_URI=<font color="#808080">'https://fosstodon.org/@snonux'</font> -</pre> -<br /> -<span>and add the following into your <span class='inlinecode'>index.gmi</span>:</span><br /> -<br /> -<pre> -=> https://fosstodon.org/@snonux Me at Mastodon -</pre> -<br /> -<span>The resulting line in the HTML output will be something as follows:</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"><a</font></u></b> <b><font color="#000000">href</font></b>=<font color="#808080">'https://fosstodon.org/@snonux'</font> <b><font color="#000000">rel</font></b>=<font color="#808080">'me'</font><b><u><font color="#000000">></font></u></b>Me at Mastodon<b><u><font color="#000000"></a></font></u></b> -</pre> -<br /> -<h2 style='display: inline' id='more'>More</h2><br /> -<br /> -<span>Additionally, there were a couple of bug fixes, refactorings and overall improvements in the documentation made. </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³ (You are currently reading this)</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</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.html b/gemfeed/index.html index bd0c2c77..3ed3dd03 100644 --- a/gemfeed/index.html +++ b/gemfeed/index.html @@ -15,6 +15,7 @@ <br /> <h2 style='display: inline' id='to-be-in-the-zone'>To be in the .zone!</h2><br /> <br /> +<a class='textlink' href='./2025-10-11-the-well-grounded-rubyist-notes.html'>2025-10-11 - Key Takeaways from The Well-Grounded Rubyist</a><br /> <a class='textlink' href='./2025-10-02-f3s-kubernetes-with-freebsd-part-7.html'>2025-10-02 - f3s: Kubernetes with FreeBSD - Part 7: k3s and first pod deployments</a><br /> <a class='textlink' href='./2025-09-14-bash-golf-part-4.html'>2025-09-14 - Bash Golf Part 4</a><br /> <a class='textlink' href='./2025-08-15-random-weird-things-iii.html'>2025-08-15 - Random Weird Things - Part Ⅲ</a><br /> @@ -13,7 +13,7 @@ </p> <h1 style='display: inline' id='hello'>Hello!</h1><br /> <br /> -<span class='quote'>This site was generated at 2025-10-11T13:34:49+03:00 by <span class='inlinecode'>Gemtexter</span></span><br /> +<span class='quote'>This site was generated at 2025-10-11T15:25:15+03:00 by <span class='inlinecode'>Gemtexter</span></span><br /> <br /> <span>Welcome to the foo.zone!</span><br /> <br /> @@ -51,6 +51,7 @@ <br /> <h3 style='display: inline' id='posts'>Posts</h3><br /> <br /> +<a class='textlink' href='./gemfeed/2025-10-11-the-well-grounded-rubyist-notes.html'>2025-10-11 - Key Takeaways from The Well-Grounded Rubyist</a><br /> <a class='textlink' href='./gemfeed/2025-10-02-f3s-kubernetes-with-freebsd-part-7.html'>2025-10-02 - f3s: Kubernetes with FreeBSD - Part 7: k3s and first pod deployments</a><br /> <a class='textlink' href='./gemfeed/2025-09-14-bash-golf-part-4.html'>2025-09-14 - Bash Golf Part 4</a><br /> <a class='textlink' href='./gemfeed/2025-08-15-random-weird-things-iii.html'>2025-08-15 - Random Weird Things - Part Ⅲ</a><br /> diff --git a/uptime-stats.html b/uptime-stats.html index 0b574728..975b974b 100644 --- a/uptime-stats.html +++ b/uptime-stats.html @@ -13,7 +13,7 @@ </p> <h1 style='display: inline' id='my-machine-uptime-stats'>My machine uptime stats</h1><br /> <br /> -<span class='quote'>This site was last updated at 2025-10-11T13:34:49+03:00</span><br /> +<span class='quote'>This site was last updated at 2025-10-11T15:25:15+03:00</span><br /> <br /> <span>The following stats were collected via <span class='inlinecode'>uptimed</span> on all of my personal computers over many years and the output was generated by <span class='inlinecode'>guprecords</span>, the global uptime records stats analyser of mine.</span><br /> <br /> |
