better 'see'

cvs
Slava Pestov 2004-08-18 03:09:16 +00:00
parent 8fc64f119e
commit c8cc64b031
6 changed files with 70 additions and 63 deletions

View File

@ -1,31 +1,27 @@
- gc call in the middle of some ops might affect callstack - bitwise operations
- clone-hashtable
- sidekick: error source not removed
- lineno/file for native
- jedit for native with socket communication
- input style after clicking link
- fedit broken with listener
- maple-like: press enter at old commands to evaluate there
- sending ^C on socket - sending ^C on socket
- postpone errors until actual read/write op - read#
- describe-word
- enforce bottom-up in native bootstrap
- standalone listener input style
- log-client: fix for native
- add a socket timeout
+ docs:
- vector-each/map examples - vector-each/map examples
- unparse examples - unparse examples
- finish second practical - finish second practical
- sbuf-hashcode - sbuf-hashcode
- vector-hashcode - vector-hashcode
- listener backspace overzealous
- multitasking
- review doc formatting with latex2html - review doc formatting with latex2html
- sidekick: error source not removed
[error] AWT-EventQueue-0: java.lang.NullPointerException
[error] AWT-EventQueue-0: at sidekick.SideKickParsedData.getTreePathForPosition(Unknown Source)
[error] AWT-EventQueue-0: at sidekick.SideKickParsedData.getTreePathForPosition(Unknown Source)
[error] AWT-EventQueue-0: at sidekick.SideKickTree.expandTreeAt(Unknown Source)
[error] AWT-EventQueue-0: at sidekick.SideKickTree.access$100(Unknown Source)
[error] AWT-EventQueue-0: at sidekick.SideKickTree$1.actionPerformed(Unknown Source)
[error] AWT-EventQueue-0: at javax.swing.Timer.fireActionPerformed(Timer.java:271)
[error] AWT-EventQueue-0: at javax.swing.Timer$DoPostEvent.run(Timer.java:201)
[error] AWT-EventQueue-0: at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
[error] AWT-EventQueue-0: at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
[error] AWT-EventQueue-0: at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
[error] AWT-EventQueue-0: at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
[error] AWT-EventQueue-0: at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
[error] AWT-EventQueue-0: at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
[error] AWT-EventQueue-0: at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
+ tests: + tests:
@ -33,34 +29,24 @@
- FactorLib.equal() not very good - FactorLib.equal() not very good
- do nset-nth, nremove-nth, nsubstitute, ninject - do nset-nth, nremove-nth, nsubstitute, ninject
- IN: format base: work with all types of numbers - IN: format base: work with all types of numbers
- bitwise operations
- rethink strhead/strtail&co
+ listener/plugin: + listener/plugin:
- lineno/file for native - listener backspace overzealous
- jedit for native with socket communication
- lineno/file for shuffle defs - lineno/file for shuffle defs
- balance needs USE: - balance needs USE:
- input style after clicking link
- completion: enter no good - completion: enter no good
- completion: don't show automatically - completion: don't show automatically
- completion in the listener - completion in the listener
- special completion for USE:/IN: - special completion for USE:/IN:
- fedit broken with listener
- maple-like: press enter at old commands to evaluate there
- inspector links when describe called without object path - inspector links when describe called without object path
+ native: + native:
- read# - gc call in the middle of some ops might affect callstack
- postpone errors until actual read/write op
- multitasking
- parsing should be parsing - parsing should be parsing
- see: show word flags and IN:
- describe-word
- contains ==> contains?
- telnetd: send errors on socket
- enforce bottom-up in native bootstrap
+ JVM compiler: + JVM compiler:
@ -77,21 +63,23 @@
+ misc: + misc:
- rethink strhead/strtail&co
- namespace clone drops static var bindings - namespace clone drops static var bindings
- ditch map - ditch map
- ditch expand - ditch expand
- set-object-path - set-object-path
- more readable traces - more readable traces
- 'cascading' styles - 'cascading' styles
- standalone listener input style - telnetd: send errors on socket
- contains ==> contains?
+ httpd: + httpd:
- log-client: fix for native - file responder:
- port to native
- if a directory is requested and URL does not end with /, redirect
- if user clicks stop in browser, doesn't stop sending? - if user clicks stop in browser, doesn't stop sending?
- log with date - log with date
- add a socket timeout
- if a directory is requested and URL does not end with /, redirect
- return more header fields, like Content-Length, Last-Modified, and so on - return more header fields, like Content-Length, Last-Modified, and so on
- HEAD request - HEAD request
- basic authentication, using httpdAuth function from a config file - basic authentication, using httpdAuth function from a config file

View File

@ -58,6 +58,10 @@ USE: httpd
: serving-text ( -- ) : serving-text ( -- )
"200 Document follows" "text/plain" response print ; "200 Document follows" "text/plain" response print ;
: redirect ( to -- )
"301 Moved Permanently" "text/plain" response write
"Location: " write print ;
: get-responder ( name -- responder ) : get-responder ( name -- responder )
"httpd-responders" get get* ; "httpd-responders" get get* ;
@ -80,9 +84,15 @@ USE: httpd
"Calling responder " swap cat2 log ; "Calling responder " swap cat2 log ;
: serve-responder ( argument method -- ) : serve-responder ( argument method -- )
over log-responder swap
swap trim-/ "/" split1 over get-responder dup [ dup log-responder
trim-/ "/" split1 dup [
over get-responder dup [
rot drop call-responder rot drop call-responder
] [ ] [
2drop no-such-responder drop 2drop no-such-responder drop
] ifte
] [
! Argument is just a responder name without /
drop "/" swap "/" cat3 redirect drop
] ifte ; ] ifte ;

View File

@ -35,16 +35,11 @@ USE: unparser
USE: words USE: words
: see-compound ( word -- ) : see-compound ( word -- )
0 swap dup word-parameter 0 swap dup word-parameter prettyprint-:;
[
[ prettyprint-: ] dip prettyprint-word
dup prettyprint-newline
] dip
prettyprint-list prettyprint-;
prettyprint-newline ; prettyprint-newline ;
: see-primitive ( word -- ) : see-primitive ( word -- )
"Primitive: " write unparse print ; "PRIMITIVE: " write unparse print ;
: see-undefined ( word -- ) : see-undefined ( word -- )
drop "Not defined" print ; drop "Not defined" print ;

View File

@ -174,6 +174,20 @@ DEFER: prettyprint*
: prettyprint ( obj -- ) : prettyprint ( obj -- )
0 swap prettyprint* drop terpri ; 0 swap prettyprint* drop terpri ;
: vocab-link ( vocab -- link )
<% "vocabularies'" % % %> ;
: vocab-attrs ( word -- attrs )
default-style clone [ vocab-link "link" set ] extend ;
: prettyprint-vocab ( vocab -- )
dup vocab-attrs [ write-attr ] bind ;
: prettyprint-IN: ( indent word -- indent )
"IN:" write prettyprint-space
word-vocabulary prettyprint-vocab
dup prettyprint-newline ;
: prettyprint-: ( indent -- indent ) : prettyprint-: ( indent -- indent )
":" write prettyprint-space ":" write prettyprint-space
tab-size + ; tab-size + ;
@ -182,11 +196,18 @@ DEFER: prettyprint*
";" write ";" write
tab-size - ; tab-size - ;
: prettyprint-plist ( word -- )
"parsing" over word-property [ " parsing" write ] when
"inline" over word-property [ " inline" write ] when
drop ;
: prettyprint-:; ( indent word list -- indent ) : prettyprint-:; ( indent word list -- indent )
>r over >r >r dup
>r prettyprint-: r> >r prettyprint-IN: prettyprint-: r>
prettyprint-word prettyprint-space r> prettyprint-word
prettyprint-list prettyprint-; ; native? [ dup prettyprint-newline ] [ prettyprint-space ] ifte
r>
prettyprint-list prettyprint-; r> prettyprint-plist ;
: . ( obj -- ) : . ( obj -- )
[ [

View File

@ -62,10 +62,3 @@ USE: url-encoding
[ ] [ "GET /index.html" parse-request ] unit-test [ ] [ "GET /index.html" parse-request ] unit-test
[ ] [ "GET ../index.html" parse-request ] unit-test [ ] [ "GET ../index.html" parse-request ] unit-test
[ ] [ "POO" parse-request ] unit-test [ ] [ "POO" parse-request ] unit-test
[ ] [ "/" "get" ] [ serve-responder ] test-word
[ ] [ "" "get" ] [ serve-responder ] test-word
[ ] [ "does-not-exist!" "get" ] [ serve-responder ] test-word
[ ] [ "does-not-exist!/" "get" ] [ serve-responder ] test-word
[ ] [ "inspect/global" "get" ] [ serve-responder ] test-word

View File

@ -36,10 +36,10 @@ USE: stack
: word-name ( word -- name ) : word-name ( word -- name )
"name" swap word-property ; "name" swap word-property ;
: set-word-name ( word -- vocab ) : set-word-name ( word name -- )
"name" swap set-word-property ; "name" swap set-word-property ;
: word-vocabulary ( word name -- ) : word-vocabulary ( word -- vocab )
"vocabulary" swap word-property ; "vocabulary" swap word-property ;
: set-word-vocabulary ( word vocab -- ) : set-word-vocabulary ( word vocab -- )