Re: I really like Ioke. How can I help?

  • From: Ola Bini <ola.bini@gmail.com>
  • To: Carlos Villela <cv@lixo.org>
  • Cc: dev@ioke.kenai.com
  • Subject: Re: I really like Ioke. How can I help?
  • Date: Mon, 05 Jan 2009 23:08:33 +0100
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=cR5zNEHfmSiL9yhIXhSXDW2SINiyjtGhuA8hXqTiO/EGTQwGDIa2PupInN3ya6xW0P T1IwpJyfoM7qQd/sZJvhaoOqX9Ci58x2e32VtlSMCkBhKQ0T4aACQ7UvwYyoIKHryxF8 HJfnmc8wc7pIvvRGvJ7oILbHvzllOfmhTjepU=

Carlos Villela wrote:
Especially starting to think about

This is possibly off-topic, but another thing that's tricky to get my
head around are the subtleties between macro, dmacro, lecro, lecrox,
fn and fnx. This might just be me being unused to the Great LISP Way,
but I reckon if the idea is making Ioke look and feel like a super
powerful Ruby, these gotchas have to be well explained or more obvious
in the code.

Yep, definitely. It's kinda subtle. And you haven't even mentioned syntax ... =)

I'll explain it more in the guide for the next release but short:

macro - has a receiver, like a method, but takes unevaluated arguments that are available to the macro
lecro - has no receiver, instead is lexically scoped, otherwise works like a macro
lecrox - like a lecro, but isn't activatable
fn - like a method that is lexically scoped (so it's not executed in the context of a receiver). it isn't activatable.
fnx     - like fn, but is activatable
syntax- something that should return a message chain. the call to syntax will be replaced by the message chain returned.
dmacro - a syntax to make macros that have destructuring of arguments.
dlecro   - destructuring for lecros
dlecrox - like dlecro, but will not be activatable.

some nice methods to keep in mind when working with message chains:
'    - returns an unevaluated message chain
`   - wraps an object in a message
'' - returns an unevaluated message chain, except for the places where ` is encountered, where it will splice in stuff. take a look at the implementation of DefaultBehavior Definitions generateMatchMethod in A10_defaultBehavior.ik for an example of how it's generally used.

Cheers

--
Ola Bini (http://olabini.com) JRuby Core Developer
Developer, ThoughtWorks Studios (http://studios.thoughtworks.com)
Practical JRuby on Rails (http://apress.com/book/view/9781590598818)

"Yields falsehood when quined" yields falsehood when quined.




I really like Ioke. How can I help?

Brian Guthrie 01/05/2009

Message not available

Re: I really like Ioke. How can I help?

Carlos Villela 01/05/2009

Message not available

Message not available

Re: I really like Ioke. How can I help?

Carlos Villela 01/05/2009

Re: I really like Ioke. How can I help?

Ola Bini 01/05/2009

Re: I really like Ioke. How can I help?

Carlos Villela 01/05/2009

Re: I really like Ioke. How can I help?

Sam Aaron 01/05/2009

Re: I really like Ioke. How can I help?

Carlos Villela 01/05/2009

Re: I really like Ioke. How can I help?

Ola Bini 01/05/2009

Re: I really like Ioke. How can I help?

Carlos Villela 01/05/2009

Re: I really like Ioke. How can I help?

Ola Bini 01/05/2009
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120127.ac94057)
 
 
Close
loading
Please Confirm
Close