Hi John - my $PATH starts off with that in .zshrc (z-shell):

export
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/cwalston/factor:..

and was set up like that ever since I started out with Factor. Elie's
suggestion implies
that process commands require an explicit absolute path, and that
substitution does
solve the problem nicely. Am I missing a shortcut, that would obviate the
need for
an absolute path? Anyone else tripped over this?

I'm particularly interested, because I'm trying to reference Factor as an
attachment in
a distributed couchDB application - an 'embedded' scripting language
document, callable
via processes or executable images over, e.g., HTTP. For instance, I have a
word for
triggering replication which times out over anything but a fast network
connection:

: localhost>cloudant ( -- assoc ) *! CLOUDANT ON 1.0.2 DOESN'T WORK, USE
curl*
    H{
         { "source" "http://username:password@localhost:5984/tcm-herbarium";
}
         { "target" "http://username:password@
cloudant.com:5984/tcm-herbarium" }
     } <json-post-data> "http://localhost:5984/_replicate"; couch-post* ;

But I can always succeed with replication via curl in the terminal:

*! replicate local database to cloudant:*
*!* curl http://localhost:5984/_replicate -H
'Content-Type:application/json' -d '{ "source":"
http://username:password@127.0.0.1:5984/tcm-herbarium","target":";
http://username:passw...@cwalston.cloudant.com/tcm-herbarium"; }'

So a workable format for wrapping this in a process command would be a boon.
Anywho, let me know if I'm missing something about launching processes, or
other comments,and
thanks much,
~cw

On Wed, Mar 6, 2013 at 4:04 PM, John Benediktsson <mrj...@gmail.com> wrote:

> You might want to add /usr/local/bin to your $PATH, which would also fix
> it I suspect?
>
>
> On Wed, Mar 6, 2013 at 3:38 PM, CW Alston <cwalsto...@gmail.com> wrote:
>
>> Greetings all -
>>
>>
>> I finally tracked down a confusing glitch affecting my
>>
>> integrated Textmate editor functions (I'm running a
>>
>> recent .95 build). The problem: entering, e.g.,
>>
>>      \ see edit
>>
>> (or any word) in the listener always failed thus --
>>
>> =====
>>
>> Process exited with error code 255
>>
>>
>> Launch descriptor:
>>
>>
>> T{ process
>>
>>     { command
>>
>>         {
>>
>>             "mate"
>>
>>             "-a"
>>
>>             "-l"
>>
>>             "20"
>>
>>             "/Users/cwalston/factor/basis/see/see.factor"
>>
>>         }
>>
>>     }
>>
>>     { detached t }
>>
>>     { environment H{ } }
>>
>>     { environment-mode +append-environment+ }
>>
>>     { group +same-group+ }
>>
>>     { status 255 }
>>
>> }
>>
>> =====
>>
>> The fix: I came across this quote in a 2007 blog by Eli 
>> Chaftari<http://www.google.com/url?sa=t&rct=j&q=Getting+Started+with+Factor+-+Easy+FFI&source=web&cd=1&ved=0CDIQFjAA&url=http%3A%2F%2Ffun-factor.blogspot.com%2F2007%2F10%2Fgetting-started-with-factor-easy-ffi.html&ei=dM83UY3xEcmf2QWL8IDwAw&usg=AFQjCNHkweS0gwyTcl6PsNKqTJ5yJ73saw&sig2=BES6jIT1tpWLlmP3snoOHw&bvm=bv.43287494,d.b2I>--
>>
>>
>> "You can at any point edit a specific word inside Factor with
>>
>> \ word edit. This will pop-up the file containing that word in
>>
>> TextMate with the edit cursor positioned at the beginning of the
>>
>> line where the word is defined. You need to modify line 7 in
>>
>> extra/editors/textmate/textmate.factor replacing "mate -a -l "
>>
>> with whatever the which mate command gives you as a location
>>
>> in your terminal (e.g. "/usr/bin/mate -a -l "), for this to work
>>
>> in Factor version 0.9 (it has been corrected in the upcoming
>>
>> version)."
>>
>>
>> I took a look at textmate.factor (which is now in basis/editors/textmate)
>>
>> and saw that the editor-command method still reads:
>>
>>
>> M: textmate editor-command ( file line -- command )
>>
>>      [ "mate" , "-a" , "-l" , number>string , , ] { } make ;
>>
>>
>>
>> Replacing "mate" with "/usr/local/bin/mate" (output from *which mate* in
>>
>> my terminal),
>>
>>       [ "/usr/local/bin/mate" , "-a" , "-l" , number>string , , ] { }
>> make
>>
>> & reloading as Eli had suggested, did indeed resolve the
>>
>> process failure in both the listener & the browser "resource:" files. Yay!
>>
>> Haven't checked the process command in other editors or elsewhere
>>
>> involving launcher commands, but that's probably a good idea.
>>
>>
>> Perhaps this omission is specific to my particular build:
>>
>>
>> git clone https://github.com/slavapestov/factor.git && cd factor &&
>> ./build-support/factor.sh update
>>
>> (can't bring up a .dmg on my 32-bit system), but it would be good to
>> check out.
>>
>> Cheers! ~cw
>>
>>
>> --
>> *~ Memento Amori*
>>
>> ------------------------------------------------------------------------------
>> Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester
>> Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the
>> endpoint security space. For insight on selecting the right partner to
>> tackle endpoint security challenges, access the full report.
>> http://p.sf.net/sfu/symantec-dev2dev
>> _______________________________________________
>> Factor-talk mailing list
>> Factor-talk@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/factor-talk
>>
>>
>


-- 
*~ Memento Amori*
------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to