hello the internet and welcome to open source directions brought to you by open teams the business to business
marketplace for all of your open source support and services i’m your host henry badri and joining me as the co-host
today is modiket hi i’m a deacon i’m excited to be co-hosting for this episode of open
source directions i’m a postdoc at the university of illinois at urbana-champaign i work on an open
source project called the yt project and i’m based in urbana illinois
so i’m aaron can you introduce yourself uh hi my name is aaron muir i live in
albuquerque new mexico i am a software engineer at kwan site
and i am a one of the developers of senpai which i guess we’ll be talking about today
awesome so hi i’m oscar benjamin i’m a lecturer
at the university of bristol in england i’m teaching maths physics and programming and a range of other things
i’m also uh a developer of simpo like i am not not for as long as aaron but um
both of us very active developers now awesome yeah thank you very much for joining us i’m really really excited for
this episode i know that aaron’s been hunting here before so this is his second time and you were on episode
three i believe it was aaron this brandon was saying yeah back in uh 2018 we did an episode also on senpai but uh
awesome i guess they wanted to do a little redux because it’s been a while yeah for sure and i’m really really
excited about this episode so let’s dive in uh before we do get into the juicy details of senpai there uh we’re gonna
go through some recent pull requests that everyone has been enjoying recently so uh what is a
pr that you’ve recently found interesting aaron uh yeah so um
there’s this pull request on senpai that i thought i’m pretty a little bit excited
our pr numbers are kind of big [Laughter]
well we’ve been around for a while but uh yeah so uh um a little background first
uh senpai has a function that takes a latex
expression like a latex math expression and parses it uh into a senpai expression
um and this is sort of this is sort of experimental but it’s been around for a few releases now
and currently this parser uses uh the antler parser
and this pull request here is changing it so it’ll use this other parser called lark
um and this has a couple of advantages uh one advantage is that lark is
like a pure python library so it’s a little easier to install um but the thing that i’m kind of
excited about is that lark actually is going to make it a lot easier for people to dynamically extend the parser
at runtime so instead of just sort of only working with the things that
um are we’ve sort of coded into the parser you can extend it with your own
latex functions or whatever and it should be pretty easy to do that so i’m i’m kind of excited about this
well i’m really excited about it now that’s awesome by one of my colleagues here at kwanzai
uh christopher ostercope okay awesome and if anyone’s have a look at that pull request uh it’s posted in
the chat and how about you oscar um so a pool request that’s been particularly interesting me i can’t
remember what the number is but i guess it’s about to appear in the chat um so this particular pull request
uh is introducing a new function class to replace the existing function class that we have in simple
and what this means it’s probably quite hard to understand if you haven’t used simple vote or if you haven’t looked into the
internals of simpli but this makes a function object into a symbolic object so that you can then do
symbolic manipulations with the function as a first class function so the idea would be that you could compose
functions and have differential operators and other sorts of things and some of those might not sound like
difficult things to introduce within simpai but the problem is that for a long time now senpai has been
using a particular meta class structure to do this and that’s deeply embedded within
uh the code base and so this pull request here is a start of an idea of how
to begin replacing that and digging that out um i don’t expect but i mean i think
it’s only the beginning it would take a huge amount of work uh and also caused some backwards
compatibility problems to completely migrate to this new structure this is something
it’s a very long-standing feature request uh probably going back 10 years if you look at the issues on github
so and it seems now that someone is very actively working on it and lots of other people are interested
in reviewing it so i’m hoping this is going to move forwards listen american
okay so i’m not quite as prepared as oscar and aaron and so i don’t have a particular pr but i’m linking to a
project um called pine which is the python for nuclear engineering toolkit and pine is doing a development sprint
this week i think because they’re trying to prepare for an upcoming release they haven’t done a release for a while
um and so they have a bunch of pull requests that are all going in or that have been submitted in the past few days like their their cadence has really
upped in the past couple of days because of this so i’d like to give them a shout out because uh you know we all need to do
some release sprints every once in a while and um i want to give them some props
for that so great job python producer engineering toolkit awesome well thank you everyone for
sharing that uh we’re not going to jump in and give a bit of context and a few details about what senpai really is and
a bit about the history of simpai so sinpai is a python library for symbolic mathematics it aims to be an inter an
alternative to systems such as mathematica or maple while keeping the code as simple as possibly possible and
easily extensible it has around three thousand seven thousand three hundred stars on github a million downloads on
pi pi uh and 141 dependent packages uh three and three thousand two hundred uh dependent
libraries according to libraries.ios so it is a very popular project i’m sure everyone’s heard of it uh so let’s dive
right in yeah so can either of you tell me who started the project and why um and what
need fills within the ecosystem yeah so the project was originally
started by andre tertek i think around
2005 maybe um and uh you know he he originally started just
to help him do some of his work for his physics uh graduate work
uh but it sort of took off as a lot of different people have
picked it up and contributed things and basically any any time that you want to do sort of symbolic
mathematics and that’s you know any field of mathematics it’s a
pretty standard thing to use so senpai supports pretty pretty wide
range of use cases pretty pretty much any sort of area of science
can make use of it just because any anytime you’re doing math uh it can be useful
uh it can be useful just as like a calculator to help you like solve your problems but it also can be
useful um to actually as like a like a stage and like a scientific
workflow where you for example uh will take your problem and use senpai to
sort of generate some code for example or you know
all sorts of different things like that excellent and i want to give a little shout out because andre was on open
source directions a few episodes ago in our fortran uh episode so if any of you
want to like see the true connection here you can go back and listen to that episode too sure and i just want to quickly remind
everyone that we will be answering questions towards the end of this webinar so if you have any questions
then please just ask them in the chat and we’ll be answering those later on so i’m interested to know can you tell
me a little bit about the the history of the name and also the logo
um i mean the name senpai is not as interesting as
you might imagine so sinpai is short for symbolic python um so it’s a library that’s written in
python and used from python and it’s for doing symbolic manipulation so i guess in that sense it’s analogous to numpy
which is a library for numerical calculations uh the logo is
i’m trying to picture what the logo is now it’s a snake wrestling some equations yeah
uh you can buy these shirts uh num focus has a store where you can uh you can buy a merch with
logos from the various projects and the the um
the profits from that actually go back to the pro the projects if you want to do that yeah so the logo was actually created by
one of our contributors um back when the project started uh he’s a guy named
frederic johansson who’s also the creator of mp math which is a library that senpai uses to do
arbitrary precision numerics and yeah i don’t know it’s a it’s a
snake wrapped around a box with some different math symbols on it so
i like it a lot of the logos out there yeah it’s a very nice logo and you know
you can get like also t-shirts from the shop or you could get a mug maybe you want to have a
senpai mug i don’t know aaron’s got a pretty much uh the standard kind of
yeah i feel like this is a little bit of a detraction but aaron is also a very cool mug he’s drinking a beverage out of
today that uh we can give a shout out whoa condo forge
very cool it’s like multiple layers of open source coolness today so i’m into it um
okay so can you either of you tell me i’ll go back a nice segue here can
either of you tell me if there are alternative projects out there specifically i think in the python
ecosystem because you mentioned that it’s an alternative to mathematica or maple within like larger
sort of um package larger package ecosystem
yeah so uh probably inside of python itself the the most common alternative that you would
think about is sage um and sage sage works a little bit differently than
senpai in that um it’s sort of designed to be more like a mathematical or maple where it’s like a
sort of an end-to-end application that you use and the way that sage works is that it
actually takes pretty much all of the open source uh mathematics libraries
that are out there so there’s like maxima gap it actually includes senpai itself
and it combines them all together into one sort of unified package and you can interface with it through python
and so the way that the senpai senpai is kind of unique in python in
that it’s actually designed to be used as a library so you can install senpai just the same
as you would any other python library like you know numpy or pandas or
anything like that and you can you can import senpai from within a script if you don’t necessarily have to use it
interactively but yeah i’d say within python it’s
mostly sage outside of python obviously in the proprietary world mathematica and maple are the biggest
but there’s also a few open source uh like maxima axiom uh
i don’t know if oscar can think of any others that are popular no um i mean there is also sim engine which
i don’t know so much about but yeah i should mention sim engine as well yeah so sim engine andre
chertech the person who started senpai has also started another project called sim engine which is a c plus
uh symbolic library and the one of the goals actually is to make it so that sim engine can be used as a an optional
back-end instead of senpai to make it faster cool okay so what technology is it built on
senpai yeah so senpai is built uh it’s pure python so
uh it doesn’t doesn’t have any uh compiled code or anything like that and we only have one
hard dependency and that’s mp math which i mentioned earlier so empty math is a library that does arbitrary precision
numerical functions and so outside of that everything is
implemented in simplify itself there there are a lot of optional dependencies so for example if you want to do
plotting in senpai senpai will use matplotlib to do plotting
or for example if you want to interface with numpy or scipy
senpai has a lot of functions to do that as well okay great so both of you mentioned in
your introductions that you both helped uh maintain senpai can you tell us a little bit about who else maintains the
project um so i guess they’re
uh i don’t really have a list anywhere but there are probably maybe 10 people
who are regularly very actively contributing to sempai but there are many other people who contribute more
occasionally so in terms of maintainers so i’m the release manager
at the moment and i’ve been doing the last few releases previously that was aaron
for a long time doing the releases there are different people maintaining
different parts like the there’s various websites like senpai live
for example and senpai gamma and so on um i don’t know aaron just is there any
other maintaining um well so i guess another thing i would
mention is we we regularly participate in google summer of code uh which for people who don’t know every
summer google has a program where they pay college students around the world to
write code for open source projects and so every year we have around maybe five to ten different
students working on senpai different senpai projects and so actually quite a
quite a bit of the code that’s in senpai is actually come from google summer code and actually i myself started in the
project back in 2009 as a google summer code student
so and quite a few of those uh google summer code students will then go on to
become regular contributors after the program ends as well
so cool this is like an amazing community uh community building thing that you’ve got going and the fact that
you joined in 2009 from google summer code that’s just such a great story and it’s grown to be such a popular
project and there’s a million downloads on pie pie like i said uh but can you tell us a little bit more about what
would draw someone to uh use simpai
uh yeah so um i think like i said there’s there’s quite a few
different sort of use cases so senpai probably has about i don’t know maybe 20 different sub
modules for different areas of mathematics um and so like the most common things
are probably sort of like the solvers things like doing
calculus like integration differentiation but there’s also a lot of sort of i guess more niche sub modules
that are used uh they’re used regularly but not by everybody so there’s things for example
there’s like a physics sub module that has some uh mod some modules to do work
for different areas of physics like mechanics or quantum physics
there’s a group theory module and so different some people just use it to like
you know help them do their coursework if they’re students some people use it to do uh it it goes from there all the way to
doing like you know real science like uh research where uh um a pretty common use case
is that sort of scientists will use is this code generation thing where
the basic idea is you can take a senpai expression and generate code
to a fast language like c or fortran that represents that expression and so
what you can do uh the general workflow is you you sort of use senpai to model
whatever it is that your uh your problem represents site like and you can use all the you
know computer algebra facilities you can take derivatives you can you know solve equations but then once
you actually have whatever it is you’re trying to model you can then generate very fast code to
numerically evaluate that and so senpai sort of lets you have kind of the best of both worlds where
you can actually have a mathematical representation of what you’re doing but then also uh do it numerically as well
this is excellent i and thank you for giving so much good background uh for senpai for everybody
listening i think this is really uh exciting and helpful so um yeah and so okay to like build off
of this so you talked a little bit about different use cases of senpai what communities do you see your users
and contributors come from are they different are they sort of similar that their users contributing stuff because
you know google summer code means that they might not be necessarily prior users of senpai either
there are lots of different uh groups of contributors sorry could you not produce users of simple so as aaron mentioned uh you
might have students for example using senpai um and you might have people who are
teaching using simple using simple as part of their teaching and all the way through to people doing
research um so generally speaking people are coming from apart from the students i’d say it’s
people coming from the scientific python side of things so it’s the same kind of people who would be using other
libraries like numpy or scipy or pandas or all those kinds of things senpai is part
of that package and often people install those things all as one using something like anaconda
and so it tends to be the same kind of views as all of those things but at the higher end you have
people who are building tools out of simpai uh either to streamline
analytic techniques in in research uh or as part of researching on
uh symbolic mathematics itself um but then right down at the other end you just
have people just using it just to do a quick calculation
awesome and it seems like you’ve got such a big contributing community which we discussed before but is the project
participating in any diversity or inclusion efforts
uh yeah so um we we uh as far as uh we mostly have uh and i
guess have a lot of inclusion sort of uh things with like i mentioned we uh we
do google summer code which is a worldwide uh
thing so it’s any student from anywhere in the world can participate in that um
we have we have a pretty strong effort to be able to onboard new contributors so
we have a lot of sort of documentation on how to start contributing and we try to welcome
new contributors so we actually have a pretty a pretty long tail if you look at our
list of contributors we actually have a pretty long tale of people who we obviously have a lot of people who’ve
done a lot of contributing contributions we also have quite a few people who’ve only you know done a few contributions
um and if you look at our say our pull request list you’ll see quite a few people who
are contributing um another thing that
excuse me another thing that we’re being involved in is google season of
docs which is a new program that google has started kind of similar to google summary code
but unlike google summer code which takes college students and pays them to write
code google season of docs takes technical writers and pays them to
improve documentation for projects which has
been something that a lot of open source projects kind of really need help with
and so last year we participated and we had a technical writer
lauren glattley and she helped us by creating a style guide for our
documentation so that our documentation can actually conform to a uniform style
and we’re actually going to be participating again this year but unfortunately i can’t say much yet now
because the technical writers haven’t been announced yet so i believe that’s going to be happening this weekend so
stay tuned to senpai mailing list or supply twitter for more information about that yeah
perfect timing now everybody can be eagerly anticipating this big google summer of dax uh announcement yeah
definitely all right well there but as mcdean said thank you so much for giving us such great details about senpai uh
for everyone listening we’re now going to shift into the project demo section uh so we’re going to see some of the
really cool features of senpai and we’re going to see how it works for everyone who’s listening so while aaron and oscar
getting set up we’d like to take this time to thank quansite for sponsoring this episode of open source directions
consigt creating value from data so aaron and oscar you ready take it away
ah here we go so uh this is the pull request i was talking about by the way
i’m going to just start off by showing just some basic uh senpai just what it is for
people who don’t know and then i i think oscar is going to show something a little bit
uh more specific some of the new features that are coming out ooh exciting i can’t wait
yeah and so uh so here’s a jupiter notebook uh senpai so
if you’re just using senpai interactively as a calculator you can just run from senpai import star
uh and so just to um just to give you an idea of what senpai is if you if you normally use a library
like numpy or even the standard library math library
those are numeric library so for example if i do import numpy and i take
just use like the numpy square root of say 8 here i’m going to get a numeric answer here
the way that senpai is different is the senpai square root it works symbolically so instead of getting this
numeric answer i get this unevaluated like square root of two expression here
um and of course the real power of sin pi is because is that you can also use like variables as well so if i’m going
to just define a few variables here um and so you know i can take i can make symbolic expressions here
um and so sort of some of the standard things is you can you can solve equations so uh i don’t know say x
squared plus three x minus two say solve that for x
uh and then oh i actually let’s use soft set here and so uh
the other thing you might have noticed is that if you’re actually in uh jupiter notebook senpai expressions will
automatically render in this nice uh latex form here so it’s really easy to
read them uh and so uh some other examples uh you can you can take derivatives so uh
let’s say like sine of x times e to the x here there’s a derivative of that
i can i can take this uh expression that i got out of that
so let’s let’s actually like uh i’ve actually assigned that to a
variable and so now i can take this now and uh integrate it
get back the original expression that i started with um
yeah and so uh uh there’s basically uh if you if you
look at uh senpai here so uh actually i don’t know how i would
necessarily show that um maybe i can just do like uh this
oh geez well i don’t know about you but i can’t really read that uh
uh these these are all the libraries that are included in uh senpai
it’s a little unfortunate that this is a blue on black here but
you can just get an idea of all the different sorts of mathematics that are available so there’s number theory
physics as i mentioned polynomials uh integration solving equation solving
probability uh and so uh yeah uh
i i guess one thing i’ll also show that is because i mentioned it is this code
generation so for example we have a function called c code uh this takes an expression and converts
it into a uh c so let’s take let’s just take this
example here so here’s here’s an expression uh absolute value sine of pi
pi times x and so this function c code will
make this expression and spit out uh this expression as uh c and so if you
take this now and put it in a c uh program it’ll execute this as uh
numeric and this is really useful because uh you know sometimes you’ll be using senpai for instance and
you can very easily generate expressions that are pages and pages long and you would never
want to hand write these into like a program
and it’s actually pretty common in many applications to end up with these kinds of expressions and this code generation lets you sort
of make a pipeline that that does everything automatically uh and so
another another example is here’s the same expression in fortran um
and then i think the last thing i want to show here we also have like a dozen other languages that we support
the last thing i want to show is some of the numpy integration so there’s this function lambda phi
uh which what what’s this what this does is it takes an expression and it turns it
into a function that can be evaluated on a numpy array so let’s say numpy um
let’s say 1 space say negative 10 to 10 here
so now if i take this this function here i can now evaluate it on
this numpy array and so for example i can now uh
plot it so let’s see if i can plot uh
a live demo without messing it up i believe we have to do map plot live inline
so oops let’s do that tlt.plot uh
there we go uh i should probably include a few more points in this
array so that it actually shows up nice and so if
this uh if you’re just working say with numpy uh you can uh still use senpai to generate
your expressions and then very easily convert them into the equivalent numpy function using
lambdafi so i think with that i’ll head it over
to oscar awesome thank you okay so i’ll just try and share my
jupiter notebook one moment
i like this we’re getting a double demo today multiple layers of demo
so can you see that now loudscreen yeah so this is uh so what i wanted to talk about
something that’s new right now that’s being worked on by one of our google summer of code students
uh and this is what’s the the routines that senpai uses for solving systems of
ordinary differential equations so ordinary differential equations are called odes for short and they’re very
common in many different areas of science and maths and so just to show
what an ordinary differential equation looks like the idea is that we have things that are functions here x and y
and z of some other variable which i call t here which usually means uh time in in
most applications and if i just print out what the equation looks like
and then we can see here we have dx by dt equals t squared so that’s a very simple
differential equation and simpi has a function d solve which can solve that
so it can find a function x x of t that will be a solution of this and so in this example we get
x is t cubed over three plus a constant c1 so this that part of sympathize world
develops has been there for a long time for solving a single or no differential equation
but then there’s also a part of the code base that is for solving systems of ordinary differential equations and so
if i show an example here so this these two differential equations would
be a representation of for example projectile motion so if i was to throw a ball in the air
in a two-dimensional world then there would be no horizontal acceleration
and there would be a vertical acceleration that’s given by the rate of gravity
and so we get this kind of pair of differential equations of x and y in this case it’s relatively trivial
to solve the two separately um but actually until recently simpli
didn’t have that well i think in fact in simply 1.6 it’s not possible to solve this pair of equations using g solve
but that capability has now been added as part of this google summer code project
and so just as i was building up this workbook i saw that these answers should be a bit simpler than this so
um we’ll see about finishing that up as the google sum of code project draws to an end
um but i just want to explain something about how this works and the previous code for solving systems of ordinary differential equations
has something like 30 different special cases which is an attempt to
enumerate all the different kinds of systems of differential equations that there might be
and provide a solution for each of those kinds and i was quite surprised when i saw that originally because
it’s anyone with experience of working with differential equations will know that there is no way to enumerate all
the different possibilities um so instead uh what our google summer
coaching milan julie has been working on is building up general generalized
soldiers that can work uh in in much more situations which means that
many things that would have been that should really be quite trivial so someone who knows anything about
differential equations would easily be able to solve this system of differential equations but actually in simple 1.6 you’ll get an
error because it’s not possible to solve a second order and a first order differential equation at the same time
but so this is just a quick demonstration of the kind of thing so i should say that this code here is uh this is not
even the master branch this is actually a pull request that is still being worked on and hasn’t been merged
um so there’s there’s the capability to solve systems with mixed order um and then we have another system here
so what we have here is a system with where we have two equations that are linear and a third that’s non-linear
and milan has built the capability to be able to solve the two linear equations and then use them to solve the nonlinear
equation and so these are just a couple of quick examples but what i think this actually means now
is that we really do have uh or we will have in the next release uh a solver that is
capable of solving most standards uh not the especially complicated but most standard systems of differential
equations so i’m very excited to see that come through but as i said it’s not it’s not finished it should be in the next
release 1.7 very nice so thank you both for sharing that that’s great to go through that one
thing i just want to mention is uh oscar mentioned that’s the single differential equation solvers have been there a while
that’s actually the thing that i worked on uh when i was a google summer code student 2009 so
wow so many layers coming back
well thank you for sharing yes and i just want to quickly remind anyone if you have any questions then please ask them down in the chat below i just saw
tasha asked one so thank you tasha i will get to that in the next section but now we’re going to move into the roadmap
discussion and we’re going to be talking about uh where senpai’s at but mainly where senpai is heading
so aaron and oscar can you tell us a bit more about the the future directions of senpai please
um okay well so uh we do have a roadmap i i don’t have it ready to share actually after future
directions of senpai um there are some major ongoing projects so it’s one thing
that often uh gets asked about is the assumption system so assumption system is a major part of a computer
algebra system like senpai and many years ago senpai had the old
assumptions uh and then uh i mean aaron would know the history of this better than me
then someone created the new assumptions so we had two separate systems for doing assumptions
and then i think that’s something like 10 years ago during which time uh we still haven’t
figured out actually how to use the new assumptions or or how to combine them together so this is a major
ongoing project there was a lot of progress last year but the the future direction is still
not entirely clear to me so that’s that’s but we we know that something needs to happen with that so that’s
that’s one part of the one part of the robot another part i would say um
is so that there are some uh there was there are some significant
weaknesses in the documentation for senpai and that’s a major thing that we’re working on now so aaron worked quite closely with
google summer of docs when we had lauren last year to produce the documentation style guide
that now needs to be applied all across the documentation for senpai
so actually that that project was just about defining the style guys and just applying it in a few places as examples
uh it’s now a major major piece of work to go through all of the documentation and reformat it in this way
also we really need to i think uh reorganize the documentation at a high level and and rewrite many of the
different sections of it and expand on lots of things so i think to me that seems like the most
major thing that i see that we are working on and should be working on that’s probably going to have the
biggest impacts for our users there are other long-standing issues internally within
senpai that’s quite hard to explain really without going into a lot of detail
um but so i think in some ways senpai is its code base has grown and
it’s been very useful um and people have built lots of things on top of it but there are various places
where it’s creaking a bit around the edges and we really need to make some deep changes
in inside of simply in order to progress on some things and that’s that’s the example of the pull request that i
showed earlier which is to change the way the functions function is a very basic thing which has changed the way
that those are implemented it’s a very long-standing project and there are i think i see quite a few of those coming
up now although they’re hard to explain in full detail um aaron did you want to
yeah so i put i put a link to the road map and also the style guide in the chat if people want to take a look um
i think i agree with oscar that those are definitely some of the most important things we have a couple other
things here on our roadmap too that for example performance is something
that’s always important for senpai uh just making it so that things run faster
and then as i mentioned one one of the potential ways that we can do that is by
integrating senpai more closely with sim engine which is a new c plus plus
symbolic system that’s designed to be very fast um
another one that i just want to mention uh is just sort of general sort of
broad algorithmic improvements of different symbolic algorithms
there’s especially a lot of sort of sort of high highly mathematically
technical sort of algorithms that it would be nice to have them implemented which
if you just sort of learned about them directly you wouldn’t think that you know like who cares about this other
than like some pure mathematician but it actually it actually kind of like
ends up layering up onto things and and so some of the functions that you would you would actually end up using like
things like solve or integrate um can actually make use of these and it’s actually kind of hard right now for
certain things to work properly without having some of these algorithms implemented so uh it would be nice to uh
get more work there where’s a good place for a new new contributor to come where’s a good place
for them to start or what should they start working on uh well they should they should work on
whatever is interesting to them like i said there’s a lot of uh a lot of sub modules in senpai we have a uh easy to
fix label on our issue tracker uh which you can look at to sort of get some easy
bugs uh if you want to look at those um we do have a a new contributor guide as
well which i’ll uh i’ll put a link to it in the webinar chat as well for that uh
but yeah i would just uh my recommendation is always just uh you know work on uh the parts that are interesting to you
the parts of of mathematics that uh you know a lot about or you want to learn more about um are definitely the best
definitely the best way to go especially if you’re if you sort of have an expertise in something that most people wouldn’t we definitely love to have
people who have domain expertise on these different areas because like uh oscar and i probably even
between the two of us like there’s still just tons of parts of senpai that we can’t really even contribute to because
we just simply don’t know the mathematics uh there’s just so much there uh
actually oh uh you you can go and i’ll ask my question oh sorry i was just gonna say
if someone is looking to contribute we are not short of open issues on github which you can
look through i’m sure there’s hundreds of thousands
yeah so i actually have a question i think that uh because you’ve talked a lot about sort of these um
like very sophisticated mathematical algorithms that senpai is using and building on
do you include a lot of documentation on the specific algorithms for each sub module then and is that part of your
documentation push or is that more um if you’re going to get involved in developing that that you kind of need to
specifically look through the code to understand what the what the math is behind it
uh i’d say there’s probably less document like internal documentation like that
um depending on how technical things are you might end up having to go like read some papers uh and things like that uh
oh great uh there are some algorithms in senpai that are basically just implementing an
algorithm from a paper so if you need to if you want to work on it you have to go read the paper
but there’s other things where yeah you know the easiest way to understand what’s going on is just read the code
the read the comments and the code um you know we try to try to make the
code as easy to read and as possible so that it’s easy for
anyone to go in and and improve it yeah that’s an ongoing uh struggle i
think in a lot of projects right trying to make it um easy but to
to read but also you know like clearly sophisticated and following
good algorithmic um processes
so i guess actually related to this though are your is your season of dachshund more improving your
user-facing docs as opposed to internal documentation and is it specifically uh
for those those types of use cases uh well so we’ve got uh
pro we’ve got project ideas for sort of both of those actually um
and uh okay sorry it didn’t mean that they can reveal also i mean if if if
you’re a tech writer or if you know a tech writer who would be interested in participating in the future we definitely want people who uh we we
want to improve like all areas of our documentation when our our tech writers for this year
are announced uh in a couple of days i guess we’ll find out more about that um yeah like i
said watch watch our mailing list or twitter we’ll make an announcement about that yeah i’ll be sure to do that i’m sorry i
was asking the documentation questions because i’m excited to hear about your your doc’s push i think that’s very cool
i think a lot of open source projects need to follow your lead because there’s no documentation is very very important
uh but thank you very much for sharing that uh senpai is such a great community and it’s obviously got such a great set of maintainers too and people who look
after the community so thank you for your efforts we’re now going to head into uh answering a few of
these questions so thank you very much for answering uh asking questions throughout the episode uh we’ll now get
to the memory can you kick it off yeah sure so our first question is from tasha kim and tasha asks would you be able to
demonstrate some of the geometry modules sub modules for us
sorry this is like an impromptu demo and if you if you don’t feel
comfortable sharing it that’s totally okay you can direct to a documentation or something
i have to be honest i’ve literally never used the geometry i i haven’t used it very much either i
mean i can try uh i i certainly uh i’m open to giving it a you know a college
try here okay yeah hold on let me let me actually
see if i can yeah we’re keeping you on your toes yes
really tasha is i think one of our uh first
um viewers in my history on open source directions to
ask for uh an additional demo so
clearly you’re both a demo um yeah well expert yeah
that you gave both of you i also i also haven’t really so i i don’t i guess something i can show also is our
documentation here um so uh one of the features in our documentation
is it integrates with senpai live so if i click this little button here this will pop up and actually run the example
here on the side here um and so
yeah as far as my understanding uh and you can actually see some of the the um
formatting errors in our documentation that we need to fix uh uh an example here uh so
i think the sort of the key uh uh things here are like uh things like
points uh lines circles uh so if i take uh
let’s just do from senpai geometry import everything uh
i don’t actually know how to make a circle
i guess a circle is an ellipse this is already
here we go circle yeah so to make a circle oh i guess it just has a center and a radius
and uh i think i can make a line say maybe connecting
point uh i don’t know 0 0 to
uh let’s see and i literally i don’t know if this is gonna work but
let’s see if we can intersect the circle with this line oh there you go uh and so
yeah here’s a circle that centered at zero zero with radius
five um not really sure i don’t think that one’s in the line is
it or is this an infinite line oh yeah so i think lines are infinite uh
yeah line uh to make a uh yeah so lines uh this is sort of like uh euclidean geometry so a line is an
infinite line i could also make a segment i believe a segment would actually just be the the
uh the le the part that connects these two points so if i instead do c1 dot intersect
with this segment uh just get this one point so yeah
cool uh and i don’t know if you have any any other specific questions with the
geometry module which i may or may not be able to answer because uh yeah this is
i certainly i mean i know the mathematics behind geometry obviously at least the basics uh
but i haven’t actually made much use of it myself uh there’s some other people who
contribute to geometry pretty heavily uh okay awesome well thank you very much
for sharing that okay the second question is could you tell us a little bit more about the recent discussions on
seps and simp peb uh yeah so
i mean this is a thread that i started on the senpai mailing list proposing the idea of seps
although later on we i think we decided that simpek was a better name so the idea for this is something
sort of analogous to peps that we have in core python so pep is a python enhancement proposal a lot of people
know for example pep 8 but there are many many different peps and it’s quite common in core python if
you want to make a major change then you’re expected to write a pep and there is a
process for arguing about making changes to improving the pep and then ultimately
accepting or rejecting it um so i was imagining something much more informal for senpai
but perhaps more related to what we were talking about with internal documentation earlier on um i was
imagining that for making major changes in senpai and as i think there are some deep changes
that need to be made um i think it’s important that we can get everyone to firstly just understand
what a proposal is so how would this thing change and what would you have to do and how
would that affect the different parts of the code base but also to get agreement on this
before implementing something that could take a long time potentially years for some of the things that need to be done
um so i was just suggesting the idea that maybe
we could start building up a body of sim peps which are documents that describe
changes that we want to make in simpai particularly where they are backward not backward compatible so we’re going to
have to break people’s code potentially in some changes and where it’s a major change that cannot be done
in a single pull request or perhaps even by a single person and it would take a long time so that so
i suggested that on the mailing list and it seems like uh people are broadly think it’s a good idea
um but then we need to come up with the detail of how we actually want that to work for simpo
so i don’t think we want a big formal process as there is for core python’s peps
but there needs to be some sort of way of deciding when you think that something is agreed
uh or that something is projected somehow so we need to think about that in more detail
um aaron did you want to say anything about that yeah so i think uh there’s a few other
projects in the scientific python ecosystem that have uh
pep like processes so i think numpy has uh naps and matplotlib has
and peps i think they’re called uh and so we our our current plan is to sort of look at how
some of these other projects do things and see uh you know what what sorts of things what processes uh would make
sense for senpai uh in there so if you have any thoughts uh um
or any uh feedback on how you think we should do things we definitely wanna hear uh what people in the community
think great well thank you very much for answering those questions and thanks to everyone who asked them uh we’re now
going to move on to our famous world famous rant and rage section where where it’s going to sit down on the soapbox
and get it either rant or rave about any topic you like so aaron you want to kick
it off uh yeah i guess i’ll kick it off so i
think uh the last time i was on open source directions i did a rant so
uh this time i’m gonna do i guess a rave uh uh talk about something that i i
really like um and so the thing that that i’ve been really really enjoying lately um
is this library called hypothesis and so for those who don’t know hypothesis is a
library a python library it’s a testing library and it’s what’s called a
known as a property testing library so the way that hypothesis works normally when you write your tests say
you have some function uh you’ll take a bunch of inputs for that function and you’ll say something
like you know my function on this input equals assert that my function on this input equals this output uh and then you
know do that for a whole bunch of different inputs and outputs and that’ll be your test uh the way the hypothesis test works uh
is a little different instead of coming instead of coming up with a bunch of inputs and outputs instead you sort
of write your test and sort of tell it what sorts of things you want to be true
about your function so for example say i have a function that computes
the square of a number so i might have a test that says like you know assert that the result of this
function is positive or you know something like that uh and then what hypothesis will do
is you actually just all you do is tell hypothesis what sorts of inputs your function will take so for example you
might say you know my inputs are going to be integers or my inputs will be like a list of integers or a list of floating
point numbers and hypothesis will automatically generate inputs to your function that go through
the tests that you’ve written and it’ll basically sort of intelligently try to find an input that fails your test for
you and so the reason this is cool is because you can you can sort of use this to find
failing test cases that you would never find on your own because uh there might be
some weird corner case that you didn’t even think about or there might be a whole lot of different sort of
combinations that are hard to sort of enumerate by hand and hypothesis can basically as long as
you can write a test that tells that detects sort of the higher level
properties that you want to hold true hypothesis we’ll
find those for you and it’s it’s an extremely pleasant library to work with uh so we don’t use
it yet with senpai there is an open pull request to start trying to use it but i’ve been using it with some other code that i’ve
been working on and i highly recommend it great awesome thank you for sharing and
oscar uh yeah so aaron went for a rave so i’ll go for events um
i spend a lot of time uh having discussions on github to do with simpo
and something i do very commonly is copy from the ipython terminal into
github uh you know and that’s that’s quite nice because senpai has a way of doing equations in text and that text
can go straight into github and you can sort of see it without me having to do any screenshots
there’s a bug in ipython which has been there for at least two years now
which means that when i do that after every command that i have typed it
inserts about 100 space characters and
you can’t see the space characters uh but it does it does cause my code window to have a little scroll bar
which shouldn’t really be there and it’s kind of distracting and because this happens
often many times a day uh it’s just it’s kind of a constant small annoyment for me
that i can’t work out if i’m petty enough to actually delete the spaces which takes a small amount of time
and i feel stupid about it if i don’t delete the spaces because then i’m just annoyed that i’ve left them there
that was an amazing rant i love it that’s great um my uh rave today is not as interesting
as previous weeks but i’m gonna rave about my cat uh she’s sleeping right now but she’s the only thing getting me
exactly my rave i want it around a bit i rave about everyone um
at quansite and open teams like i just feel so fortunate working there and for anyone that is i guess listening or or
works there they’re just the most lovely group of people and ever since i met them they were so welcoming and
will help at the drop of a hat and so that’s what i wanted to to rave about today but uh that’s all we have time for
today sadly everybody thank you all for watching and thank you for listening you can find us on twitter at open teams inc
and at quansite ai aaron oscar where can people find you and senpai
well we have a simple mailing list that’s the normal place to talk about these things
yeah we also have a senpai twitter account um and i also have a twitter account i’m uh asmur
on twitter uh and yeah uh i think i saw you talking about
hypothesis on twitter very recently is that right oh yeah uh i probably was
yeah well if you like what you saw today then please go to our youtube channel and
like and subscribe to see more content like this so we’re looking forward to you joining us next week so yeah so join
us again next week for some pi mc hammer time all right thank you everybody