From 4952fc6f9ff7a0f113057fc0034a927e89a805ac Mon Sep 17 00:00:00 2001 From: Sam Anklesaria Date: Sat, 16 May 2009 19:50:16 -0500 Subject: [PATCH] restarted modules vocab development --- core/vocabs/parser/parser.factor | 7 +++++-- {unmaintained => extra}/modules/remote-loading/authors.txt | 0 .../modules/remote-loading/remote-loading.factor | 0 {unmaintained => extra}/modules/remote-loading/summary.txt | 0 {unmaintained => extra}/modules/rpc-server/authors.txt | 0 .../modules/rpc-server/rpc-server.factor | 0 {unmaintained => extra}/modules/rpc-server/summary.txt | 0 {unmaintained => extra}/modules/rpc/authors.txt | 0 {unmaintained => extra}/modules/rpc/rpc-docs.factor | 0 {unmaintained => extra}/modules/rpc/rpc.factor | 3 --- {unmaintained => extra}/modules/rpc/summary.txt | 0 {unmaintained => extra}/modules/uploads/authors.txt | 0 {unmaintained => extra}/modules/uploads/summary.txt | 0 {unmaintained => extra}/modules/uploads/uploads.factor | 0 {unmaintained => extra}/modules/using/authors.txt | 0 {unmaintained => extra}/modules/using/summary.txt | 0 {unmaintained => extra}/modules/using/tests/tags.txt | 0 .../modules/using/tests/test-server.factor | 0 {unmaintained => extra}/modules/using/tests/tests.factor | 0 {unmaintained => extra}/modules/using/using-docs.factor | 0 {unmaintained => extra}/modules/using/using.factor | 0 21 files changed, 5 insertions(+), 5 deletions(-) rename {unmaintained => extra}/modules/remote-loading/authors.txt (100%) rename {unmaintained => extra}/modules/remote-loading/remote-loading.factor (100%) rename {unmaintained => extra}/modules/remote-loading/summary.txt (100%) rename {unmaintained => extra}/modules/rpc-server/authors.txt (100%) rename {unmaintained => extra}/modules/rpc-server/rpc-server.factor (100%) rename {unmaintained => extra}/modules/rpc-server/summary.txt (100%) rename {unmaintained => extra}/modules/rpc/authors.txt (100%) rename {unmaintained => extra}/modules/rpc/rpc-docs.factor (100%) rename {unmaintained => extra}/modules/rpc/rpc.factor (86%) rename {unmaintained => extra}/modules/rpc/summary.txt (100%) rename {unmaintained => extra}/modules/uploads/authors.txt (100%) rename {unmaintained => extra}/modules/uploads/summary.txt (100%) rename {unmaintained => extra}/modules/uploads/uploads.factor (100%) rename {unmaintained => extra}/modules/using/authors.txt (100%) rename {unmaintained => extra}/modules/using/summary.txt (100%) rename {unmaintained => extra}/modules/using/tests/tags.txt (100%) rename {unmaintained => extra}/modules/using/tests/test-server.factor (100%) rename {unmaintained => extra}/modules/using/tests/tests.factor (100%) rename {unmaintained => extra}/modules/using/using-docs.factor (100%) rename {unmaintained => extra}/modules/using/using.factor (100%) diff --git a/core/vocabs/parser/parser.factor b/core/vocabs/parser/parser.factor index e8783c0dbe..23b3feea9b 100644 --- a/core/vocabs/parser/parser.factor +++ b/core/vocabs/parser/parser.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2007, 2009 Daniel Ehrenberg, Bruno Deferrari, ! Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: assocs hashtables kernel namespaces sequences +USING: assocs fry hashtables kernel namespaces sequences sets strings vocabs sorting accessors arrays ; IN: vocabs.parser @@ -56,4 +56,7 @@ SYMBOL: in dup string? [ "Vocabulary name must be a string" throw ] unless ; : set-in ( name -- ) - check-vocab-string dup in set create-vocab (use+) ; \ No newline at end of file + check-vocab-string dup in set create-vocab (use+) ; + +: with-in ( vocab quot -- vocab ) over + [ '[ _ set-in @ ] in get swap dip set-in ] dip vocab ; inline \ No newline at end of file diff --git a/unmaintained/modules/remote-loading/authors.txt b/extra/modules/remote-loading/authors.txt similarity index 100% rename from unmaintained/modules/remote-loading/authors.txt rename to extra/modules/remote-loading/authors.txt diff --git a/unmaintained/modules/remote-loading/remote-loading.factor b/extra/modules/remote-loading/remote-loading.factor similarity index 100% rename from unmaintained/modules/remote-loading/remote-loading.factor rename to extra/modules/remote-loading/remote-loading.factor diff --git a/unmaintained/modules/remote-loading/summary.txt b/extra/modules/remote-loading/summary.txt similarity index 100% rename from unmaintained/modules/remote-loading/summary.txt rename to extra/modules/remote-loading/summary.txt diff --git a/unmaintained/modules/rpc-server/authors.txt b/extra/modules/rpc-server/authors.txt similarity index 100% rename from unmaintained/modules/rpc-server/authors.txt rename to extra/modules/rpc-server/authors.txt diff --git a/unmaintained/modules/rpc-server/rpc-server.factor b/extra/modules/rpc-server/rpc-server.factor similarity index 100% rename from unmaintained/modules/rpc-server/rpc-server.factor rename to extra/modules/rpc-server/rpc-server.factor diff --git a/unmaintained/modules/rpc-server/summary.txt b/extra/modules/rpc-server/summary.txt similarity index 100% rename from unmaintained/modules/rpc-server/summary.txt rename to extra/modules/rpc-server/summary.txt diff --git a/unmaintained/modules/rpc/authors.txt b/extra/modules/rpc/authors.txt similarity index 100% rename from unmaintained/modules/rpc/authors.txt rename to extra/modules/rpc/authors.txt diff --git a/unmaintained/modules/rpc/rpc-docs.factor b/extra/modules/rpc/rpc-docs.factor similarity index 100% rename from unmaintained/modules/rpc/rpc-docs.factor rename to extra/modules/rpc/rpc-docs.factor diff --git a/unmaintained/modules/rpc/rpc.factor b/extra/modules/rpc/rpc.factor similarity index 86% rename from unmaintained/modules/rpc/rpc.factor rename to extra/modules/rpc/rpc.factor index 1c1217a71e..1c875339b2 100644 --- a/unmaintained/modules/rpc/rpc.factor +++ b/extra/modules/rpc/rpc.factor @@ -16,9 +16,6 @@ DEFER: get-words [ remote-quot ] 2keep create-in -rot define-declared word make-inline ] with-compilation-unit ; -: with-in ( vocab quot -- vocab ) over - [ '[ _ set-in @ ] in get swap dip set-in ] dip vocab ; inline - : remote-vocab ( addrspec vocabspec -- vocab ) dup "-remote" append [ [ (( -- words )) [ "get-words" remote-quot ] keep call-effect ] 2keep diff --git a/unmaintained/modules/rpc/summary.txt b/extra/modules/rpc/summary.txt similarity index 100% rename from unmaintained/modules/rpc/summary.txt rename to extra/modules/rpc/summary.txt diff --git a/unmaintained/modules/uploads/authors.txt b/extra/modules/uploads/authors.txt similarity index 100% rename from unmaintained/modules/uploads/authors.txt rename to extra/modules/uploads/authors.txt diff --git a/unmaintained/modules/uploads/summary.txt b/extra/modules/uploads/summary.txt similarity index 100% rename from unmaintained/modules/uploads/summary.txt rename to extra/modules/uploads/summary.txt diff --git a/unmaintained/modules/uploads/uploads.factor b/extra/modules/uploads/uploads.factor similarity index 100% rename from unmaintained/modules/uploads/uploads.factor rename to extra/modules/uploads/uploads.factor diff --git a/unmaintained/modules/using/authors.txt b/extra/modules/using/authors.txt similarity index 100% rename from unmaintained/modules/using/authors.txt rename to extra/modules/using/authors.txt diff --git a/unmaintained/modules/using/summary.txt b/extra/modules/using/summary.txt similarity index 100% rename from unmaintained/modules/using/summary.txt rename to extra/modules/using/summary.txt diff --git a/unmaintained/modules/using/tests/tags.txt b/extra/modules/using/tests/tags.txt similarity index 100% rename from unmaintained/modules/using/tests/tags.txt rename to extra/modules/using/tests/tags.txt diff --git a/unmaintained/modules/using/tests/test-server.factor b/extra/modules/using/tests/test-server.factor similarity index 100% rename from unmaintained/modules/using/tests/test-server.factor rename to extra/modules/using/tests/test-server.factor diff --git a/unmaintained/modules/using/tests/tests.factor b/extra/modules/using/tests/tests.factor similarity index 100% rename from unmaintained/modules/using/tests/tests.factor rename to extra/modules/using/tests/tests.factor diff --git a/unmaintained/modules/using/using-docs.factor b/extra/modules/using/using-docs.factor similarity index 100% rename from unmaintained/modules/using/using-docs.factor rename to extra/modules/using/using-docs.factor diff --git a/unmaintained/modules/using/using.factor b/extra/modules/using/using.factor similarity index 100% rename from unmaintained/modules/using/using.factor rename to extra/modules/using/using.factor