Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

"Survey says..." -- Richard Dawson, weenie, on "Family Feud"


computers / news.software.nntp / Re: A C library for the NNTP protocol?

SubjectAuthor
* A C library for the NNTP protocol?Johann 'Myrkraverk' Oskarsson
+* Re: A C library for the NNTP protocol?Jesse Rehmer
|`- Re: A C library for the NNTP protocol?Johann 'Myrkraverk' Oskarsson
+* Re: A C library for the NNTP protocol?Billy G. (go-while)
|`* Re: A C library for the NNTP protocol?Johann 'Myrkraverk' Oskarsson
| `* Re: A C library for the NNTP protocol?Russ Allbery
|  `* Re: A C library for the NNTP protocol?Computer Nerd Kev
|   `* Re: A C library for the NNTP protocol?Russ Allbery
|    `* Re: A C library for the NNTP protocol?Johann 'Myrkraverk' Oskarsson
|     `* Re: A C library for the NNTP protocol?Russ Allbery
|      `* Re: A C library for the NNTP protocol?Johann 'Myrkraverk' Oskarsson
|       `* Re: A C library for the NNTP protocol?Russ Allbery
|        `* Re: A C library for the NNTP protocol?Jon Ribbens
|         `* Re: A C library for the NNTP protocol?Russ Allbery
|          `* Re: A C library for the NNTP protocol?Julien ÉLIE
|           `* Re: A C library for the NNTP protocol?Richard Kettlewell
|            `- Re: A C library for the NNTP protocol?Julien ÉLIE
+* Re: A C library for the NNTP protocol?Jesse Rehmer
|`* Re: A C library for the NNTP protocol?Johann 'Myrkraverk' Oskarsson
| `- Re: A C library for the NNTP protocol?Computer Nerd Kev
`* Re: A C library for the NNTP protocol?Doc O'Leary ,
 `- Re: A C library for the NNTP protocol?Russ Allbery

1
A C library for the NNTP protocol?

<cuHJM.1091805$6Li6.85230@fx12.ams4>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=2086&group=news.software.nntp#2086

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!feeder1.feed.usenet.farm!feed.usenet.farm!peer03.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!fx12.ams4.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.0
Newsgroups: news.software.nntp
Content-Language: en-US
From: johann@myrkraverk.invalid (Johann 'Myrkraverk' Oskarsson)
Subject: A C library for the NNTP protocol?
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 27
Message-ID: <cuHJM.1091805$6Li6.85230@fx12.ams4>
X-Complaints-To: abuse@easynews.com
Organization: Easynews - www.easynews.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date: Tue, 5 Sep 2023 23:06:46 +0800
X-Received-Bytes: 1800
 by: Johann 'Myrkrav - Tue, 5 Sep 2023 15:06 UTC

Dear n.s.nntp,

Are there still extant C libraries that implement NNTP, and are
useful for creating Usenet clients?

I am aware of UW's c-client, currently hidden inside Alpine sources,
but I have not found it to be a really useful framework for building
my own news reader.

My question is really twofold.

1) Is there a library that already does this and can be used with SSL?

2) In the absence of 1) how would I start experimenting on my own?

Other than setting up my own INN in a virtual machine, I do not know
how to "practice" my own client. Do Usenet providers frown upon
practice clients, such as Eternal September?

And even with my own INN in a VM, I'm still not sure how to go about
practicing all the intricacies of SSL verification, without a publicly
available news server [possibly my own] and something like letsencrypt.

Am I perhaps overthinking this, and this is rather easy?
--
Johann | email: invalid -> com | www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | twitter: @myrkraverk

Re: A C library for the NNTP protocol?

<ud80aa$1mfd$1@nnrp.usenet.blueworldhosting.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=2087&group=news.software.nntp#2087

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!nnrp.usenet.blueworldhosting.com!.POSTED!not-for-mail
From: jesse.rehmer@blueworldhosting.com (Jesse Rehmer)
Newsgroups: news.software.nntp
Subject: Re: A C library for the NNTP protocol?
Date: Tue, 5 Sep 2023 19:42:03 -0000 (UTC)
Organization: BlueWorld Hosting Usenet (https://usenet.blueworldhosting.com)
Message-ID: <ud80aa$1mfd$1@nnrp.usenet.blueworldhosting.com>
References: <cuHJM.1091805$6Li6.85230@fx12.ams4>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=fixed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 5 Sep 2023 19:42:03 -0000 (UTC)
Injection-Info: nnrp.usenet.blueworldhosting.com; posting-account="k8cWG9+Y/93vxQYza75s9JQFoL8rgVF3P1Yluveoqs0";
logging-data="55789"; mail-complaints-to="usenet@blueworldhosting.com"
User-Agent: Usenapp for MacOS
Cancel-Lock: sha1:E6LPz+V6z0Zu4wGRtwvpC97a9Rk= sha256:AgPCUoh98WYYbui/bduIyghXekg9saATFI/VfNN3aRQ=
sha1:jasTTMal2szweL0sKthgf2gRMRU= sha256:tP2fPdJWA3mvVZSNnrWycyHVvDimhPeh2UWPHuy73/c=
X-Usenapp: v1.27.1/d - Full License
 by: Jesse Rehmer - Tue, 5 Sep 2023 19:42 UTC

On Sep 5, 2023 at 10:06:46 AM CDT, "Johann 'Myrkraverk' Oskarsson"
<johann@myrkraverk.invalid> wrote:

> Other than setting up my own INN in a virtual machine, I do not know
> how to "practice" my own client. Do Usenet providers frown upon
> practice clients, such as Eternal September?

You're welcome to experiment with NNTP commands and clients using my server
(news.blueworldhosting.com).

I don't think Usenet clients identify themselves through NNTP commands, some
may add headers to messages they compose, but I don't believe the protocol
specification has anything for identifying clients like the HTTP User Agent.

Re: A C library for the NNTP protocol?

<BGMJM.1820980$Y1R7.419554@fx04.ams4>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=2088&group=news.software.nntp#2088

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!fx04.ams4.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: NoZilla/3.11 (Hackint; Unicorn; rv:0.8.15) go-while/19720229
NewsRW/4.2.0
Subject: Re: A C library for the NNTP protocol?
Newsgroups: news.software.nntp
References: <cuHJM.1091805$6Li6.85230@fx12.ams4>
Content-Language: en-US
From: no-reply@no.spam (Billy G. (go-while))
Organization: github.com/go-while
In-Reply-To: <cuHJM.1091805$6Li6.85230@fx12.ams4>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 125
Message-ID: <BGMJM.1820980$Y1R7.419554@fx04.ams4>
X-Complaints-To: abuse@blocknews.net
NNTP-Posting-Date: Tue, 05 Sep 2023 21:01:21 UTC
Date: Tue, 5 Sep 2023 23:01:29 +0200
X-Received-Bytes: 4139
 by: Billy G. (go-while) - Tue, 5 Sep 2023 21:01 UTC

On 05.09.23 17:06, Johann 'Myrkraverk' Oskarsson wrote:
> Are there still extant C libraries that implement NNTP
I'm not a C guy but as C is old as nntp i bet you'll find something?

> and are useful for creating Usenet clients?
What kind of client?
a reader or a binary downloader?

> 1) how would I start experimenting on my own?

https://datatracker.ietf.org/doc/html/rfc3977

> Do Usenet providers frown upon practice clients, such as Eternal
September?

Paid providers mostly don't care. private ones may do better in banning
you for doing stupid stuff.
please try only with your localhost. inn is enough.

> practicing all the intricacies of SSL verification

SSL(-lib) is only a wrapped around layer to a tcp connection which in
case of NNTP sends/receives commands and data via text or
'line1\r\nline2\r\n.'

why use C?
try GO and have a working ssl/tcp connection with a textproto wrapper

easy like this:

the returned 'srvtp *textproto.Conn': https://pkg.go.dev/net/textproto

the returnd 'conn net.Conn' is either the tcp or ssl conn which can be
closed via conn.Close() -> https://pkg.go.dev/net#Conn .

import (
"crypto/tls"
"net"
"net/textproto"
)

type PEER struct {
Hostname string
Port int
Addr4 string
Addr6 string
R_SSL bool
R_SSL_Insecure bool
} // end type PEER

func main() {
peer := &PEER{
Hostname: "myServer",
Addr4: "localhost",
Port: 119, R_SSL: true
}
srvtp, rconn, err := RCONN(1, 1, peer)
if err != nil {
log.Printf("Error RCONN err='%v'", err)
return
}
for {
line, err := s.srvtp.ReadLine()
if err != nil {
log.Printf("Error ReadLine err='%v'", err)
return false
}
log.Printf("srvtp.Readline='%s'", line)
}
}

func RCONN(num int, wid int, peer *PEER) (*textproto.Conn, net.Conn,
error) {
log.Printf("New RCONN num=%d wid=%d peer=%s", num, wid, peer.Hostname)
var conn net.Conn
var err error
ssl_conf := &tls.Config{
InsecureSkipVerify: true,
}
addrs := []string{peer.Hostname, peer.Addr4, peer.Addr6}
port := 119
if peer.Port > 0 && peer.Port < 65535 {
port = peer.Port
}
connect_peer:
for _, addr := range addrs {
if addr == "" {
continue connect_peer
}

peer_url := fmt.Sprintf("peer.Hostname:%d", port)
if peer.R_SSL {
conn, err = tls.Dial(peer_url, "tcp", ssl_conf)
} else {
conn, err = net.Dial(peer_url, "tcp")
}
if err != nil {
log.Printf("ERROR CONN Dial peer=%s peer_url='%s' err='%v'",
peer.Hostname, peer_url, err)
time.Sleep(time.Second * 3)
continue connect_peer
}
break connect_peer
} // end for loop_connect
if conn == nil || err != nil {
return nil, nil, fmt.Errorf("ERROR CONN conn=nil peer=%s err='%v'",
peer.Hostname, err)
}
srvtp := textproto.NewConn(conn)
code, msg, err := srvtp.ReadCodeLine(20)
if err != nil || (code != 200 && code != 201) {
log.Printf("ERROR RCONN code=%d msg='%s' peer=%s err='%v'", code, msg,
peer.Hostname, err)
return nil, nil, err
}
log.Printf("RCONN ESTABLISHED peer=%s", peer.Hostname)
return srvtp, conn, err
} // end func RCONN

MIT license.

Re: A C library for the NNTP protocol?

<ud88b8$85q$1@nnrp.usenet.blueworldhosting.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=2089&group=news.software.nntp#2089

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!nnrp.usenet.blueworldhosting.com!.POSTED!not-for-mail
From: jesse.rehmer@blueworldhosting.com (Jesse Rehmer)
Newsgroups: news.software.nntp
Subject: Re: A C library for the NNTP protocol?
Date: Tue, 5 Sep 2023 21:59:04 -0000 (UTC)
Organization: BlueWorld Hosting Usenet (https://usenet.blueworldhosting.com)
Message-ID: <ud88b8$85q$1@nnrp.usenet.blueworldhosting.com>
References: <cuHJM.1091805$6Li6.85230@fx12.ams4>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=fixed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 5 Sep 2023 21:59:04 -0000 (UTC)
Injection-Info: nnrp.usenet.blueworldhosting.com; posting-account="k8cWG9+Y/93vxQYza75s9JQFoL8rgVF3P1Yluveoqs0";
logging-data="8378"; mail-complaints-to="usenet@blueworldhosting.com"
User-Agent: Usenapp for MacOS
Cancel-Lock: sha1:nuu5pJEFBigoieCMjHyqRzuFtsI= sha256:JEgBl3XEhk0MrpaULCY2BffFjQsDTnp0+8e934MwJ94=
sha1:cm+YVdc4ILu7UwxJKUEo5/ml9b4= sha256:xhAZO3WNHFcKh3k/WoNnEi2YRve/buVzyjSnhySDAcs=
X-Usenapp: v1.27.1/d - Full License
 by: Jesse Rehmer - Tue, 5 Sep 2023 21:59 UTC

On Sep 5, 2023 at 10:06:46 AM CDT, "Johann 'Myrkraverk' Oskarsson"
<johann@myrkraverk.invalid> wrote:

> Dear n.s.nntp,
>
> Are there still extant C libraries that implement NNTP, and are
> useful for creating Usenet clients?
>
> I am aware of UW's c-client, currently hidden inside Alpine sources,
> but I have not found it to be a really useful framework for building
> my own news reader.
>
> My question is really twofold.
>
> 1) Is there a library that already does this and can be used with SSL?
>
> 2) In the absence of 1) how would I start experimenting on my own?
>
> Other than setting up my own INN in a virtual machine, I do not know
> how to "practice" my own client. Do Usenet providers frown upon
> practice clients, such as Eternal September?
>
> And even with my own INN in a VM, I'm still not sure how to go about
> practicing all the intricacies of SSL verification, without a publicly
> available news server [possibly my own] and something like letsencrypt.
>
> Am I perhaps overthinking this, and this is rather easy?

Not a developer, but did some looking around and found that libwww by W3C
contains a NNTP implementation that may be useful:

https://www.w3.org/Library/src/WWWNews.html

You can find the original NNTP 'reference implementation' sources at:

ftp://ftp.dinoex.org/pub/c-news/nntp.1.5.12.2.tar.gz
or
http://mirror.its.dal.ca/freebsd/distfiles/nntp.1.5.12.2.tar.gz

(don't forget the Y2k patch)
http://mirror.its.dal.ca/freebsd/distfiles/nntp-patch-y2k

Re: A C library for the NNTP protocol?

<s%3KM.26362$sOsa.9884@fx04.ams4>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=2090&group=news.software.nntp#2090

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!fx04.ams4.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.0
Subject: Re: A C library for the NNTP protocol?
Content-Language: en-US
Newsgroups: news.software.nntp
References: <cuHJM.1091805$6Li6.85230@fx12.ams4>
<ud80aa$1mfd$1@nnrp.usenet.blueworldhosting.com>
From: johann@myrkraverk.invalid (Johann 'Myrkraverk' Oskarsson)
In-Reply-To: <ud80aa$1mfd$1@nnrp.usenet.blueworldhosting.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 25
Message-ID: <s%3KM.26362$sOsa.9884@fx04.ams4>
X-Complaints-To: abuse@easynews.com
Organization: Easynews - www.easynews.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date: Thu, 7 Sep 2023 03:00:38 +0800
X-Received-Bytes: 2067
 by: Johann 'Myrkrav - Wed, 6 Sep 2023 19:00 UTC

On 9/6/2023 3:42 AM, Jesse Rehmer wrote:
> On Sep 5, 2023 at 10:06:46 AM CDT, "Johann 'Myrkraverk' Oskarsson"
> <johann@myrkraverk.invalid> wrote:
>
>> Other than setting up my own INN in a virtual machine, I do not know
>> how to "practice" my own client. Do Usenet providers frown upon
>> practice clients, such as Eternal September?
>
> You're welcome to experiment with NNTP commands and clients using my server
> (news.blueworldhosting.com).
>
> I don't think Usenet clients identify themselves through NNTP commands, some
> may add headers to messages they compose, but I don't believe the protocol
> specification has anything for identifying clients like the HTTP User Agent.

Thank you. I'm still working on the GUI, and this is not a high
priority project, so it may end up being a few months until I'm ready
to try real world testing.

I'll probably give a heads up as a courtesy when I start.

--
Johann | email: invalid -> com | www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | twitter: @myrkraverk

Re: A C library for the NNTP protocol?

<374KM.14$5D9b.1@fx02.ams4>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=2091&group=news.software.nntp#2091

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.mixmin.net!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!fx02.ams4.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.0
Subject: Re: A C library for the NNTP protocol?
Content-Language: en-US
Newsgroups: news.software.nntp
References: <cuHJM.1091805$6Li6.85230@fx12.ams4>
<BGMJM.1820980$Y1R7.419554@fx04.ams4>
From: johann@myrkraverk.invalid (Johann 'Myrkraverk' Oskarsson)
In-Reply-To: <BGMJM.1820980$Y1R7.419554@fx04.ams4>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 56
Message-ID: <374KM.14$5D9b.1@fx02.ams4>
X-Complaints-To: abuse@easynews.com
Organization: Easynews - www.easynews.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date: Thu, 7 Sep 2023 03:08:44 +0800
X-Received-Bytes: 2892
 by: Johann 'Myrkrav - Wed, 6 Sep 2023 19:08 UTC

On 9/6/2023 5:01 AM, Billy G. (go-while) wrote:
> On 05.09.23 17:06, Johann 'Myrkraverk' Oskarsson wrote:
>> Are there still extant C libraries that implement NNTP
> I'm not a C guy but as C is old as nntp i bet you'll find something?

Yup, what I originally found, c-client from University of Washington
didn't turn out to be as "user friendly" as I was expecting, so I'm
looking around.
>
>> and are useful for creating Usenet clients?
> What kind of client?
> a reader or a binary downloader?

Primary purpose is a reader, but binary downloader as well, as long
as it's not a conflict of purpose.

>
> > 1) how would I start experimenting on my own?
>
> https://datatracker.ietf.org/doc/html/rfc3977
>
> > Do Usenet providers frown upon practice clients, such as Eternal
> September?
>
> Paid providers mostly don't care. private ones may do better in banning
> you for doing stupid stuff.
> please try only with your localhost. inn is enough.

That's good to know, and I'll certainly keep it in mind.

>
> > practicing all the intricacies of SSL verification
>
> SSL(-lib) is only a wrapped around layer to a tcp connection which in
> case of NNTP sends/receives commands and data via text or
> 'line1\r\nline2\r\n.'
>
> why use C?

The reason I want to use C, is to build something that potentially can
work for everyone, including VAX/VMS, [MS|PC|Free]DOS, Amiga -- or the
more modern Vampire -- as well as the current operating systems we use
from day to day in the real world, far into the future.

For people who don't have that concern, other programming languages are
a good choice, and I'd probably go with Common Lisp, or OCaml, if that
wasn't my desired social contract.

Best of luck with Go.

[snip]

--
Johann | email: invalid -> com | www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | twitter: @myrkraverk

Re: A C library for the NNTP protocol?

<Q84KM.15$5D9b.13@fx02.ams4>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=2092&group=news.software.nntp#2092

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!fx02.ams4.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.0
Subject: Re: A C library for the NNTP protocol?
Content-Language: en-US
Newsgroups: news.software.nntp
References: <cuHJM.1091805$6Li6.85230@fx12.ams4>
<ud88b8$85q$1@nnrp.usenet.blueworldhosting.com>
From: johann@myrkraverk.invalid (Johann 'Myrkraverk' Oskarsson)
In-Reply-To: <ud88b8$85q$1@nnrp.usenet.blueworldhosting.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 50
Message-ID: <Q84KM.15$5D9b.13@fx02.ams4>
X-Complaints-To: abuse@easynews.com
Organization: Easynews - www.easynews.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date: Thu, 7 Sep 2023 03:10:39 +0800
X-Received-Bytes: 2865
 by: Johann 'Myrkrav - Wed, 6 Sep 2023 19:10 UTC

On 9/6/2023 5:59 AM, Jesse Rehmer wrote:
> On Sep 5, 2023 at 10:06:46 AM CDT, "Johann 'Myrkraverk' Oskarsson"
> <johann@myrkraverk.invalid> wrote:
>
>> Dear n.s.nntp,
>>
>> Are there still extant C libraries that implement NNTP, and are
>> useful for creating Usenet clients?
>>
>> I am aware of UW's c-client, currently hidden inside Alpine sources,
>> but I have not found it to be a really useful framework for building
>> my own news reader.
>>
>> My question is really twofold.
>>
>> 1) Is there a library that already does this and can be used with SSL?
>>
>> 2) In the absence of 1) how would I start experimenting on my own?
>>
>> Other than setting up my own INN in a virtual machine, I do not know
>> how to "practice" my own client. Do Usenet providers frown upon
>> practice clients, such as Eternal September?
>>
>> And even with my own INN in a VM, I'm still not sure how to go about
>> practicing all the intricacies of SSL verification, without a publicly
>> available news server [possibly my own] and something like letsencrypt.
>>
>> Am I perhaps overthinking this, and this is rather easy?
>
> Not a developer, but did some looking around and found that libwww by W3C
> contains a NNTP implementation that may be useful:
>
> https://www.w3.org/Library/src/WWWNews.html
>
> You can find the original NNTP 'reference implementation' sources at:
>
> ftp://ftp.dinoex.org/pub/c-news/nntp.1.5.12.2.tar.gz
> or
> http://mirror.its.dal.ca/freebsd/distfiles/nntp.1.5.12.2.tar.gz
>
> (don't forget the Y2k patch)
> http://mirror.its.dal.ca/freebsd/distfiles/nntp-patch-y2k

Thank you, that seems extremely useful, if only to learn from the code
before I implement my own.

--
Johann | email: invalid -> com | www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | twitter: @myrkraverk

Re: A C library for the NNTP protocol?

<874jk7yuwd.fsf@hope.eyrie.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=2093&group=news.software.nntp#2093

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.killfile.org!news.eyrie.org!.POSTED!not-for-mail
From: eagle@eyrie.org (Russ Allbery)
Newsgroups: news.software.nntp
Subject: Re: A C library for the NNTP protocol?
Date: Wed, 06 Sep 2023 12:16:34 -0700
Organization: The Eyrie
Message-ID: <874jk7yuwd.fsf@hope.eyrie.org>
References: <cuHJM.1091805$6Li6.85230@fx12.ams4>
<BGMJM.1820980$Y1R7.419554@fx04.ams4> <374KM.14$5D9b.1@fx02.ams4>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: hope.eyrie.org;
logging-data="22380"; mail-complaints-to="news@eyrie.org"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:M2tTtsPD8c8edthCFsGkq7c8tEk=
 by: Russ Allbery - Wed, 6 Sep 2023 19:16 UTC

Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> writes:

> The reason I want to use C, is to build something that potentially can
> work for everyone, including VAX/VMS, [MS|PC|Free]DOS, Amiga -- or the
> more modern Vampire -- as well as the current operating systems we use
> from day to day in the real world, far into the future.

Writing portable C that will work on all of those platforms will be a
significant challenge, particularly for the NNTP protocol which requires
dealing with the networking stack, which in turn is quite different across
that spectrum of operating systems if I recall correctly.

Given that portability desire, you're probably better off writing your
client in Python, since other folks have done the Python porting work for
you.

--
Russ Allbery (eagle@eyrie.org) <https://www.eyrie.org/~eagle/>

Please post questions rather than mailing me directly.
<https://www.eyrie.org/~eagle/faqs/questions.html> explains why.

Re: A C library for the NNTP protocol?

<64f905f6@news.ausics.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=2094&group=news.software.nntp#2094

  copy link   Newsgroups: news.software.nntp
Message-ID: <64f905f6@news.ausics.net>
From: not@telling.you.invalid (Computer Nerd Kev)
Subject: Re: A C library for the NNTP protocol?
Newsgroups: news.software.nntp
References: <cuHJM.1091805$6Li6.85230@fx12.ams4> <BGMJM.1820980$Y1R7.419554@fx04.ams4> <374KM.14$5D9b.1@fx02.ams4> <874jk7yuwd.fsf@hope.eyrie.org>
User-Agent: tin/2.0.1-20111224 ("Achenvoir") (UNIX) (Linux/2.4.31 (i586))
NNTP-Posting-Host: news.ausics.net
Date: 7 Sep 2023 09:06:30 +1000
Organization: Ausics - https://www.ausics.net
Lines: 33
X-Complaints: abuse@ausics.net
Path: i2pn2.org!i2pn.org!news.bbs.nz!news.ausics.net!not-for-mail
 by: Computer Nerd Kev - Wed, 6 Sep 2023 23:06 UTC

Russ Allbery <eagle@eyrie.org> wrote:
> Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> writes:
>
>> The reason I want to use C, is to build something that potentially can
>> work for everyone, including VAX/VMS, [MS|PC|Free]DOS, Amiga -- or the
>> more modern Vampire -- as well as the current operating systems we use
>> from day to day in the real world, far into the future.
>
> Writing portable C that will work on all of those platforms will be a
> significant challenge, particularly for the NNTP protocol which requires
> dealing with the networking stack, which in turn is quite different across
> that spectrum of operating systems if I recall correctly.
>
> Given that portability desire, you're probably better off writing your
> client in Python, since other folks have done the Python porting work for
> you.

You're joking right? I avoid Python scripts on _Linux_ because they
rarely work with the version I'm running (whether that's too new,
or too old). Good luck on more obscure platforms!

There are plenty of cross-platform programs that use networking,
written in C. From the X window system to this lightweight
encryption library (perhaps useful to the OP if they're interested
in NNTPS?):
https://github.com/classilla/cryanc

That said, it would be quite a challenge, but Python is far from
the solution there.

--
__ __
#_ < |\| |< _#

Re: A C library for the NNTP protocol?

<64f90910@news.ausics.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=2095&group=news.software.nntp#2095

  copy link   Newsgroups: news.software.nntp
Message-ID: <64f90910@news.ausics.net>
From: not@telling.you.invalid (Computer Nerd Kev)
Subject: Re: A C library for the NNTP protocol?
Newsgroups: news.software.nntp
References: <cuHJM.1091805$6Li6.85230@fx12.ams4> <ud88b8$85q$1@nnrp.usenet.blueworldhosting.com> <Q84KM.15$5D9b.13@fx02.ams4>
User-Agent: tin/2.0.1-20111224 ("Achenvoir") (UNIX) (Linux/2.4.31 (i586))
NNTP-Posting-Host: news.ausics.net
Date: 7 Sep 2023 09:19:44 +1000
Organization: Ausics - https://www.ausics.net
Lines: 29
X-Complaints: abuse@ausics.net
Path: i2pn2.org!i2pn.org!news.bbs.nz!news.ausics.net!not-for-mail
 by: Computer Nerd Kev - Wed, 6 Sep 2023 23:19 UTC

Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> wrote:
> On 9/6/2023 5:59 AM, Jesse Rehmer wrote:
>> Not a developer, but did some looking around and found that libwww by W3C
>> contains a NNTP implementation that may be useful:
>>
>> https://www.w3.org/Library/src/WWWNews.html
>>
>> You can find the original NNTP 'reference implementation' sources at:
>>
>> ftp://ftp.dinoex.org/pub/c-news/nntp.1.5.12.2.tar.gz
>> or
>> http://mirror.its.dal.ca/freebsd/distfiles/nntp.1.5.12.2.tar.gz
>>
>> (don't forget the Y2k patch)
>> http://mirror.its.dal.ca/freebsd/distfiles/nntp-patch-y2k
>
> Thank you, that seems extremely useful, if only to learn from the code
> before I implement my own.

Libwww was apparantly the basis for Lynx (web browser with NNTP
support), which seems to include a more recent version of the code
in the "WWW" directory of its source code.

https://lynx.invisible-island.net/
https://github.com/ThomasDickey/lynx-snapshots

--
__ __
#_ < |\| |< _#

Re: A C library for the NNTP protocol?

<87zg1yycle.fsf@hope.eyrie.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=2096&group=news.software.nntp#2096

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.killfile.org!news.eyrie.org!.POSTED!not-for-mail
From: eagle@eyrie.org (Russ Allbery)
Newsgroups: news.software.nntp
Subject: Re: A C library for the NNTP protocol?
Date: Wed, 06 Sep 2023 18:51:57 -0700
Organization: The Eyrie
Message-ID: <87zg1yycle.fsf@hope.eyrie.org>
References: <cuHJM.1091805$6Li6.85230@fx12.ams4>
<BGMJM.1820980$Y1R7.419554@fx04.ams4> <374KM.14$5D9b.1@fx02.ams4>
<874jk7yuwd.fsf@hope.eyrie.org> <64f905f6@news.ausics.net>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: hope.eyrie.org;
logging-data="17389"; mail-complaints-to="news@eyrie.org"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:eOKgi8LkzySiTpAlgbIe78jSRSw=
 by: Russ Allbery - Thu, 7 Sep 2023 01:51 UTC

not@telling.you.invalid (Computer Nerd Kev) writes:

> There are plenty of cross-platform programs that use networking, written
> in C. From the X window system to this lightweight encryption library
> (perhaps useful to the OP if they're interested in NNTPS?):
> https://github.com/classilla/cryanc

Which, as noted on that page, doesn't work on VMS.

I think you are significantly underestimating how much of a challenge
getting portable C to run on the list of platforms given in the original
message is. That list is not just obscure UNIX platforms, which would be
relatively straightforward. It includes platforms that the typical helper
software like Autoconf won't touch.

There is a Python port to VMS already, for example, which supports the
standard Python language. (It's even fairly recent; Python 3.10, I
believe.) That port is already dealing with a rather large amount of
stuff that you would otherwise have to handle manually.

I know any mention of Python for some reason lights some people's hair on
fire, but I mentioned it specifically because it's one of the most ported
languages, thanks in part to somewhat-reduced implementations that run on
all sorts of really obscure platforms. You may well have to stick to a
very carefully chosen subset of Python for your program to work
everywhere, but it's still going to be less work than starting at the C
level and trying to figure out even how to successfully invoke a compiler
on some of those systems.

Far be it from me to discourage anyone else's hobbies, but if your hobby
is writing a portable NNTP library for that range of platforms in C, your
hobby is actually porting C to obscure platforms. The NNTP stuff is going
to be a very tiny part of the project. :)

--
Russ Allbery (eagle@eyrie.org) <https://www.eyrie.org/~eagle/>

Please post questions rather than mailing me directly.
<https://www.eyrie.org/~eagle/faqs/questions.html> explains why.

Re: A C library for the NNTP protocol?

<IdiKM.146956$sOsa.81806@fx04.ams4>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=2098&group=news.software.nntp#2098

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!fx04.ams4.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.0
Subject: Re: A C library for the NNTP protocol?
Content-Language: en-US
Newsgroups: news.software.nntp
References: <cuHJM.1091805$6Li6.85230@fx12.ams4>
<BGMJM.1820980$Y1R7.419554@fx04.ams4> <374KM.14$5D9b.1@fx02.ams4>
<874jk7yuwd.fsf@hope.eyrie.org> <64f905f6@news.ausics.net>
<87zg1yycle.fsf@hope.eyrie.org>
From: johann@myrkraverk.invalid (Johann 'Myrkraverk' Oskarsson)
In-Reply-To: <87zg1yycle.fsf@hope.eyrie.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 37
Message-ID: <IdiKM.146956$sOsa.81806@fx04.ams4>
X-Complaints-To: abuse@easynews.com
Organization: Easynews - www.easynews.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date: Thu, 7 Sep 2023 19:11:28 +0800
X-Received-Bytes: 2778
 by: Johann 'Myrkrav - Thu, 7 Sep 2023 11:11 UTC

On 9/7/2023 9:51 AM, Russ Allbery wrote:
[snip]

> Far be it from me to discourage anyone else's hobbies, but if your hobby
> is writing a portable NNTP library for that range of platforms in C, your
> hobby is actually porting C to obscure platforms. The NNTP stuff is going
> to be a very tiny part of the project. :)

I believe you're vastly overestimating the effort of writing portable C
network code. C network libraries exist for this purpose, the two I can
name at the top of my head are NSPR and SDL_net. The former is still
used by Firefox, and at one time worked on RISC OS too. I off hand
don't recall if it worked on VMS before.

There are also ways to write the NNTP code in a way that can be plugged
into any networking framework. Such techniques are discussed in the
/Patterns in C/ book by Tornhill, though of course that'll end up as
"callback hell" as some people put it.

Anyway, at a certain competency level, the portability of the code just
stops being a concern. Either because it's written flexibly enough,
with techniques as described by Tornhill [1] or even /that OOP book/
from 199x, IIRC, which I currently forgot the name of; or because the
NNTP is written for a particular cross platform library, NSPR, SDL_net,
or something else, that then isn't hard to port to new [or old]
platforms.

A lot of experience, and a little bit of thinking ahead goes a long way.

[1] I didn't learn all these techniques from that book, but it's a
useful reference for discussions like this.

--
Johann | email: invalid -> com | www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | twitter: @myrkraverk

Re: A C library for the NNTP protocol?

<87wmx17vug.fsf@hope.eyrie.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=2099&group=news.software.nntp#2099

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.killfile.org!news.eyrie.org!.POSTED!not-for-mail
From: eagle@eyrie.org (Russ Allbery)
Newsgroups: news.software.nntp
Subject: Re: A C library for the NNTP protocol?
Date: Thu, 07 Sep 2023 10:10:31 -0700
Organization: The Eyrie
Message-ID: <87wmx17vug.fsf@hope.eyrie.org>
References: <cuHJM.1091805$6Li6.85230@fx12.ams4>
<BGMJM.1820980$Y1R7.419554@fx04.ams4> <374KM.14$5D9b.1@fx02.ams4>
<874jk7yuwd.fsf@hope.eyrie.org> <64f905f6@news.ausics.net>
<87zg1yycle.fsf@hope.eyrie.org> <IdiKM.146956$sOsa.81806@fx04.ams4>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: hope.eyrie.org;
logging-data="24825"; mail-complaints-to="news@eyrie.org"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:cTwigfIhaKW0cPQQG6AjXNIU64A=
 by: Russ Allbery - Thu, 7 Sep 2023 17:10 UTC

Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> writes:

> I believe you're vastly overestimating the effort of writing portable C
> network code. C network libraries exist for this purpose, the two I can
> name at the top of my head are NSPR and SDL_net. The former is still
> used by Firefox, and at one time worked on RISC OS too. I off hand
> don't recall if it worked on VMS before.

NSPR was ported to OpenVMS once, in the sense that an OpenVMS developer
got it to build but no one else was able to reproduce that, more than ten
years ago. It almost certainly no longer works there.

Anyway, it's probably pointless to argue about this. I said my piece
based on my own experience with maintaining portable C code, which is
worth exactly what you paid for it. I gave the warning that I would have
appreciated at various points in my own past; whether that's useful to
anyone else is entirely up to them. Far be it from me to discourage other
people's quixotic hobbies; I have a large collection of my own.

--
Russ Allbery (eagle@eyrie.org) <https://www.eyrie.org/~eagle/>

Please post questions rather than mailing me directly.
<https://www.eyrie.org/~eagle/faqs/questions.html> explains why.

Re: A C library for the NNTP protocol?

<pJrKM.63951$9o89.12292@fx05.ams4>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=2100&group=news.software.nntp#2100

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!fx05.ams4.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.0
Subject: Re: A C library for the NNTP protocol?
Newsgroups: news.software.nntp
References: <cuHJM.1091805$6Li6.85230@fx12.ams4>
<BGMJM.1820980$Y1R7.419554@fx04.ams4> <374KM.14$5D9b.1@fx02.ams4>
<874jk7yuwd.fsf@hope.eyrie.org> <64f905f6@news.ausics.net>
<87zg1yycle.fsf@hope.eyrie.org> <IdiKM.146956$sOsa.81806@fx04.ams4>
<87wmx17vug.fsf@hope.eyrie.org>
Content-Language: en-US
From: johann@myrkraverk.invalid (Johann 'Myrkraverk' Oskarsson)
In-Reply-To: <87wmx17vug.fsf@hope.eyrie.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 38
Message-ID: <pJrKM.63951$9o89.12292@fx05.ams4>
X-Complaints-To: abuse@easynews.com
Organization: Easynews - www.easynews.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date: Fri, 8 Sep 2023 05:59:47 +0800
X-Received-Bytes: 3067
 by: Johann 'Myrkrav - Thu, 7 Sep 2023 21:59 UTC

On 9/8/2023 1:10 AM, Russ Allbery wrote:
> Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> writes:
>
>> I believe you're vastly overestimating the effort of writing portable C
>> network code. C network libraries exist for this purpose, the two I can
>> name at the top of my head are NSPR and SDL_net. The former is still
>> used by Firefox, and at one time worked on RISC OS too. I off hand
>> don't recall if it worked on VMS before.
>
> NSPR was ported to OpenVMS once, in the sense that an OpenVMS developer
> got it to build but no one else was able to reproduce that, more than ten
> years ago. It almost certainly no longer works there.
>
> Anyway, it's probably pointless to argue about this. I said my piece
> based on my own experience with maintaining portable C code, which is
> worth exactly what you paid for it. I gave the warning that I would have
> appreciated at various points in my own past; whether that's useful to
> anyone else is entirely up to them. Far be it from me to discourage other
> people's quixotic hobbies; I have a large collection of my own.
>

Fair enough, and yes, I have my weird hobbies. Writing portable C code
is an art, and sometimes quite frustrating.

On the subject of Python, I fear, based on my own experience and others'
that it isn't the panacea [some people|you] think it is. Mostly, what
frustrates people these days is that tested and working code isn't work-
ing anymore, because it isn't pythonic enough two to five years later.
Personally, that's enough for me to stay away from that particular side
of the tech spectrum.

Anyway, I'll report back when I've gotten somewhere with my NNTP adven-
tures. Thanks to everyone who replied in the thread,

--
Johann | email: invalid -> com | www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | twitter: @myrkraverk

Re: A C library for the NNTP protocol?

<87pm2t7hrl.fsf@hope.eyrie.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=2101&group=news.software.nntp#2101

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.killfile.org!news.eyrie.org!.POSTED!not-for-mail
From: eagle@eyrie.org (Russ Allbery)
Newsgroups: news.software.nntp
Subject: Re: A C library for the NNTP protocol?
Date: Thu, 07 Sep 2023 15:14:38 -0700
Organization: The Eyrie
Message-ID: <87pm2t7hrl.fsf@hope.eyrie.org>
References: <cuHJM.1091805$6Li6.85230@fx12.ams4>
<BGMJM.1820980$Y1R7.419554@fx04.ams4> <374KM.14$5D9b.1@fx02.ams4>
<874jk7yuwd.fsf@hope.eyrie.org> <64f905f6@news.ausics.net>
<87zg1yycle.fsf@hope.eyrie.org> <IdiKM.146956$sOsa.81806@fx04.ams4>
<87wmx17vug.fsf@hope.eyrie.org> <pJrKM.63951$9o89.12292@fx05.ams4>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: hope.eyrie.org;
logging-data="24825"; mail-complaints-to="news@eyrie.org"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:ec2WIWVVGcy3kHt+tfm/Eubr9iM=
 by: Russ Allbery - Thu, 7 Sep 2023 22:14 UTC

Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> writes:

> On the subject of Python, I fear, based on my own experience and others'
> that it isn't the panacea [some people|you] think it is. Mostly, what
> frustrates people these days is that tested and working code isn't work-
> ing anymore, because it isn't pythonic enough two to five years
> later.

This is also quite famously true of C code due to increasingly aggressive
optimization passes that depend more on the formal semantics of C that are
often not followed by real-world code. Linus Torvalds complains about it
all the time. (There of course are good arguments about which language is
more vulnerable to this, and to some extent it depends on what you're
doing in the language. Certainly the Python 3 transition was a huge,
disruptive change unlike anything that C has gone through; the transition
from K&R to ISO C took place over a much longer period of time and to this
day isn't entirely complete in that some C compilers still accept K&R
code, although that support seems to be dropping off.)

I think ongoing maintenance is just part of writing code, but I do seem to
be more sanguine about this than many people.

--
Russ Allbery (eagle@eyrie.org) <https://www.eyrie.org/~eagle/>

Please post questions rather than mailing me directly.
<https://www.eyrie.org/~eagle/faqs/questions.html> explains why.

Re: A C library for the NNTP protocol?

<slrnufkv9u.446.jon+usenet@raven.unequivocal.eu>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=2102&group=news.software.nntp#2102

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jon+usenet@unequivocal.eu (Jon Ribbens)
Newsgroups: news.software.nntp
Subject: Re: A C library for the NNTP protocol?
Date: Fri, 8 Sep 2023 01:47:42 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <slrnufkv9u.446.jon+usenet@raven.unequivocal.eu>
References: <cuHJM.1091805$6Li6.85230@fx12.ams4>
<BGMJM.1820980$Y1R7.419554@fx04.ams4> <374KM.14$5D9b.1@fx02.ams4>
<874jk7yuwd.fsf@hope.eyrie.org> <64f905f6@news.ausics.net>
<87zg1yycle.fsf@hope.eyrie.org> <IdiKM.146956$sOsa.81806@fx04.ams4>
<87wmx17vug.fsf@hope.eyrie.org> <pJrKM.63951$9o89.12292@fx05.ams4>
<87pm2t7hrl.fsf@hope.eyrie.org>
Injection-Date: Fri, 8 Sep 2023 01:47:42 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e0cbf303b506ac07aea9ba58a5925573";
logging-data="3480253"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/6B73HGMQ+j0WnMKDdrUv3P2yoG9/LjAM="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:jOUxJArZHgkXoJXvVUh6+IoyKzY=
 by: Jon Ribbens - Fri, 8 Sep 2023 01:47 UTC

On 2023-09-07, Russ Allbery <eagle@eyrie.org> wrote:
> Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> writes:
>> On the subject of Python, I fear, based on my own experience and others'
>> that it isn't the panacea [some people|you] think it is. Mostly, what
>> frustrates people these days is that tested and working code isn't work-
>> ing anymore, because it isn't pythonic enough two to five years
>> later.
>
> This is also quite famously true of C code due to increasingly aggressive
> optimization passes that depend more on the formal semantics of C that are
> often not followed by real-world code. Linus Torvalds complains about it
> all the time. (There of course are good arguments about which language is
> more vulnerable to this, and to some extent it depends on what you're
> doing in the language. Certainly the Python 3 transition was a huge,
> disruptive change unlike anything that C has gone through;

You are absolutely right, but the Python 3 transition happened fifteen
years ago now. The claim above that things have massively changed to
break working code in the last "two to five years" is ... difficult to
reconcile with reality.

Re: A C library for the NNTP protocol?

<871qf9gyq5.fsf@hope.eyrie.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=2103&group=news.software.nntp#2103

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.killfile.org!news.eyrie.org!.POSTED!not-for-mail
From: eagle@eyrie.org (Russ Allbery)
Newsgroups: news.software.nntp
Subject: Re: A C library for the NNTP protocol?
Date: Thu, 07 Sep 2023 19:55:46 -0700
Organization: The Eyrie
Message-ID: <871qf9gyq5.fsf@hope.eyrie.org>
References: <cuHJM.1091805$6Li6.85230@fx12.ams4>
<BGMJM.1820980$Y1R7.419554@fx04.ams4> <374KM.14$5D9b.1@fx02.ams4>
<874jk7yuwd.fsf@hope.eyrie.org> <64f905f6@news.ausics.net>
<87zg1yycle.fsf@hope.eyrie.org> <IdiKM.146956$sOsa.81806@fx04.ams4>
<87wmx17vug.fsf@hope.eyrie.org> <pJrKM.63951$9o89.12292@fx05.ams4>
<87pm2t7hrl.fsf@hope.eyrie.org>
<slrnufkv9u.446.jon+usenet@raven.unequivocal.eu>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: hope.eyrie.org;
logging-data="16479"; mail-complaints-to="news@eyrie.org"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:68ekconU1+YAqZdtOuLBR9bRVkw=
 by: Russ Allbery - Fri, 8 Sep 2023 02:55 UTC

Jon Ribbens <jon+usenet@unequivocal.eu> writes:

> You are absolutely right, but the Python 3 transition happened fifteen
> years ago now. The claim above that things have massively changed to
> break working code in the last "two to five years" is ... difficult to
> reconcile with reality.

I tend to give people the benefit of the doubt on this because it does
depend on what you're doing with the language. I personally seem to have
very good luck; both my Python code and my C code seems to rarely be
affected by this stuff. (But I love language trivia and am usually
familiar with deprecations and "native style" for lack of a better term.)

Python has a fairly regular stream of deprecation warnings, and sometimes
breaking changes in libraries (and whole deprecated libraries), so you can
get unlucky and have a lot of mandatory updates if you happened to pick
the wrong stuff. I'm a bit more dubious at the core language level, but
Python by design blurs those lines (the whole "batteries included" thing),
and I also use linters fairly aggressively (Ruff is great) which may
explain why I got steered away from stuff that was unstable or potentially
deprecated.

But yes, outside of this thread (for which I have no data), a lot of the
people I see on-line who are mad about Python portability are still mad
about the Python 3 transition, and so far as I can tell are determined to
stay mad about it until they die.

--
Russ Allbery (eagle@eyrie.org) <https://www.eyrie.org/~eagle/>

Please post questions rather than mailing me directly.
<https://www.eyrie.org/~eagle/faqs/questions.html> explains why.

Re: A C library for the NNTP protocol?

<udeg2u$2l2si$1@news.trigofacile.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=2104&group=news.software.nntp#2104

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.trigofacile.com!.POSTED.san13-h02-176-143-2-105.dsl.sta.abo.bbox.fr!not-for-mail
From: iulius@nom-de-mon-site.com.invalid (Julien ÉLIE)
Newsgroups: news.software.nntp
Subject: Re: A C library for the NNTP protocol?
Date: Fri, 8 Sep 2023 08:47:58 +0200
Organization: Groupes francophones par TrigoFACILE
Message-ID: <udeg2u$2l2si$1@news.trigofacile.com>
References: <cuHJM.1091805$6Li6.85230@fx12.ams4>
<BGMJM.1820980$Y1R7.419554@fx04.ams4> <374KM.14$5D9b.1@fx02.ams4>
<874jk7yuwd.fsf@hope.eyrie.org> <64f905f6@news.ausics.net>
<87zg1yycle.fsf@hope.eyrie.org> <IdiKM.146956$sOsa.81806@fx04.ams4>
<87wmx17vug.fsf@hope.eyrie.org> <pJrKM.63951$9o89.12292@fx05.ams4>
<87pm2t7hrl.fsf@hope.eyrie.org>
<slrnufkv9u.446.jon+usenet@raven.unequivocal.eu>
<871qf9gyq5.fsf@hope.eyrie.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 8 Sep 2023 06:47:58 -0000 (UTC)
Injection-Info: news.trigofacile.com; posting-account="julien"; posting-host="san13-h02-176-143-2-105.dsl.sta.abo.bbox.fr:176.143.2.105";
logging-data="2788242"; mail-complaints-to="abuse@trigofacile.com"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0)
Gecko/20100101 Thunderbird/102.15.0
Cancel-Lock: sha1:v/5TMjRA0J1BO8wwIUhS4l0JBhw= sha256:U1eouYVLF4/QrknZKSX+wUucrecBqFEx6ayg4LZhdmg=
sha1:R0FkwvWsu66G1zZpiRGgwNq6jrw= sha256:4ymF+4XHabzUMQnflCGiHIFs5NBsFkTnC7S+b49fbNE=
In-Reply-To: <871qf9gyq5.fsf@hope.eyrie.org>
 by: Julien ÉLIE - Fri, 8 Sep 2023 06:47 UTC

Hi Russ,

> I personally seem to have
> very good luck; both my Python code and my C code seems to rarely be
> affected by this stuff.

Same thing for me as for the Python scripts and the web site in Python
(using mod_wsgi) I wrote. The transition to Python 3 was easy. The
only problem I ran into was to properly handle the literal strings that
are taken as Unicode code points by default, contrary to Python 2. Once
that mechanism is understood, decoding/encoding at the right places is easy.

--
Julien ÉLIE

« It's documented in The Book, somewhere… » (Larry Wall)

Re: A C library for the NNTP protocol?

<wwvzg1xyvxp.fsf@LkoBDZeT.terraraq.uk>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=2105&group=news.software.nntp#2105

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!news.nntp4.net!nntp.terraraq.uk!.POSTED.tunnel.sfere.anjou.terraraq.org.uk!not-for-mail
From: invalid@invalid.invalid (Richard Kettlewell)
Newsgroups: news.software.nntp
Subject: Re: A C library for the NNTP protocol?
Date: Fri, 08 Sep 2023 08:18:42 +0100
Organization: terraraq NNTP server
Message-ID: <wwvzg1xyvxp.fsf@LkoBDZeT.terraraq.uk>
References: <cuHJM.1091805$6Li6.85230@fx12.ams4>
<BGMJM.1820980$Y1R7.419554@fx04.ams4> <374KM.14$5D9b.1@fx02.ams4>
<874jk7yuwd.fsf@hope.eyrie.org> <64f905f6@news.ausics.net>
<87zg1yycle.fsf@hope.eyrie.org> <IdiKM.146956$sOsa.81806@fx04.ams4>
<87wmx17vug.fsf@hope.eyrie.org> <pJrKM.63951$9o89.12292@fx05.ams4>
<87pm2t7hrl.fsf@hope.eyrie.org>
<slrnufkv9u.446.jon+usenet@raven.unequivocal.eu>
<871qf9gyq5.fsf@hope.eyrie.org> <udeg2u$2l2si$1@news.trigofacile.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: innmantic.terraraq.uk; posting-host="tunnel.sfere.anjou.terraraq.org.uk:172.17.207.6";
logging-data="43406"; mail-complaints-to="usenet@innmantic.terraraq.uk"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:22DTU7vmYrbscYI54cdWCgD6QMA=
X-Face: h[Hh-7npe<<b4/eW[]sat,I3O`t8A`(ej.H!F4\8|;ih)`7{@:A~/j1}gTt4e7-n*F?.Rl^
F<\{jehn7.KrO{!7=:(@J~]<.[{>v9!1<qZY,{EJxg6?Er4Y7Ng2\Ft>Z&W?r\c.!4DXH5PWpga"ha
+r0NzP?vnz:e/knOY)PI-
X-Boydie: NO
 by: Richard Kettlewell - Fri, 8 Sep 2023 07:18 UTC

Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> writes:
> Hi Russ,
>
>> I personally seem to have very good luck; both my Python code and my
>> C code seems to rarely be affected by this stuff.
>
> Same thing for me as for the Python scripts and the web site in Python
> (using mod_wsgi) I wrote. The transition to Python 3 was easy. The
> only problem I ran into was to properly handle the literal strings
> that are taken as Unicode code points by default, contrary to Python
> 2. Once that mechanism is understood, decoding/encoding at the right
> places is easy.

The C API changed a fair bit, with some things going away completely and
needing to be replaced. i.e extension module authors had a bit more work
to do than people working in pure Python.

--
https://www.greenend.org.uk/rjk/

Re: A C library for the NNTP protocol?

<udeu1i$2l8hc$2@news.trigofacile.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=2106&group=news.software.nntp#2106

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.trigofacile.com!.POSTED.san13-h02-176-143-2-105.dsl.sta.abo.bbox.fr!not-for-mail
From: iulius@nom-de-mon-site.com.invalid (Julien ÉLIE)
Newsgroups: news.software.nntp
Subject: Re: A C library for the NNTP protocol?
Date: Fri, 8 Sep 2023 12:46:10 +0200
Organization: Groupes francophones par TrigoFACILE
Message-ID: <udeu1i$2l8hc$2@news.trigofacile.com>
References: <cuHJM.1091805$6Li6.85230@fx12.ams4>
<BGMJM.1820980$Y1R7.419554@fx04.ams4> <374KM.14$5D9b.1@fx02.ams4>
<874jk7yuwd.fsf@hope.eyrie.org> <64f905f6@news.ausics.net>
<87zg1yycle.fsf@hope.eyrie.org> <IdiKM.146956$sOsa.81806@fx04.ams4>
<87wmx17vug.fsf@hope.eyrie.org> <pJrKM.63951$9o89.12292@fx05.ams4>
<87pm2t7hrl.fsf@hope.eyrie.org>
<slrnufkv9u.446.jon+usenet@raven.unequivocal.eu>
<871qf9gyq5.fsf@hope.eyrie.org> <udeg2u$2l2si$1@news.trigofacile.com>
<wwvzg1xyvxp.fsf@LkoBDZeT.terraraq.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 8 Sep 2023 10:46:10 -0000 (UTC)
Injection-Info: news.trigofacile.com; posting-account="julien"; posting-host="san13-h02-176-143-2-105.dsl.sta.abo.bbox.fr:176.143.2.105";
logging-data="2794028"; mail-complaints-to="abuse@trigofacile.com"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0)
Gecko/20100101 Thunderbird/102.15.0
Cancel-Lock: sha1:IEDQIlG5fjaZLrraCjWAyU1fWe4= sha256:HG7MxdrhsdfG2hbU2vOEeP6q7F4YJQUijAS75WTY8FY=
sha1:qDASBy3DkApYOZSRsWujEciu9Z0= sha256:CuxvfQvnpmRMpFHZMdgMaG0uVyMz9ayLHLVurXPS2Oc=
In-Reply-To: <wwvzg1xyvxp.fsf@LkoBDZeT.terraraq.uk>
 by: Julien ÉLIE - Fri, 8 Sep 2023 10:46 UTC

Hi Richard,

>> Same thing for me as for the Python scripts and the web site in Python
>> (using mod_wsgi) I wrote. The transition to Python 3 was easy. The
>> only problem I ran into was to properly handle the literal strings
>> that are taken as Unicode code points by default, contrary to Python
>> 2. Once that mechanism is understood, decoding/encoding at the right
>> places is easy.
>
> The C API changed a fair bit, with some things going away completely and
> needing to be replaced. i.e extension module authors had a bit more work
> to do than people working in pure Python.

Indeed, it's far more work with the C API.
I remember having added Python 3 support in INN a few years ago, and it
was a bit of work, essentially for memoryview handling and Unicode:
https://github.com/InterNetNews/inn/commit/f99cc6a4193b5ac75c0453c769bbc7c905d33015

I totally agree that for extension modules in general, the switch is
complicated (INN does not use much of available Python C API).

--
Julien ÉLIE

« The best preparation for tomorrow is to do today's work superbly
well. » (William Osler)

Re: A C library for the NNTP protocol?

<udi6k6$51h4$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=2107&group=news.software.nntp#2107

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: droleary.usenet@2023.impossiblystupid.com (Doc O'Leary ,)
Newsgroups: news.software.nntp
Subject: Re: A C library for the NNTP protocol?
Date: Sat, 9 Sep 2023 16:31:02 -0000 (UTC)
Organization: Subsume Technologies, Inc.
Lines: 41
Message-ID: <udi6k6$51h4$1@dont-email.me>
References: <cuHJM.1091805$6Li6.85230@fx12.ams4>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 9 Sep 2023 16:31:02 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="7574942dadc26a979e913a8257b0a508";
logging-data="165412"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18hoGw3apIYnhAIhlSgyz4Zk0FMlaP3XTM="
User-Agent: com.subsume.NNTP/1.0.0
Cancel-Lock: sha1:o6xO7N5IFId0sSr28jutb82Fbgs=
 by: Doc O'Leary , - Sat, 9 Sep 2023 16:31 UTC

For your reference, records indicate that
Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> wrote:

> Dear n.s.nntp,
>
> Are there still extant C libraries that implement NNTP, and are
> useful for creating Usenet clients?

Honestly, no. I started working on a Mac newsreader back in 2014 when
MT-NewsWatcher was broken by a system update. I did a survey of all
the open source C-based NNTP clients I could find, in hopes that one
of them would be easy to wrap Objective-C around.

What I found is that most projects got “opinionated” very quickly, and
the required dependencies were forcing me to focus on things that had
nothing to do with NNTP. Given that the protocol isn’t that complex,
it was easier for me to implement my objects from scratch (using Apple’s
supplied NSStream objects to take care of SSL and all the other lower
level network stuff).

> 2) In the absence of 1) how would I start experimenting on my own?

Again, since the protocol isn’t that complex, you’re not likely to run
into all that much trouble with public servers as long as you don’t let
your buggy code flood them. Take it in small steps and your traffic
won’t even be a blip on the radar, even given the low Usenet usage these
days.

> Am I perhaps overthinking this, and this is rather easy?

It’s “easy” in the sense that if you have the skills to write the
software in the first place, the NNTP protocol itself is not going to
give you difficulty. What I spent the bulk of my time on was everything
that happens before and after the data transfer. Heaven help you if
you’re looking to make something with multipart binary support . . .

--
"Also . . . I can kill you with my brain."
River Tam, Trash, Firefly

Re: A C library for the NNTP protocol?

<87tts32tgx.fsf@hope.eyrie.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=2108&group=news.software.nntp#2108

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.killfile.org!news.eyrie.org!.POSTED!not-for-mail
From: eagle@eyrie.org (Russ Allbery)
Newsgroups: news.software.nntp
Subject: Re: A C library for the NNTP protocol?
Date: Sat, 09 Sep 2023 09:37:34 -0700
Organization: The Eyrie
Message-ID: <87tts32tgx.fsf@hope.eyrie.org>
References: <cuHJM.1091805$6Li6.85230@fx12.ams4> <udi6k6$51h4$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: hope.eyrie.org;
logging-data="8494"; mail-complaints-to="news@eyrie.org"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:NZruHWqIlDcsKlQk1qlRVjE10gM=
 by: Russ Allbery - Sat, 9 Sep 2023 16:37 UTC

Doc O'Leary , <droleary.usenet@2023.impossiblystupid.com> writes:

> It’s “easy” in the sense that if you have the skills to write the
> software in the first place, the NNTP protocol itself is not going to
> give you difficulty. What I spent the bulk of my time on was everything
> that happens before and after the data transfer. Heaven help you if
> you’re looking to make something with multipart binary support . . .

Yeah, agreed, the NNTP part is drastically simpler than the article
parsing part. Even if you don't implement MIME, parsing news articles is
challenging. There are a lot of libraries out there, but my impression is
that there are more of them in higher-level languages like Perl or Python
than there are in C (probably for the obvious reason that it's essentially
all string parsing, which is one of C's weakest points since the language
exposes all of the fiddly bits and byte counting and provides you very
little help with character sets).

--
Russ Allbery (eagle@eyrie.org) <https://www.eyrie.org/~eagle/>

Please post questions rather than mailing me directly.
<https://www.eyrie.org/~eagle/faqs/questions.html> explains why.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor