Up to Main Index Up to Journal for June, 2022 JOURNAL FOR THURSDAY 2ND JUNE, 2022 ______________________________________________________________________________ SUBJECT: Compiling Go 1.18.3 + TELNET terminal changes DATE: Fri 3 Jun 01:48:47 BST 2022 Go 1.18.3 was released and I’ve been busy compiling it on various machines. As it’s been a while since I benchmarked the compiles I took a few measurements: OS Arch RAM Model CPU h:mm:ss ------- ---- ------- --------------------------------- ------- x86-64 8Gb Desktop Intel i5-2400 quad core @3.1GHz: 8:11 ARM64 8Gb RPi4 quad core ARM A72 @1.8GHz: 21:46 ARM32 4Gb RPi4 quad core ARM A72 @1.5GHz: 24:22 ARM32 1Gb RPi3B quad core ARM A53 @1.2Ghz: 45:16 — Fan 52:39 — No Fan ARM32 512Mb RPi0w single core ARM1176JZF-S @1.0GHz: 8:13:14 All compiles used 1.17.7 to bootstrap, CGO_ENABLE=0 set and all tests run. The 4Gb RPi4 was still running the lab network, but I kept things quiet while compiling. Looking at the times for the 8Gb/4Gb RPi4s it seems the difference is due to CPU clock speed and running 64-bit Raspberry OS has little effect. The first time I compiled on the RPi3B the CPU just had a small heat-sink and was thermal throttling horribly, running at over 82°C most of the time. When ordering the 8Gb RPi4 I ordered some extra CPU cooling fans. Compiling with a fan the RPi3B hovered between 60-62°C, rising to 65°C for brief periods. With the fan the compile was nearly 7½ minutes quicker (7m23s). Then there is the valiant little RPi Zero :) Slow and steady it gets the job done. This is my original RPi Zero W that usually runs off of a USB port on my desktop or Chromebook and has a complete development environment on it. I love this little guy. For less than £10[1] you get a portable, full Linux system at your disposal. What else have I been up to? The response to the proposed terminal changes, from my last post, went down well. I’ve been working hard to get something I can release out to the public dev branch. The hardest thing is getting the number of lines and columns for the terminal. You can send the sequence “\x1b[6n” but the response is ‘typed’ back to you in the input stream. Not a problem if you are in character mode, a problem if you are in line mode — the user needs to hit enter to actually send the response. I did write a lot of code messing about with the TELNET protocol to switch between modes. Trouble is you can’t implement just the TELNET bits you want as the client then gets very confused trying to negotiate different settings. For now I cheat and ask the player to ‘hit enter’ when connecting. This is not seen by player’s whose terminal is in character mode. Give me a day or two and I’ll try and get the changes usable and out so people can have a play… -- Diddymus [1] You might want extras like a case (from £2.80) and an SDCard (16Gb £6), any old phone charger will do — or a USB port on a Windows machine. My point is this is still a damn cheap yet usable usable system. For £15 you can get a Pi Zero 2 W — 512Mb, quad core A53 @ 1Ghz. Up to Main Index Up to Journal for June, 2022