From: ducasse <ducasse(a)iam.unibe.ch>
Date: Mar oct 7, 2003 09:00:08 Europe/Zurich
To: "John Brant" <brant(a)refactory.com>
Cc: Lukas Renggli <renggli(a)student.unibe.ch>ch>, Alexandre Bergel
<bergel(a)iam.unibe.ch>
Subject: Re: smallwiki
Thanks john,
Excellent, I wish I would have you as a teacher, really!
I learned something too. Could you let us know the bugs that you fixed
so that we can add tests?
By the way, will you work on another back-end storage?
Another question that we have is how to bundle SmallWiki. I was
thinking that the version of the required package such as
SmaCC, SIXX, Swazoo should be fixed so that we do not have a bug
because one package is loaded while another version is expected.
Stef
On Mardi, oct 7, 2003, at 05:32 Europe/Zurich, John Brant wrote:
I finally got around to porting SmallWiki to
#Smalltalk. I've gotten
it to
run. I don't have any storage hooked up yet, but most things appear
to be
working. Anyway, here are some more comments:
*) The Folder>>defaultDocument method adds a Code item instead of a
Paragraph -- there's a missing ";".
*) SwazooServer>>start has hard coded the ip to be '*'.
*) The tests don't have great coverage. I had to fix several bugs
after all
tests passed.
*) You can't save the Syntax page after you edit it. This occurs in
VW also.
It appears that it is interpreting the "*" inside the
"<code>*</code>".
*) When you have an exception handler, the exception block shouldn't
just
return since that isn't legal ANSI Smalltalk. For example, instead of
having
"[self something] on: Error do: [:ex | 5]" it should be "[self
something]
on: Error do: [:ex | ex return: 5]".
*) Does the #nextVersionBecome: message ever get sent where the
argument's
class isn't the same as the receiver's class? I didn't see any places
where
that would happen so I changed it to be:
nextVersionBecome: aStructure
| previous |
previous := self copy.
self instanceVariableNames do: [:each | self instanceVariableNamed:
each put: (aStructure instanceVariableNamed: each)].
self version: previous version + 1.
self predecessor: previous.
^self
This version gets around having to #become: the versions.
*) Here's an ANSI version of the moveDown:ifError:
moveDown: anObject ifError: aBlock
| index temp |
index := self indexOf: anObject.
(index between: 1 and: self size - 1)
ifTrue: [ temp := self at: index.
self at: index put: (self at: index + 1).
self at: index + 1 put: temp ]
ifFalse: [ aBlock value ]
#swap:with: and #find: are VW messages (probably Squeak also has
them, but I
don't think VA or Dolphin does).
*) It would be nice if the integer comparisons used #= instead of
#==. In
#Smalltalk, "1 + 2 == 3" is false since I have to use real objects for
integers.
*) The VisitorRendererWiki>>contents message assumes that "stream cr"
only
puts one character in the string. It would be better if the #cr
wasn't put
on the stream to begin with so we didn't need the #copyFrom:to:.
*) The Folder>>remove: method assumes that #remove: throws an error
if the
item isn't in the collection -- the ANSI standard says that the
behavior is
undefined, so #Smalltalk doesn't throw an error. Anyway, I doubt that
it is
really necessary, but there are a few tests for the error.
*) Is there some location I can download the .css files from? If I
run a
server, I'd prefer not to have to go to your server for each of the
.css
files. Also, are those files under the same MIT license?
John Brant