]> gitweb.factorcode.org Git - factor.git/commitdiff
Performance improvement for FactorStream
authorSlava Pestov <slava@factorcode.org>
Wed, 17 Nov 2004 22:11:09 +0000 (22:11 +0000)
committerSlava Pestov <slava@factorcode.org>
Wed, 17 Nov 2004 22:11:09 +0000 (22:11 +0000)
TODO.FACTOR.txt
factor/jedit/FactorStream.java
library/test/inference.factor

index bd4de39fb908b9d15431d936a8aa51127c08b9e9..25b31e895ec48ea8ef9be989340b4b2409bb65b6 100644 (file)
@@ -35,7 +35,7 @@
 - NPE in ErrorHighlight\r
 - some way to not have previous definitions from a source file\r
   clutter the namespace\r
-- use inferior.factor for everything not just listener\r
+- ExternalFactor VocabularyLookup\r
 - fedit broken with listener\r
 - maple-like: press enter at old commands to evaluate there\r
 - completion in the listener\r
@@ -66,7 +66,6 @@
 - OOP\r
 - room. prints code heap size\r
 - refactor sort\r
-- ditch java factor\r
 - ditch object paths\r
 - browser responder for word links in HTTPd; inspect responder for\r
   objects\r
index 773f003343c8f29903c5151de7105e970af2de99..f4ccfa95630b8c076d3e1c1be11083468287ddaa 100644 (file)
@@ -48,10 +48,13 @@ public class FactorStream
        public FactorStream(Socket socket) throws IOException
        {
                this.socket = socket;
-               this.in = new DataInputStream(socket.getInputStream());
-               this.out = new DataOutputStream(socket.getOutputStream());
+               this.in = new DataInputStream(new BufferedInputStream(
+                       socket.getInputStream()));
+               this.out = new DataOutputStream(new BufferedOutputStream(
+                       socket.getOutputStream()));
 
-               out.write("\"\\0\" write flush USE: jedit stream-server\n".getBytes("ASCII"));
+               out.write("\"\\0\" write flush USE: jedit stream-server\n"
+                       .getBytes("ASCII"));
                out.flush();
 
                /* Read everything until prompt */
index 70e0fb9a8337f26dd7c227d8974a6d135e3ad95f..ca03c95faf5aa937a1a4797b49b40ac7559ff534 100644 (file)
@@ -83,6 +83,9 @@ USE: lists
 
 [ [ bad-recursion-2 ] infer ] unit-test-fails
 
+! Simple combinators
+[ [ 1 | 2 ] [ [ car ] keep cdr ] infer ] unit-test
+
 [ [ 2 | 1 ] ] [ [ 2list ] infer ] unit-test
 [ [ 3 | 1 ] ] [ [ 3list ] infer ] unit-test
 [ [ 2 | 1 ] ] [ [ append ] infer ] unit-test