]> gitweb.factorcode.org Git - factor.git/commitdiff
Merge branch 'master' of git://factorcode.org/git/factor
authorJoe Groff <arcata@gmail.com>
Thu, 13 Mar 2008 03:52:00 +0000 (20:52 -0700)
committerJoe Groff <arcata@gmail.com>
Thu, 13 Mar 2008 03:52:00 +0000 (20:52 -0700)
Conflicts:

extra/combinators/lib/lib.factor

1  2 
extra/combinators/lib/lib.factor
extra/opengl/shaders/shaders.factor

index f73a99c1a2f22b81862d8386c3186f79af841a44,f65b94dc115a680f86d04fdc1332794029880b98..99386272f39df4180a07f9cbbd4430e5ff60914f
@@@ -3,7 -3,8 +3,8 @@@
  ! See http://factorcode.org/license.txt for BSD license.
  USING: kernel combinators namespaces quotations hashtables
  sequences assocs arrays inference effects math math.ranges
- arrays.lib shuffle macros bake combinators.cleave ;
+ arrays.lib shuffle macros bake combinators.cleave
+ continuations ;
  
  IN: combinators.lib
  
@@@ -168,9 -169,5 +169,12 @@@ MACRO: construct-slots ( assoc tuple-cl
  : and? ( obj quot1 quot2 -- ? )
      >r keep r> rot [ call ] [ 2drop f ] if ; inline
  
 +MACRO: multikeep ( word out-indexes -- ... )
 +    [
 +        dup >r [ \ npick \ >r 3array % ] each
 +        %
 +        r> [ drop \ r> , ] each
 +    ] [ ] make ;
++
+ : retry ( quot n -- )
+     [ drop ] rot compose attempt-all ; inline
index 6033933146031a7504a7524179f5b14fbd2920a2,fbbc4c496a60b31858ae337d52ceab8446618e61..c8186e55c341c534e741f0a5a2c78a857f75e7d6
mode 100755,100644..100755
@@@ -50,7 -50,7 +50,7 @@@ IN: opengl.shader
          alien>char-string
      ] with-malloc ;
  
- : check-gl-shader ( shader -- shader* )
+ : check-gl-shader ( shader -- shader )
      dup gl-shader-ok? [ dup gl-shader-info-log throw ] unless ;
  
  : delete-gl-shader ( shader -- ) glDeleteShader ; inline
@@@ -85,18 -85,17 +85,18 @@@ PREDICATE: gl-shader fragment-shader (f
          alien>char-string
      ] with-malloc ;
  
- : check-gl-program ( program -- program* )
+ : check-gl-program ( program -- program )
      dup gl-program-ok? [ dup gl-program-info-log throw ] unless ;
  
  : gl-program-shaders-length ( program -- shaders-length )
      GL_ATTACHED_SHADERS gl-program-get-int ; inline
  
  : gl-program-shaders ( program -- shaders )
 -    dup gl-program-shaders-length [
 -        dup "GLuint" <c-array>
 -        [ 0 <int> swap glGetAttachedShaders ] keep
 -    ] keep c-uint-array> ;
 +    dup gl-program-shaders-length
 +    dup "GLuint" <c-array>
 +    0 <int> swap
 +    [ glGetAttachedShaders ] { 3 1 } multikeep
 +    c-uint-array> ;
  
  : delete-gl-program-only ( program -- )
      glDeleteProgram ; inline