! or "library_not_found" as a last resort for better debugging.
: find-library-from-list ( seq -- path/f )
dup [ find-library* ] map-find drop
- [ nip ] [ ?first "library_not_found" or ] if* ;
+ [ ] [ ?first "library_not_found" or ] ?if ;
"alien.libraries.finder." os name>> append require
[
[
dup find-existing-boxed-type
- [ nip ] [ c-type>> defer-c-type ] if*
+ [ ] [ c-type>> defer-c-type ] ?if
]
[ name>> qualified-name ] bi
boxed-info new swap register-type
<PRIVATE
: ipv6-component ( str -- n )
- dup hex> [ nip ] [ bad-ipv6-component ] if* ;
+ dup hex> [ ] [ bad-ipv6-component ] ?if ;
: split-ipv6 ( string -- seq )
":" split CHAR: . over last member? [ unclip-last ] [ f ] if
{ "Infinity" [ 1/0. ] }
{ "-Infinity" [ -1/0. ] }
{ "NaN" [ 0/0. ] }
- [ dup string>number [ nip ] [ not-a-json-number ] if* ]
+ [ dup string>number [ ] [ not-a-json-number ] ?if ]
} case
] dip ;
: cols ( -- n ) 0 nth-row length ;
: skip ( i seq quot -- n )
- over [ find-from drop ] dip swap [ nip ] [ length ] if* ; inline
+ over [ find-from drop ] dip swap [ ] [ length ] ?if ; inline
: first-col ( row# -- n )
! First non-zero column
out>> [
packer '[
_ dup first-unsafe
- [ nip ] [ @ @ [ 0 rot set-nth-unsafe ] keep ] if*
+ [ ] [ @ @ [ 0 rot set-nth-unsafe ] keep ] ?if
]
] keep unpacker compose ;
: cached-wrapped ( paragraph -- wrapped-paragraph )
dup wrapped>>
- [ nip ] [ [ wrap-paragraph dup ] keep wrapped<< ] if* ;
+ [ ] [ [ wrap-paragraph dup ] keep wrapped<< ] ?if ;
: max-line-width ( wrapped-paragraph -- x )
[ width>> ] [ max ] map-reduce ;
M: interactor stream-read-quot ( stream -- quot/f )
dup interactor-yield dup array? [
over interactor-finish try-parse
- [ nip ] [ stream-read-quot ] if*
+ [ ] [ stream-read-quot ] ?if
] [ nip ] if ;
: interactor-operation ( gesture interactor -- ? )
] [
group-struct [ gr_name>> ] [ f ] if*
] if*
- [ nip ] [ number>string ] if* ;
+ [ ] [ number>string ] ?if ;
: group-id ( string -- id/f )
group-struct dup [ gr_gid>> ] when ;
: add-ns ( name -- )
dup space>> dup ns-stack get assoc-stack
- [ nip ] [ nonexist-ns ] if* >>url drop ;
+ [ ] [ nonexist-ns ] ?if >>url drop ;
: push-ns ( hash -- )
ns-stack get push ;
: sha1-benchmark ( -- )
2000000 iota >byte-array sha1 checksum-bytes drop ;
+: sha224-benchmark ( -- )
+ 2000000 iota >byte-array sha-224 checksum-bytes drop ;
+
+: sha256-benchmark ( -- )
+ 2000000 iota >byte-array sha-256 checksum-bytes drop ;
+
+USE: checksums.openssl
+
+: openssl-sha1-benchmark ( -- )
+ 2000000 iota >byte-array openssl-sha1 checksum-bytes drop ;
+
MAIN: sha1-benchmark
EC_KEY_new_by_curve_name dup ssl-error ec-key boa ;
: ec-key-handle ( -- handle )
- ec-key get dup handle>> [ nip ] [ already-disposed ] if* ;
+ ec-key get dup handle>> [ ] [ already-disposed ] ?if ;
DESTRUCTOR: BN_clear_free
GML: baseface ( e0 -- e1 ) base-face>> ;
-GML: nextring ( e0 -- e1 ) dup next-ring>> [ nip ] [ base-face>> ] if* ;
+GML: nextring ( e0 -- e1 ) dup next-ring>> [ ] [ base-face>> ] ?if ;
GML: facenormal ( e0 -- n ) face-normal ;
GML: faceplanedist ( e0 -- d ) face-plane-dist ;
{ } <struct-slot-spec> ;
: shader-filename ( shader/program -- filename )
- dup filename>> [ nip ] [ name>> where first ] if* file-name ;
+ dup filename>> [ ] [ name>> where first ] ?if file-name ;
: numbered-log-line? ( log-line-components -- ? )
{
! ":flogbot2_!~flogbot2@c-50-174-221-28.hsd1.ca.comcast.net JOIN #concatenative-bots"
! The channel>> field is empty and it's in parameters instead.
! This fixes chat> for these kinds of messages.
-M: to-channel chat-name dup channel>> [ nip ] [ parameters>> ?first ] if* ;
+M: to-channel chat-name dup channel>> [ ] [ parameters>> ?first ] ?if ;
GENERIC: chat> ( obj -- chat/f )
M: string chat> irc> chats>> at ;
: parse-decimal ( str -- ratio )
split-decimal [ [ "0" ] when-empty ] bi@
[
- [ dup string>number [ nip ] [ not-an-integer ] if* ] bi@
+ [ dup string>number [ ] [ not-an-integer ] ?if ] bi@
] keep length 10^ / + swap [ neg ] when ;
SYNTAX: DECIMAL: scan-token parse-decimal suffix! ;
[ first2 [ 1quotation ] dip [ swap 2array ] when* ] map 1quotation ;
: expected ( data name -- float )
- dupd of [ nip ] [ values sift sum 1 swap - ] if* ;
+ dupd of [ ] [ values sift sum 1 swap - ] ?if ;
: generate ( # case-probas -- seq )
H{ } clone [
: get-entry ( gadget -- {texture,dims} )
dup cache-key* textures get at
- [ nip ] [ make-entry ] if* ;
+ [ ] [ make-entry ] ?if ;
: get-dims ( gadget -- dims )
get-entry dims>> ;
: load-node ( id -- node ) f <node> select-tuple ;
: node-content ( node -- content )
- dup content>> [ nip ] [ select-tuple content>> ] if* ;
+ dup content>> [ ] [ select-tuple content>> ] ?if ;
: node= ( node node -- ? ) [ id>> ] same? ;
get-menus [ node-content = ] with find nip ;
: ensure-menu ( name -- node )
- dup get-menu [ nip ] [ create-node ] if* ;
+ dup get-menu [ ] [ create-node ] ?if ;
: load-menu ( name -- menu )
get-menu subitem-of-relation get-node-tree-s ;