From ef98f1de68a3452ceedb7c6e91de75f71ec50d4a Mon Sep 17 00:00:00 2001 From: Bruno Deferrari Date: Wed, 16 Sep 2009 19:58:45 -0300 Subject: [PATCH 1/4] irc.client: Fix detach chat (wasn't sending a PART message) --- extra/irc/client/internals/internals-tests.factor | 8 +++++++- extra/irc/client/internals/internals.factor | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/extra/irc/client/internals/internals-tests.factor b/extra/irc/client/internals/internals-tests.factor index a591fe9ce0..84510fb67e 100644 --- a/extra/irc/client/internals/internals-tests.factor +++ b/extra/irc/client/internals/internals-tests.factor @@ -99,7 +99,13 @@ M: mb-writer dispose drop ; ! Test join [ { "JOIN #factortest" } [ - "#factortest" %join %pop-output-line + "#factortest" %join %pop-output-line + ] unit-test +] spawning-irc + +[ { "PART #factortest" } [ + "#factortest" %join %pop-output-line drop + "#factortest" chat> remove-chat %pop-output-line ] unit-test ] spawning-irc diff --git a/extra/irc/client/internals/internals.factor b/extra/irc/client/internals/internals.factor index 6ce851e7dd..ef1695f563 100644 --- a/extra/irc/client/internals/internals.factor +++ b/extra/irc/client/internals/internals.factor @@ -172,7 +172,7 @@ M: irc-nick-chat remove-chat name>> unregister-chat ; M: irc-server-chat remove-chat drop +server-chat+ unregister-chat ; M: irc-channel-chat remove-chat - [ part new annotate-message irc-send ] + [ name>> "PART " prepend string>irc-message irc-send ] [ name>> unregister-chat ] bi ; : (speak) ( message irc-chat -- ) swap annotate-message irc-send ; From d79b6d590eff83e22152587f5c163bfb74b42f82 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Wed, 16 Sep 2009 16:11:05 -0700 Subject: [PATCH 2/4] html.templates.chloe: minor doc fix --- basis/html/templates/chloe/chloe-docs.factor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basis/html/templates/chloe/chloe-docs.factor b/basis/html/templates/chloe/chloe-docs.factor index 9716407de8..61121bd769 100644 --- a/basis/html/templates/chloe/chloe-docs.factor +++ b/basis/html/templates/chloe/chloe-docs.factor @@ -24,7 +24,7 @@ HELP: compile-attr { $description "Compiles code which pushes an attribute value previously extracted by " { $link required-attr } " or " { $link optional-attr } " on the stack. If the attribute value begins with " { $snippet "@" } ", compiles into code which pushes the a form value." } ; HELP: CHLOE: -{ $syntax "name definition... ;" } +{ $syntax "CHLOE: name definition... ;" } { $values { "name" "the tag name" } { "definition" { $quotation "( tag -- )" } } } { $description "Defines compilation semantics for the Chloe tag named " { $snippet "tag" } ". The definition body receives a " { $link tag } " on the stack." } ; From 8d83824bb8415bc203dcc102cc6233822305535c Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Wed, 16 Sep 2009 16:13:55 -0700 Subject: [PATCH 3/4] benchmark.spectral-norm: take out unsafe sequence access since it doesn't make it faster, and replace tuck/2bi* with bi-curry bi* --- extra/benchmark/spectral-norm/spectral-norm.factor | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/extra/benchmark/spectral-norm/spectral-norm.factor b/extra/benchmark/spectral-norm/spectral-norm.factor index 4f93367b8a..41ae5b3578 100644 --- a/extra/benchmark/spectral-norm/spectral-norm.factor +++ b/extra/benchmark/spectral-norm/spectral-norm.factor @@ -1,8 +1,7 @@ ! Factor port of ! http://shootout.alioth.debian.org/gp4/benchmark.php?test=spectralnorm&lang=all USING: specialized-arrays kernel math math.functions -math.vectors sequences sequences.private prettyprint words hints -locals ; +math.vectors sequences prettyprint words hints locals ; SPECIALIZED-ARRAY: double IN: benchmark.spectral-norm @@ -19,13 +18,13 @@ IN: benchmark.spectral-norm + 1 + recip ; inline : (eval-A-times-u) ( u i j -- x ) - tuck [ swap nth-unsafe ] [ eval-A ] 2bi* * ; inline + [ swap nth ] [ eval-A ] bi-curry bi* * ; inline : eval-A-times-u ( n u -- seq ) [ (eval-A-times-u) ] inner-loop ; inline : (eval-At-times-u) ( u i j -- x ) - tuck [ swap nth-unsafe ] [ swap eval-A ] 2bi* * ; inline + [ swap nth ] [ swap eval-A ] bi-curry bi* * ; inline : eval-At-times-u ( u n -- seq ) [ (eval-At-times-u) ] inner-loop ; inline From 97d4ac27988946e6a64e9c8f80a56b960a662f0c Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Thu, 17 Sep 2009 09:14:56 -0700 Subject: [PATCH 4/4] bootstrap.stage1: decent error message if stage2.factor can't be found --- core/bootstrap/stage1.factor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/bootstrap/stage1.factor b/core/bootstrap/stage1.factor index c7be17e38d..9c84904ff7 100644 --- a/core/bootstrap/stage1.factor +++ b/core/bootstrap/stage1.factor @@ -40,7 +40,7 @@ load-help? off "bootstrap.layouts" require [ - "vocab:bootstrap/stage2.factor" + "resource:basis/bootstrap/stage2.factor" dup exists? [ run-file ] [