|
|
Wednesday, February 18, 2004
|
|
| |
Why's Poignant Guide. A few months back, why the lucky stiff offered up a great warranty. Now heís at it again, tis time giving us the first glimpse of what looks like a pretty unique approach to learning a computer language, in this case Ruby. Itís one of those sites thatís hard to stop reading: I hope we can convince him to produce a print version for the Pragmatic Bookshelf. [PragDave]
4:03:50 PM
|
|
|
|
Friday, February 13, 2004
|
|
| |
Martin Fowler on Domain Specific Languages. Martin Fowler on DSLs...
I've always used the analogy of creating a DSL to help think about building up a design - developing classes and methods with an eye to making them be a DSL. As much as possible I do this within the language I'm using, but if I can't I'm very ready to switch to code generation. At ThoughtWorks we've used code generation and similar techniques widely on our larger systems. The point at which I pull the separate language DSL lever is clearly different between languages. I never really felt the need in Smalltalk to use a separate language, while it's quite common in C++/Java/C#. [Lambda the Ultimate]
4:31:14 PM
|
|
Udell: Programs that write programs. Worth a look.
Jon Bentley in Bumper-Sticker Computer Science quotes Dick Sites as saying I'd rather write programs to write programs than write programs.
For some reason I remembered this quote as saying I'd rather write programs to write programs to write programs than write programs to write programs.
But maybe that's just me...
[Lambda the Ultimate]
4:29:27 PM
|
|
|
|
Wednesday, November 19, 2003
|
|
|
Friday, October 17, 2003
|
|
| |
The Philosophy of Ruby. Yukihiro Matsumoto, the creator of the Ruby programming language, talks with Bill Venners about Ruby's design philosophy, including design imperfection, the danger of orthogonality, and the importance of the human in computer endeavors.
Rather than discussing Ruby features in particular, Yukihiro Matsumoto explains the principles that guided him in the design of Ruby. Interestingly OO is never mentioned (perhaps it's taken for granted).
An interesting quote:
Yukihiro Matsumoto: Language designers want to design the perfect language. They want to be able to say, "My language is perfect. It can do everything." But it's just plain impossible to design a perfect language, because there are two ways to look at a language. One way is by looking at what can be done with that language. The other is by looking at how we feel using that language-how we feel while programming.
Because of the Turing completeness theory, everything one Turing-complete language can do can theoretically be done by another Turing-complete language, but at a different cost. ...
Instead of emphasizing the what, I want to emphasize the how part: how we feel while programming. That's Ruby's main difference from other language designs. I emphasize the feeling, in particular, how I feel using Ruby. I didn't work hard to make Ruby perfect for everyone, because you feel differently from me. No language can be perfect for everyone. I tried to make Ruby perfect for me, but maybe it's not perfect for you. The perfect language for Guido van Rossum is probably Python.
and also:
Yukihiro Matsumoto: Ruby inherited the Perl philosophy of having more than one way to do the same thing. I inherited that philosophy from Larry Wall, who is my hero actually. [Lambda the Ultimate]
I'm a big fan of Ruby and this provides a view of the language from the perspective of its designer.
6:23:07 PM
|
|
|
|
Monday, August 4, 2003
|
|
| |
Ruby 1.8.0 is out! Sources are ready for download as is the list of changes since 1.6.x. Binaries, including the Prag Programmer's Windows installer, should be available soon.
9:28:32 PM
|
|
|
|
Wednesday, July 30, 2003
|
|
| |
There were several good discussions on c.l.r today. First up is this one on Message-Object-Oriented compared to Function-Object-Oriented. I was reading the originating article just the other day. Anyway, the guy, James, that started the thread on c.l.r came up with a way to make Ruby syntax more like MOO. It's ugly, but it shows how easy it is to manipulate Ruby. Here's the magic:
I set about finding a way to do it in Ruby, and came up with an addition to the Symbol class. I wasn't sure if I wanted to have a full-blown Message class; I liked the idea that one could just type the message to send without having to go create a special object for it. The Symbol syntax makes this very natural
class Symbol def >>( *args ) ary = [] arglist = (block_given? ? yield : nil ) args.each{ |obj| begin ary << dispatch( obj, arglist ) rescue Exception ary << $!.clone end } ary end
def dispatch( obj, arglist ) return obj.send(self.to_s, *arglist) if arglist && (arglist.size>0) obj.send( self.to_s ) end end
This allows expressions like:
:some_message.>> obj :some_message.>>( obj1, obj2 ) :some_message.>>( obj1, obj2 ){ [ arg1, arg2, arg3] }
Any message string, instantiated as a Symbol, can be dispatched to a list of objects, along with a set of message arguments. The results come back as an array.
The second thread is about implementing Ruby in Ruby. This is the same idea demonstrated by creating a Lisp interpreter in Lisp. Dan Sugalski (of Parrot fame) started an interesting thread. See this for more along those lines.
9:41:50 PM
|
|
|
|
© Copyright
2004
Jon Israelson.
Last update:
3/17/04; 2:58:59 PM.
This theme is based on the SoundWaves
(blue) Manila theme. |
|
| March 2004 |
| Sun |
Mon |
Tue |
Wed |
Thu |
Fri |
Sat |
| |
1 |
2 |
3 |
4 |
5 |
6 |
| 7 |
8 |
9 |
10 |
11 |
12 |
13 |
| 14 |
15 |
16 |
17 |
18 |
19 |
20 |
| 21 |
22 |
23 |
24 |
25 |
26 |
27 |
| 28 |
29 |
30 |
31 |
|
|
|
| Feb Apr |
|