From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.devel Subject: Re: Adding a generic mathematical library Date: Sun, 21 Jul 2024 09:40:42 +0200 Message-ID: <878qxv5h1h.fsf@dataswamp.org> References: <8734o9sdig.fsf@posteo.net> <87wmllqq66.fsf@posteo.net> <87plrdqnhc.fsf@posteo.net> <87le21qldj.fsf_-_@posteo.net> <878qy1at52.fsf@dataswamp.org> <87ikwz5nll.fsf@dataswamp.org> <87bk2r5kzg.fsf@dataswamp.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4050"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: emacs-devel@gnu.org Cancel-Lock: sha1:2mKOPHnQ28UuAF3BtiIsN/rbht0= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jul 21 10:39:43 2024 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 1sVS6Z-0000tm-4Y for ged-emacs-devel@m.gmane-mx.org; Sun, 21 Jul 2024 10:39:43 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sVS5k-00069d-0t; Sun, 21 Jul 2024 04:38:52 -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 1sVRBf-0002Fs-Ml for emacs-devel@gnu.org; Sun, 21 Jul 2024 03:40:55 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sVRBd-00041r-JG for emacs-devel@gnu.org; Sun, 21 Jul 2024 03:40:55 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1sVRBa-00095b-UV for emacs-devel@gnu.org; Sun, 21 Jul 2024 09:40:50 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Mail-Copies-To: never Received-SPF: pass client-ip=116.202.254.214; envelope-from=ged-emacs-devel@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 21 Jul 2024 04:38:50 -0400 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:321859 Archived-At: Here is the entire list. 28 files. Dig in. I'll make a directory and unified list later, maybe. In the meantime, well you see in what directory the files are, if you'd like to browse them. That will include other files for now. MATH Second part, 16 files. Last: the first part, 12 files. Total 28 files. * issn-verify.el https://dataswamp.org/~incal/emacs-init/issn-verify.el Verify ISSN numbers. * lights.el https://dataswamp.org/~incal/emacs-init/lights.el Compute LED luminous efficacy (lm/W). * list.el https://dataswamp.org/~incal/emacs-init/list.el Stats on lists. * math.el https://dataswamp.org/~incal/emacs-init/math.el The infamous math file, critized by many for as many different reasons. Fairly so? Maybe! It has no less than 23 `defun' anyway. * negative-subtraction.el https://dataswamp.org/~incal/emacs-init/negative-subtraction.el Subtraction digit by digit. * perm.el https://dataswamp.org/~incal/emacs-init/perm.el Permutations. Known from the math field combinatorics but also stats and actually many science areas. Bonus: this file solves a fun word problem from a TV show. * psea.el https://dataswamp.org/~incal/emacs-init/psea.el https://dataswamp.org/~incal/emacs-init/b-a-original.el Has to do with string distance and then stats and tables on that. Yes, I tried that two times it seems! In b-a-original.el you can output this kind of table (below) saying the first line is 81% original - so scores a number 1 position at 407 originality points. Based on a weighted sum. 1. (require 'pcase) 81% 407 2. (require 'cl-lib) 80% 402 3. (require 'psea) 80% 402 4. (require 'subr-x) 80% 402 5. (require 'thingatpt) 77% 387 * random-generic.el (random.el) https://dataswamp.org/~incal/emacs-init/random-generic.el https://dataswamp.org/~incal/emacs-init/random.el Randomizer for arbitrary data types, so you can feed whatever into it and mix it up transparently. Plus some misc random stuff, looks like it is more practical in nature but randomness is a part of math (and stats, and CS, and ...) so I include it. * scale.el https://dataswamp.org/~incal/emacs-init/scale.el Draw a scale. [ Sorting we don't consider math, right? But CS? Cool, not included. ] * stats.el https://dataswamp.org/~incal/emacs-init/stats.el I'm not sure what this does, it outputs some digit set with some constrains? I'll look it up, looks interesting! * str-to-bits.el https://dataswamp.org/~incal/emacs-init/str-to-bits.el (str-to-bits "What's up Emacs community?") 111111 1111001 1110100 1101001 1101110 1110101 1101101 1101101 1101111 1100011 100000 1110011 1100011 1100001 1101101 1000101 100000 1110000 1110101 100000 1110011 100111 1110100 1100001 1101000 1010111 * survivor.el https://dataswamp.org/~incal/emacs-init/survivor.el [ OT: read if you are from Australia or Sweden. Maybe the US ] This is computation on the TV show Survivor (or Expedition Robinson as the English original idea was called on Swedish TV where it was first realized). Computation is based on the idea that it gets more difficult all the time but not linearly so but much worse. So, the difficulty at day 48 in Australian Survivor is computed to 1176 (compare for example US Survivor at only 27 days and scores a mere 378). Is AUS Survivor the world's most difficult reality TV show? Well, the numbers don't lie ;) Congrats to AUS people reading this, you are a tough bunch - in a good way - and thanks for that awsome show, the very best national instance ever of the show! Here is the full list: ;; (cost-at-day 48) ; 1176 AUS ;; (cost-at-day 39) ; 780 USA old era ;; (cost-at-day 28) ; 406 SWE ;; (cost-at-day 27) ; 378 USA new era ;; (cost-at-day 1) ; 1 ;; (cost-at-day 0) ; 0 * time-cmp.el https://dataswamp.org/~incal/emacs-init/time-cmp.el Computation on time. Very useful. * variance.el https://dataswamp.org/~incal/emacs-init/variance.el This has to do with stats, one is to parse a file with data. Very old but looks good anyway. * wood.el https://dataswamp.org/~incal/emacs-init/wood.el How to cut wood and build with wood. Several ideas are implemented here and I have tried them in practice and they work there as well (especially there). See photo linked from file. also: * distance.el https://dataswamp.org/~incal/distance/distance.el Calculate the distance between two Earth locations using the Haversine formula (yes, the globe is very much so round enough for this to work, alltho it is math and geometry method based on a perfect sphere). Probably the program is br0ken now since Wikipedia should have changed their UI and/or API many times since that program written also ages ago. But the math I hope is still OK. MATH First part, 12 files. * random-urandom.c https://dataswamp.org/~incal/emacs-init/random-urandom/random-urandom.c Dynamic module to get to Linux urandom which is more random than `random', so you can use that from Elisp as well. * all-substance.el https://dataswamp.org/~incal/emacs-init/all-substance.el Substance reduction (half-time). * audio.el https://dataswamp.org/~incal/emacs-init/audio.el db multiplier. * beer.el https://dataswamp.org/~incal/emacs-init/beer.el Convert between beer types, e.g. how many 5.3% beer are one six-pack 3.5%? * bike.el https://dataswamp.org/~incal/emacs-init/bike.el Compute the step and gear (roll out). * color-incal.el https://dataswamp.org/~incal/emacs-init/color-incal.el Computations on colors, determines "is a color blue"? * dice.el https://dataswamp.org/~incal/emacs-init/dice.el Can do 1D6 but also 2D3. * eggs.el https://dataswamp.org/~incal/emacs-init/eggs.el Solves the egg math problem. * epwgen.el https://dataswamp.org/~incal/emacs-init/epwgen.el How strong is a password. * frame-size.el https://dataswamp.org/~incal/emacs-init/frame-size.el More computations on the bicycle, this time the frame. * hex.el https://dataswamp.org/~incal/emacs-init/hex.el Decodes a hex string. * isbn-verify.el https://dataswamp.org/~incal/emacs-init/isbn-verify.el Verify ISBNs with the check digit and known algorithm. -- underground experts united https://dataswamp.org/~incal