From 8c680aa06f41334e5f0328008a0d0d602e806d68 Mon Sep 17 00:00:00 2001 From: otoburb Date: Wed, 23 Mar 2011 03:51:55 +0000 Subject: [PATCH 1/5] Checksums help article update: Added internet checksums brief description --- basis/checksums/internet/internet-docs.factor | 11 +++++++++++ core/checksums/checksums-docs.factor | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 basis/checksums/internet/internet-docs.factor diff --git a/basis/checksums/internet/internet-docs.factor b/basis/checksums/internet/internet-docs.factor new file mode 100644 index 0000000000..c25f1246a7 --- /dev/null +++ b/basis/checksums/internet/internet-docs.factor @@ -0,0 +1,11 @@ +USING: help.markup help.syntax ; +IN: checksums.internet + +HELP: internet +{ $class-description "Internet (RFC1071) checksum algorithm." } ; + +ARTICLE: "checksums.internet" "Internet checksum" +"The internet checksum algorithm implements RFC1071 (" { $url "http://www.ietf.org/rfc/rfc1141.txt" } ")." +{ $subsections internet } ; + +ABOUT: "checksums.internet" diff --git a/core/checksums/checksums-docs.factor b/core/checksums/checksums-docs.factor index d74ba83e58..498e23f01f 100644 --- a/core/checksums/checksums-docs.factor +++ b/core/checksums/checksums-docs.factor @@ -77,6 +77,7 @@ $nl { $vocab-subsection "MD5 checksum" "checksums.md5" } { $vocab-subsection "SHA checksums" "checksums.sha" } { $vocab-subsection "Adler-32 checksum" "checksums.adler-32" } -{ $vocab-subsection "OpenSSL checksums" "checksums.openssl" } ; +{ $vocab-subsection "OpenSSL checksums" "checksums.openssl" } +{ $vocab-subsection "Internet checksum" "checksums.internet" } ; ABOUT: "checksums" From 107d9dd385e4a6cfd4b7a5a248cea2cf26809b3b Mon Sep 17 00:00:00 2001 From: otoburb Date: Thu, 24 Mar 2011 04:48:48 +0000 Subject: [PATCH 2/5] Tuple subclassing help article: Fixed typo --- core/classes/tuple/tuple-docs.factor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/classes/tuple/tuple-docs.factor b/core/classes/tuple/tuple-docs.factor index 6de3ed2957..6587889de6 100644 --- a/core/classes/tuple/tuple-docs.factor +++ b/core/classes/tuple/tuple-docs.factor @@ -175,7 +175,7 @@ $nl $nl "There are two alternatives which are preferred to subclassing in this case. The first is " { $link "mixins" } "." $nl -"The second is to use ad-hoc slot polymorphism. If two classes define a slot with the same name, then code which uses " { $link "accessors" } " can operate on instances of both objects, assuming the values stored in that slot implement a common protocol. This allows code to be shared without creating contrieved relationships between classes." +"The second is to use ad-hoc slot polymorphism. If two classes define a slot with the same name, then code which uses " { $link "accessors" } " can operate on instances of both objects, assuming the values stored in that slot implement a common protocol. This allows code to be shared without creating contrived relationships between classes." { $heading "Anti-pattern #3: subclassing to override a method definition" } "While method overriding is a very powerful tool, improper use can cause tight coupling of code and lead to difficulty in testing and refactoring. Subclassing should not be used as a means of “monkey patching” methods to fix bugs and add features. Only subclass from classes which were designed to be inherited from, and when writing classes of your own which are intended to be subclassed, clearly document what subclasses may and may not do. This includes construction policy; document whether subclasses should use " { $link new } ", " { $link boa } ", or a custom parametrized constructor." { $see-also "parametrized-constructors" } ; From 938d6413d8671d05d9187d07dfc4d86e6e70361f Mon Sep 17 00:00:00 2001 From: otoburb Date: Fri, 1 Apr 2011 03:24:22 +0000 Subject: [PATCH 3/5] factor.sh: Propogated NO_UI=1 flag into the bootstrap via -exclude="ui ui.tools" --- build-support/factor.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build-support/factor.sh b/build-support/factor.sh index 52a989b78d..35ee32706c 100755 --- a/build-support/factor.sh +++ b/build-support/factor.sh @@ -493,7 +493,11 @@ copy_fresh_image() { } bootstrap() { - ./$FACTOR_BINARY -i=$BOOT_IMAGE + if [[ -z $NO_UI ]]; then + ./$FACTOR_BINARY -i=$BOOT_IMAGE + else + ./$FACTOR_BINARY -i=$BOOT_IMAGE -exclude="ui ui.tools" + fi copy_fresh_image } From b7d22cd14bc15a431669935a3c5780122f4ccfc0 Mon Sep 17 00:00:00 2001 From: otoburb Date: Mon, 4 Apr 2011 13:03:14 +0000 Subject: [PATCH 4/5] Revert "factor.sh: Propogated NO_UI=1 flag into the bootstrap via -exclude="ui ui.tools"" This reverts commit 0d49e736544da6a19e49acfed6a80ac24eafdac0. --- build-support/factor.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/build-support/factor.sh b/build-support/factor.sh index 35ee32706c..52a989b78d 100755 --- a/build-support/factor.sh +++ b/build-support/factor.sh @@ -493,11 +493,7 @@ copy_fresh_image() { } bootstrap() { - if [[ -z $NO_UI ]]; then - ./$FACTOR_BINARY -i=$BOOT_IMAGE - else - ./$FACTOR_BINARY -i=$BOOT_IMAGE -exclude="ui ui.tools" - fi + ./$FACTOR_BINARY -i=$BOOT_IMAGE copy_fresh_image } From 5744764f07e420fd1d3bf3416a8eb54d76dce87d Mon Sep 17 00:00:00 2001 From: otoburb Date: Wed, 6 Apr 2011 00:02:15 +0000 Subject: [PATCH 5/5] gtk.factor: Changed init behaviour so if $DISPLAY is not set, runs tty listener, otherwise UI listener. --- basis/ui/backend/gtk/gtk.factor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/basis/ui/backend/gtk/gtk.factor b/basis/ui/backend/gtk/gtk.factor index 378a2b56c2..c61080d832 100644 --- a/basis/ui/backend/gtk/gtk.factor +++ b/basis/ui/backend/gtk/gtk.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors alien.accessors alien.c-types alien.data alien.strings arrays assocs classes.struct command-line destructors -gdk.ffi gdk.gl.ffi glib.ffi gobject-introspection.standard-types +environment gdk.ffi gdk.gl.ffi glib.ffi gobject-introspection.standard-types gobject.ffi gtk.ffi gtk.gl.ffi io.encodings.utf8 kernel libc literals locals math math.bitwise math.order math.vectors namespaces sequences strings system threads ui ui.backend ui.backend.gtk.input-methods @@ -503,4 +503,4 @@ gtk-ui-backend ui-backend set-global { "ui.backend.gtk" "ui.gadgets.editors" } "ui.backend.gtk.input-methods.editors" require-when -[ "ui.tools" ] main-vocab-hook set-global +[ "DISPLAY" os-env "ui.tools" "listener" ? ] main-vocab-hook set-global