Hi,
extra/random.combinators hasn't been merged in. Should I change
something, or just keep it in my work/ directory ?
Jon



On Mon, Aug 23, 2010 at 9:40 PM, Jon Harper <jon.harpe...@gmail.com> wrote:
> Hi,
> The random.combinators vocabulary (with tests and docs) is ready for review :
> git://github.com/jonenst/factor.git random-combinators
>
> Jon
>
>
>
> On Wed, Aug 18, 2010 at 4:29 AM, Slava Pestov <sl...@factorcode.org> wrote:
>> On Tue, Aug 17, 2010 at 10:20 AM, Jon Harper <jon.harpe...@gmail.com> wrote:
>>> Hi,
>>> I looked at the implementation of cond and case, and I saw the
>>> define-transform and "no-compile" word property. How is it different
>>> from the MACRO: construction ? Is user code supposed to use it at all
>>> ?
>>
>> Not really. define-transform lets you have a different definition for
>> the optimized and non-optimized usages of the word, so its only needed
>> for combinators such as 'cond' which are called a lot during
>> bootstrap. In this case you want to avoid generating the quotation
>> every time, so the non-optimized definition is used. For user code
>> which is always optimized, define-transform does not offer any
>> benefits.
>>
>>> Both solutions use a pcase>quot word (like cond and case) and then one
>>> uses MACRO: and the other uses define-transform. Both seem to work
>>> fine...
>>
>> Use MACRO:.
>>
>>> Also, maybe this combinator (and others) could ship with factor in
>>> extra/random/combinators ? I'm thinking of a variant where the
>>> probabilities are conditionnal (ie in the previous example, the first
>>> quotation would execute with 0.2 probability, then the second with
>>> 0.1, which makes an overall (1-0.2)*0.1 probability, and so on..).
>>> Also, variants of if, when and unless that take a probability instead
>>> of taking a boolean.
>>
>> Sure, if you make a vocab with docs and tests then I'll pull it in.
>>
>> Slava
>>
>> ------------------------------------------------------------------------------
>> This SF.net email is sponsored by
>>
>> Make an app they can't live without
>> Enter the BlackBerry Developer Challenge
>> http://p.sf.net/sfu/RIM-dev2dev
>> _______________________________________________
>> Factor-talk mailing list
>> Factor-talk@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/factor-talk
>>
>

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to