On Monday 17 November 2008 20:54:42 Jose A. Ortega Ruiz wrote:
> Here's an initial attempt at proper indentation, according to my
> understanding of Ed's and Slava's guidelines. I haven't tested it
> thoroughly yet (it's getting a bit late here), so please play a bit with
> it if you have a little
I thought about it a bit, and I think it's possible to exploit the
dynamic namespace feature in order to solve this problem.
a word 'with-sandbox' takes a configuration and a quotation, and acts as
a proxy for the code in the quot.
for example, if the configuration has { path-limit { current-dir }
Hi,
When I try to run some factor code on the command line like this:
(example taken from ~/factor/build-support/factor.sh)
./factor -run=none -e='"x86.32" USE: bootstrap.image make-image save 0
USE: system exit'
1: "x86.32" USE: bootstrap.image make-image save 0 USE: system exit
Hi,
the 'save' word is in the system vocabulary, so put USE: system first,
before you call save.
On Tue, Nov 18, 2008 at 2:24 PM, Kio M. Smallwood <[EMAIL PROTECTED]> wrote:
> Hi,
>
> When I try to run some factor code on the command line like this:
> (example taken from ~/factor/build-support/fa
As a Factor newcomer, I'm having some difficulty figuring out how to express
myself idiomatically.
Here's an example, my first crack at a word to return the sum of a sequence
of numbers on the stack.
USING: kernel assocs namespaces math sequences prettyprint ;
IN: mayson
SYMBOL: mysum
: sequence
> Factor can tell you, try the following:
> \ sum see
>
> Which prints the following:
> USING: math ;
> IN: sequences
> : sum ( seq -- n ) 0 [ + ] binary-reduce ;
>
So the shortest solution is:
: sequence-sum ( seq -- sum ) sum ; inline
Which is pretty much pointless. If the 'sum' library word d
On Tue, Nov 18, 2008 at 4:41 PM, Mayson Lancaster <[EMAIL PROTECTED]> wrote:
> As a Factor newcomer, I'm having some difficulty figuring out how to express
> myself idiomatically.
> Here's an example, my first crack at a word to return the sum of a sequence
> of numbers on the stack.
> USING: kerne
On Tue, Nov 18, 2008 at 4:11 PM, Alex Chapman <[EMAIL PROTECTED]> wrote:
>
>> Factor can tell you, try the following:
>> \ sum see
>
> So the shortest solution is:
>
> : sequence-sum ( seq -- sum ) sum ; inline
>
> Which is pretty much pointless.
hehe, yes...
The lesson of course being that the l
On Tue, Nov 18, 2008 at 3:41 PM, Mayson Lancaster <[EMAIL PROTECTED]> wrote:
> As a Factor newcomer, I'm having some difficulty figuring out how to express
> myself idiomatically.
> ... snip ...
> Are there any reasonably Factorial ways to clean this up?
Factor can tell you, try the following:
\ s
Hi Mayson,
In this case it's not necessary to use a variable. Factor's stack is more
than sufficient for a problem like this. There's also a word that will help
you: reduce. Try \ reduce help in the listener and I think you'll find the
problem a lot easier.
If you were using a variable, then at s
Hi. The two patches below provide more font lock and indentation for
stanzas with constructors:
a >>bar
b >>qux
[if you write here a line without a >>setter,
TAB will align with ]
Alternatively, the continuation line of a setter/constructor could start
aligned with the constructor
On Tuesday 18 November 2008 19:09:43 Jose A. Ortega Ruiz wrote:
>
>a >>bar
>b >>qux
>[if you write here a line without a >>setter,
> TAB will align with ]
Wow... this is nice!
> Alternatively, the continuation line of a setter/constructor could start
> aligned with the construct
12 matches
Mail list logo