Sébastien Boisgérault, MINES ParisTech
16/10/2017, Mini-Séminaire Créative
Lecturer / Researcher
MINES Paristech Center for Robotics
Mathematics / Control / Signal Processing / …
In the context of Web Tech & Teaching:
experience feedback / thoughts / tech. watch
collection of use cases (some tiny ones)
pedagogy / implementation / publishing
Complex-valued functions of a complex variable
visualisation?
differentiability?
holomorphy?
Classic browser tech: HTML / CSS / JS
Examples (Steve Wittens):
Solution of the Laplace equation in 2D
Modern Applications?
Heat equation?
Fluid Mechanics?
…
GNU Image Manipulation Program
Compute the derivative of f(x)
.
def FD(f, x, h):
return (f(x+h) - f(x)) / h
The step h
may be either too large or too small.
Some other difference schemes perform better.
Demonstrate the problems with FD
Show the improvement
Not the solution / explanation yet (teaser)
Video / Screencast?
desktop app: record & upload
lightweight data: asciicast is just JSON
ClojureScript project
embed in HTML or host in the cloud
Some wheels yield no kinematic constraint.
Example: caster wheels, swedish wheels, etc.
So we remove them from the model.
Not convinced?
experiment / design / build 4 audio codecs:
Lossless codec, voice codec, AU-like, MP3-like
10 contact hours (50% lectures / 50% lab sessions)
no prerequisite (programming, signal processing)
Very tight time budget. Can software help?
Python audio
package
focus on the API (few new features)
match the domain abstractions (several layers)
suitable for live demos & pseudo-code
expression coined by Kenneth Reitz
started with “HTTP for Humans”: Python library Requests, a better, higher-level httplib
The Python language is already made for humans:
https://www.python.org/dev/peps/pep-0020/
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
etc.
>>> f = 440.0
>>> x = cos(2 * pi * f * t)
>>> x
array([ 1. , 0.99803566, 0.99215037, ..., , 0.99803566])
>>> audio.io.play(x)
>>> audio.wave.write(x, "A4.wav")
>>> audio.wave.read("A4.wav")
array([[ 0.99996948, 0.99804688, 0.99215698, ..., 0.98236084,
0.99215698, 0.99804688]])
>>> audio.wave.read("A4.wav", scale=False)
array([[32767, 32704, 32511, ..., 32190, 32511, 32704]], dtype=int16)
>>> bytes = open("A4.wav").read()
>>> from audio.bitstream import BitStream
>>> bits = BitStream(bytes).read(8 * 16)
>>> bits
01010010010010010100011001000110101111000000100100000100000000000101011101000001010101100100010101100110011011010111010000100000
>>> bits.read(str)
'RIFF\xbc\t\x04\x00WAVEfmt '
It now works on my machine! But …
non-standard software
system/platform dependencies
need a custom student experience
“Matlab-like” experience
Notebook experience
Executable Notebook: notes, code, graphs, etc.
In the browser (with local or remote code execution)
Support for several languages (including Python)
Execution model is cloud-friendly
Get the benefits of virtual machines
dependencies/deployement
Free (as in beer): Microsoft Azure Notebooks
renowned (if controversial) scientist
(see e.g. Intuitionisme 84 with G. Reeb)
clear pro-sharing stance (cf “Le Photocopillage”)
book published (Diderot Editeur Arts Sciences)
sources published online (Strasbourg University)
edition out of print
sources not available anymore
old tech, sources only (no build)
build does not succeed
The example of Complex Analysis and Applications
Sources / Documents
DOI: 10.23646/oer.000001
Document Output Format?
Process / Tooling?
Document Input Format?
Old strengths and growing set of technologies
Semantics / Connectivity / Offline and storage / Multimedia / 2D/3D graphics / Performance and integration / Device access / Styling
Simple format + document model + “converters”
I have been happy with:
Markdown, a plain text format for the Web
(try online )
Text.Pandoc.Definition a Haskell type hierarchy
Pandoc a “universal document converter”
Multiple output targets (Web, PDF, E-PUB, etc.)
Transform your documents
(e.g. create a book from several smaller documents)
Migration / Future-proof
Make it easy to build the document
(You are probably the one doing it anyway!)
Setup (instructions / script) & Build (script)
Provide build platforms (containers or VMs)