[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

lambda/proc/metaprogramming with Ruby

aldric[removeme]

4/15/2009 4:51:00 PM

Hi all,
I'm looking for good tutorials which explain how to use the two tools of lambda
and proc (which, ideally, would also help me learn how to think in such a fashion).
I think that would solve the third issue as well: metaprogramming, aka writing
code that writes code.. But if not, do you know of a good tutorial for that as
well? :)

Thanks,
--
Aldric Giacomoni<br>
If you refuse to accept anything but the best you very often get it.
5 Answers

pjb

4/15/2009 5:20:00 PM

0

Aldric Giacomoni <"aldric[removeme]"@trevoke.net> writes:
> I'm looking for good tutorials which explain how to use the two tools of lambda
> and proc (which, ideally, would also help me learn how to think in such a fashion).
> I think that would solve the third issue as well: metaprogramming, aka writing
> code that writes code.. But if not, do you know of a good tutorial for that as
> well? :)

The best would be to read SICP (and watch the lectures).
Notice the wiki with the exercises translated in other programming languages.

SICP = Structure and Interpretation of Computer Programs
http://mitpress.mit.edu/sicp/full-text/book/book-...
http://swiss.csail.mit.edu/classes/6.001/abelson-sussman...
http://www.codepoetics.com/wiki/index.php?title=Topics:SICP_in_other...
http://eli.thegreenplace.net/category/programming/...


--
__Pascal Bourguignon__

Tim Hunter

4/15/2009 5:36:00 PM

0

On Apr 15, 12:50 pm, Aldric Giacomoni <"aldric[removeme]"@trevoke.net>
wrote:
> Hi all,
> I'm looking for good tutorials which explain how to use the two tools of lambda
> and proc (which, ideally, would also help me learn how to think in such a fashion).
> I think that would solve the third issue as well: metaprogramming, aka writing
> code that writes code.. But if not, do you know of a good tutorial for that as
> well? :)

Regarding metaprogramming, I highly recommend Dave Thomas' "The Ruby
Object Model and Metaprogramming" series of screencasts. Very clear
explanations, nicely narrated. Dave uses TextMate to demonstrate code
snippets.

http://pragprog.com/screencasts/v-dtrubyom/the-ruby-object-model-and-metap....

James Gray

4/15/2009 6:00:00 PM

0

On Apr 15, 2009, at 12:40 PM, rmagick@gmail.com wrote:

> On Apr 15, 12:50 pm, Aldric Giacomoni <"aldric[removeme]"@trevoke.net>
> wrote:
>> Hi all,
>> I'm looking for good tutorials which explain how to use the two
>> tools of lambda
>> and proc (which, ideally, would also help me learn how to think in
>> such a fashion).
>> I think that would solve the third issue as well: metaprogramming,
>> aka writing
>> code that writes code.. But if not, do you know of a good tutorial
>> for that as
>> well? :)
>
> Regarding metaprogramming, I highly recommend Dave Thomas' "The Ruby
> Object Model and Metaprogramming" series of screencasts. Very clear
> explanations, nicely narrated. Dave uses TextMate to demonstrate code
> snippets.
>
> http://pragprog.com/screencasts/v-dtrubyom/the-ruby-object-model-and-metap...
> .

I agree. That series is simply excellent.

I also wrote a little bit about blocks and lambda on my blog a while
back:

http://blog.grayproductions.net/articles/code_as_a...

James Edward Gray II


aldric[removeme]

4/15/2009 7:09:00 PM

0

James Gray wrote:
> On Apr 15, 2009, at 12:40 PM, rmagick@gmail.com wrote:
>
>> On Apr 15, 12:50 pm, Aldric Giacomoni <"aldric[removeme]"@trevoke.net>
>> wrote:
>>> Hi all,
>>> I'm looking for good tutorials which explain how to use the two
>>> tools of lambda
>>> and proc (which, ideally, would also help me learn how to think in
>>> such a fashion).
>>> I think that would solve the third issue as well: metaprogramming,
>>> aka writing
>>> code that writes code.. But if not, do you know of a good tutorial
>>> for that as
>>> well? :)
>> Regarding metaprogramming, I highly recommend Dave Thomas' "The Ruby
>> Object Model and Metaprogramming" series of screencasts. Very clear
>> explanations, nicely narrated. Dave uses TextMate to demonstrate code
>> snippets.
>>
>> http://pragprog.com/screencasts/v-dtrubyom/the-ruby-object-model-and-metap...
>> .
>
> I agree. That series is simply excellent.
>
> I also wrote a little bit about blocks and lambda on my blog a while
> back:
>
> http://blog.grayproductions.net/articles/code_as_a...
>
> James Edward Gray II
>
>
Excellent - thank you to both!
Incidentally, James, I saw online recently your presentation for Little Big Ruby
and I really enjoyed it :)

--
Aldric Giacomoni<br>
A lifetime isn't nearly long enough to figure out what it's all about.

James Gray

4/15/2009 7:18:00 PM

0

On Apr 15, 2009, at 2:10 PM, Aldric Giacomoni wrote:

> Incidentally, James, I saw online recently your presentation for
> Little Big Ruby and I really enjoyed it :)

Thank you.

James Edward Gray II