From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: Re: Yet another literate programming application Date: Mon, 29 Jul 2013 18:30:54 +0200 Message-ID: References: <87k3k9o3vu.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39448) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3qLe-00055V-Pd for emacs-orgmode@gnu.org; Mon, 29 Jul 2013 12:31:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V3qLZ-0004rq-Rw for emacs-orgmode@gnu.org; Mon, 29 Jul 2013 12:31:02 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:63143) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3qLZ-0004qf-LH for emacs-orgmode@gnu.org; Mon, 29 Jul 2013 12:30:57 -0400 In-reply-to: <87k3k9o3vu.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Schulte Cc: emacs-orgmode schulte.eric@gmail.com writes: > Alan Schmitt writes: > >> Or rather, I should say a literate algebra and calculating application: >> http://calca.io/ >> > > If this is appealing, it may be worth checking out the "Embedded Mode" > of Emacs calc [1]. From what I can tell on the calc.io website, Emacs > calc provides the same functionality, but Emacs calc has the benefits of > (1) it is open source meaning you can confirm calculations and your > answers (in my opinion a must for any peer reviewed publication), and > (2) it may be embedded in *any* type of file. Embedded calc mode is amazing, thanks for the link! It does not seem as intuitive to work with equations (I've tried doing the Functions and Solving Equations examples in calc), and there are funny results with spaces in names. If someone knows how to do the even/odd example in calc, please let me know. Here is what I got so far: * Variables #+BEGIN_SRC calc m := 42 b := 1000 m x + b => 42 x + 1000 mass of earth := 5.972e24 kg mass of moon := 7.34767309e22 kg mass of earth / (mass of moon) => earth / moon #+END_SRC * Functions #+BEGIN_SRC calc eq := f = 1.8 c + 32 ceq := solve(eq, c) => c = f / 1.8 - 17.7777777778 subst(eq, c, 20) => f = 68. subst(ceq, f, 100) => c = 37.7777777778 even(n) := n = 0 ? true : odd(n - 1) odd(n) := n = 1 ? true : even(n - 1) #+END_SRC Thanks again for pointing me to how great calc can be, Alan