Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added a license

Headers and footers
A discussion about RSS Feeds
  • Loading branch information...
commit 993e5a084cfad7a4b4a9d48bfff420e9e5309e86 1 parent aaedc67
Reg Braithwaite authored
View
9 2008-10-27/unfold.markdown
@@ -1,3 +1,6 @@
+unfold
+---
+
Here's a little something from my old blog that I found myself using again. If you want the background, you might like my old posts [Really simple anamorphisms in Ruby](http://weblog.raganwald.com/2007/11/really-simple-anamorphisms-in-ruby.html) and [Really useful anamorphisms in Ruby](http://weblog.raganwald.com/2007/11/really-useful-anamorphisms-in-ruby.html).
This week-end, I found myself thinking about `#unfold` in a new way: it's a way of turning an iteration into a collection. So anywhere you might use `for` or `while` or `until`, you can use `#unfold` to create an ordered collection instead. This allows you to use all of your existing collection methods like `#select`, `#reject`, `#map`, and of course `#inject` instead of writing out literal code to accomplish the same thing.
@@ -16,4 +19,8 @@ The little idea here is that you don't have to write a loop of some sort climbin
**Git it**
-The code for unfold is at [unfold.rb](unfold.rb). To use it in a Rails project, drop unfold.rb in config/initializers.
+The code for unfold is at [unfold.rb](unfold.rb). To use it in a Rails project, drop unfold.rb in config/initializers.
+
+---
+
+[homoiconic](http://github.com/raganwald/homoiconic/tree/master "Homoiconic on GitHub")
View
9 2008-10-28/and_and_or.markdown
@@ -1,3 +1,6 @@
+and and or
+===
+
In a comment on [Ruby Stylista](http://www.pathf.com/blogs/2008/10/ruby-stylista/), I mentioned how I use the `and` and `or` keywords in Ruby. To refresh, `and` and `or` work just like `&&` and `||`, only with very low precedence. For example:
foo = 5 && 10; foo
@@ -30,4 +33,8 @@ Again putting the first thing first. I normally only do this if both clauses are
foo = fubar() if something.blank?
raise 'fubar' unless something?
-The predicate seems less important than the consequent, which suggests that it should come second even though the test is performed first.
+The predicate seems less important than the consequent, which suggests that it should come second even though the test is performed first.
+
+---
+
+[homoiconic](http://github.com/raganwald/homoiconic/tree/master "Homoiconic on GitHub")
View
29 homoiconic.markdown
@@ -1,9 +1,14 @@
-Well, I said I was [retiring from blogging](http://weblog.raganwald.com/2008/07/brief-history-of-dangerous-ideas.html"A Brief History of Dangerous Ideas") and here I am with what looks like a new blog. What's going on?
+Homoiconic
+---
-**Homoiconic**
+Well, I said I was [retiring from blogging](http://weblog.raganwald.com/2008/07/brief-history-of-dangerous-ideas.html"A Brief History of Dangerous Ideas") and here I am with what looks like a new blog. What's going on?
This *is* a kind of blog, if you define blog as 'something published on the internet with an RSS feed.' But no, this is not a blog in the sense that [weblog.raganwald.com](http://weblog.raganwald.com) was a blog. [Homoiconic](http://github.com/raganwald/homoiconic/tree/master) is an experiment in publishing code and words about code on a small scale.
+This is really simple: snippets of code and words about the code. No words by themselves. And the words exist to amplify and explain the code, rather than the code existing to illustrate the words. This is the opposite of most of the posts you find on traditional (circa 2004) blogs.
+
+**Refreshingly advocacy-free**
+
My writing used to be heavily philosophical, with lots of advocacy and questioning. I still consider the _why_ of things much more meaningful than the how, but it's time to focus on the how rather than the why. I'm making this little writing place a "no trolling zone." I will try to avoid preaching, and the obvious corollary is that I will also avoid worrying about whether people agree or disagree. Instead, I will try to simply share little pieces of code as it comes to me.
There is no advocacy on here. I frequent a few scuba diving forums. One annoying part of scuba culture is that it can be very polarizing. A bunch of people over here say there is only One True Way to dive, right down to using the exact same equipment as each other. Another bunch of people over there disregard the conventional wisdom and choose to dive solo, attracting criticism from young and old. The forums discovered a long time ago that running flame wars simply drove members away, so they have instituted "no trolling" zones within their boards, places where people can discuss the _how_ of solo diving, or sidemounting, or DIR, without getting into a battle of whether such a thing is a good idea or not.
@@ -18,12 +23,24 @@ The other reason there is no advocacy is that I am invoking the "Transit Cop Cop
I have already said a number of things about [abstractions](http://weblog.raganwald.com/2007/07/abbreviation-accidental-complexity-and.html"Abbreviation, Accidental Complexity, and Abstraction"), [functional programming](http://weblog.raganwald.com/2007/03/why-why-functional-programming-matters.html"Why Why Functional Programming Matters Matters"), [meta-programming](http://weblog.raganwald.com/2008/07/my-analyst-warned-me-but.html"My analyst warned me, but metaprogramming was so beautiful I got another analyst"), [metaprogramming again](http://weblog.raganwald.com/2008/03/spaghetti-western-coding.html"Spaghetti-Western Coding"), [brevity](http://weblog.raganwald.com/2007/12/golf-is-good-program-spoiled.html"Golf is a good program spoiled"), and [much more](http://delicious.com/raganwald/raganwald.popular"Popular posts from weblog.raganwald.com").
-But I don't want to say any more on subject like that until I can think of something *novel*. It may be awhile. In the meantime, share and enjoy.
+But I don't want to say any more on subjects like these until I can think of something *novel*. It may be awhile. In the meantime, share and enjoy.
+
+**Comment policy**
-**The RSS feed**
+At the moment, there are no comments. This is a blog about code, not words. I welcome bug reports and other code-centric feedback by email. I would be delighted to post your snippets and examples.
-Unlike my previous work, the [RSS feed](http://github.com/feeds/raganwald/commits/homoiconic/master) will not contain my words, parceled up for leisurely reading. Just as well, because I am hoping that the code will be more important than the words. You can follow [homoiconic](http://github.com/raganwald/homoiconic/tree/master) here on GitHub or receive commit messages letting you know what I've added or updated in your feed reader.
+**How to subscribe**
+
+You can follow [homoiconic](http://github.com/raganwald/homoiconic/tree/master) here on GitHub or [subscribe to commit messages](http://github.com/feeds/raganwald/commits/homoiconic/master "Recent Commits to homoiconic") letting you know what I've added or updated in your feed reader. The latter option is likely to be moderate volume, as I like to make edits and corrections as I go.
+
+I will be tagging new 'posts' in [del.icio.us](http://delicious.com/raganwald/homoiconic "raganwald's homoiconic Bookmarks on Delicious"). You can subscribe to [an RSS feed that will alert you when I manually tag a new post](http://feeds.delicious.com/v2/rss/raganwald/homoiconic "Delicious/raganwald/homoiconic feed"). If you do this, you will need to manually check posts for updates, or come back here to the [home page](http://github.com/raganwald/homoiconic/tree/master "Homoiconic on GitHub").
**Credit where credit is due**
-I originally set up a blog at homoiconic.com, but I spotted [David Baldwin's blog](http://github.com/bilson/blog/tree/master), and I knew right away that a blog that is about the how of code ought to be hosted on Github.
+I originally set up a blog at homoiconic.com, but I spotted [David Baldwin's blog](http://github.com/bilson/blog/tree/master), and I knew right away that a blog that is about the how of code ought to be hosted on Github.
+
+I am [Reg Braithwaite](http://reginald.braythwayt.com/). You can reach me by email. My first name is `reg`, and that works fine for sending email to `braythwayt.com`. I look forward to hearing from you.
+
+---
+
+[homoiconic](http://github.com/raganwald/homoiconic/tree/master "Homoiconic on GitHub")
View
23 license.txt
@@ -0,0 +1,23 @@
+The MIT License
+
+All contents Copyright (c) 2004-2008 Reg Braithwaite except as otherwise noted.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+http://www.opensource.org/licenses/mit-license.php
Please sign in to comment.
Something went wrong with that request. Please try again.