[Factor-talk] How to change font size in UI ?

2009-04-05 Thread Ludovic Kuty
Hello, I asked to this mailing list how to change the font size in the Factor UI and Slava told me to add two lines in the ~/.factor-rc file: USING: namespaces ui.freetype ; 100 dpi set-global Now the same lines make the Factor UI crash (looks like ui.freetype does not exist

Re: [Factor-talk] My first OpenGL program in Factor, need some help

2009-04-05 Thread Joe Groff
On Apr 5, 2009, at 3:31 AM, Jon Kleiser wrote: Hi, Thanks for your reply! - Make use of the arrow key events for rotation of the scene (pitch and yaw) You need to call define-gestures with an alist mapping keyboard gestures to quotations with effect ( gadget -- ). Grep around for

Re: [Factor-talk] My first OpenGL program in Factor, need some help

2009-04-05 Thread Jean-François Bigot
Hi I'am not sure my code is up to date but you can give a look at extra/ 4DNav. The word add-keyboard-delegate links keys to actions. Jeff Le 5 avr. 09 à 20:12, Joe Groff a écrit : On Apr 5, 2009, at 3:31 AM, Jon Kleiser wrote: Hi, Thanks for your reply! - Make use of the arrow key

Re: [Factor-talk] My first OpenGL program in Factor, need some help

2009-04-05 Thread Jon Kleiser
- Make use of the arrow key events for rotation of the scene (pitch and yaw) You need to call define-gestures with an alist mapping keyboard gestures to quotations with effect ( gadget -- ). Grep around for define-gestures, you'll find plenty of examples. Slava But that doesn't seem to

Re: [Factor-talk] My first OpenGL program in Factor, need some help

2009-04-05 Thread Joe Groff
I think I understand what you're saying, but in my pyramids.factor I've copied a whole lot of code from your spheres, incl. the use of the demo-gadget. However, I must have missed something that's needed for the arrow keys to work. If you haven't allready looked at my code, I'd be

[Factor-talk] Non sse2 build problems

2009-04-05 Thread Marko Kocić
Hi factor team, This is my first post to this list, so be gentle :) I am trying to build factor on my old (and only) athlon-xp laptop, which lack sse2 support. I tried it on both linux (gentoo) ant windows xp, each one with different problems. In both OSes I use latest gcc-4.3.3,

[Factor-talk] trying to get my head around writing (good?) Factor code

2009-04-05 Thread Kyle Cordes
I'm trying to get my head around writing (good?) Factor code. Could someone point me in the right direction on the snippet below? Even after a few rounds of cleanup, I haven't been able to make it very intention-revealing, mostly (maybe?) because of juggling three values on the stack. USING:

Re: [Factor-talk] trying to get my head around writing (good?) Factor code

2009-04-05 Thread Slava Pestov
Try using make and , instead of passing an accumulator around on the stack. Slava On Sun, Apr 5, 2009 at 4:21 PM, Kyle Cordes k...@kylecordes.com wrote: I'm trying to get my head around writing (good?) Factor code. Could someone point me in the right direction on the snippet below? Even after

Re: [Factor-talk] trying to get my head around writing (good?) Factor code

2009-04-05 Thread Daniel Ehrenberg
Kyle, Well, here's my attempt at solving the same problem. I use a different algorithm from you; I think mine should be more efficient. I don't think there's much shuffling in this version, though maybe the use of /mod inside map isn't perfectly intention-revealing. : change ( amount -- coins )

Re: [Factor-talk] trying to get my head around writing (good?) Factor code

2009-04-05 Thread Slava Pestov
Dan, if you put [ /mod swap ] map nip in its own word and gave it a descriptive name then the code would read very well. Slava On Sun, Apr 5, 2009 at 5:39 PM, Daniel Ehrenberg micro...@gmail.com wrote: Kyle, Well, here's my attempt at solving the same problem. I use a different algorithm

Re: [Factor-talk] trying to get my head around writing (good?) Factor code

2009-04-05 Thread Slava Pestov
On Sun, Apr 5, 2009 at 6:10 PM, Kyle Cordes k...@kylecordes.com wrote: I am still unhappy with the obtuseness of tuck - swap, is there a better way to do that? Yes. If you have 'a b' on the stack, then 'tuck - swap' gives you 'a-b b'. Another way to get this result is [ - ] keep. Slava