Re: [Factor-talk] Factor scripts - just leaking?

2014-02-11 Thread CW Alston
Jumpin' Jehoshaphat! John - your "with-directory" suggestion *does* work, with a full path to the pdf, no need to copy/move the files - IN: scratchpad "/Users/cwalston/factor/mine/scans/herbal_scans_to_files/14_substances_that_calm_the_spirit/1_substances_that_settle_and_calm_the_spirit/1_long_gu/

Re: [Factor-talk] Factor scripts - just leaking?

2014-02-11 Thread CW Alston
A curiosity & a breakthrough - I discover that simply calling the Factor executable in the terminal (on my system) provokes the "just leaking" warnings, but after that, Factor seems to run just fine - ➜ ~ git:(master) ✗ factor 2014-02-11 15:25:49.753 factor[3468:903] *** __NSAutoreleaseNoPool():

Re: [Factor-talk] Factor scripts - just leaking?

2014-02-11 Thread CW Alston
I'm running 10.6.8 (Snow Leopard) on a vintage 32-bit MacBook Pro. On Tue, Feb 11, 2014 at 8:25 AM, John Benediktsson wrote: > I don't get those warnings on 10.9.1, which Mac OS X version are you > running? > > > On Tue, Feb 11, 2014 at 2:17 AM, CW Alston wrote: > >> Hi- >> I'm experimenting w

Re: [Factor-talk] Factor scripts - just leaking?

2014-02-11 Thread John Benediktsson
I don't get those warnings on 10.9.1, which Mac OS X version are you running? On Tue, Feb 11, 2014 at 2:17 AM, CW Alston wrote: > Hi- > I'm experimenting with writing/running executable Factor scripts. > A simple script in a file titled "hello" - > > #! /Applications/factor/factor -script > USI

[Factor-talk] Factor scripts - just leaking?

2014-02-11 Thread CW Alston
Hi- I'm experimenting with writing/running executable Factor scripts. A simple script in a file titled "hello" - #! /Applications/factor/factor -script USING: io ; "hello world" print -does its thing in the terminal, but on the way echos "just leaking", thus: ➜ ~ git:(master) ✗ factor "/Users/c

Re: [Factor-talk] factor scripts

2011-05-10 Thread John Benediktsson
When run like that, Factor expects the "script" to not leave anything on the stack. In your case, your script has stack effect of ( -- x ), where x is "4". Try making it print the number out: $ cat x USING: kernel math prettyprint ; 2 2 + . $ factor x 4 On Tue, May 10, 2011 at 10:33 AM, Kartik

Re: [Factor-talk] factor scripts

2011-05-10 Thread Kartik Agaram
> This reads the file and runs that. This never has vocabs automatically > USE:'d. You'll need to add USE: or USING: definitions for the vocabs > that words in the file use. In this case, USE: math for the '+' word. Ah, thanks. I tried the following: $ cat x USING: kernel math ; 2 2 + $ ./facto

Re: [Factor-talk] factor scripts

2011-05-10 Thread Chris Double
On Tue, May 10, 2011 at 9:19 PM, Kartik Agaram wrote: > $ echo "2 2 +" |./factor This runs the code piped to the listener, which has a number of vocabularies automatically USE:'d. > $ echo "2 2 +" > x; ./factor x This reads the file and runs that. This never has vocabs automatically USE:'d. You

[Factor-talk] factor scripts

2011-05-10 Thread Kartik Agaram
This works: $ echo "2 2 +" |./factor ( scratchpad ) --- Data stack: 4 But this doesn't: $ echo "2 2 +" > x; ./factor x 1: 2 2 + ^ No word named “+” found in current vocabulary search path What am I doing wrong? Kartik http://akkartik.name --