đŸ Archived View for tilde.pink âș ~ssb22 âș twitter.gmi captured on 2023-01-29 at 17:08:51. Gemini links have been rewritten to link to archived content
âŹ ïž Previous capture (2022-03-01)
âĄïž Next capture (2023-04-19)
-=-=-=-=-=-=-
The Twitter platform has become socially worse since I posted this.âIâm leaving it up for historical interest only and not as a recommendation of Twitter.
In 2015 the National Museum of Computing at Bletchley Park displayed photographs of some of their classroom activities using 1980s BBCÂ Microcomputers.âIn one picture, a child had typed the word TWITTER at the 1982 BBC BASIC prompt, perhaps thinking that this would somehow take them to the social networking website called Twitter.â(Website?âWhatâs that in 1982?)âBBCÂ BASIC had just said Mistake because it wasnât a well-formed command (the word TWITTER would work as a variable name, but in BBCÂ BASIC you have to specify what to *do* with that variableâeven if it were already defined, youâd still need to PRINT it or something; you canât just inspect variables by typing their names alone as you can in Python).
The organisers evidently thought the childâs attempt to load Twitter to be cute enough to post a photograph of the error message with the caption âSome things the Beeb wonât do.â
I must say: did you want something like *this*?
Admittedly, this (emulated) Beeb had some extra help in the form of an RS423 connection to a Debian GNU/Linux 8 âJessieâ system (running edbrowse in the 1st screenshot, and PhantomJS with pbmtobbc in the 2nd screenshot).âBut then, some mobile phones use browsers that require a transcoding proxy between the phone and the website, and few people say the phone âwonât doâ the website just because itâs not doing *all* the processing by itself.â(They might say itâs not doing the site *very well*, but thatâs not the same question as whether it will do it at all.)
While we understand the captionâs intended meaning, in all fairness we should point out that the Beeb at the museum wouldnât do Twitter because it wasnât connected to a suitable server over RS423 (or over Econet via BeebFrame), not just because it was a Beeb.
The one-liner to type on the BBCÂ Micro is as follows:
MO.6:OS."FX2,2":REP.IFAD.-1:OS."FX3,1":V.GET:OS."FX3,0":U.0:EL.:IFAD.-2:OS."FX2,1":V.GET:OS."FX2,2":U.0:EL.:U.0
(I said Mode 6 so that â[â and â]â display as square brackets; theyâd be arrows in Mode 7. Those with good monitors and eyesight might like to try the 80-column Mode 3 instead, and pbmtobbc works best in Mode 4.)
On the server side, itâs necessary to add a rate-throttling script to reduce buffer overflows, plus translate carriage returns etc.âSomething like the example script below.
If edbrowse is not available in your distro, you could also try w3c-libwww-apps to get the 1992 CERN line-mode browser as www, which is what Iâve assumed in this example script and is arguably easier for beginners.âThis will however need Web Adjuster to do its Javascript, SSL and Unicode rendering (none of which were around in 1992)ârun adjuster.py with (e.g.) --js_interpreter=PhantomJS --address=127.0.0.1 --default_site=twitter.com.0 --host_suffix=localhost --wildcard_dns=False --open_proxy --htmlFilter="iconv -c -f UTF8 -t ASCII//TRANSLIT" and then tell www to goto http://localhost:28080/ (that iconv command transliterates simple Unicode punctuation into ASCII, but wonât help much if you want to view a non-Latin language).
If you want to run a *screen mode* browser like lynx (with cursor positioning, not just line-mode interaction), some versions of Kermit can emulate the VT-52 âDECscopeâ, or the Masterâs *TERMINAL (press Enter at the = prompt) has ANSI (VT100).âCambridge University used BBC Micros as terminals to its IBM mainframe called âPhoenixâ which was retired in 1995, 2 years before I started; I understand they were Model Bs with custom terminal ROMs and matching termcap files on the Unix side, but I donât know what they were capable of.
The BBCâs entire graphics repertoire can be driven with VDU codes sent over the link: here Iâve kludged my old music programâs plotter output into BBC PLOT codes (VDU 25) in Mode 0, but monochrome images *are* better transferred as bitmaps split into 8x8 blocks for VDU 23 (see pbmtobbc above).âThe early Phoenix BCPL version of PMS had a BBC-terminal preview mode which used 8x8 characters in some way but didnât attempt to render curves.
Below is a simple script for rate-throttling and linefeed translation to go with the above FX one-liner.âThis script is for GNU/Linux; on the Mac youâll have to do without pty so you might be more limited in the commands you can run.âIâve also assumed the BBC emulator is running its RS423 connection in Server mode (which tends to be more reliable than Client mode) and is listening on localhost port 2323.
#!/usr/bin/env python2 import os,fcntl,time,sys toNC,fromNC = os.popen4("nc localhost 2323") os.system("rm -f /tmp/w3c-cache/.lock") toWWW,fromWWW = os.popen4("python2 -c 'import pty,time pty.spawn(\"www\") time.sleep(1000000)'") fcntl.fcntl(fromWWW, fcntl.F_SETFL,os.O_NONBLOCK) fcntl.fcntl(fromNC, fcntl.F_SETFL,os.O_NONBLOCK) while True: try: typed = fromNC.read(1024).replace("\r","\n") except IOError: typed = "" if typed: toWWW.write(typed),toWWW.flush() sys.stdout.write(typed),sys.stdout.flush() try: out = fromWWW.read(1024) except IOError: out = "" if out: sys.stdout.write(out),sys.stdout.flush() out = out.split("\n") for l in out[:-1]: toNC.write(l+"\r\n"), toNC.flush() time.sleep(0.5) out = out[-1] if out: toNC.write(out), toNC.flush() time.sleep(0.5)
That child might still be disappointed to find they canât actually *log in* to Twitter, because the login process depends on interacting with graphics.âAn RS423-based VNC viewer would be theoretically possible (it would have to reduce the colour depth from 8 to 3, 2 or 1, and the mouse emulation could be tricky) but it would be *slow*. If they really were trapped with nothing but a BBCÂ Micro terminal and were still desperate to use Twitter, Iâd suggest preparing in advance by getting an API key that lets you do what you want with curl commandsâbut if they just want to âtweetâ then perhaps theyâd be better off using another platform, such as Gemini, which I can update from any command-line terminal (although I wouldnât go as far as doing it from a Beebâbesides anything else, some years after I stopped using BBCs I switched to the Dvorak keyboard layout, so in order to work on a BBC terminal comfortably Iâd now have to remap its keyboard for a start).
Of course you could always do what we used to do and just program the BBC.âImmediate-mode âone-linersâ, being limited to 238 keystrokes, are relatively quick to type in; hereâs some I made earlier:
For the sanity of museum personnel, Iâll refrain from posting a noise demonstration here.
The Cambridge Centre for Computing History has a BBC whose F key is broken.âIf youâre on that one and donât fancy rewriting code to avoid the letter F, try OS."K.0"+CHR.70 to program function key *f0* to F. Or use my horrible hack !2832=17937 to program all 10 function keys to F (works only on an unexpanded Model B with no *KEY before or after).
All material © Silas S. Brown unless otherwise stated. Debian is a trademark owned by Software in the Public Interest, Inc. Javascript is a trademark of Oracle Corporation in the US. Linux is the registered trademark of Linus Torvalds in the U.S. and other countries. Mac is a trademark of Apple Inc. Python is a trademark of the Python Software Foundation. Twitter and Tweet are trademarks of Twitter Inc. Unicode is a registered trademark of Unicode, Inc. in the United States and other countries. Unix is a trademark of The Open Group. VNC is a registered trademark of RealVNC Limited. Any other trademarks I mentioned without realising are trademarks of their respective holders.