From owner-freebsd-hackers@freebsd.org Mon Mar 22 16:18:22 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4EC6B5B3957 for ; Mon, 22 Mar 2021 16:18:22 +0000 (UTC) (envelope-from christos@christosmarg.xyz) Received: from christos (mail.christosmarg.xyz [95.179.159.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F406P43dxz3tYG for ; Mon, 22 Mar 2021 16:18:21 +0000 (UTC) (envelope-from christos@christosmarg.xyz) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=default; bh=jIzrbKjS/PXf 3Y4pQVhFXkvteFKb2cuX/CNvFlH912o=; h=in-reply-to:references:subject:cc: to:from:date; d=christosmarg.xyz; b=Tqli1juv7hgT6C8WizOZmJoiUQ0YoNcVtT UxrF1qzKLZTO7/eXb0tHd0qwmQqSbtkNULuXrLHaCuAI8mF1mXWqZn1+laE/87ED2XKamG IVZw5o0CuK6VYG3gOeDcXh5idBef74S589Bki8av6GqFbXCvNSANnsCJTf/kNmFyKNQ= Received: from pleb (athedsl-204716.home.otenet.gr [85.74.119.74]) by mail.christosmarg.xyz (OpenSMTPD) with ESMTPSA id 8df03818 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Mon, 22 Mar 2021 16:18:18 +0000 (UTC) Date: Mon, 22 Mar 2021 18:18:02 +0200 From: Christos Margiolis To: Chris Cc: freebsd-hackers@freebsd.org Subject: Re: [GSoC 2021] Project Proposal Message-ID: <20210322161802.zouhvffwcuibwtmb@pleb> References: <20210322144928.ry75v5nlfhpzcfir@pleb> <93c692373cf35aae8dab4f1c63c38d08@bsdforge.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <93c692373cf35aae8dab4f1c63c38d08@bsdforge.com> X-Rspamd-Queue-Id: 4F406P43dxz3tYG X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=christosmarg.xyz header.s=default header.b=Tqli1juv; dmarc=pass (policy=none) header.from=christosmarg.xyz; spf=pass (mx1.freebsd.org: domain of christos@christosmarg.xyz designates 95.179.159.8 as permitted sender) smtp.mailfrom=christos@christosmarg.xyz X-Spamd-Result: default: False [-0.50 / 15.00]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[christosmarg.xyz:s=default]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RBL_DBL_DONT_QUERY_IPS(0.00)[95.179.159.8:from]; SPAMHAUS_ZRD(0.00)[95.179.159.8:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[christosmarg.xyz:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[christosmarg.xyz,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; HFILTER_HELO_5(3.00)[christos]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_NOT_FQDN(0.50)[]; ASN(0.00)[asn:20473, ipnet:95.179.144.0/20, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-hackers]; RECEIVED_SPAMHAUS_PBL(0.00)[85.74.119.74:received] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Mar 2021 16:18:22 -0000 On Mon, Mar 22, 2021 at 08:41:20AM -0700, Chris wrote: > Every version of mixer that I have run keeps state in /var/db/mixerN-state: > vol 100:100 pcm 100:100 > where N is (0-9) which represents a previous state. This has been the case > for > as long as I can remember. It's much the same WiFi lease(s). Unless I'm > missing > something IMHO it's current incarnation seems trivial to work with / > manipulate. > One might consider using JSON notation in it to allow for more advanced > features > and manipulation / reading / status I suppose. > I'm not trying to take the wind out of your sails, or anything. Just sharing > my own personal observation. :-) > > --Chris Interesting, I didn't really know about that, so I'll have to look more into it for sure. In any case, I still think my main argument stands that a library which can be used by all userland programs that might want to have access to the mixer will be of benefit. I've already mentioned a few use cases in my initial email. Even in the case that you outlined - the state already being cached in `/var/db/mixerN-state` - I think that libmixer(3) could provide with functions that deal with those files, instead of having the programmer find ways to deal with them. mixer(8) at the moment still doesn't have the option to mute/unmute the mixer even with those files existing, so having a library handle all that stuff, will make mixer(8) basically a frontend for the library and will have cleaner code. And as I've already said in the previous email, other programs such as MixerTUI could use the library too. I think that makes things more extensible; after all, many FreeBSD programs already follow that design (library + a frontend for it). ---------------------------------------------- Christos Margiolis