update tangle and semantic-db for latest changes to factor
parent
21c50fefe0
commit
aa0daed072
extra
semantic-db
tangle
|
@ -0,0 +1 @@
|
|||
Alex Chapman
|
|
@ -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 ;
|
||||
|
||||
: <arc> ( subject object relation -- arc )
|
||||
arc construct-empty swap >>relation swap >>object swap >>subject ;
|
||||
arc new swap >>relation swap >>object swap >>subject ;
|
||||
|
||||
: <id-arc> ( id -- arc )
|
||||
arc new swap >>id ;
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Alex Chapman
|
|
@ -7,11 +7,11 @@ TUPLE: element attributes ;
|
|||
|
||||
TUPLE: ulist < element items ;
|
||||
: <ulist> ( items -- element )
|
||||
H{ } clone swap ulist construct-boa ;
|
||||
H{ } clone swap ulist boa ;
|
||||
|
||||
TUPLE: link < element href text ;
|
||||
: <link> ( href text -- element )
|
||||
H{ } clone -rot link construct-boa ;
|
||||
H{ } clone -rot link boa ;
|
||||
|
||||
GENERIC: >html ( element -- str )
|
||||
|
||||
|
|
|
@ -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 [ <tangle> ] dip tuck set-delegate ;
|
||||
new [ <tangle> ] dip tuck set-delegate ;
|
||||
|
||||
: <sqlite-tangle> ( db templater -- tangle ) sqlite-tangle make-tangle ;
|
||||
: <postgres-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> node-responder
|
||||
|
||||
M: node-responder call-responder ( path responder -- response )
|
||||
"text/plain" <content> nip request-params
|
||||
M: node-responder call-responder* ( path responder -- response )
|
||||
"text/plain" <content> nip params get
|
||||
[ "node-id" swap at* [ >>body ] [ drop ] if ] when* nip ;
|
||||
|
||||
: test-tangle ( -- )
|
||||
|
|
Loading…
Reference in New Issue