use ${ in a couple of places, use output>array
parent
3e640e9cd6
commit
cd87988ab3
|
@ -4,7 +4,7 @@
|
||||||
USING: accessors arrays ascii assocs calendar combinators fry kernel
|
USING: accessors arrays ascii assocs calendar combinators fry kernel
|
||||||
generalizations io io.encodings.ascii io.files io.streams.string
|
generalizations io io.encodings.ascii io.files io.streams.string
|
||||||
macros math math.functions math.parser peg.ebnf quotations
|
macros math math.functions math.parser peg.ebnf quotations
|
||||||
sequences splitting strings unicode.case vectors ;
|
sequences splitting strings unicode.case vectors combinators.smart ;
|
||||||
|
|
||||||
IN: formatting
|
IN: formatting
|
||||||
|
|
||||||
|
@ -113,7 +113,6 @@ MACRO: printf ( format-string -- )
|
||||||
: sprintf ( format-string -- result )
|
: sprintf ( format-string -- result )
|
||||||
[ printf ] with-string-writer ; inline
|
[ printf ] with-string-writer ; inline
|
||||||
|
|
||||||
|
|
||||||
<PRIVATE
|
<PRIVATE
|
||||||
|
|
||||||
: pad-00 ( n -- string ) number>string 2 CHAR: 0 pad-head ; inline
|
: pad-00 ( n -- string ) number>string 2 CHAR: 0 pad-head ; inline
|
||||||
|
@ -129,12 +128,15 @@ MACRO: printf ( format-string -- )
|
||||||
[ pad-00 ] map "/" join ; inline
|
[ pad-00 ] map "/" join ; inline
|
||||||
|
|
||||||
: >datetime ( timestamp -- string )
|
: >datetime ( timestamp -- string )
|
||||||
{ [ day-of-week day-abbreviation3 ]
|
[
|
||||||
|
{
|
||||||
|
[ day-of-week day-abbreviation3 ]
|
||||||
[ month>> month-abbreviation ]
|
[ month>> month-abbreviation ]
|
||||||
[ day>> pad-00 ]
|
[ day>> pad-00 ]
|
||||||
[ >time ]
|
[ >time ]
|
||||||
[ year>> number>string ]
|
[ year>> number>string ]
|
||||||
} cleave 5 narray " " join ; inline
|
} cleave
|
||||||
|
] output>array " " join ; inline
|
||||||
|
|
||||||
: (week-of-year) ( timestamp day -- n )
|
: (week-of-year) ( timestamp day -- n )
|
||||||
[ dup clone 1 >>month 1 >>day day-of-week dup ] dip > [ 7 swap - ] when
|
[ dup clone 1 >>month 1 >>day day-of-week dup ] dip > [ 7 swap - ] when
|
||||||
|
@ -187,5 +189,3 @@ PRIVATE>
|
||||||
MACRO: strftime ( format-string -- )
|
MACRO: strftime ( format-string -- )
|
||||||
parse-strftime [ length ] keep [ ] join
|
parse-strftime [ length ] keep [ ] join
|
||||||
'[ _ <vector> @ reverse concat nip ] ;
|
'[ _ <vector> @ reverse concat nip ] ;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
USING: alien.c-types kernel locals math math.bitwise
|
USING: alien.c-types kernel locals math math.bitwise
|
||||||
windows.kernel32 sequences byte-arrays unicode.categories
|
windows.kernel32 sequences byte-arrays unicode.categories
|
||||||
io.encodings.string io.encodings.utf16n alien.strings
|
io.encodings.string io.encodings.utf16n alien.strings
|
||||||
arrays ;
|
arrays literals ;
|
||||||
IN: windows.errors
|
IN: windows.errors
|
||||||
|
|
||||||
CONSTANT: ERROR_SUCCESS 0
|
CONSTANT: ERROR_SUCCESS 0
|
||||||
|
@ -732,11 +732,13 @@ ERROR: error-message-failed id ;
|
||||||
win32-error-string throw
|
win32-error-string throw
|
||||||
] when ;
|
] when ;
|
||||||
|
|
||||||
: expected-io-errors ( -- seq )
|
CONSTANT: expected-io-errors
|
||||||
|
${
|
||||||
ERROR_SUCCESS
|
ERROR_SUCCESS
|
||||||
ERROR_IO_INCOMPLETE
|
ERROR_IO_INCOMPLETE
|
||||||
ERROR_IO_PENDING
|
ERROR_IO_PENDING
|
||||||
WAIT_TIMEOUT 4array ; foldable
|
WAIT_TIMEOUT
|
||||||
|
}
|
||||||
|
|
||||||
: expected-io-error? ( error-code -- ? )
|
: expected-io-error? ( error-code -- ? )
|
||||||
expected-io-errors member? ;
|
expected-io-errors member? ;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
USING: kernel opengl opengl.demo-support opengl.gl opengl.textures
|
USING: kernel opengl opengl.demo-support opengl.gl opengl.textures
|
||||||
opengl.shaders opengl.framebuffers opengl.capabilities multiline
|
opengl.shaders opengl.framebuffers opengl.capabilities multiline
|
||||||
ui.gadgets accessors sequences ui.render ui math locals arrays
|
ui.gadgets accessors sequences ui.render ui math locals arrays
|
||||||
generalizations combinators ui.gadgets.worlds ;
|
generalizations combinators ui.gadgets.worlds literals ;
|
||||||
IN: spheres
|
IN: spheres
|
||||||
|
|
||||||
STRING: plane-vertex-shader
|
STRING: plane-vertex-shader
|
||||||
|
@ -136,12 +136,14 @@ M: spheres-gadget distance-step ( gadget -- dz )
|
||||||
GL_TEXTURE_CUBE_MAP GL_TEXTURE_WRAP_S GL_CLAMP glTexParameteri
|
GL_TEXTURE_CUBE_MAP GL_TEXTURE_WRAP_S GL_CLAMP glTexParameteri
|
||||||
GL_TEXTURE_CUBE_MAP GL_TEXTURE_WRAP_T GL_CLAMP glTexParameteri
|
GL_TEXTURE_CUBE_MAP GL_TEXTURE_WRAP_T GL_CLAMP glTexParameteri
|
||||||
GL_TEXTURE_CUBE_MAP GL_TEXTURE_WRAP_R GL_CLAMP glTexParameteri
|
GL_TEXTURE_CUBE_MAP GL_TEXTURE_WRAP_R GL_CLAMP glTexParameteri
|
||||||
|
${
|
||||||
GL_TEXTURE_CUBE_MAP_POSITIVE_X
|
GL_TEXTURE_CUBE_MAP_POSITIVE_X
|
||||||
GL_TEXTURE_CUBE_MAP_POSITIVE_Y
|
GL_TEXTURE_CUBE_MAP_POSITIVE_Y
|
||||||
GL_TEXTURE_CUBE_MAP_POSITIVE_Z
|
GL_TEXTURE_CUBE_MAP_POSITIVE_Z
|
||||||
GL_TEXTURE_CUBE_MAP_NEGATIVE_X
|
GL_TEXTURE_CUBE_MAP_NEGATIVE_X
|
||||||
GL_TEXTURE_CUBE_MAP_NEGATIVE_Y
|
GL_TEXTURE_CUBE_MAP_NEGATIVE_Y
|
||||||
GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 6 narray
|
GL_TEXTURE_CUBE_MAP_NEGATIVE_Z
|
||||||
|
}
|
||||||
[ 0 GL_RGBA8 (reflection-dim) 0 GL_RGBA GL_UNSIGNED_BYTE f glTexImage2D ]
|
[ 0 GL_RGBA8 (reflection-dim) 0 GL_RGBA GL_UNSIGNED_BYTE f glTexImage2D ]
|
||||||
each
|
each
|
||||||
] keep ;
|
] keep ;
|
||||||
|
|
Loading…
Reference in New Issue