Re: shell wrappers for trig and other mathematical functions

2019-10-04 Thread Lee
On 10/3/19, David wrote: > On Thu, 3 Oct 2019 at 02:39, Lee wrote: >> On 10/2/19, Greg Wooledge wrote: > >>> This is what shell functions are for. You can just drop the shell >>> functions into your ~/.bashrc and then use them in every interactive >>> shell thenceforth. > >>> I strongly recomme

Re: shell wrappers for trig and other mathematical functions

2019-10-02 Thread David
On Thu, 3 Oct 2019 at 02:39, Lee wrote: > On 10/2/19, Greg Wooledge wrote: >> This is what shell functions are for. You can just drop the shell >> functions into your ~/.bashrc and then use them in every interactive >> shell thenceforth. >> I strongly recommend this approach over the aliases t

Re: shell wrappers for trig and other mathematical functions

2019-10-02 Thread David Christensen
On 10/1/19 9:18 PM, Dan Hitt wrote: On Tue, Oct 1, 2019 at 8:58 PM David Christensen wrote: On 10/1/19 8:32 PM, Dan Hitt wrote: I'm half-way looking for some shell wrappers for common trig functions like sin, cos, exp, log, and others. I'm aware of bc, but it seems cumbersome. I would lik

Re: OT: Reason to buy a Raspberry Pi ;-) (was Re: shell wrappers for trig and other mathematical functions)

2019-10-02 Thread Anders Andersson
On Wed, Oct 2, 2019 at 8:06 PM wrote: > > Somewhat OT, but (maybe) interesting anyway? > > For a long time, I've been aware of the program Mathmatica (by Wolfram > Research) that does a lot of math, including, iirc, things like symbolic > integration and differentiation. (Everybody should have th

Re: OT: Reason to buy a Raspberry Pi ;-) (was Re: shell wrappers for trig and other mathematical functions)

2019-10-02 Thread John Hasler
I always have Octave open for calculations and math. For symbolic math look at python-sympy, axiom, cantor, euler, form, freemat (said to be mostly matlab compatible), mathomatic, maxima, sagemath, wxmaxima, or just do "apt-cache search math" and look down the list. -- John Hasler jhas...@newsg

Re: OT: Reason to buy a Raspberry Pi ;-) (was Re: shell wrappers for trig and other mathematical functions)

2019-10-02 Thread Nicolas George
rhkra...@gmail.com (12019-10-02): > Anyway, my thinking on this topic is that I wouldn't mind having a program > dedicated to the uses the OP brought up (I keep a session of bc - l open in a > terminal for quick calculations). I personally have shift-meta-letter keyboards shortcuts to start xter

Re: OT: Reason to buy a Raspberry Pi ;-) (was Re: shell wrappers for trig and other mathematical functions)

2019-10-02 Thread Greg Wooledge
On Wed, Oct 02, 2019 at 02:06:03PM -0400, rhkra...@gmail.com wrote: > Anyway, my thinking on this topic is that I wouldn't mind having a program > dedicated to the uses the OP brought up (I keep a session of bc - l open in a > terminal for quick calculations). So do I. Several of them, in fact

OT: Reason to buy a Raspberry Pi ;-) (was Re: shell wrappers for trig and other mathematical functions)

2019-10-02 Thread rhkramer
Somewhat OT, but (maybe) interesting anyway? For a long time, I've been aware of the program Mathmatica (by Wolfram Research) that does a lot of math, including, iirc, things like symbolic integration and differentiation. (Everybody should have those capabilities at their finger tips ;-) Anyw

Re: shell wrappers for trig and other mathematical functions

2019-10-02 Thread Nicolas George
David Wright (12019-10-02): > > alias cp='cp -i' > > alias rm='rm -i' > Ouch, a couple of great recipes for losing information. > Far better to train your fingers to spell cp and rm with five characters. Avoid assuming that everybody's mental process work the same as yours. Regards, -- Nicola

Re: shell wrappers for trig and other mathematical functions

2019-10-02 Thread David Wright
On Wed 02 Oct 2019 at 12:39:27 (-0400), Lee wrote: > On 10/2/19, Greg Wooledge wrote: > > <.. snip ..> > > Oh, you just want to MINIMIZE TYPING. Then write a series of shell > > functions. > > > > wooledg:~$ sin() { perl -e 'print sin $ARGV[0], "\n"' "$1"; } > > wooledg:~$ sin 1 > > 0.84147098

Re: shell wrappers for trig and other mathematical functions

2019-10-02 Thread Lee
On 10/2/19, Greg Wooledge wrote: <.. snip ..> > Oh, you just want to MINIMIZE TYPING. Then write a series of shell > functions. > > wooledg:~$ sin() { perl -e 'print sin $ARGV[0], "\n"' "$1"; } > wooledg:~$ sin 1 > 0.841470984807897 > > This is what shell functions are for. You can just drop

Re: shell wrappers for trig and other mathematical functions

2019-10-02 Thread Greg Wooledge
On Tue, Oct 01, 2019 at 09:18:13PM -0700, Dan Hitt wrote: > It does look like a way to quickly get values for sine (or any other > function in perl). > > However, i would like to dispense entirely with the 'perl -e' and 'print' > part. You can't. > I really would like stand-alone programs. Gods

Re: shell wrappers for trig and other mathematical functions

2019-10-02 Thread Klaus Singvogel
Hi, Dan Hitt wrote: > I'm half-way looking for some shell wrappers for common trig functions like > sin, cos, exp, log, and others. > > I'm aware of bc, but it seems cumbersome. > > I would like to just type 'sin 1' and get the sine (of 1 radian), or type > 'log 2' and get the natural or maybe c

Re: shell wrappers for trig and other mathematical functions

2019-10-02 Thread Will Mengarini
* Dan Hitt [19-10/01=Tue 21:18 -0700]: > On Tue, Oct 1, 2019 at 8:58 PM David Christensen > wrote: > > > On 10/1/19 8:32 PM, Dan Hitt wrote: > > > I'm half-way looking for some shell wrappers for common trig functions > > like > > > sin, cos, exp, log, and others. > > > > > > I'm aware of bc, bu

Re: shell wrappers for trig and other mathematical functions

2019-10-02 Thread tomas
On Wed, Oct 02, 2019 at 09:15:30AM +0200, Nicolas George wrote: > to...@tuxteam.de (12019-10-02): > > [1] try "echo $((0.6 + 1.3))" in your bash to see what I mean :) > > People live happier when their "bash" is actually a zsh: At least those who like zsh :-) But we're not starting a shell war h

Re: shell wrappers for trig and other mathematical functions

2019-10-02 Thread Nicolas George
to...@tuxteam.de (12019-10-02): > [1] try "echo $((0.6 + 1.3))" in your bash to see what I mean :) People live happier when their "bash" is actually a zsh: ~ $ echo $((0.6 + 1.3)) 1.8999 ~ $ zmodload zsh/mathfunc ~ $ echo $[exp(1)+exp(-1)] 3.0861612696304874 Regards, -- Nicolas G

Re: shell wrappers for trig and other mathematical functions

2019-10-02 Thread tomas
On Tue, Oct 01, 2019 at 08:32:01PM -0700, Dan Hitt wrote: > I'm half-way looking for some shell wrappers for common trig functions like > sin, cos, exp, log, and others. > > I'm aware of bc, but it seems cumbersome. The shell way would be to do it with bc (or dc, if you want it cryptic). Note th

Re: shell wrappers for trig and other mathematical functions

2019-10-01 Thread mick crane
On 2019-10-02 05:18, Dan Hitt wrote: On Tue, Oct 1, 2019 at 8:58 PM David Christensen wrote: On 10/1/19 8:32 PM, Dan Hitt wrote: > I'm half-way looking for some shell wrappers for common trig functions like > sin, cos, exp, log, and others. > > I'm aware of bc, but it seems cumbersome. > > I

Re: shell wrappers for trig and other mathematical functions

2019-10-01 Thread David Wright
On Tue 01 Oct 2019 at 21:18:13 (-0700), Dan Hitt wrote: > On Tue, Oct 1, 2019 at 8:58 PM David Christensen > wrote: > > On 10/1/19 8:32 PM, Dan Hitt wrote: > > > I'm half-way looking for some shell wrappers for common trig functions > > > like > > > sin, cos, exp, log, and others. > > > > > > I'

Re: shell wrappers for trig and other mathematical functions

2019-10-01 Thread Dan Hitt
On Tue, Oct 1, 2019 at 8:58 PM David Christensen wrote: > On 10/1/19 8:32 PM, Dan Hitt wrote: > > I'm half-way looking for some shell wrappers for common trig functions > like > > sin, cos, exp, log, and others. > > > > I'm aware of bc, but it seems cumbersome. > > > > I would like to just type '

Re: shell wrappers for trig and other mathematical functions

2019-10-01 Thread David Christensen
On 10/1/19 8:32 PM, Dan Hitt wrote: I'm half-way looking for some shell wrappers for common trig functions like sin, cos, exp, log, and others. I'm aware of bc, but it seems cumbersome. I would like to just type 'sin 1' and get the sine (of 1 radian), Perl one-liners are an option: 2019-10-0