]> gitweb.factorcode.org Git - factor.git/commitdiff
Move bake to unmaintained since it looks like it will be hard to update; also obj...
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Thu, 18 Dec 2008 06:37:33 +0000 (00:37 -0600)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Thu, 18 Dec 2008 06:37:33 +0000 (00:37 -0600)
28 files changed:
extra/bake/authors.txt [deleted file]
extra/bake/bake-tests.factor [deleted file]
extra/bake/bake.factor [deleted file]
extra/bake/fry/fry-tests.factor [deleted file]
extra/bake/fry/fry.factor [deleted file]
extra/bake/summary.txt [deleted file]
extra/obj/alist/alist.factor [deleted file]
extra/obj/examples/todo/todo.factor [deleted file]
extra/obj/misc/misc.factor [deleted file]
extra/obj/obj.factor [deleted file]
extra/obj/papers/papers.factor [deleted file]
extra/obj/print/print.factor [deleted file]
extra/obj/util/util.factor [deleted file]
extra/obj/view/view.factor [deleted file]
unmaintained/bake/authors.txt [new file with mode: 0644]
unmaintained/bake/bake-tests.factor [new file with mode: 0644]
unmaintained/bake/bake.factor [new file with mode: 0644]
unmaintained/bake/fry/fry-tests.factor [new file with mode: 0755]
unmaintained/bake/fry/fry.factor [new file with mode: 0644]
unmaintained/bake/summary.txt [new file with mode: 0644]
unmaintained/obj/alist/alist.factor [new file with mode: 0644]
unmaintained/obj/examples/todo/todo.factor [new file with mode: 0644]
unmaintained/obj/misc/misc.factor [new file with mode: 0644]
unmaintained/obj/obj.factor [new file with mode: 0644]
unmaintained/obj/papers/papers.factor [new file with mode: 0644]
unmaintained/obj/print/print.factor [new file with mode: 0644]
unmaintained/obj/util/util.factor [new file with mode: 0644]
unmaintained/obj/view/view.factor [new file with mode: 0644]

diff --git a/extra/bake/authors.txt b/extra/bake/authors.txt
deleted file mode 100644 (file)
index 6cfd5da..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Eduardo Cavazos
diff --git a/extra/bake/bake-tests.factor b/extra/bake/bake-tests.factor
deleted file mode 100644 (file)
index 64329de..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-
-USING: kernel tools.test bake ;
-
-IN: bake.tests
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: unit-test* ( input output -- ) swap unit-test ;
-
-: must-be-t ( in -- ) [ t ] swap unit-test ;
-: must-be-f ( in -- ) [ f ] swap unit-test ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-[ 10 20 30 `{ , , , } ] [ { 10 20 30 } ] unit-test*
-
-[ 10 20 30 `{ , { , } , } ] [ { 10 { 20 } 30 } ] unit-test*
-
-[ 10 { 20 21 22 } 30 `{ , , , } ] [ { 10 { 20 21 22 } 30 } ] unit-test*
-
-[ 10 { 20 21 22 } 30 `{ , @ , } ] [ { 10 20 21 22 30 } ] unit-test*
-
-[ { 1 2 3 } `{ @ } ] [ { 1 2 3 } ] unit-test*
-
-[ { 1 2 3 } { 4 5 6 } { 7 8 9 } `{ @ @ @ } ]
-[ { 1 2 3 4 5 6 7 8 9 } ]
-unit-test*
-
diff --git a/extra/bake/bake.factor b/extra/bake/bake.factor
deleted file mode 100644 (file)
index 25cc0bb..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-
-USING: kernel parser namespaces sequences quotations arrays vectors splitting
-       strings words math generalizations
-       macros combinators.conditional newfx ;
-
-IN: bake
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYMBOL: ,
-SYMBOL: @
-
-: comma? ( obj -- ? ) , = ;
-: atsym? ( obj -- ? ) @ = ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-DEFER: [bake]
-
-: broil-element ( obj -- quot )
-    {
-      { [ comma?    ] [ drop [ >r ]          ] }
-      { [ f =       ] [ [ >r ] prefix-on     ] }
-      { [ integer?  ] [ [ >r ] prefix-on     ] }
-      { [ string?   ] [ [ >r ] prefix-on     ] }
-      { [ sequence? ] [ [bake] [ >r ] append ] }
-      { [ word?     ] [ literalize [ >r ] prefix-on ] }
-      { [ drop t    ] [ [ >r ] prefix-on     ] }
-    }
-  1cond ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: constructor ( seq -- quot )
-    {
-      { [ array? ]     [ length [ narray ] prefix-on ] }
-!      { [ quotation? ] [ length [ ncurry ] prefix-on [ ] prefix ] }
-      { [ quotation? ] [ length [ narray >quotation ] prefix-on ] }
-      { [ vector? ]    [ length [ narray >vector    ] prefix-on ] }
-    }
-  1cond ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: [broil] ( seq -- quot )
-    [ reverse [ broil-element ] map concat ]
-    [ length  [ drop [ r> ]   ] map concat ]
-    [ constructor ]
-  tri append append
-  >quotation ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYMBOL: saved-sequence
-
-: [connector] ( -- quot )
-  saved-sequence get quotation? [ [ compose ] ] [ [ append ] ] if ;
-
-: [starter] ( -- quot )
-  saved-sequence get
-    {
-      { [ quotation? ] [ drop [  [ ] ] ] }
-      { [ array?     ] [ drop [  { } ] ] }
-      { [ vector?    ] [ drop [ V{ } ] ] }
-    }
-  1cond ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: [simmer] ( seq -- quot )
-
-  dup saved-sequence set
-
-  { @ } split reverse
-    [ [ [bake] [connector] append [ >r ] append ] map concat ]
-    [ length [ drop [ r> ] [connector] append   ] map concat ]
-  bi
-
-  >r 1 invert-index pluck r> ! remove the last append/compose
-
-  [starter] prepend
-
-  append ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: [bake] ( seq -- quot ) [ @ member? ] [ [simmer] ] [ [broil] ] 1if ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-MACRO: bake ( seq -- quot ) [bake] ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-:  `{ \ } [ >array     ] parse-literal \ bake parsed ; parsing
-: `V{ \ } [ >vector    ] parse-literal \ bake parsed ; parsing
-:  `[ \ ] [ >quotation ] parse-literal \ bake parsed ; parsing
\ No newline at end of file
diff --git a/extra/bake/fry/fry-tests.factor b/extra/bake/fry/fry-tests.factor
deleted file mode 100755 (executable)
index 74408dc..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-
-USING: tools.test math prettyprint kernel io arrays vectors sequences
-       generalizations bake bake.fry ;
-
-IN: bake.fry.tests
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: unit-test* ( input output -- ) swap unit-test ;
-
-: must-be-t ( in -- ) [ t ] swap unit-test ;
-: must-be-f ( in -- ) [ f ] swap unit-test ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-[ [ 3 + ] ] [ 3 '[ , + ] ] unit-test
-
-[ [ 1 3 + ] ] [ 1 3 '[ , , + ] ] unit-test
-
-[ [ 1 + ] ] [ 1 [ + ] '[ , @ ] ] unit-test
-
-[ [ 1 + . ] ] [ 1 [ + ] '[ , @ . ] ] unit-test
-
-[ [ + - ] ] [ [ + ] [ - ] '[ @ @ ] ] unit-test
-
-[ [ "a" write "b" print ] ]
-[ "a" "b" '[ , write , print ] ] unit-test
-
-[ [ 1 2 + 3 4 - ] ]
-[ [ + ] [ - ] '[ 1 2 @ 3 4 @ ] ] unit-test
-
-[ 1/2 ] [
-    1 '[ , _ / ] 2 swap call
-] unit-test
-
-[ { { 1 "a" "A" } { 1 "b" "B" } { 1 "c" "C" } } ] [
-    1 '[ , _ _ 3array ]
-    { "a" "b" "c" } { "A" "B" "C" } rot 2map
-] unit-test
-
-[ { { 1 "a" } { 1 "b" } { 1 "c" } } ] [
-    '[ 1 _ 2array ]
-    { "a" "b" "c" } swap map
-] unit-test
-
-[ 1 2 ] [
-    1 2 '[ _ , ] call
-] unit-test
-
-[ { { 1 "a" 2 } { 1 "b" 2 } { 1 "c" 2 } } ] [
-    1 2 '[ , _ , 3array ]
-    { "a" "b" "c" } swap map
-] unit-test
-
-: funny-dip '[ @ _ ] call ; inline
-
-[ "hi" 3 ] [ "h" "i" 3 [ append ] funny-dip ] unit-test
-
-[ { 1 2 3 } ] [
-    3 1 '[ , [ , + ] map ] call
-] unit-test
-
-[ { 1 { 2 { 3 } } } ] [
-    1 2 3 '[ , [ , [ , 1array ] call 2array ] call 2array ] call
-] unit-test
-
-{ 1 1 } [ '[ [ [ , ] ] ] ] must-infer-as
-
-[ { { { 3 } } } ] [
-    3 '[ [ [ , 1array ] call 1array ] call 1array ] call
-] unit-test
-
-[ { { { 3 } } } ] [
-    3 '[ [ [ , 1array ] call 1array ] call 1array ] call
-] unit-test
-
-! [ 10 20 30 40 '[ , V{ , { , } } , ] ] [ [ 10 V{ 20 { 30 } } 40 ] ] unit-test*
-
-[ 10 20 30 40 '[ , V{ , { , } } , ] ]
-[ [ 10 20 30 >r r> 1 narray >r >r r> r> 2 narray >vector 40 ] ]
-unit-test*
-
-[ { 1 2 3 } { 4 5 6 } { 7 8 9 } '[ , { V{ @ } { , } } ] call ]
-[
-  { 1 2 3 }
-  { V{ 4 5 6 } { { 7 8 9 } } }
-]
-unit-test*
-
diff --git a/extra/bake/fry/fry.factor b/extra/bake/fry/fry.factor
deleted file mode 100644 (file)
index d82500e..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-
-USING: kernel combinators arrays vectors quotations sequences splitting
-       parser macros sequences.deep
-       combinators.short-circuit combinators.conditional bake newfx ;
-
-IN: bake.fry
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYMBOL: _
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-DEFER: (shallow-fry)
-DEFER: shallow-fry
-
-: ((shallow-fry)) ( accum quot adder -- result )
-  >r shallow-fry r>
-  append swap dup empty?
-    [ drop ]
-    [ [ prepose ] curry append ]
-  if ; inline
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: (shallow-fry) ( accum quot -- result )
-  dup empty?
-    [ drop 1quotation ]
-    [
-      unclip
-        {
-          { \ , [ [ curry   ] ((shallow-fry)) ] }
-          { \ @ [ [ compose ] ((shallow-fry)) ] }
-          [ swap >r suffix r> (shallow-fry) ]
-        }
-      case
-    ]
-  if ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: shallow-fry ( quot -- quot' ) [ ] swap (shallow-fry) ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: deep-fry ( quot -- quot )
-  { _ } split1-last dup
-    [
-      shallow-fry [ >r ] rot
-      deep-fry    [ [ dip ] curry r> compose ] 4array concat
-    ]
-    [ drop shallow-fry ]
-  if ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: bakeable? ( obj -- ? ) { [ array? ] [ vector? ] } 1|| ;
-
-: fry-specifier? ( obj -- ? ) { , @ } member-of? ;
-
-: count-inputs ( quot -- n ) flatten [ fry-specifier? ] count ;
-
-: commas ( n -- seq ) , <repetition> ;
-
-: [fry] ( quot -- quot' )
-    [
-        {
-          { [ callable? ] [ [ count-inputs commas ] [ [fry]  ] bi append ] }
-          { [ bakeable? ] [ [ count-inputs commas ] [ [bake] ] bi append ] }
-          { [ drop t    ] [ 1quotation                                   ] }
-        }
-      1cond
-    ]
-  map concat deep-fry ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-MACRO: fry ( seq -- quot ) [fry] ;
-
-: '[ \ ] [ >quotation ] parse-literal \ fry parsed ; parsing
diff --git a/extra/bake/summary.txt b/extra/bake/summary.txt
deleted file mode 100644 (file)
index cfc944a..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Bake is similar to make but with additional features
diff --git a/extra/obj/alist/alist.factor b/extra/obj/alist/alist.factor
deleted file mode 100644 (file)
index a4e8ebb..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-
-USING: arrays sequences ;
-
-IN: obj.alist
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-PREDICATE: alist < sequence [ pair? ] all? ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
diff --git a/extra/obj/examples/todo/todo.factor b/extra/obj/examples/todo/todo.factor
deleted file mode 100644 (file)
index 3d54547..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-
-USING: kernel sequences sets combinators.cleave
-       obj obj.view obj.util obj.print ;
-
-IN: obj.examples.todo
-
-SYM: person types adjoin
-SYM: todo   types adjoin
-
-SYM: owners properties adjoin
-SYM: eta    properties adjoin
-SYM: notes  properties adjoin
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYM: slava { type person } define-object
-SYM: doug  { type person } define-object
-SYM: ed    { type person } define-object
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYM: compiler-bugs
-  {
-    type todo
-    owners { slava }
-    notes  {
-             "Investitage FEP on Terrorist"
-             "Problem with cutler in VirtualBox?"
-           }
-  }
-define-object
-
-SYM: remove-old-accessors-from-core
-  {
-    type todo
-    owners { slava }
-  }
-define-object
-
-SYM: move-db-and-web-framework-to-basis
-  {
-   type todo
-   owners { slava }
-  }
-define-object
-
-SYM: remove-old-accessors-from-basis
-  {
-    type todo
-    owners { doug ed }
-  }
-define-object
-
-SYM: blas-on-bsd
-  {
-    type todo
-    owners { slava doug }
-  }
-define-object
-
-SYM: multi-methods-backend
-  {
-    type todo
-    owners { slava }
-  }
-define-object
-
-SYM: update-core-for-multi-methods { type todo owners { slava } } define-object
-SYM: update-basis-for-multi-methods { type todo } define-object
-SYM: update-extra-for-multi-methods { type todo } define-object
-
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: todo-list ( -- )
-  objects [ type -> todo = ] filter
-    [ { [ self -> ] [ owners -> ] [ eta -> ] } 1arr ]
-  map
-  { "ITEM" "OWNERS" "ETA" } prefix
-  print-table ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
diff --git a/extra/obj/misc/misc.factor b/extra/obj/misc/misc.factor
deleted file mode 100644 (file)
index 06b3056..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-
-USING: kernel namespaces sequences assocs sequences.deep obj ;
-
-IN: obj.misc
-
-: related ( obj -- seq )
-  objects dupd remove [ get values flatten member? ] with filter ;
-
diff --git a/extra/obj/obj.factor b/extra/obj/obj.factor
deleted file mode 100644 (file)
index a4af627..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-
-USING: kernel words namespaces arrays vectors hashtables
-       sequences assocs sets grouping
-       combinators.conditional
-       combinators.short-circuit
-       obj.util obj.alist ;
-
-IN: obj
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: properties ( -- properties ) V{ } ;
-
-SYM: self  properties adjoin
-SYM: type  properties adjoin
-SYM: title properties adjoin
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: types ( -- types ) V{ } ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: >obj ( val -- obj ) [ symbol? ] [ get ] [ ] 1if ;
-
-: -> ( obj pro -- val ) swap >obj at ;
-
-PREDICATE: obj < alist { [ self -> ] [ type -> ] } 1&& ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: objects ( -- objects ) V{ } ;
-
-: define-object ( symbol table -- )
-  2 group >vector
-  self rot 2array prefix
-  dup dup self -> set-global
-  self -> objects adjoin ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-PREDICATE: ptr < symbol get obj? ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
diff --git a/extra/obj/papers/papers.factor b/extra/obj/papers/papers.factor
deleted file mode 100644 (file)
index 46683ad..0000000
+++ /dev/null
@@ -1,178 +0,0 @@
-
-USING: sets obj obj.util obj.view ;
-
-IN: obj.papers
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYM: title        properties adjoin
-SYM: abstract     properties adjoin
-SYM: authors      properties adjoin
-SYM: file         properties adjoin
-SYM: date         properties adjoin
-SYM: participants properties adjoin
-SYM: description  properties adjoin
-
-SYM: chapter      properties adjoin
-SYM: section      properties adjoin
-SYM: paragraph    properties adjoin
-SYM: content      properties adjoin
-
-SYM: subjects     properties adjoin
-SYM: source       properties adjoin
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYM: paper  types adjoin
-SYM: person types adjoin
-SYM: event  types adjoin
-
-SYM: excerpt types adjoin
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYM: bay-wei-chang       { type person } define-object
-SYM: chuck-moore         { type person } define-object
-SYM: craig-chambers      { type person } define-object
-SYM: david-ungar         { type person } define-object
-SYM: frank-g-halasz      { type person } define-object
-SYM: gerald-jay-sussman  { type person } define-object
-SYM: guy-lewis-steele-jr { type person } define-object
-SYM: randall-b-smith     { type person } define-object
-SYM: randall-h-trigg     { type person } define-object
-SYM: robert-adams        { type person } define-object
-SYM: russell-noftsker    { type person } define-object
-SYM: thomas-p-moran      { type person } define-object
-SYM: urs-holzle          { type person } define-object
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYM: programming-as-an-experience
-  {
-    type     paper
-    title    "Programming as an Experience: The Inspiration for Self"
-    abstract "The Self system attempts to integrate intellectual and non-intellectual aspects of programming to create an overall experience. The language semantics, user interface, and implementation each help create this integrated experience. The language semantics embed the programmer in a uniform world of simple ob jects that can be modified without appealing to definitions of abstractions. In a similar way, the graphical interface puts the user into a uniform world of tangible objects that can be directly manipulated and changed without switching modes. The implementation strives to support the world-of-objects illusion by minimiz ing perceptible pauses and by providing true source-level semantics without sac rificing performance. As a side benefit, it encourages factoring. Although we see areas that fall short of the vision, on the whole, the language, interface, and im plementation conspire so that the Self programmer lives and acts in a consistent and malleable world of objects."
-    authors  { randall-b-smith david-ungar }
-    date     1995
-  }
-define-object
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYM: self-the-power-of-simplicity
-  {
-    type paper
-    title "Self: The Power of Simplicity"
-    abstract "Self is an object-oriented language for exploratory programming based on a small number of simple and concrete ideas: prototypes, slots, and behavior. Prototypes combine inheritance and instantiation to provide a framework that is simpler and more flexible than most object-oriented languages. Slots unite variables and procedures into a single construct. This permits the inheritance hierarchy to take over the function of lexical scoping in conventional languages. Finally, because Self does not distinguish state from behavior, it narrows the gaps between ordinary objects, procedures, and closures. Self's simplicity and expressiveness offer new insights into object-oriented computation."
-    authors { randall-b-smith david-ungar }
-    date 1987
-  }
-define-object
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYM: parents-are-shared-parts
-  {
-    type paper
-    title "Parents are Shared Parts: Inheritance and Encapsulation in Self"
-    abstract "The design of inheritance and encapsulation in Self, an object-oriented language based on prototypes, results from understanding that inheritance allows parents to be shared parts of their children. The programmer resolves ambiguities arising from multiple inheritance by prioritizing an object's parents. Unifying unordered and ordered multiple inheritance supports differential programming of abstractions and methods, combination of unrelated abstractions, unequal combination of abstractions, and mixins. In Self, a private slot may be accessed if the sending method is a shared part of the receiver, allowing privileged communication between related objects. Thus, classless Self enjoys the benefits of class-based encapsulation."
-    authors { craig-chambers david-ungar bay-wei-chang urs-holzle }
-    date 1991
-  }
-define-object
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYM: organizing-programs-without-classes
-  {
-    type paper
-    title "Organizing Programs Without Classes"
-    abstract "All organizational functions carried out by classes can be accomplished in a simple and natural way by object inheritance in classless languages, with no need for special mechanisms. A single model--dividing types into prototypes and traits--supports sharing of behavior and extending or replacing representations. A natural extension, dynamic object inheritance, can model behavioral modes. Object inheritance can also be used to provide structured name spaces for well-known objects. Classless languages can even express 'class-based' encapsulation. These stylized uses of object inheritance become instantly recognizable idioms, and extend the repertory of organizing principles to cover a wider range of programs."
-    authors { david-ungar craig-chambers bay-wei-chang urs-holzle }
-    date 1991
-  }
-define-object
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYM: scheme-an-interpreter-for-extended-lambda-calculus
-  {
-    type paper
-    title "Scheme: An Interpreter for Extended Lambda Calculus"
-    abstract "Inspired by ACTORS [Greif and Hewitt] [Smith and Hewitt], we have implemented an interpreter for a LISP-like language, SCHEME, based on the lambda calculus [Church], but extended for side effects, multiprocessing, and process synchronization. The purpose of this implementation is tutorial. We wish to: (1) alleviate the confusion caused by Micro-PLANNER, CONNIVER, etc. by clarifying the embedding of non-recursive control structures in a recursive host language like LISP. (2) explain how to use these control structures, independent of such issues as pattern matching and data base manipulation. (3) have a simple concrete experimental domain for certain issues of programming semantics and style."
-    authors { gerald-jay-sussman guy-lewis-steele-jr }
-    date 1975
-  }
-define-object
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYM: symbolics-is-founded
-  {
-    type         event
-    participants { russell-noftsker robert-adams }
-    date         1980
-  }
-define-object
-
-SYM: symbolics-funding-from-gi
-  {
-    type        event
-    description "Symbolics receives $500,000 from General Instruments"
-    date        1982
-  }
-define-object
-
-SYM: symbolics-files-for-bankruptcy
-  {
-    type event
-    date "1993-01-28"
-  }
-define-object
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYM: the-evolution-of-forth
-  {
-    type paper
-    title "The Evolution of Forth"
-    authors { chuck-moore "elizabeth-d-rather" "donald-r-colburn" }
-    abstract
-    "Forth is unique among programming languages in that its development and proliferation has been a grass-roots effort unsupported by any major corporate or academic sponsors. Originally conceived and developed by a single individual, its later development has progressed under two significant influences: professional programmers who developed tools to solve application problems and then commercialized them, and the interests of hobbyists concerned with free distribution of Forth. These influences have produced a language markedly different from traditional programming languages."
-    date 1993
-  }
-define-object
-
-SYM: first-complete-stand-alone-forth
-  {
-    type event
-    participants { chuck-moore }
-    date 1971
-  }
-define-object
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYM: notecards-in-a-nutshell
-  {
-    type paper
-    authors { frank-g-halasz thomas-p-moran randall-h-trigg }
-    date 1987
-  }
-define-object
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-SYM: the-evolution-of-forth-excerpt-2-1-1
-  {
-    type excerpt
-    source the-evolution-of-forth
-    chapter 2
-    section 1
-    paragraph 1
-    content
-    "Moore developed the first complete, stand-alone implementation of Forth in 1971 for the 11-meter radio telescope operated by the National Radio Astronomy Observatory (NRAO) at Kitt Peak, Arizona. This system ran on two early minicomputers (a 16 KB DDP-116 and a 32 KB H316) joined by a serial link. Both a multiprogrammed system and a multiprocessor system (in that both computers shared responsibility for controlling the telescope and its scientific instruments), it was responsible for pointing and tracking the telescope, collecting data and recording it on magnetic tape, and supporting an interactive graphics terminal on which an astronomer could analyze previously recorded data. The multiprogrammed nature of the system allowed all these functions to be performed concurrently, without timing conflicts or other interference."
-    subjects { chuck-moore first-complete-stand-alone-forth }
-  }
-define-object
-
diff --git a/extra/obj/print/print.factor b/extra/obj/print/print.factor
deleted file mode 100644 (file)
index 000e161..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-
-USING: kernel arrays strings sequences assocs io io.styles prettyprint colors
-       combinators.conditional ;
-
-IN: obj.print
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: write-wrapped ( string -- ) H{ { wrap-margin 500 } } [ write ] with-nesting ;
-
-! : print-elt ( val -- )
-!   {
-!     { [ string? ] [ write-wrapped ] }
-!     { [ array?  ] [ [ . ] each    ] }
-!     { [ drop t  ] [ . ] }
-!   }
-!   1cond ;
-
-USING: accessors vocabs help.markup ;
-
-: print-elt ( val -- )
-  {
-    { [ vocab?  ] [ [ name>> ] [ ] bi write-object ] }
-    { [ string? ] [ write-wrapped ] }
-    { [ array?  ] [ [ . ] each    ] }
-    { [ drop t  ] [ . ] }
-  }
-  1cond ;
-
-: print-grid ( grid -- )
-  H{ { table-gap { 10 10 } } { table-border T{ rgba f 0 0 0 1 } } }
-  [ [ [ [ [ print-elt ] with-cell ] each ] with-row ] each ] tabular-output ;
-
-: print-table ( assoc -- ) >alist print-grid ;
-
-: print-seq ( seq -- ) [ 1array ] map print-grid ;
-
diff --git a/extra/obj/util/util.factor b/extra/obj/util/util.factor
deleted file mode 100644 (file)
index 086fcd1..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-
-USING: kernel parser words ;
-
-IN: obj.util
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: SYM: CREATE-WORD dup define-symbol parsed ; parsing
\ No newline at end of file
diff --git a/extra/obj/view/view.factor b/extra/obj/view/view.factor
deleted file mode 100644 (file)
index cf5ca33..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-
-USING: kernel words namespaces arrays sequences prettyprint
-       help.topics help.markup bake combinators.cleave
-       obj obj.misc obj.print ;
-
-IN: obj.view
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: $tab ( seq -- ) first print-table ;
-: $obj ( seq -- ) first print-table ;
-: $seq ( seq -- ) first print-seq   ;
-: $ptr ( seq -- ) first get print-table ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-PREDICATE: obj-type < symbol types member? ;
-
-M: obj-type article-title ( type -- title ) unparse ;
-
-M: obj-type article-content ( type -- content )
-   objects [ type -> = ] with filter
-   { $seq , } bake ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-M: ptr article-title ( ptr -- title ) [ title -> ] [ unparse ] bi or ;
-
-M: ptr article-content ( ptr -- content )
-   {
-     [ get     { $obj , } bake ]
-     [ drop { $heading "Related\n" } ]
-     [ related { $seq , } bake ]
-   }
-   1arr ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-PREDICATE: obj-list < word \ objects = ;
-
-M: obj-list article-title ( objects -- title ) drop "Objects" ;
-
-! M: obj-list article-content ( objects -- title )
-!    execute
-!    [ [ type -> ] [ ] bi 2array ] map
-!    { $tab , } bake ;
-
-M: obj-list article-content ( objects -- title )
-   drop
-   objects
-   [ [ type -> ] [ ] bi 2array ] map
-   { $tab , } bake ;
\ No newline at end of file
diff --git a/unmaintained/bake/authors.txt b/unmaintained/bake/authors.txt
new file mode 100644 (file)
index 0000000..6cfd5da
--- /dev/null
@@ -0,0 +1 @@
+Eduardo Cavazos
diff --git a/unmaintained/bake/bake-tests.factor b/unmaintained/bake/bake-tests.factor
new file mode 100644 (file)
index 0000000..64329de
--- /dev/null
@@ -0,0 +1,28 @@
+
+USING: kernel tools.test bake ;
+
+IN: bake.tests
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: unit-test* ( input output -- ) swap unit-test ;
+
+: must-be-t ( in -- ) [ t ] swap unit-test ;
+: must-be-f ( in -- ) [ f ] swap unit-test ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+[ 10 20 30 `{ , , , } ] [ { 10 20 30 } ] unit-test*
+
+[ 10 20 30 `{ , { , } , } ] [ { 10 { 20 } 30 } ] unit-test*
+
+[ 10 { 20 21 22 } 30 `{ , , , } ] [ { 10 { 20 21 22 } 30 } ] unit-test*
+
+[ 10 { 20 21 22 } 30 `{ , @ , } ] [ { 10 20 21 22 30 } ] unit-test*
+
+[ { 1 2 3 } `{ @ } ] [ { 1 2 3 } ] unit-test*
+
+[ { 1 2 3 } { 4 5 6 } { 7 8 9 } `{ @ @ @ } ]
+[ { 1 2 3 4 5 6 7 8 9 } ]
+unit-test*
+
diff --git a/unmaintained/bake/bake.factor b/unmaintained/bake/bake.factor
new file mode 100644 (file)
index 0000000..25cc0bb
--- /dev/null
@@ -0,0 +1,97 @@
+
+USING: kernel parser namespaces sequences quotations arrays vectors splitting
+       strings words math generalizations
+       macros combinators.conditional newfx ;
+
+IN: bake
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+SYMBOL: ,
+SYMBOL: @
+
+: comma? ( obj -- ? ) , = ;
+: atsym? ( obj -- ? ) @ = ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+DEFER: [bake]
+
+: broil-element ( obj -- quot )
+    {
+      { [ comma?    ] [ drop [ >r ]          ] }
+      { [ f =       ] [ [ >r ] prefix-on     ] }
+      { [ integer?  ] [ [ >r ] prefix-on     ] }
+      { [ string?   ] [ [ >r ] prefix-on     ] }
+      { [ sequence? ] [ [bake] [ >r ] append ] }
+      { [ word?     ] [ literalize [ >r ] prefix-on ] }
+      { [ drop t    ] [ [ >r ] prefix-on     ] }
+    }
+  1cond ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: constructor ( seq -- quot )
+    {
+      { [ array? ]     [ length [ narray ] prefix-on ] }
+!      { [ quotation? ] [ length [ ncurry ] prefix-on [ ] prefix ] }
+      { [ quotation? ] [ length [ narray >quotation ] prefix-on ] }
+      { [ vector? ]    [ length [ narray >vector    ] prefix-on ] }
+    }
+  1cond ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: [broil] ( seq -- quot )
+    [ reverse [ broil-element ] map concat ]
+    [ length  [ drop [ r> ]   ] map concat ]
+    [ constructor ]
+  tri append append
+  >quotation ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+SYMBOL: saved-sequence
+
+: [connector] ( -- quot )
+  saved-sequence get quotation? [ [ compose ] ] [ [ append ] ] if ;
+
+: [starter] ( -- quot )
+  saved-sequence get
+    {
+      { [ quotation? ] [ drop [  [ ] ] ] }
+      { [ array?     ] [ drop [  { } ] ] }
+      { [ vector?    ] [ drop [ V{ } ] ] }
+    }
+  1cond ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: [simmer] ( seq -- quot )
+
+  dup saved-sequence set
+
+  { @ } split reverse
+    [ [ [bake] [connector] append [ >r ] append ] map concat ]
+    [ length [ drop [ r> ] [connector] append   ] map concat ]
+  bi
+
+  >r 1 invert-index pluck r> ! remove the last append/compose
+
+  [starter] prepend
+
+  append ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: [bake] ( seq -- quot ) [ @ member? ] [ [simmer] ] [ [broil] ] 1if ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+MACRO: bake ( seq -- quot ) [bake] ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+:  `{ \ } [ >array     ] parse-literal \ bake parsed ; parsing
+: `V{ \ } [ >vector    ] parse-literal \ bake parsed ; parsing
+:  `[ \ ] [ >quotation ] parse-literal \ bake parsed ; parsing
\ No newline at end of file
diff --git a/unmaintained/bake/fry/fry-tests.factor b/unmaintained/bake/fry/fry-tests.factor
new file mode 100755 (executable)
index 0000000..74408dc
--- /dev/null
@@ -0,0 +1,89 @@
+
+USING: tools.test math prettyprint kernel io arrays vectors sequences
+       generalizations bake bake.fry ;
+
+IN: bake.fry.tests
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: unit-test* ( input output -- ) swap unit-test ;
+
+: must-be-t ( in -- ) [ t ] swap unit-test ;
+: must-be-f ( in -- ) [ f ] swap unit-test ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+[ [ 3 + ] ] [ 3 '[ , + ] ] unit-test
+
+[ [ 1 3 + ] ] [ 1 3 '[ , , + ] ] unit-test
+
+[ [ 1 + ] ] [ 1 [ + ] '[ , @ ] ] unit-test
+
+[ [ 1 + . ] ] [ 1 [ + ] '[ , @ . ] ] unit-test
+
+[ [ + - ] ] [ [ + ] [ - ] '[ @ @ ] ] unit-test
+
+[ [ "a" write "b" print ] ]
+[ "a" "b" '[ , write , print ] ] unit-test
+
+[ [ 1 2 + 3 4 - ] ]
+[ [ + ] [ - ] '[ 1 2 @ 3 4 @ ] ] unit-test
+
+[ 1/2 ] [
+    1 '[ , _ / ] 2 swap call
+] unit-test
+
+[ { { 1 "a" "A" } { 1 "b" "B" } { 1 "c" "C" } } ] [
+    1 '[ , _ _ 3array ]
+    { "a" "b" "c" } { "A" "B" "C" } rot 2map
+] unit-test
+
+[ { { 1 "a" } { 1 "b" } { 1 "c" } } ] [
+    '[ 1 _ 2array ]
+    { "a" "b" "c" } swap map
+] unit-test
+
+[ 1 2 ] [
+    1 2 '[ _ , ] call
+] unit-test
+
+[ { { 1 "a" 2 } { 1 "b" 2 } { 1 "c" 2 } } ] [
+    1 2 '[ , _ , 3array ]
+    { "a" "b" "c" } swap map
+] unit-test
+
+: funny-dip '[ @ _ ] call ; inline
+
+[ "hi" 3 ] [ "h" "i" 3 [ append ] funny-dip ] unit-test
+
+[ { 1 2 3 } ] [
+    3 1 '[ , [ , + ] map ] call
+] unit-test
+
+[ { 1 { 2 { 3 } } } ] [
+    1 2 3 '[ , [ , [ , 1array ] call 2array ] call 2array ] call
+] unit-test
+
+{ 1 1 } [ '[ [ [ , ] ] ] ] must-infer-as
+
+[ { { { 3 } } } ] [
+    3 '[ [ [ , 1array ] call 1array ] call 1array ] call
+] unit-test
+
+[ { { { 3 } } } ] [
+    3 '[ [ [ , 1array ] call 1array ] call 1array ] call
+] unit-test
+
+! [ 10 20 30 40 '[ , V{ , { , } } , ] ] [ [ 10 V{ 20 { 30 } } 40 ] ] unit-test*
+
+[ 10 20 30 40 '[ , V{ , { , } } , ] ]
+[ [ 10 20 30 >r r> 1 narray >r >r r> r> 2 narray >vector 40 ] ]
+unit-test*
+
+[ { 1 2 3 } { 4 5 6 } { 7 8 9 } '[ , { V{ @ } { , } } ] call ]
+[
+  { 1 2 3 }
+  { V{ 4 5 6 } { { 7 8 9 } } }
+]
+unit-test*
+
diff --git a/unmaintained/bake/fry/fry.factor b/unmaintained/bake/fry/fry.factor
new file mode 100644 (file)
index 0000000..d82500e
--- /dev/null
@@ -0,0 +1,80 @@
+
+USING: kernel combinators arrays vectors quotations sequences splitting
+       parser macros sequences.deep
+       combinators.short-circuit combinators.conditional bake newfx ;
+
+IN: bake.fry
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+SYMBOL: _
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+DEFER: (shallow-fry)
+DEFER: shallow-fry
+
+: ((shallow-fry)) ( accum quot adder -- result )
+  >r shallow-fry r>
+  append swap dup empty?
+    [ drop ]
+    [ [ prepose ] curry append ]
+  if ; inline
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: (shallow-fry) ( accum quot -- result )
+  dup empty?
+    [ drop 1quotation ]
+    [
+      unclip
+        {
+          { \ , [ [ curry   ] ((shallow-fry)) ] }
+          { \ @ [ [ compose ] ((shallow-fry)) ] }
+          [ swap >r suffix r> (shallow-fry) ]
+        }
+      case
+    ]
+  if ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: shallow-fry ( quot -- quot' ) [ ] swap (shallow-fry) ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: deep-fry ( quot -- quot )
+  { _ } split1-last dup
+    [
+      shallow-fry [ >r ] rot
+      deep-fry    [ [ dip ] curry r> compose ] 4array concat
+    ]
+    [ drop shallow-fry ]
+  if ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: bakeable? ( obj -- ? ) { [ array? ] [ vector? ] } 1|| ;
+
+: fry-specifier? ( obj -- ? ) { , @ } member-of? ;
+
+: count-inputs ( quot -- n ) flatten [ fry-specifier? ] count ;
+
+: commas ( n -- seq ) , <repetition> ;
+
+: [fry] ( quot -- quot' )
+    [
+        {
+          { [ callable? ] [ [ count-inputs commas ] [ [fry]  ] bi append ] }
+          { [ bakeable? ] [ [ count-inputs commas ] [ [bake] ] bi append ] }
+          { [ drop t    ] [ 1quotation                                   ] }
+        }
+      1cond
+    ]
+  map concat deep-fry ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+MACRO: fry ( seq -- quot ) [fry] ;
+
+: '[ \ ] [ >quotation ] parse-literal \ fry parsed ; parsing
diff --git a/unmaintained/bake/summary.txt b/unmaintained/bake/summary.txt
new file mode 100644 (file)
index 0000000..cfc944a
--- /dev/null
@@ -0,0 +1 @@
+Bake is similar to make but with additional features
diff --git a/unmaintained/obj/alist/alist.factor b/unmaintained/obj/alist/alist.factor
new file mode 100644 (file)
index 0000000..a4e8ebb
--- /dev/null
@@ -0,0 +1,11 @@
+
+USING: arrays sequences ;
+
+IN: obj.alist
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+PREDICATE: alist < sequence [ pair? ] all? ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
diff --git a/unmaintained/obj/examples/todo/todo.factor b/unmaintained/obj/examples/todo/todo.factor
new file mode 100644 (file)
index 0000000..3d54547
--- /dev/null
@@ -0,0 +1,83 @@
+
+USING: kernel sequences sets combinators.cleave
+       obj obj.view obj.util obj.print ;
+
+IN: obj.examples.todo
+
+SYM: person types adjoin
+SYM: todo   types adjoin
+
+SYM: owners properties adjoin
+SYM: eta    properties adjoin
+SYM: notes  properties adjoin
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+SYM: slava { type person } define-object
+SYM: doug  { type person } define-object
+SYM: ed    { type person } define-object
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+SYM: compiler-bugs
+  {
+    type todo
+    owners { slava }
+    notes  {
+             "Investitage FEP on Terrorist"
+             "Problem with cutler in VirtualBox?"
+           }
+  }
+define-object
+
+SYM: remove-old-accessors-from-core
+  {
+    type todo
+    owners { slava }
+  }
+define-object
+
+SYM: move-db-and-web-framework-to-basis
+  {
+   type todo
+   owners { slava }
+  }
+define-object
+
+SYM: remove-old-accessors-from-basis
+  {
+    type todo
+    owners { doug ed }
+  }
+define-object
+
+SYM: blas-on-bsd
+  {
+    type todo
+    owners { slava doug }
+  }
+define-object
+
+SYM: multi-methods-backend
+  {
+    type todo
+    owners { slava }
+  }
+define-object
+
+SYM: update-core-for-multi-methods { type todo owners { slava } } define-object
+SYM: update-basis-for-multi-methods { type todo } define-object
+SYM: update-extra-for-multi-methods { type todo } define-object
+
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: todo-list ( -- )
+  objects [ type -> todo = ] filter
+    [ { [ self -> ] [ owners -> ] [ eta -> ] } 1arr ]
+  map
+  { "ITEM" "OWNERS" "ETA" } prefix
+  print-table ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
diff --git a/unmaintained/obj/misc/misc.factor b/unmaintained/obj/misc/misc.factor
new file mode 100644 (file)
index 0000000..06b3056
--- /dev/null
@@ -0,0 +1,8 @@
+
+USING: kernel namespaces sequences assocs sequences.deep obj ;
+
+IN: obj.misc
+
+: related ( obj -- seq )
+  objects dupd remove [ get values flatten member? ] with filter ;
+
diff --git a/unmaintained/obj/obj.factor b/unmaintained/obj/obj.factor
new file mode 100644 (file)
index 0000000..a4af627
--- /dev/null
@@ -0,0 +1,45 @@
+
+USING: kernel words namespaces arrays vectors hashtables
+       sequences assocs sets grouping
+       combinators.conditional
+       combinators.short-circuit
+       obj.util obj.alist ;
+
+IN: obj
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: properties ( -- properties ) V{ } ;
+
+SYM: self  properties adjoin
+SYM: type  properties adjoin
+SYM: title properties adjoin
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: types ( -- types ) V{ } ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: >obj ( val -- obj ) [ symbol? ] [ get ] [ ] 1if ;
+
+: -> ( obj pro -- val ) swap >obj at ;
+
+PREDICATE: obj < alist { [ self -> ] [ type -> ] } 1&& ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: objects ( -- objects ) V{ } ;
+
+: define-object ( symbol table -- )
+  2 group >vector
+  self rot 2array prefix
+  dup dup self -> set-global
+  self -> objects adjoin ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+PREDICATE: ptr < symbol get obj? ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
diff --git a/unmaintained/obj/papers/papers.factor b/unmaintained/obj/papers/papers.factor
new file mode 100644 (file)
index 0000000..46683ad
--- /dev/null
@@ -0,0 +1,178 @@
+
+USING: sets obj obj.util obj.view ;
+
+IN: obj.papers
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+SYM: title        properties adjoin
+SYM: abstract     properties adjoin
+SYM: authors      properties adjoin
+SYM: file         properties adjoin
+SYM: date         properties adjoin
+SYM: participants properties adjoin
+SYM: description  properties adjoin
+
+SYM: chapter      properties adjoin
+SYM: section      properties adjoin
+SYM: paragraph    properties adjoin
+SYM: content      properties adjoin
+
+SYM: subjects     properties adjoin
+SYM: source       properties adjoin
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+SYM: paper  types adjoin
+SYM: person types adjoin
+SYM: event  types adjoin
+
+SYM: excerpt types adjoin
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+SYM: bay-wei-chang       { type person } define-object
+SYM: chuck-moore         { type person } define-object
+SYM: craig-chambers      { type person } define-object
+SYM: david-ungar         { type person } define-object
+SYM: frank-g-halasz      { type person } define-object
+SYM: gerald-jay-sussman  { type person } define-object
+SYM: guy-lewis-steele-jr { type person } define-object
+SYM: randall-b-smith     { type person } define-object
+SYM: randall-h-trigg     { type person } define-object
+SYM: robert-adams        { type person } define-object
+SYM: russell-noftsker    { type person } define-object
+SYM: thomas-p-moran      { type person } define-object
+SYM: urs-holzle          { type person } define-object
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+SYM: programming-as-an-experience
+  {
+    type     paper
+    title    "Programming as an Experience: The Inspiration for Self"
+    abstract "The Self system attempts to integrate intellectual and non-intellectual aspects of programming to create an overall experience. The language semantics, user interface, and implementation each help create this integrated experience. The language semantics embed the programmer in a uniform world of simple ob jects that can be modified without appealing to definitions of abstractions. In a similar way, the graphical interface puts the user into a uniform world of tangible objects that can be directly manipulated and changed without switching modes. The implementation strives to support the world-of-objects illusion by minimiz ing perceptible pauses and by providing true source-level semantics without sac rificing performance. As a side benefit, it encourages factoring. Although we see areas that fall short of the vision, on the whole, the language, interface, and im plementation conspire so that the Self programmer lives and acts in a consistent and malleable world of objects."
+    authors  { randall-b-smith david-ungar }
+    date     1995
+  }
+define-object
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+SYM: self-the-power-of-simplicity
+  {
+    type paper
+    title "Self: The Power of Simplicity"
+    abstract "Self is an object-oriented language for exploratory programming based on a small number of simple and concrete ideas: prototypes, slots, and behavior. Prototypes combine inheritance and instantiation to provide a framework that is simpler and more flexible than most object-oriented languages. Slots unite variables and procedures into a single construct. This permits the inheritance hierarchy to take over the function of lexical scoping in conventional languages. Finally, because Self does not distinguish state from behavior, it narrows the gaps between ordinary objects, procedures, and closures. Self's simplicity and expressiveness offer new insights into object-oriented computation."
+    authors { randall-b-smith david-ungar }
+    date 1987
+  }
+define-object
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+SYM: parents-are-shared-parts
+  {
+    type paper
+    title "Parents are Shared Parts: Inheritance and Encapsulation in Self"
+    abstract "The design of inheritance and encapsulation in Self, an object-oriented language based on prototypes, results from understanding that inheritance allows parents to be shared parts of their children. The programmer resolves ambiguities arising from multiple inheritance by prioritizing an object's parents. Unifying unordered and ordered multiple inheritance supports differential programming of abstractions and methods, combination of unrelated abstractions, unequal combination of abstractions, and mixins. In Self, a private slot may be accessed if the sending method is a shared part of the receiver, allowing privileged communication between related objects. Thus, classless Self enjoys the benefits of class-based encapsulation."
+    authors { craig-chambers david-ungar bay-wei-chang urs-holzle }
+    date 1991
+  }
+define-object
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+SYM: organizing-programs-without-classes
+  {
+    type paper
+    title "Organizing Programs Without Classes"
+    abstract "All organizational functions carried out by classes can be accomplished in a simple and natural way by object inheritance in classless languages, with no need for special mechanisms. A single model--dividing types into prototypes and traits--supports sharing of behavior and extending or replacing representations. A natural extension, dynamic object inheritance, can model behavioral modes. Object inheritance can also be used to provide structured name spaces for well-known objects. Classless languages can even express 'class-based' encapsulation. These stylized uses of object inheritance become instantly recognizable idioms, and extend the repertory of organizing principles to cover a wider range of programs."
+    authors { david-ungar craig-chambers bay-wei-chang urs-holzle }
+    date 1991
+  }
+define-object
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+SYM: scheme-an-interpreter-for-extended-lambda-calculus
+  {
+    type paper
+    title "Scheme: An Interpreter for Extended Lambda Calculus"
+    abstract "Inspired by ACTORS [Greif and Hewitt] [Smith and Hewitt], we have implemented an interpreter for a LISP-like language, SCHEME, based on the lambda calculus [Church], but extended for side effects, multiprocessing, and process synchronization. The purpose of this implementation is tutorial. We wish to: (1) alleviate the confusion caused by Micro-PLANNER, CONNIVER, etc. by clarifying the embedding of non-recursive control structures in a recursive host language like LISP. (2) explain how to use these control structures, independent of such issues as pattern matching and data base manipulation. (3) have a simple concrete experimental domain for certain issues of programming semantics and style."
+    authors { gerald-jay-sussman guy-lewis-steele-jr }
+    date 1975
+  }
+define-object
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+SYM: symbolics-is-founded
+  {
+    type         event
+    participants { russell-noftsker robert-adams }
+    date         1980
+  }
+define-object
+
+SYM: symbolics-funding-from-gi
+  {
+    type        event
+    description "Symbolics receives $500,000 from General Instruments"
+    date        1982
+  }
+define-object
+
+SYM: symbolics-files-for-bankruptcy
+  {
+    type event
+    date "1993-01-28"
+  }
+define-object
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+SYM: the-evolution-of-forth
+  {
+    type paper
+    title "The Evolution of Forth"
+    authors { chuck-moore "elizabeth-d-rather" "donald-r-colburn" }
+    abstract
+    "Forth is unique among programming languages in that its development and proliferation has been a grass-roots effort unsupported by any major corporate or academic sponsors. Originally conceived and developed by a single individual, its later development has progressed under two significant influences: professional programmers who developed tools to solve application problems and then commercialized them, and the interests of hobbyists concerned with free distribution of Forth. These influences have produced a language markedly different from traditional programming languages."
+    date 1993
+  }
+define-object
+
+SYM: first-complete-stand-alone-forth
+  {
+    type event
+    participants { chuck-moore }
+    date 1971
+  }
+define-object
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+SYM: notecards-in-a-nutshell
+  {
+    type paper
+    authors { frank-g-halasz thomas-p-moran randall-h-trigg }
+    date 1987
+  }
+define-object
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+SYM: the-evolution-of-forth-excerpt-2-1-1
+  {
+    type excerpt
+    source the-evolution-of-forth
+    chapter 2
+    section 1
+    paragraph 1
+    content
+    "Moore developed the first complete, stand-alone implementation of Forth in 1971 for the 11-meter radio telescope operated by the National Radio Astronomy Observatory (NRAO) at Kitt Peak, Arizona. This system ran on two early minicomputers (a 16 KB DDP-116 and a 32 KB H316) joined by a serial link. Both a multiprogrammed system and a multiprocessor system (in that both computers shared responsibility for controlling the telescope and its scientific instruments), it was responsible for pointing and tracking the telescope, collecting data and recording it on magnetic tape, and supporting an interactive graphics terminal on which an astronomer could analyze previously recorded data. The multiprogrammed nature of the system allowed all these functions to be performed concurrently, without timing conflicts or other interference."
+    subjects { chuck-moore first-complete-stand-alone-forth }
+  }
+define-object
+
diff --git a/unmaintained/obj/print/print.factor b/unmaintained/obj/print/print.factor
new file mode 100644 (file)
index 0000000..000e161
--- /dev/null
@@ -0,0 +1,37 @@
+
+USING: kernel arrays strings sequences assocs io io.styles prettyprint colors
+       combinators.conditional ;
+
+IN: obj.print
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: write-wrapped ( string -- ) H{ { wrap-margin 500 } } [ write ] with-nesting ;
+
+! : print-elt ( val -- )
+!   {
+!     { [ string? ] [ write-wrapped ] }
+!     { [ array?  ] [ [ . ] each    ] }
+!     { [ drop t  ] [ . ] }
+!   }
+!   1cond ;
+
+USING: accessors vocabs help.markup ;
+
+: print-elt ( val -- )
+  {
+    { [ vocab?  ] [ [ name>> ] [ ] bi write-object ] }
+    { [ string? ] [ write-wrapped ] }
+    { [ array?  ] [ [ . ] each    ] }
+    { [ drop t  ] [ . ] }
+  }
+  1cond ;
+
+: print-grid ( grid -- )
+  H{ { table-gap { 10 10 } } { table-border T{ rgba f 0 0 0 1 } } }
+  [ [ [ [ [ print-elt ] with-cell ] each ] with-row ] each ] tabular-output ;
+
+: print-table ( assoc -- ) >alist print-grid ;
+
+: print-seq ( seq -- ) [ 1array ] map print-grid ;
+
diff --git a/unmaintained/obj/util/util.factor b/unmaintained/obj/util/util.factor
new file mode 100644 (file)
index 0000000..086fcd1
--- /dev/null
@@ -0,0 +1,8 @@
+
+USING: kernel parser words ;
+
+IN: obj.util
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: SYM: CREATE-WORD dup define-symbol parsed ; parsing
\ No newline at end of file
diff --git a/unmaintained/obj/view/view.factor b/unmaintained/obj/view/view.factor
new file mode 100644 (file)
index 0000000..cf5ca33
--- /dev/null
@@ -0,0 +1,52 @@
+
+USING: kernel words namespaces arrays sequences prettyprint
+       help.topics help.markup bake combinators.cleave
+       obj obj.misc obj.print ;
+
+IN: obj.view
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+: $tab ( seq -- ) first print-table ;
+: $obj ( seq -- ) first print-table ;
+: $seq ( seq -- ) first print-seq   ;
+: $ptr ( seq -- ) first get print-table ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+PREDICATE: obj-type < symbol types member? ;
+
+M: obj-type article-title ( type -- title ) unparse ;
+
+M: obj-type article-content ( type -- content )
+   objects [ type -> = ] with filter
+   { $seq , } bake ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+M: ptr article-title ( ptr -- title ) [ title -> ] [ unparse ] bi or ;
+
+M: ptr article-content ( ptr -- content )
+   {
+     [ get     { $obj , } bake ]
+     [ drop { $heading "Related\n" } ]
+     [ related { $seq , } bake ]
+   }
+   1arr ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+PREDICATE: obj-list < word \ objects = ;
+
+M: obj-list article-title ( objects -- title ) drop "Objects" ;
+
+! M: obj-list article-content ( objects -- title )
+!    execute
+!    [ [ type -> ] [ ] bi 2array ] map
+!    { $tab , } bake ;
+
+M: obj-list article-content ( objects -- title )
+   drop
+   objects
+   [ [ type -> ] [ ] bi 2array ] map
+   { $tab , } bake ;
\ No newline at end of file