Re: 07/07: services: console-keymap: Deprecate.

2019-04-05 Thread Mark H Weaver
Hi Ludovic,

guix-comm...@gnu.org writes:

> civodul pushed a commit to branch master
> in repository guix.
>
> commit 3a665637afc32a142dc24a77ce7ce9235eb6a3af
> Author: Ludovic Courtès 
> Date:   Wed Apr 3 14:32:41 2019 +0200
>
> services: console-keymap: Deprecate.
> 
> * gnu/services/base.scm (console-keymap-service): Mark as deprecated.
> * doc/guix.texi (Base Services): Remove its documentation.

Why is this being deprecated?  Is there an alternative service to
replace it?

I use this service to change my console keymap, changing Caps Lock to
Control, and adding several more mappings for Meta-key combinations to
make Emacs more pleasurable to use from a text console.

   Mark



[PATCH] guile-build-system: Support building in parallel.

2019-04-05 Thread Christopher Baines
* guix/build/guile-build-system.scm (build): Use invoke-each, instead of
for-each, to use multiple cores if available.
(invoke-each, report-build-process): New procedures.
---
 guix/build/guile-build-system.scm | 96 +--
 1 file changed, 78 insertions(+), 18 deletions(-)

diff --git a/guix/build/guile-build-system.scm 
b/guix/build/guile-build-system.scm
index 0bed049436..5ad728361a 100644
--- a/guix/build/guile-build-system.scm
+++ b/guix/build/guile-build-system.scm
@@ -23,6 +23,7 @@
   #:use-module (ice-9 match)
   #:use-module (ice-9 popen)
   #:use-module (ice-9 rdelim)
+  #:use-module (ice-9 threads)
   #:use-module (guix build utils)
   #:export (target-guile-effective-version
 %standard-phases
@@ -65,6 +66,59 @@ Return #false if it cannot be determined."
  (setenv "GUIX_LOCPATH" (string-append locales "/lib/locale"))
  #t)))
 
+(define* (invoke-each commands
+  #:key (max-processes (current-processor-count))
+  report-progress)
+  "Run each command in COMMANDS in a separate process, using up to
+MAX-PROCESSES processes in parallel.  Call REPORT-PROGRESS at each step.
+Raise an error if one of the processes exit with non-zero."
+  (define total
+(length commands))
+
+  (define (wait-for-one-process)
+(match (waitpid WAIT_ANY)
+  ((_ . status)
+   (unless (zero? (status:exit-val status))
+ (error "process failed" status)
+
+  (define (fork-and-run-command command)
+(match (primitive-fork)
+  (0
+   (apply execlp command))
+  (pid
+   #t)))
+
+  (let loop ((commands  commands)
+ (running   0)
+ (completed 0))
+(match commands
+  (()
+   (or (zero? running)
+   (let ((running   (- running 1))
+ (completed (+ completed 1)))
+ (wait-for-one-process)
+ (report-progress total completed)
+ (loop commands running completed
+  ((command . rest)
+   (if (< running max-processes)
+   (let ((running (+ 1 running)))
+ (fork-and-run-command command)
+ (report-progress total completed)
+ (loop rest running completed))
+   (let ((running   (- running 1))
+ (completed (+ completed 1)))
+ (wait-for-one-process)
+ (report-progress total completed)
+ (loop commands running completed)))
+
+(define* (report-build-progress total completed
+#:optional (log-port (current-error-port)))
+  "Report that COMPLETED out of TOTAL files have been completed."
+  (display #\cr log-port)
+  (format log-port "compiling...\t~5,1f% of ~d files" ;FIXME: i18n
+  (* 100. (/ completed total)) total)
+  (force-output log-port))
+
 (define* (build #:key outputs inputs native-inputs
 (source-directory ".")
 (compile-flags '())
@@ -101,24 +155,30 @@ Return #false if it cannot be determined."
(match (getenv "GUILE_LOAD_COMPILED_PATH")
  (#f "")
  (path (string-append ":" path)
-(for-each (lambda (file)
-(let* ((go (string-append go-dir
-  (file-sans-extension file)
-  ".go")))
-  ;; Install source module.
-  (install-file (string-append source-directory "/" file)
-(string-append module-dir
-   "/" (dirname file)))
-
-  ;; Install and compile module.
-  (apply invoke guild "compile" "-L" source-directory
- "-o" go
- (string-append source-directory "/" file)
- flags)))
-
-  ;; Arrange to strip SOURCE-DIRECTORY from file names.
-  (with-directory-excursion source-directory
-(find-files "." scheme-file-regexp)))
+
+  (let ((source-files
+   (with-directory-excursion source-directory
+ (find-files "." scheme-file-regexp
+(invoke-each
+ (map (lambda (file)
+(cons* guild
+   "guild" "compile"
+   "-L" source-directory
+   "-o" (string-append go-dir
+   (file-sans-extension file)
+   ".go")
+   (string-append source-directory "/" file)
+   flags))
+  source-files)
+ #:max-processes (parallel-job-count)
+ #:report-progress report-build-progress)
+
+(for-each
+ (lambda (file)
+ (install-file (string-append source-directory "/" file)
+   (string-append module-dir
+  "/" (dirname file
+ source-files))
 #t))
 
 (define* 

Re: Video narration

2019-04-05 Thread Ricardo Wurmus


Laura Lazzati  writes:

>> Was there a reason for the difference?
> My honest answer is: i don't know.

This is probably my mistake.  I didn’t pay much attention to frame rates
when I first built the scripts for generating the CLI videos.

-- 
Ricardo




Re: Video narration

2019-04-05 Thread Laura Lazzati
Hi Paul!

> I have pushed all of the new audio recordings to guix/videos.git.
Yeah :) I saw them, that is why I didn't answer back, was planning to
see the matching of the other these days :)
> There were two extra svg images needed (for 02-daily-use2 and 04-
> packaging1) to match up with the audio.  I have added templates for
> them.
I haven't created them yet, but will. For the audios? That is weird,
they take the duration of the audio for their duration :/

> Was there a reason for the difference?
My honest answer is: i don't know. If you like the project, I am not
an intern anymore. I will go on contributing, but you are really more
than welcome if you have video and audio knowledge that you can share
:). I would love to see the videos uploaded <3

Regards :)
Laura



Re: Video narration

2019-04-05 Thread Paul Garlick
Hi All,

> Yes! I am working on them to have the best match we can :)
Nice, thanks Laura!

I have pushed all of the new audio recordings to guix/videos.git.

There were two extra svg images needed (for 02-daily-use2 and 04-
packaging1) to match up with the audio.  I have added templates for
them.

One question that cropped up was about the frame rate of the videos.  I
checked the cli and nocli videos and noticed that the nocli videos have
a frame rate of 30 frames per second (fps) and the cli videos have a
frame rate of 20 fps.  

Was there a reason for the difference?  

It may make it easier for the players to have a constant frame rate
throughout.  I gather that 25 fps is a common standard.

Best regards,

Paul.




Re: Guix gets a distribution called PantherX

2019-04-05 Thread Jonathan Brielmaier

They released some slides about their "Panther for Business":
https://www.pantherx.org/panther-for-business/

It's mostly about the features of PantherX and the billing concept etc.
But at the end of the page their are some slides about using IPFS in the
PantherX "ecosystem".

They also have a quite ambitious vision to have a 100% decentralized
system by 2022, which doesn't require any central server.

On 2/11/19 6:58 PM, Jonathan Brielmaier wrote:

Hi Guix folks,

following a link from bug#34435 I found a pretty interesting website:
https://www.pantherx.org

They creating a "modern, Unix-like computer operating system" based on
GNU Guix[0] with focus on ease of use and privacy.

I never heard about it before, but to me it looks quite promising.
According to their timeline a public beta will be released in August
2019. Before there seem to be some (closed) alpha and beta versions.

Their team consists of 9 Members[1], which is pretty impressive.

They also develop an ARM based Mini-Computer called "Panther Alpha"[2].

Though I couldn't find any of the team members in some Guix commits or
patches...

Kind Regards
Jonathan Brielmaier

[0] https://wiki.pantherx.org/PantherX-compared-to-other-distributions/
[1] https://www.pantherx.org/about/
[2] http://www.panther-mpc.com/panther-alpha/