Re: Multiple python-3 packages

2017-01-27 Thread Benz Schenk
On Fri, 27 Jan 2017 05:12:25 -0500
Leo Famulari  wrote:

> Currently we have Python 3.4 and 3.5. Python 3.6 was released recently.
> 
> When we added 3.5, I thought it was a good idea to keep 3.4 around in
> case some packages need it. It turns out that nothing is using it in our
> tree.
> 
> Do we want to keep 3.4 and 3.5 around? There is a maintenance cost
> incurred at each new release, because their shared patches tend to
> diverge each time.

As far as my grep-fu tells me, there's no packages that rely on a
specific Python 3 release in their definition as of now, so I'd be in
favour of dropping the old versions. 

If packages start to fail because of compatibility issues, I'd say
that's
a) an upstream issue, which admittedly has to be worked around until
they hopefuly fix it, but still 
b) until the definitions of the affected packages are patched it would
happen anyway

worst case scenario, the old versions have to be are added again and
people just rollback and keep using whatever they have installed atm
until the needed version is available again and the package definitions
are fixed

> 
> If we should keep them, how should the package inheritance go? Now, it's
> like this:
> 
> 2.7 < 3.5 < 3.4
> 
> If we kept them all, should 3.5 and 3.4 both inherit 3.6?

That would make sense



Re: FOSDEM social dinner

2017-01-26 Thread Benz Schenk
Hi

I'm somewhat late to the party as I wasn't sure whether I could make it
to FOSDEM this year, but aparently I will.

If it's still ok, I'd love to join ^^

Best regards

Benz

On Fri, 20 Jan 2017 14:27:11 +0100
Alex Sassmannshausen  wrote:

> Hello,
> 
> To confirm, I've now placed a reservation for Saturday 4 February at
> 19:30 at a Lebanese restaurant called Al Jannah.  I haven't been there
> before, but the menu looks diverse, the prices good and the location
> relatively central.
> 
> https://www.tripadvisor.com/Restaurant_Review-g188644-d2039550-Reviews-Al_Jannah-Brussels.html
> 
> Address:
> Rue Blaes 59, Brussels 1000, Belgium
> 
> There is a direct tram line from ULB to Louise, and then it's a 5-10 min
> walk.  From there it's probably around 15 min walk to the central
> station where there are trains to Antwerp.
> 
> List of attendees:
> Leo, Catonano, Amirouche, Efraim, Tomáš, Thomas, Tobias, Christopher
> Baines, Manolis, Ludo, Ricardo, Matias and myself.
> 
> Let me know if I missed you, or if you have questions!
> 
> For now, until then :-)
> 
> Alex
> 
> 
> Alex Sassmannshausen writes:
> 
> > Hello,
> >
> > Guile has a dev room at FOSDEM this year — for a whole day!  The dev
> > room will be on Sunday.
> >
> > Whilst organising it, we had the idea that it would be fun to have a
> > Guile/Guix user & dev dinner on the Saturday evening.  I'm hereby
> > officially opening registration for that :-D
> >
> > I have not chosen a restaurant yet, but it will be something that
> > provides a varietary of dietary options (omnivore, veggie, vegan).  If
> > you are interested in coming along, just drop me a line to confirm.
> >
> > So — who's in for Guile social dinner on Saturday 4 February 2017 in
> > Brussels?
> >
> > Best wishes,
> >
> > Alex  
> 
> 



[PATCH shepherd] Fix typo in Documentation

2017-01-13 Thread Benz Schenk
Hi

While starting to read the shepherd documentation, I stumbled upon a
typo(?: non-native speaker)

cheers

Benz>From b535f4b4fdb5c004dcff4ae91ac25f9e931df326 Mon Sep 17 00:00:00 2001
From: Benz Schenk <benz.sch...@uzh.ch>
Date: Fri, 13 Jan 2017 14:07:24 +0100
Subject: [PATCH] Fix typo in Documentation

* doc/shepherd.texi: Fix typo

---
 doc/shepherd.texi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/shepherd.texi b/doc/shepherd.texi
index 70c13b8..e90c3b2 100644
--- a/doc/shepherd.texi
+++ b/doc/shepherd.texi
@@ -141,7 +141,7 @@ mentioned below.
 
 @cindex Configuration file
 When @command{shepherd} gets started, it reads and evaluates a
-configuration file.  When it is started with superuser priviledges, it
+configuration file.  When it is started with superuser privileges, it
 tries to use @code{/etc/shepherd.scm}.  When started as normal user, it
 looks for a file called @code{$XDG_CONFIG_HOME/shepherd/init.scm}.  If
 the @code{XDG_CONFIG_HOME} environment variable is not defined,
-- 
2.11.0



Re: Display diffs between generations.

2016-10-26 Thread Benz Schenk
On Tue, 25 Oct 2016 18:01:23 +0200
Roel Janssen <r...@gnu.org> wrote:

> Ludovic Courtès writes:
> 
> > Hi!
> >
> > Benz Schenk <benz.sch...@uzh.ch> skribis:
> >  
> >> On Fri, 21 Oct 2016 11:37:00 +0200
> >> Roel Janssen <r...@gnu.org> wrote:  
> >
> > [...]
> >  
>  [...]  
> >>
> >> I adapted your patch to hopefully implement the desired behaviour, but
> >> it might need some cleaning up as I'm just getting started learning
> >> scheme.  
> >  
> >>From what I can see that Benz’ patch does indeed work as expected (but  
> > really, the example above is a corner case that we shouldn’t worry too
> > much about.)
> >
> > Roel, if that’s fine with you, please commit with proper commit log and
> > acknowledgment.
> >
> > Thanks to both of you.  :-)  
> 
> Thanks a lot Benz!
> 
> There's only one thing:
> Would it make more sense to stick to the chronology of the generations
> (sorting them before displaying them)?

IMO it's useful to see the diffs in reverse when before switching
to some previous generation, although you can easily see the changes
no matter how you order the generations, so I don't really have a strong
opinion either way.

>
> 
> If you think Benz's patch is good, then I will push that one.  Otherwise
> I'll adapt it to sort the generations.
> 
> @Benz, what's the copyright line you want to have in the patch?

I guess
Copyright © 2016 Benz Schenk <benz.sch...@uzh.ch>

> 
> Kind regards,
> Roel Janssen

Kind regards,
Benz Schenk

PS:

@Roel Janssen, sorry for double-posting I forgot to cc guix-devel

@everyone
on the bright side, I updated the patch to use display-generation
instead of the copy+pasted mess I created in the last patch and added
my copyright lines.

I also realized that with this patch, list-generations with
generations that do not differ, will simply display the generation number 
and date like

>Generation 54  Oct 19 2016 13:42:16
>[... ]
>Generation 56  Oct 21 2016 15:12:24
>Generation 57  Oct 23 2016 18:15:03
>[... ]

I'm not sure if that might be confusing.
From 880d95a3779341cb2305a638fbad9364455a02eb Mon Sep 17 00:00:00 2001
From: Benz Schenk <benz.sch...@uzh.ch>
Date: Wed, 26 Oct 2016 12:31:03 +0200
Subject: [PATCH] guix package: Display generation diffs.

* guix/ui.scm (display-profile-content-diff): New variable.
* guix/scripts/package.scm (process-query): Use display-profile-content-diff.

---
 guix/scripts/package.scm | 17 +
 guix/ui.scm  | 27 +++
 2 files changed, 40 insertions(+), 4 deletions(-)

diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index b87aee0..e85f3fb 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2013 Nikita Karetnikov <nik...@karetnikov.org>
 ;;; Copyright © 2013, 2015 Mark H Weaver <m...@netris.org>
 ;;; Copyright © 2014, 2016 Alex Kost <alez...@gmail.com>
+;;; Copyright © 2016 Benz Schenk <benz.sch...@uzh.ch>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -667,24 +668,32 @@ processed, #f otherwise."
  ((head tail ...) head
 (match (assoc-ref opts 'query)
   (('list-generations pattern)
-   (define (list-generation number)
+   (define (list-generation display-function number)
  (unless (zero? number)
(display-generation profile number)
-   (display-profile-content profile number)
+   (display-function profile number)
(newline)))
+   (define (diff-profiles profile numbers)
+ (unless (null-list? (cdr numbers))
+   (display-profile-content-diff profile (car numbers) (cadr numbers)))
+ (unless (null-list? (cdr numbers))
+   (diff-profiles profile (cdr numbers
 
(cond ((not (file-exists? profile))  ; XXX: race condition
   (raise (condition (
  (profile profile)
  ((string-null? pattern)
-  (for-each list-generation (profile-generations profile)))
+  (list-generation display-profile-content
+   (car (profile-generations profile)))
+  (diff-profiles profile (profile-generations profile)))
  ((matching-generations pattern profile)
   =>
   (lambda (numbers)
 (if (null-list? numbers)
 (exit 1)
 (leave-on-EPIPE
- (for-each list-generation numbers)
+ (list-generation display-profile-content (car numbers))
+ (diff-profiles profile numbers)
  (else
   (leave (_ "invalid syntax: ~a~%")

Re: Display diffs between generations.

2016-10-21 Thread Benz Schenk
On Fri, 21 Oct 2016 11:37:00 +0200
Roel Janssen <r...@gnu.org> wrote:

> Ludovic Courtès writes:
> 
> > Roel Janssen <r...@gnu.org> skribis:
> >  
> >> Ludovic Courtès writes:  
> >
> > [...]
> >  
>  [...]  
> >>
> >> Ah, sorry, I forgot about this.  This makes sense.  But then, what should 
> >> we
> >> see when we do:
> >>
> >>   guix package --list-generations=42,46
> >>
> >> Should we see:
> >>   Generation 42 ...:
> >>   
> >>
> >>   Generation 46 ...:
> >> 
> >
> > This one, IMO.  
> 
> The attached patch implements this behavior.  However, because I use
> @code{previous-generation-number} to determine which generation to diff
> with, the following will not provide a diff as expected:
> 
>   guix package --list-generations=42,41,40
> 
> Any ideas on how to fix this?  Otherwise I'll give it another go over
> the weekend.
> 
> Kind regards,
> Roel Janssen

I adapted your patch to hopefully implement the desired behaviour, but
it might need some cleaning up as I'm just getting started learning
scheme.

HANWE

Benz
>From f920c91e0572539790952d9c28aec547d7bc Mon Sep 17 00:00:00 2001
From: Benz Schenk <benz.sch...@uzh.ch>
Date: Fri, 21 Oct 2016 16:20:30 +0200
Subject: [PATCH] guix package: Display generation diffs.

* guix/ui.scm (display-profile-content-diff): New variable.
* guix/scripts/package.scm (process-query): Use display-profile-content-diff.

---
 guix/scripts/package.scm | 16 
 guix/ui.scm  | 30 ++
 2 files changed, 42 insertions(+), 4 deletions(-)

diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index b87aee0..8d148d7 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -667,24 +667,32 @@ processed, #f otherwise."
  ((head tail ...) head
 (match (assoc-ref opts 'query)
   (('list-generations pattern)
-   (define (list-generation number)
+   (define (list-generation display-function number)
  (unless (zero? number)
(display-generation profile number)
-   (display-profile-content profile number)
+   (display-function profile number)
(newline)))
+   (define (diff-profiles profile numbers)
+ (unless (null-list? (cdr numbers))
+   (display-profile-content-diff profile (car numbers) (cadr numbers)))
+ (unless (null-list? (cdr numbers))
+   (diff-profiles profile (cdr numbers
 
(cond ((not (file-exists? profile))  ; XXX: race condition
   (raise (condition (
  (profile profile)
  ((string-null? pattern)
-  (for-each list-generation (profile-generations profile)))
+  (list-generation display-profile-content
+   (car (profile-generations profile)))
+  (diff-profiles profile (profile-generations profile)))
  ((matching-generations pattern profile)
   =>
   (lambda (numbers)
 (if (null-list? numbers)
 (exit 1)
 (leave-on-EPIPE
- (for-each list-generation numbers)
+ (list-generation display-profile-content (car numbers))
+ (diff-profiles profile numbers)
  (else
   (leave (_ "invalid syntax: ~a~%")
  pattern)))
diff --git a/guix/ui.scm b/guix/ui.scm
index eb85df3..c93b44f 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -87,6 +87,7 @@
 matching-generations
 display-generation
 display-profile-content
+display-profile-content-diff
 roll-back*
 switch-to-generation*
 delete-generation*
@@ -1070,6 +1071,35 @@ DURATION-RELATION with the current time."
   (format #t (_ "~a\t(current)~%") header)
   (format #t "~a~%" header)
 
+(define (display-profile-content-diff profile number1 number2)
+  "Display the changed packages in PROFILE compared to generation NUMBER."
+
+  (define (equal-entry? first second)
+(string= (manifest-entry-item first) (manifest-entry-item second)))
+
+  (define (display-entry entry prefix)
+(match entry
+  (($  name version output location _)
+   (format #t " ~a ~a\t~a\t~a\t~a~%" prefix name version output location
+
+  (define (list-entries number)
+(manifest-entries (profile-manifest (generation-file-name profile number
+
+  (define (display-diff profile old new)
+(format #t (_ "Generation ~a\t~a ~%") new
+  (date->string
+   (time-utc->date
+

Re: [PATCH] Add iPerf

2016-10-18 Thread Benz Schenk
On Tue, 18 Oct 2016 22:37:40 +0100
Marius Bakke <mba...@fastmail.com> wrote:

> Benz Schenk <benz.sch...@uzh.ch> writes:
> 
> > Hi
> >
> > This is my first patch, it's really straight-forward.
> > But I'm not quite sure about the naming because there's iperf, iperf2
> > and iperf3 which are different projects. The original iperf is
> > abandoned and iperf2 is backwards compatible and still gets bug fixes
> > and iperf3, which this patch is for, is in active development and adds a
> > lot of new features but also lacks some of the options of previous
> > versions. Thus it's often referred to as iperf3, which is also the name
> > of the binary, so I'm not sure wheter the package should better be
> > called iperf3 or iperf.  
> 
> Hi Benz,
> 
> Thanks for this patch! I think naming it "iperf" is fine, even though
> the binary and manual is called iperf3. If we need iperf2 later it can
> be packaged as "iperf@2".
> 
> I'm not sure about the home page: the manual and github page both list
> http://software.es.net/iperf/ as the home. What is the relation between
> iperf.fr and this project? Should we not go with the official source?
> 
> Other than that I'd like to make the following modifications. This can
> be done before pushing, no need to send an updated patch:
> 
> * Change synopsis to "TCP, UDP and SCTP bandwidth measurement tool".
> * Update license to match what's in the LICENSE file.
> * Fix minor typos in the description (bandwith->bandwidth).
> * Change commit message to match our current convention.
> * Download the tarball from http://downloads.es.net/pub/iperf/
> 
> Are you okay with these changes (including the home page)?
> 
> Thanks again, and welcome! :)

Sure thing, I just need the software for uni and got this homepage from
my advisor.

Thank you



[PATCH] Add iPerf

2016-10-18 Thread Benz Schenk
Hi

This is my first patch, it's really straight-forward.
But I'm not quite sure about the naming because there's iperf, iperf2
and iperf3 which are different projects. The original iperf is
abandoned and iperf2 is backwards compatible and still gets bug fixes
and iperf3, which this patch is for, is in active development and adds a
lot of new features but also lacks some of the options of previous
versions. Thus it's often referred to as iperf3, which is also the name
of the binary, so I'm not sure wheter the package should better be
called iperf3 or iperf.

Thanks for your feedback

BenzFrom 30d1c08b2163d150994fd8dfb3e901b9f4668b46 Mon Sep 17 00:00:00 2001
From: Benz Schenk <benz.sch...@uzh.ch>
Date: Tue, 18 Oct 2016 17:28:23 +0200
Subject: [PATCH] add iperf

---
 gnu/packages/networking.scm | 23 +++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 4b77aad..459893c 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -10,6 +10,7 @@
 ;;; Copyright © 2016 Eric Bavier <bav...@member.fsf.org>
 ;;; Copyright © 2016 ng0 <n...@we.make.ritual.n0.is>
 ;;; Copyright © 2016 Arun Isaac <arunis...@systemreboot.net>
+;;; Copyright © 2016 Benz Schenk <benz.sch...@uzh.ch>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -927,3 +928,25 @@ HTTPS on port 443, allowing SSH connections from inside corporate firewalls
 that block port 22.")
 (license (list license:bsd-2; tls.[ch]
license:gpl2+; everything else
+
+(define-public iperf
+  (package
+(name "iperf")
+(version "3.1.3")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "https://github.com/esnet/; name
+  "/archive/" version ".tar.gz"))
+  (file-name (string-append name "-" version ".tar.gz"))
+  (sha256
+(base32
+  "0lzmwqs5cqbr23gkvr835dnmghk2ws0rnfic5lra22n8zw6gck73"
+(build-system gnu-build-system)
+(synopsis "Actively measure the maximum bandwith on IP networks")
+(description
+ "iPerf is a tool to measure achievable bandwith on IP networks.  It
+supports tuning of verious parameters related to timing, buffers and
+protocols (TCP, UDP, SCTP with IPv4 and IPv6).  For each test it reports
+the bandwith, loss, and other parameters.")
+(home-page "http://iperf.fr;)
+(license license:expat)))
-- 
2.10.1