commit stringlengths 40 40 | old_file stringlengths 4 264 | new_file stringlengths 4 264 | old_contents stringlengths 0 4.24k | new_contents stringlengths 1 5.44k | subject stringlengths 14 778 | message stringlengths 15 9.92k | lang stringclasses 277
values | license stringclasses 13
values | repos stringlengths 5 127k |
|---|---|---|---|---|---|---|---|---|---|
765d36d08236f3205d2c50170617619a69b5f0ae | extra/advice/advice-docs.factor | extra/advice/advice-docs.factor | IN: advice
USING: help.markup help.syntax tools.annotations words ;
HELP: make-advised
{ $values { "word" "a word to annotate in preparation of advising" } }
{ $description "Prepares a word for being advised. This is done by: "
{ $list
{ "Annotating it to call the appropriate words before, around, and aft... | IN: advice
USING: help.markup help.syntax tools.annotations words ;
HELP: make-advised
{ $values { "word" "a word to annotate in preparation of advising" } }
{ $description "Prepares a word for being advised. This is done by: "
{ $list
{ "Annotating it to call the appropriate words before, around, and aft... | Fix markup problem detected by help-lint | Fix markup problem detected by help-lint
| Factor | bsd-2-clause | nicolas-p/factor,tgunr/factor,bpollack/factor,ceninan/factor,bjourne/factor,erg/factor,kingcons/factor,nicolas-p/factor,mrjbq7/factor,slavapestov/factor,ehird/factor,cataska/factor,ceninan/factor,slavapestov/factor,slavapestov/factor,dharmatech/factor,tgunr/factor,dch/factor,kingcons/factor,slavapestov/factor,ehird/fac... |
bf0847a06ef8e4e8a1b09eb1e457b1761db80a5e | basis/io/encodings/string/string-docs.factor | basis/io/encodings/string/string-docs.factor | ! Copyright (C) 2008 Daniel Ehrenberg.
! See http://factorcode.org/license.txt for BSD license.
USING: help.markup help.syntax byte-arrays strings ;
IN: io.encodings.string
ARTICLE: "io.encodings.string" "Encoding and decoding strings"
"Strings can be encoded or decoded to and from byte arrays through an encoding by p... | ! Copyright (C) 2008,2011 Daniel Ehrenberg, Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: byte-arrays help.markup help.syntax io.encodings.string
strings ;
IN: io.encodings.string
ARTICLE: "io.encodings.string" "Encoding and decoding strings"
"Strings can be encoded or decoded to and fr... | Add examples to encode/decode docs. | Add examples to encode/decode docs.
| Factor | bsd-2-clause | erg/factor,mcandre/factor,mcandre/factor,erg/factor,mcandre/factor,erg/factor,erg/factor,erg/factor,mcandre/factor,mcandre/factor,mcandre/factor,erg/factor,mcandre/factor,erg/factor |
f2c67d6ab40d105f7007ce30af406f0a3edd5c18 | basis/io/directories/search/search-tests.factor | basis/io/directories/search/search-tests.factor | USING: combinators.smart io.directories
io.directories.hierarchy io.directories.search io.files
io.files.unique io.pathnames kernel namespaces sequences
sorting strings tools.test ;
IN: io.directories.search.tests
[ t ] [
[
10 [ "io.paths.test" "gogogo" make-unique-file ] replicate
current-temporar... | USING: combinators.smart io.directories
io.directories.hierarchy io.directories.search io.files
io.files.unique io.pathnames kernel namespaces sequences
sorting strings tools.test ;
IN: io.directories.search.tests
[ t ] [
[
10 [ "io.paths.test" "gogogo" make-unique-file ] replicate
current-temporar... | Add two tests for find-up-to-directory, one that finds a file and one that doesn't. | io.directories.search: Add two tests for find-up-to-directory, one that finds a file and one that doesn't.
| Factor | bsd-2-clause | slavapestov/factor,factor/factor,nicolas-p/factor,nicolas-p/factor,factor/factor,slavapestov/factor,tgunr/factor,bpollack/factor,tgunr/factor,AlexIljin/factor,factor/factor,dch/factor,tgunr/factor,AlexIljin/factor,tgunr/factor,AlexIljin/factor,factor/factor,bpollack/factor,nicolas-p/factor,bjourne/factor,bjourne/factor... |
293dc2062c11f9f45ed8001289d24993c48a69cb | basis/specialized-arrays/direct/functor/functor.factor | basis/specialized-arrays/direct/functor/functor.factor | ! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: functors sequences sequences.private kernel words classes
math alien alien.c-types byte-arrays accessors
specialized-arrays ;
IN: specialized-arrays.direct.functor
FUNCTOR: define-direct-array ( T -- )
A' IS ${T}-a... | ! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: functors sequences sequences.private kernel words classes
math alien alien.c-types byte-arrays accessors
specialized-arrays ;
IN: specialized-arrays.direct.functor
FUNCTOR: define-direct-array ( T -- )
A' IS ${T}-a... | Generalize specialized-arrays.direct: it should be able to wrap a byte array | Generalize specialized-arrays.direct: it should be able to wrap a byte array
| Factor | bsd-2-clause | jwmerrill/factor,cataska/factor,erg/factor,kingcons/factor,factor/factor,mcandre/factor,littledan/Factor,mcandre/factor,erg/factor,slavapestov/factor,AlexIljin/factor,sarvex/factor-lang,dharmatech/factor,bjourne/factor,sarvex/factor-lang,mcandre/factor,nicolas-p/factor,sarvex/factor-lang,factor/factor,sarvex/factor-lan... |
c75c4efefd73a599485fa3d9963c0ced0b5739a2 | basis/ui/gadgets/labels/labels-tests.factor | basis/ui/gadgets/labels/labels-tests.factor | USING: accessors tools.test ui.gadgets ui.gadgets.labels ;
IN: ui.gadgets.labels.tests
[ { 119 14 } ] [
<gadget> { 100 14 } >>dim
<gadget> { 14 14 } >>dim
label-on-right { 5 5 } >>gap
pref-dim
] unit-test
| Add unit test for pack pref-dim bug | Add unit test for pack pref-dim bug
| Factor | bsd-2-clause | Keyholder/factor,bpollack/factor,slavapestov/factor,nicolas-p/factor,sarvex/factor-lang,mrjbq7/factor,mrjbq7/factor,mrjbq7/factor,littledan/Factor,mrjbq7/factor,nicolas-p/factor,dch/factor,cataska/factor,jwmerrill/factor,dch/factor,bjourne/factor,cataska/factor,bpollack/factor,slavapestov/factor,kingcons/factor,tgunr/f... | |
7b86f4affad9e13c38dc4211b7aac5f95cccf65b | extra/random/blum-blum-shub/blum-blum-shub-tests.factor | extra/random/blum-blum-shub/blum-blum-shub-tests.factor | USING: kernel math tools.test namespaces random
random.blum-blum-shub alien.c-types sequences splitting
grouping ;
IN: blum-blum-shub.tests
[ 887708070 ] [
T{ blum-blum-shub f 590695557939 811977232793 } clone random-32*
] unit-test
[ 70576473 ] [
T{ blum-blum-shub f 590695557939 811977232793 } clone [
... | USING: kernel math tools.test namespaces random
random.blum-blum-shub alien.c-types sequences splitting
grouping ;
IN: blum-blum-shub.tests
[ 887708070 ] [
T{ blum-blum-shub f 590695557939 811977232793 } clone random-32*
] unit-test
[ 2790910260 ] [
T{ blum-blum-shub f 590695557939 811977232793 } clone [
... | Fix test failure for random number speedup from using be>. | Fix test failure for random number speedup from using be>.
| Factor | bsd-2-clause | erg/factor,erg/factor,mcandre/factor,mcandre/factor,mcandre/factor,mcandre/factor,erg/factor,mcandre/factor,erg/factor,erg/factor,mcandre/factor,erg/factor,mcandre/factor,erg/factor |
31e662043b3c60ea6d2ce903b50834cbf22ad3f9 | basis/xmode/code2html/code2html-tests.factor | basis/xmode/code2html/code2html-tests.factor | IN: xmode.code2html.tests
USING: xmode.code2html xmode.catalog
tools.test multiline splitting memoize
kernel ;
[ ] [ \ (load-mode) reset-memoized ] unit-test
[ ] [
<" <style type="text/css" media="screen" >
* {margin:0; padding:0; border:0;} ">
string-lines "html" htmlize-lines drop
] unit-test | Add unit test for xmode bug discovered by anonymous pastebin user | Add unit test for xmode bug discovered by anonymous pastebin user
| Factor | bsd-2-clause | bjourne/factor,ehird/factor,AlexIljin/factor,erg/factor,tgunr/factor,AlexIljin/factor,littledan/Factor,bpollack/factor,nicolas-p/factor,sarvex/factor-lang,erg/factor,mcandre/factor,seckar/factor,factor/factor,seckar/factor,bjourne/factor,ceninan/factor,slavapestov/factor,factor/factor,seckar/factor,AlexIljin/factor,bjo... | |
9c308ac4c5bc724820812dc4cac9175951b9a5fd | basis/suffix-arrays/suffix-arrays.factor | basis/suffix-arrays/suffix-arrays.factor | ! Copyright (C) 2008 Marc Fauconneau.
! See http://factorcode.org/license.txt for BSD license.
USING: parser kernel arrays math accessors sequences
math.vectors math.order sorting binary-search sets assocs fry ;
IN: suffix-arrays
<PRIVATE
: suffixes ( string -- suffixes-seq )
dup length iota [ tail-slice ] with m... | ! Copyright (C) 2008 Marc Fauconneau.
! See http://factorcode.org/license.txt for BSD license.
USING: parser kernel arrays math accessors sequences
math.vectors math.order sorting binary-search sets assocs fry ;
IN: suffix-arrays
<PRIVATE
: suffixes ( string -- suffixes-seq )
dup length iota [ tail-slice ] with m... | Make suffix arrays prune repeated members before construction | Make suffix arrays prune repeated members before construction
| Factor | bsd-2-clause | nicolas-p/factor,bpollack/factor,bpollack/factor,nicolas-p/factor,mrjbq7/factor,dch/factor,mrjbq7/factor,AlexIljin/factor,slavapestov/factor,mrjbq7/factor,AlexIljin/factor,tgunr/factor,bjourne/factor,AlexIljin/factor,tgunr/factor,factor/factor,sarvex/factor-lang,nicolas-p/factor,sarvex/factor-lang,bjourne/factor,nicola... |
18b5090892e20b5016affc51846340d9e3e52c00 | extra/fuel/fuel-tests.factor | extra/fuel/fuel-tests.factor | ! Copyright (C) 2009 Nicholas Seckar.
! See http://factorcode.org/license.txt for BSD license.
USING: continuations eval fuel fuel.private namespaces tools.test words ;
IN: fuel.tests
: fake-continuation ( -- continuation )
f f f "fake" f <continuation> ;
: make-uses-restart ( -- restart )
"Use the words voca... | Add tests for auto-USING selection | Add tests for auto-USING selection
| Factor | bsd-2-clause | AlexIljin/factor,bpollack/factor,AlexIljin/factor,kingcons/factor,mrjbq7/factor,littledan/Factor,bpollack/factor,erg/factor,sarvex/factor-lang,tgunr/factor,tgunr/factor,bjourne/factor,mcandre/factor,littledan/Factor,slavapestov/factor,erg/factor,dch/factor,bjourne/factor,AlexIljin/factor,AlexIljin/factor,bpollack/facto... | |
969901a73da406b19ecdca35887f571e143bed42 | extra/openal/other/other.factor | extra/openal/other/other.factor | ! Copyright (C) 2007 Chris Double.
! See http://factorcode.org/license.txt for BSD license.
!
IN: openal.other
USING: openal alien.c-types kernel alien alien.syntax shuffle combinators.lib ;
LIBRARY: alut
FUNCTION: void alutLoadWAVFile ( ALbyte* fileName, ALenum* format, void** data, ALsizei* size, ALsizei* f... | ! Copyright (C) 2007 Chris Double.
! See http://factorcode.org/license.txt for BSD license.
!
IN: openal.other
USING: openal.backend alien.c-types kernel alien alien.syntax shuffle combinators.lib ;
LIBRARY: alut
FUNCTION: void alutLoadWAVFile ( ALbyte* fileName, ALenum* format, void** data, ALsizei* size, AL... | Fix openal loading on non-mac platforms | Fix openal loading on non-mac platforms
| Factor | bsd-2-clause | slavapestov/factor,nicolas-p/factor,sarvex/factor-lang,AlexIljin/factor,erg/factor,dch/factor,AlexIljin/factor,dch/factor,slavapestov/factor,cataska/factor,bjourne/factor,mcandre/factor,dharmatech/factor,mrjbq7/factor,mrjbq7/factor,Keyholder/factor,bpollack/factor,mecon/factor,sarvex/factor-lang,slavapestov/factor,litt... |
5edf3ae9837ae32e4c4a4eeca2135a7bd6821481 | basis/macros/expander/expander-tests.factor | basis/macros/expander/expander-tests.factor | IN: macros.expander.tests
USING: macros.expander tools.test math combinators.short-circuit
kernel ;
[ t ] [ 20 [ { [ integer? ] [ even? ] [ 10 > ] } 1&& ] expand-macros call ] unit-test
[ f ] [ 15 [ { [ integer? ] [ even? ] [ 10 > ] } 1&& ] expand-macros call ] unit-test
[ f ] [ 5.0 [ { [ integer? ] [ even? ] [ 10 >... | IN: macros.expander.tests
USING: macros.expander tools.test math combinators.short-circuit
kernel combinators ;
[ t ] [ 20 [ { [ integer? ] [ even? ] [ 10 > ] } 1&& ] expand-macros call ] unit-test
[ f ] [ 15 [ { [ integer? ] [ even? ] [ 10 > ] } 1&& ] expand-macros call ] unit-test
[ f ] [ 5.0 [ { [ integer? ] [ ev... | Fix unit test for macros.expander | Fix unit test for macros.expander
| Factor | bsd-2-clause | nicolas-p/factor,factor/factor,erg/factor,dharmatech/factor,littledan/Factor,sarvex/factor-lang,jwmerrill/factor,cataska/factor,ceninan/factor,jwmerrill/factor,slavapestov/factor,factor/factor,factor/factor,mcandre/factor,ceninan/factor,mrjbq7/factor,sarvex/factor-lang,bpollack/factor,ehird/factor,mcandre/factor,dch/fa... |
83aa8d0d6e437f245e464d6079056da2e5111ab0 | extra/io/unix/linux/linux.factor | extra/io/unix/linux/linux.factor | ! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
IN: io.unix.linux
USING: io.backend io.unix.backend io.unix.launcher io.unix.select
namespaces kernel assocs unix.process ;
TUPLE: linux-io ;
INSTANCE: linux-io unix-io
M: linux-io init-io ( -- )
<select-mx> mx set-global... | ! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
IN: io.unix.linux
USING: io.backend io.unix.backend io.unix.launcher io.unix.select
namespaces kernel assocs unix.process init ;
TUPLE: linux-io ;
INSTANCE: linux-io unix-io
M: linux-io init-io ( -- )
<select-mx> mx set-g... | Fix wait loop bug (fixed by Slava) | Fix wait loop bug (fixed by Slava)
| Factor | bsd-2-clause | AlexIljin/factor,tgunr/factor,dch/factor,sarvex/factor-lang,bpollack/factor,AlexIljin/factor,bpollack/factor,factor/factor,mecon/factor,dch/factor,bpollack/factor,jwmerrill/factor,mrjbq7/factor,littledan/Factor,cataska/factor,dch/factor,AlexIljin/factor,jwmerrill/factor,erg/factor,Keyholder/factor,ceninan/factor,seckar... |
5579de1722a1490a45a6e069069aafd5420fdac0 | extra/graphics/bitmap/bitmap-tests.factor | extra/graphics/bitmap/bitmap-tests.factor | USING: graphics.bitmap ;
IN: graphics.bitmap.tests
: test-bitmap24 ( -- )
"resource:extra/graphics/bitmap/test-images/thiswayup24.bmp" bitmap. ;
: test-bitmap8 ( -- )
"resource:extra/graphics/bitmap/test-images/rgb8bit.bmp" bitmap. ;
: test-bitmap4 ( -- )
"resource:extra/graphics/bitmap/test-images/rgb4b... | USING: graphics.bitmap graphics.viewer ;
IN: graphics.bitmap.tests
: test-bitmap24 ( -- )
"resource:extra/graphics/bitmap/test-images/thiswayup24.bmp" bitmap. ;
: test-bitmap8 ( -- )
"resource:extra/graphics/bitmap/test-images/rgb8bit.bmp" bitmap. ;
: test-bitmap4 ( -- )
"resource:extra/graphics/bitmap/t... | Fix load error in graphics.bitmap tests | Fix load error in graphics.bitmap tests
| Factor | bsd-2-clause | mcandre/factor,bpollack/factor,mrjbq7/factor,ehird/factor,mrjbq7/factor,seckar/factor,mcandre/factor,slavapestov/factor,bpollack/factor,factor/factor,Keyholder/factor,jwmerrill/factor,AlexIljin/factor,ehird/factor,cataska/factor,kingcons/factor,tgunr/factor,mcandre/factor,littledan/Factor,bjourne/factor,nicolas-p/facto... |
97100134603327cee1314f867f9511b98eb4088c | extra/oauth/oauth-tests.factor | extra/oauth/oauth-tests.factor | USING: oauth oauth.private tools.test accessors kernel assocs
strings namespaces ;
IN: oauth.tests
[ "%26&b" ] [ "&" "b" hmac-key ] unit-test
[ "%26&" ] [ "&" f hmac-key ] unit-test
[ "B&http%3A%2F%2Ftwitter.com&a%3Db" ] [
"http://twitter.com"
"B"
{ { "a" "b" } }
signature-base-string
] unit-test
[ "... | USING: oauth oauth.private tools.test accessors kernel assocs
strings namespaces urls ;
IN: oauth.tests
[ "%26&b" ] [ "&" "b" hmac-key ] unit-test
[ "%26&" ] [ "&" f hmac-key ] unit-test
[ "B&http%3A%2F%2Ftwitter.com%2F&a%3Db" ] [
URL" http://twitter.com"
"B"
{ { "a" "b" } }
signature-base-string
] un... | Fix tests. Twitter API tolerates the extra ``/`` at the end of ``twitter.com``, so leave it in. | oauth: Fix tests. Twitter API tolerates the extra ``/`` at the end of ``twitter.com``, so leave it in.
| Factor | bsd-2-clause | sarvex/factor-lang,slavapestov/factor,factor/factor,tgunr/factor,slavapestov/factor,slavapestov/factor,bjourne/factor,AlexIljin/factor,mrjbq7/factor,nicolas-p/factor,tgunr/factor,bpollack/factor,dch/factor,bjourne/factor,nicolas-p/factor,factor/factor,AlexIljin/factor,dch/factor,factor/factor,bpollack/factor,mrjbq7/fac... |
22402a2e07d588fe784f35e9fa32f17227b04469 | basis/io/standard-paths/windows/windows.factor | basis/io/standard-paths/windows/windows.factor | ! Copyright (C) 2011 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: arrays assocs environment fry
io.directories.search.windows io.files io.pathnames
io.standard-paths kernel sequences splitting system
unicode.case ;
IN: io.standard-paths.windows
M: windows find-in-applications
'[ [ ... | ! Copyright (C) 2011 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: environment fry io.directories.search.windows io.files
io.pathnames io.standard-paths kernel sequences splitting
system unicode.case ;
IN: io.standard-paths.windows
M: windows find-in-applications
'[ [ >lower _ tail?... | Revert "io.standard-paths: adding support for PATHEXT." | Revert "io.standard-paths: adding support for PATHEXT."
This reverts commit be9bff0e5bc77e3998bfc92257dcee9d8ee5728b.
| Factor | bsd-2-clause | bpollack/factor,nicolas-p/factor,bjourne/factor,bpollack/factor,AlexIljin/factor,AlexIljin/factor,slavapestov/factor,mrjbq7/factor,tgunr/factor,tgunr/factor,bpollack/factor,AlexIljin/factor,tgunr/factor,AlexIljin/factor,slavapestov/factor,tgunr/factor,bjourne/factor,nicolas-p/factor,factor/factor,factor/factor,nicolas-... |
bd2d78b6b19b3ba8d336d98000df2829f7cc42e8 | basis/furnace/alloy/alloy.factor | basis/furnace/alloy/alloy.factor | ! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: kernel sequences db.tuples alarms calendar db fry
furnace.db
furnace.cache
furnace.asides
furnace.referrer
furnace.sessions
furnace.conversations
furnace.auth.providers
furnace.auth.login.permits ;
IN: furnace.alloy
: st... | ! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: kernel sequences db.tuples alarms calendar db fry
furnace.db
furnace.cache
furnace.asides
furnace.sessions
furnace.conversations
furnace.auth.providers
furnace.auth.login.permits ;
IN: furnace.alloy
: state-classes { ses... | Disable referrer checking by default since adblock doesn't send it for some lame reason | Disable referrer checking by default since adblock doesn't send it for some lame reason
| Factor | bsd-2-clause | factor/factor,sarvex/factor-lang,dharmatech/factor,AlexIljin/factor,dharmatech/factor,bjourne/factor,seckar/factor,mrjbq7/factor,bjourne/factor,jwmerrill/factor,dharmatech/factor,bjourne/factor,kingcons/factor,sarvex/factor-lang,slavapestov/factor,tgunr/factor,kingcons/factor,mrjbq7/factor,erg/factor,mcandre/factor,ehi... |
bea4d80a33fb213692fbfe61add0046d862891d7 | basis/specialized-arrays/double/double.factor | basis/specialized-arrays/double/double.factor | USE: specialized-arrays.functor
IN: specialized-arrays.double
<< "double" define-array >> | USE: specialized-arrays.functor
IN: specialized-arrays.double
<< "double" define-array >>
! Specializer hints. These should really be generalized, and placed
! somewhere else
USING: hints math.vectors arrays kernel math accessors sequences ;
HINTS: <double-array> { 2 } { 3 } ;
HINTS: vneg { array } { double-array }... | Add specialization hints from old float-arrays. These will be replaced with a better facility soon | Add specialization hints from old float-arrays. These will be replaced with a better facility soon
| Factor | bsd-2-clause | erg/factor,tgunr/factor,dch/factor,AlexIljin/factor,slavapestov/factor,factor/factor,mcandre/factor,erg/factor,tgunr/factor,cataska/factor,bjourne/factor,kingcons/factor,littledan/Factor,slavapestov/factor,dharmatech/factor,bjourne/factor,dch/factor,seckar/factor,littledan/Factor,ceninan/factor,slavapestov/factor,AlexI... |
f2f834a234713f1847cdd489e8d7116b1d1f9644 | extra/hello-world/deploy.factor | extra/hello-world/deploy.factor | USING: tools.deploy.config ;
H{
{ deploy-name "Hello world (console)" }
{ deploy-c-types? f }
{ deploy-word-props? f }
{ deploy-ui? f }
{ deploy-reflection 1 }
{ deploy-compiler? f }
{ deploy-unicode? f }
{ deploy-io 2 }
{ deploy-word-defs? f }
{ deploy-threads? f }
{ "stop-a... | USING: tools.deploy.config ;
H{
{ deploy-unicode? f }
{ deploy-ui? f }
{ deploy-compiler? t }
{ deploy-name "Hello world (console)" }
{ deploy-io 2 }
{ deploy-threads? f }
{ deploy-reflection 1 }
{ deploy-math? f }
{ deploy-word-props? f }
{ deploy-word-defs? f }
{ deploy-c-t... | Deploy hello-world with optimizing compiler since the image is smaller as a result, and this makes it pass the size test again | Deploy hello-world with optimizing compiler since the image is smaller as a result, and this makes it pass the size test again
| Factor | bsd-2-clause | AlexIljin/factor,AlexIljin/factor,mrjbq7/factor,tgunr/factor,slavapestov/factor,nicolas-p/factor,factor/factor,sarvex/factor-lang,slavapestov/factor,AlexIljin/factor,tgunr/factor,mrjbq7/factor,dch/factor,AlexIljin/factor,tgunr/factor,bjourne/factor,factor/factor,bpollack/factor,dch/factor,sarvex/factor-lang,bpollack/fa... |
06fd3243794207ca0e9e1ba4a3f32cfe689fb652 | core/classes/singleton/singleton-tests.factor | core/classes/singleton/singleton-tests.factor | USING: classes.singleton io.streams.string kernel see tools.test ;
IN: classes.singleton.tests
{ } [ SINGLETON: bzzt ] unit-test
{ t } [ bzzt bzzt? ] unit-test
{ t } [ bzzt bzzt eq? ] unit-test
GENERIC: zammo ( obj -- str )
{ } [ M: bzzt zammo drop "yes!" ; ] unit-test
{ "yes!" } [ bzzt zammo ] unit-test
{ } [ SINGLET... | USING: classes.singleton io.streams.string kernel see tools.test ;
IN: classes.singleton.tests
SINGLETON: bzzt
{ t } [ bzzt bzzt? ] unit-test
{ t } [ bzzt bzzt eq? ] unit-test
GENERIC: zammo ( obj -- str )
{ } [ M: bzzt zammo drop "yes!" ; ] unit-test
{ "yes!" } [ bzzt zammo ] unit-test
SINGLETON: omg
{ t } [ omg si... | Move definitions to top level in tests. | singleton: Move definitions to top level in tests.
| Factor | bsd-2-clause | factor/factor,AlexIljin/factor,bpollack/factor,AlexIljin/factor,factor/factor,bpollack/factor,bpollack/factor,AlexIljin/factor,tgunr/factor,factor/factor,mrjbq7/factor,factor/factor,bpollack/factor,AlexIljin/factor,factor/factor,AlexIljin/factor,factor/factor,mrjbq7/factor,bpollack/factor,bpollack/factor,bpollack/facto... |
3a668a9457f132547c1e6d0b5349f52eab9c84ed | basis/alien/destructors/destructors.factor | basis/alien/destructors/destructors.factor | ! Copyright (C) 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: functors destructors accessors kernel parser words ;
IN: alien.destructors
FUNCTOR: define-destructor ( F -- )
F-destructor DEFINES ${F}-destructor
<F-destructor> DEFINES <${F}-destructor>
&F DEFINES &${F}
|F DEFINES |$... | ! Copyright (C) 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: functors destructors accessors kernel parser words ;
IN: alien.destructors
SLOT: alien
FUNCTOR: define-destructor ( F -- )
F-destructor DEFINES ${F}-destructor
<F-destructor> DEFINES <${F}-destructor>
&F DEFINES &${F}
... | Fix bootstrap by adding protocol slot | Fix bootstrap by adding protocol slot
| Factor | bsd-2-clause | bpollack/factor,cataska/factor,tgunr/factor,factor/factor,AlexIljin/factor,ehird/factor,ehird/factor,nicolas-p/factor,erg/factor,bjourne/factor,AlexIljin/factor,mrjbq7/factor,bpollack/factor,erg/factor,bpollack/factor,tgunr/factor,bjourne/factor,AlexIljin/factor,sarvex/factor-lang,mcandre/factor,nicolas-p/factor,sarvex... |
6be25de125e5fe8d116c209b21c73a07b69ce5cf | basis/unix/ffi/ffi-tests.factor | basis/unix/ffi/ffi-tests.factor | IN: unix.ffi.tests
USING: accessors alien.c-types tools.test unix.ffi ;
[ 80 ] [ "http" f getservbyname port>> ntohs ] unit-test
[ "www" ] [
0 "http" f getservbyname aliases>> c-string alien-element
] unit-test
[ "http" ] [ 80 htons f getservbyport name>> ] unit-test
| USING: accessors alien.c-types io.encodings.utf8 kernel
sequences tools.test unix.ffi unix.utilities ;
IN: unix.ffi.tests
[ 80 ] [ "http" f getservbyname port>> ntohs ] unit-test
[ t ] [
0 "http" f getservbyname aliases>> utf8 alien>strings
"www" swap member?
] unit-test
[ "http" ] [ 80 htons f getservbyport... | Use a utility word for getting the aliases back. | unix.ffi: Use a utility word for getting the aliases back.
| Factor | bsd-2-clause | nicolas-p/factor,tgunr/factor,mrjbq7/factor,bpollack/factor,slavapestov/factor,sarvex/factor-lang,factor/factor,nicolas-p/factor,slavapestov/factor,tgunr/factor,nicolas-p/factor,bjourne/factor,factor/factor,slavapestov/factor,bpollack/factor,tgunr/factor,sarvex/factor-lang,dch/factor,dch/factor,nicolas-p/factor,factor/... |
39462dbc94ef31bb08059f896ef5614ec0c8ed65 | extra/lsys/strings/interpret/interpret.factor | extra/lsys/strings/interpret/interpret.factor |
USING: kernel sequences quotations assocs math math.parser
combinators.lib vars lsys.strings combinators.short-circuit ;
IN: lsys.strings.interpret
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
VAR: command-table
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!... |
USING: kernel sequences quotations assocs math math.parser
combinators.lib vars lsys.strings combinators.short-circuit ;
IN: lsys.strings.interpret
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
VAR: command-table
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!... | Fix stack underflow in lsys | Fix stack underflow in lsys
| Factor | bsd-2-clause | bpollack/factor,bjourne/factor,Keyholder/factor,dch/factor,Keyholder/factor,dharmatech/factor,bjourne/factor,factor/factor,jwmerrill/factor,jwmerrill/factor,factor/factor,nicolas-p/factor,AlexIljin/factor,slavapestov/factor,sarvex/factor-lang,slavapestov/factor,cataska/factor,AlexIljin/factor,tgunr/factor,sarvex/factor... |
b19e87ea7587b2842041f6b7fa1237a2fbe20cdd | core/generic/parser/parser.factor | core/generic/parser/parser.factor | ! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: parser kernel words generic namespaces ;
IN: generic.parser
ERROR: not-in-a-method-error ;
: CREATE-GENERIC ( -- word ) CREATE dup reset-word ;
: create-method-in ( class generic -- method )
create-method dup set-w... | ! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: parser kernel words generic namespaces ;
IN: generic.parser
ERROR: not-in-a-method-error ;
: CREATE-GENERIC ( -- word ) CREATE dup reset-word ;
: create-method-in ( class generic -- method )
create-method dup set-w... | Fix corner case where auto-use didn't print using list | Fix corner case where auto-use didn't print using list
| Factor | bsd-2-clause | factor/factor,bpollack/factor,dch/factor,slavapestov/factor,bpollack/factor,ehird/factor,mrjbq7/factor,AlexIljin/factor,mcandre/factor,erg/factor,Keyholder/factor,factor/factor,mcandre/factor,bjourne/factor,bjourne/factor,erg/factor,Keyholder/factor,littledan/Factor,littledan/Factor,factor/factor,AlexIljin/factor,slava... |
8ec486f9a8a552710b8015eaa02142c5fceb86a3 | basis/ui/ui-tests.factor | basis/ui/ui-tests.factor | IN: ui.tests
USING: ui tools.test ;
\ event-loop must-infer
| IN: ui.tests
USING: ui tools.test ;
\ event-loop must-infer
\ open-window must-infer
| Add unit test now that open-window infers | Add unit test now that open-window infers
| Factor | bsd-2-clause | factor/factor,sarvex/factor-lang,AlexIljin/factor,seckar/factor,Keyholder/factor,factor/factor,mcandre/factor,bpollack/factor,dch/factor,slavapestov/factor,kingcons/factor,AlexIljin/factor,jwmerrill/factor,erg/factor,mcandre/factor,factor/factor,bpollack/factor,slavapestov/factor,mcandre/factor,factor/factor,cataska/fa... |
4116d8a1594dfca6e8353947f9073b1e27352ebf | basis/alarms/alarms-tests.factor | basis/alarms/alarms-tests.factor | USING: alarms alarms.private kernel calendar sequences
tools.test threads concurrency.count-downs concurrency.promises
fry tools.time math ;
IN: alarms.tests
[ ] [
1 <count-down>
{ f } clone 2dup
[ first cancel-alarm count-down ] 2curry 1 seconds later
swap set-first
await
] unit-test
... | USING: alarms alarms.private calendar concurrency.count-downs
concurrency.promises fry kernel math math.order sequences
threads tools.test tools.time ;
IN: alarms.tests
[ ] [
1 <count-down>
{ f } clone 2dup
[ first stop-alarm count-down ] 2curry 1 seconds later
swap set-first
await
] uni... | Make the alarm test wait for the promise to be fulfilled instead of returning immediately and failing | Make the alarm test wait for the promise to be fulfilled instead of returning immediately and failing
| Factor | bsd-2-clause | nicolas-p/factor,bjourne/factor,AlexIljin/factor,sarvex/factor-lang,bpollack/factor,sarvex/factor-lang,bpollack/factor,factor/factor,AlexIljin/factor,bjourne/factor,slavapestov/factor,dch/factor,AlexIljin/factor,slavapestov/factor,AlexIljin/factor,tgunr/factor,mrjbq7/factor,slavapestov/factor,bjourne/factor,mrjbq7/fact... |
6553510494dc042f85a282b643978b5aad0a2b46 | extra/lint/lint-tests.factor | extra/lint/lint-tests.factor | USING: io lint kernel math tools.test ;
IN: lint.tests
! Don't write code like this
: lint1 ( obj -- ) [ "hi" print ] [ ] if ; ! when
[ { { lint1 { [ [ ] if ] } } } ] [ \ lint1 lint-word ] unit-test
: lint2 ( n -- n' ) 1 + ; ! 1+
[ { [ 1 + ] } ] [ \ lint2 lint ] unit-test
: lint3 ( a b -- b a b ) dup -rot ; ! tuck
... | USING: io lint kernel math tools.test ;
IN: lint.tests
! Don't write code like this
: lint1 ( obj -- ) [ "hi" print ] [ ] if ; ! when
[ { { lint1 { [ [ ] if ] } } } ] [ \ lint1 lint-word ] unit-test
: lint3 ( a b -- b a b ) dup -rot ; ! tuck
[ { { lint3 { [ dup -rot ] } } } ] [ \ lint3 lint-word ] unit-test
| Remove bogus test in lint | Remove bogus test in lint
| Factor | bsd-2-clause | sarvex/factor-lang,sarvex/factor-lang,sarvex/factor-lang,bjourne/factor,sarvex/factor-lang,bjourne/factor,AlexIljin/factor,slavapestov/factor,bpollack/factor,factor/factor,mrjbq7/factor,bpollack/factor,dch/factor,slavapestov/factor,bpollack/factor,tgunr/factor,sarvex/factor-lang,bpollack/factor,nicolas-p/factor,bjourne... |
305b8e61389abf70d898539202b0a7bca2a96a51 | extra/random/blum-blum-shub/blum-blum-shub-tests.factor | extra/random/blum-blum-shub/blum-blum-shub-tests.factor | USING: kernel math tools.test namespaces random
random.blum-blum-shub ;
IN: blum-blum-shub.tests
[ 887708070 ] [
T{ blum-blum-shub f 590695557939 811977232793 } random-32*
] unit-test
[ 887708070 ] [
T{ blum-blum-shub f 590695557939 811977232793 } [
32 random-bits
] with-random
] unit-test
[ 572... | USING: kernel math tools.test namespaces random
random.blum-blum-shub alien.c-types sequences splitting ;
IN: blum-blum-shub.tests
[ 887708070 ] [
T{ blum-blum-shub f 590695557939 811977232793 } clone random-32*
] unit-test
[ 887708070 ] [
T{ blum-blum-shub f 590695557939 811977232793 } clone [
32 ra... | Fix blum blum shub unit tests on big endian | Fix blum blum shub unit tests on big endian
| Factor | bsd-2-clause | cataska/factor,bjourne/factor,factor/factor,factor/factor,Keyholder/factor,ehird/factor,ehird/factor,mrjbq7/factor,nicolas-p/factor,mrjbq7/factor,erg/factor,littledan/Factor,bpollack/factor,factor/factor,dch/factor,tgunr/factor,dch/factor,jwmerrill/factor,slavapestov/factor,nicolas-p/factor,AlexIljin/factor,slavapestov... |
c8521ad826546d1ab4426e9c5ed59aaf8c12953e | basis/compiler/cfg/linear-scan/debugger/debugger.factor | basis/compiler/cfg/linear-scan/debugger/debugger.factor | ! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors kernel sequences sets arrays
compiler.cfg.linear-scan.live-intervals
compiler.cfg.linear-scan.allocation ;
IN: compiler.cfg.linear-scan.debugger
: check-assigned ( live-intervals -- )
[
reg>>
... | ! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors kernel sequences sets arrays math strings fry
prettyprint compiler.cfg.linear-scan.live-intervals
compiler.cfg.linear-scan.allocation ;
IN: compiler.cfg.linear-scan.debugger
: check-assigned ( live-intervals --... | Add tool to dump live intervals | Add tool to dump live intervals
| Factor | bsd-2-clause | kingcons/factor,cataska/factor,mcandre/factor,slavapestov/factor,mcandre/factor,slavapestov/factor,mcandre/factor,littledan/Factor,nicolas-p/factor,sarvex/factor-lang,jwmerrill/factor,tgunr/factor,erg/factor,nicolas-p/factor,bpollack/factor,mcandre/factor,ehird/factor,dch/factor,erg/factor,kingcons/factor,tgunr/factor,... |
923cb0127abd0f0014b55702f42788f9a5d29852 | basis/ftp/server/server-tests.factor | basis/ftp/server/server-tests.factor | USING: accessors fry ftp.server io.backend io.encodings.ascii
io.files io.pathnames io.servers kernel tools.test urls ;
FROM: ftp.client => ftp-get ;
IN: ftp.server.tests
CONSTANT: test-file-contents "Files are so boring anymore."
: create-test-file ( -- path )
test-file-contents "ftp.server" normalize-path
[... | USING: accessors fry ftp.server io.encodings.ascii io.files
io.pathnames io.servers kernel tools.test urls ;
FROM: ftp.client => ftp-get ;
IN: ftp.server.tests
CONSTANT: test-file-contents "Files are so boring anymore."
: create-test-file ( -- path )
test-file-contents "ftp.server" [ ascii set-file-contents ] kee... | Revert "ftp.server: make sure the test file returns a normalized path." | Revert "ftp.server: make sure the test file returns a normalized path."
This reverts commit fda3024fe96129b81b4fab270ae478d8e705e0b3.
| Factor | bsd-2-clause | mrjbq7/factor,AlexIljin/factor,tgunr/factor,mrjbq7/factor,AlexIljin/factor,tgunr/factor,bpollack/factor,tgunr/factor,bjourne/factor,tgunr/factor,bjourne/factor,factor/factor,AlexIljin/factor,bpollack/factor,mrjbq7/factor,bjourne/factor,bjourne/factor,bpollack/factor,factor/factor,factor/factor,AlexIljin/factor,factor/f... |
7c705c4db4dda412a60a90a046b973eb9a5db00f | basis/images/loader/loader.factor | basis/images/loader/loader.factor | ! Copyright (C) 2009 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: constructors kernel splitting unicode.case combinators
accessors images.bitmap images.tiff images io.pathnames
images.jpeg images.png ;
IN: images.loader
ERROR: unknown-image-extension extension ;
: image-class ( path -... | ! Copyright (C) 2009 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: constructors kernel splitting unicode.case combinators
accessors images.bitmap images.tiff images io.pathnames
images.png ;
IN: images.loader
ERROR: unknown-image-extension extension ;
: image-class ( path -- class )
... | Comment out JPEG code until we figure out if we want default bootstrap to depend on BLAS or not | Comment out JPEG code until we figure out if we want default bootstrap to depend on BLAS or not
| Factor | bsd-2-clause | bjourne/factor,sarvex/factor-lang,nicolas-p/factor,mrjbq7/factor,AlexIljin/factor,sarvex/factor-lang,factor/factor,tgunr/factor,bpollack/factor,mrjbq7/factor,bjourne/factor,AlexIljin/factor,bjourne/factor,nicolas-p/factor,sarvex/factor-lang,bpollack/factor,mrjbq7/factor,dch/factor,bjourne/factor,factor/factor,bjourne/f... |
271e48b930d649842d9e18f2f7d55ad6ecf49154 | extra/tokyo/alien/tcutil/tcutil.factor | extra/tokyo/alien/tcutil/tcutil.factor | USING: kernel alien combinators alien.syntax
alien.c-types
alien.libraries ;
IN: tokyo.alient.tcutil
C-ENUM:
TCDBTHASH
TCDBTBTREE
TCDBTFIXED
TCDBTTABLE ;
! long seems safe enough
TYPEDEF: long time_t
TYPEDEF: void* TCLIST*
FUNCTION: TCLIST* tclistnew ( ) ;
FUNCTION: TCLIST* tclistnew2 ... | USING: kernel alien combinators alien.syntax
alien.c-types
alien.libraries ;
IN: tokyo.alient.tcutil
C-ENUM:
TCDBTHASH
TCDBTBTREE
TCDBTFIXED
TCDBTTABLE ;
! FIXME: on windows 64bits this isn't correct, because long is 32bits there, and time_t is int64
TYPEDEF: long time_t
TYPEDEF: void* ... | Make time_t a long, needs fix for 64bits windows | tokyo.alien: Make time_t a long, needs fix for 64bits windows
| Factor | bsd-2-clause | mcandre/factor,kingcons/factor,erg/factor,mcandre/factor,seckar/factor,kingcons/factor,cataska/factor,mcandre/factor,cataska/factor,erg/factor,kingcons/factor,ceninan/factor,littledan/Factor,ceninan/factor,littledan/Factor,seckar/factor,littledan/Factor,erg/factor,mcandre/factor,mcandre/factor,cataska/factor,seckar/fac... |
2c23d2ac4d7b8257f609b0e65f0439e2ede8ef2b | extra/webapps/irc-log/irc-log.factor | extra/webapps/irc-log/irc-log.factor | ! Copyright (C) 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: calendar kernel http.server.dispatchers prettyprint
sequences printf furnace.actions html.forms accessors
furnace.redirection ;
IN: webapps.irc-log
TUPLE: irclog-app < dispatcher ;
: irc-link ( -- string )
gmt -7... | ! Copyright (C) 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: calendar kernel http.server.dispatchers prettyprint
sequences formatting furnace.actions html.forms accessors
furnace.redirection ;
IN: webapps.irc-log
TUPLE: irclog-app < dispatcher ;
: irc-link ( -- string )
gm... | Update use of old printf vocabulary. | Update use of old printf vocabulary.
| Factor | bsd-2-clause | tgunr/factor,erg/factor,erg/factor,factor/factor,erg/factor,bjourne/factor,mcandre/factor,dch/factor,nicolas-p/factor,tgunr/factor,littledan/Factor,AlexIljin/factor,nicolas-p/factor,ehird/factor,mrjbq7/factor,littledan/Factor,jwmerrill/factor,seckar/factor,tgunr/factor,Keyholder/factor,dch/factor,bjourne/factor,mcandre... |
2f5b706b12dc70e27096b78c3089b70faabba55f | basis/images/loader/loader.factor | basis/images/loader/loader.factor | ! Copyright (C) 2009 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: constructors kernel splitting unicode.case combinators
accessors images.bitmap images.tiff images io.pathnames
images.jpeg images.png ;
IN: images.loader
ERROR: unknown-image-extension extension ;
: image-class ( path -... | ! Copyright (C) 2009 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: constructors kernel splitting unicode.case combinators
accessors images.bitmap images.tiff images io.pathnames
images.png ;
IN: images.loader
ERROR: unknown-image-extension extension ;
: image-class ( path -- class )
... | Comment out JPEG code until we figure out if we want default bootstrap to depend on BLAS or not | Comment out JPEG code until we figure out if we want default bootstrap to depend on BLAS or not
| Factor | bsd-2-clause | cataska/factor,kingcons/factor,erg/factor,cataska/factor,ceninan/factor,erg/factor,mcandre/factor,seckar/factor,kingcons/factor,erg/factor,mcandre/factor,erg/factor,mcandre/factor,mcandre/factor,mcandre/factor,seckar/factor,littledan/Factor,erg/factor,erg/factor,kingcons/factor,kingcons/factor,littledan/Factor,seckar/f... |
c6c23770723f38197183a988cebe6b32a603e335 | basis/io/monitors/freebsd/freebsd.factor | basis/io/monitors/freebsd/freebsd.factor | USING: kernel io.backend io.monitors io.monitors.recursive
io.files io.pathnames io.buffers io.ports io.timeouts
io.backend.unix io.encodings.utf8 assocs namespaces make
sequences locals system destructors accessors o;
IN: io.monitors.freebsd
TUPLE: freebsd-monitor < monitor handle ;
M:: freebsd (monitor) ( path recu... | USING: kernel io.backend io.monitors io.monitors.recursive
io.files io.pathnames io.buffers io.ports io.timeouts
io.backend.unix io.encodings.utf8 assocs namespaces make
sequences locals system destructors accessors ;
IN: io.monitors.freebsd
TUPLE: freebsd-monitor < monitor handle ;
M:: freebsd (monitor) ( path recur... | Fix typo in monitor file | Fix typo in monitor file
| Factor | bsd-2-clause | factor/factor,bpollack/factor,bpollack/factor,tgunr/factor,AlexIljin/factor,mrjbq7/factor,tgunr/factor,tgunr/factor,tgunr/factor,mrjbq7/factor,bpollack/factor,tgunr/factor,tgunr/factor,mrjbq7/factor,bpollack/factor,bpollack/factor,AlexIljin/factor,bpollack/factor,mrjbq7/factor,mrjbq7/factor,AlexIljin/factor,AlexIljin/f... |
7598617119ed9bcb6992e8b2d2e086b1402c4e6e | extra/io/windows/ce/ce.factor | extra/io/windows/ce/ce.factor | USING: io.backend io.windows io.windows.ce.backend
io.windows.ce.files io.windows.ce.sockets io.windows.ce.launcher
namespaces ;
IN: io.windows.ce
T{ windows-ce-io } io-backend set-global
| USING: io.backend io.windows io.windows.ce.backend
io.windows.ce.files io.windows.ce.sockets io.windows.ce.launcher
namespaces io.windows.mmap ;
IN: io.windows.ce
T{ windows-ce-io } io-backend set-global
| Load mmap on CE too | Load mmap on CE too
| Factor | bsd-2-clause | seckar/factor,cataska/factor,littledan/Factor,bpollack/factor,mrjbq7/factor,erg/factor,factor/factor,erg/factor,nicolas-p/factor,mcandre/factor,slavapestov/factor,mcandre/factor,factor/factor,bpollack/factor,bpollack/factor,bjourne/factor,littledan/Factor,bjourne/factor,jwmerrill/factor,kingcons/factor,littledan/Factor... |
a61c0d5f7c1ec5c9c51a24ac4a83c900d9b37da8 | extra/macros/macros.factor | extra/macros/macros.factor | ! Copyright (C) 2007 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: parser kernel sequences words effects inference.transforms
combinators assocs definitions quotations namespaces ;
IN: macros
: (:)
CREATE dup reset-generic parse-definition
over "declared-effect" word-pr... | ! Copyright (C) 2007 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: parser kernel sequences words effects inference.transforms
combinators assocs definitions quotations namespaces ;
IN: macros
: (:)
CREATE dup reset-generic parse-definition
over "declared-effect" word-pr... | Fix definition of macro predicate class | Fix definition of macro predicate class
| Factor | bsd-2-clause | mecon/factor,nicolas-p/factor,dharmatech/factor,mrjbq7/factor,mrjbq7/factor,mrjbq7/factor,ehird/factor,ceninan/factor,cataska/factor,erg/factor,nicolas-p/factor,seckar/factor,AlexIljin/factor,slavapestov/factor,factor/factor,mecon/factor,factor/factor,ceninan/factor,mcandre/factor,erg/factor,dharmatech/factor,mrjbq7/fa... |
b5e8b14722cd2a8bf976741bfffc833ff2e40a65 | core/memory/memory-tests.factor | core/memory/memory-tests.factor | USING: generic kernel kernel.private math memory prettyprint io
sequences tools.test words namespaces layouts classes
classes.builtin arrays quotations ;
IN: memory.tests
[ [ ] instances ] must-infer
! Code GC wasn't kicking in when needed
: leak-step 800000 f <array> 1quotation call drop ;
: leak-loop 100 [ leak-st... | USING: generic kernel kernel.private math memory prettyprint io
sequences tools.test words namespaces layouts classes
classes.builtin arrays quotations io.launcher system ;
IN: memory.tests
! LOL
[ ] [
vm
"-generations=2"
"-e=USING: memory io prettyprint system ; input-stream gc . 0 exit"
3array try-pr... | Add unit test for GC problem | Add unit test for GC problem
| Factor | bsd-2-clause | dharmatech/factor,mrjbq7/factor,erg/factor,bpollack/factor,dch/factor,sarvex/factor-lang,tgunr/factor,kingcons/factor,erg/factor,ceninan/factor,jwmerrill/factor,bjourne/factor,nicolas-p/factor,bpollack/factor,ceninan/factor,nicolas-p/factor,Keyholder/factor,tgunr/factor,cataska/factor,factor/factor,slavapestov/factor,s... |
ebd2cce1bed8d3b23e9fcfd05ba6dab650302498 | basis/io/ports/ports-tests.factor | basis/io/ports/ports-tests.factor | USING: destructors io io.encodings.binary io.files io.directories
io.files.temp io.ports kernel sequences math
specialized-arrays.instances.alien.c-types.int tools.test ;
IN: io.ports.tests
! Make sure that writing malloced storage to a file works, and
! also make sure that writes larger than the buffer size work
[ ]... | USING: destructors io io.encodings.binary io.files io.directories
io.files.temp io.ports kernel sequences math
specialized-arrays.instances.alien.c-types.int tools.test
specialized-arrays alien.c-types classes.struct alien ;
IN: io.ports.tests
! Make sure that writing malloced storage to a file works, and
! also make ... | Add some commented out unit tests to io.ports.tests that seem like they should be supported | Add some commented out unit tests to io.ports.tests that seem like they should be supported
| Factor | bsd-2-clause | mrjbq7/factor,bjourne/factor,dch/factor,bpollack/factor,AlexIljin/factor,sarvex/factor-lang,nicolas-p/factor,slavapestov/factor,factor/factor,mrjbq7/factor,bpollack/factor,bjourne/factor,bpollack/factor,bpollack/factor,AlexIljin/factor,tgunr/factor,mrjbq7/factor,tgunr/factor,factor/factor,bpollack/factor,sarvex/factor-... |
b63edfd493bc13c424edd81f96752918115610a8 | extra/io/monitors/monitors-tests.factor | extra/io/monitors/monitors-tests.factor | IN: io.monitors.tests
USING: io.monitors tools.test io.files system sequences
continuations namespaces concurrency.count-downs kernel io
threads calendar ;
os { winnt macosx linux } member? [
[ "monitor-test" temp-file delete-tree ] ignore-errors
[ ] [ "monitor-test" temp-file make-directory ] unit-test
... | IN: io.monitors.tests
USING: io.monitors tools.test io.files system sequences
continuations namespaces concurrency.count-downs kernel io
threads calendar prettyprint ;
os { winnt macosx linux } member? [
[ "monitor-test" temp-file delete-tree ] ignore-errors
[ ] [ "monitor-test/xyz" temp-file make-directories... | Add unit tests for monitors | Add unit tests for monitors
| Factor | bsd-2-clause | erg/factor,slavapestov/factor,nicolas-p/factor,slavapestov/factor,ceninan/factor,mecon/factor,mecon/factor,dharmatech/factor,erg/factor,bjourne/factor,bjourne/factor,ceninan/factor,dch/factor,AlexIljin/factor,nicolas-p/factor,AlexIljin/factor,littledan/Factor,bpollack/factor,ehird/factor,slavapestov/factor,erg/factor,s... |
6b626f108c94057d6066173ad34399b87227ac8c | extra/delegate/protocols/protocols.factor | extra/delegate/protocols/protocols.factor | ! Copyright (C) 2007 Daniel Ehrenberg
! See http://factorcode.org/license.txt for BSD license.
USING: delegate sequences.private sequences assocs prettyprint.sections
io definitions kernel continuations ;
IN: delegate.protocols
PROTOCOL: sequence-protocol
clone clone-like like new new-resizable nth nth-unsafe
... | ! Copyright (C) 2007 Daniel Ehrenberg
! See http://factorcode.org/license.txt for BSD license.
USING: delegate sequences.private sequences assocs prettyprint.sections
io definitions kernel continuations ;
IN: delegate.protocols
PROTOCOL: sequence-protocol
clone clone-like like new new-resizable nth nth-unsafe
... | Update extra/delegate; removing section protocol since it makes little sense | Update extra/delegate; removing section protocol since it makes little sense
| Factor | bsd-2-clause | bpollack/factor,kingcons/factor,slavapestov/factor,sarvex/factor-lang,mrjbq7/factor,erg/factor,seckar/factor,ehird/factor,mcandre/factor,factor/factor,factor/factor,erg/factor,dharmatech/factor,mecon/factor,sarvex/factor-lang,mrjbq7/factor,AlexIljin/factor,tgunr/factor,bjourne/factor,bjourne/factor,littledan/Factor,nic... |
36e73b8c915b3cb9fa0d7c1d28a4b091ffe33ac7 | basis/alien/remote-control/remote-control-tests.factor | basis/alien/remote-control/remote-control-tests.factor | USING: interpolate multiline
io io.directories io.encodings.ascii io.files
io.files.temp io.launcher io.streams.string kernel locals system
tools.test sequences ;
IN: alien.remote-control.tests
: compile-file ( contents -- )
"test.c" ascii set-file-contents
{ "gcc" "-I../" "-L.." "-lfactor" "test.c" }
os m... | Add unit tests for alien.remote-control | Add unit tests for alien.remote-control
| Factor | bsd-2-clause | AlexIljin/factor,kingcons/factor,bpollack/factor,littledan/Factor,erg/factor,dch/factor,bpollack/factor,cataska/factor,erg/factor,tgunr/factor,nicolas-p/factor,bjourne/factor,nicolas-p/factor,dch/factor,mcandre/factor,sarvex/factor-lang,ceninan/factor,jwmerrill/factor,mrjbq7/factor,factor/factor,bjourne/factor,sarvex/f... | |
3781210f790698cea8250eb79ceca281ce12d044 | basis/alien/remote-control/remote-control-tests.factor | basis/alien/remote-control/remote-control-tests.factor | USING: interpolate multiline
io io.directories io.encodings.ascii io.files
io.files.temp io.launcher io.streams.string kernel locals system
tools.test sequences ;
IN: alien.remote-control.tests
: compile-file ( contents -- )
"test.c" ascii set-file-contents
{ "gcc" "-I../" "-L.." "-lfactor" "test.c" }
os m... | USING: interpolate multiline
io io.directories io.encodings.ascii io.files
io.files.temp io.launcher io.streams.string kernel locals system
tools.test sequences ;
IN: alien.remote-control.tests
: compile-file ( contents -- )
"test.c" ascii set-file-contents
{ "gcc" "-I../" "-L.." "-lfactor" "test.c" }
os m... | Comment out alien.remote-control tests for now | Comment out alien.remote-control tests for now
| Factor | bsd-2-clause | bjourne/factor,sarvex/factor-lang,sarvex/factor-lang,sarvex/factor-lang,jwmerrill/factor,factor/factor,tgunr/factor,sarvex/factor-lang,bjourne/factor,bpollack/factor,slavapestov/factor,nicolas-p/factor,littledan/Factor,factor/factor,mrjbq7/factor,mcandre/factor,factor/factor,Keyholder/factor,slavapestov/factor,factor/f... |
8d0fdd365128dc62da34790f58eb67ee9eb52c5f | extra/project-euler/076/076.factor | extra/project-euler/076/076.factor | ! Copyright (c) 2008 Eric Mertens
! See http://factorcode.org/license.txt for BSD license.
USING: arrays assocs combinators kernel math sequences math.ranges locals ;
IN: project-euler.076
! http://projecteuler.net/index.php?section=problems&id=76
! DESCRIPTION
! -----------
! How many different ways can one hundred... | Add project-euler solution no. 76 | Add project-euler solution no. 76
| Factor | bsd-2-clause | mrjbq7/factor,Keyholder/factor,mcandre/factor,sarvex/factor-lang,dharmatech/factor,factor/factor,seckar/factor,ehird/factor,AlexIljin/factor,erg/factor,slavapestov/factor,nicolas-p/factor,erg/factor,bpollack/factor,bjourne/factor,sarvex/factor-lang,bjourne/factor,mrjbq7/factor,kingcons/factor,dharmatech/factor,nicolas-... | |
24ef8ac29a0c91e4e3c52fefb0a3e9d6ce3dd0d2 | extra/rocksdb/ffi/ffi-tests.factor | extra/rocksdb/ffi/ffi-tests.factor | ! Copyright (C) 2020 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: kernel multiline rocksdb.ffi tools.test ;
IN: rocksdb.ffi.tests
![[
{ } [
rocksdb_restore_options_create
rocksdb_restore_options_destroy
] unit-test
! Added recently, not in homebrew yet
{ 123 } [
rocksdb_wr... | Add test file that should have been added. | rocksdb.ffi: Add test file that should have been added.
| Factor | bsd-2-clause | tgunr/factor,tgunr/factor,factor/factor,bpollack/factor,bpollack/factor,factor/factor,factor/factor,tgunr/factor,mrjbq7/factor,bpollack/factor,mrjbq7/factor,bpollack/factor,bpollack/factor,mrjbq7/factor,bpollack/factor,mrjbq7/factor,bpollack/factor,factor/factor,tgunr/factor,factor/factor,factor/factor,mrjbq7/factor,tg... | |
f3bcb7b77b21987a28586d0ab44d6175926872a0 | extra/combinators/short-circuit/short-circuit.factor | extra/combinators/short-circuit/short-circuit.factor |
USING: kernel combinators quotations arrays sequences assocs
locals shuffle macros fry ;
IN: combinators.short-circuit
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
:: n&&-rewrite ( quots N -- quot )
quots
[ '[ drop N ndup @ dup not ] [ drop N ndrop f ] 2array ]
map
[... |
USING: kernel combinators quotations arrays sequences assocs
locals shuffle macros fry ;
IN: combinators.short-circuit
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
:: n&&-rewrite ( quots N -- quot )
quots
[ '[ drop N ndup @ dup not ] [ drop N ndrop f ] 2array ]
map
[... | Add 3&& and 3|| words | Add 3&& and 3|| words
| Factor | bsd-2-clause | erg/factor,nicolas-p/factor,mrjbq7/factor,bjourne/factor,mcandre/factor,ehird/factor,AlexIljin/factor,cataska/factor,cataska/factor,tgunr/factor,tgunr/factor,mcandre/factor,littledan/Factor,slavapestov/factor,sarvex/factor-lang,kingcons/factor,nicolas-p/factor,tgunr/factor,mcandre/factor,AlexIljin/factor,slavapestov/fa... |
c9defa64944b0a2c4b784d14254eb2b2eb0ea2eb | core/definitions/definitions.factor | core/definitions/definitions.factor | ! Copyright (C) 2006, 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: kernel sequences namespaces assocs math ;
IN: definitions
MIXIN: definition
ERROR: no-compilation-unit definition ;
SYMBOLS: inlined-dependency flushed-dependency called-dependency ;
: set-in-unit ( value key as... | ! Copyright (C) 2006, 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: kernel sequences namespaces assocs math accessors ;
IN: definitions
MIXIN: definition
ERROR: no-compilation-unit definition ;
SYMBOLS: inlined-dependency flushed-dependency called-dependency ;
: set-in-unit ( va... | Make FORGET: M\ ... work | Make FORGET: M\ ... work
| Factor | bsd-2-clause | factor/factor,erg/factor,kingcons/factor,bpollack/factor,littledan/Factor,nicolas-p/factor,kingcons/factor,mrjbq7/factor,slavapestov/factor,ceninan/factor,tgunr/factor,seckar/factor,bjourne/factor,cataska/factor,mcandre/factor,dch/factor,kingcons/factor,mrjbq7/factor,AlexIljin/factor,dch/factor,bjourne/factor,dch/facto... |
ee08db3e44e3cee050754f73ceb58998440e22eb | extra/random/blum-blum-shub/blum-blum-shub-tests.factor | extra/random/blum-blum-shub/blum-blum-shub-tests.factor | USING: kernel math tools.test namespaces random
random.blum-blum-shub alien.c-types sequences splitting
grouping ;
IN: blum-blum-shub.tests
[ 887708070 ] [
T{ blum-blum-shub f 590695557939 811977232793 } clone random-32*
] unit-test
[ 70576473 ] [
T{ blum-blum-shub f 590695557939 811977232793 } clone [
... | USING: kernel math tools.test namespaces random
random.blum-blum-shub alien.c-types sequences splitting
grouping ;
IN: blum-blum-shub.tests
[ 887708070 ] [
T{ blum-blum-shub f 590695557939 811977232793 } clone random-32*
] unit-test
[ 2790910260 ] [
T{ blum-blum-shub f 590695557939 811977232793 } clone [
... | Fix test failure for random number speedup from using be>. | Fix test failure for random number speedup from using be>.
| Factor | bsd-2-clause | sarvex/factor-lang,nicolas-p/factor,slavapestov/factor,bpollack/factor,tgunr/factor,bpollack/factor,dch/factor,mrjbq7/factor,nicolas-p/factor,AlexIljin/factor,mrjbq7/factor,bpollack/factor,bpollack/factor,factor/factor,mrjbq7/factor,tgunr/factor,tgunr/factor,factor/factor,bjourne/factor,slavapestov/factor,nicolas-p/fac... |
2b2ede0a89411421649af182bb69439bc6424b17 | extra/peg/javascript/parser/parser-tests.factor | extra/peg/javascript/parser/parser-tests.factor | ! Copyright (C) 2008 Chris Double.
! See http://factorcode.org/license.txt for BSD license.
!
USING: kernel tools.test peg peg.javascript.ast peg.javascript.tokenizer
peg.javascript.parser accessors multiline sequences math ;
IN: peg.javascript.parser.tests
\ javascript must-infer
{
T{
ast-begin
... | ! Copyright (C) 2008 Chris Double.
! See http://factorcode.org/license.txt for BSD license.
!
USING: kernel tools.test peg peg.javascript.ast peg.javascript.tokenizer
peg.javascript.parser accessors multiline sequences math ;
IN: peg.javascript.parser.tests
\ javascript must-infer
{
T{
ast-begin
... | Add a javascript sc test | Add a javascript sc test
| Factor | bsd-2-clause | ceninan/factor,factor/factor,erg/factor,bpollack/factor,AlexIljin/factor,dch/factor,ceninan/factor,dharmatech/factor,mrjbq7/factor,factor/factor,seckar/factor,bpollack/factor,mrjbq7/factor,ceninan/factor,mcandre/factor,Keyholder/factor,dharmatech/factor,bjourne/factor,littledan/Factor,cataska/factor,mcandre/factor,ehir... |
a344a34631c9290331bfcb7a58f86d57de33945b | extra/ping/ping-tests.factor | extra/ping/ping-tests.factor | USING: continuations destructors io.sockets kernel ping
tools.test ;
IN: ping.tests
[ t ] [ "localhost" alive? ] unit-test
[ t ] [ "127.0.0.1" alive? ] unit-test
[ f ] [ "0.0.0.0" alive? ] unit-test
| USING: continuations destructors io.sockets kernel ping
tools.test ;
IN: ping.tests
[ ] [ "localhost" ping drop ] unit-test
[ t ] [ "localhost" alive? ] unit-test
[ t ] [ "127.0.0.1" alive? ] unit-test
[ f ] [ "0.0.0.0" alive? ] unit-test
| Add another unit test so we can see why ping fails, if it does. | Add another unit test so we can see why ping fails, if it does.
| Factor | bsd-2-clause | erg/factor,erg/factor,erg/factor,erg/factor,mcandre/factor,erg/factor,mcandre/factor,mcandre/factor,erg/factor,erg/factor,mcandre/factor,mcandre/factor,mcandre/factor,mcandre/factor |
5829367f1a238a9ee5153a9a501a3afc1a9c7138 | extra/lint/lint-tests.factor | extra/lint/lint-tests.factor | USING: io lint kernel math tools.test ;
IN: lint.tests
! Don't write code like this
: lint1 ( obj -- ) [ "hi" print ] [ ] if ; ! when
[ { { lint1 { [ [ ] if ] } } } ] [ \ lint1 lint-word ] unit-test
: lint2 ( n -- n' ) 1 + ; ! 1+
[ { [ 1 + ] } ] [ \ lint2 lint ] unit-test
: lint3 ( a b -- b a b ) dup -rot ; ! tuck
... | USING: io lint kernel math tools.test ;
IN: lint.tests
! Don't write code like this
: lint1 ( obj -- ) [ "hi" print ] [ ] if ; ! when
[ { { lint1 { [ [ ] if ] } } } ] [ \ lint1 lint-word ] unit-test
: lint3 ( a b -- b a b ) dup -rot ; ! tuck
[ { { lint3 { [ dup -rot ] } } } ] [ \ lint3 lint-word ] unit-test
| Remove bogus test in lint | Remove bogus test in lint
| Factor | bsd-2-clause | mcandre/factor,mcandre/factor,erg/factor,erg/factor,mcandre/factor,mcandre/factor,erg/factor,erg/factor,erg/factor,erg/factor,mcandre/factor,mcandre/factor,erg/factor,mcandre/factor |
3df671407f83f5bcd51f466ef88b5b91109b42f6 | extra/trees/trees-docs.factor | extra/trees/trees-docs.factor | USING: help.syntax help.markup trees assocs ;
HELP: TREE{
{ $syntax "TREE{ { key value }... }" }
{ $values { "key" "a key" } { "value" "a value" } }
{ $description "Literal syntax for an unbalanced tree." } ;
HELP: <tree>
{ $values { "tree" tree } }
{ $description "Creates an empty unbalanced binary tree" } ;
HELP: ... | USING: help.syntax help.markup assocs ;
IN: trees
HELP: TREE{
{ $syntax "TREE{ { key value }... }" }
{ $values { "key" "a key" } { "value" "a value" } }
{ $description "Literal syntax for an unbalanced tree." } ;
HELP: <tree>
{ $values { "tree" tree } }
{ $description "Creates an empty unbalanced binary tree" } ;
HE... | Update trees for factor changes | Update trees for factor changes
| Factor | bsd-2-clause | bjourne/factor,slavapestov/factor,AlexIljin/factor,erg/factor,seckar/factor,mecon/factor,cataska/factor,cataska/factor,jwmerrill/factor,littledan/Factor,mrjbq7/factor,mecon/factor,kingcons/factor,mcandre/factor,bpollack/factor,cataska/factor,dch/factor,dch/factor,factor/factor,slavapestov/factor,erg/factor,ceninan/fact... |
f1ffbd221d2ef63a2e24378fe5d56ccb90f857ed | basis/alarms/alarms-tests.factor | basis/alarms/alarms-tests.factor | USING: alarms alarms.private kernel calendar sequences
tools.test threads concurrency.count-downs concurrency.promises
fry tools.time math ;
IN: alarms.tests
[ ] [
1 <count-down>
{ f } clone 2dup
[ first cancel-alarm count-down ] 2curry 1 seconds later
swap set-first
await
] unit-test
... | USING: alarms alarms.private calendar concurrency.count-downs
concurrency.promises fry kernel math math.order sequences
threads tools.test tools.time ;
IN: alarms.tests
[ ] [
1 <count-down>
{ f } clone 2dup
[ first stop-alarm count-down ] 2curry 1 seconds later
swap set-first
await
] uni... | Make the alarm test wait for the promise to be fulfilled instead of returning immediately and failing | Make the alarm test wait for the promise to be fulfilled instead of returning immediately and failing
| Factor | bsd-2-clause | cataska/factor,mcandre/factor,kingcons/factor,erg/factor,erg/factor,mcandre/factor,erg/factor,kingcons/factor,kingcons/factor,mcandre/factor,ceninan/factor,erg/factor,mcandre/factor,cataska/factor,mcandre/factor,cataska/factor,cataska/factor,mcandre/factor,kingcons/factor,ceninan/factor,ceninan/factor,mcandre/factor,er... |
43361c37317584f51fbcf9bae4fb654d9aa4e433 | basis/io/ports/ports-tests.factor | basis/io/ports/ports-tests.factor | USING: destructors io io.encodings.binary io.files io.directories
io.files.temp io.ports kernel sequences math
specialized-arrays.instances.alien.c-types.int tools.test ;
IN: io.ports.tests
! Make sure that writing malloced storage to a file works, and
! also make sure that writes larger than the buffer size work
[ ]... | USING: destructors io io.encodings.binary io.files io.directories
io.files.temp io.ports kernel sequences math
specialized-arrays.instances.alien.c-types.int tools.test
specialized-arrays alien.c-types classes.struct alien ;
IN: io.ports.tests
! Make sure that writing malloced storage to a file works, and
! also make ... | Add some commented out unit tests to io.ports.tests that seem like they should be supported | Add some commented out unit tests to io.ports.tests that seem like they should be supported
| Factor | bsd-2-clause | mcandre/factor,erg/factor,ceninan/factor,kingcons/factor,mcandre/factor,kingcons/factor,littledan/Factor,mcandre/factor,erg/factor,erg/factor,littledan/Factor,cataska/factor,littledan/Factor,mcandre/factor,cataska/factor,erg/factor,ceninan/factor,mcandre/factor,cataska/factor,kingcons/factor,ceninan/factor,kingcons/fac... |
c909538eb8aa1730194ffef1938aa1ccc0ce529e | extra/readline/readline-docs.factor | extra/readline/readline-docs.factor | ! Copyright (C) 2011 Erik Charlebois.
! See http://factorcode.org/license.txt for BSD license.
USING: arrays help.markup help.syntax math
sequences.private vectors strings kernel math.order layouts
quotations generic.single ;
IN: readline
HELP: readline
{ $values
{ "prompt" string }
{ "str" string }
}
{ $descr... | ! Copyright (C) 2011 Erik Charlebois.
! See http://factorcode.org/license.txt for BSD license.
USING: arrays help.markup help.syntax math
sequences.private vectors strings kernel math.order layouts
quotations generic.single ;
IN: readline
HELP: readline
{ $values
{ "prompt" string }
{ "str" string }
}
{ $descr... | Write some more docs for readline and link readline main article to words. | Write some more docs for readline and link readline main article to words.
| Factor | bsd-2-clause | mcandre/factor,erg/factor,erg/factor,erg/factor,mcandre/factor,mcandre/factor,erg/factor,erg/factor,mcandre/factor,mcandre/factor,mcandre/factor,erg/factor,erg/factor,mcandre/factor |
d8be7240926d25a63d51aeee95632eb35e5c5bb6 | basis/tools/deploy/shaker/strip-struct-arrays.factor | basis/tools/deploy/shaker/strip-struct-arrays.factor | USING: kernel stack-checker.transforms struct-arrays.private ;
IN: struct-arrays
: struct-element-constructor ( c-type -- word )
"Struct array usages must be compiled" throw ;
<<
\ struct-element-constructor [
(struct-element-constructor) [ ] curry
] 1 define-transform
>> | USING: kernel stack-checker.transforms ;
IN: struct-arrays.private
: struct-element-constructor ( c-type -- word )
"Struct array usages must be compiled" throw ;
<<
\ struct-element-constructor [
(struct-element-constructor) [ ] curry
] 1 define-transform
>> | Fix tree shaker again, gah | Fix tree shaker again, gah | Factor | bsd-2-clause | kingcons/factor,cataska/factor,ceninan/factor,erg/factor,ceninan/factor,ceninan/factor,erg/factor,mcandre/factor,littledan/Factor,ceninan/factor,mcandre/factor,mcandre/factor,seckar/factor,littledan/Factor,mcandre/factor,seckar/factor,kingcons/factor,erg/factor,erg/factor,mcandre/factor,kingcons/factor,mcandre/factor,e... |
897c21b83c2b60d96c1acd6e66a7593e6eb86622 | factor/src/malenv/malenv.factor | factor/src/malenv/malenv.factor | ! Copyright (C) 2015 Jordan Lewis.
! See http://factorcode.org/license.txt for BSD license.
USING: kernel hashtables accessors assocs locals math sequences ;
IN: malenv
TUPLE: malenv
{ outer read-only }
{ data hashtable read-only } ;
! set outer to f if top level env
INSTANCE: malenv assoc
C: <malenv> malenv
: new-... | ! Copyright (C) 2015 Jordan Lewis.
! See http://factorcode.org/license.txt for BSD license.
USING: kernel hashtables accessors assocs locals math sequences ;
IN: malenv
TUPLE: malenv
{ outer read-only }
{ data hashtable read-only } ;
! set outer to f if top level env
INSTANCE: malenv assoc
C: <malenv> malenv
: new-... | Fix env variable not found message | Fix env variable not found message
| Factor | mpl-2.0 | fdserr/mal,tompko/mal,fduch2k/mal,christhekeele/mal,profan/mal,0gajun/mal,treeform/mal,DomBlack/mal,joncol/mal,U-MA/mal,outcastgeek/mal,czchen/mal,rnby-mike/mal,sleep/mal,foresterre/mal,h8gi/mal,jwalsh/mal,christhekeele/mal,fdserr/mal,tompko/mal,keith-rollin/mal,eshamster/mal,eshamster/mal,alantsev/mal,0gajun/mal,tebek... |
b99fe0643c91609beec947906809fd98d6169c81 | extra/webkit-demo/webkit-demo.factor | extra/webkit-demo/webkit-demo.factor | ! Copyright (C) 2008, 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: cocoa cocoa.application cocoa.types cocoa.classes cocoa.windows
core-graphics.types kernel math.bitwise literals ;
IN: webkit-demo
FRAMEWORK: /System/Library/Frameworks/WebKit.framework
IMPORT: WebView
: rect ( --... | ! Copyright (C) 2008, 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: cocoa cocoa.application cocoa.types cocoa.classes cocoa.windows
core-graphics.types kernel math.bitwise literals ;
IN: webkit-demo
FRAMEWORK: /System/Library/Frameworks/WebKit.framework
IMPORT: WebView
: rect ( --... | Fix typo in webkit demo | Fix typo in webkit demo
| Factor | bsd-2-clause | mcandre/factor,kingcons/factor,cataska/factor,erg/factor,kingcons/factor,cataska/factor,ceninan/factor,ceninan/factor,erg/factor,mcandre/factor,ceninan/factor,cataska/factor,mcandre/factor,erg/factor,erg/factor,mcandre/factor,ceninan/factor,mcandre/factor,kingcons/factor,mcandre/factor,cataska/factor,kingcons/factor,mc... |
7765d6bdcb39951ba68d7faafd9714afaf1c5faa | extra/dns/unix/unix.factor | extra/dns/unix/unix.factor | ! Copyright (C) 2010 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: assocs dns io.encodings.utf8 io.files kernel
math.statistics sequences splitting system unicode.categories ;
IN: dns.unix
: load-resolve.conf ( -- seq )
"/etc/resolv.conf" utf8 file-lines
[ [ blank? ] trim ] map
... | ! Copyright (C) 2010 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: assocs dns io.encodings.utf8 io.files kernel
math.statistics sequences splitting system unicode.categories ;
IN: dns.unix
: load-resolve.conf ( -- seq )
"/etc/resolv.conf" utf8 file-lines
[ [ blank? ] trim ] map ... | Remove blank lines from resolve.conf just in case | Remove blank lines from resolve.conf just in case
| Factor | bsd-2-clause | erg/factor,erg/factor,erg/factor,mcandre/factor,mcandre/factor,mcandre/factor,mcandre/factor,erg/factor,mcandre/factor,erg/factor,mcandre/factor,mcandre/factor,erg/factor,erg/factor |
5bc73cc5afcb9a5ae36a5ec9eec2a3fab68d5ff4 | core/sbufs/sbufs.factor | core/sbufs/sbufs.factor | ! Copyright (C) 2004, 2007 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: kernel math strings kernel.private sequences.private
sequences strings growable strings.private sbufs.private ;
IN: sbufs
: <sbuf> ( n -- sbuf ) 0 <string> 0 string>sbuf ; inline
M: sbuf set-nth-unsafe
underly... | ! Copyright (C) 2004, 2007 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: kernel math strings kernel.private sequences.private
sequences strings growable strings.private sbufs.private ;
IN: sbufs
: <sbuf> ( n -- sbuf ) 0 <string> 0 string>sbuf ; inline
M: sbuf set-nth-unsafe
underly... | Fix string buffer implementation bug | Fix string buffer implementation bug
| Factor | bsd-2-clause | AlexIljin/factor,dch/factor,nicolas-p/factor,seckar/factor,factor/factor,erg/factor,AlexIljin/factor,dharmatech/factor,sarvex/factor-lang,seckar/factor,bpollack/factor,slavapestov/factor,ceninan/factor,AlexIljin/factor,kingcons/factor,dch/factor,bpollack/factor,nicolas-p/factor,tgunr/factor,tgunr/factor,bpollack/factor... |
57a86605d8d264c138ec63fbeab115707baaf850 | extra/tools/deploy/shaker/strip-cocoa.factor | extra/tools/deploy/shaker/strip-cocoa.factor | USING: cocoa cocoa.messages cocoa.application cocoa.nibs
assocs namespaces kernel words compiler.units sequences
ui.cocoa ;
"stop-after-last-window?" get
global [
stop-after-last-window? set
[ "MiniFactor.nib" load-nib ] cocoa-init-hook set-global
! Only keeps those methods that we actually call
sent... | USING: cocoa cocoa.messages cocoa.application cocoa.nibs
assocs namespaces kernel words compiler.units sequences
ui ui.cocoa ;
"stop-after-last-window?" get
global [
stop-after-last-window? set
[ "MiniFactor.nib" load-nib ] cocoa-init-hook set-global
! Only keeps those methods that we actually call
s... | Fix deployment on Mac OS X | Fix deployment on Mac OS X
| Factor | bsd-2-clause | slavapestov/factor,ceninan/factor,erg/factor,nicolas-p/factor,mcandre/factor,bjourne/factor,dch/factor,seckar/factor,jwmerrill/factor,sarvex/factor-lang,factor/factor,sarvex/factor-lang,dch/factor,dharmatech/factor,mrjbq7/factor,tgunr/factor,ehird/factor,seckar/factor,ehird/factor,ceninan/factor,slavapestov/factor,dch/... |
db0b180498157c07847d8ff8e69bacc8f57923cc | extra/ctags/ctags-tests.factor | extra/ctags/ctags-tests.factor | USING: kernel ctags tools.test io.backend sequences arrays prettyprint ;
IN: ctags.tests
[ t ] [
91
{ { if { "resource:extra/unix/unix.factor" 91 } } } ctag-lineno =
] unit-test
[ t ] [
"resource:extra/unix/unix.factor"
{ { if { "resource:extra/unix/unix.factor" 91 } } } ctag-path =
] unit-test
[ t ] [
i... | USING: kernel ctags tools.test io.backend sequences arrays prettyprint ;
IN: ctags.tests
[ t ] [
91
{ if { "resource:extra/unix/unix.factor" 91 } } ctag-lineno =
] unit-test
[ t ] [
"resource:extra/unix/unix.factor"
{ if { "resource:extra/unix/unix.factor" 91 } } ctag-path =
] unit-test
[ t ] [
\ if
{ ... | Fix errors in new tests | Fix errors in new tests
| Factor | bsd-2-clause | dch/factor,mcandre/factor,kingcons/factor,jwmerrill/factor,littledan/Factor,AlexIljin/factor,dch/factor,mrjbq7/factor,Keyholder/factor,erg/factor,AlexIljin/factor,bpollack/factor,tgunr/factor,factor/factor,tgunr/factor,bpollack/factor,erg/factor,tgunr/factor,factor/factor,bjourne/factor,nicolas-p/factor,sarvex/factor-l... |
bba0ff79c5ed3d1c40f2c141302b39329eb9baee | extra/project-euler/ave-time/ave-time.factor | extra/project-euler/ave-time/ave-time.factor | ! Copyright (c) 2007 Aaron Schaefer
! See http://factorcode.org/license.txt for BSD license.
USING: arrays combinators io kernel math math.functions math.parser
math.statistics namespaces sequences tools.time ;
IN: project-euler.ave-time
: collect-benchmarks ( quot n -- seq )
[
>r >r datastack r> [ benchmark... | ! Copyright (c) 2007 Aaron Schaefer
! See http://factorcode.org/license.txt for BSD license.
USING: arrays combinators io kernel math math.functions math.parser
math.statistics namespaces sequences tools.time continuations ;
IN: project-euler.ave-time
: collect-benchmarks ( quot n -- seq )
[
>r >r datastack ... | Fix load error in project-euler | Fix load error in project-euler
| Factor | bsd-2-clause | slavapestov/factor,littledan/Factor,erg/factor,factor/factor,mcandre/factor,dch/factor,AlexIljin/factor,bjourne/factor,bjourne/factor,littledan/Factor,dharmatech/factor,mrjbq7/factor,bpollack/factor,sarvex/factor-lang,dch/factor,cataska/factor,mrjbq7/factor,dch/factor,nicolas-p/factor,erg/factor,sarvex/factor-lang,erg/... |
9ac17a2c835d139ec0b2b6724339fb6363f9c9ea | basis/system-info/linux/linux-tests.factor | basis/system-info/linux/linux-tests.factor | USING: system-info.linux strings splitting sequences
tools.test ;
IN: system-info.linux.tests
[ 6 ] [ uname length ] unit-test
[ t ] [ sysname string? ] unit-test
[ t ] [ nodename string? ] unit-test
[ t ] [ release string? ] unit-test
[ t ] [ version string? ] unit-test
[ t ] [ machine string? ] unit-t... | USING: system-info.linux strings splitting sequences
tools.test kernel ;
IN: system-info.linux.tests
[ 6 ] [ uname length ] unit-test
[ t ] [ sysname string? ] unit-test
[ t ] [ nodename string? ] unit-test
[ t ] [ release string? ] unit-test
[ t ] [ version string? ] unit-test
[ t ] [ machine string? ]... | Fix a using in system-info.linux | Fix a using in system-info.linux
| Factor | bsd-2-clause | mcandre/factor,erg/factor,erg/factor,erg/factor,mcandre/factor,mcandre/factor,erg/factor,erg/factor,mcandre/factor,erg/factor,mcandre/factor,mcandre/factor,erg/factor,mcandre/factor |
25f4d90f921490874b6cfef6126632dc4db56780 | extra/cuda/demos/hello-world/hello-world.factor | extra/cuda/demos/hello-world/hello-world.factor | ! Copyright (C) 2010 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: alien.c-types alien.strings cuda cuda.syntax destructors
io.encodings.utf8 kernel locals math prettyprint sequences ;
IN: cuda.hello-world
CUDA-LIBRARY: hello vocab:cuda/hello.ptx
CUDA-FUNCTION: helloWorld ( char* strin... | ! Copyright (C) 2010 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: alien.c-types alien.strings cuda cuda.syntax destructors
io.encodings.utf8 kernel locals math prettyprint sequences ;
IN: cuda.demos.hello-world
CUDA-LIBRARY: hello vocab:cuda/demos/hello-world/hello.ptx
CUDA-FUNCTION: ... | Fix the ptx path in cuda demo | Fix the ptx path in cuda demo
| Factor | bsd-2-clause | erg/factor,erg/factor,kingcons/factor,mcandre/factor,erg/factor,mcandre/factor,ceninan/factor,mcandre/factor,ceninan/factor,erg/factor,ceninan/factor,kingcons/factor,cataska/factor,ceninan/factor,erg/factor,mcandre/factor,cataska/factor,mcandre/factor,cataska/factor,mcandre/factor,mcandre/factor,kingcons/factor,erg/fac... |
8cf9f5142bd9c2dc2c58b53c56dd9a30b72cdacf | basis/tools/disassembler/gdb/gdb.factor | basis/tools/disassembler/gdb/gdb.factor | ! Copyright (C) 2008, 2010 Slava Pestov, Jorge Acereda Macia.
! See http://factorcode.org/license.txt for BSD license.
USING: io.files io.files.temp io words alien kernel math.parser
alien.syntax io.launcher assocs arrays sequences namespaces make
system math io.encodings.ascii accessors tools.disassembler
tools.disass... | ! Copyright (C) 2008, 2010 Slava Pestov, Jorge Acereda Macia.
! See http://factorcode.org/license.txt for BSD license.
USING: io.files io.files.temp io words alien kernel math.parser
alien.syntax io.launcher assocs arrays sequences namespaces make
system math io.encodings.ascii accessors tools.disassembler
tools.disass... | Fix GDB-based disassemble for GDB 7 | Fix GDB-based disassemble for GDB 7
| Factor | bsd-2-clause | erg/factor,erg/factor,erg/factor,erg/factor,mcandre/factor,mcandre/factor,erg/factor,mcandre/factor,mcandre/factor,erg/factor,mcandre/factor,erg/factor,mcandre/factor,mcandre/factor |
4a6f817d10d64bcf03e95de8ee6c7cbb8aafff40 | lib/dynamic_slot_object.fy | lib/dynamic_slot_object.fy | class DynamicSlotObject : BasicObject {
def initialize {
@object = Object new
}
def object {
@object
}
def unknown_message: m with_params: p {
m to_s split: ":" . each_with_index: |slotname idx| {
@object set_slot: slotname value: $ p[idx]
}
}
}
class DynamicKeyHash : BasicObject {
... | class DynamicSlotObject : BasicObject {
def initialize {
@object = Object new
}
def object {
@object
}
def unknown_message: m with_params: p {
m to_s split: ":" . each_with_index: |slotname idx| {
@object set_slot: slotname value: $ p[idx]
}
}
}
class DynamicKeyHash : BasicObject {
... | Return self for easy chaining | Return self for easy chaining
| Fancy | bsd-3-clause | bakkdoor/fancy,bakkdoor/fancy,bakkdoor/fancy,bakkdoor/fancy |
eeba70945b55bbfe4c735439016624ae22ea9536 | lib/compiler/ast/goto.fy | lib/compiler/ast/goto.fy | class Rubinius Generator {
def ip: @ip
def ip {
@ip
}
}
class Fancy AST {
class Label : Node {
@@registry = <[]>
def Label [name] {
@@registry[name]
}
def Label [name]: pos {
@@registry[name]: pos
}
def initialize: @line name: @name
def bytecode: g {
pos(g)
... | class Rubinius Generator {
def ip: @ip
def ip {
@ip
}
}
class Fancy AST {
class Label : Node {
@@registry = <[]>
def Label [name] {
@@registry[name]
}
def Label [name]: label {
@@registry[name]: label
}
def initialize: @line name: @name
def bytecode: g {
pos(g... | Allow forward references of labels and skip push_nil weirdness (+2) | Allow forward references of labels and skip push_nil weirdness (+2) | Fancy | bsd-3-clause | bakkdoor/fancy,bakkdoor/fancy,bakkdoor/fancy,bakkdoor/fancy |
4b4e69685a4894d884871d27b76610d00170db60 | lib/compiler/ast/tuple_literal.fy | lib/compiler/ast/tuple_literal.fy | class Fancy AST {
class TupleLiteral : Node {
def initialize: @line entries: @elements
def bytecode: g {
pos(g)
ary = ArrayLiteral new: @line array: [FixnumLiteral new: @line value: (@elements size)]
args = RubyArgs new: @line args: ary
msg_ident = Identifier from: "new" line: @line... | class Fancy AST {
class TupleLiteral : Node {
def initialize: @line entries: @elements
def bytecode: g {
pos(g)
ary = ArrayLiteral new: @line array: [FixnumLiteral new: @line value: (@elements size)]
args = RubyArgs new: @line args: ary
msg_ident = Identifier from: "new" line: @line... | Use fancy method instead of ruby version | Use fancy method instead of ruby version
| Fancy | bsd-3-clause | bakkdoor/fancy,bakkdoor/fancy,bakkdoor/fancy,bakkdoor/fancy |
9fbcca50db358205db5972f05c71222f76feb426 | lib/parser/parse_error.fy | lib/parser/parse_error.fy | class Fancy {
class Parser {
class ParseError : StdError {
read_slots: ['line, 'filename]
def initialize: @line message: @message filename: @filename {
initialize: "Parse error near '#{@message}' at line #{@line} in #{@filename}"
}
}
}
} | class Fancy {
class Parser {
class ParseError : StdError {
read_slots: ['line, 'filename]
def initialize: @line message: @message filename: @filename {
initialize: $ "Parse error near '" ++ @message ++ "' at line " ++ @line ++ " in " ++ @filename
}
}
}
} | Fix to ParseError constructor. Use ++ for now, since string interpolation doesn't work during bootstrapping (in case we get parse errors there..) | Fix to ParseError constructor. Use ++ for now, since string interpolation doesn't work during bootstrapping (in case we get parse errors there..) | Fancy | bsd-3-clause | bakkdoor/fancy,bakkdoor/fancy,bakkdoor/fancy,bakkdoor/fancy |
bbdcc0e1aefa2cfb1d0115c2170318c5c752f26e | lib/iteration.fy | lib/iteration.fy | class Fancy {
class BreakIteration : StdError {
read_slots: ['result]
def initialize: @result {}
}
class NextIteration : StdError {
read_slots: ['result]
def initialize: @result {}
}
class StopIteration : StdError {
"""
Raised to stop the iteration, in particular by Enumerator#next.
... | class Fancy {
class BreakIteration : StdError {
read_slots: ['result]
def initialize: @result {}
}
class NextIteration : StdError {
read_slots: ['result]
def initialize: @result {}
}
class StopIteration : StdError {
"""
Raised to stop the iteration, in particular by Enumerator#next.
... | Fix error in docstring for StopIteration | Fix error in docstring for StopIteration | Fancy | bsd-3-clause | bakkdoor/fancy,bakkdoor/fancy,bakkdoor/fancy,bakkdoor/fancy |
6cb322f50280e5744079e181998b4959339895fe | lib/rbx/system.fy | lib/rbx/system.fy | class System {
def System exit {
"Exit the running Fancy process."
Kernel exit()
}
def System do: command_str {
"Runs the given string as a system() command."
Kernel system(command_str)
}
def System piperead: command_str {
"""
Runs the given string as a popen() call and returns the... | class System {
def System exit {
"Exit the running Fancy process."
Kernel exit()
}
def System do: command_str {
"Runs the given string as a system() command."
Kernel system(command_str)
}
def System piperead: command_str {
"""
Runs the given string as a popen() call and returns the... | Call to_f on n_ms before dividing and passing on to Kernel sleep(). | Call to_f on n_ms before dividing and passing on to Kernel sleep(). | Fancy | bsd-3-clause | bakkdoor/fancy,bakkdoor/fancy,bakkdoor/fancy,bakkdoor/fancy |
3af6153919de0c828f5ff2e8e7ffd620457deeb5 | lib/fiber_pool.fy | lib/fiber_pool.fy | class FiberPool {
def initialize {
@pool = []
@current = nil
}
def size {
@pool size
}
def add: fiber {
@pool << fiber
}
def remove: fiber {
@pool remove: fiber
}
def schedule {
Thread new: {
loop: {
while: {@pool size > 0} do: {
@pool each: |f| {
... | class FiberPool {
def initialize {
@pool = []
@scheduling = false
@mutex = Mutex new()
}
def size {
@mutex synchronize() {
@pool size
}
}
def add: fiber {
@mutex synchronize() {
@pool << fiber
}
}
def remove: fiber {
@mutex synchronize() {
@pool remove:... | Use mutex in FiberPool and some other additions | Use mutex in FiberPool and some other additions | Fancy | bsd-3-clause | bakkdoor/fancy,bakkdoor/fancy,bakkdoor/fancy,bakkdoor/fancy |
6d562afed3ba1a8695af35d206f4c292689c82c0 | lib/stormify/topology.fy | lib/stormify/topology.fy | class Storm {
class Topology {
class ComponentDef {
read_write_slots: ('id, 'parallelism)
def initialize: @topology {
@parallelism = 1
@id = nil
}
}
class BoltDef : ComponentDef {
read_write_slot: 'grouping
def initialize: topology with: block {
initi... | class Storm {
class Topology {
class ComponentDef {
read_write_slots: ('id, 'parallelism)
def initialize: @topology {
@parallelism = 1
@id = nil
}
}
class BoltDef : ComponentDef {
read_write_slot: 'grouping
def initialize: topology with: block {
initi... | Use ComponentDef's id when passed as id itself | Use ComponentDef's id when passed as id itself
| Fancy | bsd-3-clause | bakkdoor/hurricane,bakkdoor/hurricane |
c4499582816e32f42ab6efe5ffaa425429f997d4 | config/fish/config.fish | config/fish/config.fish | fish_vi_key_bindings
for word in "$HOME/"{bin,.local/bin,Library/Python/2.7/bin,go/bin}
if not contains $word $PATH
set PATH $word $PATH
end
end
set -x GOPATH "$HOME/go"
set fish_complete_path "$HOME/git/github.fish-pip-completion" $fish_complete_path
switch (uname)
case Linux
source /us... | fish_vi_key_bindings
for word in "$HOME/"{bin,.local/bin,go/bin}
if not contains $word $PATH
set PATH $word $PATH
end
end
set -x GOPATH "$HOME/go"
set fish_complete_path "$HOME/git/github.fish-pip-completion" $fish_complete_path
switch (uname)
case Linux
source /usr/share/autojump/autoju... | Move darwin specific pathing to case | fix: Move darwin specific pathing to case
| fish | mit | e4r7hbug/dotfiles,e4r7hbug/dotfiles |
6f89e9d9060c938688d1e0501821850591ad76e1 | functions/fonts.install.fish | functions/fonts.install.fish | function fonts.install -a name
if not contains $name (__fonts.repo.list)
echo "Font $name not available for installing"
return 1
end
if test -e "$FONTS_CONFIG/$name"
echo "Font $name already installed"
return 1
end
if set tmpdir (mktemp -d "/tmp/font-$name.XXXXXX" ^&-)
if wget -P $tmpdi... | function fonts.install -a name
if not contains $name (__fonts.repo.list)
echo "Font $name not available for installing"
return 1
end
if test -e "$FONTS_CONFIG/$name"
echo "Font $name already installed"
return 1
end
if set tmpdir (mktemp -d "/tmp/font-$name.XXXXXX" ^&-)
if wget -P $tmpdi... | Return error when mv fails | Return error when mv fails
| fish | mit | derekstavis/plugin-fonts |
865580087055fcda8d3234bbfb8fe40c24da39bf | config/fish/config.fish | config/fish/config.fish | # Path to Oh My Fish install.
set -gx OMF_PATH "/home/e4r7hbug/.local/share/omf"
# Customize Oh My Fish configuration path.
#set -gx OMF_CONFIG "/home/e4r7hbug/.config/omf"
# Load oh-my-fish configuration.
source $OMF_PATH/init.fish
fish_vi_mode
set PATH \
"$HOME/bin" \
"$HOME/.local/bin" \
"$HOME/Libra... | # Path to Oh My Fish install.
set -gx OMF_PATH "$HOME/.local/share/omf"
# Customize Oh My Fish configuration path.
#set -gx OMF_CONFIG "$HOME/.config/omf"
# Load oh-my-fish configuration.
source $OMF_PATH/init.fish
fish_vi_mode
set PATH \
"$HOME/bin" \
"$HOME/.local/bin" \
"$HOME/Library/Python/2.7/bin"... | Use $HOME in OMF variables | fix: Use $HOME in OMF variables
| fish | mit | e4r7hbug/dotfiles,e4r7hbug/dotfiles |
b4d88bcb92a801d3e5635c972dd48971f29994d7 | .config/fish/aliases.fish | .config/fish/aliases.fish | alias axel="axel -a"
alias dotfiles="git --git-dir=$HOME/dev/.files.git/ --work-tree=$HOME"
alias dl="wget -r -l 1 -np -nd"
alias g=git
alias killaudio="sudo kill `ps -ax | grep 'coreaudiod' | grep 'sbin' |awk '{print $1}'`"
#alias lyrist="/Users/sahil/Documents/dev/lyrist/lyrist.js | less -XRq"
alias mou="open -a Mou"... | alias axel="axel -a"
alias dotfiles="git --git-dir=$HOME/dev/.files.git/ --work-tree=$HOME"
alias dl="wget -r -l 1 -np -nd"
alias fn="find . -iname"
alias g=git
alias killaudio="sudo kill `ps -ax | grep 'coreaudiod' | grep 'sbin' |awk '{print $1}'`"
#alias lyrist="/Users/sahil/Documents/dev/lyrist/lyrist.js | less -XRq... | Add alias for `find . -iname` | [fish] Add alias for `find . -iname`
| fish | mit | spinningarrow/.files,spinningarrow/.files |
7149068fa0e37f74c110f28f61726ec90cf78fcc | config/fish/config.fish | config/fish/config.fish | # Colorized ls output
set --export CLICOLOR 1
set --export LSCOLORS Exfxcxdxbxegedabagacad
# Ensure the HOSTNAME environment variable is set so that `rcm` works properly
if test -z $HOSTNAME
set --export HOSTNAME (hostname -s)
end
if status --is-interactive
set --global fish_user_abbreviations
abbr --add ex 'e... | # Colorized ls output
set --export CLICOLOR 1
set --export LSCOLORS Exfxcxdxbxegedabagacad
# Ensure the HOSTNAME environment variable is set so that `rcm` works properly
if ! set --query HOSTNAME
set --export HOSTNAME (hostname -s)
end
if status --is-interactive
set --global fish_user_abbreviations
abbr --add ... | Use fish-standard way of checking if an environment variable is set | Use fish-standard way of checking if an environment variable is set
| fish | mit | lee-dohm/dotfiles,lee-dohm/dotfiles,lee-dohm/dotfiles,lee-dohm/dotfiles |
0e96087493fe691773f46b7668effa815b71a60b | fish/.config/fish/functions/sway_autotiling.fish | fish/.config/fish/functions/sway_autotiling.fish | function sway_autotiling
swaymsg --type subscribe "['window']" --monitor | while read --local line
string length --quiet "$line"
or continue
set focused_container (swaymsg -t get_tree | jq -r '[null,.]|recurse(.[1] as $parent|try (.[1].nodes[]|[($parent|del(.nodes)),.]) catch empty) | select(.[1].focused... | Rewrite sway autotiling script in fish | Rewrite sway autotiling script in fish
| fish | mit | ammgws/dotfiles,ammgws/dotfiles,ammgws/dotfiles | |
825fe0b0b3c233fbb2fd5f4d6535f94a760bb3ac | .config/fish/config.fish | .config/fish/config.fish | # pyenv fish
set -gx PYENV_ROOT "$HOME/.pyenv"
set -x PATH $PATH "$PYENV_ROOT/bin"
status --is-interactive; and . (pyenv init - | psub)
# peco
function peco_select_history
if set -q $argv
history | peco | read line; commandline $line
else
history | peco --query $argv | read line; commandline $l... | # pyenv fish
set -gx PYENV_ROOT "$HOME/.pyenv"
set -x PATH $PATH "$PYENV_ROOT/bin"
status --is-interactive; and . (pyenv init - | psub)
# peco
function peco_select_history
if set -q $argv
history | peco | read line; commandline $line
else
history | peco --query $argv | read line; commandline $l... | Add alias gcb='git checkout -b' | Add alias gcb='git checkout -b'
| fish | mit | kyon-bll/.dotfiles |
f38fc0cef9e5d90181e9ca74832a49f617da7982 | HOME/.config/fish/functions/fish_prompt.fish | HOME/.config/fish/functions/fish_prompt.fish | function fish_prompt --description 'Write out the prompt'
set -l last_status $status
# User
set_color $fish_color_user
echo -n (whoami)
set_color normal
echo -n '@'
# Host
set_color $fish_color_host
echo -n (prompt_hostname)
set_color normal
echo -n ':'
# PWD
set_co... | Create custom fish prompt based on fish_config template | Create custom fish prompt based on fish_config template
| fish | mit | astronomerdamo/dotfiles | |
0c55ed88b0fdfa3880a3b853baf5693ae93e39f8 | functions/is-secret.fish | functions/is-secret.fish | function is-secret --argument key
trace (status --current-filename) $argv
if has (basename $key) (dirname $key)
set secret_header '-----BEGIN PGP MESSAGE-----'
set header (head -n 1 $key ^/dev/null)
test "$header" = "$secret_header"
else
false
end
end
| Add function to check if data is secret | Add function to check if data is secret
| fish | mit | colstrom/piranha,colstrom/shellops-aws | |
bf553b2ccf03337d0032c7514ecffc4f8fc6f518 | .config/fish/config.fish | .config/fish/config.fish | set --export EDITOR vim
set --export PATH /usr/local/bin $PATH
set --export PATH /usr/local/sbin $PATH
set fish_color_command white
set fish_color_autosuggestion yellow
set fish_pager_color_description yellow
set fish_color_param white
status --is-interactive; and . (rbenv init -|psub)
| set --export EDITOR vim
set --export PATH /usr/local/bin $PATH
set --export PATH /usr/local/sbin $PATH
set fish_color_command white
set fish_color_autosuggestion yellow
set fish_pager_color_description yellow
set fish_color_param white
status --is-interactive; and . (rbenv init -|psub)
set --export NVIM_TUI_ENABLE_T... | Enable true colors on neovim | Enable true colors on neovim
| fish | mit | lenon/dotfiles |
6862ad368ceda4ea8baba44f7de4c3b9e8938302 | .config/fish/config.fish | .config/fish/config.fish | # Source asdf
source ~/.asdf/asdf.fish
set -x ERL_AFLAGS "-kernel shell_history enabled"
| source ~/.asdf/asdf.fish
set -x ERL_AFLAGS "-kernel shell_history enabled"
set -g fish_user_paths "/usr/local/sbin" $fish_user_paths
| Add sbin to fish path | Add sbin to fish path
brew doctor says so
| fish | mit | rockwood/dotfiles,rockwood/dotfiles |
b306b0a5485fd5e8b8fe9b5fb2e1ca5288f11b80 | fish/.config/fish/conf.d/git-prompt-vars.fish | fish/.config/fish/conf.d/git-prompt-vars.fish | # show info about repo status
set -g __fish_git_prompt_show_informative_status true
# git status chars
set -g __fish_git_prompt_char_stateseparator ""
set -g __fish_git_prompt_char_dirtystate " !"
set -g __fish_git_prompt_char_invalidstate " X"
set -g __fish_git_prompt_char_stagedstate " ●"
set -g __fish_git_prompt_ch... | # show info about repo status
set -g __fish_git_prompt_show_informative_status true
# git status chars
set -g __fish_git_prompt_char_stateseparator ""
set -g __fish_git_prompt_char_dirtystate " !"
set -g __fish_git_prompt_char_invalidstate " X"
set -g __fish_git_prompt_char_stagedstate " Δ"
set -g __fish_git_prompt_ch... | Make staged state char a delta | Make staged state char a delta
| fish | bsd-3-clause | alpinebutterfly/dotfiles,alpinebutterfly/dotfiles,mpcsh/dotfiles |
1657720daf5345a361fc03270c9024d666ff5bc1 | conf.d/_mason-trash.fish | conf.d/_mason-trash.fish | function d -d 'Trash'
if type -q trash-put > /dev/null
set_color $yellow
printf 'Trashing file \"%s\"\n' $argv
set_color normal
trash-put $argv
else if type -q trash > /dev/null
trash -av $argv
else
log warn 'No trash program is available'
rm -ri $argv
end
end
function ddd -d 'Remov... | function d -d 'Trash'
if type -q trash-put > /dev/null
set_color $yellow
printf 'Trashing file \"%s\"\n' $argv
set_color normal
trash-put $argv
else if type -q trash > /dev/null
trash -v $argv
else
log warn 'No trash program is available'
rm -ri $argv
end
end
function ddd -d 'Remove... | Update `trash` arguments for version 0.9.2 | Update `trash` arguments for version 0.9.2
| fish | mit | masonwan/fish-config,masonwan/fish-config |
7a906da52e48cbef1266b9de0b248079177a60d6 | functions/expand:execute.fish | functions/expand:execute.fish | function expand:execute -d "Executes word expansion on the current token"
# Iterate available expansions for one that matches the current token.
for expansion in $__word_expansions
set -l expansion (echo $expansion)
# If the expansion matches, execute the expander and use its output as the replacement.
... | function expand:execute -d "Executes word expansion on the current token"
# Choose a filter.
if not set -q FILTER
if type -q peco
set FILTER 'peco --prompt ">" --layout bottom-up'
else if type -q percol
set FILTER 'percol'
else if type -q fzf
set FILTER 'fzf'
else if type -q select... | Add support for filtering available expansions | Add support for filtering available expansions
| fish | mit | oh-my-fish/plugin-expand |
a0e4e199ddac096298fe86e46687c713ff5926b7 | config/fish/config.fish | config/fish/config.fish | # Uncomment this if the modal indicator becomes annoying
#function fish_mode_prompt; end
# Path to dotfiles repo
set -x DOTFILES (dirname (readlink "$HOME/.config"))
# Target stuff
set -x DRONE_SERVER drone6.target.com
#set -gx PATH \$PATH ~/
set -gx PATH $HOME/.bin $PATH
# abrew
set -gx PATH /opt/homebrew/bin $PATH... | # Uncomment this if the modal indicator becomes annoying
#function fish_mode_prompt; end
# Path to dotfiles repo
set -x DOTFILES (dirname (readlink "$HOME/.config"))
# Target stuff
set -x DRONE_SERVER drone6.target.com
#set -gx PATH \$PATH ~/
set -gx PATH $HOME/.bin $PATH
# abrew
set -gx PATH /opt/homebrew/bin $PATH... | Add Slack to Fish PATH | Add Slack to Fish PATH
| fish | mit | eskerber/dotfiles,eskerber/dotfiles,eskerber/dotfiles,eskerber/dotfiles |
8ecb7b06123dbfff556f54fc17758ec2d5aab77a | Library/Contributions/brew_fish_completion.fish | Library/Contributions/brew_fish_completion.fish | # This script contains basic completion of brew commands for
# fish (http://fishshell.org). To install it either put it
# in <your-fish-install-location>/share/fish/completions
# or ~/.config/fish/completions - and name it 'brew.fish'
# e.g.:
# mkdir -p ~/.config/fish/completions
# cp brew_fish_completion.fish ~/.c... | Add fish completions for the brew binary | Add fish completions for the brew binary
See Library/Contributions
| fish | bsd-2-clause | mahori/brew,MikeMcQuaid/brew,Linuxbrew/brew,pseudocody/brew,claui/brew,ilovezfs/brew,Homebrew/brew,reitermarkus/brew,palxex/brew,bfontaine/brew,reitermarkus/brew,sjackman/homebrew,mahori/brew,Linuxbrew/brew,MikeMcQuaid/brew,AnastasiaSulyagina/brew,vitorgalvao/brew,zmwangx/brew,aw1621107/brew,aw1621107/brew,staticfloat/... | |
6d95a217f097930cc320b2bfa1bf694d2ff38876 | functions/users-not-in-group.fish | functions/users-not-in-group.fish | function users-not-in-group --argument group
if empty "$group"
usage users-not-in-group '<group>'
return (false)
end
comm -13 (users-in-group $group | psub) (get users | psub)
end
| function users-not-in-group --argument group
if empty "$group"
usage users-not-in-group '<group>'
return (false)
end
comm -13 (users-in-group $group | sort | psub) (get users | sort | psub)
end
| Sort results before sending to comm | Sort results before sending to comm
| fish | mit | colstrom/shellops-aws,colstrom/piranha |
f78dae34b323358e647d0e9be0f735afc5c7349a | .config/fish/functions/fn.fish | .config/fish/functions/fn.fish | # Create a new function.
function fn --argument-names function_name
if functions --query $function_name
yn $function_name" already exists. Edit?"
and fe $function_name
return
end
set -l file ~/.config/fish/functions/$function_name.fish
# Function template
echo \
"# $fun... | # Create a new function.
function fn --argument-names function_name
if functions --query $function_name
yn $function_name" already exists. Edit?"
and fe $function_name
return
end
set -l file ~/.config/fish/functions/$function_name.fish
# Function template
echo \
"# $fun... | Add switch to function template | Add switch to function template
| fish | mit | phatblat/dotfiles,phatblat/dotfiles,phatblat/dotfiles,phatblat/dotfiles,phatblat/dotfiles,phatblat/dotfiles |
c5cc945c1d335f9a388499916ba9c9b9dd469bb7 | .config/fish/functions/chrome.fish | .config/fish/functions/chrome.fish | # Launch Google Chrome.
function chrome
open -a "Google Chrome" --args --new-window $argv
end
| # Launch Google Chrome.
#
# When Chrome is launched via this function the 1Password extension reports
#
# > Browser could not be verified.
#
function chrome
open -a "Google Chrome" --args --new-window $argv
end
| Add not about 1Password extension | Add not about 1Password extension
| fish | mit | phatblat/dotfiles,phatblat/dotfiles,phatblat/dotfiles,phatblat/dotfiles,phatblat/dotfiles,phatblat/dotfiles |
a1f32007d52eb1dd261228377d1bbe8562086055 | functions/assign-ip.fish | functions/assign-ip.fish | function assign-ip --argument vpc instance
print-status assign-ip "$argv"
if empty "$vpc" "$instance"
usage assign-ip '<vpc>' '<instance>'
return (false)
end
set --local ip (get vpcs/$vpc/instances/$instance/ip)
empty $ip
and set ip (unassigned-ips | head -n 1)
empty $ip
... | Add function to assign an IP to an instance | Add function to assign an IP to an instance
| fish | mit | colstrom/shellops-aws,colstrom/piranha | |
3606c0a650ee5bdcdefb1c9bfad12f317d322d37 | .config/fish/conf.d.symlink/00-path.fish | .config/fish/conf.d.symlink/00-path.fish | if status --is-login
eval (brew shellenv)
for py_version in 3.9 3.8 3.7
set PATH $PATH $HOMEBREW_PREFIX/opt/python@$py_version/bin
end
# Volta <https://volta.sh>
set -x VOLTA_HOME $HOME/.volta
set PATH $VOLTA_HOME/bin $PATH
# Cargo
set PATH $HOME/.cargo/bin $PATH
# shivs
... | if status --is-login
set -gx HOMEBREW_PREFIX (brew --prefix)
for py_version in 3.9 3.8 3.7
fish_add_path --append $HOMEBREW_PREFIX/opt/python@$py_version/bin
end
# Volta <https://volta.sh>
set -x VOLTA_HOME $HOME/.volta
fish_add_path --prepend $VOLTA_HOME/bin
# Cargo
fish_add_... | Use fish_add_path to manage $PATH | Use fish_add_path to manage $PATH
This is available on `master` and will be part of 3.2.0.
https://github.com/fish-shell/fish-shell/pull/7028
| fish | mit | rouge8/dotfiles,rouge8/dotfiles,rouge8/dotfiles |
53a0cf156c99d532926f577e963a8018cbb087e6 | fish/config.fish | fish/config.fish | # A workaround for Fish re-reading config for non-interactive execution:
# https://git.io/yj4KoA
if not status --is-interactive
exit
end
# fundle
fundle plugin 'edc/bass'
fundle plugin 'brgmnn/fish-docker-compose'
fundle init
# rbenv
if which rbenv > /dev/null
source (rbenv init -|psub)
end
# pyenv
if which pyen... | # A workaround for Fish re-reading config for non-interactive execution:
# https://git.io/yj4KoA
if not status --is-interactive
exit
end
# fundle
fundle plugin 'edc/bass'
fundle plugin 'brgmnn/fish-docker-compose'
fundle init
# rbenv
if which rbenv > /dev/null
source (rbenv init -|psub)
end
# pyenv
if which pyen... | Fix bug where `which go` output printed to terminal | Fix bug where `which go` output printed to terminal
| fish | mit | toddmazierski/dotfiles,toddmazierski/dotfiles |
3ea63b0531232ffe8cacbc169d702a5d336d8d6e | functions/enable-mfa.fish | functions/enable-mfa.fish | function enable-mfa --argument user code1 code2
trace (status --current-filename) $argv
if empty "$user" "$code1" "$code2"
usage enable-mfa '<user>' '<code-1>' '<code-2>'
return (false)
end
print-status enable-mfa "$argv"
if not mfa-enabled $user
aws iam enable-mfa-device ... | Add function to enable MFA devices | Add function to enable MFA devices
| fish | mit | colstrom/shellops-aws,colstrom/piranha | |
3592651074d6256d04879780e621245ed03dc938 | config/fish/functions/clone.fish | config/fish/functions/clone.fish | function __clone_exec --argument-names {project}
set --local result (string match --regex "https://github.com/([^/]+)/([^./]+)" $project)
or set --local result (string match --regex "git@github.com/([^/]+)/([^./]+)" $project)
or set --local result (string match --regex "([^/]+)/([^./]+)" $project)
or return 1
... | function __clone_exec --argument-names project
if set --local result (string match --regex "https://github.com/([^/]+)/([^./]+)" $project)
else if set --local result (string match --regex "git@github.com:([^/]+)/([^./]+)" $project)
else if set --local result (string match --regex "([^/]+)/([^./]+)" $project)
el... | Fix regular SSH regular expression | Fix regular SSH regular expression
| fish | mit | lee-dohm/dotfiles,lee-dohm/dotfiles,lee-dohm/dotfiles,lee-dohm/dotfiles |
447a8a072a383a532a7d9cb09ab31791da079921 | fish/functions/shift_scheme.fish | fish/functions/shift_scheme.fish | function shift_scheme
set fish_color_autosuggestion 3a3a3a brblack
set fish_color_cancel -r
set fish_color_command ffbf00
set fish_color_comment 7f7f7f
# These colors are not used in the prompt
set fish_color_cwd normal
set fish_color_cwd_root normal
set fish_color_end --bold ff7f00
set fish_color_err... | function shift_scheme
set fish_color_autosuggestion 7f7f7f brblack
set fish_color_cancel -r
set fish_color_command ffbf00
set fish_color_comment 7f7f7f
# These colors are not used in the prompt
set fish_color_cwd normal
set fish_color_cwd_root normal
set fish_color_end --bold ff7f00
set fish_color_err... | Fix some colors in the scheme | Fix some colors in the scheme
| fish | mit | wilfriedvanasten/miscvar,wilfriedvanasten/miscvar,wilfriedvanasten/miscvar |
ab80a955e5f6bda3193dc0030a00373ca072deb5 | .config/fish/functions/ra.fish | .config/fish/functions/ra.fish | function ra --description 'Adds a git remote' --argument name url
git remote add $name $url
end
| function ra --description 'Adds a git remote' --argument name url
git remote add $name $url
rv
end
| Print new remotes after one is added | Print new remotes after one is added
| fish | mit | phatblat/dotfiles,phatblat/dotfiles,phatblat/dotfiles,phatblat/dotfiles,phatblat/dotfiles,phatblat/dotfiles |
4e89bc5a8ffcd8a5ffef6ea84cf4e99cd76f7046 | themes/krisleech/fish_prompt.fish | themes/krisleech/fish_prompt.fish | function _git_branch_name
echo (git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
end
function _is_git_dirty
echo (git status -s --ignore-submodules=dirty ^/dev/null)
end
function fish_prompt
set -l cyan (set_color -o cyan)
set -l yellow (set_color -o yellow)
set -l red (set_color -o red)
set ... | function _git_branch_name
echo (git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
end
function _is_git_dirty
echo (git status -s --ignore-submodules=dirty ^/dev/null)
end
function fish_prompt
set -l cyan (set_color -o cyan)
set -l yellow (set_color -o yellow)
set -l red (set_color -o red)
set ... | Fix prompt so it shows the red pipe even when in the home directory | Fix prompt so it shows the red pipe even when in the home directory | fish | mit | wangyung/oh-my-fish,ovstetun/oh-my-fish,joseluisq/oh-my-fish,MaicoTimmerman/oh-my-fish,wfscheper/oh-my-fish,marcker/oh-my-fish,jeremiejig/oh-my-fish,vukk/oh-my-fish,lfiolhais/oh-my-fish,hfs/oh-my-fish,oh-my-fish/oh-my-fish,nelsonjchen/oh-my-fish,jeremiejig/oh-my-fish,cap10morgan/oh-my-fish,VANITAX/oh-my-fish,gblmarquez... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.