]> gitweb.factorcode.org Git - factor.git/commitdiff
Code cleanup
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Wed, 25 Jun 2008 08:33:58 +0000 (03:33 -0500)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Wed, 25 Jun 2008 08:33:58 +0000 (03:33 -0500)
12 files changed:
extra/combinators/short-circuit/short-circuit.factor
extra/io/servers/connection/connection.factor
extra/opengl/demo-support/demo-support.factor
extra/opengl/shaders/shaders.factor
extra/regexp/regexp.factor
extra/unicode/breaks/breaks.factor
extra/unicode/collation/collation-tests.factor
extra/unicode/collation/collation.factor
extra/unicode/data/data.factor
extra/unicode/normalize/normalize.factor
extra/urls/urls.factor
extra/webapps/wee-url/wee-url.factor

index 1738e8ec389ceff3043d0cdb5c25c7d0a21db1ac..3301633d7d0b3a3112bceadb4ce5981eef023d27 100644 (file)
@@ -1,16 +1,11 @@
 
 USING: kernel combinators quotations arrays sequences assocs
-       locals shuffle macros fry newfx ;
+       locals shuffle macros fry ;
 
 IN: combinators.short-circuit
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-: short-circuit ( quots quot default -- quot )
-    1quotation -rot { } map>assoc <reversed> alist>quot ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
 :: n&&-rewrite ( quots N -- quot )
    quots
      [ '[ drop N ndup @ dup not ] [ drop N ndrop f ] 2array ]
index 0ff83261fba89a0c5fdf73d2876497634a722c6f..cb26ed5722f9eef902a4d0c5623640ad147de3a1 100755 (executable)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: continuations destructors kernel math math.parser
 namespaces parser sequences strings prettyprint debugger
-quotations combinators combinators.lib logging calendar assocs
+quotations combinators logging calendar assocs
 fry accessors arrays io io.sockets io.encodings.ascii
 io.sockets.secure io.files io.streams.duplex io.timeouts
 io.encodings threads concurrency.combinators
index 88531a70bc135eb68ca07d10f697a1fd4989f1b5..6596948f45a6ff4e71bd550298352c0e80c599fe 100755 (executable)
@@ -1,4 +1,4 @@
-USING: arrays combinators.lib kernel math math.functions
+USING: arrays kernel math math.functions
 math.order math.vectors namespaces opengl opengl.gl sequences ui
 ui.gadgets ui.gestures ui.render accessors ;
 IN: opengl.demo-support
index c05e180c115e889746aa1776a51fa4ccdd22fb17..7c18736bdee41b9d912d2ba979666f5ee4031fbe 100755 (executable)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: kernel opengl.gl alien.c-types continuations namespaces
 assocs alien alien.strings libc opengl math sequences combinators
-combinators.lib macros arrays io.encodings.ascii ;
+macros arrays io.encodings.ascii ;
 IN: opengl.shaders
 
 : with-gl-shader-source-ptr ( string quot -- )
index 29f3c500c7f88d0af4fef138ac405f116fcab219..c329977875b6b0852b6dcb06503ef5043c9d074e 100755 (executable)
@@ -21,9 +21,6 @@ SYMBOL: ignore-case?
     [ [ between? ] ]
     if 2curry ;
 
-: or-predicates ( quots -- quot )
-    [ \ dup prefix ] map [ [ t ] ] f short-circuit \ nip suffix ;
-
 : <@literal ( parser obj -- action ) [ nip ] curry <@ ;
 
 : <@delay ( parser quot -- action ) [ curry ] curry <@ ;
@@ -180,7 +177,7 @@ C: <group-result> group-result
 : 'positive-character-class' ( -- parser )
     "]" token [ CHAR: ] = ] <@literal 'character-class-term' <*> <&:>
     'character-class-term' <+> <|>
-    [ or-predicates ] <@ ;
+    [ [ 1|| ] curry ] <@ ;
 
 : 'negative-character-class' ( -- parser )
     "^" token 'positive-character-class' &>
index 745fb83c3c9c7b943ec4476bec40be563e084d47..fe19685b53e0b9ad63478af10cd29e5c10fa5589 100755 (executable)
@@ -1,8 +1,7 @@
 USING: combinators.short-circuit unicode.categories kernel math combinators splitting
 sequences math.parser io.files io assocs arrays namespaces
 math.ranges unicode.normalize values io.encodings.ascii
-unicode.syntax unicode.data compiler.units alien.syntax sets
-combinators.lib ;
+unicode.syntax unicode.data compiler.units alien.syntax sets ;
 IN: unicode.breaks
 
 C-ENUM: Any L V T Extend Control CR LF graphemes ;
index 5de90d238d4a5f2bb7830bf75b443d394ece1c0c..5bc25de804f64811777d43dd96487029e1aef9c0 100755 (executable)
@@ -1,6 +1,6 @@
 USING: io io.files splitting grouping unicode.collation\r
 sequences kernel io.encodings.utf8 math.parser math.order\r
-tools.test assocs io.streams.null words combinators.lib ;\r
+tools.test assocs io.streams.null words ;\r
 IN: unicode.collation.tests\r
 \r
 : parse-test ( -- strings )\r
index 8deed708e661c30c1d4a53baca3897f74146bfb3..3e239430d4e58b78e9a94f5b65ed703eccefae04 100755 (executable)
@@ -1,7 +1,7 @@
-USING: combinators.short-circuit sequences io.files io.encodings.ascii kernel values\r
-splitting accessors math.parser ascii io assocs strings math\r
-namespaces sorting combinators math.order arrays\r
-unicode.normalize unicode.data combinators.lib locals\r
+USING: combinators.short-circuit sequences io.files\r
+io.encodings.ascii kernel values splitting accessors math.parser\r
+ascii io assocs strings math namespaces sorting combinators\r
+math.order arrays unicode.normalize unicode.data locals\r
 unicode.syntax macros sequences.deep words unicode.breaks\r
 quotations ;\r
 IN: unicode.collation\r
@@ -86,7 +86,7 @@ ducet insert-helpers
 : add ( char -- )\r
     dup blocked? [ 1string , ] [\r
         dup possible-bases dup length\r
-        [ ?combine ] 2with contains?\r
+        [ ?combine ] with with contains?\r
         [ drop ] [ 1string , ] if\r
     ] if ;\r
 \r
index b6c6292e90338ecdacd0adcd5954160a9a88e4d0..f74e2e0473d643149401c845f88f2b67fbfc5204 100755 (executable)
@@ -1,8 +1,8 @@
-USING: combinators.short-circuit assocs math kernel sequences io.files hashtables
-quotations splitting grouping arrays math.parser hash2 math.order
-byte-arrays words namespaces words compiler.units parser
-io.encodings.ascii values interval-maps ascii sets
-combinators.lib combinators locals math.ranges sorting ;
+USING: combinators.short-circuit assocs math kernel sequences
+io.files hashtables quotations splitting grouping arrays
+math.parser hash2 math.order byte-arrays words namespaces words
+compiler.units parser io.encodings.ascii values interval-maps
+ascii sets combinators locals math.ranges sorting ;
 IN: unicode.data
 
 VALUE: simple-lower
index 3b64cf577f6632d6706b636edd515c43e93c65ed..124840a7fb44188d15dd3f32f036e44d6374f886 100755 (executable)
@@ -1,5 +1,5 @@
 USING: sequences namespaces unicode.data kernel math arrays
-locals combinators.lib sorting.insertion combinators.lib ;
+locals sorting.insertion ;
 IN: unicode.normalize
 
 ! Conjoining Jamo behavior
index de661bdd9da9d19a0a750753cb1268a0438ca0e2..4c45164815709311044b348490ac38da99758f95 100644 (file)
@@ -1,11 +1,11 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel unicode.categories combinators combinators.lib
-sequences splitting
-fry namespaces assocs arrays strings io.sockets
-io.sockets.secure io.encodings.string io.encodings.utf8
-math math.parser accessors mirrors parser strings.parser lexer
-prettyprint.backend hashtables present ;
+USING: kernel unicode.categories combinators
+combinators.short-circuit sequences splitting fry namespaces
+assocs arrays strings io.sockets io.sockets.secure
+io.encodings.string io.encodings.utf8 math math.parser accessors
+mirrors parser strings.parser lexer prettyprint.backend
+hashtables present ;
 IN: urls
 
 : url-quotable? ( ch -- ? )
index 27187c4352e30f638866921243d7a7bf1e013fcb..5f354b2a19708c8ce69fc0d943806b0309c08294 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2007 Doug Coleman.
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: math.ranges sequences random accessors combinators.lib
+USING: math.ranges sequences random accessors
 kernel namespaces fry db.types db.tuples urls validators
 html.components html.forms http http.server.dispatchers furnace
 furnace.actions furnace.boilerplate furnace.redirection ;