raindrops RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: KJ Tsanaktsidis <ktsanaktsidis@zendesk.com>
Cc: raindrops-public@yhbt.net
Subject: Re: [PATCH v2] Allow Raindrops objects to be backed by a file
Date: Tue, 30 Nov 2021 06:49:40 +0000	[thread overview]
Message-ID: <20211130064940.GA8716@dcvr> (raw)
In-Reply-To: <CAJ7wOOuK8bGeEgcr+-68ePWQ1r3fTxhBiJkYQfawQh7Q0iJecA@mail.gmail.com>

KJ Tsanaktsidis <ktsanaktsidis@zendesk.com> wrote:
> On Sat, Nov 27, 2021 at 5:34 AM Eric Wong <e@80x24.org> wrote:
> > s/theat/that/ (I can squash this in on my end)
> 
> Uh, sorry about that. I could have sworn I did a pass looking for
> typos. Apparently I missed a few.

No worries, I slip plenty of typos into stuff I've pushed out :x

> > > static VALUE init_copy(VALUE dest, VALUE source)
> >
> > Switching from file-backed to anonymous seems strange to me,
> > here, but I'm not sure of a better solution that's compatible
> > with Object#dup ... I also don't know if anybody uses
> > Raindrops#dup, either. So if you're satisfied with this
> > behavior, that's good enough for me :>
> 
> I did wonder what I should do here. Could _also_ dup the file descriptor,
> but then the raindrops will still share memory, which seems like the
> opposite of what #dup should do. If someone wants to do something
> different I guess the copy-constructor-ish initialize method could be
> exposed for this purpose.

Agreed.  We'll just leave things as-is for now; the API doesn't
have many direct users.

> Nope, this was it. Memfd is exactly equivalent to just using an
> unlinked tempfile on tmpfs so doing it this way will suit our needs
> nicely. If anybody else desperately wants to use memfd here I don't
> think there's much more to it than
> 
>   IO.new syscall(319, "file_name", 0)

I seem to recall there was some talk in the past about deprecating
the "syscall" method from Ruby.  But Fiddle should work, too.

> Anyway, thanks again for your help with this, and thanks also for
> bearing with my very rusty git email workflow :)

No problem, pushed to https://yhbt.net/raindrops.git as commit
18ee38af90b527f6 (Allow Raindrops objects to be backed by a file, 2021-11-25)

Hopefully some work I've done elsewhere can get more folks using
centralization-resistant workflows and tools.

Anyways, I'll tag a release sometime in the next few days.

      reply	other threads:[~2021-11-30  6:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-25  6:56 [PATCH v2] Allow Raindrops objects to be backed by a file KJ Tsanaktsidis
2021-11-26 18:34 ` Eric Wong
2021-11-29  0:13   ` KJ Tsanaktsidis
2021-11-30  6:49     ` Eric Wong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/raindrops/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211130064940.GA8716@dcvr \
    --to=e@80x24.org \
    --cc=ktsanaktsidis@zendesk.com \
    --cc=raindrops-public@yhbt.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhbt.net/raindrops.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).