Merge commit 'otoburb/master' into merge-otoburb
Conflicts: basis/ui/backend/gtk/gtk.factordb4
commit
2cbd31d34d
|
@ -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"
|
|
@ -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.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors alien.accessors alien.c-types alien.data
|
USING: accessors alien.accessors alien.c-types alien.data
|
||||||
alien.strings arrays assocs classes.struct command-line continuations
|
alien.strings arrays assocs classes.struct command-line
|
||||||
destructors gdk.ffi gdk.gl.ffi glib.ffi
|
continuations destructors environment gdk.ffi gdk.gl.ffi
|
||||||
gobject-introspection.standard-types gobject.ffi gtk.ffi gtk.gl.ffi
|
glib.ffi gobject-introspection.standard-types gobject.ffi
|
||||||
io.encodings.utf8 kernel libc literals locals math math.bitwise
|
gtk.ffi gtk.gl.ffi io.encodings.utf8 kernel libc literals locals
|
||||||
math.order math.vectors namespaces sequences strings system threads ui
|
math math.bitwise math.order math.vectors namespaces sequences
|
||||||
ui.backend ui.backend.gtk.input-methods ui.backend.gtk.io
|
strings system threads ui ui.backend ui.backend.gtk.input-methods
|
||||||
ui.clipboards ui.event-loop ui.gadgets ui.gadgets.private
|
ui.backend.gtk.io ui.clipboards ui.event-loop ui.gadgets
|
||||||
ui.gadgets.worlds ui.gestures ui.pixel-formats
|
ui.gadgets.private ui.gadgets.worlds ui.gestures
|
||||||
ui.pixel-formats.private ui.private vocabs.loader ;
|
ui.pixel-formats ui.pixel-formats.private ui.private
|
||||||
|
vocabs.loader ;
|
||||||
IN: ui.backend.gtk
|
IN: ui.backend.gtk
|
||||||
|
|
||||||
SINGLETON: gtk-ui-backend
|
SINGLETON: gtk-ui-backend
|
||||||
|
@ -507,4 +508,4 @@ gtk-ui-backend ui-backend set-global
|
||||||
{ "ui.backend.gtk" "ui.gadgets.editors" }
|
{ "ui.backend.gtk" "ui.gadgets.editors" }
|
||||||
"ui.backend.gtk.input-methods.editors" require-when
|
"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
|
||||||
|
|
|
@ -77,6 +77,7 @@ $nl
|
||||||
{ $vocab-subsection "MD5 checksum" "checksums.md5" }
|
{ $vocab-subsection "MD5 checksum" "checksums.md5" }
|
||||||
{ $vocab-subsection "SHA checksums" "checksums.sha" }
|
{ $vocab-subsection "SHA checksums" "checksums.sha" }
|
||||||
{ $vocab-subsection "Adler-32 checksum" "checksums.adler-32" }
|
{ $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"
|
ABOUT: "checksums"
|
||||||
|
|
|
@ -175,7 +175,7 @@ $nl
|
||||||
$nl
|
$nl
|
||||||
"There are two alternatives which are preferred to subclassing in this case. The first is " { $link "mixins" } "."
|
"There are two alternatives which are preferred to subclassing in this case. The first is " { $link "mixins" } "."
|
||||||
$nl
|
$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" }
|
{ $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."
|
"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" } ;
|
{ $see-also "parametrized-constructors" } ;
|
||||||
|
|
Loading…
Reference in New Issue