Re: [Factor-talk] sequences and the stack

2011-08-24 Thread Joe Groff

On Aug 24, 2011, at 10:05 PM, Andrew Pennebaker wrote:

> Joe, your for-all? looks promising (and it's incredibly short). However, when 
> I try it, I'm still getting that macro error.

In your "main" you missed the [ ] around prop-even. This line:

https://github.com/mcandre/factcheck/blob/master/example.factor#L12

should read:

[ prop-even ] [ gen-even ] for-all? .

-Joe

smime.p7s
Description: S/MIME cryptographic signature
--
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] sequences and the stack

2011-08-24 Thread Andrew Pennebaker
Joe, your for-all? looks promising (and it's incredibly short). However,
when I try it, I'm still getting that macro error.

Latest code incorporating your for-all?:

https://github.com/mcandre/factcheck

Macro Error:

$ ./example.factor
Loading /Users/andrew/.factor-rc
The word main cannot be executed because it failed to compile

Cannot apply “call” to a run-time computed value
macro call

Cheers,

Andrew Pennebaker
www.yellosoft.us

On Thu, Aug 25, 2011 at 12:49 AM, Joe Groff  wrote:

>
> On Aug 24, 2011, at 9:30 PM, Andrew Pennebaker wrote:
>
> *predicate* { *gen-type1* *gen-type2* *gen-type3* ... } for-all
>
>
> The generators needn't be in an array; they could be a simple quotation.
> Simply calling each generator function in turn will line up their outputs on
> the stack in the proper order. Assuming the net output effect of the
> generators is supposed to match the input effect of the predicate, the
> generators and predicate together would have a constant effect ( -- ? ). The
> following works, and should be general enough for everything you describe:
>
> CONSTANT: number-of-tries 1,000
>
> : for-all? ( generator: ( -- ..a ) predicate: ( ..a -- ? ) -- ? )
> [ number-of-tries iota ] 2dip '[ drop @ @ not ] find drop not ; inline
>
> ( scratchpad ) [ 2 64 ^ random ] [ even? ] for-all? .
> f
> ( scratchpad ) [ 2 64 ^ random 2 * ] [ even? ] for-all? .
> t
>
> : random-string ( -- x ) 32 random [ HEX: 10 random ] "" replicate-as ;
>
> ( scratchpad ) [ random-string random-string ] [ [ [ length ] bi@ + ] [
> append length ] 2bi = ] for-all?
> t
>
> -Joe
>
>
> --
> EMC VNX: the world's simplest storage, starting under $10K
> The only unified storage solution that offers unified management
> Up to 160% more powerful than alternatives and 25% more efficient.
> Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
> ___
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>
--
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] sequences and the stack

2011-08-24 Thread Joe Groff

On Aug 24, 2011, at 9:50 PM, Andrew Pennebaker wrote:

> The exemplar idea is attractive, especially since it's idiomatic in Factor. 
> However, an exemplar of 1 may not be precise enough for certain predicates.

True. Unfortunately Factor doesn't support CLOS-style eq generics, otherwise 
you could dispatch on the class names themselves, and use Factor's predicate 
classes and class algebra to naturally describe more specific constraints:

EQ-GENERIC: arbitrary ( class -- value ) ! not in factor, unfortunately

M: integer arbitrary 2 64 ^ random ;

PREDICATE: even-integer < integer
even? ;

M: even-integer arbitrary 2 63 ^ random 2 * ;

\ integer arbitrary . ! would print e.g. 12345
\ even-integer arbitrary . ! would print e.g. 12346

INTERSECTION: even-fixnum
fixnum even-integer ;

M: even-fixnum arbitrary most-positive-fixnum 2 / random 2 * ;

\ even-fixnum arbitrary .

-Joe

smime.p7s
Description: S/MIME cryptographic signature
--
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] sequences and the stack

2011-08-24 Thread Andrew Pennebaker
The exemplar idea is attractive, especially since it's idiomatic in Factor.
However, an exemplar of 1 may not be precise enough for certain predicates.

How can we define sufficiently specific exemplars for predicates like
non-negative? positive? divides-by-three? byte? char? lowercase char? vowel?

I imagine classes could reduce the ambiguity of exemplars. How much
boilerplate would be required to make classes for the above? ,
, , ?

It's starting to look circular: How can we define legal inputs for a
predicate in order to test whether the predicate is succeeds for all legal
inputs?

A conceptually easy solution is to make quotations that generate the desired
input, slap 'em in an array, and call predicate { generators ... }
forall100 times. I'm just not sure how to do call(function, arguments)
in factor.

Cheers,

Andrew Pennebaker
www.yellosoft.us

On Thu, Aug 25, 2011 at 12:22 AM, Joe Groff  wrote:

>
> On Aug 24, 2011, at 8:44 PM, Andrew Pennebaker wrote:
>
> Aye, it's a bit awkward, but I know that Haskell can do it because that's
> how Haskell's QuickCheck library works. It even goes one step further and
> creates the appropriate list of value generators according to the
> predicate's type.
>
>
> Perhaps you could do something similar in Factor. Instead of using
> generator functions, you could make a single generic function that lets
> types describe how to generate arbitrary members of themselves:
>
> GENERIC: something-like ( exemplar -- arbitrary )
>
> ERROR: don't-know-how-to-make-something-like exemplar ;
>
> M: object something-like
> don't-know-how-to-make-something-like ;
>
> M: integer something-like
> 2 64 ^ random ;
>
> M: float something-like
> -1.0 1.0 uniform-random-float ;
>
> Then pass an exemplar of the type to something-like:
>
> ( scratchpad ) 1 something-like .
> 16789018172707
>
> ( scratchpad ) 1.0 something-like .
> -0.13980920020477
>
> Union types and tuple types could then naturally implement something-like
> in terms of their constituent types.
>
> -Joe
>
>
> --
> EMC VNX: the world's simplest storage, starting under $10K
> The only unified storage solution that offers unified management
> Up to 160% more powerful than alternatives and 25% more efficient.
> Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
> ___
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>
--
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] sequences and the stack

2011-08-24 Thread Joe Groff

On Aug 24, 2011, at 9:30 PM, Andrew Pennebaker wrote:

> predicate { gen-type1 gen-type2 gen-type3 ... } for-all

The generators needn't be in an array; they could be a simple quotation. Simply 
calling each generator function in turn will line up their outputs on the stack 
in the proper order. Assuming the net output effect of the generators is 
supposed to match the input effect of the predicate, the generators and 
predicate together would have a constant effect ( -- ? ). The following works, 
and should be general enough for everything you describe:

CONSTANT: number-of-tries 1,000

: for-all? ( generator: ( -- ..a ) predicate: ( ..a -- ? ) -- ? )
[ number-of-tries iota ] 2dip '[ drop @ @ not ] find drop not ; inline

( scratchpad ) [ 2 64 ^ random ] [ even? ] for-all? .
f
( scratchpad ) [ 2 64 ^ random 2 * ] [ even? ] for-all? .
t

: random-string ( -- x ) 32 random [ HEX: 10 random ] "" replicate-as ;

( scratchpad ) [ random-string random-string ] [ [ [ length ] bi@ + ] [ append 
length ] 2bi = ] for-all?
t

-Joe

smime.p7s
Description: S/MIME cryptographic signature
--
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] sequences and the stack

2011-08-24 Thread Andrew Pennebaker
My goal is to test a user-supplied predicate, e.g. even? with a function
for-all that checks even? for all values (actually just 100 random values),
in other words, that arbitrary-integer even? is always true. Obviously this
is not true, but we need a predicate that fails in order to test the test
framework itself.

If the predicate is the odd? property of integers, then we have:

[ even? ] { gen-integer } for-all

Which should fail on odd numbers.

If we make a generator for just even numbers (gen-even), we have:

[ even? ] { gen-even } for-all

Which should always succeed.

It's difficult to dynamically determine test values for a given predicate.
Therefore, the user must supply an array of quotations which generate input
for the predicate. Some predicates take a single integer (even?), others
take a sequence (length), still others take multiple inputs, each of
different types. So the user calls for-all as follows:

*predicate* { *gen-type1* *gen-type2* *gen-type3* ... } for-all

If this test framework only handled unary predicates, then we could simply:

*predicate* *gen-type* for-all

I want to construct a for-all that tests predicates of arbitrary complexity.
For instance, there is already a generator for arbitrary arrays, which we
use to construct a generator of arbitrary strings.

! A quotation generating a random sequence.
: gen-seq ( quot: ( -- obj ) -- quot: ( -- seq ) ) [ gen-integer call 100
mod swap replicate ] ; inline

! A quotation generating a random string.
: gen-string ( -- str ) [ gen-char gen-seq call >string ] ; inline

That's why I want to emulate Smalltalk's valueWithArguments, a way to call a
quotation on an array of arguments rather than the stack. Imagine a
call-with that accepts a quotation and an array of values to operate on.

Cheers,

Andrew Pennebaker
www.yellosoft.us

On Thu, Aug 25, 2011 at 12:05 AM, Joe Groff  wrote:

> On Aug 24, 2011, at 8:38 PM, Andrew Pennebaker wrote:
>
> $ ./example.factor
> Loading /Users/andrew/.factor-rc
> The word for-all cannot be executed because it failed to compile
>
> Cannot apply “input macro input
>
> input determined by stack effect inference on the input quotation. Since it's a
> macro, that input quotation needs to be statically determinable by the
> compiler. The compiler isn't smart enough to reach up to the caller's frame
> without the "inline" annotation on the callee:
>
> : foo ( quot -- x ) input : bar ( -- six ) { 1 2 3 } [ + + ] foo ;
>
> The stack is ultimately not a dynamic thing in Factor, and while there are
> hacks to pretend it is, you'll be happier if you find a more
> data-structure-oriented approach. You said you had an array of quotations; a
> better approach would be to iterate over the array, call each quotation with
> call( -- ) and process the outputs in a single pass, something akin like
> this:
>
> : generate-and-print ( generators -- )
> [ call( -- x ) . ] each ;
>
> -Joe
>
>
> --
> EMC VNX: the world's simplest storage, starting under $10K
> The only unified storage solution that offers unified management
> Up to 160% more powerful than alternatives and 25% more efficient.
> Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
> ___
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>
--
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] sequences and the stack

2011-08-24 Thread Joe Groff

On Aug 24, 2011, at 8:44 PM, Andrew Pennebaker wrote:

> Aye, it's a bit awkward, but I know that Haskell can do it because that's how 
> Haskell's QuickCheck library works. It even goes one step further and creates 
> the appropriate list of value generators according to the predicate's type.

Perhaps you could do something similar in Factor. Instead of using generator 
functions, you could make a single generic function that lets types describe 
how to generate arbitrary members of themselves:

GENERIC: something-like ( exemplar -- arbitrary )

ERROR: don't-know-how-to-make-something-like exemplar ;

M: object something-like
don't-know-how-to-make-something-like ;

M: integer something-like
2 64 ^ random ;

M: float something-like
-1.0 1.0 uniform-random-float ;

Then pass an exemplar of the type to something-like:

( scratchpad ) 1 something-like .
16789018172707

( scratchpad ) 1.0 something-like .
-0.13980920020477

Union types and tuple types could then naturally implement something-like in 
terms of their constituent types.

-Joe

smime.p7s
Description: S/MIME cryptographic signature
--
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] sequences and the stack

2011-08-24 Thread Joe Groff
On Aug 24, 2011, at 8:38 PM, Andrew Pennebaker wrote:

> $ ./example.factor 
> Loading /Users/andrew/.factor-rc
> The word for-all cannot be executed because it failed to compile
> 
> Cannot apply “input macro input

smime.p7s
Description: S/MIME cryptographic signature
--
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] sequences and the stack

2011-08-24 Thread Andrew Pennebaker
Aye, it's a bit awkward, but I know that Haskell can do it because that's
how Haskell's QuickCheck library works. It even goes one step further and
creates the appropriate list of value generators according to the
predicate's type.

Cheers,

Andrew Pennebaker
www.yellosoft.us

On Wed, Aug 24, 2011 at 10:32 PM, Joe Groff  wrote:

>
> On Aug 24, 2011, at 6:50 PM, Andrew Pennebaker wrote:
>
> > Is there a word more general than firstn? I'd like to push all the
> elements of a sequence onto the stack.
>
> Asking for a function that pushes all the elements of an arbitrary sequence
> onto the stack is like asking for an [a] -> (a,a,a,...) function in Haskell.
> The stack in Factor is an abstract notational convenience akin to function
> composition (or more generally, arrows), not a real place. firstn is a
> macro; the expression "5 firstn" is evaluated at compile time and replaced
> in-line by a ( seq -- x x x x x ) function; this still only works when the
> value 5 is known at compile time.
>
> Guessing from your previous post, you're probably trying to turn this:
>
>[ even? ] { gen-integer } check
>
> into something like:
>
>{ t } [ 1,000 [ gen-integer ] replicate [ even? not ] find drop not
> ] unit-test
>
> You'd do this as a macro. Macros are functions from their compile-time
> arguments to a quotation. Something like this (not tested):
>
> MACRO: check ( predicates generators -- quot )
>[ swap '[ { t } [ 1,000 [ _ execute( -- x ) ] replicate [ @ not ]
> find drop not ] unit-test ] ] with map concat ;
>
> -Joe
>
> --
> EMC VNX: the world's simplest storage, starting under $10K
> The only unified storage solution that offers unified management
> Up to 160% more powerful than alternatives and 25% more efficient.
> Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
> ___
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>
--
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] sequences and the stack

2011-08-24 Thread Andrew Pennebaker
Thanks, inputhttps://github.com/mcandre/factcheck>.

$ ./example.factor
Loading /Users/andrew/.factor-rc
The word for-all cannot be executed because it failed to compile

Cannot apply “inputwrote:

> Look at input
>
> On Wed, Aug 24, 2011 at 7:19 PM, Andrew Pennebaker <
> andrew.penneba...@gmail.com> wrote:
>
>> I've got a function that I want to call over a sequence of values (both
>> are determined at run time).
>>
>> Is there something like call that accepts a sequence of arguments?
>>
>> Something like this:
>>
>> f args call-seq
>>
>> Cheers,
>>
>> Andrew Pennebaker
>> www.yellosoft.us
>>
>> On Wed, Aug 24, 2011 at 10:04 PM, John Benediktsson wrote:
>>
>>> Typically there are better ways to operate on sequences than to put all
>>> the elements on the stack, but you could:
>>>
>>> ( scratchpad ) { 0 1 2 3 } dup length firstn
>>>
>>> Better might be to use some combinators to act on the sequence each
>>> grabbing the element that they need (bi, tri, or the more general cleave):
>>>
>>> ( scratchpad ) { 0 1 2 3 } {
>>>   [ first ]
>>>   [ second ]
>>>   [ third ]
>>>} cleave
>>>
>>>
>>>
>>>
>>> On Wed, Aug 24, 2011 at 6:50 PM, Andrew Pennebaker <
>>> andrew.penneba...@gmail.com> wrote:
>>>
 Is there a word more general than firstn? I'd like to push all the
 elements of a sequence onto the stack.


 Cheers,

 Andrew Pennebaker
 www.yellosoft.us

 On Sun, Aug 21, 2011 at 2:26 PM, Alexander J. Vondrak <
 ajvond...@csupomona.edu> wrote:

> first2: http://docs.factorcode.org/content/word-first2,sequences.html
>
> In general, firstn:
> http://docs.factorcode.org/content/word-firstn,sequences.generalizations.html
>
> Regards,
> --Alex Vondrak
> 
> From: Andrew Pennebaker [andrew.penneba...@gmail.com]
> Sent: Sunday, August 21, 2011 11:20 AM
> To: Factor
> Subject: [Factor-talk] sequences and the stack
>
> The stack contains a sequence of number pairs:
>
> { { x1 y1 } { x2 y2 } { x3 y3 } ... }
>
> I want to map over the pairs, accessing xi and yi.
>
> [
>   ! stack = { xi yi }
>
>   ! ...
>
>   ! stack = xi yi
> ] map
>
> What's the code that goes in !... ?
>
> Other than using nth, how can I do this? Is there a word that pops the
> elements of a sequence onto the stack?
>
> Cheers,
>
> Andrew Pennebaker
> www.yellosoft.us
>
>
> --
> Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
> user administration capabilities and model configuration. Take
> the hassle out of deploying and managing Subversion and the
> tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
> ___
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>



 --
 EMC VNX: the world's simplest storage, starting under $10K
 The only unified storage solution that offers unified management
 Up to 160% more powerful than alternatives and 25% more efficient.
 Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev

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


>>>
>>>
>>> --
>>> EMC VNX: the world's simplest storage, starting under $10K
>>> The only unified storage solution that offers unified management
>>> Up to 160% more powerful than alternatives and 25% more efficient.
>>> Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
>>> ___
>>> Factor-talk mailing list
>>> Factor-talk@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/factor-talk
>>>
>>>
>>
>>
>> --
>> EMC VNX: the world's simplest storage, starting under $10K
>> The only unified storage solution that offers unified management
>> Up to 160% more powerful than alternatives and 25% more efficient.
>> Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
>> ___
>> Factor-talk mailing list
>> Factor-talk@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/factor-talk
>>
>>
>
>
> --
> EMC VNX: the world's simplest storage, starting under $10K
> The only unified storage solution that offers unified management
> Up t

Re: [Factor-talk] sequences and the stack

2011-08-24 Thread Joe Groff

On Aug 24, 2011, at 6:50 PM, Andrew Pennebaker wrote:

> Is there a word more general than firstn? I'd like to push all the elements 
> of a sequence onto the stack.

Asking for a function that pushes all the elements of an arbitrary sequence 
onto the stack is like asking for an [a] -> (a,a,a,...) function in Haskell. 
The stack in Factor is an abstract notational convenience akin to function 
composition (or more generally, arrows), not a real place. firstn is a macro; 
the expression "5 firstn" is evaluated at compile time and replaced in-line by 
a ( seq -- x x x x x ) function; this still only works when the value 5 is 
known at compile time.

Guessing from your previous post, you're probably trying to turn this:

[ even? ] { gen-integer } check

into something like:

{ t } [ 1,000 [ gen-integer ] replicate [ even? not ] find drop not ] 
unit-test

You'd do this as a macro. Macros are functions from their compile-time 
arguments to a quotation. Something like this (not tested):

MACRO: check ( predicates generators -- quot )
[ swap '[ { t } [ 1,000 [ _ execute( -- x ) ] replicate [ @ not ] find 
drop not ] unit-test ] ] with map concat ;

-Joe

smime.p7s
Description: S/MIME cryptographic signature
--
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] sequences and the stack

2011-08-24 Thread John Benediktsson
Look at input wrote:

> I've got a function that I want to call over a sequence of values (both are
> determined at run time).
>
> Is there something like call that accepts a sequence of arguments?
>
> Something like this:
>
> f args call-seq
>
> Cheers,
>
> Andrew Pennebaker
> www.yellosoft.us
>
> On Wed, Aug 24, 2011 at 10:04 PM, John Benediktsson wrote:
>
>> Typically there are better ways to operate on sequences than to put all
>> the elements on the stack, but you could:
>>
>> ( scratchpad ) { 0 1 2 3 } dup length firstn
>>
>> Better might be to use some combinators to act on the sequence each
>> grabbing the element that they need (bi, tri, or the more general cleave):
>>
>> ( scratchpad ) { 0 1 2 3 } {
>>   [ first ]
>>   [ second ]
>>   [ third ]
>>} cleave
>>
>>
>>
>>
>> On Wed, Aug 24, 2011 at 6:50 PM, Andrew Pennebaker <
>> andrew.penneba...@gmail.com> wrote:
>>
>>> Is there a word more general than firstn? I'd like to push all the
>>> elements of a sequence onto the stack.
>>>
>>>
>>> Cheers,
>>>
>>> Andrew Pennebaker
>>> www.yellosoft.us
>>>
>>> On Sun, Aug 21, 2011 at 2:26 PM, Alexander J. Vondrak <
>>> ajvond...@csupomona.edu> wrote:
>>>
 first2: http://docs.factorcode.org/content/word-first2,sequences.html

 In general, firstn:
 http://docs.factorcode.org/content/word-firstn,sequences.generalizations.html

 Regards,
 --Alex Vondrak
 
 From: Andrew Pennebaker [andrew.penneba...@gmail.com]
 Sent: Sunday, August 21, 2011 11:20 AM
 To: Factor
 Subject: [Factor-talk] sequences and the stack

 The stack contains a sequence of number pairs:

 { { x1 y1 } { x2 y2 } { x3 y3 } ... }

 I want to map over the pairs, accessing xi and yi.

 [
   ! stack = { xi yi }

   ! ...

   ! stack = xi yi
 ] map

 What's the code that goes in !... ?

 Other than using nth, how can I do this? Is there a word that pops the
 elements of a sequence onto the stack?

 Cheers,

 Andrew Pennebaker
 www.yellosoft.us


 --
 Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
 user administration capabilities and model configuration. Take
 the hassle out of deploying and managing Subversion and the
 tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
 ___
 Factor-talk mailing list
 Factor-talk@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/factor-talk

>>>
>>>
>>>
>>> --
>>> EMC VNX: the world's simplest storage, starting under $10K
>>> The only unified storage solution that offers unified management
>>> Up to 160% more powerful than alternatives and 25% more efficient.
>>> Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
>>>
>>> ___
>>> Factor-talk mailing list
>>> Factor-talk@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/factor-talk
>>>
>>>
>>
>>
>> --
>> EMC VNX: the world's simplest storage, starting under $10K
>> The only unified storage solution that offers unified management
>> Up to 160% more powerful than alternatives and 25% more efficient.
>> Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
>> ___
>> Factor-talk mailing list
>> Factor-talk@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/factor-talk
>>
>>
>
>
> --
> EMC VNX: the world's simplest storage, starting under $10K
> The only unified storage solution that offers unified management
> Up to 160% more powerful than alternatives and 25% more efficient.
> Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
> ___
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>
--
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] sequences and the stack

2011-08-24 Thread Andrew Pennebaker
I've got a function that I want to call over a sequence of values (both are
determined at run time).

Is there something like call that accepts a sequence of arguments?

Something like this:

f args call-seq

Cheers,

Andrew Pennebaker
www.yellosoft.us

On Wed, Aug 24, 2011 at 10:04 PM, John Benediktsson wrote:

> Typically there are better ways to operate on sequences than to put all the
> elements on the stack, but you could:
>
> ( scratchpad ) { 0 1 2 3 } dup length firstn
>
> Better might be to use some combinators to act on the sequence each
> grabbing the element that they need (bi, tri, or the more general cleave):
>
> ( scratchpad ) { 0 1 2 3 } {
>   [ first ]
>   [ second ]
>   [ third ]
>} cleave
>
>
>
>
> On Wed, Aug 24, 2011 at 6:50 PM, Andrew Pennebaker <
> andrew.penneba...@gmail.com> wrote:
>
>> Is there a word more general than firstn? I'd like to push all the
>> elements of a sequence onto the stack.
>>
>>
>> Cheers,
>>
>> Andrew Pennebaker
>> www.yellosoft.us
>>
>> On Sun, Aug 21, 2011 at 2:26 PM, Alexander J. Vondrak <
>> ajvond...@csupomona.edu> wrote:
>>
>>> first2: http://docs.factorcode.org/content/word-first2,sequences.html
>>>
>>> In general, firstn:
>>> http://docs.factorcode.org/content/word-firstn,sequences.generalizations.html
>>>
>>> Regards,
>>> --Alex Vondrak
>>> 
>>> From: Andrew Pennebaker [andrew.penneba...@gmail.com]
>>> Sent: Sunday, August 21, 2011 11:20 AM
>>> To: Factor
>>> Subject: [Factor-talk] sequences and the stack
>>>
>>> The stack contains a sequence of number pairs:
>>>
>>> { { x1 y1 } { x2 y2 } { x3 y3 } ... }
>>>
>>> I want to map over the pairs, accessing xi and yi.
>>>
>>> [
>>>   ! stack = { xi yi }
>>>
>>>   ! ...
>>>
>>>   ! stack = xi yi
>>> ] map
>>>
>>> What's the code that goes in !... ?
>>>
>>> Other than using nth, how can I do this? Is there a word that pops the
>>> elements of a sequence onto the stack?
>>>
>>> Cheers,
>>>
>>> Andrew Pennebaker
>>> www.yellosoft.us
>>>
>>>
>>> --
>>> Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
>>> user administration capabilities and model configuration. Take
>>> the hassle out of deploying and managing Subversion and the
>>> tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
>>> ___
>>> Factor-talk mailing list
>>> Factor-talk@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/factor-talk
>>>
>>
>>
>>
>> --
>> EMC VNX: the world's simplest storage, starting under $10K
>> The only unified storage solution that offers unified management
>> Up to 160% more powerful than alternatives and 25% more efficient.
>> Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
>>
>> ___
>> Factor-talk mailing list
>> Factor-talk@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/factor-talk
>>
>>
>
>
> --
> EMC VNX: the world's simplest storage, starting under $10K
> The only unified storage solution that offers unified management
> Up to 160% more powerful than alternatives and 25% more efficient.
> Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
> ___
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>
--
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] sequences and the stack

2011-08-24 Thread John Benediktsson
Typically there are better ways to operate on sequences than to put all the
elements on the stack, but you could:

( scratchpad ) { 0 1 2 3 } dup length firstn

Better might be to use some combinators to act on the sequence each grabbing
the element that they need (bi, tri, or the more general cleave):

( scratchpad ) { 0 1 2 3 } {
  [ first ]
  [ second ]
  [ third ]
   } cleave




On Wed, Aug 24, 2011 at 6:50 PM, Andrew Pennebaker <
andrew.penneba...@gmail.com> wrote:

> Is there a word more general than firstn? I'd like to push all the elements
> of a sequence onto the stack.
>
>
> Cheers,
>
> Andrew Pennebaker
> www.yellosoft.us
>
> On Sun, Aug 21, 2011 at 2:26 PM, Alexander J. Vondrak <
> ajvond...@csupomona.edu> wrote:
>
>> first2: http://docs.factorcode.org/content/word-first2,sequences.html
>>
>> In general, firstn:
>> http://docs.factorcode.org/content/word-firstn,sequences.generalizations.html
>>
>> Regards,
>> --Alex Vondrak
>> 
>> From: Andrew Pennebaker [andrew.penneba...@gmail.com]
>> Sent: Sunday, August 21, 2011 11:20 AM
>> To: Factor
>> Subject: [Factor-talk] sequences and the stack
>>
>> The stack contains a sequence of number pairs:
>>
>> { { x1 y1 } { x2 y2 } { x3 y3 } ... }
>>
>> I want to map over the pairs, accessing xi and yi.
>>
>> [
>>   ! stack = { xi yi }
>>
>>   ! ...
>>
>>   ! stack = xi yi
>> ] map
>>
>> What's the code that goes in !... ?
>>
>> Other than using nth, how can I do this? Is there a word that pops the
>> elements of a sequence onto the stack?
>>
>> Cheers,
>>
>> Andrew Pennebaker
>> www.yellosoft.us
>>
>>
>> --
>> Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
>> user administration capabilities and model configuration. Take
>> the hassle out of deploying and managing Subversion and the
>> tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
>> ___
>> Factor-talk mailing list
>> Factor-talk@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/factor-talk
>>
>
>
>
> --
> EMC VNX: the world's simplest storage, starting under $10K
> The only unified storage solution that offers unified management
> Up to 160% more powerful than alternatives and 25% more efficient.
> Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
> ___
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>
--
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] sequences and the stack

2011-08-24 Thread Andrew Pennebaker
Is there a word more general than firstn? I'd like to push all the elements
of a sequence onto the stack.

Cheers,

Andrew Pennebaker
www.yellosoft.us

On Sun, Aug 21, 2011 at 2:26 PM, Alexander J. Vondrak <
ajvond...@csupomona.edu> wrote:

> first2: http://docs.factorcode.org/content/word-first2,sequences.html
>
> In general, firstn:
> http://docs.factorcode.org/content/word-firstn,sequences.generalizations.html
>
> Regards,
> --Alex Vondrak
> 
> From: Andrew Pennebaker [andrew.penneba...@gmail.com]
> Sent: Sunday, August 21, 2011 11:20 AM
> To: Factor
> Subject: [Factor-talk] sequences and the stack
>
> The stack contains a sequence of number pairs:
>
> { { x1 y1 } { x2 y2 } { x3 y3 } ... }
>
> I want to map over the pairs, accessing xi and yi.
>
> [
>   ! stack = { xi yi }
>
>   ! ...
>
>   ! stack = xi yi
> ] map
>
> What's the code that goes in !... ?
>
> Other than using nth, how can I do this? Is there a word that pops the
> elements of a sequence onto the stack?
>
> Cheers,
>
> Andrew Pennebaker
> www.yellosoft.us
>
>
> --
> Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
> user administration capabilities and model configuration. Take
> the hassle out of deploying and managing Subversion and the
> tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
> ___
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
--
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] No word named “--” found in current vocabulary search path

2011-08-24 Thread Andrew Pennebaker
Thanks. I see the type hint syntax is close to Haskell's. Excellent!

Cheers,

Andrew Pennebaker
www.yellosoft.us

On Wed, Aug 24, 2011 at 6:36 PM, Joe Groff  wrote:

>
> On Aug 24, 2011, at 3:16 PM, Slava Pestov wrote:
>
> Hi Andrew,
>
> You're using the old convention (from handbook.pdf? :-) ) Please
> review recent docs:
>
> http://docs.factorcode.org/content/article-inference.html
> http://docs.factorcode.org/content/article-effects.html
>
>
> Even I'm having trouble finding a straightforward answer to this in those
> docs. More to the point, the modern syntax for higher-order stack effects is
> ( name: ( nested -- effect ) -- ). For example:
>
> : foo ( a b quot: ( a b -- c d e ) -- c d e )
> call ;
> : bar ( a b quot1: ( a b -- c d e ) quot2: ( c d e -- f ) -- f )
>  [ call ] bi@ ;
>
>
> -Joe
>
>
> --
> EMC VNX: the world's simplest storage, starting under $10K
> The only unified storage solution that offers unified management
> Up to 160% more powerful than alternatives and 25% more efficient.
> Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
> ___
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>
--
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] pull request

2011-08-24 Thread John Benediktsson
Thanks, merged.

On Wed, Aug 24, 2011 at 3:48 PM, Jon Harper  wrote:

> jon@zephyr:~/factor$ git request-pull -p origin/master
> g...@github.com:jonenst/factor.git master
> The following changes since commit
> 45df73a0caebb4ff3b93c6f6d3bf9b2a78028ce7:
>
>  fjsc: display the proper namespace when using set_in. (2011-08-24
> 15:20:51 -0700)
>
> are available in the git repository at:
>  g...@github.com:jonenst/factor.git master
>
> Jon Harper (1):
>  sequences, fix stack effect of (accumulate)
>
>  core/sequences/sequences.factor |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/core/sequences/sequences.factor
> b/core/sequences/sequences.factor
> index 493365d..6ac1ffc 100644
> --- a/core/sequences/sequences.factor
> +++ b/core/sequences/sequences.factor
> @@ -403,7 +403,7 @@ PRIVATE>
> [ 2drop f f ]
> if ; inline
>
> -: (accumulate) ( seq identity quot -- seq identity quot )
> +: (accumulate) ( seq identity quot -- identity seq quot )
> [ swap ] dip [ curry keep ] curry ; inline
>
>  PRIVATE>
>
>
> --
> EMC VNX: the world's simplest storage, starting under $10K
> The only unified storage solution that offers unified management
> Up to 160% more powerful than alternatives and 25% more efficient.
> Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
> ___
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
--
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


[Factor-talk] pull request

2011-08-24 Thread Jon Harper
jon@zephyr:~/factor$ git request-pull -p origin/master
g...@github.com:jonenst/factor.git master
The following changes since commit 45df73a0caebb4ff3b93c6f6d3bf9b2a78028ce7:

  fjsc: display the proper namespace when using set_in. (2011-08-24
15:20:51 -0700)

are available in the git repository at:
  g...@github.com:jonenst/factor.git master

Jon Harper (1):
  sequences, fix stack effect of (accumulate)

 core/sequences/sequences.factor |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/core/sequences/sequences.factor b/core/sequences/sequences.factor
index 493365d..6ac1ffc 100644
--- a/core/sequences/sequences.factor
+++ b/core/sequences/sequences.factor
@@ -403,7 +403,7 @@ PRIVATE>
 [ 2drop f f ]
 if ; inline

-: (accumulate) ( seq identity quot -- seq identity quot )
+: (accumulate) ( seq identity quot -- identity seq quot )
 [ swap ] dip [ curry keep ] curry ; inline

 PRIVATE>

--
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] No word named “--” found in current vocabulary search path

2011-08-24 Thread Joe Groff

On Aug 24, 2011, at 3:16 PM, Slava Pestov wrote:

> Hi Andrew,
> 
> You're using the old convention (from handbook.pdf? :-) ) Please
> review recent docs:
> 
> http://docs.factorcode.org/content/article-inference.html
> http://docs.factorcode.org/content/article-effects.html

Even I'm having trouble finding a straightforward answer to this in those docs. 
More to the point, the modern syntax for higher-order stack effects is ( name: 
( nested -- effect ) -- ). For example:

: foo ( a b quot: ( a b -- c d e ) -- c d e )
call ;
: bar ( a b quot1: ( a b -- c d e ) quot2: ( c d e -- f ) -- f )
[ call ] bi@ ;


-Joe

smime.p7s
Description: S/MIME cryptographic signature
--
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] No word named “--” found in current vocabulary search path

2011-08-24 Thread Slava Pestov
Hi Andrew,

You're using the old convention (from handbook.pdf? :-) ) Please
review recent docs:

http://docs.factorcode.org/content/article-inference.html
http://docs.factorcode.org/content/article-effects.html

Slava

On Wed, Aug 24, 2011 at 3:02 PM, Andrew Pennebaker
 wrote:
> I'm porting the QuickCheck unit test framework to Factor. The idea is to
> test properties (quotations) against test values.
> For example, to test whether all integers have the property even:
> [ even? ] { gen-integer } for-all
> The property is a quotation because isn't evaluated directly but passed
> values from gen-integer.
> for-all will test properties with different types and numbers of arguments,
> that's why gen-integer is inside a sequence.
> So for-all's type hint should be something like
> : for-all ( quot seq -- ? )
>    ! ...
>    ;
> And gen-integer's type hint would be something like
> : gen-integer ( -- quot | quot: -- n )
>    ! ...
>    ;
> I'm getting an error, though. Factor doesn't like my type hint for
> gen-integer.
> $ ./example.factor
> Loading /Users/andrew/.factor-rc
> ./example.factor
> 3: INCLUDING: factcheck ;
>                        ^
> factcheck.factor
> 5: : gen-integer ( -- quot | quot: -- n ) [ random-32 ] ;
>                                      ^
> No word named “--” found in current vocabulary search path
> In factcheck.factor:
> ! A quotation generating a random integer.
> : gen-integer ( -- quot | quot: -- n ) [ random-32 ] ;
> In example.factor:
> #! /usr/bin/env factor
> INCLUDING: factcheck ;
> USING: math prettyprint ;
> IN: example
> : main ( -- )
>     gen-integer apply .
> Am I not using the pipe (|) correctly in the type hint?
> Cheers,
> Andrew Pennebaker
> www.yellosoft.us
> --
> EMC VNX: the world's simplest storage, starting under $10K
> The only unified storage solution that offers unified management
> Up to 160% more powerful than alternatives and 25% more efficient.
> Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
> ___
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>

--
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


[Factor-talk] No word named “--” found in current vocabulary search path

2011-08-24 Thread Andrew Pennebaker
I'm porting the QuickCheck unit test framework to Factor. The idea is to
test properties (quotations) against test values.

For example, to test whether all integers have the property even:

[ even? ] { gen-integer } for-all

The property is a quotation because isn't evaluated directly but passed
values from gen-integer.

for-all will test properties with different types and numbers of arguments,
that's why gen-integer is inside a sequence.

So for-all's type hint should be something like

: for-all ( quot seq -- ? )
   ! ...
   ;

And gen-integer's type hint would be something like

: gen-integer ( -- quot | quot: -- n )
   ! ...
   ;

I'm getting an error, though. Factor doesn't like my type hint for
gen-integer.

$ ./example.factor
Loading /Users/andrew/.factor-rc
./example.factor

3: INCLUDING: factcheck ;
   ^
factcheck.factor

5: : gen-integer ( -- quot | quot: -- n ) [ random-32 ] ;
 ^
No word named “--” found in current vocabulary search path

In 
factcheck.factor
:

! A quotation generating a random integer.
: gen-integer ( -- quot | quot: -- n ) [ random-32 ] ;

In 
example.factor
:

#! /usr/bin/env factor

INCLUDING: factcheck ;
USING: math prettyprint ;
IN: example

: main ( -- )
gen-integer apply .

Am I not using the pipe (|) correctly in the type hint?

Cheers,

Andrew Pennebaker
www.yellosoft.us
--
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] TryRuby, etc.

2011-08-24 Thread John Benediktsson
This "Factor Playground" provides some basics on how Factor works, although
I believe its a clone in Javascript (so it isn't making calls into a true
Factor process).

http://personal.inet.fi/koti/egaga/jsfactor/playground.html


On Wed, Aug 24, 2011 at 1:19 PM, Michael Clagett wrote:

>  Yes I guess it is.  Probably better to use on-line documentation for more
> up-to-date info.  Still, I found this a pretty useful read on the train.
> Much of what's here, though, is in the Reference section of the on-line
> docs.
>
> > Date: Wed, 24 Aug 2011 13:03:11 -0700
> > From: sl...@factorcode.org
>
> > To: factor-talk@lists.sourceforge.net
> > Subject: Re: [Factor-talk] TryRuby, etc.
> >
> > I can't load that link right now, but IIRC this is just the old Factor
> > 0.72 docs in PDF format.
> >
> > On Wed, Aug 24, 2011 at 1:00 PM, Andrew Pennebaker
> >  wrote:
> > > "Note that this handbook is not a tutorial..."
> > > --Forward to the Factor Developer's Handbook
> > >
> > > It's still a valuable resource. Thanks.
> > > Cheers,
> > > Andrew Pennebaker
> > > www.yellosoft.us
> > >
> > >
> > > On Tue, Aug 23, 2011 at 11:15 PM, Michael Clagett <
> mclag...@hotmail.com>
> > > wrote:
> > >>
> > >> Hi Andrew --
> > >>
> > >> Not a video tutorial, but I found this useful:
> > >> http://www.bluishcoder.co.nz/handbook.pdf
> > >>
> > >> Regards,
> > >>
> > >> Mike
> > >>
> > >> 
> > >> From: andrew.penneba...@gmail.com
> > >> Date: Tue, 23 Aug 2011 20:25:58 -0400
> > >> To: factor-talk@lists.sourceforge.net
> > >> Subject: [Factor-talk] TryRuby, etc.
> > >>
> > >> Has anyone made an interactive online tutorial for Factor comparable
> to
> > >> TryRuby?
> > >>
> > >> Cheers,
> > >> Andrew Pennebaker
> > >> www.yellosoft.us
> > >>
> > >>
> --
> > >> EMC VNX: the world's simplest storage, starting under $10K The only
> unified
> > >> storage solution that offers unified management Up to 160% more
> powerful
> > >> than alternatives and 25% more efficient. Guaranteed.
> > >> http://p.sf.net/sfu/emc-vnx-dev2dev
> > >> ___ Factor-talk mailing
> list
> > >> Factor-talk@lists.sourceforge.net
> > >> https://lists.sourceforge.net/lists/listinfo/factor-talk
> > >>
> > >>
> --
> > >> EMC VNX: the world's simplest storage, starting under $10K
> > >> The only unified storage solution that offers unified management
> > >> Up to 160% more powerful than alternatives and 25% more efficient.
> > >> Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
> > >> ___
> > >> Factor-talk mailing list
> > >> Factor-talk@lists.sourceforge.net
> > >> https://lists.sourceforge.net/lists/listinfo/factor-talk
> > >>
> > >
> > >
> > >
> --
> > > EMC VNX: the world's simplest storage, starting under $10K
> > > The only unified storage solution that offers unified management
> > > Up to 160% more powerful than alternatives and 25% more efficient.
> > > Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
> > > ___
> > > Factor-talk mailing list
> > > Factor-talk@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/factor-talk
> > >
> > >
> >
> >
> --
> > EMC VNX: the world's simplest storage, starting under $10K
> > The only unified storage solution that offers unified management
> > Up to 160% more powerful than alternatives and 25% more efficient.
> > Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
> > ___
> > Factor-talk mailing list
> > Factor-talk@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>
> --
> EMC VNX: the world's simplest storage, starting under $10K
> The only unified storage solution that offers unified management
> Up to 160% more powerful than alternatives and 25% more efficient.
> Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
> ___
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>
--
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] TryRuby, etc.

2011-08-24 Thread Michael Clagett

Yes I guess it is.  Probably better to use on-line documentation for more 
up-to-date info.  Still, I found this a pretty useful read on the train.  Much 
of what's here, though, is in the Reference section of the on-line docs.

> Date: Wed, 24 Aug 2011 13:03:11 -0700
> From: sl...@factorcode.org
> To: factor-talk@lists.sourceforge.net
> Subject: Re: [Factor-talk] TryRuby, etc.
> 
> I can't load that link right now, but IIRC this is just the old Factor
> 0.72 docs in PDF format.
> 
> On Wed, Aug 24, 2011 at 1:00 PM, Andrew Pennebaker
>  wrote:
> > "Note that this handbook is not a tutorial..."
> > --Forward to the Factor Developer's Handbook
> >
> > It's still a valuable resource. Thanks.
> > Cheers,
> > Andrew Pennebaker
> > www.yellosoft.us
> >
> >
> > On Tue, Aug 23, 2011 at 11:15 PM, Michael Clagett 
> > wrote:
> >>
> >> Hi Andrew --
> >>
> >> Not a video tutorial, but I found this useful:
> >> http://www.bluishcoder.co.nz/handbook.pdf
> >>
> >> Regards,
> >>
> >> Mike
> >>
> >> 
> >> From: andrew.penneba...@gmail.com
> >> Date: Tue, 23 Aug 2011 20:25:58 -0400
> >> To: factor-talk@lists.sourceforge.net
> >> Subject: [Factor-talk] TryRuby, etc.
> >>
> >> Has anyone made an interactive online tutorial for Factor comparable to
> >> TryRuby?
> >>
> >> Cheers,
> >> Andrew Pennebaker
> >> www.yellosoft.us
> >>
> >> --
> >> EMC VNX: the world's simplest storage, starting under $10K The only unified
> >> storage solution that offers unified management Up to 160% more powerful
> >> than alternatives and 25% more efficient. Guaranteed.
> >> http://p.sf.net/sfu/emc-vnx-dev2dev
> >> ___ Factor-talk mailing list
> >> Factor-talk@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/factor-talk
> >>
> >> --
> >> EMC VNX: the world's simplest storage, starting under $10K
> >> The only unified storage solution that offers unified management
> >> Up to 160% more powerful than alternatives and 25% more efficient.
> >> Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
> >> ___
> >> Factor-talk mailing list
> >> Factor-talk@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/factor-talk
> >>
> >
> >
> > --
> > EMC VNX: the world's simplest storage, starting under $10K
> > The only unified storage solution that offers unified management
> > Up to 160% more powerful than alternatives and 25% more efficient.
> > Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
> > ___
> > Factor-talk mailing list
> > Factor-talk@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/factor-talk
> >
> >
> 
> --
> EMC VNX: the world's simplest storage, starting under $10K
> The only unified storage solution that offers unified management 
> Up to 160% more powerful than alternatives and 25% more efficient. 
> Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
> ___
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
  --
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] TryRuby, etc.

2011-08-24 Thread Andrew Pennebaker
http://factor.bluishcoder.co.nz/responder/fjsc is down :(

Cheers,

Andrew Pennebaker
www.yellosoft.us

On Tue, Aug 23, 2011 at 11:29 PM, Chris Double wrote:

> On Wed, Aug 24, 2011 at 12:25 PM, Andrew Pennebaker
>  wrote:
> > Has anyone made an interactive online tutorial for Factor comparable to
> > TryRuby?
>
> I used to run an Factor to JavaScript instance online. I think the
> code 'fjsc' still in the repository. Blog posts about it here:
>
> http://www.bluishcoder.co.nz/2006/12/12/compiling-factor-to-javascript.html
>
> http://www.bluishcoder.co.nz/2006/12/17/factor-to-javascript-compiler-updates.html
> http://www.bluishcoder.co.nz/2006/12/18/continuations-added-to-fjsc.html
> http://www.bluishcoder.co.nz/2006/12/18/cross-domain-json-with-fjsc.html
>
> --
> http://www.bluishcoder.co.nz
>
>
> --
> EMC VNX: the world's simplest storage, starting under $10K
> The only unified storage solution that offers unified management
> Up to 160% more powerful than alternatives and 25% more efficient.
> Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
> ___
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
--
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] TryRuby, etc.

2011-08-24 Thread Slava Pestov
I can't load that link right now, but IIRC this is just the old Factor
0.72 docs in PDF format.

On Wed, Aug 24, 2011 at 1:00 PM, Andrew Pennebaker
 wrote:
> "Note that this handbook is not a tutorial..."
> --Forward to the Factor Developer's Handbook
>
> It's still a valuable resource. Thanks.
> Cheers,
> Andrew Pennebaker
> www.yellosoft.us
>
>
> On Tue, Aug 23, 2011 at 11:15 PM, Michael Clagett 
> wrote:
>>
>> Hi Andrew --
>>
>> Not a video tutorial, but I found this useful:
>> http://www.bluishcoder.co.nz/handbook.pdf
>>
>> Regards,
>>
>> Mike
>>
>> 
>> From: andrew.penneba...@gmail.com
>> Date: Tue, 23 Aug 2011 20:25:58 -0400
>> To: factor-talk@lists.sourceforge.net
>> Subject: [Factor-talk] TryRuby, etc.
>>
>> Has anyone made an interactive online tutorial for Factor comparable to
>> TryRuby?
>>
>> Cheers,
>> Andrew Pennebaker
>> www.yellosoft.us
>>
>> --
>> EMC VNX: the world's simplest storage, starting under $10K The only unified
>> storage solution that offers unified management Up to 160% more powerful
>> than alternatives and 25% more efficient. Guaranteed.
>> http://p.sf.net/sfu/emc-vnx-dev2dev
>> ___ Factor-talk mailing list
>> Factor-talk@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/factor-talk
>>
>> --
>> EMC VNX: the world's simplest storage, starting under $10K
>> The only unified storage solution that offers unified management
>> Up to 160% more powerful than alternatives and 25% more efficient.
>> Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
>> ___
>> Factor-talk mailing list
>> Factor-talk@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/factor-talk
>>
>
>
> --
> EMC VNX: the world's simplest storage, starting under $10K
> The only unified storage solution that offers unified management
> Up to 160% more powerful than alternatives and 25% more efficient.
> Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
> ___
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>

--
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] TryRuby, etc.

2011-08-24 Thread Andrew Pennebaker
"Note that this handbook is not a tutorial..."

--Forward to the Factor Developer's Handbook

It's still a valuable resource. Thanks.

Cheers,

Andrew Pennebaker
www.yellosoft.us



On Tue, Aug 23, 2011 at 11:15 PM, Michael Clagett wrote:

>  Hi Andrew --
>
> Not a video tutorial, but I found this useful:
> http://www.bluishcoder.co.nz/handbook.pdf
>
> Regards,
>
> Mike
>
>  --
> From: andrew.penneba...@gmail.com
> Date: Tue, 23 Aug 2011 20:25:58 -0400
> To: factor-talk@lists.sourceforge.net
> Subject: [Factor-talk] TryRuby, etc.
>
>
> Has anyone made an interactive online tutorial for Factor comparable to
> TryRuby ?
>
> Cheers,
>
> Andrew Pennebaker
> www.yellosoft.us
>
> --
> EMC VNX: the world's simplest storage, starting under $10K The only unified
> storage solution that offers unified management Up to 160% more powerful
> than alternatives and 25% more efficient. Guaranteed.
> http://p.sf.net/sfu/emc-vnx-dev2dev
> ___ Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>
> --
> EMC VNX: the world's simplest storage, starting under $10K
> The only unified storage solution that offers unified management
> Up to 160% more powerful than alternatives and 25% more efficient.
> Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
> ___
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>
--
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk