Skip to content

Commit c033d57

Browse files
transclaude
andcommitted
End blog posts with a byline and shorten their update notes :doc:
Each post now ends with its author and publication date. The update notes on the imported posts are cut down to what has changed in Ruby or Facets since each was written; they no longer list the corrections made to the posts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent e6a4e50 commit c033d57

31 files changed

Lines changed: 34 additions & 166 deletions

‎docs/_layouts/post.html‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,8 @@
99
{%- if page.subtitle %}<p>{{ page.subtitle }}</p>{% endif %}
1010
{%- endif %}
1111
</div></section>
12-
<article class="archive-article shell">{{ content }}</article>
12+
<article class="archive-article shell">
13+
{{ content }}
14+
<footer class="post-byline">{{ page.author | default: site.author }} · Published <time datetime="{{ page.date | date_to_xmlschema }}">{{ page.date | date: "%B %-d, %Y" }}</time></footer>
15+
</article>
1316
<div class="archive-back shell"><a class="text-link" href="{{ '/blog/' | relative_url }}">← All posts</a></div>

‎docs/_posts/2006-07-22-from-singleton-to-legion.md‎

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,7 @@ title: From Singleton to Legion
33
date: 2006-07-22
44
---
55

6-
> **Update, November 2026:** Ruby 1.9.2 added `Kernel#singleton_class`,
7-
> which made "singleton class" the official name. Ruby still keeps a single
8-
> singleton class per object, so on an unpatched Ruby the second `def o.x`
9-
> below replaces the first, and its `super` raises `NoMethodError`. But
10-
> Ruby 2.0 added `Module#prepend`, and prepending a module to the singleton
11-
> class gives much the same layering: after
12-
> `o.singleton_class.prepend(Module.new { def x; super + "x"; end })`,
13-
> `o.x` returns `"xx"`. Facets carried both `eigenclass` and `qua_class` as
14-
> `Kernel` methods. Facets 3.2 deprecated them in favor of `singleton_class`
15-
> or Facets' `meta_class`, and they will be removed after 2027-09-30.
6+
> **Update, November 2026:** Ruby 1.9.2 settled the naming question with `singleton_class`, and Facets has since deprecated its `eigenclass` and `qua_class` in its favor. An object still gets only one singleton class, but Ruby 2.0's `prepend` gives much the same layering: prepend a module to the singleton class and call `super` from there.
167
178
<!-- ---
189
title: From Singleton to Legion

‎docs/_posts/2006-08-17-main-is-a-dry-pain.md‎

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,7 @@ title: Main is a DRY Pain
33
date: 2006-08-17
44
---
55

6-
> **Update, November 2026:** Ruby 2.0 gave `main` a `define_method` of its
7-
> own, which defines a method on `Object`, so the first error below no
8-
> longer happens, though `main` still has no `ancestors`. Ruby 2.0 also
9-
> made `main`'s `include`, `public` and `private` private methods, so on
10-
> Ruby 3.4 the `public_methods` comparison below returns `[]`, and
11-
> `singleton_methods` returns only `[:to_s, :inspect]`. Ruby 3.0 fixed the
12-
> Module Inclusion Problem ([#9573](https://bugs.ruby-lang.org/issues/9573)):
13-
> a module included into `Kernel` now reaches every object, so in the last
14-
> example both `m` and `Q.new.q` return `"m"`. Methods defined in `main`'s
15-
> singleton class are still not visible anywhere else, as the `class << self`
16-
> example shows. I've corrected the method name in that example's error
17-
> message, which said `s`. I took up the question of `main` as a
18-
> self-extended module again in
19-
> [Kill the Proxy and Save Toplevel]({{ site.baseurl }}{% post_url 2012-06-17-kill-the-proxy-and-save-toplevel %}).
6+
> **Update, November 2026:** Things are better now. Ruby 2.0 gave `main` its own `define_method`, and Ruby 3.0 fixed the module inclusion problem ([#9573](https://bugs.ruby-lang.org/issues/9573)), so a module included into `Kernel` now reaches every object. But `main` still isn't a module. I came back to that idea in [Kill the Proxy and Save Toplevel]({{ site.baseurl }}{% post_url 2012-06-17-kill-the-proxy-and-save-toplevel %}).
207
218
<!-- ---
229
title: Main is a DRY Pain

‎docs/_posts/2006-08-18-vote-kernel-for-toplevel-object.md‎

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,7 @@ title: Vote Kernel for Toplevel Object
33
date: 2006-08-18
44
---
55

6-
> **Update, November 2026:** Ruby 2.0 added the kind of top-level method
7-
> matz mentions below: `main` now has its own private `define_method`,
8-
> which defines methods on `Object`. Because `main` finds its own
9-
> `define_method` first, the example below never calls the hand-written one.
10-
> It still prints `true` and `false`, though, because `main` is still not
11-
> `Object`. Taskable didn't last in
12-
> Facets: by version 1.8 (January 2007), taskable.rb had been dropped
13-
> because its "implementation won't work as toplevel include". For a while
14-
> Facets also had main_as_module.rb (later main.rb), which made `main` act
15-
> more like a module; Facets 2.9.3 spun it off as the main_like_module gem.
16-
> Ruby's top level is still not a module. I took up the idea again in
17-
> [Kill the Proxy and Save Toplevel]({{ site.baseurl }}{% post_url 2012-06-17-kill-the-proxy-and-save-toplevel %}).
6+
> **Update, November 2026:** Ruby 2.0 did add a top-level `define_method`, much as matz suggests below. But `main` is still a stand-in for `Object`, not `Object` itself, so the example still prints `true` and `false`. I came back to the idea in [Kill the Proxy and Save Toplevel]({{ site.baseurl }}{% post_url 2012-06-17-kill-the-proxy-and-save-toplevel %}).
187
198
As a follow up to my last post on the "pain that is main", I want to offer a potential improvement for Ruby 2.0. I approached the topic on ruby-talk this week and while Matz initially took some interest, he hasn't followed up since his last comment:
209

‎docs/_posts/2006-08-21-main-campaign-out-of-object-now.md‎

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,7 @@ title: 'Main Campaign: Out of Object Now!'
33
date: 2006-08-21
44
---
55

6-
> **Update, November 2026:** The top level still works as matz describes,
7-
> and `Object` still defines no methods of its own: run as a script on
8-
> Ruby 3.4, the first example below still returns `[]`. The `Foo.check`
9-
> example needs a qualification. A top-level method is a private method of
10-
> `Object`, so a call with an explicit receiver, like `Foo.check("foo")`,
11-
> goes to `Foo.method_missing`, and the lazy load works. The top-level
12-
> `check` only gets in the way when it is called without a receiver from
13-
> inside `Foo`, or through `send`, or in irb before Ruby 2.0, where
14-
> top-level methods were public
15-
> ([Bug #5776](https://bugs.ruby-lang.org/issues/5776)). irb now makes them
16-
> private, as a script does. I took up the idea of Main again in
17-
> [Kill the Proxy and Save Toplevel]({{ site.baseurl }}{% post_url 2012-06-17-kill-the-proxy-and-save-toplevel %}).
6+
> **Update, November 2026:** Top-level methods are private, so in a script an explicit call like `Foo.check("foo")` still reaches `method_missing`. Where the clash bites is irb, which made top-level methods public until Ruby 2.0. I came back to the idea of Main in [Kill the Proxy and Save Toplevel]({{ site.baseurl }}{% post_url 2012-06-17-kill-the-proxy-and-save-toplevel %}).
187
198
The word from Matz on Kernel as toplevel object:
209

‎docs/_posts/2006-08-26-the-persnickety-order-of-self-serving-modules.md‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,7 @@ title: The Persnickety Order of Self-Serving Modules
33
date: 2006-08-26
44
---
55

6-
> **Update, November 2026:** Ruby 3.0 fixed this
7-
> ([#9573](https://bugs.ruby-lang.org/issues/9573)). Including a module now
8-
> also reaches the classes and modules that already included the receiver,
9-
> and that covers `Q`'s singleton class, which got `Q` through `extend self`.
10-
> So on Ruby 3.0 and later, `Q.x` returns `"x"` whichever order the two
11-
> lines come in. I've fixed the irb prompts in the transcripts below, which
12-
> read `orb`.
6+
> **Update, November 2026:** Ruby 3.0 finally fixed this ([#9573](https://bugs.ruby-lang.org/issues/9573)). `Q.x` now works whichever order the two lines come in.
137
148
This one caught me off guard.
159

‎docs/_posts/2006-09-21-i-no-longer-believe-in-methods.md‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,7 @@ title: I No Longer Believe in Methods
33
date: 2006-09-21
44
---
55

6-
> **Update, November 2026:** Methods are still not persistent objects in
7-
> Ruby: `method` and `instance_method` still return a new object every time
8-
> they are called. Since Ruby 2.1, `def` returns the method's name as a
9-
> Symbol, so calls like `help` and `valid` below can wrap a definition
10-
> directly, the way `private def announce` does, but they still work by
11-
> name. Annotations left Facets in 2.5.0 (2008) for the separate Anise gem,
12-
> so `require 'facet/annotation'` no longer works with current Facets. I
13-
> have also fixed a few typos in the code samples.
6+
> **Update, November 2026:** Still true: `method` and `instance_method` hand back a new object every time. Since Ruby 2.1, `def` returns the method's name, which allows decorator-style calls like `private def announce`, but that's still just passing a name around. Annotations moved out of Facets into the Anise gem in 2008.
147
158
Yes, that's right. I no longer believe in methods. Why? Because this is OOP and if the methods aren't honest to goodness objects from the start, without exception, then they are not really methods. They're just glorified functions.
169

‎docs/_posts/2006-11-10-separation-of-church-and-state.md‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ title: Separation of Church and State
33
date: 2006-11-10
44
---
55

6-
> **Update, November 2026:** Nothing relevant has changed since this was
7-
> written: Ruby never adopted `obj.@ivar` or `def @ivar`, and both are still
8-
> syntax errors.
6+
> **Update, November 2026:** Ruby never adopted `obj.@ivar` or `def @ivar`.
97
108
Have you ever had a class so choke full of interrelated data and function members that you had trouble avoiding name clashes between the two. Of course it's a rare problem when you're in full control of the members, but when you're designing extensible classes, it becomes a major issue and you have to resort to some less-than-lovely work around.
119

‎docs/_posts/2006-11-11-we-all-live-in-a-yellow-submarine.md‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,7 @@ title: We All Live in a Yellow Submarine
33
date: 2006-11-11
44
---
55

6-
> **Update, November 2026:** Ruby hasn't changed on this: a class still
7-
> can't be included, a module still can't be instantiated, and the
8-
> `Module#new` trick at the end still works in Ruby 3.4. Facets added that
9-
> trick as `module/new` in 1.8 (2007); today it is the `Instantiable` mixin
10-
> (`require 'facets/instantiable'`), which gives any module that includes it
11-
> a `new` method.
6+
> **Update, November 2026:** Nothing has changed here: classes still can't be included, and modules still can't be instantiated. The `Module#new` trick at the end still works, and Facets offers it today as the `Instantiable` mixin.
127
138
Anyone having read my previous posts, here and on ruby-talk, knows I love to explore ideas. It doesn't matter if they are considered "good" or "bad". Most cannot be judged without first expounding on them anyway. In fact, half the time I have no idea where an idea might lead until I sit down and blog it.
149

‎docs/_posts/2006-12-03-negative-arrays.md‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,7 @@ title: Negative Arrays
33
date: 2006-12-03
44
---
55

6-
> **Update, November 2026:** Ruby 2.3 gave String its own unary minus,
7-
> `String#-@`, which returns a frozen copy of the string (deduplicated since
8-
> Ruby 2.5). So `-'InstalledFiles'` now means something else, and an
9-
> `Object#-@` like the one proposed here never sees strings. Facets did take
10-
> up the `'-InstalledFiles'` form for a while: `Dir.multiglob` accepted `+`
11-
> and `-` prefixes in 2007, but Facets 2.1.2 dropped them, and today it just
12-
> takes a list of patterns. I have also corrected the code samples: the
13-
> unary minus method is `-@`, not `@-`.
6+
> **Update, November 2026:** Ruby 2.3 gave strings their own unary minus, which returns a frozen copy, so `-'InstalledFiles'` can't be used this way anymore. Facets' `Dir.multiglob` did support `+` and `-` prefixes for a while, but they were dropped in Facets 2.1.
147
158
My current work involves the creation of an extensive configuration file format representing project information. In a number of cases I have had need of an inclusion list, representing files and file patterns to include for some operation --say, what files to include in a package. In such a case I generally end up with at least two parameters which I basically label include and exclude. While include is the list of files to use, exclude is a list of files to exclude from the included list. Using exclude makes it easier to specify a large selection and then subsequently omit a file or two. The include list typically has a suitable default value, so a third parameter is sometimes also of use, append, which concats to the defaults as opposed to replacing the include parameter outright.
169

0 commit comments

Comments
 (0)