Alex Chapman | 8 May 09:47
Picon

jamshred updates

Hi All,


I've updated Jamshred a bit. It's now sort of playable as it has collision detection between the player and the walls of the tunnel. There are still a few bugs though, including the occasional hang of factor on startup. To try it, pull from git://factorcode.org/git/wrunt.git, then:
USE: jamshred
"jamshred" run

Spacebar starts the game, 'f' toggles fullscreen, 'q' quits, and the mouse scroll wheel accelerates and decelerates.

Enjoy!

Alex
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Factor-talk mailing list
Factor-talk@...
https://lists.sourceforge.net/lists/listinfo/factor-talk
Alex Chapman | 8 May 09:42
Picon

deployment not working?

Hi Slava,


I've tried to deploy Tetris on mac, but it doesn't seem to work. It creates Tetris.app, which crashes straight away. Is there anything obvious I'm missing? I've put my generated Tetris.app in my home dir on factorcode.org if it's useful.

Also, I found a small bug in the deployment docs:

In extra/tools/deploy/config/config-docs.factor, on line 99 it says the default value is 1, but it should say 2. Also, it says "advanced features such are not available.".

Alex
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Factor-talk mailing list
Factor-talk@...
https://lists.sourceforge.net/lists/listinfo/factor-talk
Slava Pestov | 6 May 00:49

Bug in CSV parser

Hi Phil,

Try parsing the following:

"foo \"bar\" bar" <string-reader> csv

Also perhaps lines starting with # should be ignored as comments?

Slava

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Stefan Scholl | 5 May 09:28
Picon
Favicon

git on cygwin

Funny:
error: git-checkout-index: unable to create file build-support/factor.sh (Permission denied)

And now factor.sh is gone. :-)

--

-- 
Web (en): http://www.no-spoon.de/ -*- Web (de): http://www.frell.de/

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Philip Fominykh | 1 May 10:19

csv issue with "foo"\n

Hello,

There is an issue with csv parser, where if a quoted field is followed 
immediately by newline, the newline is ignored.

The following test demonstrates the problem; and a fix.

Cheers,
Philip

diff --git a/extra/csv/csv-tests.factor b/extra/csv/csv-tests.factor
index 6ab26c7..858736a 100644
--- a/extra/csv/csv-tests.factor
+++ b/extra/csv/csv-tests.factor
@@ -46,9 +46,11 @@ IN: csv.tests
 [ "Year,Make,Model\n1997,Ford,E350\n2000,Mercury,Cougar" 
    <string-reader> csv ] named-unit-test

-   
+"Quoted field followed immediately by newline"
+[ { { "foo" "bar" }
+    { "1"   "2" } } ]
+[ "foo,\"bar\"\n1,2" <string-reader> csv ] named-unit-test

-   
 ! !!!!!!!!  other tests

 [ { { "Phil Dawes" } } ] 
diff --git a/extra/csv/csv.factor b/extra/csv/csv.factor
index 3953ce0..b1953f5 100644
--- a/extra/csv/csv.factor
+++ b/extra/csv/csv.factor
@@ -31,6 +31,7 @@ VAR: delimiter
   read1 dup 
   { { CHAR: "    [ , quoted-field ] }  ! " is an escaped quote
     { delimiter> [ ] }                 ! end of quoted field 
+    { CHAR: \n   [ ] }
     [ 2drop skip-to-field-end ]       ! end of quoted field + padding
   } case ;

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Justin DeVries | 28 Apr 18:10
Picon

Bug reports

Hi all,


I've got two unrelated bugs, one simple and one more complicated. I'm using the git version as of 2-3 days ago and on OS X 10.5.

First the simple: help.lint isn't loaded by default so the documentation for the help system has a broken link in the default state.

And the more serious: annotating certain words causes factor to hang indefinitely, or crash if running the gui. This happens when setting a breakpiont or watching the words reduce and each. I thought it might be inlined words, but simple inlined words like : nothing ; inline or : something 5 ; inline don't have problems. I don't know enough about factor internals to really figure out what's going on, so I thought I'd pass this on to more knowledgeable folk.

Cheers,
Justin
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Factor-talk mailing list
Factor-talk@...
https://lists.sourceforge.net/lists/listinfo/factor-talk
Joe Groff | 28 Apr 03:53
Picon

Modernized the bunny demo; new spheres demo

In git://pgdn.org/factor I went through all the old-slots-laden bunny  
demo code and cleaned it up to use new-slots. For kicks, I also added  
another OpenGL 2 demo, "spheres".

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Phil Dawes | 27 Apr 21:16

git woes

Hi Dan,

I've got a couple of patches and a vocab in my git repo now, but still
I'm struggling to make it work properly. I'm publishing to a public repo
on my laptop and then rsyncing that to my webspace, but get failures
pulling from the webspace where I don't from the local dir.

The webspace version is at http://phildawes.net/2008/factor.git

I was wondering if you had any suggestions, or failing that if I could
use some space on factorforge until I get the problem figured out?

Cheers,

Phil

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Maxim Savtchenko | 24 Apr 10:55
Picon

Status of ARM-Linux?

As I see on "Getting Factor" page, current status of Linux ARM port is
"Untested or outdated". I'm looking forward on getting pretty powerful
ARM-Linux handheld ( http://pandorawiki.org/Pandora ) somwhere in
2008. This leads to important question - what are your plans on
ARM-linux Factor? If there is no perspective of Factor 1.0 in my
pocket, it will be really sad.

Maxim Savchenko

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Jean-François Bigot | 23 Apr 23:15
Picon

What is a good definition ?

Hi,

I needed to get the list of all combinaisons of n elements chosen in  
a sequence.

Quite simple in fact but disturbing for a beginner.

First problem, how to know if there is already a word doing this in  
factor?
RTFM =>  I read "Sequence operations" several times.
Documentation is very nice and interesting to read but it's sometime  
difficult for me to find a word doing what I want.
(Or there are too many words doing quite the same, I don't know)
Nevertheless reading definitions often give new ideas  on how to  
solve problems.

Second problem, maybe the needed word is undocumented somewhere in  
the extra directory.
In that case it's maybe simpler to rewrite than to try to find it.

With doc freshly reminded I wrote without too many difficulties the  
next two definitions  (lean back and think)

: columnize ( seq -- seq )
     [ 1array ] map
; inline

: among ( seq n -- seq )
     2dup swap length
     {
         { [ over 1 = ] [ 3drop columnize ] }
         { [ 2dup < ] [ 2drop [ 1 cut ] dip
                          [ 1- among [ append ] with map  ]
                          [ among append ] 2bi
                        ] }
         { [ 2dup = ] [ 3drop 1array ] }
         { [ 2dup > ] [ 2drop 2drop {  } ] }
     } cond
;

Real problems appear now. I have a solution but:
- how to be sure it's efficient ?
- if after writing it I discover word "unclip" is it useful, or more  
elegant, to reshape definition to replace "1 cut" ?
- how to be sure that my definition is readable ?
- without knowing deeply factor, how i know which part of code I must  
optimise, and how ?

The only obvious point is that there is a simpler and more idiomatic  
way to do but experience comes slowly...

JF

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Slava Pestov | 23 Apr 01:55

Interesting use of 'fry'

Hi all,

I'm working on the web framework and came up with this:

: render-plain-list ( seq component quot -- )
     '[ , component>> renderer>> @ ] each ; inline

: render-ordered-list ( seq quot component -- )
     <ol> '[ <li> @ </li> ] render-plain-list </ol> ; inline

: render-unordered-list ( seq quot component -- )
     <ul> '[ <li> @ </li> ] render-plain-list </ul> ; inline

: render-list ( value renderer quot -- )
     over type>> {
         { +plain+     [ render-plain-list ] }
         { +ordered+   [ render-ordered-list ] }
         { +unordered+ [ render-unordered-list ] }
     } case ; inline

M: list-renderer render-view*
     [ render-view* ] render-list ;

M: list-renderer render-summary*
     [ render-summary* ] render-list ;

I think this is a pretty nice use-case for 'fry' and its hard to  
imagine how this code could be improved further.

Slava

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

Gmane