From aa0daed072ca418bad4e47526c00edea6dce9481 Mon Sep 17 00:00:00 2001 From: Alex Chapman Date: Mon, 28 Apr 2008 13:44:46 +1000 Subject: [PATCH] update tangle and semantic-db for latest changes to factor --- extra/semantic-db/authors.txt | 1 + extra/semantic-db/semantic-db.factor | 6 +++--- extra/tangle/authors.txt | 1 + extra/tangle/html/html.factor | 4 ++-- extra/tangle/tangle.factor | 8 ++++---- 5 files changed, 11 insertions(+), 9 deletions(-) create mode 100644 extra/semantic-db/authors.txt create mode 100644 extra/tangle/authors.txt diff --git a/extra/semantic-db/authors.txt b/extra/semantic-db/authors.txt new file mode 100644 index 0000000000..e9c193bac7 --- /dev/null +++ b/extra/semantic-db/authors.txt @@ -0,0 +1 @@ +Alex Chapman diff --git a/extra/semantic-db/semantic-db.factor b/extra/semantic-db/semantic-db.factor index 51bd94d61c..2451d73acb 100755 --- a/extra/semantic-db/semantic-db.factor +++ b/extra/semantic-db/semantic-db.factor @@ -1,8 +1,8 @@ ! Copyright (C) 2008 Alex Chapman ! See http://factorcode.org/license.txt for BSD license. USING: accessors arrays combinators combinators.cleave combinators.lib -continuations db db.tuples db.types db.sqlite hashtables kernel math -math.parser namespaces parser sequences sequences.deep +continuations db db.tuples db.types db.sqlite kernel math +math.parser namespaces parser sets sequences sequences.deep sequences.lib strings words ; IN: semantic-db @@ -28,7 +28,7 @@ node "node" TUPLE: arc id subject object relation ; : ( subject object relation -- arc ) - arc construct-empty swap >>relation swap >>object swap >>subject ; + arc new swap >>relation swap >>object swap >>subject ; : ( id -- arc ) arc new swap >>id ; diff --git a/extra/tangle/authors.txt b/extra/tangle/authors.txt new file mode 100644 index 0000000000..e9c193bac7 --- /dev/null +++ b/extra/tangle/authors.txt @@ -0,0 +1 @@ +Alex Chapman diff --git a/extra/tangle/html/html.factor b/extra/tangle/html/html.factor index 9c55b66528..fc604f4d46 100644 --- a/extra/tangle/html/html.factor +++ b/extra/tangle/html/html.factor @@ -7,11 +7,11 @@ TUPLE: element attributes ; TUPLE: ulist < element items ; : ( items -- element ) - H{ } clone swap ulist construct-boa ; + H{ } clone swap ulist boa ; TUPLE: link < element href text ; : ( href text -- element ) - H{ } clone -rot link construct-boa ; + H{ } clone -rot link boa ; GENERIC: >html ( element -- str ) diff --git a/extra/tangle/tangle.factor b/extra/tangle/tangle.factor index cbd3b94058..c6a1faa27b 100644 --- a/extra/tangle/tangle.factor +++ b/extra/tangle/tangle.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2008 Alex Chapman ! See http://factorcode.org/license.txt for BSD license. -USING: accessors assocs db db.sqlite db.postgresql http.server io kernel namespaces semantic-db sequences strings ; +USING: accessors assocs db db.sqlite db.postgresql http.server http.server.actions io kernel namespaces semantic-db sequences strings ; IN: tangle GENERIC: render* ( content templater -- output ) @@ -20,7 +20,7 @@ TUPLE: sqlite-tangle ; TUPLE: postgres-tangle ; : make-tangle ( db templater type -- tangle ) - construct-empty [ ] dip tuck set-delegate ; + new [ ] dip tuck set-delegate ; : ( db templater -- tangle ) sqlite-tangle make-tangle ; : ( db templater -- tangle ) postgres-tangle make-tangle ; @@ -40,8 +40,8 @@ M: postgres-tangle new-db ( tangle args -- tangle ) TUPLE: node-responder tangle ; C: node-responder -M: node-responder call-responder ( path responder -- response ) - "text/plain" nip request-params +M: node-responder call-responder* ( path responder -- response ) + "text/plain" nip params get [ "node-id" swap at* [ >>body ] [ drop ] if ] when* nip ; : test-tangle ( -- )