small fixups to the tutorial

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

small fixups to the tutorial

Mathias Laurin
Hi list,


Zecke told me that I should send my patches to the mailing list,
so here I am.


I am half through the online tutorial now and I would have a few
more typos, formatting, stuttering, and whitespace fixes. I have
grouped them in a single patch: `typos_and_whitespace.diff`.

Also, the `Checking` class' `printOn:` message (section 6.6.2)
prints the `'` marks. The changes in
`improved_checking_printon.diff` use the `stream nextPutAll`
already introduced in 6.4.5 for a better looking `printOn:`.

Also, I think that it could be a good idea to remove the
blank lines from the code examples, here is what I mean:

        --- a/doc/tutorial.texi
        +++ b/doc/tutorial.texi
        @@ -1467,19 +1467,15 @@ more sanity checks to the writing of checks.
            writeCheck: amount [
                <category: 'spending'>
                | num |
        -
                "Sanity check that we have checks left in our checkbook"
                (checksleft < 1)
                    ifTrue: [ ^self error: 'Out of checks' ].
        -
                "Make sure we've never used this check number before"
                num := checknum.
                (history includesKey: num)
                    ifTrue: [ ^self error: 'Duplicate check number' ].
        -
                "Record the check number and amount"
                history at: num put: amount.
        -
                "Update our next checknumber, checks left, and balance"
                checknum := checknum + 1.
                checksleft := checksleft - 1.


because it would allow users to copy and paste the examples
directly in a live interactive session. If you agree, I can make
another patch.


Finally, I am not sure whether I should write to the Changelog
or you do it... I have not done it.


In any case, thank you for the very nice tutorial!


Best regards,
Mathias

_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk

improved_checking_printon.diff (543 bytes) Download Attachment
typos_and_whitespace.diff (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: small fixups to the tutorial

bill-auger
i was hoping someone would respond to this as i have a rather large set
of corrections and suggestions for the manual - i sent a message to this
list about a year ago but no one has responded


_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk

signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: small fixups to the tutorial

Holger Freyther
In reply to this post by Mathias Laurin


> On 23. Jan 2018, at 20:02, Mathias Laurin <[hidden email]> wrote:
>
> Hi list,

Hi!


> Zecke told me that I should send my patches to the mailing list,
> so here I am.

sorry for the delay. The new day job took most of my time and energy.


> I am half through the online tutorial now and I would have a few
> more typos, formatting, stuttering, and whitespace fixes. I have
> grouped them in a single patch: `typos_and_whitespace.diff`.

great. I think one example is still wrong.

-   i := (Interval from: 5 to: 10 by: 2)
-   i do: [:x| x printNl]
+   i := Interval from: 5 to: 10 by: 2
+   i do: [:x | x printNl]

We need a "." after "Interval from..."?




> Also, the `Checking` class' `printOn:` message (section 6.6.2)
> prints the `'` marks. The changes in
> `improved_checking_printon.diff` use the `stream nextPutAll`
> already introduced in 6.4.5 for a better looking `printOn:`.

Not sure. Maybe the goal of the section was to show that instances
have a >>#printOn: method?

> Also, I think that it could be a good idea to remove the
> blank lines from the code examples, here is what I mean:
>



> because it would allow users to copy and paste the examples
> directly in a live interactive session. If you agree, I can make
> another patch.

Oh what happens with the parser and whitespace? What is the exception
you see? In general I would want to avoid whitespace only changes, they
make git blame more difficult to read/handle.


> Finally, I am not sure whether I should write to the Changelog
> or you do it... I have not done it.

Yes please. The best would be:

* Have a changelog entry and make a full git commit
* Use git send-email to send the patch to this list (so we can comment inline)

If you make more changes to the file I will need to ask you to make a
copyright assignment to the FSF.

have a nice day

        holger







_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: small fixups to the tutorial

Holger Freyther
In reply to this post by bill-auger


> On 5. Feb 2018, at 13:30, bill-auger <[hidden email]> wrote:
>

Hi,


> i was hoping someone would respond to this as i have a rather large set
> of corrections and suggestions for the manual - i sent a message to this
> list about a year ago but no one has responded

if it is larger I might have to ask you to do paperwork with the FSF to
assign copyright. Would you be interested in that?

holger

_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: small fixups to the tutorial

Mathias Laurin
Hi Holger,

> if it is larger I might have to ask you to do paperwork with the FSF to
> assign copyright. Would you be interested in that?

Sure! Just tell me what to do.

Mathias

_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk