From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lynn Winebarger Newsgroups: gmane.emacs.devel Subject: Re: [GNU ELPA] New package: tam Date: Wed, 20 Sep 2023 12:44:26 -0400 Message-ID: References: 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="4217"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Sep 20 18:45:41 2023 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 1qj0Kb-0000tN-OK for ged-emacs-devel@m.gmane-mx.org; Wed, 20 Sep 2023 18:45:41 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qj0Jh-0002sP-7v; Wed, 20 Sep 2023 12:44:45 -0400 Original-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 1qj0Jg-0002sC-6y for emacs-devel@gnu.org; Wed, 20 Sep 2023 12:44:44 -0400 Original-Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qj0Je-0001QD-Ix for emacs-devel@gnu.org; Wed, 20 Sep 2023 12:44:43 -0400 Original-Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2bffdf50212so64385521fa.1 for ; Wed, 20 Sep 2023 09:44:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695228281; x=1695833081; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=7M/BPqoOdthD9ive1FqhPcUKyeh/Ojw92DSPUDCaL1g=; b=nWDbTgHeLZrtbr5WjTU1ZSfmkhqErZqqq179XUmyvWb0uanUgkDLYlhcFC7OyedO5U mEuasEkbUyPwso/kNXMhoZTbwlZtbL/PLoFB9ouSROlM//t7RIC5xaz4AbRvA8Haa+Ji mzq8GxvwZO2LQJc+XWDBsYeBknqQrDv61Ttk6eRf55Xsn05iJ2dc3N3IfracZcbiNbK+ k1062iZusXVWAwROXmPT2spCh6YjmouhuZlRb4dEmketFf+RSei69Emy0T83qcHPkk4F VIX4UJpDn7NSS3no2pvBry2keSAwf+2h4KdYMlui4ik6Gu6xANbmMppEgWxBkySFt8bX 7eJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695228281; x=1695833081; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7M/BPqoOdthD9ive1FqhPcUKyeh/Ojw92DSPUDCaL1g=; b=dBMGjUL6D6qTjUA26sbXEN7VGCcotA0iVMG3MnXxJ6Mw+Ai49Rlb0cHNXWyXMhu6M1 cTBmCuKM8i/4x1mDBukp9PizVVgtiP0GeT/8kJBAAhPWTLKTjNn5/bpRDAyddlXO1wXy VJnS5ILB/yvozuor7tpUYiMg4Qd8ymhnxgJS1rAGNwM4c0aFZuQbZRhl+SeaBVE8oc/1 gldeKTkBlEudsqZryUWVg+jq7PQritGDbITx/ER+llydKvQhATcVUQ3t9i6NgKimFazv P7oE0U3rr77574Rt8LC1j0v+PSzL663cizaaRYb8T+Qk3+vwncNlmp475phg4FkmXBws YZbQ== X-Gm-Message-State: AOJu0YwrLLODEpTSlEDlo1dcq8k52fjzbGQrv9S5NKtdwtjtdl/e3kUk wdxX2qyiq7znXQlNn9s12nkdpavcmz8321yNa9z5XwHK2EQ= X-Google-Smtp-Source: AGHT+IEIVH8x54ugmWXH7ML1K4dqzWdGjgKVe/AGQOOPGDvxfpCwCHmjWQW6D1cndq2CjkB7pKvDbfPZFUQeZSQC/1Y= X-Received: by 2002:a2e:8855:0:b0:2bf:7894:a490 with SMTP id z21-20020a2e8855000000b002bf7894a490mr2741457ljj.38.1695228280429; Wed, 20 Sep 2023 09:44:40 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::22b; envelope-from=owinebar@gmail.com; helo=mail-lj1-x22b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:310845 Archived-At: On Wed, Sep 20, 2023 at 12:07=E2=80=AFPM Stefan Monnier wrote: > Any reason why you're not using `cl-defstruct`? See my last response to Philip Kaludercic. > Also, is it important to document that the values returned from > `tam-allocate` (and passed to `tam-free/tam-table-get`) are integers? I'm only committed to those functions returning an "index" that can be created in constant time. Since there is no facility for multiple return values without some kind of consing, that pretty much means a fixnum. I have at least considered making the integer return value into a bitfield split between a slot number and some kind of "generation number" recorded in each slot, so free-after-free errors with an intervening reallocation could be caught. That would be over-engineering at this point, but I wouldn't commit to never providing it as an option. Maybe I should rename tam-table-get to just tam-get now that the table and pool structures overlap. Lynn