kcar RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [ANN] kcar 0.7.0 - bytestream to Rack response converter
@ 2020-02-21  2:32  8% Eric Wong
  0 siblings, 0 replies; 7+ results
From: Eric Wong @ 2020-02-21  2:32 UTC (permalink / raw)
  To: kcar-public

kcar features an HTTP parser that will convert a bytestream into a
3-element array suitable for use as a Rack response.  It is IO interface
agnostic, so it may be used with HTTP streams over Unix domain sockets,
regular files, FIFOs, StringIOs as well as traditional TCP sockets.

* homepage: https://yhbt.net/kcar/
* public inbox: kcar-public@yhbt.net
* git clone https://yhbt.net/kcar.git
* mailing list archives: https://yhbt.net/kcar-public/

Changes:

46 changes since 0.6.0 (2015-08-04):
      README: fix reference to HTTP git viewer
      doc: move site to HTTPS
      pkg.mk: avoid network for "gem install"
      gemspec: use SPDX compatible terms for the license(s)
      archive/slrnpull.conf: add a note explaining the purpose
      drop rb_str_set_len compatibility replacement
      remove rb_str_modify workaround
      TypedData C-API conversion
      test_parser: add lone CR test
      reduce parser size to 88 bytes on 64-bit
      extconf: remove unneeded -fPIC CFLAGS
      rely on String#-@ (str_uminus) to dedupe headers
      update comment about freezing values
      http: reject non-LWS CTL chars (0..31 + 127) in field values
      doc: remove references to a server
      update documentation for contributions, remove private address
      doc: minor updates to describe classes, better
      response: remove unnecessary constant alias
      response: more documentation cleanups
      favor require_relative to speed up loading
      response: remove Ruby 1.8-compatibility check
      fix signedness check on 32-bit systems
      shorten and improve readability of assertion
      HACKING: remove copy+pasted line about N
      olddoc: include NNTP archive link
      gemspec: remove olddoc dev dependency
      README: add info about mailing list subscription
      nodoc Kcar::VERSION
      pkg.mk: support VALGRIND variable for unit tests
      introduce new str_new_dd_freeze internal function
      begin implementing request parsing
      favor bitfields instead flags + macros
      implement request parsing with tests
      pkg.mk: enable warnings by default for tests
      filter_body: rename variables to be like memcpy(3)
      flesh out filter_body for request parsing
      do not assume SERVER_PORT
      do not set "HTTP/0.9" for pre-1.0 requests
      always set non-negative Content-Length for requests
      avoid String#-@ call on request parsing under Ruby 2.6
      request: set env["FRAGMENT"] for WebDAV litmus test
      extconf: fix rb_hash_aset deduplication test
      use rb_gc_register_mark_object
      website: use dark216 to save electricity
      doc: update URLs to point to YHBT.net
      doc: update git:// URLs to HTTPS

^ permalink raw reply	[relevance 8%]

* Re: [PATCH] README: add info about mailing list subscription
  2017-04-11  7:29  6%             ` Eric Wong
@ 2017-04-11 17:33  7%               ` Lin Jen-Shin (godfat)
  0 siblings, 0 replies; 7+ results
From: Lin Jen-Shin (godfat) @ 2017-04-11 17:33 UTC (permalink / raw)
  To: Eric Wong; +Cc: kcar-public

On Tue, Apr 11, 2017 at 3:29 PM, Eric Wong <e@80x24.org> wrote:
> Yes; that's what I meant.  Sorry for the confusion...
> nntp2imap would work like feed2imap currently does:
>
>         The client (your machine) downloads from a server via
>         (NNTP|RSS|Atom) and writes to any IMAP inbox, also as a
>         client.  Nothing I've talked about involves either me or
>         readers of this list (you included) running a new IMAP
>         server :)
>
> But yeah, AFAIK GMail allows you to use any IMAP client
> (including feed2imap) to write mail to GMail servers;
> which you can then read via webmail or another IMAP client.
>
>
> I guess part where I confused you is GMail supports POP3 both as
> a client (so they can read mail off your ISP/work/school mail
> servers) and as a server (so you can also read all the messages
> they can also read :)  But yeah, POP3 is rather dated since
> most people prefer email accessible from multiple machines
> and it's clumsy with POP3.

Oh, that's exactly where the confusion was coming from.
Indeed I am using POP3 to fetch mails from my other GMail
accounts into one inbox, so that I have backups. Thank you
for clarifying this.

> Maybe some janky arrows in ASCII art will help:
>
>        >----SMTP ---->+
> (you)  <----POP3----<-+        .----< POP3 ---< (work|ISP|school POP3)
>   ^----<----webmail->-> GMail <
>   +----<----IMAP---->-'        `-----< SMTP--< (rest of the world)
>   ^
>   |
>   |`---< feed2imap --<- RSS/Atom feeds
>   |
>    `---< nntp2imap --<- NNTP
>
> *shrug*  /me is sleepy :x

Nice art :P

So I guess the plan could be that I setup nntp2imap to read mails
via NNTP and write mails into my GMail inbox via IMAP. The only
thing I am a bit worried is that several years ago when I was still
using desktop email clients, setting up IMAP to read mails could
be deleting mails from my webmail inbox. It could be
misconfiguration, or it would not happen on GMail I don't know.
This is the main reason why I am still using POP3.

>> > be a part of yahns (Ruby) and not part of public-inbox (Perl5)
>> > at this point; so maybe you would be willing host that for
>> > other people, too :)
>>
>> Yeah, sure, as long as I don't have to expand my existing server,
>> I am willing to host it and maintain it for other people.
>
> Thanks for the feedback.  One of my goals is to keep Free Software
> inexpensive to run :)

Inexpensive therefore more accessible and easier to be distributed
and the system would be more robust :)

^ permalink raw reply	[relevance 7%]

* Re: [PATCH] README: add info about mailing list subscription
  2017-04-11  7:01  7%           ` Lin Jen-Shin (godfat)
@ 2017-04-11  7:29  6%             ` Eric Wong
  2017-04-11 17:33  7%               ` Lin Jen-Shin (godfat)
  0 siblings, 1 reply; 7+ results
From: Eric Wong @ 2017-04-11  7:29 UTC (permalink / raw)
  To: Lin Jen-Shin (godfat); +Cc: kcar-public

"Lin Jen-Shin (godfat)" <godfat@godfat.org> wrote:
> On Tue, Apr 11, 2017 at 4:39 AM, Eric Wong <e@80x24.org> wrote:
> > "Lin Jen-Shin (godfat)" <godfat@godfat.org> wrote:
> >> On Tue, Apr 11, 2017 at 1:36 AM, Eric Wong <e@80x24.org> wrote:
> >> > I guess another question is: do you use IMAP to read mail
> >> > or webmail (or something else, POP3)?
> >>
> >> Oh, now I understand what you're saying. Unfortunately
> >> I am currently stuck with GMail, using the web interface.
> >> I could setup POP3 to receive emails into my inbox (I did so
> >> for some other accounts), but I guess I could not setup IMAP
> >> for GMail.
> >
> > Actually, GMail supports SMTP and IMAP; they just give scary
> > warnings about enabling them because they lack 2FA support.
> > git manpages for git-imap-send(1) and git-send-email(1)
> > document GMail support, even.
> 
> I think GMail does support IMAP as a server, but not as a client?
> I thought if you're setting up an IMAP server, I need to use an
> IMAP client to fetch the mails? Or that's not the plan? Or I
> misunderstand how IMAP works. I never really used it.

Yes; that's what I meant.  Sorry for the confusion...
nntp2imap would work like feed2imap currently does:

	The client (your machine) downloads from a server via
	(NNTP|RSS|Atom) and writes to any IMAP inbox, also as a
	client.  Nothing I've talked about involves either me or
	readers of this list (you included) running a new IMAP
	server :)

But yeah, AFAIK GMail allows you to use any IMAP client
(including feed2imap) to write mail to GMail servers;
which you can then read via webmail or another IMAP client.


I guess part where I confused you is GMail supports POP3 both as
a client (so they can read mail off your ISP/work/school mail
servers) and as a server (so you can also read all the messages
they can also read :)  But yeah, POP3 is rather dated since
most people prefer email accessible from multiple machines
and it's clumsy with POP3.

Maybe some janky arrows in ASCII art will help:

       >----SMTP ---->+
(you)  <----POP3----<-+        .----< POP3 ---< (work|ISP|school POP3)
  ^----<----webmail->-> GMail <
  +----<----IMAP---->-'        `-----< SMTP--< (rest of the world)
  ^
  |
  |`---< feed2imap --<- RSS/Atom feeds
  |
   `---< nntp2imap --<- NNTP

*shrug*  /me is sleepy :x

> > be a part of yahns (Ruby) and not part of public-inbox (Perl5)
> > at this point; so maybe you would be willing host that for
> > other people, too :)
> 
> Yeah, sure, as long as I don't have to expand my existing server,
> I am willing to host it and maintain it for other people.

Thanks for the feedback.  One of my goals is to keep Free Software
inexpensive to run :)

^ permalink raw reply	[relevance 6%]

* Re: [PATCH] README: add info about mailing list subscription
  2017-04-10 20:39  7%         ` Eric Wong
@ 2017-04-11  7:01  7%           ` Lin Jen-Shin (godfat)
  2017-04-11  7:29  6%             ` Eric Wong
  0 siblings, 1 reply; 7+ results
From: Lin Jen-Shin (godfat) @ 2017-04-11  7:01 UTC (permalink / raw)
  To: Eric Wong; +Cc: kcar-public

On Tue, Apr 11, 2017 at 4:39 AM, Eric Wong <e@80x24.org> wrote:
> "Lin Jen-Shin (godfat)" <godfat@godfat.org> wrote:
>> On Tue, Apr 11, 2017 at 1:36 AM, Eric Wong <e@80x24.org> wrote:
>> > I guess another question is: do you use IMAP to read mail
>> > or webmail (or something else, POP3)?
>>
>> Oh, now I understand what you're saying. Unfortunately
>> I am currently stuck with GMail, using the web interface.
>> I could setup POP3 to receive emails into my inbox (I did so
>> for some other accounts), but I guess I could not setup IMAP
>> for GMail.
>
> Actually, GMail supports SMTP and IMAP; they just give scary
> warnings about enabling them because they lack 2FA support.
> git manpages for git-imap-send(1) and git-send-email(1)
> document GMail support, even.

I think GMail does support IMAP as a server, but not as a client?
I thought if you're setting up an IMAP server, I need to use an
IMAP client to fetch the mails? Or that's not the plan? Or I
misunderstand how IMAP works. I never really used it.

>> > For a sysadmin, the beauty of NNTP is there's no per-client
>> > state stored on the server itself.  It's all in the client.
>> > Same for Atom feeds.
>>
>> I could setup/run some daemons on my server, as long as
>> the mails could eventually deliver to my inbox so that my
>> regular workflow would stay the same. I don't know what
>> could do that though.
>
> I'm not sure if NNTP tools exist for NNTP=>IMAP or NNTP=>POP3;
> yet.  But if I write an NNTP=>POP3 server, it'll more likely
> be a part of yahns (Ruby) and not part of public-inbox (Perl5)
> at this point; so maybe you would be willing host that for
> other people, too :)

Yeah, sure, as long as I don't have to expand my existing server,
I am willing to host it and maintain it for other people.

Cheers,

^ permalink raw reply	[relevance 7%]

* Re: [PATCH] README: add info about mailing list subscription
  2017-04-10 19:00  7%       ` Lin Jen-Shin (godfat)
@ 2017-04-10 20:39  7%         ` Eric Wong
  2017-04-11  7:01  7%           ` Lin Jen-Shin (godfat)
  0 siblings, 1 reply; 7+ results
From: Eric Wong @ 2017-04-10 20:39 UTC (permalink / raw)
  To: Lin Jen-Shin (godfat); +Cc: kcar-public

"Lin Jen-Shin (godfat)" <godfat@godfat.org> wrote:
> On Tue, Apr 11, 2017 at 1:36 AM, Eric Wong <e@80x24.org> wrote:
> > I guess another question is: do you use IMAP to read mail
> > or webmail (or something else, POP3)?
> 
> Oh, now I understand what you're saying. Unfortunately
> I am currently stuck with GMail, using the web interface.
> I could setup POP3 to receive emails into my inbox (I did so
> for some other accounts), but I guess I could not setup IMAP
> for GMail.

Actually, GMail supports SMTP and IMAP; they just give scary
warnings about enabling them because they lack 2FA support.
git manpages for git-imap-send(1) and git-send-email(1)
document GMail support, even.

> > For a sysadmin, the beauty of NNTP is there's no per-client
> > state stored on the server itself.  It's all in the client.
> > Same for Atom feeds.
> 
> I could setup/run some daemons on my server, as long as
> the mails could eventually deliver to my inbox so that my
> regular workflow would stay the same. I don't know what
> could do that though.

I'm not sure if NNTP tools exist for NNTP=>IMAP or NNTP=>POP3;
yet.  But if I write an NNTP=>POP3 server, it'll more likely
be a part of yahns (Ruby) and not part of public-inbox (Perl5)
at this point; so maybe you would be willing host that for
other people, too :)

^ permalink raw reply	[relevance 7%]

* Re: [PATCH] README: add info about mailing list subscription
  2017-04-10 17:36 14%     ` [PATCH] README: add info about mailing list subscription Eric Wong
@ 2017-04-10 19:00  7%       ` Lin Jen-Shin (godfat)
  2017-04-10 20:39  7%         ` Eric Wong
  0 siblings, 1 reply; 7+ results
From: Lin Jen-Shin (godfat) @ 2017-04-10 19:00 UTC (permalink / raw)
  To: Eric Wong; +Cc: kcar-public

On Tue, Apr 11, 2017 at 1:36 AM, Eric Wong <e@80x24.org> wrote:
> I guess another question is: do you use IMAP to read mail
> or webmail (or something else, POP3)?

Oh, now I understand what you're saying. Unfortunately
I am currently stuck with GMail, using the web interface.
I could setup POP3 to receive emails into my inbox (I did so
for some other accounts), but I guess I could not setup IMAP
for GMail.

> With nntp2imap, it might be something like:
>
> ==> ~/.nntp2imap/rc.yml <=
> ---
> groups:
>   - name: kcar
>     source: nntp://news.public-inbox.org/inbox.comp.lang.ruby.kcar
>     destination: imaps://username@yourserver.example.com/INBOX.kcar
>   ...
>
> That way, I would have no information about who reads the list
> (especially if you use something like Tor to anonymize yourself)
>
> Another option might be Atom feeds; but Message-ID headers
> tend to get lost when people want to reply...
>
> For a sysadmin, the beauty of NNTP is there's no per-client
> state stored on the server itself.  It's all in the client.
> Same for Atom feeds.

I could setup/run some daemons on my server, as long as
the mails could eventually deliver to my inbox so that my
regular workflow would stay the same. I don't know what
could do that though.

Cheers,

^ permalink raw reply	[relevance 7%]

* [PATCH] README: add info about mailing list subscription
  @ 2017-04-10 17:36 14%     ` Eric Wong
  2017-04-10 19:00  7%       ` Lin Jen-Shin (godfat)
  0 siblings, 1 reply; 7+ results
From: Eric Wong @ 2017-04-10 17:36 UTC (permalink / raw)
  To: Lin Jen-Shin (godfat); +Cc: kcar-public

"Lin Jen-Shin (godfat)" <godfat@godfat.org> wrote:
> On Mon, Apr 10, 2017 at 10:54 PM, Eric Wong <e@80x24.org> wrote:
> > mlmmj uses plus-addressing: kcar-public+subscribe@bogomips.org
> 
> Ohh, sorry about that. I spent a few seconds and cannot find
> how to subscribe it so I decided to just try it. Mentioning this
> in the README would be nice. (or I guess you might want to
> reduce the subscribers therefore not mentioning it? :P)

Yeah, I didn't really want it; but I suppose it's better
than "subscribe" messages coming to the list.  Patch below.

> > Also, I'm considering writing something which downloads NNTP
> > messages(*) and uploads to IMAP servers to reduce SMTP
> > subscribers on my mailing lists; similar to how the feed2imap
> > RubyGem works for RSS/Atom feeds.
> >
> >
> > Would you consider using that? (or writing something like that
> > yourself? :)
> 
> Sorry that I don't really understand how this works. For myself,
> as long as there's an easy way to subscribe to the mailing list,
> whatever should work for me.

I guess another question is: do you use IMAP to read mail
or webmail (or something else, POP3)?

With nntp2imap, it might be something like:

==> ~/.nntp2imap/rc.yml <=
---
groups:
  - name: kcar
    source: nntp://news.public-inbox.org/inbox.comp.lang.ruby.kcar
    destination: imaps://username@yourserver.example.com/INBOX.kcar
  ...

That way, I would have no information about who reads the list
(especially if you use something like Tor to anonymize yourself)

Another option might be Atom feeds; but Message-ID headers
tend to get lost when people want to reply...

For a sysadmin, the beauty of NNTP is there's no per-client
state stored on the server itself.  It's all in the client.
Same for Atom feeds.

I might also work on a POP3 server; but that also means
my server still needs to track (anonymous) accounts to
avoid delivering duplicate messages; so it's about the
same storage overhead as SMTP delivery.  The nice thing
about POP3 (AFAIK) is all the major webmail providers
provide a POP3 import support.  I don't know of any which
provide NNTP import support.

And of course, 3rd parties may also run the POP3 server
as a service to gateway any NNTP server.

> I really hope I would have time to work on making plaintext
> world more accessible and convenient to use. Unfortunately
> the rich world is moving too fast and it's hard to catch up
> with merely some free time... So I would try to follow up,
> but probably can't spend too much time writing it unless
> fortunately it's aligning to my day-to-day works.

No worries.

--------8<---------
Subject: [PATCH] README: add info about mailing list subscription

But of course, add a disclaimers :>
---
 README | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/README b/README
index c735a76..b1a577d 100644
--- a/README
+++ b/README
@@ -86,6 +86,14 @@ All feedback (bug reports, user/development discussion, patches, pull
 requests) go to the public mailing list: mailto:kcar-public@bogomips.org
 All mail is archived publically at: https://bogomips.org/kcar-public/
 and nntp://news.public-inbox.org/inbox.comp.lang.ruby.kcar
-Anonymous requests will always be welcome.
-No subscription is necessary to post to the mailing list.
+
+Anonymous posts will always be welcome.
+
+No subscription is necessary to post to the mailing list;
+but you may subscribe by sending a plain-text mail to:
+
+	mailto:kcar-public+subscribe@bogomips.org
+
+Keep in mind we suck at delivering email, so using NNTP or
+Atom feeds might be a better bet.
 Please remember to Cc: all recipients as subscription is optional.
-- 
EW

^ permalink raw reply related	[relevance 14%]

Results 1-7 of 7 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2017-04-10 10:37     subscribe Lin Jen-Shin (godfat)
2017-04-10 14:54     ` subscribe Eric Wong
2017-04-10 15:13       ` subscribe Lin Jen-Shin (godfat)
2017-04-10 17:36 14%     ` [PATCH] README: add info about mailing list subscription Eric Wong
2017-04-10 19:00  7%       ` Lin Jen-Shin (godfat)
2017-04-10 20:39  7%         ` Eric Wong
2017-04-11  7:01  7%           ` Lin Jen-Shin (godfat)
2017-04-11  7:29  6%             ` Eric Wong
2017-04-11 17:33  7%               ` Lin Jen-Shin (godfat)
2020-02-21  2:32  8% [ANN] kcar 0.7.0 - bytestream to Rack response converter Eric Wong

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/kcar.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).