From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 8IRfHPCKBGZQMAAAqHPOHw:P1 (envelope-from ) for ; Wed, 27 Mar 2024 22:09:04 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id 8IRfHPCKBGZQMAAAqHPOHw (envelope-from ) for ; Wed, 27 Mar 2024 22:09:04 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=aj7V0I2c; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1711573744; a=rsa-sha256; cv=none; b=GqrYuNmZog0z7ivoz3aybNP/OyEqI2OlbynsZZNtjTB7sxkBCbksCilBoM2pY5z13MmKQ+ jXZe0INmAbHs59HOhLb5JtSQEGawvZpcYPjXypQZaj0FjDjVhLxUnn6ujOC1ZA5RVKYrd1 wQaqlHHhY5EV+wdpjAG0jaxgOpI17FJdmtt0stdrs1UEi7ojsIsRvWfd0x35Gerx3592am HRQXkd1/h742fC/Qa0bAFhAM2/CXyURF6UpU3yVdiGv8gQ5qGmOt2/0tjwAslNDZkWJEu4 dMQvNe19Bq/byR5+eyEfT1G0I1x/H2OZcI728M4plWcgkg3bLN1bGYNnQxlKDg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=aj7V0I2c; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1711573744; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=uw2OilB6AIFvFHcuYV4Xn9Ez+4kR5gqWt2ZUVHGf01s=; b=maUpPvwi9iFVuC0DlkYNOcLdsc1otMVIGsxi5kbjaWtYPkD00N/reo4TwSEB2igQ7VgJQN P0p1gNud+iiTeO689EsVDgCbOif9tmy12Jes6AoO8iQblye6tcsnkWVg1b3Xq9t8O+uqh3 Y5NSOFcPrFqUlftNMkSHWryy0BunhKglNmeg/FY77za4iCBTiRtdEWmYgrwF7g2o4DXUcl jxLZwrw/aJTx4Duk20GcpUZrQv36AMpEBRMGgUnvNWTU38Nk9GBGfO4Cwc3+nkV8OC1osr tn+LLGnsturZzmkaobpkapAFj0b1v4DmEH3c5F1qCpbOZ6w3aTooBwZZOFJe0Q== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C0AD437195 for ; Wed, 27 Mar 2024 22:09:03 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpaVo-00070O-E0; Wed, 27 Mar 2024 17:08:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rpaVh-000705-19 for help-guix@gnu.org; Wed, 27 Mar 2024 17:08:37 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rpaVe-00020R-Jo for help-guix@gnu.org; Wed, 27 Mar 2024 17:08:36 -0400 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-341bba83366so61098f8f.1 for ; Wed, 27 Mar 2024 14:08:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711573712; x=1712178512; darn=gnu.org; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :from:to:cc:subject:date:message-id:reply-to; bh=uw2OilB6AIFvFHcuYV4Xn9Ez+4kR5gqWt2ZUVHGf01s=; b=aj7V0I2cgfW3ydzYbLXPrkFiTd/8CUs0rv969+cZX3slX5JhRAWYmWceHJ2/lcyRLE PG1PM855KCN0QJm2erYMsRJuv9HaIDdkKYB1m8YEVSGoJ0lK4IUJoJZguzcrLlD8zTOb eZfbsDOKdwrnM+XZLL8As9tO/5IiMD+uZ/ti3yLaQY+LMfWYlFYsu7rPYUOBegsJs+ke 3f9xu196V2rThvLnuPmpxn4DvH1oIKBgiRH2OZMMlv3mdEx5HHMqr6Te8qqAv12UO1qk sGX8kstasqq1gQ+E0XZdG1QdXmzA41jpDLWdQQcTT/HIbtmDfkMhckdwW8FDgGlNC12y lFpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711573712; x=1712178512; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=uw2OilB6AIFvFHcuYV4Xn9Ez+4kR5gqWt2ZUVHGf01s=; b=TIBMbcdJtjbB4MYOQt9lo0Ug/omGPWUW/DsrRillAZGzTI+QpDk6oFbLCALJCFSPSz EmVtPWrNjwdRZcat2g/+xVyhjW2W3zNPBJxbYXALs/vwaMS+viaecmcL7pjTHXX8985C jUJLdG66+NMJGFVH4n9sKzYpsRrIrCOle+oC396/Iz2e6RPLwdYgNMlvUCAN+6hsDgFM etTKX23pQr66nbnfTS0g6EwmE7kvAnmpiihoFRmELtaF/Mdq3FAwgAGtj+hSCh1jM05l xysWIvomhiX6CYmk86nr8SzgXHsXYJjwLRiwD0cr2DHsc00LgbJFYzhGejLvJekkH6p4 YSXw== X-Forwarded-Encrypted: i=1; AJvYcCX6mEDow2h/A5OujipiL6SGJjwZLeFYi3oSUDptFKonpMcY/wBJtlT9q4YP50LKUQu5Mg2u2gLk3iT0Ywl48bn8PA== X-Gm-Message-State: AOJu0YzJBsnoVbfR+IGDUJiwefOo8mZbzNezoqCglceDa9KTD98xuZwW KYdM01VVOKwrauWS/z4Aa74XjXgJACWGgkKFrEV/31SVjq/BviZ9dthJxqxn X-Google-Smtp-Source: AGHT+IEjjkArnShhz5SKVZSYrsnVEly3DpPANlbHT9qtMax/XNy/05wxc9UESY7qPrahLCKyM+4KCA== X-Received: by 2002:adf:e9c7:0:b0:33e:142f:7cb6 with SMTP id l7-20020adfe9c7000000b0033e142f7cb6mr846345wrn.0.1711573712070; Wed, 27 Mar 2024 14:08:32 -0700 (PDT) Received: from lili ([2a01:e0a:2c5:4d10:1fec:1d9b:654c:c773]) by smtp.gmail.com with ESMTPSA id e4-20020adfe384000000b0033e786abf84sm12017wrm.54.2024.03.27.14.08.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 14:08:31 -0700 (PDT) From: Simon Tournier To: Samuel Schmidt , Help Guix Subject: Re: Statistics for coverage of different software repos? In-Reply-To: <1843759644.2555899.1711118905517@fidget.co-bxl> References: <1843759644.2555899.1711118905517@fidget.co-bxl> Date: Wed, 27 Mar 2024 16:51:23 +0100 Message-ID: <87il17ad1g.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=zimon.toutoune@gmail.com; helo=mail-wr1-x431.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_03_06=1.592, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Spam-Score: -7.13 X-Migadu-Queue-Id: C0AD437195 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -7.13 X-TUID: 1rXlLH2AKI7C --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, On ven., 22 mars 2024 at 15:48, Samuel Schmidt = wrote: > Are there are any statistics or similar information about the amount of p= ackages covered in Guix compared with (specialized) software repos? > As an end result I am imagine something like:=C2=A0 > "80% of the 300 packages in melpa are also packaged in the guix-main chan= nel" > "2% of the packages in CRAN are also available in the guix-main channel" > "100% of the packages in CRAN are also available in the Guix-cran channel" Nothing I am aware. However, we could have a script (guix repl) that extracts information from package definition. For instance, --8<---------------cut here---------------start------------->8--- $ guix repl stats-melpa.scm Emacs: 4.72% (1413 / 29908) MELPA: .02% (6 + 0 / 29908) MELPA/Emacs: .42% (6 + 0 / 1413) --8<---------------cut here---------------end--------------->8--- with the script attached (modulo the bug of such script ;-)) Now, if MELPA serves a way to know the number of packages they provide, then it becomes straightforward to know. However, I do not know if there is a central index. Cheers, simon --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=stats-melpa.scm Content-Description: stat.scm (use-modules (guix packages) (gnu packages) (guix build-system emacs) (guix git-download) (srfi srfi-1) (srfi srfi-26) (ice-9 match) (ice-9 vlist) ) (define (all-packages) (fold-packages (lambda (package lst) (match (package-replacement package) (#f (cons package lst)) (replacement (append (list replacement package) lst)))) '() #:select? (negate package-superseded))) (define melpa-url "melpa.org") (define (melpa? p) (match (package-source p) ((? origin? o) (match (origin-uri o) ((url rest ...) (string-contains url melpa-url)) ;XXXX: deal with rest? ((? string? url) (string-contains url melpa-url)) ((? git-reference? ref) (string-contains (git-reference-url ref) melpa-url)) ;; XXXX: Maybe other methods? (_ #false))) (_ #false))) (define (update! table key) (match (hash-ref table key 'default) ((? number? value) (hash-set! table key (1+ value))) ('default (hash-set! table key 1)))) (define (packages->table) (define table (make-hash-table)) (fold (lambda (pkg result) (begin (if (eq? emacs-build-system (package-build-system pkg)) (begin (update! result 'bs-emacs) (if (melpa? pkg) (update! result 'bs-emacs+melpa) (update! result 'bs-emacs-other))) (begin (update! result 'bs-other) (if (melpa? pkg) (update! result 'bs-other+melpa) (update! result 'bs-other-other)))) result)) table (all-packages))) (define (format-table) (define table (packages->table)) (define (value type) (or (hash-ref table type) 0)) (define total (+ (value 'bs-emacs) (value 'bs-other))) (define (percent x tot) (* 100. (/ x tot))) (format #t "~%") (format #t "Emacs: ~2,2f% (~d / ~d)~%" (percent (value 'bs-emacs) total) (value 'bs-emacs) total) (format #t "MELPA: ~2,2f% (~d + ~d / ~d)~%" (percent (+ (value 'bs-emacs+melpa) (value 'bs-other+melpa)) total) (value 'bs-emacs+melpa) (value 'bs-other+melpa) total) (format #t "MELPA/Emacs: ~2,2f% (~d + ~d / ~d)~%" (percent (+ (value 'bs-emacs+melpa) (value 'bs-other+melpa)) (value 'bs-emacs)) (value 'bs-emacs+melpa) (value 'bs-other+melpa) (value 'bs-emacs))) (format-table) --=-=-=--