[Factor-talk] Determining the DST-ness of a timestamp

2008-12-28 Thread Joe Groff
Hi guys. It looks like the calendar vocab doesn't have a word for  
determining whether a given timestamp object is in DST or not. Perhaps  
the timestamp object could have an "is-dst" slot, similar to Unix's  
struct timeval?

-Joe

--
___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] An alternative for "foldable"?

2008-12-28 Thread Samuel Tardieu
> "Slava" == Slava Pestov  writes:

Slava> why not just define a word : sum-of-primes ( m n -- x )
Slava> primes-between sum ; foldable

Sure, but that was just an example. It would be great to be able to
indicate that the list of primes between two numbers can be known at
compile time if the bounds are.

  Sam
-- 
Samuel Tardieu -- s...@rfc1149.net -- http://www.rfc1149.net/


--
___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] An alternative for "foldable"?

2008-12-28 Thread Slava Pestov
why not just define a word

: sum-of-primes ( m n -- x ) primes-between sum ; foldable

Slava

On Sun, Dec 28, 2008 at 5:59 AM, Samuel Tardieu  wrote:
> I find it frustrating that "foldable" cannot be used when the word you
> want to apply it to returns a mutable sequence, even if I understand
> why.
>
> What could we do to allow compile-time evaluation of words returning
> sequences for example? It would be nice to have words such as
>
>  : sum-of-small-primes ( -- n ) 2 10 primes-between sum ;
>
> compute their content as compile time.
>
>  Sam
> --
> Samuel Tardieu -- s...@rfc1149.net -- http://www.rfc1149.net/
>
>
> --
> ___
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>

--
___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


[Factor-talk] An alternative for "foldable"?

2008-12-28 Thread Samuel Tardieu
I find it frustrating that "foldable" cannot be used when the word you
want to apply it to returns a mutable sequence, even if I understand
why.

What could we do to allow compile-time evaluation of words returning
sequences for example? It would be nice to have words such as

  : sum-of-small-primes ( -- n ) 2 10 primes-between sum ;

compute their content as compile time.

  Sam
-- 
Samuel Tardieu -- s...@rfc1149.net -- http://www.rfc1149.net/


--
___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] math.primes reorganization

2008-12-28 Thread Samuel Tardieu
> "Bruce" == Bruce & Breeanna Rennie  writes:

Bruce> Just a quick question are you using the real Sieve or the
Bruce> pretend Sieve see http://lambda-the-ultimate.org/node/3127 for
Bruce> details of this. It was interesting reading.

It is the real sieve. Thanks for the article anyway, it was
a very pleasant reading!

  Sam
-- 
Samuel Tardieu -- s...@rfc1149.net -- http://www.rfc1149.net/


--
___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk