[Edu-sig] Re: arbitrary precision computing in K-12

2020-01-30 Thread kirby urner
On Thu, Jan 30, 2020 at 4:55 AM Wes Turner  wrote:

>
>
> Are they working on Windows platforms?
> I understand that Python is in the Microsoft App Store now, but conda is
> not.
>
>
Yes.  Oft times these are public school labs and I'm not in charge of what
gets installed.  Always Windows and/or Chromebooks.

The private schools have featured Macs as well.

However they're already using repl.it in the cloud (after Codesters in the
sequence).

My Decimal experiments have been in repl.it:
https://repl.it/@kurner/tetravolumes

I realize one may use Jupyter Notebooks in the cloud as well (e.g. that
free Docker-based service etc., Mybinder I think it's called).

But in this context I'm just sharing exhibits, saying "hit the run button"
and showing it's at least as much fun as a calculator.  Other exhibits
might include Taylor Series or like that Ramanujan algorithm for 1/pi.

Raspberry Pi is also feature in our curriculum segments.  That comes with
Wolfram Language perhaps, more like sympy and Sage, but if we can just dive
in and use Decimal, so much the better (already installed with default OS).

https://flic.kr/s/aHskYSMvKJ
(Photo Album gives the flavor)

Step one might be to get curl or wget and bash installed. Are admin rights
> required to get Windows Subsystem for Linux (WSL) installed?
>
> Apparently, 'certutil' can be used to download over http on Windows
> platforms:
>
> certutil.exe -urlcache -split -f "
> https://download.sysinternals.com/files/PSTools.zip; pstools.zip
>
> Then download and install Miniconda:
>
> - https://docs.conda.io/en/latest/miniconda.html
> 
> - https://docs.anaconda.com/anaconda/install/silent-mode/
>

Useful on Raspberry Pi too I think.
When I teach my 40 hours Python course to adults (I've got another one
starting next week) I always go for conda.

This is BYOD class i.e. they bring a mixed bag as to the OS -- and given
teleteaching, I may not even know if they choose not to tell me.

However, when it comes to this high precision fitting-together of puzzle
geometric pieces, and giving a workout to that Gerald de Jong formula (came
to him on a train in Holland I think it was, a Ramanujan Moment -- he's a
math guy from University of Toronto [1]): that's for my younger students as
well, and I'm not really in a position to micro-manage their computers
either.

Codesters doesn't implement decimal type (a deficiency in Skulpt and
probably by extension in JavaScript?).  However I can use it to import the
graphics in question and display them on screen.





>
>
> certutil.exe -urlcache -split -f "
> https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe;
>
> start /wait "" Miniconda3-latest-Windows-x86_64.exe
> /InstallationType=JustMe /RegisterPython=1 /S /D=%UserProfile%\Miniconda3
>
> Then create an environment and install a few things:
>
> conda create -n maths jupyterlab spyder
> conda activate maths
> conda install -c conda-forge sympy gmpy2 matplotlib safe
>
> Then start jupyterlab or spyder or vscode, or IPython:
>
> jupyterlab
> spyder
> ipython
> # %logstart -o logged.inputandoutput.py
>
>
> But how do you plot 3d graphics in a terminal? In Jupyter notebooks, an
> object's _repr_html_ method will be called before just repr(object) (which
> calls __repr__) in order to get output for the notebook.
>

I've been a big VPython (Visual Python) fan over the years, as when it
comes to 3d, I'm interested in Polyhedrons (e.g. Platonics etc), using
user-crafted Vector classes and such.  For years I relied on ray tracing
i.e. Python code spit out scene description language.  This approach became
widespread e.g. see Antiprism by Adrian (antiprism.com).

At my best, I was getting Game of Life on a 3D hexapent (with modified
rules for 6 and 5 around 1).  My Oregon Curriculum Network website is full
of early VPython experiments (4dsolutions.net/ocn/cp4e.html).

Kirby

[1] Input six edges, get back out volume.  Add 24 of this shape to that
shape and prove outcome is 4.0 to 900 decimal places.  Part of that repl.it
thing.  What I wrote up on Medium (linked top of this thread).
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/


[Edu-sig] Re: arbitrary precision computing in K-12

2020-01-30 Thread Wes Turner
On Wed, Jan 29, 2020, 5:59 PM kirby urner  wrote:

>
>
> Yes, I've especially used gmpy2 and met the maintainer at a user group,
> worked at Mentor Graphics as I recall, and was collaborating with Alex
> Martelli on getting Python such a library.  Most of my Jupyter Notebooks
> exploring high precision are using that.  Trig built right in, and complex
> numbers.
>
> Sage is a fantastic amalgamation of underlying tools, however I'm
> exploring what a plain vanilla or at most a small install of a 3rd party
> library (vs. a whole framework) might handle, as that lets us work in some
> simpler environments, maybe just a bash shell in some cases.  I'm picturing
> tentative customers not pre-committed to using computers at all (e.g. high
> school math students used to Texas Instruments or maybe Casio).
>
> What's just one step away from a calculator?  Calculators remain very
> convenient devices and are likely to stay useful in the field.  I like
> those solar powered models.  Nowadays more people emulate them on
> smartphones.
>
> Now that you've gone to all the trouble to upgrade to a real computer,
> lets at least establish you have decent power in the arbitrary precision
> department.
>
> What minimal setup would you need to prove that to yourself?
>


Are they working on Windows platforms?
I understand that Python is in the Microsoft App Store now, but conda is
not.

Step one might be to get curl or wget and bash installed. Are admin rights
required to get Windows Subsystem for Linux (WSL) installed?

Apparently, 'certutil' can be used to download over http on Windows
platforms:

certutil.exe -urlcache -split -f "
https://download.sysinternals.com/files/PSTools.zip; pstools.zip

Then download and install Miniconda:

- https://docs.conda.io/en/latest/miniconda.html

- https://docs.anaconda.com/anaconda/install/silent-mode/


certutil.exe -urlcache -split -f "
https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe;

start /wait "" Miniconda3-latest-Windows-x86_64.exe
/InstallationType=JustMe /RegisterPython=1 /S /D=%UserProfile%\Miniconda3

Then create an environment and install a few things:

conda create -n maths jupyterlab spyder
conda activate maths
conda install -c conda-forge sympy gmpy2 matplotlib safe

Then start jupyterlab or spyder or vscode, or IPython:

jupyterlab
spyder
ipython
# %logstart -o logged.inputandoutput.py


But how do you plot 3d graphics in a terminal? In Jupyter notebooks, an
object's _repr_html_ method will be called before just repr(object) (which
calls __repr__) in order to get output for the notebook.

TI-84 don't have CAS (because … not allowed because measuring) so that
would be a cool demo.


> That might help make you a convert if you're still thinking your
> calculator might be the more capable device to reach for.  Lets do some
> circus tricks with Python, like 2**1000.  Wow!  Long integers are like a
> revelation.  The actual answer!  But can we do the same with messy decimal
> numbers?  That's where too many settle for floating point, unnecessarily.
>
> But yes, lets not forget the towering achievements all around us here.
> We're indeed in a wealthy ecosystem. A lot of the barriers to adoption have
> to do with long ingrained habits of mind.  The idea that we have both delta
> and lambda calculus now, i.e. the Newtonian calculus stuff and now Alan
> Turing and Ada stuff, is another way to help make it all one discipline,
> call it what you like.
>
>
> Kirby
>
> ___
> Edu-sig mailing list -- edu-sig@python.org
> To unsubscribe send an email to edu-sig-le...@python.org
> https://mail.python.org/mailman3/lists/edu-sig.python.org/
>
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/