object - Factor Documentation (original) (raw)
Class description
The class of all objects. If a generic word defines a method specializing on this class, the method is used as a fallback, if no other applicable method is found. For instance:
GENERIC: enclose ( number -- array ) M: number enclose 1array ; M: object enclose ;
USING: cpu.architecture kernel ;
M: object %abs-vector-reps { } ;
USING: cpu.architecture kernel ;
M: object %add-sub-vector-reps { } ;
USING: cpu.architecture kernel ;
M: object %add-vector-reps { } ;
USING: cpu.architecture kernel ;
M: object %alien-vector-reps { } ;
USING: cpu.architecture kernel ;
M: object %and-vector-reps { } ;
USING: cpu.architecture kernel ;
M: object %andn-vector-reps { } ;
USING: cpu.architecture kernel ;
M: object %compare-vector-ccs 2drop { } f ;
USING: cpu.architecture kernel ;
M: object %compare-vector-reps drop { } ;
USING: cpu.architecture kernel ;
M: object %div-vector-reps { } ;
USING: cpu.architecture kernel ;
M: object %dot-vector-reps { } ;
USING: cpu.architecture kernel ;
M: object %fill-vector-reps { } ;
USING: cpu.architecture kernel ;
M: object %float-pack-vector-reps { } ;
USING: cpu.architecture kernel ;
M: object %float>integer-vector-reps { } ;
USING: cpu.architecture kernel ;
M: object %gather-int-vector-2-reps { } ;
USING: cpu.architecture kernel ;
M: object %gather-int-vector-4-reps { } ;
USING: cpu.architecture kernel ;
M: object %gather-vector-2-reps { } ;
USING: cpu.architecture kernel ;
M: object %gather-vector-4-reps { } ;
USING: cpu.architecture kernel ;
M: object %horizontal-add-vector-reps { } ;
USING: cpu.architecture kernel ;
M: object %horizontal-shl-vector-imm-reps { } ;
USING: cpu.architecture kernel ;
M: object %horizontal-shr-vector-imm-reps { } ;
USING: cpu.architecture kernel ;
M: object %horizontal-sub-vector-reps { } ;
USING: cpu.architecture kernel ;
M: object %integer>float-vector-reps { } ;
USING: cpu.architecture kernel ;
M: object %max-vector-reps { } ;
USING: cpu.architecture kernel ;
M: object %merge-vector-reps { } ;
USING: cpu.architecture kernel ;
M: object %min-vector-reps { } ;
USING: cpu.architecture kernel ;
M: object %mul-vector-reps { } ;
USING: cpu.architecture kernel ;
M: object %not-vector-reps { } ;
USING: cpu.architecture kernel ;
M: object %or-vector-reps { } ;
USING: cpu.architecture kernel ;
M: object %saturated-add-vector-reps { } ;
USING: cpu.architecture kernel ;
M: object %saturated-mul-vector-reps { } ;
USING: cpu.architecture kernel ;
M: object %saturated-sub-vector-reps { } ;
USING: cpu.architecture kernel ;
M: object %select-vector-reps { } ;
USING: cpu.architecture kernel ;
M: object %shl-vector-imm-reps { } ;
USING: cpu.architecture kernel ;
M: object %shl-vector-reps { } ;
USING: cpu.architecture kernel ;
M: object %shr-vector-imm-reps { } ;
USING: cpu.architecture kernel ;
M: object %shr-vector-reps { } ;
USING: cpu.architecture kernel ;
M: object %shuffle-vector-halves-imm-reps { } ;
USING: cpu.architecture kernel ;
M: object %shuffle-vector-imm-reps { } ;
USING: cpu.architecture kernel ;
M: object %shuffle-vector-reps { } ;
USING: cpu.architecture kernel ;
M: object %signed-pack-vector-reps { } ;
USING: cpu.architecture kernel ;
M: object %sqrt-vector-reps { } ;
USING: cpu.architecture kernel ;
M: object %sub-vector-reps { } ;
USING: cpu.architecture kernel ;
M: object %test-vector-reps { } ;
USING: cpu.architecture kernel ;
M: object %unpack-vector-head-reps { } ;
USING: cpu.architecture kernel ;
M: object %unpack-vector-tail-reps { } ;
USING: cpu.architecture kernel ;
M: object %unsigned-pack-vector-reps { } ;
USING: cpu.architecture kernel ;
M: object %xor-vector-reps { } ;
USING: cpu.architecture kernel ;
M: object %zero-vector-reps { } ;
USING: combinators io.backend.unix io.files io.ports
io.sockets.private io.sockets.unix kernel libc math ;
M: object (accept)
2dup do-accept over 0 >=
[ [ 2nip init-fd ] dip ] [
errno {
{ EINTR [ 2drop (accept) ] }
{
EAGAIN
[
2drop
[ drop +input+ wait-for-port ] [ (accept) ]
2bi
]
}
[ (throw-errno) ]
} case
] if ;
USING: destructors io.sockets.private kernel ;
M: object (client)
[
[ remote>handle ] keep [
[ [ |dispose ] bi@ dup ] dip
establish-connection
] [ get-local-address ] 2bi
] with-destructors ;
USING: kernel opengl.textures ;
M: object (component-type>type) unsupported-component-order ;
M: object (deref-aliases) nip ;
USING: bootstrap.image.private kernel ;
M: object (exec) is-gml over push-operand ;
USING: functors.private kernel make ;
M: object (fake-quotations>) , ;
USING: alien.c-types alien.data io.backend.unix
io.sockets.private kernel libc unix.ffi ;
M: object (get-local-address)
[ handle-fd ] dip empty-sockaddr/size int
[ getsockname io-error ] keepd ;
USING: alien.c-types alien.data io.backend.unix
io.sockets.private kernel libc unix.ffi ;
M: object (get-remote-address)
[ handle-fd ] dip empty-sockaddr/size int
[ getpeername io-error ] keepd ;
USING: kernel sequences variants ;
M: object (match-branch) over \ unboa [ ] 2sequence prepend ;
USING: kernel math.quaternions.private math.vectors ;
M: object (q*sign) { -1 1 1 1 } v* ; inline
M: object (replace-aliases) nip ;
M: object (replace-anchors) nip ;
USING: destructors io.backend.unix io.sockets.private
io.sockets.unix kernel unix unix.ffi ;
M: object (server)
[
SOCK_STREAM server-socket-fd dup handle-fd 128
[ listen ] unix-system-call drop
] with-destructors ;
USING: assocs http.client.post-data.private kernel ;
M: object (set-post-data-headers)
drop "chunked" "transfer-encoding" pick set-at ;
USING: kernel regexp.classes ;
M: object (substitute) answer ;
USING: kernel stack-checker.inlining ;
M: object (undeclared-known) ;
USING: assocs kernel math math.vectors sequences ;
M: object (vmerge-head)
over length 2 /i [ head-slice ] curry bi@ [ zip ] keep
concat-as ; inline
USING: assocs kernel math math.vectors sequences ;
M: object (vmerge-tail)
over length 2 /i [ tail-slice ] curry bi@ [ zip ] keep
concat-as ; inline
USING: kernel ui.tools.listener ;
M: object (word-at-caret) 2drop f ;
USING: http.client.post-data.private io io.encodings.ascii
io.encodings.string kernel ;
M: object (write-post-data)
[ [ write-chunk ] each-block ] with-input-stream
"0;\r\n" ascii encode write ;
M: object f decoder boa ; inline
M: object encoder boa ; inline
USING: kernel ui.commands ui.gadgets.buttons ui.gadgets.glass
ui.gadgets.menus ui.gadgets.menus.private ;
M:: object ( target hook command -- menu-item )
command command-name [
hook call target command command-button-quot call
hide-glass
] ;
USING: kernel regexp.classes ;
USING: io.sockets kernel ping ;
USING: accessors io.sockets.secure io.sockets.secure.debug
kernel ;
M: object *
drop
"vocab:openssl/test-1.2/server.pem"
>>key-file "vocab:openssl/test-1.2/dh2048.pem" >>dh-file
"password" >>password ;
USING: colors.lab colors.lch kernel ;
M: object >LCHab >laba >LCHab ;
USING: colors.lch colors.luv kernel ;
M: object >LCHuv >luva >LCHuv ;
USING: accessors alien kernel ;
M: object >c-ptr underlying>> ; inline
USING: colors colors.cmyk kernel ;
M: object >cmyka >rgba >cmyka ;
USING: accessors combinators furnace.syndication kernel
syndication ;
M: object >entry
swap {
[ feed-entry-title >>title ]
[ feed-entry-date >>date ]
[ feed-entry-url >>url ]
[ feed-entry-description >>description ]
} cleave ;
USING: functors.private kernel ;
USING: colors colors.gray kernel ;
USING: colors colors.hsl kernel ;
USING: colors colors.hsv kernel ;
USING: colors colors.hwb kernel ;
USING: kernel math punycode punycode.private sequences splitting
;
M: object >idna
"." split
[ dup [ N < ] all? [ >punycode "xn--" prepend ] unless ] map
"." join ;
USING: colors colors.lab kernel ;
USING: kernel ui.gadgets.labels ;
USING: colors colors.luv kernel ;
USING: alien.c-types kernel pack ;
M: object >n-byte-array heap-size >n-byte-array ;
USING: colors colors.oklab kernel ;
M: object >oklaba >rgba >oklaba ;
USING: colors.oklab colors.oklch kernel ;
M: object >oklcha >oklaba >oklcha ;
USING: accessors http http.client.post-data kernel ;
M: object >post-data
"application/octet-stream" swap >>data ;
USING: kernel prettyprint.custom ;
USING: accessors io.launcher kernel ;
M: object >process swap >>command ;
USING: colors colors.ryb kernel ;
USING: alien.c-types gpu.render.private kernel sequences
specialized-arrays.instances.alien.c-types.int ;
M: object >uniform-bool-array
[ >c-bool ] int-array{ } map-as ; inline
USING: alien.c-types gpu.render.private kernel sequences
specialized-arrays.instances.alien.c-types.int ;
M: object >uniform-bvec-array
[ head-slice [ >c-bool ] int-array{ } map-as ] curry map
concat ; inline
USING: alien.c-types alien.data gpu.render.private kernel ;
M: object >uniform-float-array float >c-array ; inline
USING: alien.c-types alien.data gpu.render.private kernel ;
M: object >uniform-int-array int >c-array ; inline
USING: gpu.render.private kernel sequences
specialized-arrays.instances.alien.c-types.int ;
M: object >uniform-ivec-array
[ head ] curry map int-array{ } concat-as ; inline
USING: alien.c-types alien.data gpu.render.private kernel
sequences ;
M:: object >uniform-matrix ( sequence cols rows -- c-array )
sequence flip cols head-slice
[ rows head-slice float >c-array ] { } map-as concat ;
inline
USING: gpu.render.private kernel sequences ;
M: object >uniform-matrix-array
[ >uniform-matrix ] 2curry map concat ; inline
USING: alien.c-types alien.data gpu.render.private kernel ;
M: object >uniform-uint-array uint >c-array ; inline
USING: gpu.render.private kernel sequences
specialized-arrays.instances.alien.c-types.uint ;
M: object >uniform-uvec-array
[ head ] curry map uint-array{ } concat-as ; inline
USING: gpu.render.private kernel sequences
specialized-arrays.instances.alien.c-types.float ;
M: object >uniform-vec-array
[ head ] curry map float-array{ } concat-as ; inline
M: object >vocab-link
[ lookup-vocab ] [ ] ?unless ;
USING: inverse kernel xml.syntax.inverse ;
USING: kernel xml.syntax.inverse ;
USING: colors.xyy colors.xyz kernel ;
USING: colors colors.xyz kernel ;
USING: colors colors.yiq kernel ;
USING: colors colors.yuv kernel ;
USING: cpu.x86.assembler kernel ;
M: object MOVABS bad-movabs-operands ;
USING: kernel math.order math.vectors sequences ;
M: object [v-] [ [-] ] 2map ; inline
USING: kernel ui.tools.listener.completion ;
M: object accept-completion-hook 2drop ;
M: object action-modifier C+ ;
USING: kernel tools.continuations ;
USING: kernel ui.gadgets.layout ;
M: object add-gadget-at insertion-point -rot (add-gadget-at) ;
M: object add-recent-where f ;
USING: accessors kernel namespaces sets tools.scaffold
tools.scaffold.private ;
M: object add-using
vocabulary>> using get [ adjoin ] [ drop ] if* ;
USING: cpu.arm.32.assembler.private kernel math.bitwise ;
M: object addressing-mode-2 shifter-op { { 1 25 } 0 } bitfield ;
USING: cpu.arm.32.assembler.private kernel math.bitwise ;
M: object addressing-mode-3
shifter-op { { 1 7 } { 1 4 } 0 } bitfield ;
M: object after=? <=> +lt+ eq? not ; inline
M: object after? <=> +gt+ eq? ; inline
USING: accessors alien.strings kernel ;
M: object alien>string [ underlying>> ] dip alien>string ;
USING: compiler.cfg.builder.alien.params cpu.architecture kernel
layouts math namespaces ;
M: object alloc-stack-param
stack-params get [ rep-size cell align stack-params +@ ] dip
;
USING: compiler.units kernel ;
M: object always-bump-effect-counter? drop f ;
USING: irc.client.internals kernel ;
M: object annotate-message nip ;
USING: kernel regexp.classes ;
M:: object answer ( class from to -- new-class )
class from = to class ? ;
M: object apply-merge-keys nip ;
USING: kernel stack-checker.backend ;
M: object apply-object push-literal ;
USING: kernel smalltalk.printer ;
M: object array-element>string smalltalk>string ;
M: object array-replace drop f ;
M: object article-content lookup-article article-content ;
M: object article-name article-title ;
USING: assocs help.topics kernel namespaces ;
M: object article-parent article-xref get at ;
M: object article-title lookup-article article-title ;
USING: io.encodings io.encodings.ascii.private kernel math
sequences ;
M: object ascii>
[ dup 127 <= [ encode-error ] unless ] B{ } map-as ; inline
USING: kernel smalltalk.compiler.assignment ;
M: object assigned-locals drop f ;
M: object audio-distance drop 1.0 ; inline
M: object audio-gain drop 1.0 ; inline
M: object audio-orientation
drop T{ audio-orientation-state } ; inline
M: object audio-position drop { 0.0 0.0 0.0 } ; inline
M: object audio-relative? drop f ; inline
M: object audio-rolloff drop 1.0 ; inline
M: object audio-velocity drop { 0.0 0.0 0.0 } ; inline
M: object before=? <=> +gt+ eq? not ; inline
M: object before? <=> +lt+ eq? ; inline
M: object begin-game-world drop ;
M: object binary-zero? drop f ; inline
USING: alien.c-types gpu.render.private kernel opengl.gl
sequences specialized-arrays.instances.alien.c-types.int ;
M: object bind-uniform-bvec2
1 swap 2 head-slice [ >c-bool ] int-array{ } map-as
glUniform2iv ; inline
USING: alien.c-types gpu.render.private kernel opengl.gl
sequences specialized-arrays.instances.alien.c-types.int ;
M: object bind-uniform-bvec3
1 swap 3 head-slice [ >c-bool ] int-array{ } map-as
glUniform3iv ; inline
USING: alien.c-types gpu.render.private kernel opengl.gl
sequences specialized-arrays.instances.alien.c-types.int ;
M: object bind-uniform-bvec4
1 swap 4 head-slice [ >c-bool ] int-array{ } map-as
glUniform4iv ; inline
USING: gpu.render.private kernel opengl.gl sequences ;
M: object bind-uniform-ivec2 first2 glUniform2i ; inline
USING: gpu.render.private kernel opengl.gl sequences ;
M: object bind-uniform-ivec3 first3 glUniform3i ; inline
USING: gpu.render.private kernel opengl.gl sequences ;
M: object bind-uniform-ivec4 first4 glUniform4i ; inline
USING: gpu.render.private kernel opengl.gl sequences ;
M: object bind-uniform-uvec2 first2 glUniform2ui ; inline
USING: gpu.render.private kernel opengl.gl sequences ;
M: object bind-uniform-uvec3 first3 glUniform3ui ; inline
USING: gpu.render.private kernel opengl.gl sequences ;
M: object bind-uniform-uvec4 first4 glUniform4ui ; inline
USING: gpu.render.private kernel opengl.gl sequences ;
M: object bind-uniform-vec2 first2 glUniform2f ; inline
USING: gpu.render.private kernel opengl.gl sequences ;
M: object bind-uniform-vec3 first3 glUniform3f ; inline
USING: gpu.render.private kernel opengl.gl sequences ;
M: object bind-uniform-vec4 first4 glUniform4f ; inline
USING: alien alien.c-types alien.data kernel math.bitwise
math.bitwise.private ;
M: object bit-count
binary-object uchar byte-array-bit-count ;
USING: kernel sequences.deep ;
USING: kernel peg.ebnf.private ;
USING: alien kernel math sequences ;
M: object byte-length [ length ] [ element-size ] bi * ; inline
USING: compiler.tree.propagation.call-effect kernel ;
M: object cached-effect drop +unknown+ ;
USING: html.templates io kernel namespaces ;
M: object call-template* output-stream get stream-copy ;
M: object canonicalize-drive ;
M: object canonicalize-path canonicalize-path* ;
M: object canonicalize-path-full
canonicalize-path canonicalize-drive ;
USING: kernel mason.release.sign ;
M: object check-combination-effect 2drop ;
USING: classes classes.builtin kernel kernel.private ;
M: object class-of tag type>class ; inline
USING: arrays kernel regexp.classes ;
M: object class>questions 1array ;
USING: kernel ui ui.gadgets.private ui.gadgets.worlds ;
M: object close-window find-world [ ungraft ] when* ;
USING: kernel ui.gadgets.tables ;
M: object column-alignment drop f ;
USING: kernel ui.gadgets.tables ;
M: object column-titles drop f ;
USING: kernel quotations smalltalk.compiler ;
M: object compile-ast nip 1quotation ;
USING: documents.elements kernel ui.tools.listener.completion ;
M: object completion-element drop word-start-elt ;
USING: classes.tuple fixups kernel slots.private ;
M: object compute-fixups
"error" over ?offset-of-slot
[ slot compute-fixups ] [ 2drop { } ] if* ;
M: object compute-restarts drop { } ;
USING: kernel macros.expander ;
USING: kernel macros.expander ;
M: object contained-classes "members" word-prop ;
USING: kernel smalltalk.compiler ;
M: object contains-blocks? drop f ;
USING: kernel ui.gadgets.panes ;
M: object content-gadget drop f ;
M: object copy-clipboard nip set-clipboard-contents ;
USING: destructors io io.directories io.encodings.binary
io.files kernel ;
M: object copy-file
make-parent-directories binary [
swap binary
[ swap stream-copy ] with-disposal
] with-disposal ;
M: object copy-memory* copy-register* ;
USING: kernel sequences.cords ;
M: object cord-append generic-cord boa ; inline
M: object count-inputs drop 0 ;
USING: kernel stack-checker.branches ;
M: object curried/composed? drop f ;
USING: io.files.private kernel ;
M: object declarations. drop ;
M: object decode-until (decode-until) ;
USING: accessors classes kernel libclang sequences ;
M: object def>out-form
class-of name>> "unknown object: " prepend ;
USING: graphviz.render graphviz.render.private io.standard-paths
kernel sequences ;
M: object default-graphviz-program
standard-layouts
[ find-in-standard-login-path ] map-find drop ;
USING: kernel locals.rewrite ;
USING: discord.chatgpt-bot kernel ;
M: object discord-chatgpt-bot 2drop ;
M: object discord-help-bot 2drop ;
USING: accessors discord kernel ;
M: object dispatch-message
"unhandled: " gwrite name>> gwrite g... ;
USING: accessors destructors kernel ;
M: object dispose [ t >>disposed dispose* ] unless-disposed ;
USING: kernel math math.functions math.vectors sequences ;
M: object distance [ - absq ] [ + ] 2map-reduce sqrt ; inline
USING: kernel mason.release.dlls ;
USING: definitions editors kernel sequences ;
M: object edit
[ where ] [ first2 edit-location ] [ cannot-find-source ]
?if ;
USING: editors kernel vocabs.loader ;
M: object edit-docs vocab-docs-path 1 edit-location ;
USING: editors kernel vocabs.files ;
M: object edit-tests vocab-tests-path 1 edit-location ;
M: object editor-detached? t ;
M: object editor-is-child? f ;
M: object effect>string drop "object" ;
M: object effect>type drop object ;
M: object emit-value emit-scalar ;
USING: containers kernel math ;
M: object empty? count zero? ; inline
USING: io.encodings kernel sequences ;
M: object encode-string [ encode-char ] 2curry each ; inline
USING: io.encodings.utf16.private kernel sequences ;
M: object encode-string-utf16be [ char>utf16be ] curry each
; inline
USING: io.encodings.utf16.private kernel sequences ;
M: object encode-string-utf16le [ char>utf16le ] curry each
; inline
USING: io.encodings.utf8.private kernel sequences ;
M: object encode-string-utf8 [ char>utf8 ] curry each ; inline
M: object end-game-world drop ;
USING: compiler.tree.propagation.info kernel ;
M: object equal? 2drop f ; inline
USING: kernel source-files.errors ;
USING: kernel ui.tools.debugger ;
M: object error-in-debugger? drop f ;
USING: combinators continuations kernel namespaces ;
M: object error-in-thread
thread-error-hook get-global ( error thread -- * )
call-effect ;
USING: kernel source-files.errors ;
USING: debugger kernel prettyprint ;
USING: accessors combinators io.backend.unix io.sockets.private
io.sockets.unix kernel libc unix.ffi ;
M: object establish-connection
2dup [ handle>> handle-fd ] [ make-sockaddr/size ] bi*
connect 0 =
[ 2drop ] [
errno {
{ EINTR [ establish-connection ] }
{ EINPROGRESS [ drop wait-to-connect ] }
[ (throw-errno) ]
} case
] if ;
USING: continuations db destructors kernel ;
M: object execute-statement*
[ drop query-results dispose ] 2curry
[ parse-db-error rethrow ] recover ;
USING: kernel macros.expander ;
M: object expand-macros* literal ;
USING: compiler.cfg.gvn.testing kernel prettyprint ;
USING: cpu.x86.assembler.operands.private kernel ;
USING: furnace.syndication kernel ;
M: object feed-entry-description drop f ;
USING: accessors calendar.format combinators kernel math.parser
tools.files tools.files.private ;
M: object file-spec>string
{
{ +file-name+ [ directory-entry>> name>> ] }
{ +directory-or-size+ [ file-info>> dir-or-size ] }
{ +file-size+ [ file-info>> size>> number>string ] }
{ +file-date+ [ file-info>> modified>> listing-date ] }
{ +file-time+ [ file-info>> modified>> listing-time ] }
{
+file-datetime+
[ file-info>> modified>> timestamp>ymdhms ]
}
[ unknown-file-spec ]
} case ;
USING: kernel ui.gadgets.tables ;
M: object filled-column drop f ;
M: object final-class? drop f ;
USING: editors.aquamacs kernel ;
M: object find-aquamacs-path f ;
USING: editors.atom io.standard-paths kernel ;
M: object find-atom "atom" ?find-in-path ;
USING: editors.cudatext kernel ;
M: object find-cudatext-path f ;
USING: editors.emacs io.standard-paths kernel ;
M: object find-emacsclient "emacsclient" ?find-in-path ;
USING: io.standard-paths kernel ;
M: object find-in-standard-login-path* find-in-path* ;
USING: editors.pulsar io.standard-paths kernel ;
M: object find-pulsar "pulsar" ?find-in-path ;
USING: editors.sublime kernel ;
M: object find-sublime-path f ;
USING: editors.textadept kernel ;
M: object find-textadept-path f ;
USING: kernel opengl.textures ;
M: object fix-internal-component-order ;
USING: alien.c-types arrays compiler.cfg.builder.alien.boxing
cpu.architecture kernel layouts math ;
M: object flatten-struct-type
heap-size cell align cell /i { int-rep f f }
record-reg-reps ;
USING: compiler.cfg.builder.alien.boxing kernel ;
M: object flatten-struct-type-return flatten-struct-type ;
USING: arrays editors.focus kernel ;
M: object focus-command focus-path nip swap 2array ;
M: object focusable-child* drop f ;
M: object fp-infinity? drop f ; inline
M: object fp-nan? drop f ; inline
M: object fp-qnan? drop f ; inline
M: object fp-snan? drop f ; inline
M: object fp-special? drop f ; inline
USING: fuel.pprint kernel prettyprint ;
M: object fuel-pprint pprint ; inline
USING: benchmark.dispatch3 kernel ;
USING: accessors classes kernel sequences ui.gadgets.panes ;
M: object gadget-alt-text class-of name>> "( " " )" surround ;
M: object generate-question generator-needs-reponse-type ;
M: object gesture>string drop f ;
M: object guess-decoded-length drop ; inline
M: object guess-encoded-length drop ; inline
USING: combinators kernel ui.gestures ;
M: object handle-gesture
[ nip ] [ get-gesture-handler ] 2bi dup
[ ( gadget -- ) call-effect f ] [ 2drop t ] if ;
M: object handle-message drop ;
M: object handle-message drop ;
M: object handle-message drop ;
M: object handles-gesture? get-gesture-handler >boolean ;
M: object hashcode* 2drop 0 ; inline
USING: kernel math math.functions math.vectors sequences ;
M: object hdot [ conjugate * ] [ + ] 2map-reduce ; inline
USING: calendar.holidays calendar.holidays.private combinators
kernel sequences ;
M: object holidays
(holidays)
[ [ clone ] dip ( timestamp -- timestamp ) execute-effect ]
with map ;
M: object home "" resource-path ;
USING: kernel punycode sequences splitting ;
M: object idna>
"." split [ "xn--" ?head [ punycode> ] when ] map "." join ;
USING: combinators cpu.architecture kernel layouts math ;
M: object immediate-comparand?
{
{ [ dup fixnum? ] [ tag-fixnum immediate-arithmetic? ] }
{ [ dup not ] [ drop t ] }
[ drop f ]
} cond ;
USING: kernel stack-checker.errors stack-checker.known-words ;
M: object infer-call* \ call bad-macro-input ;
USING: combinators.smart kernel ;
M: object infer-known* drop f ;
USING: furnace.sessions kernel ;
M: object init-session* drop ;
M: object init-user-profile drop ;
USING: compiler.cfg.intrinsics.simd.backend kernel ;
M: object insn-available? drop t ;
M: object instance-check-quot
[ predicate-def [ dup ] prepose ] keep
[ bad-slot-value ] curry [ unless ] curry compose ;
USING: kernel xml.syntax.private ;
M: object interpolate-item [ swap ] curry ;
USING: kernel math.order sorting.quick ;
M: object inv-sort! [ <=> ] inv-sort-with! ;
USING: assocs kernel sorting ;
M: object inv-sort-keys >alist inv-sort-keys ;
USING: assocs kernel sorting ;
M: object inv-sort-values >alist inv-sort-values ;
M: object inverse undo-literal ;
USING: kernel tools.crossref.private ;
M: object irrelevant? drop f ;
USING: ascii kernel sequences ui.gestures ;
M: object keysym>string dup length 1 = [ >lower ] when ;
USING: kernel stack-checker.values ;
M: object known>callable drop \ _ ;
USING: io.streams.limited kernel ;
USING: furnace.utilities kernel ;
M: object load-image* stream>image ;
USING: alien.c-types alien.data combinators kernel
openal.alut.backend openal.alut.other ;
M: object load-wav-file
0 int f void* 0 int 0 int
[ 0 char alutLoadWAVFile ] 4keep {
[ int deref ]
[ void* deref ]
[ int deref ]
[ int deref ]
} spread ;
USING: kernel locals.rewrite quotations ;
M: object localize 1quotation ;
USING: kernel math math.functions ;
M: object log1+ 1 + log ; inline
USING: assocs kernel namespaces vocabs ;
M: object lookup-vocab vocab-name dictionary get at ;
USING: assocs kernel mirrors ui.tools.inspector ;
M: object make-slot-descriptions
make-mirror [ ] { } assoc>map ;
USING: io.sockets.private kernel ;
M: object make-sockaddr-outgoing make-sockaddr ;
M: object max [ after? ] most ; inline
M: object min [ before? ] most ; inline
M: object model-changed 2drop ;
USING: accessors kernel sequences ui.gestures ;
M: object modifiers>string [ name>> ] map "" concat-as ;
USING: furnace.utilities kernel ;
M: object modify-form drop f ;
USING: furnace.utilities kernel ;
USING: furnace.utilities kernel ;
M: object modify-redirect-query drop ;
USING: accessors assocs io.files.info kernel ;
M: object mount-points
file-systems [ [ mount-point>> ] keep ] H{ } map>assoc ;
USING: kernel math math.vectors sequences ;
M: object n*v [ * ] with map ; inline
USING: kernel math math.vectors sequences ;
M: object n+v [ + ] with map ; inline
USING: kernel math math.vectors sequences ;
M: object n-v [ - ] with map ; inline
USING: kernel math math.vectors sequences ;
M: object n/v [ / ] with map ; inline
USING: kernel math.functions math.vectors sequences ;
M: object n^v [ ^ ] with map ; inline
USING: binary-search kernel math.order ;
M: object natural-search [ <=> ] with search ;
USING: kernel smalltalk.compiler.return ;
M: object need-return-continuation? drop f ;
USING: arrays kernel sequences ;
M: object new-sequence drop 0 ; inline
USING: compiler.cfg.builder.alien.params cpu.architecture kernel
namespaces sequences ;
M: object next-reg-param
nip [ ?dummy-stack-params ] [ ?dummy-int-params ] bi
float-regs get pop ;
M: object nfa-node modify-class add-simple-entry ;
M: object noise drop { 0 0 } ;
USING: kernel math math.functions math.vectors sequences ;
M: object norm-sq [ absq ] [ + ] map-reduce ; inline
USING: classes.algebra.private kernel ;
USING: io.backend io.pathnames kernel ;
M: object normalize-path absolute-path ;
USING: kernel math.combinatorics.private ;
M: object nths-unsafe (nths-unsafe) ;
USING: cpu.x86.assembler.operands.private kernel ;
M: object operand-64? drop f ;
USING: accessors images.bitmap io kernel math ;
M: object parse-color-data*
dup image-size>> [ 0 ] unless* dup 0 >
[ nip ] [ drop color-index-length ] if read >>color-index ;
USING: ascii crontab kernel sequences ;
M: object parse-crontab
[ [ blank? not ] find nip { f 35 } member? ] reject
[ parse-cronentry ] map ;
USING: gitignore globs kernel sequences splitting unicode ;
M: object parse-gitignore
[ [ blank? ] trim ] map harvest [ "#" head? ] reject [
"!" ?head [
"\\#" ?head [ "#" prepend ] when "\\!" ?head
[ "!" prepend ] when 47 over but-last-slice index
[ "**/" prepend ] unless
] dip
] map ;
M: object parse-rdata drop read ;
USING: kernel ui.clipboards ui.gestures ;
M: object paste-clipboard
clipboard-contents [ swap user-input ] [ drop ] if* ;
M: object pen-background 2drop f ;
M: object pen-foreground 2drop f ;
M: object pen-pref-dim 2drop { 0 0 } ;
M: object pointer-string drop f ;
USING: kernel tools.image.analyzer.references ;
M: object pointers 3drop { } ;
USING: kernel prettyprint.custom ;
M: object pprint* pprint-object ;
USING: json json.prettyprint.private kernel ;
M: object pprint-json* write-json ;
USING: kernel prettyprint.custom ;
M: object pprint-narrow? drop f ;
USING: kernel prettyprint.backend prettyprint.custom
prettyprint.sections ;
M: object pprint-object
[
<flow dup pprint-delims [
pprint-word dup pprint-narrow? <inset
>pprint-sequence pprint-elements block>
] dip pprint-word block>
] check-recursion ;
M: object predicate-def [ instance? ] curry ;
USING: accessors kernel libclang ;
M: object print-deferred
type>> ?lookup-type [ def>out-forms ] when* ;
USING: io kernel present rdap.private sequences ;
M: object print-rdap-nested
present
[ 2drop ] [ [ ": " [ write ] tri@ ] dip print ] if-empty ;
USING: irc.client.internals kernel ;
M: object process-message drop ;
USING: io io.styles kernel listener namespaces sequences ;
M: object prompt.
nip [ prompt-style get-global format bl ] unless-empty ;
USING: kernel ui.gadgets.tables ;
M: object prototype-row drop { "" } ;
M: object ptx-element-label drop f ;
M: object ptx-semicolon? drop t ;
USING: kernel make present xml.syntax.private ;
M: object push-item present , ;
USING: accessors kernel math math.order math.statistics.running
;
M:: object push-value ( stats x -- stats )
stats dup n>> zero?
[ x >>min x >>max ]
[ [ x min ] change-min [ x max ] change-max ] if
[ 1 + dup ] change-n swap :> n [ x + ] change-sum
x over mom1>> - :> delta delta n /f
:> delta_n delta_n sq :> delta_n2 delta delta_n * n 1 - *
:> term1 [
term1 delta_n2 * n sq 3 n * - 3 + * 6 delta_n2 *
stats mom2>> * + 4 delta_n * stats mom3>> * - +
] change-mom4
[ term1 delta_n * n 2 - * 3 delta_n * stats mom2>> * - + ]
change-mom3 [ term1 + ] change-mom2
[ delta_n + ] change-mom1 ;
USING: kernel math.quaternions math.vectors ;
M: object qconjugate { 1 -1 -1 -1 } v* ; inline
USING: kernel tools.crossref.private ;
M: object random-32* not-a-random-generator ;
M: object random-bytes* not-a-random-generator ;
USING: accessors arrays kernel kernel.private slots
slots.private words ;
M: object reader-quot
nip [ offset>> [ slot ] curry ] [ class>> ] bi
dup object bootstrap-word eq?
[ drop ] [ 1array [ declare ] curry compose ] if ;
USING: combinators game.loop.private kernel ;
M: object record-benchmarking ( loop -- ) call-effect ;
USING: alien.prettyprint.private kernel ;
M: object record-pointer drop ;
M: object relative-path relative-path* ;
USING: io.sockets.private io.sockets.unix kernel unix.ffi ;
M: object remote>handle
[ protocol-family SOCK_STREAM ] [ protocol ] bi socket-fd
[ init-client-socket ] [ ?bind-client ] [ ] tri ;
M: object remove-read-only drop ;
M: object resize-window 2drop ;
M: object resolve-localhost
ipv6-supported?
{ T{ ipv4 { host "0.0.0.0" } } T{ ipv6 { host "::" } } }
{ T{ ipv4 { host "0.0.0.0" } } } ? ;
USING: io.backend io.pathnames kernel ;
M: object resolve-symlinks normalize-path ;
USING: kernel locals.rewrite make ;
M: object rewrite-closures* , ;
USING: kernel locals.rewrite make ;
USING: kernel locals.rewrite ;
M: object rewrite-literal? drop f ;
USING: kernel locals.rewrite make ;
USING: io.pathnames kernel sequences ;
M: object root-directory?
[ f ] [ [ path-separator? ] all? ] if-empty ;
M: object root-path root-path* ;
USING: kernel ui.gadgets.tables ;
USING: kernel ui.gadgets.tables ;
M: object row-summary row-value ;
USING: kernel ui.gadgets.tables ;
USING: kernel ui.gadgets.tables ;
M: object row-value? drop eq? ;
M: object run-multiple-choice-quiz
[ 1array ] dip run-multiple-choice-quiz ;
USING: accessors destructors io.launcher io.pipes.private kernel
;
M: object run-pipeline-element
[ >process swap >>stdout swap >>stdin run-detached ] [
[ drop [ [ &dispose drop ] when* ] bi@ ]
with-destructors
] 3bi wait-for-process ;
M: object run-quiz 1array run-quiz ;
USING: compiler.tree.propagation.constraints kernel ;
USING: definitions kernel namespaces prettyprint
prettyprint.backend prettyprint.config prettyprint.sections see
see.private ;
M: object see*
[
12 nesting-limit set 100 length-limit set
<colon dup synopsis*
<block dup definition pprint-elements
block> dup definer nip [ pprint-word ] when*
declarations. block>
] with-use ;
M: object selected-vectors drop { } ;
USING: kernel math smalltalk.selectors ;
USING: kernel math smalltalk.selectors ;
USING: kernel math smalltalk.selectors ;
USING: kernel math smalltalk.selectors ;
USING: kernel math smalltalk.selectors ;
USING: kernel math smalltalk.selectors ;
M: object selector-<= swap <= ;
USING: kernel smalltalk.selectors ;
USING: kernel math smalltalk.selectors ;
USING: kernel math smalltalk.selectors ;
M: object selector->= swap >= ;
USING: kernel present smalltalk.selectors ;
M: object selector-asString present ;
USING: combinators kernel sequences smalltalk.ast
smalltalk.selectors ;
M:: object selector-do: ( quot receiver -- result )
receiver [ quot ( elt -- result ) call-effect drop ] each
nil ;
USING: combinators kernel smalltalk.ast smalltalk.selectors ;
M: object selector-ifFalse:
[ drop nil ] [ ( -- result ) call-effect ] if ;
USING: combinators kernel smalltalk.ast smalltalk.selectors ;
M: object selector-ifTrue:
[ ( -- result ) call-effect ] [ drop nil ] if ;
USING: combinators kernel smalltalk.selectors ;
M: object selector-ifTrue:ifFalse:
[ drop ( -- result ) call-effect ]
[ nip ( -- result ) call-effect ] if ;
USING: kernel smalltalk.ast smalltalk.selectors ;
M: object selector-isNil nil eq? ;
USING: kernel math.order smalltalk.selectors ;
USING: kernel math.order smalltalk.selectors ;
USING: kernel smalltalk.selectors ;
USING: kernel smalltalk.selectors ;
M: object selector-nextPutAll: selector-print: ;
USING: io kernel smalltalk.ast smalltalk.selectors ;
M: object selector-nl stream-nl nil ;
USING: io kernel present smalltalk.selectors ;
M: object selector-print dup present print ;
USING: io kernel present smalltalk.ast smalltalk.selectors ;
M: object selector-print: [ present ] dip stream-print nil ;
USING: kernel smalltalk.selectors ;
M: object selector-tab " " swap selector-print: ;
USING: combinators kernel smalltalk.selectors tools.time ;
M: object selector-time
[ ( -- result ) call-effect ] curry time ;
USING: kernel ranges smalltalk.selectors ;
M: object selector-to: swap [a..b] ;
USING: combinators kernel ranges sequences smalltalk.ast
smalltalk.selectors ;
M:: object selector-to:do: ( to quot from -- result )
from to [a..b]
[ quot ( i -- result ) call-effect drop ] each nil ;
USING: combinators kernel smalltalk.selectors ;
M: object selector-value ( -- result ) call-effect ;
USING: combinators kernel smalltalk.selectors ;
M: object selector-value: ( input -- result ) call-effect ;
USING: combinators kernel smalltalk.selectors ;
M: object selector-value:value:
( input input -- result ) call-effect ;
USING: combinators kernel smalltalk.selectors ;
M: object selector-value:value:value:
( input input input -- result ) call-effect ;
USING: combinators kernel smalltalk.selectors ;
M: object selector-value:value:value:value:
( input input input input -- result ) call-effect ;
USING: assocs help.topics kernel namespaces ;
M: object set-article-parent article-xref get set-at ;
USING: kernel prettyprint.sections ;
M: object short-section? section-fits? ;
USING: kernel mason.release.sign ;
USING: kernel mason.release.sign ;
USING: kernel math.vectors.simd ;
M: object simd-element-type drop f ;
USING: kernel math.vectors.simd ;
USING: kernel prettyprint smalltalk.printer ;
M: object smalltalk>string unparse-short ;
USING: kernel sequences tools.crossref tools.crossref.private ;
M: object smart-usage usage [ irrelevant? ] reject ;
USING: kernel math.order sorting.quick ;
M: object sort! [ <=> ] sort-with! ;
USING: assocs kernel sorting ;
M: object sort-keys >alist sort-keys ;
USING: assocs kernel sorting ;
M: object sort-values >alist sort-values ;
USING: kernel present text-to-speech ;
M: object speak present speak-text ;
M: object specializer-declaration class-of ;
M: object specializer-predicate [ eq? ] curry ;
USING: io.sockets.secure kernel ;
M: object ssl-certificate-verification-supported? f ;
USING: io.sockets.secure kernel ;
M: object stream-read-quot V{ } clone read-quot-loop ;
M: object strerror strerror_unsafe ;
USING: kernel math sequences ;
M: object sum 0 [ + ] binary-reduce ; inline
USING: kernel math sequences ;
M: object sum-lengths 0 [ length + ] reduce ;
USING: kernel math.functions math.statistics sequences ;
M: object sum-of-cubes [ 3 ^ ] map-sum ;
USING: kernel math.functions math.statistics sequences ;
M: object sum-of-quads [ 4 ^ ] map-sum ;
USING: kernel math math.statistics sequences ;
M: object sum-of-squares [ sq ] map-sum ;
M: object summary object-summary ;
USING: formatting kernel sequences terminfo ;
M: object terminfo-relative-path
[ first ] keep "%c/%s" sprintf ;
USING: cpu.architecture kernel ;
M: object test-instruction? f ;
USING: combinators.private kernel kernel.private ;
M: object throw
ERROR-HANDLER-QUOT special-object [ die ] or
( error -- * ) call-effect-unsafe ;
M: object tick-game-world drop ;
M: object tuple-summary object-summary ;
M: object ui-backend-available? f ;
USING: accessors io.ports kernel ;
M: object underlying-handle underlying-port handle>> ;
M: object unordered? 2drop f ;
USING: kernel shapefiles.private ;
M: object update-bounds drop ;
USING: furnace.auth furnace.redirection kernel urls ;
M: object user-registered 2drop URL" %24realm" ;
USING: kernel tools.crossref ;
USING: kernel locals.rewrite ;
USING: kernel math math.vectors sequences ;
M: object v* [ * ] 2map ; inline
USING: kernel math math.vectors math.vectors.private sequences ;
M: object v*hs+ [ * ] 2map (h+) ; inline
USING: kernel math math.vectors sequences ;
M: object v*n [ * ] curry map ; inline
USING: kernel math math.vectors sequences ;
M: object v+ [ + ] 2map ; inline
USING: kernel math math.vectors sequences ;
M: object v+-
[ t ] 2dip [ [ not ] 2dip pick [ + ] [ - ] if ] 2map nip ;
inline
USING: kernel math math.vectors sequences ;
M: object v+n [ + ] curry map ; inline
USING: kernel math math.vectors sequences ;
M: object v- [ - ] 2map ; inline
USING: kernel math math.vectors sequences ;
M: object v-n [ - ] curry map ; inline
USING: kernel math math.vectors sequences ;
M: object v/ [ / ] 2map ; inline
USING: kernel math math.vectors sequences ;
M: object v/n [ / ] curry map ; inline
USING: kernel math math.vectors sequences ;
M: object v< [ < ] 2map ; inline
USING: kernel math math.vectors sequences ;
M: object v<= [ <= ] 2map ; inline
USING: kernel math.vectors sequences ;
M: object v= [ = ] 2map ; inline
USING: kernel math math.vectors sequences ;
M: object v> [ > ] 2map ; inline
USING: kernel math math.vectors sequences ;
M: object v>= [ >= ] 2map ; inline
M: object v? [ vand ] [ vandn ] bi-curry* bi vor ; inline
USING: kernel math.functions math.vectors sequences ;
M: object v^ [ ^ ] 2map ; inline
USING: kernel math.functions math.vectors sequences ;
M: object v^n [ ^ ] curry map ; inline
USING: kernel math math.vectors sequences ;
M: object vabs [ abs ] map ; inline
USING: assocs help.topics kernel namespaces ;
M: object valid-article? articles get key? ;
USING: kernel math.vectors sequences ;
M: object vall? [ ] all? ; inline
USING: cpu.arm.64.assembler.opcodes kernel ;
USING: kernel math.vectors sequences ;
M: object vand [ and ] 2map ; inline
USING: kernel math.vectors sequences ;
M: object vandn [ [ not ] dip and ] 2map ; inline
USING: kernel math.vectors sequences ;
M: object vany? [ ] any? ; inline
USING: kernel math math.vectors sequences ;
M: object vavg [ + 2 / ] 2map ; inline
USING: kernel math math.vectors sequences ;
M: object vbitand [ bitand ] 2map ; inline
USING: kernel math.vectors math.vectors.private sequences ;
M: object vbitandn [ bitandn ] 2map ; inline
USING: kernel math math.vectors sequences ;
M: object vbitnot [ bitnot ] map ; inline
USING: kernel math math.vectors sequences ;
M: object vbitor [ bitor ] 2map ; inline
USING: kernel math math.vectors sequences ;
M: object vbitxor [ bitxor ] 2map ; inline
USING: kernel math.vectors sequences ;
M:: object vbroadcast ( u n -- v )
u length n u nth u like ; inline
USING: kernel math.vectors sequences ;
M: object vcount [ ] count ; inline
USING: kernel math math.vectors sequences ;
M: object vdot [ * ] [ + ] 2map-reduce ; inline
USING: kernel math math.vectors sequences ;
M: object vlshift [ shift ] curry map ; inline
USING: cpu.architecture kernel ;
USING: kernel math.order math.vectors sequences ;
M: object vmax [ max ] 2map ; inline
USING: assocs kernel math.vectors sequences ;
M: object vmerge [ zip ] keep concat-as ; inline
USING: kernel math.order math.vectors sequences ;
M: object vmin [ min ] 2map ; inline
USING: kernel math math.vectors sequences ;
M: object vneg [ neg ] map ; inline
USING: kernel math.vectors sequences ;
M: object vnone? [ not ] all? ; inline
USING: kernel math.vectors sequences ;
M: object vnot [ not ] map ; inline
M: object vocab-help lookup-vocab vocab-help ;
M: object vocab-main lookup-vocab vocab-main ;
M: object vocab-name check-vocab-name ;
M: object vocab-words-assoc lookup-vocab vocab-words-assoc ;
USING: kernel math.vectors sequences ;
M: object vor [ or ] 2map ; inline
USING: kernel math math.vectors sequences ;
M: object vrshift neg [ shift ] curry map ; inline
USING: kernel math math.vectors sequences ;
M: object vs* [ * ] 2map ; inline
USING: kernel math math.vectors sequences ;
M: object vs+ [ + ] 2map ; inline
USING: kernel math math.vectors sequences ;
M: object vs- [ - ] 2map ; inline
USING: kernel math math.vectors sequences ;
M: object vsad [ - abs ] [ + ] 2map-reduce ; inline
USING: kernel math.vectors sequences ;
M: object vshuffle-elements
over length 0 pad-tail swap [ [ nth ] curry ] keep map-as ;
inline
USING: kernel math.vectors sequences ;
M: object vshuffle2-elements
[ append ] dip vshuffle-elements ; inline
USING: kernel math math.libm math.vectors sequences ;
M: object vsqrt [ >float fsqrt ] map ; inline
USING: kernel math math.vectors sequences ;
M: object vunordered? [ unordered? ] 2map ; inline
USING: kernel math.vectors sequences ;
M: object vxor [ xor ] 2map ; inline
USING: calendar kernel threads x11.io ;
M: object wait-for-display 10 milliseconds sleep ;
M: object where object-where ;
USING: io kernel ui.gadgets.panes ;
M: object write-gadget [ gadget-alt-text ] dip stream-write ;
USING: accessors gml.printer io kernel ;
M: object write-gml "«Object: " write name>> write "»" write ;
USING: accessors kernel sequences slots slots.private ;
M: object writer-quot
nip [
class>> instance-check-quot dup empty?
[ [ dip ] curry ] unless
] [ offset>> [ set-slot ] curry ] bi append ;