diff --git a/core/io/files/files.factor b/core/io/files/files.factor index 5de86d0baa..a6320a7507 100755 --- a/core/io/files/files.factor +++ b/core/io/files/files.factor @@ -86,16 +86,10 @@ SYMBOL: +unknown+ : stat ( path -- directory? permissions length modified ) normalize-pathname (stat) ; -! : file-length ( path -- n ) stat drop 2nip ; - : file-modified ( path -- n ) stat >r 3drop r> ; -! : file-permissions ( path -- perm ) stat 2drop nip ; - : exists? ( path -- ? ) file-modified >boolean ; -! : directory? ( path -- ? ) stat 3drop ; - : directory? ( path -- ? ) file-info file-info-type +directory+ = ; ! Current working directory diff --git a/extra/builder/benchmark/benchmark.factor b/extra/builder/benchmark/benchmark.factor index 444e5b6ea7..2f38462976 100644 --- a/extra/builder/benchmark/benchmark.factor +++ b/extra/builder/benchmark/benchmark.factor @@ -4,10 +4,12 @@ USING: kernel continuations arrays assocs sequences sorting math IN: builder.benchmark -: passing-benchmarks ( table -- table ) - [ second first2 number? swap number? and ] subset ; +! : passing-benchmarks ( table -- table ) +! [ second first2 number? swap number? and ] subset ; -: simplify-table ( table -- table ) [ first2 second 2array ] map ; +: passing-benchmarks ( table -- table ) [ second number? ] subset ; + +! : simplify-table ( table -- table ) [ first2 second 2array ] map ; : benchmark-difference ( old-table benchmark-result -- result-diff ) first2 >r @@ -17,7 +19,7 @@ IN: builder.benchmark 2array ; : compare-tables ( old new -- table ) - [ passing-benchmarks simplify-table ] 2apply + [ passing-benchmarks ] 2apply [ benchmark-difference ] with map ; : benchmark-deltas ( -- table ) diff --git a/extra/opengl/gl/gl-docs.factor b/extra/opengl/gl/gl-docs.factor index 84004cbbdf..f244b4d119 100644 --- a/extra/opengl/gl/gl-docs.factor +++ b/extra/opengl/gl/gl-docs.factor @@ -5,7 +5,8 @@ IN: opengl.gl ARTICLE: "opengl-low-level" "OpenGL Library (low level)" { $subsection "opengl-specifying-vertices" } - { $subsection "opengl-geometric-primitives" } ; + { $subsection "opengl-geometric-primitives" } + { $subsection "opengl-modeling-transformations" } ; ARTICLE: "opengl-specifying-vertices" "Specifying Vertices" @@ -67,4 +68,18 @@ HELP: glPolygonMode { $list { $link GL_POINT } { $link GL_LINE } - { $link GL_FILL } } } } } ; \ No newline at end of file + { $link GL_FILL } } } } } ; + +ARTICLE: "opengl-modeling-transformations" "Modeling Transformations" + { $subsection glTranslatef } + { $subsection glTranslated } + { $subsection glRotatef } + { $subsection glRotated } + { $subsection glScalef } + { $subsection glScaled } ; + + +{ glTranslatef glTranslated glRotatef glRotated glScalef glScaled } +related-words + + diff --git a/misc/factor.el b/misc/factor.el index 5515476c22..7513c3640d 100644 --- a/misc/factor.el +++ b/misc/factor.el @@ -158,6 +158,11 @@ (insert str) (comint-send-input)))) +(defun factor-send-definition () + (interactive) + (factor-send-region (search-backward ":") + (search-forward ";"))) + (defun factor-see () (interactive) (comint-send-string "*factor*" "\\ ") @@ -187,6 +192,7 @@ (define-key factor-mode-map "\C-c\C-f" 'factor-run-file) (define-key factor-mode-map "\C-c\C-r" 'factor-send-region) +(define-key factor-mode-map "\C-c\C-d" 'factor-send-definition) (define-key factor-mode-map "\C-c\C-s" 'factor-see) (define-key factor-mode-map "\C-ce" 'factor-edit) (define-key factor-mode-map "\C-c\C-h" 'factor-help) @@ -211,4 +217,6 @@ (defun factor-refresh-all () (interactive) - (comint-send-string "*factor*" "refresh-all\n")) \ No newline at end of file + (comint-send-string "*factor*" "refresh-all\n")) + +