From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: sqlite3 Date: Wed, 15 Dec 2021 16:47:31 +0100 Message-ID: <87ilvpkgz0.fsf@gnus.org> References: <87tufmjyai.fsf@gnus.org> <2563341.DJk1cxha8W@galex-713.eu> <89627B39-5DC7-402E-9897-2708B7A5CC2B@mit.edu> <2328395.9DzazV271f@galex-713.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7498"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Alexandre Garreau , "emacs-devel@gnu.org" To: Qiantan Hong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Dec 15 17:01:12 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mxWiO-0001im-JF for ged-emacs-devel@m.gmane-mx.org; Wed, 15 Dec 2021 17:01:12 +0100 Original-Received: from localhost ([::1]:44474 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxWiN-0004t7-HM for ged-emacs-devel@m.gmane-mx.org; Wed, 15 Dec 2021 11:01:11 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46430) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxWVL-0006jU-Hy for emacs-devel@gnu.org; Wed, 15 Dec 2021 10:47:46 -0500 Original-Received: from [2a01:4f9:2b:f0f::2] (port=43546 helo=quimby.gnus.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxWVK-0007Mf-1J for emacs-devel@gnu.org; Wed, 15 Dec 2021 10:47:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Tbdm8Qhk6wOBOGqenb3c+FrjRfcPlXER/DWbmnUoFp4=; b=B5knphQ6WMm7+A404oOuvGwrXC VnetSMj00Ir+vtPC5Lg/OCWxRB8Mx+/kzNdQNl2VadYKTVrMsNoMThK0aX0qZeJnRjDaRrsYhi2PX 5uagFe9ncPz0n2dRsmKcC6WQG7+eyhVXl2TRx898hn2eDqEBY1kWJty2GocvParDX3Fg=; Original-Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mxWVC-00066T-7T; Wed, 15 Dec 2021 16:47:36 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAG1BMVEXv6NT9/e+HhXcX FxElJBouLCG5taVXVUj///8fCikEAAAAAWJLR0QIht6VegAAAAd0SU1FB+UMDw8iKmCbFQ0AAAG2 SURBVDjLddNLc5swEABgMROTK/SgXIOTmGunK8G1E4nk6lQoXKNkKl9LDPXfr15gGdK9eLyftIte CIVI7rgN2XIAhZBGKA8hbJ5wB7mBJOQxJwCk5aP5URl6n+EINmQjGwvpDBgCcFOqQGf4RhyQtjHQ I72d4AamKRJgj/TcfOPzrJMM4E8EHxNwB3ZhHq48NJ1gtscZfCnyLG2pwiz7EugopTBgEosZshtM ExXBtV0HIUPT0hhw2foZJ8HslgRI9V1YHtDWjkg8vAuYg8hhgrSM0pxRs8vEQTTcbeLIoHMAbM7S z20p/97Tnf0exKLhCo9Sj3u1BOgP5W1ZurwpNUUtoErS7E37FZ9n1NsjTUzbZAVvG6rzOaJS6FBt dvOtiSAd+uvhl1rB429RYK3WpT5Fo3KF1tCS2vw/rQGgMufljnUJ+wwLVn0BfX5FgCYrqG/zo7kJ Lwtg9SvGodMFdFSjBzdxAa+HXeZOMzQJm0gfHnN049/IxXn8xKdkuvEqntHnmyK8trDEAC/58Hwf Pq+IS30Pb9DCRY/qA74Ger4sPFntVRjzP5hWzpbww+UzxJfw5OEfjADE7Pdo8nMAAAAldEVYdGRh dGU6Y3JlYXRlADIwMjEtMTItMTVUMTU6MzQ6NDIrMDA6MDD0ZKIdAAAAJXRFWHRkYXRlOm1vZGlm eQAyMDIxLTEyLTE1VDE1OjM0OjQyKzAwOjAwhTkaoQAAAABJRU5ErkJggg== X-Now-Playing: New Order's _Low Life_: "track" In-Reply-To: (Qiantan Hong's message of "Wed, 15 Dec 2021 15:36:19 +0000") X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a01:4f9:2b:f0f::2 (failed) Received-SPF: pass client-ip=2a01:4f9:2b:f0f::2; envelope-from=larsi@gnus.org; helo=quimby.gnus.org X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:282064 Archived-At: Qiantan Hong writes: > Basically, printing the key as file name does not guarantee distinguishing > the key > 1. Even if one escape the key, the printed representation may be larger > than 255 bytes, or 8bytes in FAT32 (idk if any one still use it). In > such case, > two different key may give the same filename because the prefix is > the same Well, I don't think we care about FAT, but I think it'd be fine to limit the key length to 255 bytes. > 2. What=E2=80=99s worse, some FS are case insensitive. That's a concern, yes, but again it's not particularly relevant for persistent variables. (If you have variables in the same package that only differs by case, I don't know what to say.) I did consider just using sha1 of all the keys as the file names, and then storing the actual key in the file as well, but it seems like over-engineering (and it makes things less understandable for users poking around). --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no