Hi John and Alexander,
Thanks for the very useful advice.
I prefer not to use DEFER: (pun intended), but if it turns out to be
the best solution I will.
Best regards,
Leon Konings
Quoting John Benediktsson mrj...@gmail.com:
Alex has good advice.
In addition, if you have a circularity
Hey guys,
I am playing around with factor again, and getting some useful work done.
I am trying to use factor embedded...
Unfortunately, the function init_factor_from_args that is mentioned in
the documentation is no longer in the source...
There is a new function: start_standalone_factor in
Also interested in this.
Sent from my iPhone
On Nov 30, 2012, at 3:25 PM, Naveen Garg naveen.g...@gmail.com wrote:
Hey guys,
I am playing around with factor again, and getting some useful work done.
I am trying to use factor embedded...
Unfortunately, the function init_factor_from_args
Any reason slices are not allowed to be passed to regexp words like
first-match ?
I tried modifiying the word:
: check-string ( string -- string )
! Make this configurable
! dup string? [ String required throw ] unless ;
dup dup string?
swap regexp? or [ String required throw ]
Oops, I had a typo, i was checking for regexp? instead of slice?
: check-string ( string -- string )
! Make this configurable
!dup string? [ String required throw ] unless ;
dup dup string?
swap slice? or [ String required throw ] unless ;
0 4 foo bar slice R/ foo/
Probably the restrictions to strings were a performance optimization...?
It should be pretty easy to get the behavior you want:
IN: scratchpad 0 4 foo slice R/ foo/ first-match .
T{ slice { from 0 } { to 3 } { seq foo } }
Using this diff makes it work, but causes the regexp benchmark
Awesome. Thanks John.
For my specific project, the current weaker link is memory usage compared
to speed.
On Fri, Nov 30, 2012 at 8:03 PM, John Benediktsson mrj...@gmail.com wrote:
Probably the restrictions to strings were a performance optimization...?
It should be pretty easy to get the