RISC-OS-Community / CodingOnRISC-OS

A repository to collect, organise and schedule Everything Coding on RISC OS and resource links
14 stars 0 forks source link

[Tasks]: Basics of coding on RISC OS, level 5 (tentative) #40

Open rps102 opened 1 year ago

rps102 commented 1 year ago

Contact Details (optional)

No response

Background

Level 1: Getting the source (from Git) Level 2: Making system calls to flash an LED Level 3: A command line tool to give info on Sprites/JPEGs split across several source files Level 4: An icon on the icon bar in the desktop

This task outlines level 5 of the course, a little bit harder, building on levels 1-4. The exact shape of this next instalment is currently uncertain pending level 4.

Progress to multitasking. This could take one of several forms:

At level 2 we presented (in order of most number of views first)

  1. C (with the DDE, gcc optional)
  2. C++ (in CFront, g++ optional)
  3. Assembler (gas syntax, ObjAsm optional)
  4. BBC BASIC
  5. Python
  6. Lua

Don't be limited by these 6 though! All languages for which there is a RISC OS variant are up for grabs if volunteers have a particular area of interest they'd like to produce.

Definition of Done

Paolo has kindly offered to 'top & tail' any videos submitted.

The meeting to review this topic is TBD, so ideally material needs to be complete by TBD to give time for editing.

This task would be complete once the new level 5 videos are edited and available on youtube for developers.

Code of Conduct

GavinWraith commented 1 year ago

Dear Robert

I am sending you a zip file, picsize.zip, as an attachment. It is submitted in reply to your CodingOnRISC-OS message. It does both less and more than your requirements for level 3. Less because it deals only with GIF, PNG and JPEGs (I have been using it for years for making webpages, and the WWW Consortium remains in blissful ignorance of the spritefile format ), more because it puts an icon on the iconbar, so might count as level 4. My proposal is that 'stickies' constitute a level 3.5, if you like. No knowledge of windows or menus needed. It is a frontend to use command-line programs that does not use FrontEnd. I have been using this method for three decades now.

The 'stick' BASIC program is a messy old thing, better not looked at. On the other hand the Lua '!RunImage' is polished and elegant by contrast. I have been intending to polish 'stick' up so that Template files are not needed. But, as the Danes say, "Jeg gider ikke".

This may well be an inappropriate submission. Don't hesitate to say.

-- Gavin Wraith

rps102 commented 1 year ago

I am sending you a zip file, picsize.zip, as an attachment. It is submitted in reply to your CodingOnRISC-OS message. It does both less and more than your requirements for level 3.

Thanks for your input Gavin. I was opening these two tasks as a reminder to myself to do something in the first instance, but also so others can get stuck in as well. Even better if you have most of a Lua version already in the bank.

I'm not sure where the attachments go with this issue tracker, it's possible they get stripped in transit as I don't seem to have received it. Perhaps you could send to Paolo and/or me directly? My address is webpages (curly-at-symbol) sprow.co.uk

pzaino commented 1 year ago

Thanks @GavinWraith ! Any chance you may wish to make a video tutorial as well about your code? (Just trying!) 😁

GavinWraith commented 1 year ago

On Sat, 24 Jun 2023 14:07:11 -0700 Paolo Fabio Zaino @.***> wrote:

Thanks @GavinWraith ! Any chance you may wish to make a video tutorial as well about your code? (Just trying!) 😁

Well I would like to. I have downloaded OBS to my Raspberry Pi OS machine.

Meanwhile I attach a zip file for your perusal, in case you find it interesting or useful. It contains a RISC OS application !SwitchExt, which I have been using for decades. It converts Unix style source code, renaming for use with the Norcroft (Acorn) C compiler. You use it by putting a copy of !SwitchExt into the source directory, then running it to effect the change, after which the copy can be deleted. It is a primitive mechanism for passing the source-directory's path to a program, avoiding any wimp programming, but I was too lazy to implement anything else. The textfile !SwitchExt.allow determines which extensions are allowable for swapping. It is an entirely straightforward non-wimp program that is simply automating a load of filer operations. For didactic purposes those who are not C programmers may not appreciate its utility. It could be implemented in any languageof course.

-- Gavin