Up to Main Index Up to Journal for June, 2023 JOURNAL FOR SUNDAY 25TH JUNE, 2023 ______________________________________________________________________________ SUBJECT: School’s out, Mere tests completed, early functions DATE: Sun 25 Jun 19:07:09 BST 2023 I completed the “Developer School” work decided to enrol me on. However, I don’t see a way of being able to sit the accompanying draconian certification exam. I don’t have any photo identification for starters. I physically cannot be “detained” in a room for two hours. I don’t run MacOS or Windows and they don’t allow virtual machines. Lastly there is no way I’m going to voluntarily install their mandatory spyware that scans the system, takes control of the camera and microphone and watches everything you and the machine do while they monitor the testing. I’m not kidding — tab to another application or leave the testing application window and it’s only one way of getting an automatic fail. And those are just the most egregious requirements — there are many more… This is supposed to be certification for a low-code development tool! WTF? ;( I have signed far too many non-disclosure agreements to have someone go poking around my systems. There is also no way I’m letting spyware within my network. So, thanks but no thanks :| Last Wednesday the Go developers released a Go 1.21 release candidate. I built it from source and tried it out. Due to changes in the WASM support, possibly due to new support for the WASI (WebAssembly System Interface) port?, Mere ICE is very broken. Seems WASM is not under the Go compatibility promise :( Wednesday I also completed writing all of the tests after adding support for the uint unsigned integer data type to Mere. It was only when I was committing everything to Git, and trying out Go 1.21, I realised I had not updated the Mere ICE documentation for uints *sigh* As I had a clean deck, and before updating the documentation, I wanted to experiment a little with a few ideas I had for implementing user functions in Mere. I felt I needed some proper programming to cheer myself up. Below is an early peek at work in progress and is not the final form functions will take. This is just a simple example I had up and running after a couple of hours play time: >cat fun.mr call add 5 7 println "join: ", call join "abc" "…" "xyz" exit add: printf " add: %d+%d=%d\n" @[1] @[0] @[1]+@[0] rcall join: rcall @[2]+@[1]+@[0] >mere fun.mr add: 5+7=12 join: abc…xyz > Here we have two functions ‘add’ and ‘join’. In ‘add’ we print the addition of the parameters. In ‘join’ we return a value — the result of concatenating the parameters. The ‘rcall’ (return from call) is a stand-in for ‘return’ — which is currently used to return from a subroutine. The function names are plain labels and there are no named parameters yet. Parameters are passed as the ‘@’ integer keyed map, and the parameters are in reverse order which needs fixing. Simple, very ugly, baby steps :) For now I’ve set functions aside and am working on updating the documentation. Then I’ll release Mere ICE v0.0.3 before getting back to functions. I may look at getting Mere ICE to work with Go 1.20.5 and the Go 1.21 release candidate, or just leave it to sort out when Go 1.21 is actually released. -- Diddymus Up to Main Index Up to Journal for June, 2023