🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #265956

I'm hacking on trn...want to join me?

#265956
From: Richard
Date: Mon, 03 Apr 2023 21:19
83 lines
4588 bytes
[Please do not mail me a copy of your followup]

As near as I can tell the current "maintainer" of trn isn't.  The
official home page is on sourceforge and I don't see any activity
there for 10+ years.  The trn-4.0-test77.tar.gz distribution -- the
most recent -- was created in 02-Sep-2010.  The test76 release was
another ten years before that on 02-Apr-2001.

I may be the last user and it's somewhat of a pity/passion project :-).

I forked the code from sourceforge into github and I'm hacking on the
cmake branch.  <https://github.com/LegalizeAdulthood/trn/tree/cmake>

So far:
- Added a CMake based build
- Use vcpkg to get curses dependency (pdcurses on Windows)
- Use CMake inspection of your environment and configure_file to
  generate the config.h instead of chatty bash Configure script.
- Converted from C to C++
- Applied various automated clean-ups to the code (yay ReSharper for C++!)
- Gradually introducing more use of 'const'
- Gradually introducing use of std::string instead of C style string
- Unit tests with GTest
- Working on adding tests before making any major changes.
  - A bunch of % interpolator tests added and some minor bugs fixed
  - Using CMake to generate test local news spool data and articles
  - Will use this to verify article/newsgroup related % interpolation
  - This part is current work-in-progress
- Replace use of int with bool where appropriate
- Replace use of int with strong enum types where appropriate
- Legacy code considerations dropped; e.g. no special VMS code, no
  non-POSIX standard unix code, K&R style code modernized, no optional
  features to "save instruction and data space", etc.

General target direction:
- Replace low-level termios code with curses
- Become more "event driven" insted of mingled read/write stdio
- Decouple newsgroup/article logic from TUI to allow for GUI
- Replace synchronous NNTP/newsgroup processing with asynchronous
  processing

Vision of the final result (no particular order):
- True STARTTLS/NNTPS support
- Curses windows used to show all the various things:
  - newsgroup selection
  - article selection
  - thread selection
  - KILL files
  - etc.
- A GUI for reading news that's as convenient as the trn TUI.
- Let you manipulate the various windows like people do in vim/emacs
  allowing you to choose what is on-screen and where
- Client should be asynchronously advancing through the unread articles
  at the "speed of light" to apply scoring/threading/KILL file processing
  as far ahead as possible while you read.
- As easy to build on Windows as it is on *nix.

I mostly develop on Windows, but try to keep the #ifdef'ed linux
branches at least building by occasionally building in WSL.  A github
build workflow would help but not my immediate priority.

If you're interested in joining me for the ride, pull requests are
always welcome or drop an issue in the github repo.

I'm surprised that after all this time there is still no decent C++
library for NNTP.  The fallout from this effort may be such a library
using asynchronous I/O processing to get as close as possible to "the
speed of light" for an NNTP client.

I did a presentation on doing basic NNTP with POCO last year:
Writing a Network Client with POCO
<https://www.youtube.com/watch?v=rRR9RTUEn4k>

I'm doing another presentation next week on basic NNTP with boost.asio:
<https://www.meetup.com/utah-cpp-programmers/events/zhljbtyfcgbqb/>

-- Richard

-- 
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
            The Terminals Wiki <http://terminals-wiki.org>
     The Computer Graphics Museum <http://computergraphicsmuseum.org>
  Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>
Technical Details
Message-ID: <u0ffth$1u1oi$1@news.xmission.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <u0ffth$1u1oi$1@news.xmission.com>
Subject: I'm hacking on trn...want to join me?
Date: Mon, 03 Apr 2023 21:19:45 +0000
From: legalize+jeeves@mail.xmission.com (Richard)
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
Originator: legalize@shell.xmission.com (Richard)
Reply-To: (Richard) legalize+jeeves@mail.xmission.com
Newsgroups: news.software.readers
Injection-Date: Mon, 3 Apr 2023 21:19:45 -0000 (UTC)
Organization: multi-cellular, biological
Sender: legalize+jeeves@mail.xmission.com
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Mail-Copies-To: never
X-Reply-Etiquette: No copy by email, please