Hi!
On 27 Dec 2017 00:17:54 +0000
"theodorepringle1_at_gmail.com [fc-solve-discuss]"
<fc-solve-discuss_at_yahoogroups.com> wrote:
>
>
> ---In fc-solve-discuss_at_yahoogroups.com, <shlomif_at_...> wrote :
>
> > Hi Theodore (Pringle) and all!
>
> > Happy holidays.
>
> > I noticed when dealing with Imp3.txt in this repo -
> > https://bitbucket.org/shlomif/freecell-pro-3fc-deals
> > https://bitbucket.org/shlomif/freecell-pro-3fc-deals - that adding a
> > single deal index to the middle of the file, and committing resulted in
> > git consuming 90% of my RAM and taking a very long time and later pushing
> > many 10s of megabytes of changes. I hate to be a slave of our tools but
> > since I doubt we can find a VCS that can handle this better, I decided to
> > split Imp3.txt into ranges here:
>
> > https://github.com/shlomif/freecell-pro-3fc-deals--split
> > https://github.com/shlomif/freecell-pro-3fc-deals--split
>
>
> I also had this problem. The only thing that worked for me was to delete the
> file and then add the updated version.
I see.
> > Here is the script I used which is kinda slow but gets the job done. I'd
> > also like to write a test suite for the integrity of the data. Is that
> > acceptable to you?
>
>
> Yes.
>
ok, thanks for the update.
>
> > Regards,
>
> > Shlomi Fish
>
> > #!/usr/bin/perl
>
> > use strict;
> > use warnings;
>
> > use Path::Tiny qw/ path /;
>
> > open my $in, '<', 'freecell-pro-3fc-deals/Imp3.txt';
> > my $old_fn;
> > my $fh;
> > while (my $l = <$in>)
> > {
> > my $z = sprintf("%010d", int $l);
> > my $fn = "freecell-pro-3fc-deals--split/Imp3/" . substr($z, 0, 3) .
> > "XXXXXXX.txt"; if ($fn ne $old_fn)
> > {
> > $old_fn = $fn;
> > $fh = path($fn);
> > }
> > $fh->append($l);
> > }
>
>
> --
> -----------------------------------------------------------------
> Shlomi Fish http://www.shlomifish.org/ http://www.shlomifish.org/
> Chuck Norris/etc. Facts - http://www.shlomifish.org/humour/bits/facts/
> http://www.shlomifish.org/humour/bits/facts/
> JATFM == “Just answer the fabulous man”
>
> Please reply to list if it's a mailing list post - http://shlom.in/reply
> http://shlom.in/reply .
>
--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
Perl Elems to Avoid - http://perl-begin.org/tutorials/bad-elements/
Chuck’s idea of a short walk is to the Andromeda Galaxy and back.
— http://www.shlomifish.org/humour/bits/facts/Chuck-Norris/
Please reply to list if it's a mailing list post - http://shlom.in/reply .
Received on Wed Dec 27 2017 - 09:01:53 IST