Merge branch 'modern-harvey2' of factorcode.org:/git/factor into modern-harvey2

modern-harvey2
Doug Coleman 2018-02-16 21:24:55 -06:00
commit 6338e5308d
133 changed files with 3086 additions and 465 deletions

View File

@ -1,4 +1,3 @@
language: cpp language: cpp
compiler: compiler:
- clang - clang
@ -45,4 +44,4 @@ before_install:
( cd udis86-1.7.2/ && ./autogen.sh && ./configure --enable-shared=yes && make && sudo make install ) && ( cd udis86-1.7.2/ && ./autogen.sh && ./configure --enable-shared=yes && make && sudo make install ) &&
( [[ "$TRAVIS_OS_NAME" != "osx" ]] && sudo ldconfig || true ) ( [[ "$TRAVIS_OS_NAME" != "osx" ]] && sudo ldconfig || true )
script: script:
- ./build.sh net-bootstrap < /dev/null - DEBUG=1 ./build.sh net-bootstrap < /dev/null

View File

@ -7,17 +7,17 @@ IN: cocoa.touchbar
: make-touchbar ( seq self -- touchbar ) : make-touchbar ( seq self -- touchbar )
[ NSTouchBar send: alloc send: init dup ] dip send: setDelegate: { [ NSTouchBar send: alloc send: init dup ] dip send: setDelegate: {
[ swap <CFStringArray> send: setDefaultItemIdentifiers: ] [ swap <CFStringArray> send: \setDefaultItemIdentifiers: ]
[ swap <CFStringArray> send: setCustomizationAllowedItemIdentifiers: ] [ swap <CFStringArray> send: \setCustomizationAllowedItemIdentifiers: ]
[ nip ] [ nip ]
} 2cleave ; } 2cleave ;
:: make-NSTouchBar-button ( self identifier label-string action-string -- button ) :: make-NSTouchBar-button ( self identifier label-string action-string -- button )
NSCustomTouchBarItem send: alloc NSCustomTouchBarItem send: alloc
identifier <CFString> send: initWithIdentifier: :> item identifier <CFString> send: \initWithIdentifier: :> item
NSButton NSButton
label-string <CFString> label-string <CFString>
self self
action-string lookup-selector send: buttonWithTitle:target:action: :> button action-string lookup-selector send: \buttonWithTitle:target:action: :> button
item button send: setView: item button send: \setView:
item ; item ;

View File

@ -13,7 +13,9 @@ LIBRARY: gdk
FUNCTION: Display* gdk_x11_display_get_xdisplay ( GdkDisplay* display ) FUNCTION: Display* gdk_x11_display_get_xdisplay ( GdkDisplay* display )
: get-dpy ( -- dpy ) : get-dpy ( -- dpy )
gdk_display_get_default gdk_x11_display_get_xdisplay ; gdk_display_get_default [ gdk_x11_display_get_xdisplay ] [
"No default display." throw
] if* ;
M: gtk-game-input-backend (open-game-input) M: gtk-game-input-backend (open-game-input)
reset-mouse ; reset-mouse ;

View File

@ -0,0 +1 @@
tools

View File

@ -355,6 +355,8 @@ M: word ($instance) dup name>> a/an write bl ($link) ;
M: string ($instance) write ; M: string ($instance) write ;
M: array ($instance) print-element ;
M: f ($instance) ($link) ; M: f ($instance) ($link) ;
: $instance ( element -- ) first ($instance) ; : $instance ( element -- ) first ($instance) ;

View File

@ -1,7 +1,6 @@
USING: alien.c-types alien.data compiler.tree.debugger USING: alien.c-types alien.data compiler.tree.debugger
io.encodings.ascii io.files io.mmap kernel locals math sequences io.encodings.ascii io.files io.mmap kernel locals math sequences
sequences.private specialized-arrays sequences.private specialized-arrays tools.test ;
specialized-arrays.instances.alien.c-types.uint tools.test ;
SPECIALIZED-ARRAY: uint SPECIALIZED-ARRAY: uint

View File

@ -1,7 +1,28 @@
USING: help.markup help.syntax io kernel math quotations USING: help.markup help.syntax kernel opengl.gl quotations sequences
opengl.gl multiline assocs strings ; strings ;
IN: opengl.shaders IN: opengl.shaders
HELP: (gl-program)
{ $values
{ "shaders" sequence }
{ "quot" quotation }
} { $description
"Creates a gl program and attaches the shaders to it. Then applies the quotation to the program and finally links it."
}
{ $errors "Throws a gl error if linking the program fails." } ;
HELP: <gl-shader>
{ $values { "source" "The GLSL source code to compile" } { "kind" "The kind of shader to compile, such as " { $snippet "GL_VERTEX_SHADER" } " or " { $snippet "GL_FRAGMENT_SHADER" } } { "shader" "a new " { $link gl-shader } } }
{ $description "Tries to compile the given GLSL source into a shader object. The returned object can be checked for validity by " { $link check-gl-shader } " or " { $link gl-shader-ok? } ". Errors and warnings generated by the GLSL compiler will be collected in the info log, available from " { $link gl-shader-info-log } ".\n\nWhen the shader object is no longer needed, it should be deleted using " { $link glDeleteShader } " or else be attached to a " { $link gl-program } " object deleted using " { $link delete-gl-program } "." } ;
HELP: <vertex-shader>
{ $values { "source" "The GLSL source code to compile" } { "vertex-shader" "a new " { $link vertex-shader } } }
{ $description "Tries to compile the given GLSL source into a vertex shader object. Equivalent to " { $snippet "GL_VERTEX_SHADER <gl-shader>" } "." } ;
HELP: <fragment-shader>
{ $values { "source" "The GLSL source code to compile" } { "fragment-shader" "a new " { $link fragment-shader } } }
{ $description "Tries to compile the given GLSL source into a fragment shader object. Equivalent to " { $snippet "GL_FRAGMENT_SHADER <gl-shader>" } "." } ;
HELP: gl-shader HELP: gl-shader
{ $class-description { $snippet "gl-shader" } " is a predicate class comprising values returned by OpenGL to represent shader objects. The following words are provided for creating and manipulating these objects:" { $class-description { $snippet "gl-shader" } " is a predicate class comprising values returned by OpenGL to represent shader objects. The following words are provided for creating and manipulating these objects:"
{ $list { $list
@ -9,7 +30,7 @@ HELP: gl-shader
{ { $link gl-shader-ok? } " - Check whether a shader object compiled successfully" } { { $link gl-shader-ok? } " - Check whether a shader object compiled successfully" }
{ { $link check-gl-shader } " - Throw an error unless a shader object compiled successfully" } { { $link check-gl-shader } " - Throw an error unless a shader object compiled successfully" }
{ { $link gl-shader-info-log } " - Retrieve the info log of messages generated by the GLSL compiler" } { { $link gl-shader-info-log } " - Retrieve the info log of messages generated by the GLSL compiler" }
{ { $link delete-gl-shader } " - Invalidate a shader object" } { { $link glDeleteShader } " - Invalidate a shader object" }
} }
"The derived predicate classes " { $link vertex-shader } " and " { $link fragment-shader } " are also defined for the two standard kinds of shader defined by the OpenGL specification." } ; "The derived predicate classes " { $link vertex-shader } " and " { $link fragment-shader } " are also defined for the two standard kinds of shader defined by the OpenGL specification." } ;
@ -27,18 +48,6 @@ HELP: fragment-shader
} }
} ; } ;
HELP: <gl-shader>
{ $values { "source" "The GLSL source code to compile" } { "kind" "The kind of shader to compile, such as " { $snippet "GL_VERTEX_SHADER" } " or " { $snippet "GL_FRAGMENT_SHADER" } } { "shader" "a new " { $link gl-shader } } }
{ $description "Tries to compile the given GLSL source into a shader object. The returned object can be checked for validity by " { $link check-gl-shader } " or " { $link gl-shader-ok? } ". Errors and warnings generated by the GLSL compiler will be collected in the info log, available from " { $link gl-shader-info-log } ".\n\nWhen the shader object is no longer needed, it should be deleted using " { $link delete-gl-shader } " or else be attached to a " { $link gl-program } " object deleted using " { $link delete-gl-program } "." } ;
HELP: <vertex-shader>
{ $values { "source" "The GLSL source code to compile" } { "vertex-shader" "a new " { $link vertex-shader } } }
{ $description "Tries to compile the given GLSL source into a vertex shader object. Equivalent to " { $snippet "GL_VERTEX_SHADER <gl-shader>" } "." } ;
HELP: <fragment-shader>
{ $values { "source" "The GLSL source code to compile" } { "fragment-shader" "a new " { $link fragment-shader } } }
{ $description "Tries to compile the given GLSL source into a fragment shader object. Equivalent to " { $snippet "GL_FRAGMENT_SHADER <gl-shader>" } "." } ;
HELP: gl-shader-ok? HELP: gl-shader-ok?
{ $values { "shader" "A " { $link gl-shader } " object" } { "?" boolean } } { $values { "shader" "A " { $link gl-shader } " object" } { "?" boolean } }
{ $description "Returns a boolean value indicating whether the given shader object compiled successfully. Compilation errors and warnings are available in the shader's info log, which can be gotten using " { $link gl-shader-info-log } "." } ; { $description "Returns a boolean value indicating whether the given shader object compiled successfully. Compilation errors and warnings are available in the shader's info log, which can be gotten using " { $link gl-shader-info-log } "." } ;
@ -47,10 +56,6 @@ HELP: check-gl-shader
{ $values { "shader" "A " { $link gl-shader } " object" } } { $values { "shader" "A " { $link gl-shader } " object" } }
{ $description "Throws an error containing the " { $link gl-shader-info-log } " for the shader object if it failed to compile. Otherwise, the shader object is left on the stack." } ; { $description "Throws an error containing the " { $link gl-shader-info-log } " for the shader object if it failed to compile. Otherwise, the shader object is left on the stack." } ;
HELP: delete-gl-shader
{ $values { "shader" "A " { $link gl-shader } " object" } }
{ $description "Deletes the shader object, invalidating it and releasing any resources allocated for it by the OpenGL implementation." } ;
HELP: gl-shader-info-log HELP: gl-shader-info-log
{ $values { "shader" "A " { $link gl-shader } " object" } { "log" string } } { $values { "shader" "A " { $link gl-shader } " object" } { "log" string } }
{ $description "Retrieves the info log for " { $snippet "shader" } ", including any errors or warnings generated in compiling the shader object." } ; { $description "Retrieves the info log for " { $snippet "shader" } ", including any errors or warnings generated in compiling the shader object." } ;
@ -92,7 +97,7 @@ HELP: gl-program-info-log
HELP: delete-gl-program HELP: delete-gl-program
{ $values { "program" "A " { $link gl-program } " object" } } { $values { "program" "A " { $link gl-program } " object" } }
{ $description "Deletes the program object, invalidating it and releasing any resources allocated for it by the OpenGL implementation. Any attached " { $link gl-shader } "s are also deleted.\n\nIf the shader objects should be preserved, they should each be detached using " { $link detach-gl-program-shader } ". The program object can then be destroyed alone using " { $link delete-gl-program-only } "." } ; { $description "Deletes the program object, invalidating it and releasing any resources allocated for it by the OpenGL implementation. Any attached " { $link gl-shader } "s are also deleted.\n\nIf the shader objects should be preserved, they should each be detached using " { $link glDetachShader } ". The program object can then be destroyed alone using " { $link glDeleteProgram } "." } ;
HELP: with-gl-program HELP: with-gl-program
{ $values { "program" "A " { $link gl-program } " object" } { "quot" "A quotation with stack effect " { $snippet "( program -- )" } } } { $values { "program" "A " { $link gl-program } " object" } { "quot" "A quotation with stack effect " { $snippet "( program -- )" } } }

View File

@ -54,24 +54,21 @@ IN: opengl.shaders
: check-gl-shader ( shader -- shader ) : check-gl-shader ( shader -- shader )
dup gl-shader-ok? [ dup gl-shader-info-log throw ] unless ; dup gl-shader-ok? [ dup gl-shader-info-log throw ] unless ;
: delete-gl-shader ( shader -- ) glDeleteShader ; inline
PREDICATE: gl-shader < integer (gl-shader?) ; PREDICATE: gl-shader < integer (gl-shader?) ;
PREDICATE: vertex-shader < gl-shader (vertex-shader?) ; PREDICATE: vertex-shader < gl-shader (vertex-shader?) ;
PREDICATE: fragment-shader < gl-shader (fragment-shader?) ; PREDICATE: fragment-shader < gl-shader (fragment-shader?) ;
! Programs ! Programs
: attach-shaders ( program shaders -- )
[ glAttachShader ] with each ;
: (gl-program) ( shaders quot: ( gl-program -- ) -- program ) : (gl-program) ( shaders quot: ( gl-program -- ) -- program )
glCreateProgram glCreateProgram
[ [
[ swap [ glAttachShader ] with each ] rot dupd attach-shaders swap call
[ swap call ] bi-curry bi*
] [ glLinkProgram ] [ ] tri gl-error ; inline ] [ glLinkProgram ] [ ] tri gl-error ; inline
: <mrt-gl-program> ( shaders frag-data-locations -- program )
[ [ first2 swap glBindFragDataLocation ] with each ] curry (gl-program) ;
: <gl-program> ( shaders -- program ) : <gl-program> ( shaders -- program )
[ drop ] (gl-program) ; [ drop ] (gl-program) ;
@ -111,23 +108,18 @@ PREDICATE: fragment-shader < gl-shader (fragment-shader?) ;
over uint <c-array> over uint <c-array>
[ glGetAttachedShaders ] keep [ zero? ] reject ; [ glGetAttachedShaders ] keep [ zero? ] reject ;
: delete-gl-program-only ( program -- )
glDeleteProgram ; inline
: detach-gl-program-shader ( program shader -- )
glDetachShader ; inline
: delete-gl-program ( program -- ) : delete-gl-program ( program -- )
dup gl-program-shaders [ dup gl-program-shaders [
2dup detach-gl-program-shader delete-gl-shader 2dup glDetachShader glDeleteShader
] each delete-gl-program-only ; ] each glDeleteProgram ;
: with-gl-program ( program quot -- ) : with-gl-program ( program quot -- )
over glUseProgram [ 0 glUseProgram ] [ ] cleanup ; inline over glUseProgram [ 0 glUseProgram ] [ ] cleanup ; inline
PREDICATE: gl-program < integer (gl-program?) ; PREDICATE: gl-program < integer (gl-program?) ;
: <simple-gl-program> ( vertex-shader-source fragment-shader-source -- program ) : <simple-gl-program> ( vertex-shader-source fragment-shader-source
-- program )
[ <vertex-shader> check-gl-shader ] [ <vertex-shader> check-gl-shader ]
[ <fragment-shader> check-gl-shader ] bi* [ <fragment-shader> check-gl-shader ] bi*
2array <gl-program> check-gl-program ; 2array <gl-program> check-gl-program ;

View File

@ -10,12 +10,12 @@ IN: tools.deploy.config.editor
: deploy-config ( vocab -- assoc ) : deploy-config ( vocab -- assoc )
dup default-config swap dup default-config swap
dup deploy-config-path vocab-file-contents dup deploy-config-path vocab-file-lines
parse-fresh [ first assoc-union ] unless-empty ; parse-fresh [ first assoc-union ] unless-empty ;
: set-deploy-config ( assoc vocab -- ) : set-deploy-config ( assoc vocab -- )
[ [ unparse-use ] without-limits string-lines ] dip [ [ unparse-use ] without-limits string-lines ] dip
dup deploy-config-path set-vocab-file-contents ; dup deploy-config-path set-vocab-file-lines ;
: set-deploy-flag ( value key vocab -- ) : set-deploy-flag ( value key vocab -- )
[ deploy-config [ set-at ] keep ] keep set-deploy-config ; [ deploy-config [ set-at ] keep ] keep set-deploy-config ;

View File

@ -504,16 +504,14 @@ M:: gtk-ui-backend system-alert ( caption text -- )
] with-destructors ; ] with-destructors ;
M: gtk-ui-backend (with-ui) M: gtk-ui-backend (with-ui)
f f gtk_init_check [ "Unable to initialize GTK" throw ] unless
f f gtk_gl_init
load-icon
init-clipboard
start-ui
[ [
f f gtk_init [ [ gtk_main ] with-timer ] with-event-loop
f f gtk_gl_init ] with-destructors ;
load-icon
init-clipboard
start-ui
[
[ [ gtk_main ] with-timer ] with-event-loop
] with-destructors
] with-ui-running ;
M: gtk-ui-backend stop-event-loop M: gtk-ui-backend stop-event-loop
gtk_main_quit ; gtk_main_quit ;

View File

@ -706,13 +706,11 @@ M: windows-ui-backend set-title ( string world -- )
M: windows-ui-backend (with-ui) M: windows-ui-backend (with-ui)
[ [
[ init-clipboard
init-clipboard init-win32-ui
init-win32-ui start-ui
start-ui event-loop
event-loop ] [ cleanup-win32-ui ] [ ] cleanup ;
] [ cleanup-win32-ui ] [ ] cleanup
] with-ui-running ;
M: windows-ui-backend beep ( -- ) M: windows-ui-backend beep ( -- )
0 MessageBeep drop ; 0 MessageBeep drop ;

View File

@ -319,15 +319,13 @@ M: x11-handle flush-gl-context ( handle -- )
dpy get swap window>> glXSwapBuffers ; dpy get swap window>> glXSwapBuffers ;
M: x11-ui-backend (with-ui) ( quot -- ) M: x11-ui-backend (with-ui) ( quot -- )
[ f [
f [ [
[ init-clipboard
init-clipboard start-ui
start-ui event-loop
event-loop ] with-xim
] with-xim ] with-x ;
] with-x
] with-ui-running ;
M: x11-ui-backend beep ( -- ) M: x11-ui-backend beep ( -- )
dpy get 100 XBell drop ; dpy get 100 XBell drop ;

View File

@ -1,19 +1,28 @@
USING: ui.gadgets help.markup help.syntax strings models USING: ui.gadgets help.markup help.syntax strings models
ui.gadgets.panes ; ui.gadgets.panes ui.theme ;
IN: ui.gadgets.labeled IN: ui.gadgets.labeled
HELP: labeled-gadget HELP: labeled-gadget
{ $class-description "A labeled gadget can be created by calling " { $link <labeled-gadget> } "." } ; { $class-description "A labeled gadget can be created by calling " { $link <labeled-gadget> } "." } ;
HELP: <labeled-gadget> HELP: <labeled-gadget>
{ $values { "gadget" gadget } { "title" string } { "color" "a color" } { "labeled" "a new " { $link <labeled-gadget> } } } { $values { "content" gadget } { "title" string } { "labeled" labeled-gadget } }
{ $description "Creates a new " { $link labeled-gadget } " display " { $snippet "gadget" } " with " { $snippet "title" } " on top." } ; { $description "Creates a new " { $link labeled-gadget } " displaying " { $snippet "content" } " with " { $snippet "title" } " on top." } ;
HELP: <colored-labeled-gadget>
{ $values { "content" gadget } { "title" string } { "color" "a color" } { "labeled" labeled-gadget } }
{ $description "Creates a new " { $link labeled-gadget } " displaying " { $snippet "content" } " with " { $snippet "title" } " on top, adding a " { $snippet "color" } " colored divider between title bar and content." } ;
HELP: <framed-labeled-gadget>
{ $values { "content" gadget } { "title" string } { "color" "a color" } { "labeled" labeled-gadget } }
{ $description "Creates a new " { $link labeled-gadget } " displaying " { $snippet "content" } " with " { $snippet "title" } " on top, adding a " { $snippet "color" } " colored divider between title bar and content and a " { $link labeled-border-color } " frame." } ;
ARTICLE: "ui.gadgets.labeled" "Labeled gadgets" ARTICLE: "ui.gadgets.labeled" "Labeled gadgets"
"The " { $vocab-link "ui.gadgets.labeled" } " vocabulary implements labeled borders around child gadgets." "The " { $vocab-link "ui.gadgets.labeled" } " vocabulary implements labeled borders around child gadgets."
{ $subsections { $subsections
labeled-gadget labeled-gadget
<labeled-gadget> <labeled-gadget>
<colored-labeled-gadget>
<framed-labeled-gadget> <framed-labeled-gadget>
} ; } ;

View File

@ -3,6 +3,5 @@ ui.gadgets ui.gadgets.labeled ;
IN: ui.gadgets.labeled.tests IN: ui.gadgets.labeled.tests
{ t } [ { t } [
<gadget> "Hey" color: blue <labeled-gadget> <gadget> "Hey" <labeled-gadget> content>> gadget?
content>> gadget?
] unit-test ] unit-test

View File

@ -5,7 +5,7 @@ ui.gadgets.labels ui.gadgets.packs ui.gadgets.tracks
ui.pens.gradient ui.pens.solid ui.theme ; ui.pens.gradient ui.pens.solid ui.theme ;
IN: ui.gadgets.labeled IN: ui.gadgets.labeled
TUPLE: labeled-gadget < track content color ; TUPLE: labeled-gadget < track content ;
<PRIVATE <PRIVATE
@ -18,36 +18,19 @@ M: labeled-gadget focusable-child* content>> ;
[ title-bar-gradient <gradient> ] [ title-bar-gradient <gradient> ]
if ; if ;
: add-title-bar ( title track -- track ) : <title-bar> ( title -- title-bar )
swap >label >label [ t >>bold? ] change-font
[ t >>bold? ] change-font { 0 4 } <border> title-bar-interior >>interior ;
{ 0 4 } <border>
title-bar-interior >>interior
f track-add ;
: add-content ( content track -- track )
swap 1 track-add ;
: add-color-line ( color track -- track )
<shelf> { 0 1.5 } <border>
rot <solid> >>interior
f track-add ;
: add-content-area ( labeled -- labeled )
[ ] [ content>> ] [ color>> ] tri
vertical <track>
add-color-line
add-content
1 track-add ;
PRIVATE> PRIVATE>
: <labeled-gadget> ( gadget title color -- labeled ) : <labeled-gadget> ( content title -- labeled )
vertical labeled-gadget new-track vertical labeled-gadget new-track
swap >>color swap <title-bar> f track-add
add-title-bar swap [ >>content ] [ 1 track-add ] bi ;
swap >>content
add-content-area ;
: <framed-labeled-gadget> ( gadget title color -- labeled ) : <colored-labeled-gadget> ( content title color -- labeled )
<labeled-gadget> labeled-border-color <solid> >>boundary ; [ <labeled-gadget> ] dip <solid> >>interior { 0 3 } >>gap ;
: <framed-labeled-gadget> ( content title color -- labeled )
<colored-labeled-gadget> labeled-border-color <solid> >>boundary ;

View File

@ -1,10 +1,12 @@
! Copyright (C) 2009 Slava Pestov. ! Copyright (C) 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: accessors colors.constants kernel USING: accessors alien.c-types colors.constants kernel
specialized-arrays.instances.alien.c-types.float tools.test specialized-arrays tools.test ui.gadgets.labels
ui.gadgets.labels ui.pens.caching ui.pens.gradient ; ui.pens.caching ui.pens.gradient ;
IN: ui.pens.caching.tests IN: ui.pens.caching.tests
SPECIALIZED-ARRAY: float
! compute-pen ! compute-pen
{ {
{ 0 0 } { 0 0 }

View File

@ -168,11 +168,11 @@ error-display "toolbar" f {
error-list vertical <track> with-lines error-list vertical <track> with-lines
error-list <error-list-toolbar> f track-add error-list <error-list-toolbar> f track-add
error-list source-file-table>> margins <scroller> white-interior error-list source-file-table>> margins <scroller> white-interior
"Source files" source-files-color <labeled-gadget> 1/4 track-add "Source files" source-files-color <colored-labeled-gadget> 1/4 track-add
error-list error-table>> margins <scroller> white-interior error-list error-table>> margins <scroller> white-interior
"Errors" errors-color <labeled-gadget> 1/4 track-add "Errors" errors-color <colored-labeled-gadget> 1/4 track-add
error-list error-display>> error-list error-display>>
"Details" details-color <labeled-gadget> 1/2 track-add "Details" details-color <colored-labeled-gadget> 1/2 track-add
1 track-add ; 1 track-add ;
M: error-list-gadget focusable-child* M: error-list-gadget focusable-child*

View File

@ -101,9 +101,9 @@ M: inspector-table compute-column-widths
swap >>model swap >>model
dup model>> <inspector-table> >>table dup model>> <inspector-table> >>table
dup model>> <summary-gadget> margins white-interior dup model>> <summary-gadget> margins white-interior
"Object" object-color <labeled-gadget> f track-add "Object" object-color <colored-labeled-gadget> f track-add
dup table>> <scroller> margins white-interior dup table>> <scroller> margins white-interior
"Contents" contents-color <labeled-gadget> 1 track-add ; "Contents" contents-color <colored-labeled-gadget> 1 track-add ;
M: inspector-gadget focusable-child* M: inspector-gadget focusable-child*
table>> ; table>> ;

View File

@ -33,12 +33,12 @@ M: stack-entry-renderer row-value drop object>> ;
: <stack-display> ( model quot title color -- gadget ) : <stack-display> ( model quot title color -- gadget )
[ '[ dup _ when ] <arrow> <stack-table> margins <scroller> white-interior ] 2dip [ '[ dup _ when ] <arrow> <stack-table> margins <scroller> white-interior ] 2dip
<labeled-gadget> ; <colored-labeled-gadget> ;
: <callstack-display> ( model -- gadget ) : <callstack-display> ( model -- gadget )
[ [ call>> callstack. ] when* ] [ [ call>> callstack. ] when* ]
<pane-control> t >>scrolls? margins <scroller> white-interior <pane-control> t >>scrolls? margins <scroller> white-interior
"Call stack" call-stack-color <labeled-gadget> ; "Call stack" call-stack-color <colored-labeled-gadget> ;
: <datastack-display> ( model -- gadget ) : <datastack-display> ( model -- gadget )
[ data>> ] "Data stack" data-stack-color <stack-display> ; [ data>> ] "Data stack" data-stack-color <stack-display> ;

View File

@ -3,7 +3,6 @@ math.rectangles namespaces quotations sequences strings ui.backend
ui.gadgets ui.gadgets.books ui.gadgets.grids ui.gadgets.packs ui.gadgets ui.gadgets.books ui.gadgets.grids ui.gadgets.packs
ui.gadgets.private ui.gadgets.tracks ui.gadgets.worlds ui.private ui.text ui.gadgets.private ui.gadgets.tracks ui.gadgets.worlds ui.private ui.text
vocabs.loader ; vocabs.loader ;
IN: ui IN: ui
HELP: close-window HELP: close-window
@ -91,7 +90,10 @@ HELP: raise-window
HELP: with-ui HELP: with-ui
{ $values { "quot" { $quotation ( -- ) } } } { $values { "quot" { $quotation ( -- ) } } }
{ $description "Calls the quotation, starting the UI if necessary. If starting the UI is necessary, this word does not return and the UI will start after the quotation returns." } { $description
"Calls the quotation, starting the UI if necessary. If starting the UI is necessary, this word does not return and the UI will start after the quotation returns." $nl
"While the combinator is running, " { $link ui-running? } " can be used by user code to determine whether it is running in a UI context or not."
}
{ $notes "This word should be used in the " { $link postpone: \MAIN: } " word of an application that uses the UI in order for the vocabulary to work when run from either the UI listener (" { $snippet "\"my-app\" run" } ") and the command line (" { $snippet "./factor -run=my-app" } ")." } { $notes "This word should be used in the " { $link postpone: \MAIN: } " word of an application that uses the UI in order for the vocabulary to work when run from either the UI listener (" { $snippet "\"my-app\" run" } ") and the command line (" { $snippet "./factor -run=my-app" } ")." }
{ $examples "The " { $vocab-link "hello-ui" } " vocabulary implements a simple UI application which uses this word." } ; { $examples "The " { $vocab-link "hello-ui" } " vocabulary implements a simple UI application which uses this word." } ;

2
basis/ui/ui-tests.factor Normal file
View File

@ -0,0 +1,2 @@
USING: assocs continuations kernel threads tools.test ui ;
IN: ui.tests

View File

@ -134,10 +134,6 @@ M: world ungraft*
SYMBOL: ui-running SYMBOL: ui-running
: with-ui-running ( quot -- )
t ui-running set-global
[ f ui-running set-global ] [ ] cleanup ; inline
PRIVATE> PRIVATE>
: find-windows ( quot: ( world -- ? ) -- seq ) : find-windows ( quot: ( world -- ? ) -- seq )
@ -225,7 +221,15 @@ M: object resize-window 2drop ;
[ find-world [ dup pref-dim resize-window ] when* ] bi ; [ find-world [ dup pref-dim resize-window ] when* ] bi ;
: with-ui ( quot: ( -- ) -- ) : with-ui ( quot: ( -- ) -- )
ui-running? [ call( -- ) ] [ '[ init-ui @ ] (with-ui) ] if ; ui-running? [ call( -- ) ] [
t ui-running set-global '[
[ init-ui @ ] (with-ui)
] [
f ui-running set-global
! Give running ui threads a chance to finish.
notify-ui-thread yield
] [ ] cleanup
] if ;
HOOK: beep ui-backend ( -- ) HOOK: beep ui-backend ( -- )

View File

@ -9,7 +9,7 @@ IN: vocabs.cache
vocab-name vocab-name
[ root-cache get delete-at ] [ root-cache get delete-at ]
[ [
\ vocab-file-contents "memoize" word-prop swap \ vocab-file-lines "memoize" word-prop swap
'[ drop first vocab-name _ = ] assoc-reject! drop '[ drop first vocab-name _ = ] assoc-reject! drop
] bi ] bi
\ all-disk-vocabs-recursive reset-memoized \ all-disk-vocabs-recursive reset-memoized

View File

@ -32,18 +32,18 @@ ARTICLE: "vocabs.metadata" "Vocabulary metadata"
} }
"Getting and setting arbitrary vocabulary metadata:" "Getting and setting arbitrary vocabulary metadata:"
{ $subsections { $subsections
vocab-file-contents vocab-file-lines
set-vocab-file-contents set-vocab-file-lines
} ; } ;
ABOUT: "vocabs.metadata" ABOUT: "vocabs.metadata"
HELP: vocab-file-contents HELP: vocab-file-lines
{ $values { "vocab" "a vocabulary specifier" } { "name" string } { "seq" { $maybe "a sequence of lines" } } } { $values { "vocab" "a vocabulary specifier" } { "name" string } { "lines" { $maybe { $sequence "lines" } } } }
{ $description "Outputs the contents of the file named " { $snippet "name" } " from the vocabulary's directory, or " { $link f } " if the file does not exist." } ; { $description "Outputs the lines of the file named " { $snippet "name" } " from the vocabulary's directory, or " { $link f } " if the file does not exist." } ;
HELP: set-vocab-file-contents HELP: set-vocab-file-lines
{ $values { "seq" "a sequence of lines" } { "vocab" "a vocabulary specifier" } { "name" string } } { $values { "lines" { $sequence "lines" } } { "vocab" "a vocabulary specifier" } { "name" string } }
{ $description "Stores a sequence of lines to the file named " { $snippet "name" } " from the vocabulary's directory." } ; { $description "Stores a sequence of lines to the file named " { $snippet "name" } " from the vocabulary's directory." } ;
HELP: vocab-summary HELP: vocab-summary

View File

@ -10,7 +10,7 @@ IN: vocabs.metadata
: check-vocab ( vocab -- vocab ) : check-vocab ( vocab -- vocab )
dup find-vocab-root [ no-vocab ] unless ; dup find-vocab-root [ no-vocab ] unless ;
MEMO: vocab-file-contents ( vocab name -- seq ) MEMO: vocab-file-lines ( vocab name -- lines/f )
vocab-append-path dup [ vocab-append-path dup [
dup exists? [ dup exists? [
utf8 file-lines harvest utf8 file-lines harvest
@ -19,23 +19,23 @@ MEMO: vocab-file-contents ( vocab name -- seq )
] if ] if
] when ; ] when ;
: set-vocab-file-contents ( seq vocab name -- ) : set-vocab-file-lines ( lines vocab name -- )
dupd vocab-append-path [ dupd vocab-append-path [
swap [ ?delete-file ] [ swap utf8 set-file-lines ] if-empty swap [ ?delete-file ] [ swap utf8 set-file-lines ] if-empty
\ vocab-file-contents reset-memoized \ vocab-file-lines reset-memoized
] [ vocab-name no-vocab ] ?if ; ] [ vocab-name no-vocab ] ?if ;
: vocab-resources-path ( vocab -- string ) : vocab-resources-path ( vocab -- string )
vocab-dir "resources.txt" append-path ; vocab-dir "resources.txt" append-path ;
: vocab-resources ( vocab -- patterns ) : vocab-resources ( vocab -- patterns )
dup vocab-resources-path vocab-file-contents ; dup vocab-resources-path vocab-file-lines ;
: vocab-summary-path ( vocab -- string ) : vocab-summary-path ( vocab -- string )
vocab-dir "summary.txt" append-path ; vocab-dir "summary.txt" append-path ;
: vocab-summary ( vocab -- summary ) : vocab-summary ( vocab -- summary )
dup dup vocab-summary-path vocab-file-contents dup dup vocab-summary-path vocab-file-lines
[ [
vocab-name " vocabulary" append vocab-name " vocabulary" append
] [ ] [
@ -56,13 +56,13 @@ M: vocab-link summary vocab-summary ;
vocab-dir "tags.txt" append-path ; vocab-dir "tags.txt" append-path ;
: vocab-tags ( vocab -- tags ) : vocab-tags ( vocab -- tags )
dup vocab-tags-path vocab-file-contents ; dup vocab-tags-path vocab-file-lines ;
: vocab-authors-path ( vocab -- string ) : vocab-authors-path ( vocab -- string )
vocab-dir "authors.txt" append-path ; vocab-dir "authors.txt" append-path ;
: vocab-authors ( vocab -- authors ) : vocab-authors ( vocab -- authors )
dup vocab-authors-path vocab-file-contents ; dup vocab-authors-path vocab-file-lines ;
: vocab-platforms-path ( vocab -- string ) : vocab-platforms-path ( vocab -- string )
vocab-dir "platforms.txt" append-path ; vocab-dir "platforms.txt" append-path ;
@ -70,7 +70,7 @@ M: vocab-link summary vocab-summary ;
ERROR: bad-platform name ; ERROR: bad-platform name ;
: vocab-platforms ( vocab -- platforms ) : vocab-platforms ( vocab -- platforms )
dup vocab-platforms-path vocab-file-contents dup vocab-platforms-path vocab-file-lines
[ dup "system" lookup-word [ ] [ bad-platform ] ?if ] map ; [ dup "system" lookup-word [ ] [ bad-platform ] ?if ] map ;
: supported-platform? ( platforms -- ? ) : supported-platform? ( platforms -- ? )

View File

@ -33,10 +33,12 @@ ERROR: resource-missing pattern ;
'[ _ match-pattern ] gather ; '[ _ match-pattern ] gather ;
: vocab-resource-files ( vocab -- filenames ) : vocab-resource-files ( vocab -- filenames )
[ vocab-resources ] [ vocab-dir-in-root ] bi dup vocab-resources [
[ swap vocab-dir-in-root
match-patterns [ expand-resource ] map concat [
] with-directory-files ; match-patterns [ expand-resource ] map concat
] with-directory-files
] [ drop f ] if* ;
: copy-vocab-resources ( dir vocab -- ) : copy-vocab-resources ( dir vocab -- )
dup vocab-resource-files dup vocab-resource-files

View File

@ -1,14 +1,14 @@
! Copyright (C) 2008, 2009 Joe Groff, Slava Pestov. ! Copyright (C) 2008, 2009 Joe Groff, Slava Pestov.
! Copyright (C) 2017-2018 Alexander Ilin. ! Copyright (C) 2017-2018 Alexander Ilin.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: accessors alien.accessors alien.data alien.strings USING: accessors alien.accessors alien.c-types alien.data
classes.struct io.encodings.utf16n kernel make math namespaces alien.strings classes.struct io.encodings.utf16n kernel make
prettyprint sequences specialized-arrays math namespaces prettyprint sequences specialized-arrays
specialized-arrays.instances.alien.c-types.ushort
ui.backend.windows ui.gadgets.worlds ui.gestures ui.backend.windows ui.gadgets.worlds ui.gestures
ui.tools.listener windows.com windows.com.wrapper ui.tools.listener windows.com windows.com.wrapper
windows.dropfiles windows.kernel32 windows.ole32 windows.shell32 windows.dropfiles windows.kernel32 windows.ole32 windows.shell32
windows.types ; windows.types ;
SPECIALIZED-ARRAY: ushort
SPECIALIZED-ARRAY: WCHAR SPECIALIZED-ARRAY: WCHAR
IN: windows.dragdrop-listener IN: windows.dragdrop-listener

View File

@ -1,11 +1,8 @@
! Copyright (C) 2006, 2008 Doug Coleman. ! Copyright (C) 2006, 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.c-types alien.data alien.strings USING: alien alien.c-types alien.data alien.strings alien.syntax
alien.syntax classes.struct io.backend kernel classes.struct io.backend kernel windows windows.com
specialized-arrays windows.com.syntax windows.kernel32 windows.ole32 windows.types ;
specialized-arrays.instances.alien.c-types.ushort windows
windows.com windows.com.syntax windows.kernel32 windows.ole32
windows.types ;
IN: windows.shell32 IN: windows.shell32
CONSTANT: CSIDL_DESKTOP 0x00 CONSTANT: CSIDL_DESKTOP 0x00

View File

@ -1909,55 +1909,55 @@ FUNCTION: HPOWERNOTIFY RegisterPowerSettingNotification ( HANDLE hRecipient, LP
FUNCTION: BOOL UnregisterPowerSettingNotification ( HPOWERNOTIFY Handle ) FUNCTION: BOOL UnregisterPowerSettingNotification ( HPOWERNOTIFY Handle )
CONSTANT: GUID_ACDC_POWER_SOURCE CONSTANT: GUID_ACDC_POWER_SOURCE
GUID: {5d3e9a59-e9D5-4b00-a6bd-ff34ff516548} guid: {5d3e9a59-e9D5-4b00-a6bd-ff34ff516548}
CONSTANT: GUID_BATTERY_PERCENTAGE_REMAINING CONSTANT: GUID_BATTERY_PERCENTAGE_REMAINING
GUID: {a7ad8041-b45a-4cae-87a3-eecbb468a9e1} guid: {a7ad8041-b45a-4cae-87a3-eecbb468a9e1}
CONSTANT: GUID_CONSOLE_DISPLAY_STATE CONSTANT: GUID_CONSOLE_DISPLAY_STATE
GUID: {6fe69556-704a-47a0-8f24-c28d936fda47} guid: {6fe69556-704a-47a0-8f24-c28d936fda47}
CONSTANT: GUID_GLOBAL_USER_PRESENCE CONSTANT: GUID_GLOBAL_USER_PRESENCE
GUID: {786e8a1d-b427-4344-9207-09e70bdcbea9} guid: {786e8a1d-b427-4344-9207-09e70bdcbea9}
CONSTANT: GUID_IDLE_BACKGROUND_TASK CONSTANT: GUID_IDLE_BACKGROUND_TASK
GUID: {515c31d8-f734-163d-a0fd-11a0-8c91e8f1} guid: {515c31d8-f734-163d-a0fd-11a0-8c91e8f1}
CONSTANT: GUID_MONITOR_POWER_ON CONSTANT: GUID_MONITOR_POWER_ON
GUID: {02731015-4510-4526-99e6-e5a17ebd1aea} guid: {02731015-4510-4526-99e6-e5a17ebd1aea}
CONSTANT: GUID_POWER_SAVING_STATUS CONSTANT: GUID_POWER_SAVING_STATUS
GUID: {e00958c0-c213-4ace-ac77-fecced2eeea5} guid: {e00958c0-c213-4ace-ac77-fecced2eeea5}
CONSTANT: GUID_POWERSCHEME_PERSONALITY CONSTANT: GUID_POWERSCHEME_PERSONALITY
GUID: {245d8541-3943-4422-b025-13a7-84f679b7} guid: {245d8541-3943-4422-b025-13a7-84f679b7}
CONSTANT: GUID_MIN_POWER_SAVINGS CONSTANT: GUID_MIN_POWER_SAVINGS
GUID: {8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c} guid: {8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c}
CONSTANT: GUID_MAX_POWER_SAVINGS CONSTANT: GUID_MAX_POWER_SAVINGS
GUID: {a1841308-3541-4fab-bc81-f71556f20b4a} guid: {a1841308-3541-4fab-bc81-f71556f20b4a}
CONSTANT: GUID_TYPICAL_POWER_SAVINGS CONSTANT: GUID_TYPICAL_POWER_SAVINGS
GUID: {381b4222-f694-41f0-9685-ff5bb260df2e} guid: {381b4222-f694-41f0-9685-ff5bb260df2e}
CONSTANT: GUID_SESSION_DISPLAY_STATUS CONSTANT: GUID_SESSION_DISPLAY_STATUS
GUID: {2b84c20e-ad23-4ddf-93db-05ffbd7efca5} guid: {2b84c20e-ad23-4ddf-93db-05ffbd7efca5}
CONSTANT: GUID_SESSION_USER_PRESENCE CONSTANT: GUID_SESSION_USER_PRESENCE
GUID: {3c0f4548-c03f-4c4d-b9f2-237ede686376} guid: {3c0f4548-c03f-4c4d-b9f2-237ede686376}
CONSTANT: GUID_SYSTEM_AWAYMODE CONSTANT: GUID_SYSTEM_AWAYMODE
GUID: {98a7f580-01f7-48aa-9c0f-44352c29e5C0} guid: {98a7f580-01f7-48aa-9c0f-44352c29e5C0}
! This notification fires when the Lid Close Action is ! This notification fires when the Lid Close Action is
! changed by user in the Power Manager (Control Panel). ! changed by user in the Power Manager (Control Panel).
CONSTANT: GUID_LIDCLOSE_ACTION CONSTANT: GUID_LIDCLOSE_ACTION
GUID: {5ca83367-6e45-459f-a27b-476b1d01c936} guid: {5ca83367-6e45-459f-a27b-476b1d01c936}
! This notifies when the laptop lid is physically opened or closed. ! This notifies when the laptop lid is physically opened or closed.
CONSTANT: GUID_LIDSWITCH_STATE_CHANGE CONSTANT: GUID_LIDSWITCH_STATE_CHANGE
GUID: {ba3e0f4d-b817-4094-a2d1-d56379e6a0f3} guid: {ba3e0f4d-b817-4094-a2d1-d56379e6a0f3}
CONSTANT: PBT_POWERSETTINGCHANGE 0x8013 CONSTANT: PBT_POWERSETTINGCHANGE 0x8013

View File

@ -8,7 +8,7 @@ sequences threads ui ui.commands ui.gadgets ui.gadgets.borders
ui.gadgets.buttons ui.gadgets.frames ui.gadgets.grids ui.gadgets.buttons ui.gadgets.frames ui.gadgets.grids
ui.gadgets.labeled ui.gadgets.labels ui.gadgets.packs ui.gadgets.labeled ui.gadgets.labels ui.gadgets.packs
ui.gadgets.sliders ui.gadgets.tracks ui.gadgets.worlds ui.render ui.gadgets.sliders ui.gadgets.tracks ui.gadgets.worlds ui.render
ui.tools.common ; ui.tools.common combinators.smart.syntax ;
QUALIFIED-WITH: models.range mr QUALIFIED-WITH: models.range mr
IN: boids IN: boids

View File

@ -1,7 +1,7 @@
! Copyright (C) 2009 Doug Coleman. ! Copyright (C) 2009 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: accessors assocs calendar fry kernel locals parser USING: accessors assocs calendar fry kernel locals parser
sequences vocabs words memoize ; sequences vocabs words ;
IN: calendar.holidays IN: calendar.holidays
SINGLETONS: all world commonwealth-of-nations ; SINGLETONS: all world commonwealth-of-nations ;
@ -15,7 +15,10 @@ SYNTAX: \HOLIDAY:
parse-definition ( timestamp/n -- timestamp ) define-declared ; parse-definition ( timestamp/n -- timestamp ) define-declared ;
SYNTAX: \HOLIDAY-NAME: SYNTAX: \HOLIDAY-NAME:
let[ scan-word "holiday" word-prop :> holidays scan-word :> name scan-object :> value let[
scan-word "holiday" word-prop :> holidays
scan-word :> name
scan-object :> value
value name holidays set-at ] ; value name holidays set-at ] ;
>> >>
@ -24,16 +27,14 @@ GENERIC: holidays ( n singleton -- seq )
<PRIVATE <PRIVATE
: (holidays) ( singleton -- seq ) : (holidays) ( singleton -- seq )
all-words swap '[ "holiday" word-prop _ swap key? ] filter ; all-words [ "holiday" word-prop key? ] with filter ;
M: object holidays M: object holidays
(holidays) [ execute( timestamp -- timestamp' ) ] with map ; (holidays) [ execute( timestamp -- timestamp' ) ] with map ;
PRIVATE> PRIVATE>
M: all holidays M: all holidays drop (holidays) ;
drop
all-words [ "holiday" word-prop key? ] with filter ;
: holiday? ( timestamp/n singleton -- ? ) : holiday? ( timestamp/n singleton -- ? )
[ holidays ] [ drop ] 2bi '[ _ same-day? ] any? ; [ holidays ] [ drop ] 2bi '[ _ same-day? ] any? ;

View File

@ -50,10 +50,10 @@ IN: fuel.eval.tests
] unit-test ] unit-test
{ {
"(nil nil \"9\\n\")\n<~FUEL~>\n" "(nil 9 \"\")\n<~FUEL~>\n"
} [ } [
[ [
{ "3 sq . " } "hi99" { "3 sq" } "hi99"
{ "math" "prettyprint" "kernel" } eval-in-context { "math" "kernel" } eval-in-context
] with-string-writer ] with-string-writer
] unit-test ] unit-test

View File

@ -1,6 +1,6 @@
! Copyright (C) 2009 Jose Antonio Ortega Ruiz. ! Copyright (C) 2009 Jose Antonio Ortega Ruiz.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays continuations debugger fuel.pprint io USING: accessors arrays continuations debugger fry fuel.pprint io
io.streams.string kernel listener namespaces parser.notes io.streams.string kernel listener namespaces parser.notes
prettyprint.config sequences sets vocabs.parser ; prettyprint.config sequences sets vocabs.parser ;
IN: fuel.eval IN: fuel.eval
@ -8,9 +8,6 @@ IN: fuel.eval
SYMBOL: restarts-stack SYMBOL: restarts-stack
V{ } clone restarts-stack set-global V{ } clone restarts-stack set-global
SYMBOL: eval-result
f eval-result set-global
SYMBOL: eval-res-flag SYMBOL: eval-res-flag
t eval-res-flag set-global t eval-res-flag set-global
@ -31,14 +28,14 @@ t eval-res-flag set-global
"<~FUEL~>" write nl flush ; "<~FUEL~>" write nl flush ;
: begin-eval ( -- ) : begin-eval ( -- )
f eval-result set-global push-status ; push-status ;
: end-eval ( error/f output -- ) : end-eval ( result error/f output -- )
eval-result get-global swap send-retort pop-status ; swapd send-retort pop-status ;
: eval ( lines -- error/f ) : eval ( lines -- result error/f )
[ parse-lines-interactive call( -- ) f ] curry '[ _ parse-lines-interactive call( -- x ) f ]
[ dup print-error ] recover ; [ dup print-error f swap ] recover ;
: eval-usings ( usings -- ) : eval-usings ( usings -- )
[ [ use-vocab ] curry ignore-errors ] each ; [ [ use-vocab ] curry ignore-errors ] each ;

View File

@ -28,6 +28,6 @@ IN: fuel.tests
[ make-uses-restart is-suggested-restart? ] with-variable [ make-uses-restart is-suggested-restart? ] with-variable
] unit-test ] unit-test
{ } [ { f } [
{ "kernel" } [ "\\ dup drop" eval( -- ) ] fuel-use-suggested-vocabs { "kernel" } [ "\\ dup drop" eval( -- ) ] fuel-use-suggested-vocabs
] unit-test ] unit-test

View File

@ -1,13 +1,12 @@
! Copyright (C) 2008, 2009 Jose Antonio Ortega Ruiz. ! Copyright (C) 2008, 2009 Jose Antonio Ortega Ruiz.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: accessors assocs compiler.units continuations fuel.eval USING: accessors assocs compiler.units continuations fry fuel.eval
fuel.help fuel.xref help.topics io.pathnames kernel namespaces parser fuel.help fuel.xref help.topics io.pathnames kernel namespaces parser
parser.notes sequences tools.scaffold vocabs vocabs.files parser.notes sequences source-files tools.scaffold vocabs vocabs.files
vocabs.hierarchy vocabs.loader vocabs.metadata vocabs.parser words ; vocabs.hierarchy vocabs.loader vocabs.metadata vocabs.parser words ;
IN: fuel IN: fuel
! Evaluation ! Evaluation
: fuel-eval-restartable ( -- ) : fuel-eval-restartable ( -- )
t eval-res-flag set-global ; inline t eval-res-flag set-global ; inline
@ -17,9 +16,6 @@ IN: fuel
: fuel-eval-in-context ( lines in usings -- ) : fuel-eval-in-context ( lines in usings -- )
eval-in-context ; eval-in-context ;
: fuel-eval-set-result ( obj -- )
clone eval-result set-global ; inline
: fuel-retort ( -- ) f f "" send-retort ; inline : fuel-retort ( -- ) f f "" send-retort ; inline
! Loading files ! Loading files
@ -44,134 +40,147 @@ SYMBOL: :uses-suggestions
restarts get [ is-suggested-restart? ] filter restarts get [ is-suggested-restart? ] filter
dup length 1 = [ first continue-restart ] [ drop ] if ; dup length 1 = [ first continue-restart ] [ drop ] if ;
: set-use-hook ( -- ) SYMBOL: auto-uses
[ manifest get auto-used>> clone :uses prefix fuel-eval-set-result ]
print-use-hook set ;
: get-uses ( lines -- ) : set-use-hook ( -- )
[ [
parser-quiet? on manifest get auto-used>> clone :uses prefix
parse-fresh drop clone auto-uses set-global
] curry with-compilation-unit ; inline ] print-use-hook set ;
PRIVATE> PRIVATE>
: fuel-use-suggested-vocabs ( ..a suggestions quot: ( ..a -- ..b ) -- ..b ) : fuel-use-suggested-vocabs ( ..a suggestions quot: ( ..a -- ..b )
-- ..b result )
f auto-uses set-global
[ :uses-suggestions set ] dip [ :uses-suggestions set ] dip
[ try-suggested-restarts rethrow ] recover ; inline [ try-suggested-restarts rethrow ] recover
auto-uses get-global ; inline
: fuel-run-file ( path -- ) : fuel-run-file ( path -- result )
[ set-use-hook run-file ] curry with-scope ; inline f auto-uses set-global
'[ set-use-hook _ run-file ] with-scope
auto-uses get-global ; inline
: fuel-with-autouse ( ..a quot: ( ..a -- ..b ) -- ..b ) : fuel-with-autouse ( ..a quot: ( ..a -- ..b ) -- ..b )
[ set-use-hook call ] curry with-scope ; inline '[ set-use-hook _ call ] with-scope ; inline
: fuel-get-uses ( lines -- ) : fuel-get-uses ( name lines -- )
[ get-uses ] curry fuel-with-autouse ; '[
[
_ [
parser-quiet? on
_ parse-fresh drop
] with-source-file
] with-compilation-unit
] fuel-with-autouse ;
! Edit locations ! Edit locations
: fuel-get-word-location ( word -- result )
word-location ;
: fuel-get-word-location ( word -- ) : fuel-get-vocab-location ( vocab -- result )
word-location fuel-eval-set-result ; vocab-location ;
: fuel-get-vocab-location ( vocab -- ) : fuel-get-doc-location ( word -- result )
vocab-location fuel-eval-set-result ; doc-location ;
: fuel-get-doc-location ( word -- ) : fuel-get-article-location ( name -- result )
doc-location fuel-eval-set-result ; article-location ;
: fuel-get-article-location ( name -- ) : fuel-get-vocabs ( -- reuslt )
article-location fuel-eval-set-result ; all-disk-vocab-names ;
: fuel-get-vocabs ( -- ) : fuel-get-vocabs/prefix ( prefix -- result )
all-disk-vocab-names fuel-eval-set-result ; get-vocabs/prefix ;
: fuel-get-vocabs/prefix ( prefix -- ) : fuel-get-words ( prefix names -- result )
get-vocabs/prefix fuel-eval-set-result ; get-vocabs-words/prefix ;
: fuel-get-words ( prefix names -- )
get-vocabs-words/prefix fuel-eval-set-result ;
! Cross-references ! Cross-references
: fuel-callers-xref ( word -- ) callers-xref fuel-eval-set-result ; : fuel-callers-xref ( word -- result ) callers-xref ;
: fuel-callees-xref ( word -- ) callees-xref fuel-eval-set-result ; : fuel-callees-xref ( word -- result ) callees-xref ;
: fuel-apropos-xref ( str -- ) apropos-xref fuel-eval-set-result ; : fuel-apropos-xref ( str -- result ) apropos-xref ;
: fuel-vocab-xref ( vocab -- ) vocab-xref fuel-eval-set-result ; : fuel-vocab-xref ( vocab -- result ) vocab-xref ;
: fuel-vocab-uses-xref ( vocab -- ) vocab-uses-xref fuel-eval-set-result ; : fuel-vocab-uses-xref ( vocab -- result ) vocab-uses-xref ;
: fuel-vocab-usage-xref ( vocab -- ) vocab-usage-xref fuel-eval-set-result ; : fuel-vocab-usage-xref ( vocab -- result ) vocab-usage-xref ;
! Help support ! Help support
: fuel-get-article ( name -- ) fuel.help::get-article fuel-eval-set-result ; : fuel-get-article ( name -- result )
fuel.help::get-article ;
: fuel-get-article-title ( name -- ) : fuel-get-article-title ( name -- result )
articles get at [ article-title ] [ f ] if* fuel-eval-set-result ; articles get at [ article-title ] [ f ] if* ;
: fuel-word-help ( name -- ) word-help fuel-eval-set-result ; : fuel-word-help ( name -- result ) word-help ;
: fuel-word-def ( name -- ) word-def fuel-eval-set-result ; : fuel-word-def ( name -- result ) word-def ;
: fuel-vocab-help ( name -- ) fuel.help::vocab-help fuel-eval-set-result ; : fuel-vocab-help ( name -- result ) fuel.help::vocab-help ;
: fuel-word-synopsis ( word -- ) word-synopsis fuel-eval-set-result ; : fuel-word-synopsis ( word -- synopsis )
word-synopsis ;
: fuel-vocab-summary ( name -- ) : fuel-vocab-summary ( name -- summary )
fuel.help::vocab-summary fuel-eval-set-result ; fuel.help::vocab-summary ;
: fuel-index ( quot -- ) call( -- seq ) format-index fuel-eval-set-result ; : fuel-index ( quot -- result )
call( -- seq ) format-index ;
: fuel-get-vocabs/tag ( tag -- ) : fuel-get-vocabs/tag ( tag -- result )
get-vocabs/tag fuel-eval-set-result ; get-vocabs/tag ;
: fuel-get-vocabs/author ( author -- ) : fuel-get-vocabs/author ( author -- result )
get-vocabs/author fuel-eval-set-result ; get-vocabs/author ;
! Scaffold support ! Scaffold support
: scaffold-name ( devname -- ) : scaffold-name ( devname -- )
[ developer-name set ] when* ; [ developer-name set ] when* ;
: fuel-scaffold-vocab ( root name devname -- ) : fuel-scaffold-vocab ( root name devname -- result )
[ scaffold-name dup [ scaffold-vocab ] dip ] with-scope [ scaffold-name dup [ scaffold-vocab ] dip ] with-scope
dup require vocab-source-path absolute-path fuel-eval-set-result ; dup require vocab-source-path absolute-path ;
: fuel-scaffold-help ( name devname -- ) : fuel-scaffold-help ( name devname -- result )
[ scaffold-name dup require dup scaffold-docs ] with-scope [ scaffold-name dup require dup scaffold-docs ] with-scope
vocab-docs-path absolute-path fuel-eval-set-result ; vocab-docs-path absolute-path ;
: fuel-scaffold-tests ( name devname -- ) : fuel-scaffold-tests ( name devname -- result )
[ scaffold-name dup require dup scaffold-tests ] with-scope [ scaffold-name dup require dup scaffold-tests ] with-scope
vocab-tests-file absolute-path fuel-eval-set-result ; vocab-tests-file absolute-path ;
: fuel-scaffold-authors ( name devname -- ) : fuel-scaffold-authors ( name devname -- result )
[ scaffold-name dup require dup scaffold-authors ] with-scope [ scaffold-name dup require dup scaffold-authors ] with-scope
[ vocab-authors-path ] keep swap vocab-append-path absolute-path fuel-eval-set-result ; [ vocab-authors-path ] keep swap vocab-append-path absolute-path ;
: fuel-scaffold-tags ( name tags -- ) : fuel-scaffold-tags ( name tags -- result )
[ scaffold-tags ] [ scaffold-tags ]
[ [
drop [ vocab-tags-path ] keep swap drop [ vocab-tags-path ] keep swap
vocab-append-path absolute-path fuel-eval-set-result vocab-append-path absolute-path
] 2bi ; ] 2bi ;
: fuel-scaffold-summary ( name summary -- ) : fuel-scaffold-summary ( name summary -- result )
[ scaffold-summary ] [ scaffold-summary ]
[ [
drop [ vocab-summary-path ] keep swap drop [ vocab-summary-path ] keep swap
vocab-append-path absolute-path fuel-eval-set-result vocab-append-path absolute-path
] 2bi ; ] 2bi ;
: fuel-scaffold-platforms ( name platforms -- ) : fuel-scaffold-platforms ( name platforms -- result )
[ scaffold-platforms ] [ scaffold-platforms ]
[ [
drop [ vocab-platforms-path ] keep swap drop [ vocab-platforms-path ] keep swap
vocab-append-path absolute-path fuel-eval-set-result vocab-append-path absolute-path
] 2bi ; ] 2bi ;
: fuel-scaffold-get-root ( name -- ) find-vocab-root fuel-eval-set-result ; : fuel-scaffold-get-root ( name -- result )
find-vocab-root ;

View File

@ -1,10 +1,11 @@
! Copyright (C) 2009 Jose Antonio Ortega Ruiz. ! Copyright (C) 2009 Jose Antonio Ortega Ruiz.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays assocs combinators combinators.short-circuit USING: accessors arrays assocs combinators
fry help help.crossref help.markup help.markup.private help.topics combinators.short-circuit help help.crossref help.markup
help.vocabs io io.streams.string kernel make namespaces parser help.markup.private help.topics help.vocabs io io.streams.string
prettyprint see sequences splitting summary vocabs vocabs.hierarchy kernel make namespaces parser prettyprint see sequences
vocabs.metadata vocabs.parser words ; splitting summary vocabs vocabs.hierarchy vocabs.metadata
vocabs.parser words ;
IN: fuel.help IN: fuel.help
SYMBOLS: $doc-path $next-link $prev-link $fuel-nav-crumbs ; SYMBOLS: $doc-path $next-link $prev-link $fuel-nav-crumbs ;
@ -35,7 +36,7 @@ SYMBOLS: $doc-path $next-link $prev-link $fuel-nav-crumbs ;
<PRIVATE <PRIVATE
: find-word ( name -- word/f ) : find-word ( name -- word/f )
{ [ search ] [ '[ name>> _ = ] all-words swap find nip ] } 1|| ; { [ search ] [ words-named ?first ] } 1|| ;
: definition-str ( word -- str ) : definition-str ( word -- str )
[ see ] with-string-writer ; inline [ see ] with-string-writer ; inline

View File

@ -42,6 +42,9 @@ FUNCTION: int gdbm_exists ( GDBM_FILE dbf, datum key )
FUNCTION: int gdbm_setopt ( GDBM_FILE dbf, int option, int* value, int size ) FUNCTION: int gdbm_setopt ( GDBM_FILE dbf, int option, int* value, int size )
FUNCTION: int gdbm_fdesc ( GDBM_FILE dbf ) FUNCTION: int gdbm_fdesc ( GDBM_FILE dbf )
! Removed in gdbm 1.14
C-GLOBAL: int gdbm_errno C-GLOBAL: int gdbm_errno
! Added in gdbm 1.14
FUNCTION: int *gdbm_errno_location ( )
FUNCTION: c-string gdbm_strerror ( int errno ) FUNCTION: c-string gdbm_strerror ( int errno )

View File

@ -1,8 +1,8 @@
! Copyright (C) 2010 Dmitry Shubin. ! Copyright (C) 2010 Dmitry Shubin.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: accessors alien.c-types alien.data alien.destructors USING: accessors alien.c-types alien.data alien.destructors
alien.enums alien.syntax classes.struct combinators destructors alien.enums alien.syntax classes.struct combinators continuations
fry gdbm.ffi io.backend kernel libc locals math namespaces destructors fry gdbm.ffi io.backend kernel libc locals math namespaces
sequences serialize strings ; sequences serialize strings ;
IN: gdbm IN: gdbm
@ -41,10 +41,12 @@ ENUM: gdbm-error
gdbm-option-already-set gdbm-option-already-set
gdbm-illegal-option ; gdbm-illegal-option ;
<PRIVATE <PRIVATE
: gdbm-throw ( -- * ) gdbm_errno gdbm-error number>enum throw ; : gdbm-errno ( -- n )
[ gdbm_errno ] [ drop gdbm_errno_location int deref ] recover ;
: gdbm-throw ( -- * ) gdbm-errno gdbm-error number>enum throw ;
: check-error ( ret -- ) 0 = [ gdbm-throw ] unless ; : check-error ( ret -- ) 0 = [ gdbm-throw ] unless ;

View File

@ -1,7 +1,7 @@
! Copyright (C) 2015 Doug Coleman. ! Copyright (C) 2015 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: fry git io io.directories io.encodings.utf8 io.files.temp USING: accessors fry git io io.directories io.encodings.utf8
io.files.unique io.launcher kernel sequences tools.test ; io.launcher io.streams.string kernel sequences tools.test ;
IN: git.tests IN: git.tests
: run-process-stdout ( process -- string ) : run-process-stdout ( process -- string )
@ -21,6 +21,12 @@ IN: git.tests
@ @
] with-empty-test-git-repo ; inline ] with-empty-test-git-repo ; inline
{ "hello" } [
commit new "author" "hello\r\n"
[ parse-commit-field ] with-string-reader
author>>
] unit-test
{ "refs/heads/master" } [ { "refs/heads/master" } [
[ git-head-ref ] with-empty-test-git-repo [ git-head-ref ] with-empty-test-git-repo
] unit-test ] unit-test

View File

@ -148,11 +148,6 @@ CONSTRUCTOR: <tree> tree ( -- obj ) ;
ERROR: unknown-commit-line line name ; ERROR: unknown-commit-line line name ;
ERROR: string-expected got expected ;
: expect-string ( string expected -- )
2dup = [ 2drop ] [ string-expected ] if ;
ERROR: eof-too-early ; ERROR: eof-too-early ;
ERROR: unknown-field field ; ERROR: unknown-field field ;
@ -175,13 +170,11 @@ ERROR: unexpected-text text ;
} case ; } case ;
: parse-commit ( bytes -- commit ) : parse-commit ( bytes -- commit )
" " split1 [ "commit" expect-string ] [ string>number read ] bi* " " split1 [ "commit" assert= ] [ string>number read ] bi*
utf8 [ utf8 [
commit new parse-commit-lines commit new parse-commit-lines
] with-byte-reader ; ] with-byte-reader ;
: parse-tree-field ( obj parameter -- obj ) : parse-tree-field ( obj parameter -- obj )
[ "\r\n" read-until* ] dip { [ "\r\n" read-until* ] dip {
{ "tree" [ >>tree ] } { "tree" [ >>tree ] }
@ -504,8 +497,6 @@ ERROR: repeated-parent-hash hash ;
H{ } clone parents [ H{ } clone parents [
git-head-object [ git-head-object [
parents>> dup string? [ random ] unless [ parents>> dup string? [ random ] unless [
! [ parents get 2dup key? [ repeated-parent-hash ] when dupd set-at ] keep
! dup "parent: " prepend print flush yield
dup git-unpacked-object-exists? dup git-unpacked-object-exists?
[ git-read-object ] [ git-object-from-pack ] if [ git-read-object ] [ git-object-from-pack ] if
] [ f ] if* ] [ f ] if*

View File

@ -27,7 +27,7 @@ M: stack-entry-renderer row-value
: <stack-display> ( model -- gadget ) : <stack-display> ( model -- gadget )
<stack-table> <scroller> "Operand stack" <stack-table> <scroller> "Operand stack"
color: dark-gray <labeled-gadget> ; color: dark-gray <colored-labeled-gadget> ;
TUPLE: gml-editor < frame editor gml stack-model b-rep b-rep-model ; TUPLE: gml-editor < frame editor gml stack-model b-rep b-rep-model ;
@ -99,7 +99,7 @@ CONSTANT: example-dir "vocab:gml/examples/"
30 >>max-rows 30 >>max-rows
40 >>min-cols 40 >>min-cols
40 >>max-cols 40 >>max-cols
<scroller> "Editor" color: dark-gray <labeled-gadget> ; <scroller> "Editor" color: dark-gray <colored-labeled-gadget> ;
: <gml-editor> ( -- gadget ) : <gml-editor> ( -- gadget )
2 3 gml-editor new-frame 2 3 gml-editor new-frame

View File

@ -0,0 +1,23 @@
! Copyright (C) 2018 Björn Lindqvist.
! See http://factorcode.org/license.txt for BSD license.
USING: help.markup help.syntax ;
IN: google.gmail
ARTICLE: "google.gmail" "GMail Client"
"This vocab implements an api to GMail based on " { $vocab-link "oauth2" } "."
$nl
"To use the vocab, it first needs to be supplied the 'Client ID' and 'Client secret settings' using the " { $link configure-oauth2 } " vord:"
{ $unchecked-example
"\"client-id\" \"client-secret\" configure-oauth2"
}
"The settings can be found on Google's developer console at " { $url "https://console.developers.google.com" } ". Then the authenticated users labels can be listed using:"
{ $unchecked-example
"list-labels"
}
"Or to list the first message in the users inbox:"
{ $unchecked-example
"\"INBOX\" list-messages-by-label \"messages\" of"
"first \"id\" of { } get-messages"
} ;
ABOUT: "google.gmail"

View File

@ -11,20 +11,20 @@ CONSTANT: token-uri "https://www.googleapis.com/oauth2/v4/token"
CONSTANT: redirect-uri "urn:ietf:wg:oauth:2.0:oob" CONSTANT: redirect-uri "urn:ietf:wg:oauth:2.0:oob"
CONSTANT: gmail-scope-ro "https://www.googleapis.com/auth/gmail.readonly" CONSTANT: gmail-scope-ro "https://www.googleapis.com/auth/gmail.readonly"
SYMBOL: access-token SYMBOLS: access-token google-oauth2 ;
: configure-oauth2 ( client-id client-secret -- ) : configure-oauth2 ( client-id client-secret -- )
[ auth-uri token-uri redirect-uri ] 2dip gmail-scope-ro { } [ auth-uri token-uri redirect-uri ] 2dip gmail-scope-ro { }
oauth2 boa oauth2 set ; oauth2 boa google-oauth2 set ;
: ensure-token ( -- ) : ensure-token ( -- )
access-token [ access-token [
[ [
dup access-expired? [ dup access-expired? [
oauth2 get over refresh-flow update-tokens google-oauth2 get over refresh-flow update-tokens
] when ] when
] [ ] [
oauth2 get console-flow google-oauth2 get console-flow
] if* ] if*
] change ; ] change ;

View File

@ -1,6 +1,6 @@
! Copyright (C) 2009 Joe Groff. ! Copyright (C) 2009 Joe Groff.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: help.markup help.syntax ui.gadgets.worlds ; USING: gpu.private help.markup help.syntax ui.gadgets.worlds ;
IN: gpu IN: gpu
HELP: finish-gpu HELP: finish-gpu
@ -15,6 +15,9 @@ HELP: flush-gpu
HELP: gpu-object HELP: gpu-object
{ $class-description "Parent class of all GPU resources." } ; { $class-description "Parent class of all GPU resources." } ;
HELP: has-vertex-array-objects?
{ $var-description "Whether the opengl version supports Vertex Array Objects or not." } ;
HELP: init-gpu HELP: init-gpu
{ $description "Initializes the current graphics context for use with the " { $snippet "gpu" } " library. This should be the first thing called in a world's " { $link begin-world } " method." } ; { $description "Initializes the current graphics context for use with the " { $snippet "gpu" } " library. This should be the first thing called in a world's " { $link begin-world } " method." } ;

View File

@ -1,9 +1,17 @@
! Copyright (C) 2009 Joe Groff. ! Copyright (C) 2009 Joe Groff.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: classes classes.struct gpu.buffers help.markup help.syntax USING: classes classes.struct gpu.buffers gpu.shaders.private
images kernel math multiline quotations sequences strings words ; help.markup help.syntax images math sequences strings words ;
IN: gpu.shaders IN: gpu.shaders
HELP: <multi-vertex-array>
{ $values
{ "vertex-formats" "a list of " { $link buffer-ptr } "/" { $link vertex-format } " pairs" }
{ "program-instance" program-instance }
{ "vertex-array" vertex-array }
}
{ $description "Creates a new " { $link vertex-array } " to feed data to " { $snippet "program-instance" } " from the set of " { $link buffer } "s specified in " { $snippet "vertex-formats" } ". The first element of each pair in " { $snippet "vertex-formats" } " can be either a " { $link buffer-ptr } " or a " { $link buffer } "; in the latter case, vertex data in the associated format is read from the beginning of the buffer." } ;
HELP: <program-instance> HELP: <program-instance>
{ $values { $values
{ "program" program } { "program" program }
@ -18,13 +26,13 @@ HELP: <shader-instance>
} }
{ $description "Compiles an instance of " { $snippet "shader" } " for the current graphics context. If an instance already exists for " { $snippet "shader" } " in the current context, it is reused." } ; { $description "Compiles an instance of " { $snippet "shader" } " for the current graphics context. If an instance already exists for " { $snippet "shader" } " in the current context, it is reused." } ;
HELP: <multi-vertex-array> HELP: <vertex-array-object>
{ $values { $values
{ "vertex-formats" "a list of " { $link buffer-ptr } "/" { $link vertex-format } " pairs" } { "vertex-buffer" "a vertex buffer" }
{ "program-instance" program-instance } { "program-instance" program-instance }
{ "vertex-array" vertex-array } { "format" vertex-format }
} }
{ $description "Creates a new " { $link vertex-array } " to feed data to " { $snippet "program-instance" } " from the set of " { $link buffer } "s specified in " { $snippet "vertex-formats" } ". The first element of each pair in " { $snippet "vertex-formats" } " can be either a " { $link buffer-ptr } " or a " { $link buffer } "; in the latter case, vertex data in the associated format is read from the beginning of the buffer." } ; { $description "Creates a new vertex array object." } ;
HELP: \feedback-format: HELP: \feedback-format:
{ $syntax "feedback-format: vertex-format" } { $syntax "feedback-format: vertex-format" }
@ -32,7 +40,7 @@ HELP: \feedback-format:
HELP: \GLSL-PROGRAM: HELP: \GLSL-PROGRAM:
{ $syntax "GLSL-PROGRAM: program-name shader shader ... [vertex-format vertex-format ...] [feedback-format: vertex-format] ;" } { $syntax "GLSL-PROGRAM: program-name shader shader ... [vertex-format vertex-format ...] [feedback-format: vertex-format] ;" }
{ $description "Defines a new " { $link program } " named " { $snippet "program-name" } ". When the program is instantiated with " { $link <program-instance> } ", it will link together instances of all of the specified " { $link shader } "s to create the program instance. If any " { $link vertex-format } "s are specified, their attributes will be pre-assigned attribute indexes at link time, to ensure that their indexes remain constant if the program is refreshed with " { $link refresh-program } ". A transform feedback vertex format may optionally be specified with " { $link postpone: \feedback-format: } "; if the program is used to collect transform feedback, the given vertex format will be used for the output." } { $description "Defines a new shader " { $link program } " named " { $snippet "program-name" } ". When the program is instantiated with " { $link <program-instance> } ", it will link together instances of all of the specified " { $link shader } "s to create the program instance. If any " { $link vertex-format } "s are specified, their attributes will be pre-assigned attribute indexes at link time, to ensure that their indexes remain constant if the program is refreshed with " { $link refresh-program } ". A transform feedback vertex format may optionally be specified with " { $link postpone: \feedback-format: } "; if the program is used to collect transform feedback, the given vertex format will be used for the output." }
{ $notes "Transform feedback requires OpenGL 3.0 or one of the " { $snippet "GL_EXT_transform_feedback" } " or " { $snippet "GL_ARB_transform_feedback" } " extensions." } ; { $notes "Transform feedback requires OpenGL 3.0 or one of the " { $snippet "GL_EXT_transform_feedback" } " or " { $snippet "GL_ARB_transform_feedback" } " extensions." } ;
HELP: \GLSL-SHADER-FILE: HELP: \GLSL-SHADER-FILE:

View File

@ -1,6 +1,6 @@
! Copyright (C) 2009 Joe Groff. ! Copyright (C) 2009 Joe Groff.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: multiline gpu.shaders gpu.shaders.private tools.test ; USING: gpu.shaders gpu.shaders.private io.pathnames tools.test ;
IN: gpu.shaders.tests IN: gpu.shaders.tests
{ "ERROR: foo.factor:20: Bad command or filename { "ERROR: foo.factor:20: Bad command or filename
@ -10,3 +10,9 @@ NOT:A:LOG:LINE" }
"ERROR: 0:1: Bad command or filename "ERROR: 0:1: Bad command or filename
INFO: 0:11: The operation completed successfully INFO: 0:11: The operation completed successfully
NOT:A:LOG:LINE" replace-log-line-numbers ] unit-test NOT:A:LOG:LINE" replace-log-line-numbers ] unit-test
SYMBOL: a-test-symbol
{ "shaders" } [
a-test-symbol word-directory file-name
] unit-test

View File

@ -456,7 +456,7 @@ TUPLE: compile-shader-error shader log ;
TUPLE: link-program-error program log ; TUPLE: link-program-error program log ;
: throw-compile-shader-error ( shader instance -- * ) : throw-compile-shader-error ( shader instance -- * )
[ dup ] dip [ gl-shader-info-log ] [ delete-gl-shader ] bi [ dup ] dip [ gl-shader-info-log ] [ glDeleteShader ] bi
replace-log-line-numbers compile-shader-error boa throw ; replace-log-line-numbers compile-shader-error boa throw ;
: throw-link-program-error ( program instance -- * ) : throw-link-program-error ( program instance -- * )
@ -494,11 +494,14 @@ DEFER: <shader-instance>
: link-program ( program -- program-instance ) : link-program ( program -- program-instance )
dup shaders>> [ <shader-instance> ] map (link-program) ; dup shaders>> [ <shader-instance> ] map (link-program) ;
: word-directory ( word -- directory )
where first parent-directory ;
: in-word's-path ( word kind filename -- word kind filename' ) : in-word's-path ( word kind filename -- word kind filename' )
[ over ] dip [ where first parent-directory ] dip append-path ; pick word-directory prepend-path ;
: become-shader-instance ( shader-instance new-shader-instance -- ) : become-shader-instance ( shader-instance new-shader-instance -- )
handle>> [ swap delete-gl-shader ] curry change-handle drop ; handle>> [ swap glDeleteShader ] curry change-handle drop ;
: refresh-shader-source ( shader -- ) : refresh-shader-source ( shader -- )
dup filename>> dup filename>>
@ -506,7 +509,7 @@ DEFER: <shader-instance>
[ drop ] if* ; [ drop ] if* ;
: become-program-instance ( program-instance new-program-instance -- ) : become-program-instance ( program-instance new-program-instance -- )
handle>> [ swap delete-gl-program-only ] curry change-handle drop ; handle>> [ swap glDeleteProgram ] curry change-handle drop ;
: reset-memos ( -- ) : reset-memos ( -- )
\ uniform-index reset-memoized \ uniform-index reset-memoized
@ -622,11 +625,11 @@ SYNTAX: \GLSL-PROGRAM:
define-constant ; define-constant ;
M: shader-instance dispose M: shader-instance dispose
[ dup valid-handle? [ delete-gl-shader ] [ drop ] if f ] change-handle [ dup valid-handle? [ glDeleteShader ] [ drop ] if f ] change-handle
[ world>> ] [ shader>> instances>> ] [ ] tri ?delete-at ; [ world>> ] [ shader>> instances>> ] [ ] tri ?delete-at ;
M: program-instance dispose M: program-instance dispose
[ dup valid-handle? [ delete-gl-program-only ] [ drop ] if f ] change-handle [ dup valid-handle? [ glDeleteProgram ] [ drop ] if f ] change-handle
[ world>> ] [ program>> instances>> ] [ ] tri ?delete-at [ world>> ] [ program>> instances>> ] [ ] tri ?delete-at
reset-memos ; reset-memos ;

View File

@ -0,0 +1,5 @@
USING: help.markup help.syntax ;
IN: gpu.util
HELP: window-vertex-format
{ $class-description "A vertex format for screen coordinates." } ;

View File

@ -0,0 +1,11 @@
USING: help.markup help.syntax math ;
IN: gpu.util.wasd
HELP: wasd-world
{ $class-description "A wasd-world is a 3d world in which the camera can move using the keybindings 'w', 'a', 's' and 'd' and the view can rotate using the camera." } ;
HELP: wasd-near-plane
{ $values
{ "world" wasd-world }
{ "near-plane" float }
} { $description "Near plane of the 3d world." } ;

View File

@ -1,7 +1,7 @@
! Copyright (C) 2010 Anton Gorenko. ! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: alien.strings gdk.gl.ffi gobject.ffi gtk.ffi gtk.gl.ffi USING: alien.strings gdk.gl.ffi gobject.ffi gtk.ffi gtk.gl.ffi
io.encodings.utf8 kernel locals opengl.gl ; io.encodings.utf8 kernel locals opengl.demo-support opengl.gl ;
IN: gtk-samples.opengl IN: gtk-samples.opengl
! This sample is based on ! This sample is based on
@ -25,14 +25,14 @@ IN: gtk-samples.opengl
[ [
GL_COLOR_BUFFER_BIT glClear GL_COLOR_BUFFER_BIT glClear
GL_TRIANGLES glBegin GL_TRIANGLES [
1.0 0.0 0.0 glColor3f 1.0 0.0 0.0 glColor3f
0 1 glVertex2i 0 1 glVertex2i
0.0 1.0 0.0 glColor3f 0.0 1.0 0.0 glColor3f
-1 -1 glVertex2i -1 -1 glVertex2i
0.0 0.0 1.0 glColor3f 0.0 0.0 1.0 glColor3f
1 -1 glVertex2i 1 -1 glVertex2i
glEnd ] do-state
gl-drawable gdk_gl_drawable_is_double_buffered 1 = gl-drawable gdk_gl_drawable_is_double_buffered 1 =
[ gl-drawable gdk_gl_drawable_swap_buffers ] [ gl-drawable gdk_gl_drawable_swap_buffers ]

View File

@ -0,0 +1 @@
Cat Stevens

View File

@ -0,0 +1,183 @@
USING: help help.lint.coverage help.lint.coverage.private
help.markup help.syntax io kernel sequences strings vocabs words ;
IN: help.lint.coverage
<PRIVATE
: $related-subsections ( element -- )
[ related-words ] [ $subsections ] bi ;
PRIVATE>
ABOUT: "help.lint.coverage"
ARTICLE: "help.lint.coverage" "Help coverage linting"
"The " { $vocab-link "help.lint.coverage" } " vocabulary implements a very picky documentation completeness checker."
$nl
"The documentation coverage linter requires most words to have " { $link postpone: \HELP: } " declarations defining some of the "
{ $links $values $description $error-description $class-description $examples } " sections (see " { $links "element-types" } ")."
$nl
"This vocabulary is intended to be used alongside and after " { $vocab-link "help.lint" } ", not as a replacement for it."
$nl
"These words are provided to aid in writing more complete documentation:"
{ $related-subsections
word-help-coverage.
vocab-help-coverage.
prefix-help-coverage.
}
"Coverage report objects:"
{ $related-subsections
word-help-coverage
help-coverage.
}
"Raw report generation:"
{ $related-subsections
<word-help-coverage>
<vocab-help-coverage>
<prefix-help-coverage>
} ;
{ word-help-coverage word-help-coverage. <word-help-coverage> <vocab-help-coverage> <prefix-help-coverage> }
related-words
HELP: word-help-coverage
{ $class-description "A documentation coverage report for a single word." } ;
HELP: help-coverage.
{ $values { "coverage" word-help-coverage } }
{ $contract "Displays a coverage object." }
{ $examples
{ $example
"USING: help.lint.coverage ;"
"\\ <word-help-coverage> <word-help-coverage> help-coverage."
"[help.lint.coverage] <word-help-coverage>: full help coverage"
}
} ;
HELP: word-help-coverage.
{ $values { "word-spec" { $or word string } } }
{ $description "Prettyprints a help coverage report of " { $snippet "word-spec" } " to " { $link output-stream } "." }
{ $examples
{ $example
"USING: sequences help.lint.coverage ;"
"\\ map word-help-coverage."
"[sequences] map: needs help section: $examples"
}
} ;
HELP: vocab-help-coverage.
{ $values { "vocab-spec" { $or vocab string } } }
{ $description "Prettyprints a help coverage report of " { $snippet "vocab-spec" } " to " { $link output-stream } "." }
{ $examples
{ $example
"USING: help.lint.coverage ;"
"\"english\" vocab-help-coverage."
"[english] a10n: needs help sections: $description $examples
[english] count-of-things: needs help sections: $description $examples
[english] pluralize: needs help sections: $description $examples
[english] singularize: needs help sections: $description $examples
0.0% of words have complete documentation"
}
} ;
HELP: prefix-help-coverage.
{ $values { "prefix-spec" { $or vocab string } } { "private?" boolean } }
{ $description "Prettyprints a help coverage report of " { $snippet "prefix-spec" } " to " { $link output-stream } "." }
{ $examples
{ $example
"USING: help.lint.coverage ;"
"\"english\" t prefix-help-coverage."
"[english] a10n: needs help sections: $description $examples
[english] count-of-things: needs help sections: $description $examples
[english] pluralize: needs help sections: $description $examples
[english] singularize: needs help sections: $description $examples
[english.private] match-case: needs help sections: $description $examples
[english.private] plural-to-singular: needs help sections: $description $examples
[english.private] singular-to-plural: needs help sections: $description $examples
0.0% of words have complete documentation"
}
} ;
HELP: <prefix-help-coverage>
{ $values { "prefix" string } { "private?" boolean } { "coverage" sequence } }
{ $description "Runs the help coverage checker on every child vocabulary of the given " { $snippet "prefix" } ", including the base vocabulary. If " { $snippet "private?" } " is " { $snippet "f" } ", the prefix's child " { $snippet ".private" } " vocabularies are not checked. If " { $snippet "private?" } " is " { $snippet "t" } ", " { $emphasis "all" } " child vocabularies are checked." }
{ $examples
{ $example
"USING: help.lint.coverage prettyprint ;"
"\"english\" t <prefix-help-coverage> ."
"{
T{ word-help-coverage
{ word-name a10n }
{ omitted-sections { $description $examples } }
}
T{ word-help-coverage
{ word-name count-of-things }
{ omitted-sections { $description $examples } }
}
T{ word-help-coverage
{ word-name pluralize }
{ omitted-sections { $description $examples } }
}
T{ word-help-coverage
{ word-name singularize }
{ omitted-sections { $description $examples } }
}
T{ word-help-coverage
{ word-name match-case }
{ omitted-sections { $description $examples } }
}
T{ word-help-coverage
{ word-name plural-to-singular }
{ omitted-sections { $description $examples } }
}
T{ word-help-coverage
{ word-name singular-to-plural }
{ omitted-sections { $description $examples } }
}
}"
}
} ;
HELP: <word-help-coverage>
{ $values { "word" { $or string word } } { "coverage" word-help-coverage } }
{ $contract "Looks up a word in the current scope and generates a documentation coverage report for it."}
{ $examples
{ $example
"USING: help.lint.coverage prettyprint ;"
"\\ <word-help-coverage> <word-help-coverage> ."
"T{ word-help-coverage
{ word-name <word-help-coverage> }
{ 100%-coverage? t }
}"
}
} ;
HELP: <vocab-help-coverage>
{ $values { "vocab-spec" { $or vocab string } } { "coverage" sequence } }
{ $description "Runs the help coverage checker on the vocabulary in the given " { $snippet "vocab-spec" } "." }
{ $examples
{ $example
"USING: help.lint.coverage prettyprint ;"
"\"english\" <vocab-help-coverage> ."
"{
T{ word-help-coverage
{ word-name a10n }
{ omitted-sections { $description $examples } }
}
T{ word-help-coverage
{ word-name count-of-things }
{ omitted-sections { $description $examples } }
}
T{ word-help-coverage
{ word-name pluralize }
{ omitted-sections { $description $examples } }
}
T{ word-help-coverage
{ word-name singularize }
{ omitted-sections { $description $examples } }
}
}"
}
} ;

View File

@ -0,0 +1,68 @@
USING: accessors help.lint.coverage help.lint.coverage.private
help.markup help.syntax kernel literals math math.matrices
sequences sorting tools.test vocabs ;
IN: help.lint.coverage.tests
<PRIVATE
: empty ( a v -- x y ) ;
: nonexistent ( a v -- x y ) ;
: defined ( x -- x ) ;
HELP: empty { $examples } ;
HELP: nonexistent ;
HELP: defined { $examples { $example "USING: prettyprint ; " "1 ." "1" } } ;
PRIVATE>
{ t } [ \ empty empty-examples? ] unit-test
{ f } [ \ nonexistent empty-examples? ] unit-test
{ f } [ \ defined empty-examples? ] unit-test
{ f } [ \ keep empty-examples? ] unit-test
{ { $description $values } } [ \ empty missing-sections natural-sort ] unit-test
{ { $description $values } } [ \ defined missing-sections natural-sort ] unit-test
{ { } } [ \ keep missing-sections ] unit-test
{ { "a.b" "a.b.c" } } [ { "a.b" "a.b.private" "a.b.c.private" "a.b.c" } filter-private ] unit-test
{ "sections" } [ 0 "section" ?pluralize ] unit-test
{ "section" } [ 1 "section" ?pluralize ] unit-test
{ "sections" } [ 10 "section" ?pluralize ] unit-test
{ { $examples } } [ \ empty word-defines-sections ] unit-test
{ { $examples } } [ \ defined word-defines-sections ] unit-test
{ { } } [ \ nonexistent word-defines-sections ] unit-test
{ { $values $description $examples } } [ \ keep word-defines-sections ] unit-test
{ { $values $contract $examples } } [ \ <word-help-coverage> word-defines-sections ] unit-test
{ eye } [ "eye" find-word ] unit-test
{
V{ "[" { $[ "math" dup lookup-vocab ] } "] " { "zero?" zero? } ": " }
} [
V{ } clone \ zero? (assemble-word-metadata)
] unit-test
{
V{ "empty " { "$examples" $examples } "; " }
} [
V{ } clone word-help-coverage new t >>empty-examples? (assemble-empty-examples)
] unit-test
{
V{ "needs help " "sections: " { { "$description" $description } { "$examples" $examples } } }
} [
V{ } clone word-help-coverage new { $description $examples } >>omitted-sections (assemble-omitted-sections)
] unit-test
{
V{ "needs help " "section: " { { "$description" $description } } }
} [
V{ } clone word-help-coverage new { $description } >>omitted-sections (assemble-omitted-sections)
] unit-test
{
V{ "full help coverage" }
} [
V{ } clone word-help-coverage new t >>100%-coverage? (assemble-full-coverage)
] unit-test
! make sure this doesn't throw an error (would signify an issue with ignored-words)
! the contents of all-words is not important
{ } [ all-words [ <word-help-coverage> ] map drop ] unit-test

View File

@ -0,0 +1,155 @@
USING: accessors arrays assocs classes classes.error combinators
continuations english formatting fry generic help
help.lint.checks help.markup io io.streams.string io.styles
kernel math namespaces parser sequences sequences.deep sets
sorting splitting strings summary vocabs vocabs.parser words ;
FROM: namespaces => set ;
IN: help.lint.coverage
TUPLE: word-help-coverage
{ word-name word initial: postpone: f }
{ omitted-sections sequence initial: { } }
{ empty-examples? boolean initial: f }
{ 100%-coverage? boolean initial: f } ;
<PRIVATE
CONSTANT: ignored-words {
$low-level-note
$prettyprinting-note
$values-x/y
$parsing-note
$io-error
$shuffle
$complex-shuffle
$nl
}
DEFER: ?pluralize
: write-object-seq ( object-seq -- )
[
dup array? [
dup ?first array?
[ dup length '[
swap first2 write-object
_ 1 - abs = not [ " " write ] when
] each-index
] [ first2 write-object ] if
] [ write ] if
] each ; inline
: (assemble-word-metadata) ( vec word -- vec )
[
[ "[" ] dip vocabulary>> dup lookup-vocab 2array "] "
3array over push-all
] [
[ name>> ] keep 2array ": "
2array over push-all
] bi ; inline
: (assemble-empty-examples) ( vec coverage -- vec )
empty-examples?>> [ "empty " \ $examples [ name>> ] keep 2array "; "
3array over push-all
] when ;
: (assemble-omitted-sections) ( vec coverage -- vec )
omitted-sections>> [
length "section" ?pluralize ": " append
] [
[ [ name>> ] keep 2array ] map
] bi
[ "needs help " ] 2dip
3array over push-all ;
: (assemble-full-coverage) ( vec coverage -- vec )
drop "full help coverage" over push ;
: (present-coverage) ( coverage-report -- )
[ V{ } clone ] dip
[ word-name>> (assemble-word-metadata) ] keep
dup 100%-coverage?>>
[ (assemble-full-coverage) ] [
[ (assemble-empty-examples) ]
[ (assemble-omitted-sections) ] bi
] if "\n" over push write-object-seq ;
M: word-help-coverage summary
[ (present-coverage) ] with-string-writer ; inline
: sorted-loaded-child-vocabs ( prefix -- assoc )
loaded-child-vocab-names natural-sort ; inline
: filter-private ( seq -- no-private )
[ ".private" ?tail nip not ] filter ; inline
: ?pluralize ( n singular -- singular/plural )
count-of-things " " split1 nip ;
: should-define ( word -- spec )
{
{ [ dup predicate? ] [ drop { } ] } ! predicate?s have generated docs
{ [ dup error-class? ] [ drop { $values $description $error-description } ] }
{ [ dup class? ] [ drop { $class-description } ] }
{ [ dup generic? ] [ drop { $values $contract $examples } ] }
{ [ dup word? ] [ drop { $values $description $examples } ] }
[ drop no-cond ]
} cond ;
: word-defines-sections ( word -- seq )
word-help [ ignored-words member? not ] filter [ ?first ] map ;
! only words that need examples, need to have them nonempty
! not defining examples is not the same as an empty { $examples }
: empty-examples? ( word -- ? )
word-help \ $examples swap elements [ f ] [ first rest empty? ] if-empty ;
: missing-sections ( word -- missing )
[ should-define ] [ word-defines-sections ] bi diff ;
: find-word ( name -- word/f )
dup words-named dup length {
{ 0 [ 2drop f ] }
{ 1 [ first nip ] }
[ drop <ambiguous-use-error> throw-restarts ]
} case ;
PRIVATE>
GENERIC: <word-help-coverage> ( word -- coverage )
M: word <word-help-coverage>
dup [ missing-sections ] [ empty-examples? ] bi
2dup 2array { { } f } =
word-help-coverage boa ; inline
M: string <word-help-coverage>
find-word <word-help-coverage> ; inline
: <vocab-help-coverage> ( vocab-spec -- coverage )
[ auto-use? off vocab-words natural-sort [ <word-help-coverage> ] map ] with-scope ;
: <prefix-help-coverage> ( prefix private? -- coverage )
[
auto-use? off group-articles vocab-articles set
[ sorted-loaded-child-vocabs ] dip not
[ filter-private ] when
[ <vocab-help-coverage> ] map flatten
] with-scope ;
GENERIC: help-coverage. ( coverage -- )
M: sequence help-coverage.
[
[ help-coverage. ] each
] [
[ [ 100%-coverage?>> ] count ] [ length ] bi /f
100 *
"\n%3.1f%% of words have complete documentation\n"
printf
] bi ; recursive
M: word-help-coverage help-coverage.
(present-coverage) ;
: word-help-coverage. ( word-spec -- ) <word-help-coverage> help-coverage. ;
: vocab-help-coverage. ( vocab-spec -- ) <vocab-help-coverage> help-coverage. ;
: prefix-help-coverage. ( prefix-spec private? -- ) <prefix-help-coverage> help-coverage. ;

View File

@ -0,0 +1 @@
Documentation coverage linter

View File

@ -0,0 +1 @@
tools

View File

@ -182,7 +182,7 @@ ERROR: bad-filter n ;
bit-depth :> depth! bit-depth :> depth!
#components width * :> count! #components width * :> count!
#components bit-depth * width * 8 math:align 8 /i :> stride #components bit-depth * width * 8 math::align 8 /i :> stride
height [ height [
stride 1 + byte-reader stream-read stride 1 + byte-reader stream-read
@ -195,10 +195,10 @@ ERROR: bad-filter n ;
count 2 * count! count 2 * count!
] when ] when
bs:<msb0-bit-reader> :> br bs::<msb0-bit-reader> :> br
height [ height [
count [ depth br bs:read ] B{ } replicate-as count [ depth br bs::read ] B{ } replicate-as
8 br bs:align 8 br bs::align
] replicate concat ; ] replicate concat ;
:: reverse-interlace-none ( bytes loading-png -- array ) :: reverse-interlace-none ( bytes loading-png -- array )

View File

@ -1,7 +1,8 @@
! Copyright (C) 2009 Bruno Deferrari ! Copyright (C) 2009 Bruno Deferrari
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: accessors assocs concurrency.mailboxes io irc.client.chats USING: accessors assocs concurrency.mailboxes io
irc.messages kernel namespaces sequences strings words.symbol ; irc.client.chats irc.messages kernel namespaces sequences
strings words.symbol ;
IN: irc.client.base IN: irc.client.base
SYMBOL: current-irc-client SYMBOL: current-irc-client
@ -17,7 +18,7 @@ SYMBOL: current-irc-client
\ current-irc-client swap with-variable ; inline \ current-irc-client swap with-variable ; inline
UNION: to-target privmsg notice ; UNION: to-target privmsg notice ;
UNION: to-channel irc.messages:join part topic kick rpl-channel-modes UNION: to-channel irc.messages::join part topic kick rpl-channel-modes
topic rpl-names rpl-names-end ; topic rpl-names rpl-names-end ;
UNION: to-one-chat to-target to-channel mode ; UNION: to-one-chat to-target to-channel mode ;
UNION: to-many-chats nick quit ; UNION: to-many-chats nick quit ;

View File

@ -1,9 +1,10 @@
! Copyright (C) 2009 Bruno Deferrari ! Copyright (C) 2009 Bruno Deferrari
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: accessors assocs arrays concurrency.mailboxes continuations destructors USING: accessors arrays assocs combinators concurrency.mailboxes
hashtables io irc.client.base irc.client.chats irc.messages kernel namespaces continuations destructors fry hashtables io irc.client.base
strings words.symbol irc.messages.base irc.client.participants fry threads irc.client.chats irc.client.participants irc.messages
combinators irc.messages.parser math sequences ; irc.messages.base irc.messages.parser kernel math namespaces
sequences strings threads words.symbol ;
IN: irc.client.internals IN: irc.client.internals
: do-connect ( server port quot: ( host port -- stream ) attempts -- stream/f ) : do-connect ( server port quot: ( host port -- stream ) attempts -- stream/f )
@ -75,7 +76,7 @@ GENERIC: process-message ( irc-message -- )
M: object process-message drop ; M: object process-message drop ;
M: ping process-message trailing>> /PONG ; M: ping process-message trailing>> /PONG ;
! FIXME: it shouldn't be checking for the presence of chat here... ! FIXME: it shouldn't be checking for the presence of chat here...
M: irc.messages:join M: irc.messages::join
process-message [ sender>> ] [ chat> ] bi process-message [ sender>> ] [ chat> ] bi
[ join-participant ] [ drop ] if* ; [ join-participant ] [ drop ] if* ;
M: part process-message [ sender>> ] [ chat> ] bi [ part-participant ] [ drop ] if* ; M: part process-message [ sender>> ] [ chat> ] bi [ part-participant ] [ drop ] if* ;

View File

@ -1,7 +1,7 @@
! Copyright (C) 2009 Bruno Deferrari. ! Copyright (C) 2009 Bruno Deferrari.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: accessors irc.messages irc.messages.base kernel make USING: accessors combinators irc.messages irc.messages.base
combinators sequences ; kernel make sequences ;
IN: irc.logbot.log-line IN: irc.logbot.log-line
: dot-or-parens ( string -- string ) : dot-or-parens ( string -- string )
@ -23,7 +23,7 @@ M: privmsg >log-line
: prefix% ( string -- ) : prefix% ( string -- )
" [" % % "]" % ; " [" % % "]" % ;
M: irc.messages:join >log-line M: irc.messages::join >log-line
[ [
[ "* " % sender>> % ] [ "* " % sender>> % ]
[ prefix>> prefix% " has joined the channel." % ] bi [ prefix>> prefix% " has joined the channel." % ] bi

View File

@ -7,7 +7,7 @@ kernel math.parser sequences splitting ;
IN: machine-learning.data-sets IN: machine-learning.data-sets
TUPLE: data-set data target target-names description TUPLE: data-set data target target-names description
feature-names ; feature-names ;
C: <data-set> data-set C: <data-set> data-set
@ -17,18 +17,30 @@ C: <data-set> data-set
"resource:extra/machine-learning/data-sets/" prepend "resource:extra/machine-learning/data-sets/" prepend
utf8 file-contents ; utf8 file-contents ;
: load-tabular-file ( name -- lines )
load-file [ blank? ] trim string-lines
[ [ blank? ] split-when harvest ] map harvest ;
: numerify ( table -- data names ) : numerify ( table -- data names )
unclip [ [ [ string>number ] map ] map ] dip ; unclip [ [ [ string>number ] map ] map ] dip ;
: load-table ( name -- data names ) : load-table ( name -- data names )
load-file [ blank? ] trim string-lines load-tabular-file numerify ;
[ [ blank? ] split-when ] map numerify ;
: load-table-csv ( name -- data names ) : load-table-csv ( name -- data names )
load-file string>csv numerify ; load-file string>csv numerify ;
PRIVATE> PRIVATE>
: load-monks ( name -- data-set )
load-tabular-file
! Omits the identifiers which are not so interesting.
[ but-last [ string>number ] map ] map
[ [ rest ] map ] [ [ first ] map ] bi
{ "no" "yes" }
"monks.names" load-file
{ "a1" "a2" "a3" "a4" "a5" "a6" } <data-set> ;
: load-iris ( -- data-set ) : load-iris ( -- data-set )
"iris.csv" load-table-csv "iris.csv" load-table-csv
[ [ unclip-last ] { } map>assoc unzip ] [ 2 tail ] bi* [ [ unclip-last ] { } map>assoc unzip ] [ 2 tail ] bi*

View File

@ -0,0 +1,432 @@
1 1 1 1 1 1 1 data_1
1 1 1 1 1 1 2 data_2
1 1 1 1 1 2 1 data_3
1 1 1 1 1 2 2 data_4
1 1 1 1 1 3 1 data_5
1 1 1 1 1 3 2 data_6
1 1 1 1 1 4 1 data_7
1 1 1 1 1 4 2 data_8
1 1 1 1 2 1 1 data_9
1 1 1 1 2 1 2 data_10
1 1 1 1 2 2 1 data_11
1 1 1 1 2 2 2 data_12
1 1 1 1 2 3 1 data_13
1 1 1 1 2 3 2 data_14
1 1 1 1 2 4 1 data_15
1 1 1 1 2 4 2 data_16
1 1 1 1 3 1 1 data_17
1 1 1 1 3 1 2 data_18
1 1 1 1 3 2 1 data_19
1 1 1 1 3 2 2 data_20
1 1 1 1 3 3 1 data_21
1 1 1 1 3 3 2 data_22
1 1 1 1 3 4 1 data_23
1 1 1 1 3 4 2 data_24
1 1 1 2 1 1 1 data_25
1 1 1 2 1 1 2 data_26
1 1 1 2 1 2 1 data_27
1 1 1 2 1 2 2 data_28
1 1 1 2 1 3 1 data_29
1 1 1 2 1 3 2 data_30
1 1 1 2 1 4 1 data_31
1 1 1 2 1 4 2 data_32
1 1 1 2 2 1 1 data_33
1 1 1 2 2 1 2 data_34
1 1 1 2 2 2 1 data_35
1 1 1 2 2 2 2 data_36
1 1 1 2 2 3 1 data_37
1 1 1 2 2 3 2 data_38
1 1 1 2 2 4 1 data_39
1 1 1 2 2 4 2 data_40
1 1 1 2 3 1 1 data_41
1 1 1 2 3 1 2 data_42
1 1 1 2 3 2 1 data_43
1 1 1 2 3 2 2 data_44
1 1 1 2 3 3 1 data_45
1 1 1 2 3 3 2 data_46
1 1 1 2 3 4 1 data_47
1 1 1 2 3 4 2 data_48
1 1 2 1 1 1 1 data_49
1 1 2 1 1 1 2 data_50
0 1 2 1 1 2 1 data_51
0 1 2 1 1 2 2 data_52
0 1 2 1 1 3 1 data_53
0 1 2 1 1 3 2 data_54
0 1 2 1 1 4 1 data_55
0 1 2 1 1 4 2 data_56
1 1 2 1 2 1 1 data_57
1 1 2 1 2 1 2 data_58
0 1 2 1 2 2 1 data_59
0 1 2 1 2 2 2 data_60
0 1 2 1 2 3 1 data_61
0 1 2 1 2 3 2 data_62
0 1 2 1 2 4 1 data_63
0 1 2 1 2 4 2 data_64
1 1 2 1 3 1 1 data_65
1 1 2 1 3 1 2 data_66
0 1 2 1 3 2 1 data_67
0 1 2 1 3 2 2 data_68
0 1 2 1 3 3 1 data_69
0 1 2 1 3 3 2 data_70
0 1 2 1 3 4 1 data_71
0 1 2 1 3 4 2 data_72
1 1 2 2 1 1 1 data_73
1 1 2 2 1 1 2 data_74
0 1 2 2 1 2 1 data_75
0 1 2 2 1 2 2 data_76
0 1 2 2 1 3 1 data_77
0 1 2 2 1 3 2 data_78
0 1 2 2 1 4 1 data_79
0 1 2 2 1 4 2 data_80
1 1 2 2 2 1 1 data_81
1 1 2 2 2 1 2 data_82
0 1 2 2 2 2 1 data_83
0 1 2 2 2 2 2 data_84
0 1 2 2 2 3 1 data_85
0 1 2 2 2 3 2 data_86
0 1 2 2 2 4 1 data_87
0 1 2 2 2 4 2 data_88
1 1 2 2 3 1 1 data_89
1 1 2 2 3 1 2 data_90
0 1 2 2 3 2 1 data_91
0 1 2 2 3 2 2 data_92
0 1 2 2 3 3 1 data_93
0 1 2 2 3 3 2 data_94
0 1 2 2 3 4 1 data_95
0 1 2 2 3 4 2 data_96
1 1 3 1 1 1 1 data_97
1 1 3 1 1 1 2 data_98
0 1 3 1 1 2 1 data_99
0 1 3 1 1 2 2 data_100
0 1 3 1 1 3 1 data_101
0 1 3 1 1 3 2 data_102
0 1 3 1 1 4 1 data_103
0 1 3 1 1 4 2 data_104
1 1 3 1 2 1 1 data_105
1 1 3 1 2 1 2 data_106
0 1 3 1 2 2 1 data_107
0 1 3 1 2 2 2 data_108
0 1 3 1 2 3 1 data_109
0 1 3 1 2 3 2 data_110
0 1 3 1 2 4 1 data_111
0 1 3 1 2 4 2 data_112
1 1 3 1 3 1 1 data_113
1 1 3 1 3 1 2 data_114
0 1 3 1 3 2 1 data_115
0 1 3 1 3 2 2 data_116
0 1 3 1 3 3 1 data_117
0 1 3 1 3 3 2 data_118
0 1 3 1 3 4 1 data_119
0 1 3 1 3 4 2 data_120
1 1 3 2 1 1 1 data_121
1 1 3 2 1 1 2 data_122
0 1 3 2 1 2 1 data_123
0 1 3 2 1 2 2 data_124
0 1 3 2 1 3 1 data_125
0 1 3 2 1 3 2 data_126
0 1 3 2 1 4 1 data_127
0 1 3 2 1 4 2 data_128
1 1 3 2 2 1 1 data_129
1 1 3 2 2 1 2 data_130
0 1 3 2 2 2 1 data_131
0 1 3 2 2 2 2 data_132
0 1 3 2 2 3 1 data_133
0 1 3 2 2 3 2 data_134
0 1 3 2 2 4 1 data_135
0 1 3 2 2 4 2 data_136
1 1 3 2 3 1 1 data_137
1 1 3 2 3 1 2 data_138
0 1 3 2 3 2 1 data_139
0 1 3 2 3 2 2 data_140
0 1 3 2 3 3 1 data_141
0 1 3 2 3 3 2 data_142
0 1 3 2 3 4 1 data_143
0 1 3 2 3 4 2 data_144
1 2 1 1 1 1 1 data_145
1 2 1 1 1 1 2 data_146
0 2 1 1 1 2 1 data_147
0 2 1 1 1 2 2 data_148
0 2 1 1 1 3 1 data_149
0 2 1 1 1 3 2 data_150
0 2 1 1 1 4 1 data_151
0 2 1 1 1 4 2 data_152
1 2 1 1 2 1 1 data_153
1 2 1 1 2 1 2 data_154
0 2 1 1 2 2 1 data_155
0 2 1 1 2 2 2 data_156
0 2 1 1 2 3 1 data_157
0 2 1 1 2 3 2 data_158
0 2 1 1 2 4 1 data_159
0 2 1 1 2 4 2 data_160
1 2 1 1 3 1 1 data_161
1 2 1 1 3 1 2 data_162
0 2 1 1 3 2 1 data_163
0 2 1 1 3 2 2 data_164
0 2 1 1 3 3 1 data_165
0 2 1 1 3 3 2 data_166
0 2 1 1 3 4 1 data_167
0 2 1 1 3 4 2 data_168
1 2 1 2 1 1 1 data_169
1 2 1 2 1 1 2 data_170
0 2 1 2 1 2 1 data_171
0 2 1 2 1 2 2 data_172
0 2 1 2 1 3 1 data_173
0 2 1 2 1 3 2 data_174
0 2 1 2 1 4 1 data_175
0 2 1 2 1 4 2 data_176
1 2 1 2 2 1 1 data_177
1 2 1 2 2 1 2 data_178
0 2 1 2 2 2 1 data_179
0 2 1 2 2 2 2 data_180
0 2 1 2 2 3 1 data_181
0 2 1 2 2 3 2 data_182
0 2 1 2 2 4 1 data_183
0 2 1 2 2 4 2 data_184
1 2 1 2 3 1 1 data_185
1 2 1 2 3 1 2 data_186
0 2 1 2 3 2 1 data_187
0 2 1 2 3 2 2 data_188
0 2 1 2 3 3 1 data_189
0 2 1 2 3 3 2 data_190
0 2 1 2 3 4 1 data_191
0 2 1 2 3 4 2 data_192
1 2 2 1 1 1 1 data_193
1 2 2 1 1 1 2 data_194
1 2 2 1 1 2 1 data_195
1 2 2 1 1 2 2 data_196
1 2 2 1 1 3 1 data_197
1 2 2 1 1 3 2 data_198
1 2 2 1 1 4 1 data_199
1 2 2 1 1 4 2 data_200
1 2 2 1 2 1 1 data_201
1 2 2 1 2 1 2 data_202
1 2 2 1 2 2 1 data_203
1 2 2 1 2 2 2 data_204
1 2 2 1 2 3 1 data_205
1 2 2 1 2 3 2 data_206
1 2 2 1 2 4 1 data_207
1 2 2 1 2 4 2 data_208
1 2 2 1 3 1 1 data_209
1 2 2 1 3 1 2 data_210
1 2 2 1 3 2 1 data_211
1 2 2 1 3 2 2 data_212
1 2 2 1 3 3 1 data_213
1 2 2 1 3 3 2 data_214
1 2 2 1 3 4 1 data_215
1 2 2 1 3 4 2 data_216
1 2 2 2 1 1 1 data_217
1 2 2 2 1 1 2 data_218
1 2 2 2 1 2 1 data_219
1 2 2 2 1 2 2 data_220
1 2 2 2 1 3 1 data_221
1 2 2 2 1 3 2 data_222
1 2 2 2 1 4 1 data_223
1 2 2 2 1 4 2 data_224
1 2 2 2 2 1 1 data_225
1 2 2 2 2 1 2 data_226
1 2 2 2 2 2 1 data_227
1 2 2 2 2 2 2 data_228
1 2 2 2 2 3 1 data_229
1 2 2 2 2 3 2 data_230
1 2 2 2 2 4 1 data_231
1 2 2 2 2 4 2 data_232
1 2 2 2 3 1 1 data_233
1 2 2 2 3 1 2 data_234
1 2 2 2 3 2 1 data_235
1 2 2 2 3 2 2 data_236
1 2 2 2 3 3 1 data_237
1 2 2 2 3 3 2 data_238
1 2 2 2 3 4 1 data_239
1 2 2 2 3 4 2 data_240
1 2 3 1 1 1 1 data_241
1 2 3 1 1 1 2 data_242
0 2 3 1 1 2 1 data_243
0 2 3 1 1 2 2 data_244
0 2 3 1 1 3 1 data_245
0 2 3 1 1 3 2 data_246
0 2 3 1 1 4 1 data_247
0 2 3 1 1 4 2 data_248
1 2 3 1 2 1 1 data_249
1 2 3 1 2 1 2 data_250
0 2 3 1 2 2 1 data_251
0 2 3 1 2 2 2 data_252
0 2 3 1 2 3 1 data_253
0 2 3 1 2 3 2 data_254
0 2 3 1 2 4 1 data_255
0 2 3 1 2 4 2 data_256
1 2 3 1 3 1 1 data_257
1 2 3 1 3 1 2 data_258
0 2 3 1 3 2 1 data_259
0 2 3 1 3 2 2 data_260
0 2 3 1 3 3 1 data_261
0 2 3 1 3 3 2 data_262
0 2 3 1 3 4 1 data_263
0 2 3 1 3 4 2 data_264
1 2 3 2 1 1 1 data_265
1 2 3 2 1 1 2 data_266
0 2 3 2 1 2 1 data_267
0 2 3 2 1 2 2 data_268
0 2 3 2 1 3 1 data_269
0 2 3 2 1 3 2 data_270
0 2 3 2 1 4 1 data_271
0 2 3 2 1 4 2 data_272
1 2 3 2 2 1 1 data_273
1 2 3 2 2 1 2 data_274
0 2 3 2 2 2 1 data_275
0 2 3 2 2 2 2 data_276
0 2 3 2 2 3 1 data_277
0 2 3 2 2 3 2 data_278
0 2 3 2 2 4 1 data_279
0 2 3 2 2 4 2 data_280
1 2 3 2 3 1 1 data_281
1 2 3 2 3 1 2 data_282
0 2 3 2 3 2 1 data_283
0 2 3 2 3 2 2 data_284
0 2 3 2 3 3 1 data_285
0 2 3 2 3 3 2 data_286
0 2 3 2 3 4 1 data_287
0 2 3 2 3 4 2 data_288
1 3 1 1 1 1 1 data_289
1 3 1 1 1 1 2 data_290
0 3 1 1 1 2 1 data_291
0 3 1 1 1 2 2 data_292
0 3 1 1 1 3 1 data_293
0 3 1 1 1 3 2 data_294
0 3 1 1 1 4 1 data_295
0 3 1 1 1 4 2 data_296
1 3 1 1 2 1 1 data_297
1 3 1 1 2 1 2 data_298
0 3 1 1 2 2 1 data_299
0 3 1 1 2 2 2 data_300
0 3 1 1 2 3 1 data_301
0 3 1 1 2 3 2 data_302
0 3 1 1 2 4 1 data_303
0 3 1 1 2 4 2 data_304
1 3 1 1 3 1 1 data_305
1 3 1 1 3 1 2 data_306
0 3 1 1 3 2 1 data_307
0 3 1 1 3 2 2 data_308
0 3 1 1 3 3 1 data_309
0 3 1 1 3 3 2 data_310
0 3 1 1 3 4 1 data_311
0 3 1 1 3 4 2 data_312
1 3 1 2 1 1 1 data_313
1 3 1 2 1 1 2 data_314
0 3 1 2 1 2 1 data_315
0 3 1 2 1 2 2 data_316
0 3 1 2 1 3 1 data_317
0 3 1 2 1 3 2 data_318
0 3 1 2 1 4 1 data_319
0 3 1 2 1 4 2 data_320
1 3 1 2 2 1 1 data_321
1 3 1 2 2 1 2 data_322
0 3 1 2 2 2 1 data_323
0 3 1 2 2 2 2 data_324
0 3 1 2 2 3 1 data_325
0 3 1 2 2 3 2 data_326
0 3 1 2 2 4 1 data_327
0 3 1 2 2 4 2 data_328
1 3 1 2 3 1 1 data_329
1 3 1 2 3 1 2 data_330
0 3 1 2 3 2 1 data_331
0 3 1 2 3 2 2 data_332
0 3 1 2 3 3 1 data_333
0 3 1 2 3 3 2 data_334
0 3 1 2 3 4 1 data_335
0 3 1 2 3 4 2 data_336
1 3 2 1 1 1 1 data_337
1 3 2 1 1 1 2 data_338
0 3 2 1 1 2 1 data_339
0 3 2 1 1 2 2 data_340
0 3 2 1 1 3 1 data_341
0 3 2 1 1 3 2 data_342
0 3 2 1 1 4 1 data_343
0 3 2 1 1 4 2 data_344
1 3 2 1 2 1 1 data_345
1 3 2 1 2 1 2 data_346
0 3 2 1 2 2 1 data_347
0 3 2 1 2 2 2 data_348
0 3 2 1 2 3 1 data_349
0 3 2 1 2 3 2 data_350
0 3 2 1 2 4 1 data_351
0 3 2 1 2 4 2 data_352
1 3 2 1 3 1 1 data_353
1 3 2 1 3 1 2 data_354
0 3 2 1 3 2 1 data_355
0 3 2 1 3 2 2 data_356
0 3 2 1 3 3 1 data_357
0 3 2 1 3 3 2 data_358
0 3 2 1 3 4 1 data_359
0 3 2 1 3 4 2 data_360
1 3 2 2 1 1 1 data_361
1 3 2 2 1 1 2 data_362
0 3 2 2 1 2 1 data_363
0 3 2 2 1 2 2 data_364
0 3 2 2 1 3 1 data_365
0 3 2 2 1 3 2 data_366
0 3 2 2 1 4 1 data_367
0 3 2 2 1 4 2 data_368
1 3 2 2 2 1 1 data_369
1 3 2 2 2 1 2 data_370
0 3 2 2 2 2 1 data_371
0 3 2 2 2 2 2 data_372
0 3 2 2 2 3 1 data_373
0 3 2 2 2 3 2 data_374
0 3 2 2 2 4 1 data_375
0 3 2 2 2 4 2 data_376
1 3 2 2 3 1 1 data_377
1 3 2 2 3 1 2 data_378
0 3 2 2 3 2 1 data_379
0 3 2 2 3 2 2 data_380
0 3 2 2 3 3 1 data_381
0 3 2 2 3 3 2 data_382
0 3 2 2 3 4 1 data_383
0 3 2 2 3 4 2 data_384
1 3 3 1 1 1 1 data_385
1 3 3 1 1 1 2 data_386
1 3 3 1 1 2 1 data_387
1 3 3 1 1 2 2 data_388
1 3 3 1 1 3 1 data_389
1 3 3 1 1 3 2 data_390
1 3 3 1 1 4 1 data_391
1 3 3 1 1 4 2 data_392
1 3 3 1 2 1 1 data_393
1 3 3 1 2 1 2 data_394
1 3 3 1 2 2 1 data_395
1 3 3 1 2 2 2 data_396
1 3 3 1 2 3 1 data_397
1 3 3 1 2 3 2 data_398
1 3 3 1 2 4 1 data_399
1 3 3 1 2 4 2 data_400
1 3 3 1 3 1 1 data_401
1 3 3 1 3 1 2 data_402
1 3 3 1 3 2 1 data_403
1 3 3 1 3 2 2 data_404
1 3 3 1 3 3 1 data_405
1 3 3 1 3 3 2 data_406
1 3 3 1 3 4 1 data_407
1 3 3 1 3 4 2 data_408
1 3 3 2 1 1 1 data_409
1 3 3 2 1 1 2 data_410
1 3 3 2 1 2 1 data_411
1 3 3 2 1 2 2 data_412
1 3 3 2 1 3 1 data_413
1 3 3 2 1 3 2 data_414
1 3 3 2 1 4 1 data_415
1 3 3 2 1 4 2 data_416
1 3 3 2 2 1 1 data_417
1 3 3 2 2 1 2 data_418
1 3 3 2 2 2 1 data_419
1 3 3 2 2 2 2 data_420
1 3 3 2 2 3 1 data_421
1 3 3 2 2 3 2 data_422
1 3 3 2 2 4 1 data_423
1 3 3 2 2 4 2 data_424
1 3 3 2 3 1 1 data_425
1 3 3 2 3 1 2 data_426
1 3 3 2 3 2 1 data_427
1 3 3 2 3 2 2 data_428
1 3 3 2 3 3 1 data_429
1 3 3 2 3 3 2 data_430
1 3 3 2 3 4 1 data_431
1 3 3 2 3 4 2 data_432

View File

@ -0,0 +1,124 @@
1 1 1 1 1 3 1 data_5
1 1 1 1 1 3 2 data_6
1 1 1 1 3 2 1 data_19
1 1 1 1 3 3 2 data_22
1 1 1 2 1 2 1 data_27
1 1 1 2 1 2 2 data_28
1 1 1 2 2 3 1 data_37
1 1 1 2 2 4 1 data_39
1 1 1 2 3 1 2 data_42
1 1 2 1 1 1 2 data_50
0 1 2 1 1 2 1 data_51
0 1 2 1 1 3 1 data_53
0 1 2 1 1 4 2 data_56
1 1 2 1 2 1 1 data_57
0 1 2 1 2 3 1 data_61
0 1 2 1 2 3 2 data_62
0 1 2 1 2 4 2 data_64
0 1 2 1 3 2 1 data_67
0 1 2 1 3 4 2 data_72
0 1 2 2 1 2 2 data_76
0 1 2 2 2 3 2 data_86
0 1 2 2 2 4 1 data_87
0 1 2 2 2 4 2 data_88
0 1 2 2 3 2 2 data_92
0 1 2 2 3 3 1 data_93
0 1 2 2 3 3 2 data_94
0 1 3 1 1 2 1 data_99
0 1 3 1 1 4 1 data_103
0 1 3 1 2 2 1 data_107
0 1 3 1 2 4 1 data_111
1 1 3 1 3 1 2 data_114
0 1 3 1 3 2 2 data_116
0 1 3 1 3 3 1 data_117
0 1 3 1 3 4 1 data_119
0 1 3 1 3 4 2 data_120
0 1 3 2 1 2 2 data_124
1 1 3 2 2 1 2 data_130
0 1 3 2 2 2 2 data_132
0 1 3 2 2 3 2 data_134
0 1 3 2 2 4 1 data_135
0 1 3 2 2 4 2 data_136
1 1 3 2 3 1 1 data_137
0 1 3 2 3 2 1 data_139
0 1 3 2 3 4 1 data_143
0 1 3 2 3 4 2 data_144
0 2 1 1 1 3 1 data_149
0 2 1 1 1 3 2 data_150
1 2 1 1 2 1 1 data_153
1 2 1 1 2 1 2 data_154
0 2 1 1 2 2 2 data_156
0 2 1 1 2 3 1 data_157
0 2 1 1 2 4 1 data_159
0 2 1 1 2 4 2 data_160
0 2 1 1 3 4 1 data_167
0 2 1 2 1 2 2 data_172
0 2 1 2 1 3 1 data_173
0 2 1 2 1 4 2 data_176
0 2 1 2 2 3 1 data_181
0 2 1 2 2 4 2 data_184
0 2 1 2 3 2 2 data_188
0 2 1 2 3 4 1 data_191
1 2 2 1 1 2 1 data_195
1 2 2 1 1 2 2 data_196
1 2 2 1 1 3 1 data_197
1 2 2 1 2 3 2 data_206
1 2 2 1 3 1 1 data_209
1 2 2 1 3 1 2 data_210
1 2 2 1 3 2 2 data_212
1 2 2 1 3 3 2 data_214
1 2 2 1 3 4 2 data_216
1 2 2 2 1 1 1 data_217
1 2 2 2 1 3 2 data_222
1 2 2 2 1 4 1 data_223
1 2 2 2 1 4 2 data_224
1 2 2 2 2 2 1 data_227
1 2 2 2 3 4 1 data_239
1 2 3 1 1 1 1 data_241
1 2 3 1 2 1 1 data_249
0 2 3 1 2 3 1 data_253
1 2 3 1 3 1 2 data_258
0 2 3 1 3 3 1 data_261
0 2 3 1 3 4 2 data_264
0 2 3 2 1 3 2 data_270
1 2 3 2 2 1 1 data_273
1 2 3 2 2 1 2 data_274
0 2 3 2 2 2 1 data_275
0 2 3 2 3 3 2 data_286
1 3 1 1 1 1 1 data_289
1 3 1 1 1 1 2 data_290
1 3 1 1 2 1 1 data_297
0 3 1 1 2 2 2 data_300
0 3 1 1 3 2 2 data_308
1 3 1 2 1 1 1 data_313
0 3 1 2 1 2 2 data_316
0 3 1 2 2 2 2 data_324
0 3 1 2 2 3 2 data_326
0 3 1 2 3 2 2 data_332
1 3 2 1 1 1 1 data_337
0 3 2 1 1 4 2 data_344
1 3 2 1 2 1 2 data_346
0 3 2 1 2 4 2 data_352
1 3 2 2 1 1 1 data_361
1 3 2 2 1 1 2 data_362
0 3 2 2 1 3 2 data_366
1 3 2 2 3 1 1 data_377
0 3 2 2 3 2 1 data_379
0 3 2 2 3 4 1 data_383
1 3 3 1 1 1 1 data_385
1 3 3 1 1 2 1 data_387
1 3 3 1 1 4 2 data_392
1 3 3 1 2 3 2 data_398
1 3 3 1 2 4 2 data_400
1 3 3 1 3 1 2 data_402
1 3 3 1 3 2 1 data_403
1 3 3 1 3 2 2 data_404
1 3 3 1 3 4 2 data_408
1 3 3 2 1 1 1 data_409
1 3 3 2 1 3 2 data_414
1 3 3 2 1 4 1 data_415
1 3 3 2 1 4 2 data_416
1 3 3 2 3 1 2 data_426
1 3 3 2 3 2 2 data_428
1 3 3 2 3 3 2 data_430
1 3 3 2 3 4 2 data_432

View File

@ -0,0 +1,432 @@
0 1 1 1 1 1 1 data_1
0 1 1 1 1 1 2 data_2
0 1 1 1 1 2 1 data_3
0 1 1 1 1 2 2 data_4
0 1 1 1 1 3 1 data_5
0 1 1 1 1 3 2 data_6
0 1 1 1 1 4 1 data_7
0 1 1 1 1 4 2 data_8
0 1 1 1 2 1 1 data_9
0 1 1 1 2 1 2 data_10
0 1 1 1 2 2 1 data_11
0 1 1 1 2 2 2 data_12
0 1 1 1 2 3 1 data_13
0 1 1 1 2 3 2 data_14
0 1 1 1 2 4 1 data_15
0 1 1 1 2 4 2 data_16
0 1 1 1 3 1 1 data_17
0 1 1 1 3 1 2 data_18
0 1 1 1 3 2 1 data_19
0 1 1 1 3 2 2 data_20
0 1 1 1 3 3 1 data_21
0 1 1 1 3 3 2 data_22
0 1 1 1 3 4 1 data_23
0 1 1 1 3 4 2 data_24
0 1 1 2 1 1 1 data_25
0 1 1 2 1 1 2 data_26
0 1 1 2 1 2 1 data_27
0 1 1 2 1 2 2 data_28
0 1 1 2 1 3 1 data_29
0 1 1 2 1 3 2 data_30
0 1 1 2 1 4 1 data_31
0 1 1 2 1 4 2 data_32
0 1 1 2 2 1 1 data_33
0 1 1 2 2 1 2 data_34
0 1 1 2 2 2 1 data_35
1 1 1 2 2 2 2 data_36
0 1 1 2 2 3 1 data_37
1 1 1 2 2 3 2 data_38
0 1 1 2 2 4 1 data_39
1 1 1 2 2 4 2 data_40
0 1 1 2 3 1 1 data_41
0 1 1 2 3 1 2 data_42
0 1 1 2 3 2 1 data_43
1 1 1 2 3 2 2 data_44
0 1 1 2 3 3 1 data_45
1 1 1 2 3 3 2 data_46
0 1 1 2 3 4 1 data_47
1 1 1 2 3 4 2 data_48
0 1 2 1 1 1 1 data_49
0 1 2 1 1 1 2 data_50
0 1 2 1 1 2 1 data_51
0 1 2 1 1 2 2 data_52
0 1 2 1 1 3 1 data_53
0 1 2 1 1 3 2 data_54
0 1 2 1 1 4 1 data_55
0 1 2 1 1 4 2 data_56
0 1 2 1 2 1 1 data_57
0 1 2 1 2 1 2 data_58
0 1 2 1 2 2 1 data_59
1 1 2 1 2 2 2 data_60
0 1 2 1 2 3 1 data_61
1 1 2 1 2 3 2 data_62
0 1 2 1 2 4 1 data_63
1 1 2 1 2 4 2 data_64
0 1 2 1 3 1 1 data_65
0 1 2 1 3 1 2 data_66
0 1 2 1 3 2 1 data_67
1 1 2 1 3 2 2 data_68
0 1 2 1 3 3 1 data_69
1 1 2 1 3 3 2 data_70
0 1 2 1 3 4 1 data_71
1 1 2 1 3 4 2 data_72
0 1 2 2 1 1 1 data_73
0 1 2 2 1 1 2 data_74
0 1 2 2 1 2 1 data_75
1 1 2 2 1 2 2 data_76
0 1 2 2 1 3 1 data_77
1 1 2 2 1 3 2 data_78
0 1 2 2 1 4 1 data_79
1 1 2 2 1 4 2 data_80
0 1 2 2 2 1 1 data_81
1 1 2 2 2 1 2 data_82
1 1 2 2 2 2 1 data_83
0 1 2 2 2 2 2 data_84
1 1 2 2 2 3 1 data_85
0 1 2 2 2 3 2 data_86
1 1 2 2 2 4 1 data_87
0 1 2 2 2 4 2 data_88
0 1 2 2 3 1 1 data_89
1 1 2 2 3 1 2 data_90
1 1 2 2 3 2 1 data_91
0 1 2 2 3 2 2 data_92
1 1 2 2 3 3 1 data_93
0 1 2 2 3 3 2 data_94
1 1 2 2 3 4 1 data_95
0 1 2 2 3 4 2 data_96
0 1 3 1 1 1 1 data_97
0 1 3 1 1 1 2 data_98
0 1 3 1 1 2 1 data_99
0 1 3 1 1 2 2 data_100
0 1 3 1 1 3 1 data_101
0 1 3 1 1 3 2 data_102
0 1 3 1 1 4 1 data_103
0 1 3 1 1 4 2 data_104
0 1 3 1 2 1 1 data_105
0 1 3 1 2 1 2 data_106
0 1 3 1 2 2 1 data_107
1 1 3 1 2 2 2 data_108
0 1 3 1 2 3 1 data_109
1 1 3 1 2 3 2 data_110
0 1 3 1 2 4 1 data_111
1 1 3 1 2 4 2 data_112
0 1 3 1 3 1 1 data_113
0 1 3 1 3 1 2 data_114
0 1 3 1 3 2 1 data_115
1 1 3 1 3 2 2 data_116
0 1 3 1 3 3 1 data_117
1 1 3 1 3 3 2 data_118
0 1 3 1 3 4 1 data_119
1 1 3 1 3 4 2 data_120
0 1 3 2 1 1 1 data_121
0 1 3 2 1 1 2 data_122
0 1 3 2 1 2 1 data_123
1 1 3 2 1 2 2 data_124
0 1 3 2 1 3 1 data_125
1 1 3 2 1 3 2 data_126
0 1 3 2 1 4 1 data_127
1 1 3 2 1 4 2 data_128
0 1 3 2 2 1 1 data_129
1 1 3 2 2 1 2 data_130
1 1 3 2 2 2 1 data_131
0 1 3 2 2 2 2 data_132
1 1 3 2 2 3 1 data_133
0 1 3 2 2 3 2 data_134
1 1 3 2 2 4 1 data_135
0 1 3 2 2 4 2 data_136
0 1 3 2 3 1 1 data_137
1 1 3 2 3 1 2 data_138
1 1 3 2 3 2 1 data_139
0 1 3 2 3 2 2 data_140
1 1 3 2 3 3 1 data_141
0 1 3 2 3 3 2 data_142
1 1 3 2 3 4 1 data_143
0 1 3 2 3 4 2 data_144
0 2 1 1 1 1 1 data_145
0 2 1 1 1 1 2 data_146
0 2 1 1 1 2 1 data_147
0 2 1 1 1 2 2 data_148
0 2 1 1 1 3 1 data_149
0 2 1 1 1 3 2 data_150
0 2 1 1 1 4 1 data_151
0 2 1 1 1 4 2 data_152
0 2 1 1 2 1 1 data_153
0 2 1 1 2 1 2 data_154
0 2 1 1 2 2 1 data_155
1 2 1 1 2 2 2 data_156
0 2 1 1 2 3 1 data_157
1 2 1 1 2 3 2 data_158
0 2 1 1 2 4 1 data_159
1 2 1 1 2 4 2 data_160
0 2 1 1 3 1 1 data_161
0 2 1 1 3 1 2 data_162
0 2 1 1 3 2 1 data_163
1 2 1 1 3 2 2 data_164
0 2 1 1 3 3 1 data_165
1 2 1 1 3 3 2 data_166
0 2 1 1 3 4 1 data_167
1 2 1 1 3 4 2 data_168
0 2 1 2 1 1 1 data_169
0 2 1 2 1 1 2 data_170
0 2 1 2 1 2 1 data_171
1 2 1 2 1 2 2 data_172
0 2 1 2 1 3 1 data_173
1 2 1 2 1 3 2 data_174
0 2 1 2 1 4 1 data_175
1 2 1 2 1 4 2 data_176
0 2 1 2 2 1 1 data_177
1 2 1 2 2 1 2 data_178
1 2 1 2 2 2 1 data_179
0 2 1 2 2 2 2 data_180
1 2 1 2 2 3 1 data_181
0 2 1 2 2 3 2 data_182
1 2 1 2 2 4 1 data_183
0 2 1 2 2 4 2 data_184
0 2 1 2 3 1 1 data_185
1 2 1 2 3 1 2 data_186
1 2 1 2 3 2 1 data_187
0 2 1 2 3 2 2 data_188
1 2 1 2 3 3 1 data_189
0 2 1 2 3 3 2 data_190
1 2 1 2 3 4 1 data_191
0 2 1 2 3 4 2 data_192
0 2 2 1 1 1 1 data_193
0 2 2 1 1 1 2 data_194
0 2 2 1 1 2 1 data_195
1 2 2 1 1 2 2 data_196
0 2 2 1 1 3 1 data_197
1 2 2 1 1 3 2 data_198
0 2 2 1 1 4 1 data_199
1 2 2 1 1 4 2 data_200
0 2 2 1 2 1 1 data_201
1 2 2 1 2 1 2 data_202
1 2 2 1 2 2 1 data_203
0 2 2 1 2 2 2 data_204
1 2 2 1 2 3 1 data_205
0 2 2 1 2 3 2 data_206
1 2 2 1 2 4 1 data_207
0 2 2 1 2 4 2 data_208
0 2 2 1 3 1 1 data_209
1 2 2 1 3 1 2 data_210
1 2 2 1 3 2 1 data_211
0 2 2 1 3 2 2 data_212
1 2 2 1 3 3 1 data_213
0 2 2 1 3 3 2 data_214
1 2 2 1 3 4 1 data_215
0 2 2 1 3 4 2 data_216
0 2 2 2 1 1 1 data_217
1 2 2 2 1 1 2 data_218
1 2 2 2 1 2 1 data_219
0 2 2 2 1 2 2 data_220
1 2 2 2 1 3 1 data_221
0 2 2 2 1 3 2 data_222
1 2 2 2 1 4 1 data_223
0 2 2 2 1 4 2 data_224
1 2 2 2 2 1 1 data_225
0 2 2 2 2 1 2 data_226
0 2 2 2 2 2 1 data_227
0 2 2 2 2 2 2 data_228
0 2 2 2 2 3 1 data_229
0 2 2 2 2 3 2 data_230
0 2 2 2 2 4 1 data_231
0 2 2 2 2 4 2 data_232
1 2 2 2 3 1 1 data_233
0 2 2 2 3 1 2 data_234
0 2 2 2 3 2 1 data_235
0 2 2 2 3 2 2 data_236
0 2 2 2 3 3 1 data_237
0 2 2 2 3 3 2 data_238
0 2 2 2 3 4 1 data_239
0 2 2 2 3 4 2 data_240
0 2 3 1 1 1 1 data_241
0 2 3 1 1 1 2 data_242
0 2 3 1 1 2 1 data_243
1 2 3 1 1 2 2 data_244
0 2 3 1 1 3 1 data_245
1 2 3 1 1 3 2 data_246
0 2 3 1 1 4 1 data_247
1 2 3 1 1 4 2 data_248
0 2 3 1 2 1 1 data_249
1 2 3 1 2 1 2 data_250
1 2 3 1 2 2 1 data_251
0 2 3 1 2 2 2 data_252
1 2 3 1 2 3 1 data_253
0 2 3 1 2 3 2 data_254
1 2 3 1 2 4 1 data_255
0 2 3 1 2 4 2 data_256
0 2 3 1 3 1 1 data_257
1 2 3 1 3 1 2 data_258
1 2 3 1 3 2 1 data_259
0 2 3 1 3 2 2 data_260
1 2 3 1 3 3 1 data_261
0 2 3 1 3 3 2 data_262
1 2 3 1 3 4 1 data_263
0 2 3 1 3 4 2 data_264
0 2 3 2 1 1 1 data_265
1 2 3 2 1 1 2 data_266
1 2 3 2 1 2 1 data_267
0 2 3 2 1 2 2 data_268
1 2 3 2 1 3 1 data_269
0 2 3 2 1 3 2 data_270
1 2 3 2 1 4 1 data_271
0 2 3 2 1 4 2 data_272
1 2 3 2 2 1 1 data_273
0 2 3 2 2 1 2 data_274
0 2 3 2 2 2 1 data_275
0 2 3 2 2 2 2 data_276
0 2 3 2 2 3 1 data_277
0 2 3 2 2 3 2 data_278
0 2 3 2 2 4 1 data_279
0 2 3 2 2 4 2 data_280
1 2 3 2 3 1 1 data_281
0 2 3 2 3 1 2 data_282
0 2 3 2 3 2 1 data_283
0 2 3 2 3 2 2 data_284
0 2 3 2 3 3 1 data_285
0 2 3 2 3 3 2 data_286
0 2 3 2 3 4 1 data_287
0 2 3 2 3 4 2 data_288
0 3 1 1 1 1 1 data_289
0 3 1 1 1 1 2 data_290
0 3 1 1 1 2 1 data_291
0 3 1 1 1 2 2 data_292
0 3 1 1 1 3 1 data_293
0 3 1 1 1 3 2 data_294
0 3 1 1 1 4 1 data_295
0 3 1 1 1 4 2 data_296
0 3 1 1 2 1 1 data_297
0 3 1 1 2 1 2 data_298
0 3 1 1 2 2 1 data_299
1 3 1 1 2 2 2 data_300
0 3 1 1 2 3 1 data_301
1 3 1 1 2 3 2 data_302
0 3 1 1 2 4 1 data_303
1 3 1 1 2 4 2 data_304
0 3 1 1 3 1 1 data_305
0 3 1 1 3 1 2 data_306
0 3 1 1 3 2 1 data_307
1 3 1 1 3 2 2 data_308
0 3 1 1 3 3 1 data_309
1 3 1 1 3 3 2 data_310
0 3 1 1 3 4 1 data_311
1 3 1 1 3 4 2 data_312
0 3 1 2 1 1 1 data_313
0 3 1 2 1 1 2 data_314
0 3 1 2 1 2 1 data_315
1 3 1 2 1 2 2 data_316
0 3 1 2 1 3 1 data_317
1 3 1 2 1 3 2 data_318
0 3 1 2 1 4 1 data_319
1 3 1 2 1 4 2 data_320
0 3 1 2 2 1 1 data_321
1 3 1 2 2 1 2 data_322
1 3 1 2 2 2 1 data_323
0 3 1 2 2 2 2 data_324
1 3 1 2 2 3 1 data_325
0 3 1 2 2 3 2 data_326
1 3 1 2 2 4 1 data_327
0 3 1 2 2 4 2 data_328
0 3 1 2 3 1 1 data_329
1 3 1 2 3 1 2 data_330
1 3 1 2 3 2 1 data_331
0 3 1 2 3 2 2 data_332
1 3 1 2 3 3 1 data_333
0 3 1 2 3 3 2 data_334
1 3 1 2 3 4 1 data_335
0 3 1 2 3 4 2 data_336
0 3 2 1 1 1 1 data_337
0 3 2 1 1 1 2 data_338
0 3 2 1 1 2 1 data_339
1 3 2 1 1 2 2 data_340
0 3 2 1 1 3 1 data_341
1 3 2 1 1 3 2 data_342
0 3 2 1 1 4 1 data_343
1 3 2 1 1 4 2 data_344
0 3 2 1 2 1 1 data_345
1 3 2 1 2 1 2 data_346
1 3 2 1 2 2 1 data_347
0 3 2 1 2 2 2 data_348
1 3 2 1 2 3 1 data_349
0 3 2 1 2 3 2 data_350
1 3 2 1 2 4 1 data_351
0 3 2 1 2 4 2 data_352
0 3 2 1 3 1 1 data_353
1 3 2 1 3 1 2 data_354
1 3 2 1 3 2 1 data_355
0 3 2 1 3 2 2 data_356
1 3 2 1 3 3 1 data_357
0 3 2 1 3 3 2 data_358
1 3 2 1 3 4 1 data_359
0 3 2 1 3 4 2 data_360
0 3 2 2 1 1 1 data_361
1 3 2 2 1 1 2 data_362
1 3 2 2 1 2 1 data_363
0 3 2 2 1 2 2 data_364
1 3 2 2 1 3 1 data_365
0 3 2 2 1 3 2 data_366
1 3 2 2 1 4 1 data_367
0 3 2 2 1 4 2 data_368
1 3 2 2 2 1 1 data_369
0 3 2 2 2 1 2 data_370
0 3 2 2 2 2 1 data_371
0 3 2 2 2 2 2 data_372
0 3 2 2 2 3 1 data_373
0 3 2 2 2 3 2 data_374
0 3 2 2 2 4 1 data_375
0 3 2 2 2 4 2 data_376
1 3 2 2 3 1 1 data_377
0 3 2 2 3 1 2 data_378
0 3 2 2 3 2 1 data_379
0 3 2 2 3 2 2 data_380
0 3 2 2 3 3 1 data_381
0 3 2 2 3 3 2 data_382
0 3 2 2 3 4 1 data_383
0 3 2 2 3 4 2 data_384
0 3 3 1 1 1 1 data_385
0 3 3 1 1 1 2 data_386
0 3 3 1 1 2 1 data_387
1 3 3 1 1 2 2 data_388
0 3 3 1 1 3 1 data_389
1 3 3 1 1 3 2 data_390
0 3 3 1 1 4 1 data_391
1 3 3 1 1 4 2 data_392
0 3 3 1 2 1 1 data_393
1 3 3 1 2 1 2 data_394
1 3 3 1 2 2 1 data_395
0 3 3 1 2 2 2 data_396
1 3 3 1 2 3 1 data_397
0 3 3 1 2 3 2 data_398
1 3 3 1 2 4 1 data_399
0 3 3 1 2 4 2 data_400
0 3 3 1 3 1 1 data_401
1 3 3 1 3 1 2 data_402
1 3 3 1 3 2 1 data_403
0 3 3 1 3 2 2 data_404
1 3 3 1 3 3 1 data_405
0 3 3 1 3 3 2 data_406
1 3 3 1 3 4 1 data_407
0 3 3 1 3 4 2 data_408
0 3 3 2 1 1 1 data_409
1 3 3 2 1 1 2 data_410
1 3 3 2 1 2 1 data_411
0 3 3 2 1 2 2 data_412
1 3 3 2 1 3 1 data_413
0 3 3 2 1 3 2 data_414
1 3 3 2 1 4 1 data_415
0 3 3 2 1 4 2 data_416
1 3 3 2 2 1 1 data_417
0 3 3 2 2 1 2 data_418
0 3 3 2 2 2 1 data_419
0 3 3 2 2 2 2 data_420
0 3 3 2 2 3 1 data_421
0 3 3 2 2 3 2 data_422
0 3 3 2 2 4 1 data_423
0 3 3 2 2 4 2 data_424
1 3 3 2 3 1 1 data_425
0 3 3 2 3 1 2 data_426
0 3 3 2 3 2 1 data_427
0 3 3 2 3 2 2 data_428
0 3 3 2 3 3 1 data_429
0 3 3 2 3 3 2 data_430
0 3 3 2 3 4 1 data_431
0 3 3 2 3 4 2 data_432

View File

@ -0,0 +1,169 @@
0 1 1 1 1 2 2 data_4
0 1 1 1 1 4 1 data_7
0 1 1 1 2 1 1 data_9
0 1 1 1 2 1 2 data_10
0 1 1 1 2 2 1 data_11
0 1 1 1 2 3 1 data_13
0 1 1 1 2 4 1 data_15
0 1 1 1 3 2 1 data_19
0 1 1 1 3 4 1 data_23
0 1 1 2 1 1 1 data_25
0 1 1 2 1 1 2 data_26
0 1 1 2 2 3 1 data_37
0 1 1 2 2 4 1 data_39
1 1 1 2 2 4 2 data_40
0 1 1 2 3 1 2 data_42
1 1 1 2 3 2 2 data_44
0 1 2 1 1 1 2 data_50
0 1 2 1 2 1 2 data_58
1 1 2 1 2 2 2 data_60
0 1 2 1 2 3 1 data_61
1 1 2 1 2 3 2 data_62
0 1 2 1 2 4 1 data_63
0 1 2 1 3 1 1 data_65
0 1 2 1 3 1 2 data_66
1 1 2 1 3 2 2 data_68
0 1 2 1 3 3 1 data_69
1 1 2 1 3 3 2 data_70
0 1 2 1 3 4 1 data_71
1 1 2 1 3 4 2 data_72
0 1 2 2 1 2 1 data_75
0 1 2 2 1 4 1 data_79
1 1 2 2 2 3 1 data_85
1 1 2 2 2 4 1 data_87
0 1 2 2 3 1 1 data_89
1 1 2 2 3 1 2 data_90
1 1 2 2 3 3 1 data_93
0 1 2 2 3 3 2 data_94
1 1 2 2 3 4 1 data_95
0 1 2 2 3 4 2 data_96
0 1 3 1 1 1 2 data_98
0 1 3 1 1 2 2 data_100
0 1 3 1 1 3 1 data_101
0 1 3 1 1 3 2 data_102
0 1 3 1 2 2 1 data_107
1 1 3 1 2 2 2 data_108
1 1 3 1 2 3 2 data_110
0 1 3 1 2 4 1 data_111
1 1 3 1 3 2 2 data_116
0 1 3 1 3 3 1 data_117
1 1 3 1 3 4 2 data_120
0 1 3 2 1 3 1 data_125
1 1 3 2 1 3 2 data_126
0 1 3 2 1 4 1 data_127
1 1 3 2 2 1 2 data_130
0 1 3 2 2 3 2 data_134
0 1 3 2 2 4 2 data_136
1 1 3 2 3 2 1 data_139
0 2 1 1 1 1 1 data_145
0 2 1 1 1 2 2 data_148
0 2 1 1 1 3 1 data_149
1 2 1 1 2 2 2 data_156
0 2 1 1 3 1 2 data_162
1 2 1 1 3 2 2 data_164
1 2 1 1 3 3 2 data_166
0 2 1 1 3 4 1 data_167
0 2 1 2 1 1 1 data_169
1 2 1 2 1 2 2 data_172
0 2 1 2 1 4 1 data_175
1 2 1 2 2 2 1 data_179
0 2 1 2 2 4 2 data_184
0 2 1 2 3 1 1 data_185
1 2 1 2 3 1 2 data_186
0 2 1 2 3 2 2 data_188
0 2 1 2 3 3 2 data_190
0 2 1 2 3 4 2 data_192
0 2 2 1 1 3 1 data_197
1 2 2 1 1 4 2 data_200
0 2 2 1 2 1 1 data_201
1 2 2 1 2 3 1 data_205
1 2 2 1 3 3 1 data_213
0 2 2 1 3 3 2 data_214
1 2 2 1 3 4 1 data_215
0 2 2 2 1 1 1 data_217
0 2 2 2 1 2 2 data_220
0 2 2 2 1 3 2 data_222
1 2 2 2 1 4 1 data_223
0 2 2 2 1 4 2 data_224
1 2 2 2 2 1 1 data_225
0 2 2 2 2 2 2 data_228
0 2 2 2 2 3 1 data_229
1 2 2 2 3 1 1 data_233
0 2 2 2 3 2 1 data_235
0 2 2 2 3 2 2 data_236
0 2 2 2 3 4 2 data_240
0 2 3 1 1 1 1 data_241
0 2 3 1 1 1 2 data_242
1 2 3 1 1 3 2 data_246
0 2 3 1 2 1 1 data_249
1 2 3 1 2 3 1 data_253
0 2 3 1 2 3 2 data_254
0 2 3 1 2 4 2 data_256
1 2 3 1 3 1 2 data_258
1 2 3 1 3 2 1 data_259
1 2 3 1 3 4 1 data_263
1 2 3 2 1 1 2 data_266
1 2 3 2 1 2 1 data_267
1 2 3 2 1 3 1 data_269
0 2 3 2 1 4 2 data_272
1 2 3 2 2 1 1 data_273
0 2 3 2 2 2 1 data_275
0 2 3 2 2 3 2 data_278
0 2 3 2 3 3 1 data_285
0 2 3 2 3 3 2 data_286
0 2 3 2 3 4 2 data_288
0 3 1 1 1 4 1 data_295
0 3 1 1 2 1 2 data_298
1 3 1 1 2 2 2 data_300
1 3 1 1 2 3 2 data_302
0 3 1 1 2 4 1 data_303
1 3 1 1 2 4 2 data_304
0 3 1 1 3 1 1 data_305
0 3 1 1 3 1 2 data_306
1 3 1 1 3 2 2 data_308
1 3 1 1 3 3 2 data_310
0 3 1 2 1 1 1 data_313
1 3 1 2 1 2 2 data_316
0 3 1 2 1 3 1 data_317
1 3 1 2 1 3 2 data_318
0 3 1 2 1 4 1 data_319
1 3 1 2 1 4 2 data_320
1 3 1 2 2 2 1 data_323
1 3 1 2 3 1 2 data_330
1 3 1 2 3 2 1 data_331
0 3 1 2 3 2 2 data_332
0 3 1 2 3 4 2 data_336
0 3 2 1 1 1 2 data_338
1 3 2 1 1 2 2 data_340
0 3 2 1 1 3 1 data_341
1 3 2 1 1 3 2 data_342
1 3 2 1 2 1 2 data_346
1 3 2 1 2 2 1 data_347
0 3 2 1 3 1 1 data_353
1 3 2 1 3 2 1 data_355
1 3 2 1 3 3 1 data_357
0 3 2 1 3 3 2 data_358
0 3 2 2 1 1 1 data_361
0 3 2 2 1 2 2 data_364
1 3 2 2 1 3 1 data_365
0 3 2 2 1 3 2 data_366
1 3 2 2 2 1 1 data_369
0 3 2 2 2 2 1 data_371
0 3 2 2 2 2 2 data_372
0 3 2 2 2 3 2 data_374
1 3 2 2 3 1 1 data_377
0 3 2 2 3 3 2 data_382
0 3 2 2 3 4 2 data_384
0 3 3 1 1 1 1 data_385
0 3 3 1 1 2 1 data_387
0 3 3 1 1 3 1 data_389
1 3 3 1 1 3 2 data_390
0 3 3 1 2 3 2 data_398
0 3 3 2 1 1 1 data_409
1 3 3 2 2 1 1 data_417
0 3 3 2 2 2 1 data_419
0 3 3 2 2 3 1 data_421
0 3 3 2 2 3 2 data_422
1 3 3 2 3 1 1 data_425
0 3 3 2 3 2 1 data_427
0 3 3 2 3 4 2 data_432

View File

@ -0,0 +1,432 @@
1 1 1 1 1 1 1 data_1
1 1 1 1 1 1 2 data_2
1 1 1 1 1 2 1 data_3
1 1 1 1 1 2 2 data_4
1 1 1 1 1 3 1 data_5
1 1 1 1 1 3 2 data_6
0 1 1 1 1 4 1 data_7
0 1 1 1 1 4 2 data_8
1 1 1 1 2 1 1 data_9
1 1 1 1 2 1 2 data_10
1 1 1 1 2 2 1 data_11
1 1 1 1 2 2 2 data_12
1 1 1 1 2 3 1 data_13
1 1 1 1 2 3 2 data_14
0 1 1 1 2 4 1 data_15
0 1 1 1 2 4 2 data_16
1 1 1 1 3 1 1 data_17
1 1 1 1 3 1 2 data_18
1 1 1 1 3 2 1 data_19
1 1 1 1 3 2 2 data_20
1 1 1 1 3 3 1 data_21
1 1 1 1 3 3 2 data_22
0 1 1 1 3 4 1 data_23
0 1 1 1 3 4 2 data_24
1 1 1 2 1 1 1 data_25
1 1 1 2 1 1 2 data_26
1 1 1 2 1 2 1 data_27
1 1 1 2 1 2 2 data_28
1 1 1 2 1 3 1 data_29
1 1 1 2 1 3 2 data_30
0 1 1 2 1 4 1 data_31
0 1 1 2 1 4 2 data_32
1 1 1 2 2 1 1 data_33
1 1 1 2 2 1 2 data_34
1 1 1 2 2 2 1 data_35
1 1 1 2 2 2 2 data_36
1 1 1 2 2 3 1 data_37
1 1 1 2 2 3 2 data_38
0 1 1 2 2 4 1 data_39
0 1 1 2 2 4 2 data_40
1 1 1 2 3 1 1 data_41
1 1 1 2 3 1 2 data_42
1 1 1 2 3 2 1 data_43
1 1 1 2 3 2 2 data_44
1 1 1 2 3 3 1 data_45
1 1 1 2 3 3 2 data_46
0 1 1 2 3 4 1 data_47
0 1 1 2 3 4 2 data_48
1 1 2 1 1 1 1 data_49
1 1 2 1 1 1 2 data_50
1 1 2 1 1 2 1 data_51
1 1 2 1 1 2 2 data_52
1 1 2 1 1 3 1 data_53
1 1 2 1 1 3 2 data_54
0 1 2 1 1 4 1 data_55
0 1 2 1 1 4 2 data_56
1 1 2 1 2 1 1 data_57
1 1 2 1 2 1 2 data_58
1 1 2 1 2 2 1 data_59
1 1 2 1 2 2 2 data_60
1 1 2 1 2 3 1 data_61
1 1 2 1 2 3 2 data_62
0 1 2 1 2 4 1 data_63
0 1 2 1 2 4 2 data_64
1 1 2 1 3 1 1 data_65
1 1 2 1 3 1 2 data_66
1 1 2 1 3 2 1 data_67
1 1 2 1 3 2 2 data_68
1 1 2 1 3 3 1 data_69
1 1 2 1 3 3 2 data_70
0 1 2 1 3 4 1 data_71
0 1 2 1 3 4 2 data_72
1 1 2 2 1 1 1 data_73
1 1 2 2 1 1 2 data_74
1 1 2 2 1 2 1 data_75
1 1 2 2 1 2 2 data_76
1 1 2 2 1 3 1 data_77
1 1 2 2 1 3 2 data_78
0 1 2 2 1 4 1 data_79
0 1 2 2 1 4 2 data_80
1 1 2 2 2 1 1 data_81
1 1 2 2 2 1 2 data_82
1 1 2 2 2 2 1 data_83
1 1 2 2 2 2 2 data_84
1 1 2 2 2 3 1 data_85
1 1 2 2 2 3 2 data_86
0 1 2 2 2 4 1 data_87
0 1 2 2 2 4 2 data_88
1 1 2 2 3 1 1 data_89
1 1 2 2 3 1 2 data_90
1 1 2 2 3 2 1 data_91
1 1 2 2 3 2 2 data_92
1 1 2 2 3 3 1 data_93
1 1 2 2 3 3 2 data_94
0 1 2 2 3 4 1 data_95
0 1 2 2 3 4 2 data_96
0 1 3 1 1 1 1 data_97
0 1 3 1 1 1 2 data_98
0 1 3 1 1 2 1 data_99
0 1 3 1 1 2 2 data_100
1 1 3 1 1 3 1 data_101
1 1 3 1 1 3 2 data_102
0 1 3 1 1 4 1 data_103
0 1 3 1 1 4 2 data_104
0 1 3 1 2 1 1 data_105
0 1 3 1 2 1 2 data_106
0 1 3 1 2 2 1 data_107
0 1 3 1 2 2 2 data_108
0 1 3 1 2 3 1 data_109
0 1 3 1 2 3 2 data_110
0 1 3 1 2 4 1 data_111
0 1 3 1 2 4 2 data_112
0 1 3 1 3 1 1 data_113
0 1 3 1 3 1 2 data_114
0 1 3 1 3 2 1 data_115
0 1 3 1 3 2 2 data_116
0 1 3 1 3 3 1 data_117
0 1 3 1 3 3 2 data_118
0 1 3 1 3 4 1 data_119
0 1 3 1 3 4 2 data_120
0 1 3 2 1 1 1 data_121
0 1 3 2 1 1 2 data_122
0 1 3 2 1 2 1 data_123
0 1 3 2 1 2 2 data_124
1 1 3 2 1 3 1 data_125
1 1 3 2 1 3 2 data_126
0 1 3 2 1 4 1 data_127
0 1 3 2 1 4 2 data_128
0 1 3 2 2 1 1 data_129
0 1 3 2 2 1 2 data_130
0 1 3 2 2 2 1 data_131
0 1 3 2 2 2 2 data_132
0 1 3 2 2 3 1 data_133
0 1 3 2 2 3 2 data_134
0 1 3 2 2 4 1 data_135
0 1 3 2 2 4 2 data_136
0 1 3 2 3 1 1 data_137
0 1 3 2 3 1 2 data_138
0 1 3 2 3 2 1 data_139
0 1 3 2 3 2 2 data_140
0 1 3 2 3 3 1 data_141
0 1 3 2 3 3 2 data_142
0 1 3 2 3 4 1 data_143
0 1 3 2 3 4 2 data_144
1 2 1 1 1 1 1 data_145
1 2 1 1 1 1 2 data_146
1 2 1 1 1 2 1 data_147
1 2 1 1 1 2 2 data_148
1 2 1 1 1 3 1 data_149
1 2 1 1 1 3 2 data_150
0 2 1 1 1 4 1 data_151
0 2 1 1 1 4 2 data_152
1 2 1 1 2 1 1 data_153
1 2 1 1 2 1 2 data_154
1 2 1 1 2 2 1 data_155
1 2 1 1 2 2 2 data_156
1 2 1 1 2 3 1 data_157
1 2 1 1 2 3 2 data_158
0 2 1 1 2 4 1 data_159
0 2 1 1 2 4 2 data_160
1 2 1 1 3 1 1 data_161
1 2 1 1 3 1 2 data_162
1 2 1 1 3 2 1 data_163
1 2 1 1 3 2 2 data_164
1 2 1 1 3 3 1 data_165
1 2 1 1 3 3 2 data_166
0 2 1 1 3 4 1 data_167
0 2 1 1 3 4 2 data_168
1 2 1 2 1 1 1 data_169
1 2 1 2 1 1 2 data_170
1 2 1 2 1 2 1 data_171
1 2 1 2 1 2 2 data_172
1 2 1 2 1 3 1 data_173
1 2 1 2 1 3 2 data_174
0 2 1 2 1 4 1 data_175
0 2 1 2 1 4 2 data_176
1 2 1 2 2 1 1 data_177
1 2 1 2 2 1 2 data_178
1 2 1 2 2 2 1 data_179
1 2 1 2 2 2 2 data_180
1 2 1 2 2 3 1 data_181
1 2 1 2 2 3 2 data_182
0 2 1 2 2 4 1 data_183
0 2 1 2 2 4 2 data_184
1 2 1 2 3 1 1 data_185
1 2 1 2 3 1 2 data_186
1 2 1 2 3 2 1 data_187
1 2 1 2 3 2 2 data_188
1 2 1 2 3 3 1 data_189
1 2 1 2 3 3 2 data_190
0 2 1 2 3 4 1 data_191
0 2 1 2 3 4 2 data_192
1 2 2 1 1 1 1 data_193
1 2 2 1 1 1 2 data_194
1 2 2 1 1 2 1 data_195
1 2 2 1 1 2 2 data_196
1 2 2 1 1 3 1 data_197
1 2 2 1 1 3 2 data_198
0 2 2 1 1 4 1 data_199
0 2 2 1 1 4 2 data_200
1 2 2 1 2 1 1 data_201
1 2 2 1 2 1 2 data_202
1 2 2 1 2 2 1 data_203
1 2 2 1 2 2 2 data_204
1 2 2 1 2 3 1 data_205
1 2 2 1 2 3 2 data_206
0 2 2 1 2 4 1 data_207
0 2 2 1 2 4 2 data_208
1 2 2 1 3 1 1 data_209
1 2 2 1 3 1 2 data_210
1 2 2 1 3 2 1 data_211
1 2 2 1 3 2 2 data_212
1 2 2 1 3 3 1 data_213
1 2 2 1 3 3 2 data_214
0 2 2 1 3 4 1 data_215
0 2 2 1 3 4 2 data_216
1 2 2 2 1 1 1 data_217
1 2 2 2 1 1 2 data_218
1 2 2 2 1 2 1 data_219
1 2 2 2 1 2 2 data_220
1 2 2 2 1 3 1 data_221
1 2 2 2 1 3 2 data_222
0 2 2 2 1 4 1 data_223
0 2 2 2 1 4 2 data_224
1 2 2 2 2 1 1 data_225
1 2 2 2 2 1 2 data_226
1 2 2 2 2 2 1 data_227
1 2 2 2 2 2 2 data_228
1 2 2 2 2 3 1 data_229
1 2 2 2 2 3 2 data_230
0 2 2 2 2 4 1 data_231
0 2 2 2 2 4 2 data_232
1 2 2 2 3 1 1 data_233
1 2 2 2 3 1 2 data_234
1 2 2 2 3 2 1 data_235
1 2 2 2 3 2 2 data_236
1 2 2 2 3 3 1 data_237
1 2 2 2 3 3 2 data_238
0 2 2 2 3 4 1 data_239
0 2 2 2 3 4 2 data_240
0 2 3 1 1 1 1 data_241
0 2 3 1 1 1 2 data_242
0 2 3 1 1 2 1 data_243
0 2 3 1 1 2 2 data_244
1 2 3 1 1 3 1 data_245
1 2 3 1 1 3 2 data_246
0 2 3 1 1 4 1 data_247
0 2 3 1 1 4 2 data_248
0 2 3 1 2 1 1 data_249
0 2 3 1 2 1 2 data_250
0 2 3 1 2 2 1 data_251
0 2 3 1 2 2 2 data_252
0 2 3 1 2 3 1 data_253
0 2 3 1 2 3 2 data_254
0 2 3 1 2 4 1 data_255
0 2 3 1 2 4 2 data_256
0 2 3 1 3 1 1 data_257
0 2 3 1 3 1 2 data_258
0 2 3 1 3 2 1 data_259
0 2 3 1 3 2 2 data_260
0 2 3 1 3 3 1 data_261
0 2 3 1 3 3 2 data_262
0 2 3 1 3 4 1 data_263
0 2 3 1 3 4 2 data_264
0 2 3 2 1 1 1 data_265
0 2 3 2 1 1 2 data_266
0 2 3 2 1 2 1 data_267
0 2 3 2 1 2 2 data_268
1 2 3 2 1 3 1 data_269
1 2 3 2 1 3 2 data_270
0 2 3 2 1 4 1 data_271
0 2 3 2 1 4 2 data_272
0 2 3 2 2 1 1 data_273
0 2 3 2 2 1 2 data_274
0 2 3 2 2 2 1 data_275
0 2 3 2 2 2 2 data_276
0 2 3 2 2 3 1 data_277
0 2 3 2 2 3 2 data_278
0 2 3 2 2 4 1 data_279
0 2 3 2 2 4 2 data_280
0 2 3 2 3 1 1 data_281
0 2 3 2 3 1 2 data_282
0 2 3 2 3 2 1 data_283
0 2 3 2 3 2 2 data_284
0 2 3 2 3 3 1 data_285
0 2 3 2 3 3 2 data_286
0 2 3 2 3 4 1 data_287
0 2 3 2 3 4 2 data_288
1 3 1 1 1 1 1 data_289
1 3 1 1 1 1 2 data_290
1 3 1 1 1 2 1 data_291
1 3 1 1 1 2 2 data_292
1 3 1 1 1 3 1 data_293
1 3 1 1 1 3 2 data_294
0 3 1 1 1 4 1 data_295
0 3 1 1 1 4 2 data_296
1 3 1 1 2 1 1 data_297
1 3 1 1 2 1 2 data_298
1 3 1 1 2 2 1 data_299
1 3 1 1 2 2 2 data_300
1 3 1 1 2 3 1 data_301
1 3 1 1 2 3 2 data_302
0 3 1 1 2 4 1 data_303
0 3 1 1 2 4 2 data_304
1 3 1 1 3 1 1 data_305
1 3 1 1 3 1 2 data_306
1 3 1 1 3 2 1 data_307
1 3 1 1 3 2 2 data_308
1 3 1 1 3 3 1 data_309
1 3 1 1 3 3 2 data_310
0 3 1 1 3 4 1 data_311
0 3 1 1 3 4 2 data_312
1 3 1 2 1 1 1 data_313
1 3 1 2 1 1 2 data_314
1 3 1 2 1 2 1 data_315
1 3 1 2 1 2 2 data_316
1 3 1 2 1 3 1 data_317
1 3 1 2 1 3 2 data_318
0 3 1 2 1 4 1 data_319
0 3 1 2 1 4 2 data_320
1 3 1 2 2 1 1 data_321
1 3 1 2 2 1 2 data_322
1 3 1 2 2 2 1 data_323
1 3 1 2 2 2 2 data_324
1 3 1 2 2 3 1 data_325
1 3 1 2 2 3 2 data_326
0 3 1 2 2 4 1 data_327
0 3 1 2 2 4 2 data_328
1 3 1 2 3 1 1 data_329
1 3 1 2 3 1 2 data_330
1 3 1 2 3 2 1 data_331
1 3 1 2 3 2 2 data_332
1 3 1 2 3 3 1 data_333
1 3 1 2 3 3 2 data_334
0 3 1 2 3 4 1 data_335
0 3 1 2 3 4 2 data_336
1 3 2 1 1 1 1 data_337
1 3 2 1 1 1 2 data_338
1 3 2 1 1 2 1 data_339
1 3 2 1 1 2 2 data_340
1 3 2 1 1 3 1 data_341
1 3 2 1 1 3 2 data_342
0 3 2 1 1 4 1 data_343
0 3 2 1 1 4 2 data_344
1 3 2 1 2 1 1 data_345
1 3 2 1 2 1 2 data_346
1 3 2 1 2 2 1 data_347
1 3 2 1 2 2 2 data_348
1 3 2 1 2 3 1 data_349
1 3 2 1 2 3 2 data_350
0 3 2 1 2 4 1 data_351
0 3 2 1 2 4 2 data_352
1 3 2 1 3 1 1 data_353
1 3 2 1 3 1 2 data_354
1 3 2 1 3 2 1 data_355
1 3 2 1 3 2 2 data_356
1 3 2 1 3 3 1 data_357
1 3 2 1 3 3 2 data_358
0 3 2 1 3 4 1 data_359
0 3 2 1 3 4 2 data_360
1 3 2 2 1 1 1 data_361
1 3 2 2 1 1 2 data_362
1 3 2 2 1 2 1 data_363
1 3 2 2 1 2 2 data_364
1 3 2 2 1 3 1 data_365
1 3 2 2 1 3 2 data_366
0 3 2 2 1 4 1 data_367
0 3 2 2 1 4 2 data_368
1 3 2 2 2 1 1 data_369
1 3 2 2 2 1 2 data_370
1 3 2 2 2 2 1 data_371
1 3 2 2 2 2 2 data_372
1 3 2 2 2 3 1 data_373
1 3 2 2 2 3 2 data_374
0 3 2 2 2 4 1 data_375
0 3 2 2 2 4 2 data_376
1 3 2 2 3 1 1 data_377
1 3 2 2 3 1 2 data_378
1 3 2 2 3 2 1 data_379
1 3 2 2 3 2 2 data_380
1 3 2 2 3 3 1 data_381
1 3 2 2 3 3 2 data_382
0 3 2 2 3 4 1 data_383
0 3 2 2 3 4 2 data_384
0 3 3 1 1 1 1 data_385
0 3 3 1 1 1 2 data_386
0 3 3 1 1 2 1 data_387
0 3 3 1 1 2 2 data_388
1 3 3 1 1 3 1 data_389
1 3 3 1 1 3 2 data_390
0 3 3 1 1 4 1 data_391
0 3 3 1 1 4 2 data_392
0 3 3 1 2 1 1 data_393
0 3 3 1 2 1 2 data_394
0 3 3 1 2 2 1 data_395
0 3 3 1 2 2 2 data_396
0 3 3 1 2 3 1 data_397
0 3 3 1 2 3 2 data_398
0 3 3 1 2 4 1 data_399
0 3 3 1 2 4 2 data_400
0 3 3 1 3 1 1 data_401
0 3 3 1 3 1 2 data_402
0 3 3 1 3 2 1 data_403
0 3 3 1 3 2 2 data_404
0 3 3 1 3 3 1 data_405
0 3 3 1 3 3 2 data_406
0 3 3 1 3 4 1 data_407
0 3 3 1 3 4 2 data_408
0 3 3 2 1 1 1 data_409
0 3 3 2 1 1 2 data_410
0 3 3 2 1 2 1 data_411
0 3 3 2 1 2 2 data_412
1 3 3 2 1 3 1 data_413
1 3 3 2 1 3 2 data_414
0 3 3 2 1 4 1 data_415
0 3 3 2 1 4 2 data_416
0 3 3 2 2 1 1 data_417
0 3 3 2 2 1 2 data_418
0 3 3 2 2 2 1 data_419
0 3 3 2 2 2 2 data_420
0 3 3 2 2 3 1 data_421
0 3 3 2 2 3 2 data_422
0 3 3 2 2 4 1 data_423
0 3 3 2 2 4 2 data_424
0 3 3 2 3 1 1 data_425
0 3 3 2 3 1 2 data_426
0 3 3 2 3 2 1 data_427
0 3 3 2 3 2 2 data_428
0 3 3 2 3 3 1 data_429
0 3 3 2 3 3 2 data_430
0 3 3 2 3 4 1 data_431
0 3 3 2 3 4 2 data_432

View File

@ -0,0 +1,122 @@
1 1 1 1 1 1 2 data_2
1 1 1 1 1 2 1 data_3
1 1 1 1 1 2 2 data_4
0 1 1 1 1 3 1 data_5
0 1 1 1 1 4 1 data_7
1 1 1 1 2 1 1 data_9
1 1 1 1 2 2 2 data_12
0 1 1 1 2 4 2 data_16
1 1 1 2 1 2 2 data_28
0 1 1 2 1 4 2 data_32
1 1 1 2 2 2 2 data_36
0 1 1 2 2 4 1 data_39
0 1 1 2 2 4 2 data_40
1 1 1 2 3 1 1 data_41
1 1 1 2 3 1 2 data_42
1 1 1 2 3 3 1 data_45
1 1 1 2 3 3 2 data_46
1 1 2 1 1 3 1 data_53
1 1 2 1 2 2 1 data_59
1 1 2 1 2 2 2 data_60
0 1 2 1 2 3 1 data_61
1 1 2 1 3 1 1 data_65
1 1 2 1 3 1 2 data_66
1 1 2 1 3 2 1 data_67
1 1 2 1 3 2 2 data_68
1 1 2 1 3 3 2 data_70
0 1 2 1 3 4 1 data_71
1 1 2 2 1 3 1 data_77
0 1 2 2 1 4 2 data_80
1 1 2 2 2 1 1 data_81
1 1 2 2 2 2 1 data_83
1 1 2 2 2 2 2 data_84
1 1 2 2 3 1 1 data_89
1 1 2 2 3 2 1 data_91
1 1 2 2 3 2 2 data_92
0 1 3 1 1 2 1 data_99
0 1 3 1 1 4 1 data_103
0 1 3 1 2 3 2 data_110
0 1 3 1 2 4 1 data_111
0 1 3 1 3 1 1 data_113
0 1 3 1 3 3 1 data_117
0 1 3 2 1 1 1 data_121
0 1 3 2 1 1 2 data_122
0 1 3 2 1 2 1 data_123
0 1 3 2 1 4 2 data_128
0 1 3 2 2 3 2 data_134
0 1 3 2 2 4 2 data_136
0 1 3 2 3 4 1 data_143
1 2 1 1 1 1 1 data_145
1 2 1 1 1 1 2 data_146
0 2 1 1 1 4 1 data_151
0 2 1 1 1 4 2 data_152
1 2 1 1 2 1 1 data_153
1 2 1 1 2 1 2 data_154
1 2 1 1 3 2 2 data_164
1 2 1 1 3 3 2 data_166
0 2 1 1 3 4 1 data_167
1 2 1 2 1 2 2 data_172
0 2 1 2 2 4 1 data_183
1 2 1 2 3 1 2 data_186
1 2 2 1 1 3 2 data_198
0 2 2 1 1 4 2 data_200
1 2 2 1 2 1 2 data_202
0 2 2 1 2 2 1 data_203
1 2 2 1 3 1 1 data_209
1 2 2 1 3 2 2 data_212
0 2 2 1 3 3 1 data_213
0 2 2 1 3 3 2 data_214
0 2 2 1 3 4 2 data_216
1 2 2 2 1 2 2 data_220
1 2 2 2 2 1 2 data_226
1 2 2 2 2 3 1 data_229
1 2 2 2 2 3 2 data_230
0 2 2 2 3 4 1 data_239
1 2 3 1 1 3 1 data_245
0 2 3 1 2 1 1 data_249
0 2 3 1 2 2 1 data_251
0 2 3 1 2 2 2 data_252
0 2 3 1 2 3 2 data_254
0 2 3 1 3 3 1 data_261
0 2 3 2 1 1 2 data_266
0 2 3 2 1 2 2 data_268
0 2 3 2 1 4 1 data_271
0 2 3 2 2 3 1 data_277
0 2 3 2 2 4 2 data_280
0 2 3 2 3 1 1 data_281
0 2 3 2 3 2 1 data_283
0 2 3 2 3 4 2 data_288
1 3 1 1 1 1 1 data_289
1 3 1 1 1 2 1 data_291
1 3 1 1 1 3 1 data_293
0 3 1 1 2 4 2 data_304
1 3 1 1 3 1 2 data_306
0 3 1 1 3 4 2 data_312
1 3 1 2 1 2 1 data_315
1 3 1 2 2 3 2 data_326
0 3 1 2 2 4 2 data_328
1 3 1 2 3 1 1 data_329
1 3 2 1 1 2 2 data_340
0 3 2 1 1 4 1 data_343
1 3 2 1 2 3 1 data_349
1 3 2 1 3 1 2 data_354
1 3 2 2 1 2 2 data_364
1 3 2 2 1 3 2 data_366
1 3 2 2 2 1 2 data_370
1 3 2 2 3 1 1 data_377
1 3 2 2 3 3 2 data_382
0 3 2 2 3 4 1 data_383
1 3 3 1 1 3 2 data_390
1 3 3 1 1 4 1 data_391
0 3 3 1 2 4 2 data_400
0 3 3 1 3 1 1 data_401
0 3 3 1 3 2 1 data_403
0 3 3 1 3 2 2 data_404
0 3 3 1 3 4 1 data_407
0 3 3 2 1 1 1 data_409
0 3 3 2 1 1 2 data_410
0 3 3 2 2 2 2 data_420
0 3 3 2 2 3 2 data_422
0 3 3 2 3 1 1 data_425
0 3 3 2 3 3 2 data_430
0 3 3 2 3 4 2 data_432

View File

@ -0,0 +1,76 @@
1. Title: The Monk's Problems
2. Sources:
(a) Donor: Sebastian Thrun
School of Computer Science
Carnegie Mellon University
Pittsburgh, PA 15213, USA
E-mail: thrun@cs.cmu.edu
(b) Date: October 1992
3. Past Usage:
- See File: thrun.comparison.ps.Z
- Wnek, J., "Hypothesis-driven Constructive Induction," PhD dissertation,
School of Information Technology and Engineering, Reports of Machine
Learning and Inference Laboratory, MLI 93-2, Center for Artificial
Intelligence, George Mason University, March 1993.
- Wnek, J. and Michalski, R.S., "Comparing Symbolic and
Subsymbolic Learning: Three Studies," in Machine Learning: A
Multistrategy Approach, Vol. 4., R.S. Michalski and G. Tecuci (Eds.),
Morgan Kaufmann, San Mateo, CA, 1993.
4. Relevant Information:
The MONK's problem were the basis of a first international comparison
of learning algorithms. The result of this comparison is summarized in
"The MONK's Problems - A Performance Comparison of Different Learning
algorithms" by S.B. Thrun, J. Bala, E. Bloedorn, I. Bratko, B.
Cestnik, J. Cheng, K. De Jong, S. Dzeroski, S.E. Fahlman, D. Fisher,
R. Hamann, K. Kaufman, S. Keller, I. Kononenko, J. Kreuziger, R.S.
Michalski, T. Mitchell, P. Pachowicz, Y. Reich H. Vafaie, W. Van de
Welde, W. Wenzel, J. Wnek, and J. Zhang has been published as
Technical Report CS-CMU-91-197, Carnegie Mellon University in Dec.
1991.
One significant characteristic of this comparison is that it was
performed by a collection of researchers, each of whom was an advocate
of the technique they tested (often they were the creators of the
various methods). In this sense, the results are less biased than in
comparisons performed by a single person advocating a specific
learning method, and more accurately reflect the generalization
behavior of the learning techniques as applied by knowledgeable users.
There are three MONK's problems. The domains for all MONK's problems
are the same (described below). One of the MONK's problems has noise
added. For each problem, the domain has been partitioned into a train
and test set.
5. Number of Instances: 432
6. Number of Attributes: 8 (including class attribute)
7. Attribute information:
1. class: 0, 1
2. a1: 1, 2, 3
3. a2: 1, 2, 3
4. a3: 1, 2
5. a4: 1, 2, 3
6. a5: 1, 2, 3, 4
7. a6: 1, 2
8. Id: (A unique symbol for each instance)
8. Missing Attribute Values: None
9. Target Concepts associated to the MONK's problem:
MONK-1: (a1 = a2) or (a5 = 1)
MONK-2: EXACTLY TWO of {a1 = 1, a2 = 1, a3 = 1, a4 = 1, a5 = 1, a6 = 1}
MONK-3: (a5 = 3 and a4 = 1) or (a5 /= 4 and a2 /= 3)
(5% class noise added to the training set)

View File

@ -0,0 +1,16 @@
! Copyright (C) 2018 Björn Lindqvist
! See http://factorcode.org/license.txt for BSD license
USING: kernel machine-learning.data-sets
machine-learning.decision-trees math.extras sequences tools.test ;
IN: machine-learning.decision-trees.tests
{ { 0.08 0.01 0.0 0.03 0.29 0.0 } } [
"monks-1.train" load-monks
6 <iota> [
average-gain 2 round-to-decimal
] with map
] unit-test
{ 4 } [
"monks-1.train" load-monks highest-gain-index
] unit-test

View File

@ -0,0 +1,33 @@
! Copyright (C) 2018 Björn Lindqvist
! See http://factorcode.org/license.txt for BSD license
USING: accessors assocs fry grouping.extras kernel locals math
math.functions math.statistics sequences sequences.extras sorting ;
IN: machine-learning.decision-trees
! Why convert the logarithm to base 2? I don't know.
: entropy2 ( seq -- e )
normalized-histogram values entropy 2 log / ;
: group-by-sorted ( seq quot: ( elt -- key ) -- groups )
[ sort-with ] keep group-by ; inline
: subsets-weighted-entropy ( data-target idx -- seq )
! Group the data according to the given index.
'[ first _ swap nth ] group-by-sorted
! Then unpack the partitioned groups of targets
'[ [ second ] map ] assoc-map values
! Finally, calculate the weighted entropy for each group
[ [ entropy2 ] [ length ] bi * ] map-sum ; inline
:: average-gain ( dataset idx -- gain )
dataset target>> :> target
dataset data>> :> data
data target zip :> data-target
data-target idx subsets-weighted-entropy :> weighted
target entropy2 weighted data length / - ;
: highest-gain-index ( dataset -- idx )
dup feature-names>> length <iota> [
average-gain
] with map arg-max ;

View File

@ -1,8 +1,8 @@
! Copyright (C) 2010 Erik Charlebois. ! Copyright (C) 2010 Erik Charlebois.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: accessors kernel locals math math.order math.polynomials USING: accessors kernel locals math math.order math.polynomials
math.splines opengl.gl sequences ui.gadgets ui.gadgets.panes ui.render math.splines opengl.demo-support opengl.gl sequences ui.gadgets
arrays ; ui.gadgets.panes ui.render arrays ;
IN: math.splines.viewer IN: math.splines.viewer
<PRIVATE <PRIVATE
@ -33,11 +33,11 @@ M:: spline-gadget draw-gadget* ( gadget -- )
[ second y-min - y-max y-min - / gadget spline-dim>> second * ] bi 2array [ second y-min - y-max y-min - / gadget spline-dim>> second * ] bi 2array
] map :> pts ] map :> pts
GL_LINE_STRIP glBegin GL_LINE_STRIP [
pts [ pts [
first2 neg gadget spline-dim>> second + glVertex2f first2 neg gadget spline-dim>> second + glVertex2f
] each ] each ]
glEnd ; do-state ;
:: <spline-gadget> ( polynomials dim steps -- gadget ) :: <spline-gadget> ( polynomials dim steps -- gadget )
spline-gadget new spline-gadget new

View File

@ -1,7 +1,7 @@
! From http://www.ffconsultancy.com/ocaml/maze/index.html ! From http://www.ffconsultancy.com/ocaml/maze/index.html
USING: accessors arrays fry kernel math math.order math.vectors USING: accessors arrays fry kernel math math.order math.vectors
namespaces opengl.gl random sequences ui ui.gadgets namespaces opengl.demo-support opengl.gl random sequences ui
ui.gadgets.canvas ui.render ; ui.gadgets ui.gadgets.canvas ui.render ;
IN: maze IN: maze
CONSTANT: line-width 8 CONSTANT: line-width 8
@ -25,7 +25,7 @@ SYMBOL: visited
: (draw-maze) ( cell -- ) : (draw-maze) ( cell -- )
dup vertex dup vertex
glEnd glEnd
GL_POINTS glBegin dup vertex glEnd GL_POINTS [ dup vertex ] do-state
GL_LINE_STRIP glBegin GL_LINE_STRIP glBegin
dup vertex dup vertex
dup visit dup visit
@ -42,9 +42,9 @@ SYMBOL: visited
line-width 2 - glPointSize line-width 2 - glPointSize
1.0 1.0 1.0 1.0 glColor4d 1.0 1.0 1.0 1.0 glColor4d
dup '[ _ t <array> ] replicate visited set dup '[ _ t <array> ] replicate visited set
GL_LINE_STRIP glBegin GL_LINE_STRIP [
{ 0 0 } dup vertex (draw-maze) { 0 0 } dup vertex (draw-maze)
glEnd ; ] do-state ;
TUPLE: maze < canvas ; TUPLE: maze < canvas ;

View File

@ -19,8 +19,7 @@ MAIN-WINDOW: merger-window {
[ swap set-control-value ] 2bi [ swap set-control-value ] 2bi
] [ drop ] if* ] [ drop ] if*
] <border-button> swap >>model swap ] <border-button> swap >>model swap
color: black <labeled-gadget> <labeled-gadget> 1 track-add
1 track-add
] 2each ] 2each
] keep ] keep
dup first2 dup first2

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Some files were not shown because too many files have changed in this diff Show More