ditch map, rename inject to map
parent
502dc2472f
commit
9148e6b629
|
|
@ -1,3 +1,12 @@
|
||||||
|
- plugin should not exit jEdit on fatal errors
|
||||||
|
- auto insert USE:
|
||||||
|
- add a socket timeout
|
||||||
|
- read# and eof
|
||||||
|
- don't allow multiple reads on the same port
|
||||||
|
- multiple tasks should be able to write to the same port
|
||||||
|
- prettyprinting an empty vector
|
||||||
|
- jvm factor -- still supporting httpd?
|
||||||
|
|
||||||
+ docs:
|
+ docs:
|
||||||
|
|
||||||
- unparse examples
|
- unparse examples
|
||||||
|
|
@ -5,7 +14,7 @@
|
||||||
- recursion -vs- iteration in vectors chapter
|
- recursion -vs- iteration in vectors chapter
|
||||||
- objects chapter covering namespaces, hashtables, equality and
|
- objects chapter covering namespaces, hashtables, equality and
|
||||||
object identity.
|
object identity.
|
||||||
=
|
|
||||||
+ tests:
|
+ tests:
|
||||||
|
|
||||||
- java factor: equal numbers have non-equal hashcodes!
|
- java factor: equal numbers have non-equal hashcodes!
|
||||||
|
|
@ -20,8 +29,6 @@
|
||||||
- maple-like: press enter at old commands to evaluate there
|
- maple-like: press enter at old commands to evaluate there
|
||||||
- make inferior.factor nicer to use
|
- make inferior.factor nicer to use
|
||||||
- input style after clicking link
|
- input style after clicking link
|
||||||
- plugin should not exit jEdit on fatal errors
|
|
||||||
- auto insert USE:
|
|
||||||
- plugin not unloaded
|
- plugin not unloaded
|
||||||
- listener backspace overzealous
|
- listener backspace overzealous
|
||||||
- completion in the listener
|
- completion in the listener
|
||||||
|
|
@ -30,17 +37,13 @@
|
||||||
|
|
||||||
+ native:
|
+ native:
|
||||||
|
|
||||||
- add a socket timeout
|
|
||||||
- read1
|
- read1
|
||||||
- telnetd and httpd should use multitasking
|
- telnetd and httpd should use multitasking
|
||||||
- read# and eof
|
|
||||||
- sbuf-hashcode
|
- sbuf-hashcode
|
||||||
- vector-hashcode
|
- vector-hashcode
|
||||||
- clarify suspend -vs- yield - toplevel
|
- clarify suspend -vs- yield - toplevel
|
||||||
- irc: stack underflow?
|
- irc: stack underflow?
|
||||||
- ignore SIGPIPE
|
- ignore SIGPIPE
|
||||||
- don't allow multiple reads on the same port
|
|
||||||
- multiple tasks should be able to write to the same port
|
|
||||||
- accept multi-line input in listener
|
- accept multi-line input in listener
|
||||||
- gc call in the middle of some ops might affect callstack
|
- gc call in the middle of some ops might affect callstack
|
||||||
- better i/o scheduler
|
- better i/o scheduler
|
||||||
|
|
@ -61,14 +64,12 @@
|
||||||
|
|
||||||
+ misc:
|
+ misc:
|
||||||
|
|
||||||
- ifte* and keep combinators
|
- ifte* combinator
|
||||||
- 'cascading' styles
|
- 'cascading' styles
|
||||||
- jedit ==> jedit-word, jedit takes a file name
|
- jedit ==> jedit-word, jedit takes a file name
|
||||||
- some way to run httpd from command line
|
- some way to run httpd from command line
|
||||||
- prettyprinting an empty vector
|
|
||||||
- rethink strhead/strtail&co
|
- rethink strhead/strtail&co
|
||||||
- namespace clone drops static var bindings
|
- namespace clone drops static var bindings
|
||||||
- ditch map
|
|
||||||
- ditch expand
|
- ditch expand
|
||||||
- set-object-path
|
- set-object-path
|
||||||
- more readable traces
|
- more readable traces
|
||||||
|
|
|
||||||
|
|
@ -256,7 +256,7 @@ DEFER: tree-contains?
|
||||||
2drop
|
2drop
|
||||||
] ifte ; inline interpret-only
|
] ifte ; inline interpret-only
|
||||||
|
|
||||||
: inject ( list code -- list )
|
: map ( list code -- list )
|
||||||
#! Applies the code to each item, returns a list that
|
#! Applies the code to each item, returns a list that
|
||||||
#! contains the result of each application.
|
#! contains the result of each application.
|
||||||
#!
|
#!
|
||||||
|
|
@ -298,7 +298,7 @@ DEFER: tree-contains?
|
||||||
inline interpret-only
|
inline interpret-only
|
||||||
|
|
||||||
: substitute ( new old list -- list )
|
: substitute ( new old list -- list )
|
||||||
[ 2dup = [ drop over ] when ] inject nip nip ;
|
[ 2dup = [ drop over ] when ] map nip nip ;
|
||||||
|
|
||||||
: (head) ( accum list n -- last list )
|
: (head) ( accum list n -- last list )
|
||||||
dup 1 = [ drop ] [ pred >r copy-cons r> (head) ] ifte ;
|
dup 1 = [ drop ] [ pred >r copy-cons r> (head) ] ifte ;
|
||||||
|
|
|
||||||
|
|
@ -51,10 +51,10 @@ USE: stack
|
||||||
#! The value n must be odd.
|
#! The value n must be odd.
|
||||||
pred >r over - r> dup succ count [
|
pred >r over - r> dup succ count [
|
||||||
>r 3dup r> swap / * +
|
>r 3dup r> swap / * +
|
||||||
] inject >r 3drop r> ;
|
] map >r 3drop r> ;
|
||||||
|
|
||||||
: y-values ( lower upper n quot -- values )
|
: y-values ( lower upper n quot -- values )
|
||||||
>r x-values r> inject ;
|
>r x-values r> map ;
|
||||||
|
|
||||||
: (simpson) ( lower upper n quot -- value )
|
: (simpson) ( lower upper n quot -- value )
|
||||||
over multipliers >r y-values r> *|+ ;
|
over multipliers >r y-values r> *|+ ;
|
||||||
|
|
|
||||||
|
|
@ -52,8 +52,8 @@ USE: parser
|
||||||
"/library/platform/jvm/errors.factor" run-resource ! errors
|
"/library/platform/jvm/errors.factor" run-resource ! errors
|
||||||
"/library/platform/jvm/namespaces.factor" run-resource ! namespaces
|
"/library/platform/jvm/namespaces.factor" run-resource ! namespaces
|
||||||
"/library/namespaces.factor" run-resource ! namespaces
|
"/library/namespaces.factor" run-resource ! namespaces
|
||||||
"/library/sbuf.factor" run-resource ! strings
|
|
||||||
"/library/list-namespaces.factor" run-resource ! namespaces
|
"/library/list-namespaces.factor" run-resource ! namespaces
|
||||||
|
"/library/sbuf.factor" run-resource ! strings
|
||||||
"/library/math/namespace-math.factor" run-resource ! arithmetic
|
"/library/math/namespace-math.factor" run-resource ! arithmetic
|
||||||
"/library/continuations.factor" run-resource ! continuations
|
"/library/continuations.factor" run-resource ! continuations
|
||||||
"/library/errors.factor" run-resource ! errors
|
"/library/errors.factor" run-resource ! errors
|
||||||
|
|
|
||||||
|
|
@ -41,13 +41,3 @@ USE: stack
|
||||||
restack
|
restack
|
||||||
call
|
call
|
||||||
unstack ; interpret-only
|
unstack ; interpret-only
|
||||||
|
|
||||||
IN: lists
|
|
||||||
DEFER: each
|
|
||||||
|
|
||||||
: map ( [ items ] [ code ] -- [ mapping ] )
|
|
||||||
#! Applies the code to each item, returns a list that
|
|
||||||
#! contains the result of each application.
|
|
||||||
#!
|
|
||||||
#! This combinator will not compile.
|
|
||||||
unit cons restack each unstack ; inline interpret-only
|
|
||||||
|
|
|
||||||
|
|
@ -85,14 +85,14 @@ USE: words
|
||||||
: effect>list ( effect -- list )
|
: effect>list ( effect -- list )
|
||||||
[ "inD" "outD" "inR" "outR" ]
|
[ "inD" "outD" "inR" "outR" ]
|
||||||
[ dupd "factor.compiler.StackEffect" swap jvar-get ]
|
[ dupd "factor.compiler.StackEffect" swap jvar-get ]
|
||||||
inject nip ;
|
map nip ;
|
||||||
|
|
||||||
: effect>typelist ( effect -- list )
|
: effect>typelist ( effect -- list )
|
||||||
[ "inDtypes" "outDtypes" "inRtypes" "outRtypes" ]
|
[ "inDtypes" "outDtypes" "inRtypes" "outRtypes" ]
|
||||||
[
|
[
|
||||||
dupd "factor.compiler.StackEffect" swap jvar-get
|
dupd "factor.compiler.StackEffect" swap jvar-get
|
||||||
array>list [ class-name ] inject
|
array>list [ class-name ] map
|
||||||
] inject nip ;
|
] map nip ;
|
||||||
|
|
||||||
: balance ( code -- effect )
|
: balance ( code -- effect )
|
||||||
#! Push stack effect of a quotation.
|
#! Push stack effect of a quotation.
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,6 @@ IN: init
|
||||||
USE: combinators
|
USE: combinators
|
||||||
USE: compiler
|
USE: compiler
|
||||||
USE: continuations
|
USE: continuations
|
||||||
USE: httpd-responder
|
|
||||||
USE: kernel
|
USE: kernel
|
||||||
USE: lists
|
USE: lists
|
||||||
USE: interpreter
|
USE: interpreter
|
||||||
|
|
@ -73,7 +72,6 @@ USE: words
|
||||||
init-scratchpad
|
init-scratchpad
|
||||||
init-styles
|
init-styles
|
||||||
init-vocab-styles
|
init-vocab-styles
|
||||||
default-responders
|
|
||||||
"args" get parse-command-line
|
"args" get parse-command-line
|
||||||
run-user-init
|
run-user-init
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ USE: unparser
|
||||||
uncons >r " " swap cat3 r> cons ;
|
uncons >r " " swap cat3 r> cons ;
|
||||||
|
|
||||||
: <actions-menu> ( path -- alist )
|
: <actions-menu> ( path -- alist )
|
||||||
unparse actions [ dupd <action-menu-item> ] inject nip ;
|
unparse actions [ dupd <action-menu-item> ] map nip ;
|
||||||
|
|
||||||
: underline-attribute ( attribute-set -- )
|
: underline-attribute ( attribute-set -- )
|
||||||
t "Underline" swing-attribute+ ;
|
t "Underline" swing-attribute+ ;
|
||||||
|
|
|
||||||
|
|
@ -82,8 +82,8 @@ DEFER: >n
|
||||||
[ swap car swap car str-lexi> ] sort ;
|
[ swap car swap car str-lexi> ] sort ;
|
||||||
|
|
||||||
: vars-values ( -- list ) namespace hash>alist alist-sort ;
|
: vars-values ( -- list ) namespace hash>alist alist-sort ;
|
||||||
: vars ( -- list ) vars-values [ car ] inject ;
|
: vars ( -- list ) vars-values [ car ] map ;
|
||||||
: values ( -- list ) vars-values [ cdr ] inject ;
|
: values ( -- list ) vars-values [ cdr ] map ;
|
||||||
|
|
||||||
! We don't have bound objects in native Factor.
|
! We don't have bound objects in native Factor.
|
||||||
: namespace? hashtable? ;
|
: namespace? hashtable? ;
|
||||||
|
|
|
||||||
|
|
@ -70,14 +70,14 @@ USE: words
|
||||||
|
|
||||||
! We had a problem with JVM stack overflow...
|
! We had a problem with JVM stack overflow...
|
||||||
|
|
||||||
: null-inject [ ] inject ; word must-compile
|
: null-map [ ] map ; word must-compile
|
||||||
|
|
||||||
! And a problem with stack normalization after ifte if both
|
! And a problem with stack normalization after ifte if both
|
||||||
! datastack and callstack were in use...
|
! datastack and callstack were in use...
|
||||||
|
|
||||||
: inject-test [ dup [ ] when ] inject ; word must-compile
|
: map-test [ dup [ ] when ] map ; word must-compile
|
||||||
|
|
||||||
[ [ 1 2 3 ] ] [ [ 1 2 3 ] ] [ inject-test ] test-word
|
[ [ 1 2 3 ] ] [ [ 1 2 3 ] ] [ map-test ] test-word
|
||||||
|
|
||||||
: nested-test-iter f [ nested-test-iter ] when ;
|
: nested-test-iter f [ nested-test-iter ] when ;
|
||||||
: nested-test f nested-test-iter drop ; word must-compile
|
: nested-test f nested-test-iter drop ; word must-compile
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue