From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: I want to add a package to GNU ELPA: infix-notation-calculator Date: Tue, 17 Aug 2021 19:28:02 -0400 Message-ID: References: <90e77688-8912-2002-7fe8-86c5e58fb42d@cvj.se> <90971c32-68c7-f59e-c426-ef0ecc5af0d0@cvj.se> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1121"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Christian Johansson Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Aug 18 01:28:51 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 1mG8Vn-000AbI-Bm for ged-emacs-devel@m.gmane-mx.org; Wed, 18 Aug 2021 01:28:51 +0200 Original-Received: from localhost ([::1]:48922 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mG8Vl-0006RT-0V for ged-emacs-devel@m.gmane-mx.org; Tue, 17 Aug 2021 19:28:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39342) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mG8VD-0005kt-VQ for emacs-devel@gnu.org; Tue, 17 Aug 2021 19:28:16 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:60966) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mG8VA-00056z-Rp for emacs-devel@gnu.org; Tue, 17 Aug 2021 19:28:14 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 842ED440A29; Tue, 17 Aug 2021 19:28:09 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id D9DB2441423; Tue, 17 Aug 2021 19:28:03 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1629242883; bh=55om6SXIQREejPGlk30G4tEvLKIPZLHctmjzXUivoaE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=WWFV8wOtNZ+PP/0rukWrVEi9YN8CM9i1NyLGBXTTh5zGCeVFJYNxItGF0j2oWXSGe huOLsRHDjuifC7g3d4CLQJzKCNopa3zgwfiV0wSAW7lhESQesg2Q7nlD/6SSG/dX6n 7Bj4HUbuxuCkRhBsczPznHCUukjoavwz+mWyGoN9bAo7g5OMhQ+UvFA5axH80PV/mz GkM70dURFgHfMOCmo1iQAEx+pX7VA/oLY5a0NgsTx9fMFKmMHPk6MuZBvLy/OzPHom hr3KfcusPypkBvzY870NNK77+sPKszYQBzj6r8LFT/PXmxGyqtLxZX3OY11jrvBteW TCi9UhOvAoRsw== Original-Received: from alfajor (unknown [104.247.244.135]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 8DD5A120187; Tue, 17 Aug 2021 19:28:03 -0400 (EDT) In-Reply-To: <90971c32-68c7-f59e-c426-ef0ecc5af0d0@cvj.se> (Christian Johansson's message of "Tue, 17 Aug 2021 09:32:37 +0200") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, 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.23 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:272530 Archived-At: > Sure, I think calc and calculator are more full-focused calculators that > require a learning-curve, this plugin is more of an quick ad-hoc calculator > that calculates values like (infix notation) [...] Thanks, but I meant to add that to the README or the `Commentary:`. Also I was thinking more about the documentation on which operations are supported. [ IIUC you only support the four basic arithmetic operations, with standard precedence rules, plus parentheses for grouping, right? ] Also, I was wondering if you had considered implementing the parser with the following approach: - read the line with (read-from-string (concat "(" STRING ")")) - massage the resulting sexp to implement the desired infix syntax. You could even do the massaging via a macro, where (infix 2 + 3 * 5) (infix 2 + (3 * 5)) (infix (2 + ((3) * 5))) all macroexpand to (+ 2 (* 3 5)) so your syntax could be used inside code as well. Stefan