Re: [Factor-talk] mongodb on Windows

2010-01-16 Thread Sascha Matzke
Hi,

The mongodb doesn't load on Windows because it references the time_t
> word in the unix vocab, which is not defined on Windows. It should not
> be using the unix vocab at all, in fact. Could you change it to define
> your own time_t perhaps?
>

I looked really hard, but couldn't find any usage of time_t in mongodb or
bson.

I found and removed a usage of "unix" in furnace.mongodb - but I'm not sure
if that's what you've meant.
( g...@github.com:x6j8x/factor.git branch: mongodb-changes).

Sascha
-- 
Through the darkness of future past
the magician longs to see
One chants out between two worlds
Fire walk with me.
--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] mongodb on Windows

2010-01-16 Thread Slava Pestov
On Sat, Jan 16, 2010 at 11:47 PM, Sascha Matzke
 wrote:
> I looked really hard, but couldn't find any usage of time_t in mongodb or
> bson.
> I found and removed a usage of "unix" in furnace.mongodb - but I'm not sure
> if that's what you've meant.

Thanks for the fix, I've pulled your changes.

> ( ...@github.com:x6j8x/factor.git branch: mongodb-changes).

FWIW, 'git://github.com/x6j8x/factor.git mongodb-changes' is even
easier because then I just copy and paste :-)

Slava

--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] Not getting MACRO:

2010-01-16 Thread Jim mack
Got it working, thanks.

2010/1/15 Philipp Brüschweiler 

> Am Thu, 14 Jan 2010 23:17:04 -0800
> schrieb Jim mack :
> > Hi.  Can you please help me understand why the final line here
> > results in a stack underflow?
> >
> > USING: accessors arrays kernel locals present select8.html
> > classes.tuple sequences prettyprint fry macros nested-comments
> > combinators ;
> >
> > TUPLE: testing id firstname lastname age ;
> > :  ( id fn ln age -- tpl ) testing boa ;
> > : testdata ( -- tpl ) 1 "jim" "mack" 46  ;
> > : testing-schema ( -- seq )
> > {   { "First Name " [ firstname>> ] }
> > { "Last Name " [ lastname>> ] }
> > { "Age " [ age>> ] } } ;
> >
> > : non-macro-way ( tpl -- )
> > {
> > [ "First Name " write  firstname>> print ]
> > [ "Last Name " write lastname>> print ]
> > [ "Age " write  age>> present print ]
> > } cleave ;
> >
> > testdata non-macro-way
> >
> > ! using fry
> >
> > testdata { } clone
> >  testing-schema [ first2 '[ _ write  @ present print ] suffix ] each
> >   cleave
> >
> > MACRO: easier ( alist -- ) { } clone swap
> > [ first2 '[ _ write  @ present print ] suffix ] each cleave ;
> >
> > : fancyprint ( tpl -- )
> > testing-schema easier  ; inline
> >
> > testdata fancyprint   ! stack underflow
>
> Hi Jim
>
> If I understand you correctly, your intent is that fancyprint will be
> the same as non-macro-way, just with dynamically generated code. If so,
> your problem is that you don't generate a quotation as output of the
> macro, specifically the call to cleave gets executed at parse time.
>
> Here's a correct version (with { } clone swap [ .. suffix ] each
> simplified to map):
>
> MACRO: easier ( alist -- )
>[ first2 '[ _ write  @ present print ] ] map '[ _ cleave ] ;
>
> For fancyprint to work, you have to declare testing-schema inline, make
> a CONSTANT: out of it or directly write the alist into fancyprint.
>
> Cheers
>
>
> --
> Throughout its 18-year history, RSA Conference consistently attracts the
> world's best and brightest in the field, creating opportunities for
> Conference
> attendees to learn about information security's most important issues
> through
> interactions with peers, luminaries and emerging and established companies.
> http://p.sf.net/sfu/rsaconf-dev2dev
> ___
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>



-- 
Jim
"I'm for extending the working Medicare program for our seniors all the way
back to contraception, so Americans can concentrate on living their lives
without fear of changing a job, going bankrupt from deductibles or fighting
HMO bureaucracy."
--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


[Factor-talk] Newbie question on customizing gadgets

2010-01-16 Thread Matt Gushee
Hello, folks--

First post, sort of (I made an attempt to learn Factor early last year,
and didn't get very far, but now I'm trying again--maybe this time I'll
reach "escape velocity").

As a learning exercise (and maybe an excuse to have a game on my laptop,
which thus far has been free of such distractions ;-) I am trying to
implement the classic Minesweeper game. So, for each cell in the grid, I
need a gadget with the following characteristics:

 * At least 2 visual states, clicked and un-clicked, typically shown
 with a raised or flat appearance

 * Left-click and right-click event handlers

 * The ability to display an icon or a character, and to change the icon
 at runtime

It doesn't appear that there is any existing gadget that has all these
characteristics, and I'm not sure what would be the best one to
customize, but in other GUI toolkits I've worked with, button widgets
work pretty well for this kind of thing, so I thought I would start by
taking the border-button gadget and giving it a raised appearance. I
created 3 TIFF images the same sizes as those used by the plain tile pen
of the button pen of the border-button gadget. Then I created a new
tile-pen using those images and new BG and FG colors, and assigned them
to the plain slot of the button-pen.

The result does indeed look different from the default, but it also
looks different from what I expected, and quite ugly. I thought I would
keep looking through the docs for an answer, but I'm just getting lost.
I can post my code if people want to see it, but I think the real
problem is not really a programming error, but rather that I don't
understand how the various images and colors are used in constructing
the button.

So can someone explain how border-buttons are rendered (noting that,
while I am reasonably familiar with 2D graphics terminology, I do *not*
understand OpenGL [I've tried to learn it, failed, maybe try again
someday, but not today, please])? Or perhaps provide a working example
of gadget customization?

Thanks for any & all info!

-- 
Matt Gushee
m...@gushee.net

--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk