Never-mind folks. Turned out to be a simple bug, my menu-items word did
not correctly return the items of the menu passed in.
Fixing that solved my issue :)
Thanks,
Sankar
On 10/21/16 12:16 AM, Sankaranarayanan Viswanathan wrote:
> Hi,
>
> I'm trying to use the models vocabulary in order to
Hi,
I'm trying to use the models vocabulary in order to implement keyboard
navigation on menus. I still have some work to do, but right now I have
something like this:
:: prepare-menu ( menu -- )
f :> model
menu menu-items :> items
items [ model add-connection ] each
model
On Mon, Oct 12, 2009 at 9:51 PM, Ed Swartz eswa...@austin.rr.com wrote:
Hi,
Is there any support currently, or a plan to support, vector words using
SIMD on alien arrays?
This is planned. The first step is to get the SIMD primitives worked
out, after that we can start writing higher-level
Hi,
Is there any support currently, or a plan to support, vector words using
SIMD on alien arrays? It seems there's currently only support for using
these words with explicitly register-sized vectors. When I hear of
SIMD, though, it's usually in the context of operating on large
datasets. It
On Sat, May 2, 2009 at 9:21 AM, Hugh Aguilar hugoagui...@rosycrew.com wrote:
My understanding is that the if function does the first combinator for
nonzero numbers and the second combinator for zero numbers.
The first combinator is run for true values and the second for false
values. Instead of
Here is a function that I wrote:
: ?sgn ( value negative-combinator zero-combinator positive-combinator -- )
roll! -- neg zer pos value
dup 0 [ drop 2nip call ] [
nip ! -- neg zer value
0 = [
The idiom for = is that the result is eventually consumed by a case.
For example:
: do-something ( n m -- )
= {
{ +lt+ [ Less ] }
{ +gt+ [ Greater ] }
{ +eq+ [ Equal ] }
} case print ;
With locals, you can implement this ?sgn combinator in terms of case as this:
Hi, all
I'm study C library interface, viewing cairo/ffi.factor, then I have a
question:
Is there a tool to convert *.h to ffi.factor, like :
cairo.h:
typedef struct _cairo_matrix {
double xx; double yx;
double xy; double yy;
double x0; double y0;
} cairo_matrix_t;
No, there's no tool like that. Such a tool would be a lot of work,
since it would involve implementing a C header parser and preprocessor
in the general case. This has been done in the SWIG project, I think,
but no one has done this for Factor's FFI. It looks like it'd be
possible to bind to SWIG
Thank you Daniel, I will try SWIG first.
Cheers
2009/3/5 Daniel Ehrenberg micro...@gmail.com
No, there's no tool like that. Such a tool would be a lot of work,
since it would involve implementing a C header parser and preprocessor
in the general case. This has been done in the SWIG project,
Slava,
: color ( iterations -- color )
[ color-map [ length mod ] keep nth ] [ B{ 0 0 0 } ] if* ; inline
Is the length of 'color-map' being computed each time 'color' is called?
In versions of the code that I was experimenting with, I factored out the
color selection part:
:
In vm/primitives.h, I read:
| We do the assignment of stack_chain-callstack_top in a ``noinline''
| function to inhibit assignment re-ordering.
stack_chain being global, in which case could an assignment
re-ordering occur? (the compiler doesn't know if it will be used in
subsequent functions, so
Hi,
I use a file profile.factor that looks like this:
REQUIRES: libs/httpd libs/furnace ;
USING: httpd threads ;
[ 8889 httpd ] in-thread
Then I run Factor as follows:
screen ./f factor.image profile.factor
Once screen starts, I detach it. Later on I can attach to the screen
and reload
13 matches
Mail list logo