Right now the way backtrack vocabulary works is ``amb`` can only work on
literal values (like a string or array or whatever) but not run-time
computed ones (for those you have to use ``amp-lazy``).  It would be nice
if that distinction was hidden behind a single ``amp`` word probably.

On Wed, Mar 22, 2017 at 4:13 AM, Alexander Ilin <ajs...@yandex.ru> wrote:

> John, in the $7.11 blog post why did you use the `amb-lazy` word instead
> of the `amb`, which seems to do the same thing (after reading the docs).
>
> 22.03.2017, 02:13, "John Benediktsson" <mrj...@gmail.com>:
>
> Thanks, I fixed that in my GitHub repo.
>
> By the way, if you want another puzzle to try solving maybe using
> backtracking, this one is fun:
>
>     http://datagenetics.com/blog/march32017/index.html
>
>
>
> On Mon, Mar 20, 2017 at 11:22 PM, CW Alston <cwalsto...@gmail.com> wrote:
>
> Hi -
> The intricacy of the code in backtracking.factor is pretty amazing; a good
> example
> of making use of the continuations vocab, for sure. The two examples on
> the
> re-factor.blogspot:
> $7.11 <https://re-factor.blogspot.com/2017/02/711.html>  and SEND + MORE
> = MONEY?
> <https://github.com/mrjbq7/re-factor/blob/master/send-more-money/send-more-money.factor>
> are a great help in figuring out how non-determinism via John McCarthy's
> amb
> (ambiguous) operator works in backtracking. Thanks for these!
>
> Note that the github code def for `digit` in send-more-money.factor is
> missing a word:
>
> : digit ( seq -- n )
>     digits swap amb-lazy ;
>
> should read
>
> : digit ( seq -- n )
>     digits swap *diff* amb-lazy ;
>
> and then all is well.
> Cheers,
> ~cw
>
> --
> *~ Memento Amori*
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>
> ,
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ,
>
> _______________________________________________
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>
>
> ---=====---
> Александр
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to