From owner-freebsd-questions@freebsd.org Sat Dec 3 16:20:24 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8D9BC65828 for ; Sat, 3 Dec 2016 16:20:24 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "wonkity.com", Issuer "wonkity.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id BA2D0193A for ; Sat, 3 Dec 2016 16:20:24 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.15.2/8.15.2) with ESMTPS id uB3GKNd0037458 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 3 Dec 2016 09:20:23 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.15.2/8.15.2/Submit) with ESMTP id uB3GKMSQ037455; Sat, 3 Dec 2016 09:20:23 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Sat, 3 Dec 2016 09:20:22 -0700 (MST) From: Warren Block To: Gian Piero Carrubba cc: freebsd-questions@freebsd.org Subject: Re: Calculating size of a corresponding ISO9660+UDF image? In-Reply-To: <20161130131842.bogzzbxpuclpj64p@butterfly.fdc.rm-rf.it> Message-ID: References: <25788.1480501137@segfault.tristatelogic.com> <20161130131842.bogzzbxpuclpj64p@butterfly.fdc.rm-rf.it> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.1 (wonkity.com [127.0.0.1]); Sat, 03 Dec 2016 09:20:23 -0700 (MST) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2016 16:20:25 -0000 On Wed, 30 Nov 2016, Gian Piero Carrubba wrote: > * [Wed, Nov 30, 2016 at 02:18:57AM -0800] Ronald F. Guilmette: >> 1) How to perform "bin packing" to get as many files onto each blank BD-R >> disk as possible without exceeding the 25GB limit. (This "bin packing" is >> said to be an NP-hard problem, but I'll muddle through this part somehow, >> even if I end up having my program just try all possible packings. I wasn't >> in a hurry anyway. :-) > > As you've mentioned Perl, I recall this problem being discussed in Higher > Order Perl[0]. There are at least two Perl modules that do the "knapsack" algorithm. I looked at them for this type of problem, and settled on using Algorithm::BinPack, available in ports as devel/p5-Algorithm-BinPack.