Merge commit 'otoburb/master' into merge-otoburb

Conflicts:

	basis/ui/backend/gtk/gtk.factor
db4
Slava Pestov 2011-04-06 17:54:00 -04:00
commit 2cbd31d34d
4 changed files with 26 additions and 13 deletions

View File

@ -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"

View File

@ -1,15 +1,16 @@
! Copyright (C) 2010, 2011 Anton Gorenko, Philipp Brüschweiler.
! Copyright (C) 2010, 2011 Anton Gorenko, Philipp Bruschweiler.
! 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 continuations
destructors 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 ui.backend.gtk.io
ui.clipboards ui.event-loop ui.gadgets ui.gadgets.private
ui.gadgets.worlds ui.gestures ui.pixel-formats
ui.pixel-formats.private ui.private vocabs.loader ;
alien.strings arrays assocs classes.struct command-line
continuations destructors 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
ui.backend.gtk.io ui.clipboards ui.event-loop ui.gadgets
ui.gadgets.private ui.gadgets.worlds ui.gestures
ui.pixel-formats ui.pixel-formats.private ui.private
vocabs.loader ;
IN: ui.backend.gtk
SINGLETON: gtk-ui-backend
@ -507,4 +508,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

View File

@ -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"

View File

@ -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" } ;