ReScience / submissions

ReScience C submissions
28 stars 7 forks source link

[Rp] Loupe #12

Closed rougier closed 4 years ago

rougier commented 4 years ago

Original article: N. P. Rougier. “LOUPE.” In: Tremplin Micro 19 (Mar. 1988), pp. 60–61

PDF: https://github.com/rougier/TYRC-apple/blob/master/article/article.pdf Metadata: https://github.com/rougier/TYRC-apple/blob/master/article/metadata.yaml Code: https://github.com/rougier/TYRC-apple

Scientific domain: None Programming language: Applesoft basic 😄 Suggested editor: @khinsen Suggested reviewer: @BrunoLevy

khinsen commented 4 years ago

Thanks for your submission! This has a good chance of remaining the oldest code submitted to the challenge.

@BrunoLevy, can you review this contribution?

BrunoLevy commented 4 years ago

Yep, I can do that (and I can test it on my Apple2 that is still in working condition :-)

-- B

On 1/7/20 1:27 PM, Konrad Hinsen wrote:

Thanks for your submission! This has a good chance of remaining the oldest code submitted to the challenge.

@BrunoLevy https://github.com/BrunoLevy, can you review this contribution?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ReScience/submissions/issues/12?email_source=notifications&email_token=AEUTN3JF6RKYTVYM7E7GHIDQ4RYJJA5CNFSM4KDVXY7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIIWROQ#issuecomment-571566266, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEUTN3NPUWEI3KCGROLQOT3Q4RYJJANCNFSM4KDVXY7A.

rougier commented 4 years ago

@rougier @BrunoLevy Gentle reminder for the review...

rougier commented 4 years ago

@khinsen @BrunoLevy Gentle reminder, review needed.

rougier commented 4 years ago

@khinsen Maybe you need to contact @BrunoLevy by mail for the review (not sure he gets GitHub notification)

khinsen commented 4 years ago

@rougier Good point, I will try. I have a hard time with GitHub notifications myself, about 1/3 never arrive by mail and I stopped checking them on the site because of overload.

BrunoLevy commented 4 years ago

I have sent my review to Konrad (a while ago, and again today), please tell me if I need to post it / git commit it or something somewhere else. Cheers, -- Bruno

khinsen commented 4 years ago

@BrunoLevy Just paste it right here into a comment!

BrunoLevy commented 4 years ago

Hi Konrad, here it is ! (and I have inserted in it a few Apple][ photos and stories for fun).

I had a lot of fun reviewing this ReScience submission, because I have an Apple2 in working condition, and interestingly, it is an even older model (Apple][+) as compared to the ones used in the submission (Apple][e and Aplle//c).

The initial article, published in a French hobbyist magazine (Tremplin Micro) by the author when he was a teenager, loads a high resolution image from a floppy disk, lets the user choose a zone on the image, and displays a zoom of the image. The program is written in AppleSoft BASIC, a very popular language in the 80s (and mostly the only one available on the Apple without buying an expansive "language card").

The reproducibility report is very complete, and discribes the author's effort to re-understand 80's programming standards. In particular, the program involves several advanced programming techniques, such as the built-in command for vector graphics encoded shapes (XDRAW), that requires writing a sequence of values that encode the shape directly in memory. Another advanced technique involves using BLOAD / BSAVE to directly load/save a block of memory to/from the floppy, which involves emembering the address of video RAM.

All these technicalities are well described in the reproducibility report. It could be made even more complete with explanations of the binary format used by XDRAW, I have it handy in the "AppleSoft Programmer's manual" (believe it or not, it is still in my office near the Apple ][). Ref: BASIC Programming Reference Manual, Applesoft, Page 92 "how to create a shape table"

There is an online copy here

Something else that may help is a tutorial about how to connect an AppleII to a modern machine and transfer disk images to them:

you will need:

A couple of tweets that show the super serial board installation:

Follow instructions from this website (especially how to configure the super serial). Then you are ready to send disk images

Note: finding floppies in working condition may be hard. Nearly all of mine have some kind of mold inside, but finally found one of them that was OK See this photo on twitter (X indicates read/write error ! Finally found one floppy that did not generate any X).

Once I transfered the disk image attached with the submission, I was able to start the program from the floppy. I had a small issue with the greeting program, that displays a message with small caps that my AppleII cannot display (my 1977 AppleII+ can only display 40 columns with uppercase characters !), but by looking at what was on the disk (CATALOG) I found the program to start (run LOUPE) and everything ran smoothly (at 1980's speed).

To conclude, although it is not really a scientific article, I think this submission is a "must see" for the reproducibility challenge, it will be fun to see, and, I bet, of interest for the participants.

I've got several photos / videos that I'll be glad to share with the author for the presentation if he wants. Little video on Twitter showing N. Rougier's program running

Here is a couple of Apple][ photos.

apple2 The apple][, sitting on my desk at Inria, following me since 1979 !

Apple2_repair A few years ago, a capacitor exploded in the power supply unit, releasing a lot of white smoke ! Fortunately, 80's technology is easy to repair !

Apple2ASM Programming the Apple][ in assembly, assembling by hand on paper ! Where is the MUL unstruction ? No MUL instruction, you need to implement it on your own, using shifts and adds, and with only three 8-bit registers, it is an adventure !

What's the point ? Well, I guess in the ReScience galaxy, everybody knows what's the point, it is cool, and good science is reproducible science. There is another benefit: when you design your own RISC-V processor, playing with old hardware helps a lot understanding what's going on (and funny enough, this one does not have MUL either, it is implemented in software !).

Best wishes,

-- B

P.S. Would be fun to write a faster version in 6502 assembly (we could organize a retrocomputing hackaton :-) P.P.S. More Apple][ resources:

END OF LINE.

BrunoLevy commented 4 years ago

Done ! (and I have inserted a couple of photos / links to tweets that may be interesting)

Cheers,

-- B

On 6/3/20 9:08 PM, Konrad Hinsen wrote:

@BrunoLevy https://github.com/BrunoLevy Just paste it right here into a comment!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ReScience/submissions/issues/12#issuecomment-638402257, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEUTN3IKQDMMEDVEIHVL5DDRU2NSZANCNFSM4KDVXY7A.

khinsen commented 4 years ago

Thanks @BrunoLevy for this detailed, informative, and entertaining review. My provisional conclusion is that we should perhaps encourage the use of Apple ][s in scientific computing for improving the quality of everything.

I also conclude that @rougier's submission is accepted! I'll take care of the publishing steps today or tomorrow.

khinsen commented 4 years ago

@rougier Could you please generate the final PDF? You seem to have used an old version of the template, since it lacks the Makefile. Updated metadata is at https://github.com/rougier/TYRC-apple/pull/1.

rougier commented 4 years ago

Many thanks for the review @BrunoLevy. I've seen most of your photos on twitter but did not see all of them. Thanks again. I'm +1 for a retro hackaton. In fact, I would like to write a (non trivial) scientific result as if we were in 1980 but with out 2020 knowledge and try to guarantee this old-new result is reproducible from 1980 through 2020 (bit for bit). Just to check it is possible.

rougier commented 4 years ago

Thanks @khinsen, I'll update the paper.

rougier commented 4 years ago

@khinsen I've merged your update, I would need the DOI once you have it.

khinsen commented 4 years ago

@rougier DOI is here: https://github.com/rougier/TYRC-apple/pull/2

rougier commented 4 years ago

Thanks. Just merged your PR, thanks.

khinsen commented 4 years ago

Thanks @rougier!

The article has been published (http://doi.org/10.5281/zenodo.3886628) and will soon be listed on the ReScience C Web site.