{*}
Add news
March 2010 April 2010 May 2010 June 2010 July 2010
August 2010
September 2010 October 2010 November 2010 December 2010 January 2011 February 2011 March 2011 April 2011 May 2011 June 2011 July 2011 August 2011 September 2011 October 2011 November 2011 December 2011 January 2012 February 2012 March 2012 April 2012 May 2012 June 2012 July 2012 August 2012 September 2012 October 2012 November 2012 December 2012 January 2013 February 2013 March 2013 April 2013 May 2013 June 2013 July 2013 August 2013 September 2013 October 2013 November 2013 December 2013 January 2014 February 2014 March 2014 April 2014 May 2014 June 2014 July 2014 August 2014 September 2014 October 2014 November 2014 December 2014 January 2015 February 2015 March 2015 April 2015 May 2015 June 2015 July 2015 August 2015 September 2015 October 2015 November 2015 December 2015 January 2016 February 2016 March 2016 April 2016 May 2016 June 2016 July 2016 August 2016 September 2016 October 2016 November 2016 December 2016 January 2017 February 2017 March 2017 April 2017 May 2017 June 2017 July 2017 August 2017 September 2017 October 2017 November 2017 December 2017 January 2018 February 2018 March 2018 April 2018 May 2018 June 2018 July 2018 August 2018 September 2018 October 2018 November 2018 December 2018 January 2019 February 2019 March 2019 April 2019 May 2019 June 2019 July 2019 August 2019 September 2019 October 2019 November 2019 December 2019 January 2020 February 2020 March 2020 April 2020 May 2020 June 2020 July 2020 August 2020 September 2020 October 2020 November 2020 December 2020 January 2021 February 2021 March 2021 April 2021 May 2021 June 2021 July 2021 August 2021 September 2021 October 2021 November 2021 December 2021 January 2022 February 2022 March 2022 April 2022 May 2022 June 2022 July 2022 August 2022 September 2022 October 2022 November 2022 December 2022 January 2023 February 2023 March 2023 April 2023 May 2023 June 2023 July 2023 August 2023 September 2023 October 2023 November 2023 December 2023 January 2024 February 2024 March 2024 April 2024 May 2024 June 2024 July 2024 August 2024 September 2024 October 2024 November 2024 December 2024 January 2025 February 2025 March 2025 April 2025 May 2025 June 2025 July 2025 August 2025 September 2025 October 2025 November 2025 December 2025 January 2026 February 2026 March 2026 April 2026 May 2026 June 2026 July 2026 August 2026 September 2026 October 2026 November 2026 December 2026
1 2 3 4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
News Every Day |

Vi clone written in BASIC proves old habits :wq hard

The veteran editor Vi turns 50 this year, and what better way to celebrate than to write a version in BASIC? The code was created by Lee Tusman, who likes to be a little out of step with the latest IT industry fads. Not strictly a professional programmer, Tusman, whose background is in art, began looking at BASIC in 2025. Specifically, Yabasic, an open source BASIC interpreter for Unix and Windows. "For a modern BASIC, it's quite fun to use," Tusman wrote. "I made my own cyber-hoss racing game, a command line game inspired by the UFO50 and Flash game Quibble Race. I also tinkered with the internals of the text version of The Oregon Trail, and built a clone, a simple version of Dope Wars economic simulation game." All of which brought Tusman to code up a version of the veteran text editor Vi, using BASIC because… well… it was there. "I've been using Neovim (and before that, Vim) for years and years. I've never made a text editor before. But I decided it could be fun to try to implement my own." Inspired by tools such as Offpunk, a text-based browser, "I thought I could likely build an ULTRA simple editor with a minimum of Vim commands. How hard could it be?" In this instance, not too hard at all. It only took a few hundred lines of Yabasic code to get a minimal blank page working before Tusman began adding simple commands. Before long, the editor had reached the point where it was possible to open a file, start a new one, and save. "This was satisfying as I was now able to open the actual code for my vi.bas program and poke around and edit it." There's no wrapping in Tusman's editor – 80 characters is the limit – but fire up the code from the GitHub repository, and a reasonable simulacrum of the venerable editor, along with a lot of its sometimes esoteric shortcuts, runs up. The Register asked Tusman why he chose Vi. "I chose Vi because I already use it, and of course, once you're addicted to it, it's hard to want to use any other style of editor." So what's missing? "Many things! But I'm purposefully not trying to rebuild a complete Vim. I just wanted something usable with as much functionality as I could build in as short and straightforward a program as I could write. Notably, most of it is 'if this key is pressed, do this.'" As for future development, "I don't know how much I'd add," Tusman said. "I've only been using the program a week or so, but haven't found much I completely miss from Neovim. I'm speculating here, but maybe I'd optionally add back in line numbers, and I haven't found a way to prevent errors when the screen gets resized that works cross-platform." In his post, Tusman notes that while the code won't win any prizes for its beauty, it is functional and can be tinkered with. It's also in the public domain, and so could be forked if there's a function that a BASIC wrangler can't do without. A look at the source certainly brought back some memories for this hack, who cut his teeth on TI BASIC in the very early 1980s and hasn't gone near the language since uninstalling Visual BASIC 6 decades ago. "It's not only the best Vi clone I've found written in a BASIC implementation," Tusman wrote. "I think it's the only one!" ®
Ria.city






Read also

DOJ warns public schools could lose federal funding for hiding student gender transitions from parents

California AG Bonta says death penalty violates state constitution, refuses to defend it in court

Al Michaels tells timeless joke about Taylor Swift during Chiefs-Rams broadcast

News, articles, comments, with a minute-by-minute update, now on Today24.pro

Today24.pro — latest news 24/7. You can add your news instantly now — here




Sports today


Новости тенниса


Спорт в России и мире


All sports news today





Sports in Russia today


Новости России


Russian.city



Губернаторы России









Путин в России и мире







Персональные новости
Russian.city





Friends of Today24

Музыкальные новости

Персональные новости