From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52011) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ehdEG-000431-0F for guix-patches@gnu.org; Fri, 02 Feb 2018 10:27:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ehdDB-0003Rw-Td for guix-patches@gnu.org; Fri, 02 Feb 2018 10:26:15 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:46268) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ehdDB-0003JP-Bo for guix-patches@gnu.org; Fri, 02 Feb 2018 10:25:09 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ehb9K-0002mC-CE for guix-patches@gnu.org; Fri, 02 Feb 2018 08:13:02 -0500 Subject: bug#30266: Add FANN Resent-To: guix-patches@gnu.org Resent-Message-ID: References: <1517057739.331219.1250048536.75FA3BFA@webmail.messagingengine.com> <1517499171.1017760.1256044528.7C0C62C3@webmail.messagingengine.com> From: Ben Woodcroft Message-ID: Date: Fri, 2 Feb 2018 23:12:07 +1000 MIME-Version: 1.0 In-Reply-To: <1517499171.1017760.1256044528.7C0C62C3@webmail.messagingengine.com> Content-Type: multipart/alternative; boundary="------------3C80730A335A6E802021B6EA" Content-Language: en-US List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Mark Meyer , 30266-done@debbugs.gnu.org This is a multi-part message in MIME format. --------------3C80730A335A6E802021B6EA Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Thanks Mark. I made a few small changes and pushed the patch as a9b34762391e6f3b066aef6fc1ebc614ec88db86. On 02/02/18 01:32, Mark Meyer wrote: > Thanks for the good feedback. Please consider the attached patch. > > Best, Mark > > On Sun, Jan 28, 2018, at 03:13, Ben Woodcroft wrote: >> >> Hi Mark, >> >> Thanks for the patch. >> >>> +(define-module (gnu packages ai) >>> + #:use-module ((guix licenses) #:prefix license:) >>> + #:use-module (guix utils) >>> + #:use-module (guix download) >>> + #:use-module (guix packages) >>> + #:use-module (guix build-system cmake) >>> + #:use-module (guix git-download) >>> + #:use-module (gnu packages)) >> I think machine-learning.scm would be a good home for this package, >> so a new file wouldn't be needed. >> >> >> >>> + >>> +(define-public libfann >>> + (package >>> + (name "libfann") >>> + (version "d71d54788b") >> >> >> The last release is 129 commits behind and it has been some time, so >> I think you are right - we should package from a git commit. >> >> Usually we package from git using this style though (i.e. reason for >> not using the release, use of 'file-name', and a version that >> includes the last release followed by '-1.'). >> >>   ;; There are no recent releases so we package from git. >>   (let ((commit "da121155a977197cab9fbb15953ca1b40b11eb87")) >>     (package >>       (name "newick-utils") >>       (version (string-append "1.6-1." (string-take commit 8))) >>       (source (origin >>                 (method git-fetch) >>                 (uri (git-reference >>                       (url >> "https://github.com/tjunier/newick_utils.git" >> ) >>                       (commit commit))) >>                 (file-name (string-append name "-" version "-checkout")) >>                 (sha256 >>                  (base32 >> "1hkw21rq1mwf7xp0rmbb2gqc0i6p11108m69i7mr7xcjl268pxnb")))) >> >> >>> + (source (origin >>> + (method git-fetch) >>> + (uri (git-reference >>> + (url"https://github.com/libfann/fann.git" >>> ) >>> + (commit version))) >>> + (sha256 >>> + (base32 >>> + "0ibwpfrjs6q2lijs8slxjgzb2llcl6rk3v2ski4r6215g5jjhg3x")))) >>> + (build-system cmake-build-system) >>> + (arguments >>> + `(#:tests? #f)) >> I see from the website: >> >> >> >>> Once you have installed the library you can test it out by going to >>> the examples directory and type |make runtest|, which will compile >>> the examples and run a few of them to test that everything is working. >> Is that possible? Ideally, since there are tests it would be good to >> run them. >> >> >>> + (home-page"http://leenissen.dk/fann/wp/" ) >>> + (synopsis "Fast Artificial Neural Network") >>> + (description >>> + "FANN is a free open source neural network library, which implements >>> +multilayer artificial neural networks in C with support for both fully >>> +connected and sparsely connected networks.") >>> + (license license:lgpl2.1))) >> Otherwise LGTM. Can you send an updated patch please? >> >> >> Thanks, ben >> > > -- > Mark Meyer > mark@ofosos.org > --------------3C80730A335A6E802021B6EA Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

Thanks Mark. I made a few small changes and pushed the patch as a9b34762391e6f3b066aef6fc1ebc614ec88db86.


On 02/02/18 01:32, Mark Meyer wrote:
Thanks for the good feedback. Please consider the attached patch.

Best, Mark

On Sun, Jan 28, 2018, at 03:13, Ben Woodcroft wrote:

Hi Mark,

Thanks for the patch.

+(define-module (gnu packages ai)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix utils)
+  #:use-module (guix download)
+  #:use-module (guix packages)
+  #:use-module (guix build-system cmake)
+  #:use-module (guix git-download)
+  #:use-module (gnu packages))
I think machine-learning.scm would be a good home for this package, so a new file wouldn't be needed.



+
+(define-public libfann
+  (package
+    (name "libfann")
+    (version "d71d54788b")


The last release is 129 commits behind and it has been some time, so I think you are right - we should package from a git commit.

Usually we package from git using this style though (i.e. reason for not using the release, use of 'file-name', and a version that includes the last release followed by '-1.<commit>').

  ;; There are no recent releases so we package from git.
  (let ((commit "da121155a977197cab9fbb15953ca1b40b11eb87"))
    (package
      (name "newick-utils")
      (version (string-append "1.6-1." (string-take commit 8)))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://github.com/tjunier/newick_utils.git")
                      (commit commit)))
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
                  "1hkw21rq1mwf7xp0rmbb2gqc0i6p11108m69i7mr7xcjl268pxnb"))))


+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/libfann/fann.git")
+                    (commit version)))
+              (sha256
+               (base32
+                "0ibwpfrjs6q2lijs8slxjgzb2llcl6rk3v2ski4r6215g5jjhg3x"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f))
I see from the website:



Once you have installed the library you can test it out by going to the examples directory and type make runtest, which will compile the examples and run a few of them to test that everything is working.
Is that possible? Ideally, since there are tests it would be good to run them.


+    (home-page "http://leenissen.dk/fann/wp/")
+    (synopsis "Fast Artificial Neural Network")
+    (description
+     "FANN is a free open source neural network library, which implements
+multilayer artificial neural networks in C with support for both fully
+connected and sparsely connected networks.")
+    (license license:lgpl2.1)))
Otherwise LGTM. Can you send an updated patch please?


Thanks, ben


--
Mark Meyer


--------------3C80730A335A6E802021B6EA--