Planet Sagehttp://planet.sagemath.org/atom.xml2017-06-25T21:30:08+00:00Planet/2.0 +http://www.planetplanet.orgRethinkDB must relicense NOWtag:blogger.com,1999:blog-6365588202025292315.post-67581589874677010942017-06-01T13:25:01+00:00<h2>What is RethinkDB?</h2><div><i><b>UPDATE:</b> Several months after I wrote this post, RethinkDB was relicensed. For <a href="https://github.com/sagemathinc/cocalc" target="_blank">the CoCalc project</a>, it was too late, and by then we had <a href="http://blog.sagemath.com/2017/02/09/rethinkdb-vs-postgres.html" target="_blank">already switched to PostgreSQL</a>. </i></div><div><br /></div><div><br /></div>RethinkDB is a <strong>INCREDIBLE</strong> high quality polished open source realtime database that is easy to deploy, shard, replicate, and supports a reactive client programming model, which is useful for collaborative web-based applications. Shockingly, the 7-year old company that created RethinkDB <a href="https://rethinkdb.com/blog/">has just shutdown</a>. I am the CEO of a company, <a href="https://cloud.sagemath.com/">SageMath, Inc.,</a> that uses RethinkDB very heavily, so I have a strong interest in RethinkDB surviving as an independent open source project.<br /><h2 id="three-types-of-open-source-projects">Three Types of Open Source Projects</h2>There are many types of open source projects. <a href="https://github.com/rethinkdb/rethinkdb/graphs/contributors?from=2015-09-10&to=2016-10-10&type=c">RethinkDB was</a> the type of open source project where most work on RethinkDB has been fulltime focused work, done by employees of the RethinkDB company. RethinkDB is licensed under the AGPL, but the company <a href="https://www.rethinkdb.com/faq/">promised to make</a> the software available to customers under other licenses.<br /><br /><strong>Academia:</strong> I started the <a href="http://sagemath.org/">SageMath</a> open source math software project in 2005, which has <a href="https://trac.sagemath.org/">over 500 contributors</a>, and a relatively healthy volunteer ecosystem, with about hundred contributors to each release, and many releases each year. These are mostly volunteer contributions by academics: usually grad students, postdocs, and math professors. They contribute because SageMath is directly relevant to their research, and they often contribute state of the art code that implements algorithms they have created or refined as part of their research. Sage is licensed under the GPL, and that license has worked extremely well for us. Academics sometimes even get significant grants from <a href="https://groups.google.com/forum/#!topic/sage-edu/9FP4mR_Pjbc">the NSF</a> or <a href="http://opendreamkit.org/">the EU</a> to support Sage development.<br /><br /><strong>Companies:</strong> I also started the <a href="http://cython.org/">Cython</a> compiler project in 2007, which has had dozens of contributors and is now the defacto standard for writing or wrapping fast code for use by Python. The developers of Cython mostly work at companies (e.g., Google) as a side project in their spare time. (Here's a <a href="https://mail.python.org/pipermail/cython-devel/2016-October/004948.html">message today about a new release</a> from a Cython developer, who works at Google.) Cython is licensed under the Apache License.<br /><h2 id="what-rethinkdb-will-become">What RethinkDB Will Become</h2>RethinkDB will no longer be an open source project whose development is sponsored by a single company dedicated to the project. Will it be an academic project, a company-supported project, or dead?<br /><br />A friend of mine at Oxford University surveyed his <strong>academic</strong> CS colleagues about RethinkDB, and they said they had zero interest in it. Indeed, from an academic research point of view, I agree that <strong>there is nothing interesting about RethinkDB</strong>. I myself am a college professor, and understand these people! Academic volunteer open source contributors are definitely not going to come to RethinkDB's rescue. The value in RethinkDB is not in the innovative new algorithms or ideas, but in the high quality carefully debugged implementations of standard algorithms (largely the work of bad ass German programmer Daniel Mewes). The RethinkDB devs had to carefully tune each parameter in those algorithms based on extensive automated testing, user feedback, the Jepsen tests, etc.<br /><br />That leaves companies. Whether or not you like or agree with this, many companies will <a href="https://www.google.com/search?q=google+agpl+will+not+touch&rlz=1C5CHFA_enUS691US691&oq=google+agpl+will+not+touch&aqs=chrome..69i57j69i64.4391j0j7&sourceid=chrome&ie=UTF-8">not touch AGPL licensed code</a>:<br /><blockquote><em>"Google open source guru Chris DiBona says that the web giant continues to ban the lightning-rod AGPL open source license within the company because doing so "saves engineering time" and because most AGPL projects are of no use to the company."</em></blockquote>This is just the way it is -- it's psychology and culture, so deal with it. In contrast, companies very frequently embrace open source code that is licensed under the Apache or BSD licenses, and they keep such projects alive. The extremely popular PostgreSQL database is <a href="https://www.postgresql.org/about/licence/">licensed under an almost-BSD license</a>. MySQL is freely licensed under the GPL, but <a href="http://www.mysql.com/about/legal/licensing/oem/">there are good reasons</a> why people buy a commercial MySQL license (from Oracle) for MySQL. Like RethinkDB, MongoDB is AGPL licensed, but they are <a href="https://www.mongodb.com/community/licensing">happy to sell</a> a different license to companies.<br /><br />With RethinkDB today, the only option is AGPL. This very strongly discourage use by the only possible group of users and developers that have any chance to keep RethinkDB from death. If this situation is not resolved as soon as possible, I am <strong>extremely afraid</strong> that it never will be resolved. Ever. If you care about RethinkDB, you should be afraid too. Ignoring the landscape and culture of volunteer open source projects is dangerous.<br /><h2 id="a-proposal">A Proposal</h2>I don't know who can make the decision to relicense RethinkDB. I don't kow what is going on with investors or who is in control. I am an outsider. Here is a proposal that might provide a way out <strong>today</strong>:<br /><br /><strong>PROPOSAL:</strong> Dear RethinkDB, sell me an Apache (or BSD) license to the RethinkDB source code. Make this the last thing your company sells before it shuts down. Just do it.<br /><br /><br /><a href="https://news.ycombinator.com/item?id=12680444" target="_blank">Hacker News Discussion</a>William Steinnoreply@blogger.comhttp://sagemath.blogspot.com/SageMath GSoC 2017 Projectstag:blogger.com,1999:blog-3473399517246044360.post-53044909951051119732017-05-05T18:03:53+00:00<div dir="ltr"><h2><span>6 GSoC SageMath Projects</span></h2><span>During the past couple of summers, SageMath successfully managed many <a href="https://summerofcode.withgoogle.com/">Google Summer of Code</a> projects. This year we are again <a href="https://summerofcode.withgoogle.com/organizations/5790079692832768/"><b>happy to have six projects</b></a>:</span><br /><span><span><br /></span></span><br /><h3><span>Implementing matroid classes and plotting improvements</span></h3><span>(Zachary Gershkoff / Stefan van Zwam)</span><br /><blockquote class="tr_bq"><span>This project seeks to implement several common matroid classes in SageMath, along with algorithms for their display and relevant computations. The graphic matroid class in particular will be implemented with a representative graph with methods for Whitney switching and minor operations. This will be accompanied by improvements to the graph theory library, with methods relevant to matroids enabled to support multigraphs. Other modules for this project include improved plotting of rank 3 matroids to eliminate false colinearities, computation of a matroid's automorphism group using SageMath's group theory libraries, and faster minor testing based on an existing trac ticket.</span></blockquote><h3><span>Expanding the Functionality of Dynamical Systems</span></h3><div><span>(</span>Rebecca Lauren Miller / Paul Fili and Ben Hutz)</div><div><br /></div><div><blockquote class="tr_bq">As a member of the sage-dynamics community, researchers have compiled a wishlist for algorithms and functionality they would like added. I would like to shorten the wish list for us.For my project I will be completing some desired additions to SAGE from the Sage Dynamics Wiki. I will implement Well’s Algorithm, strengthen the numerical precision in cannonical_height, as well as implement reduced_form for higher dimensions.</blockquote></div><div><h3>Improvement of Complex Dynamics in Sage</h3></div><div>(Ben Barros / Adam Towsley and Ben Hutz)</div><div><blockquote class="tr_bq">There are three major things that I would like to implement to improve the functionality of Sage in the area Complex Dynamics. The details of the project are summarized in the following list:<br /><ul><li><b>Complex Dynamics Graphical package: </b>Integrate or implement a complex dynamics software such as Mandel into Sage. This will be done by creating an optional package for Sage. If there is enough demand, the package may become a standard package for Sage at some point.</li></ul><ul><li><b>Spider Algorithm:</b> The object of the Spider Algorithm is to construct polynomials with assigned combinatorics. For example, we may want to find a polynomial that has a periodic orbit of period 7. The Spider Algorithm provides a way for us to compute this polynomial efficiently. I plan to implement this algorithm into Sage.</li></ul><ul><li><b>Coercion: </b>If you have a map defined over Q, you should be able to take the image of a point over C (i.e. somewhere you have a well-defined embedding) without having to use the command "change_ring()". Something similar works for polynomials in Sage but it does not work for morphisms/schemes.</li></ul></blockquote></div><div><h3>Linear-time Implementation of Modular Decomposition of Undirected and Directed Graphs</h3><div>(Lokesh Jain / Dima Pasechnik)</div><blockquote class="tr_bq">This project is aimed at providing linear time implementation for modular decomposition of graphs and digraphs. Modular decomposition is decomposition of graph into modules. A module is a subset of vertices and it is a generalization of connected component in graph. Let us take for example a module X. For any vertex v ∉ X it is either connected or not connected to every vertex of X. Another property of module is that a module can be subset of another module. There are various algorithms which have been published for modular decomposition of graphs. The focus in this project is on linear time complexity algorithms which can be practically implemented. The project further aims to use the modules developed for modular decomposition to implement other functionality like skew partitions. Skew partition is partition of graph into two sets of vertices such that induced graph formed by one set is disconnected and induced graph formed by other set is complement of the first. Modular decomposition is a very important concept in Graph Theory and it has a number of use cases. For instance it has been an important tool for solving optimization and combinatorics problems.</blockquote></div><div><br /></div><h3>Modular Decomposition of graphs and digraphs</h3><div>(Maria Ioanna Spyrakoy / Dima Pasechnik)</div><div><blockquote class="tr_bq">Modular decomposition of (di)graphs is a generalization of the concept of the decomposition of (di)graphs into connected components. Its current implementation in Sage relies on badly broken abandoned C code, and badly needs to be replaced by something that works and is not too slow. However, the only open-source implementations of some of these procedures are either in Java or in Perl, and thus aren't really useful for Sage.</blockquote></div><div><br /></div><div><b>Note:</b> A attentive reader might notice the similarity between those projects. They will be split regarding the type of graph and be coordinated to not overlap but to augment each other.</div><h3>Visualizing constructs in cluster algebras and quiver representations</h3><div>(Bryan Wang / Travis Scrimshaw)</div><div><blockquote class="tr_bq">I aim to implement visualizations of several key constructs in cluster algebras and quiver representations. The first is Auslander-Reiten quivers, for at least the A_n and D_n cases. The second is labelled endomorphism quivers and mutations within a cluster category, focusing on the A_n case. The third is posets of down-mutations for the A_n case. These features will be useful not only for research purposes, but also as nice examples to play around with and learn from. Aside from these features, I am interested in implementing features for the Quantum Cluster Algebras project.</blockquote></div><div><br /></div><div>All the best for this summer, thank you to Google for making this possible, and sorry to all those candidates who didn't make it ...</div></div>Harald Schillynoreply@blogger.comhttp://blog.harald.schil.ly/search/label/sageDistributive Lawshttp://sheaves.github.io/Distributive-Laws/2017-02-18T00:00:00+00:00<p>I’ve been participating in the <a href="http://www.math.jhu.edu/~eriehl/kanII/">Kan Extension Seminar II</a>, and this week it’s my turn to <a href="https://golem.ph.utexas.edu/category/2017/02/distributive_laws.html">post about Jon Beck’s “Distributive Laws”</a> at the <a href="https://golem.ph.utexas.edu/category/">n-Category Cafe</a>!</p>
<p>The post uses lots of string diagrams for monads, resulting in pictures like the following:</p>
<p><img src="http://sheaves.github.io/distributive/comp_assoc.png" alt="" title="Associativity of the composite monad" /></p>
<p>See you <a href="https://golem.ph.utexas.edu/category/2017/02/distributive_laws.html">there</a>!</p>Liang Zehttp://sheaves.github.io/A time evolution picture of packages built in parallel by Sagehttp://www.slabbe.org/blogue/2016/12/a-time-evolution-picture-of-packages-built-in-parallel-by-sage2016-12-16T16:13:00+00:00<div class="document">
<p>Compiling sage takes a while and does a lot of stuff. Each time I am wondering
which components takes so much time and which are fast. I wrote a module in my
<a class="reference external" href="https://github.com/seblabbe/slabbe">slabbe</a> version <tt class="docutils literal">0.3b2</tt> package available on <a class="reference external" href="http://pypi.python.org/pypi/slabbe">PyPI</a> to figure this out.</p>
<p>This is after compiling 7.5.beta6 after an upgrade from 7.5.beta4:</p>
<div class="pygments_manni"><pre><span class="n">sage</span><span class="p">:</span> <span class="kn">from</span> <span class="nn">slabbe.analyze_sage_build</span> <span class="kn">import</span> <span class="n">draw_sage_build</span>
<span class="n">sage</span><span class="p">:</span> <span class="n">draw_sage_build</span><span class="p">()</span><span class="o">.</span><span class="n">pdf</span><span class="p">()</span>
</pre></div>
<a class="reference external image-reference" href="http://www.slabbe.org/Files/2016/sage_build.png"><img alt="/Files/2016/sage_build.png" src="http://www.slabbe.org/Files/2016/sage_build.png" /></a>
<p>From scratch from a fresh git clone of 7.5.beta6, after running <tt class="docutils literal"><span class="pre">MAKE='make</span>
<span class="pre">-j4'</span> make ptestlong</tt>, I get:</p>
<div class="pygments_manni"><pre><span class="n">sage</span><span class="p">:</span> <span class="kn">from</span> <span class="nn">slabbe.analyze_sage_build</span> <span class="kn">import</span> <span class="n">draw_sage_build</span>
<span class="n">sage</span><span class="p">:</span> <span class="n">draw_sage_build</span><span class="p">()</span><span class="o">.</span><span class="n">pdf</span><span class="p">()</span>
</pre></div>
<a class="reference external image-reference" href="http://www.slabbe.org/Files/2016/sage_build_from_scratch.png"><img alt="/Files/2016/sage_build_from_scratch.png" src="http://www.slabbe.org/Files/2016/sage_build_from_scratch.png" /></a>
<p>The picture does not include the start and ptestlong because there was an error
compiling the documentation.</p>
<p>By default, <tt class="docutils literal">draw_sage_build</tt> considers all of the logs files in
<tt class="docutils literal">logs/pkgs</tt> but options are available to consider only log files created in a
given interval of time. See <tt class="docutils literal">draw_sage_build?</tt> for more info.</p>
</div>Sébastien Labbéhttp://www.slabbe.org/blogue/RethinkDB, SageMath, Andreessen-Horowitz, Basecamp and Open Source Softwaretag:blogger.com,1999:blog-6365588202025292315.post-25559828274034112382016-11-17T15:57:37+00:00<h2 id="rethinkdb-and-sustainable-business-models">RethinkDB and sustainable business models</h2>Three weeks ago, I spent the evening of Sept 12, 2016 with Daniel Mewes, who is the lead engineer of RethinkDB (an open source database). I was also supposed to meet with the co-founders, Slava and Michael, but they were too busy fundraising and couldn't join us. I pestered Daniel the whole evening about what RethinkDB's business model actually was. Yesterday, on October 6, 2016, <a href="https://rethinkdb.com/blog/rethinkdb-shutdown/" target="_blank">RethinkDB shut down.</a><br /><br />I met with some RethinkDB devs because an investor who runs a fund at the VC firm Andreessen-Horowitz (A16Z) had kindly invited me there to explain my commercialization plans for SageMath, Inc., and RethinkDB is one of the companies that <a href="https://mattermark.com/companies/rethinkdb.com">A16Z has invested in</a>. At first, I wasn't going to take the meeting with A16Z, since I have never met with Venture Capitalists before, and do not intend to raise VC. However, some of my advisors convinced me that VC's can be very helpful even if you never intend to take their investment, so I accepted the meeting.<br /><br />In the first draft of my slides for my presentation to A16Z, I had a slide with the question: "Why do you fund open source companies like RethinkDB and CoreOS, which have no clear (to me) business model? Is it out of some sense of charity to support the open source software ecosystem?" After talking with people at Google and the RethinkDB devs, I removed that slide, since charity is clearly not the answer (I don't know if there is a better answer than "by accident").<br /><br />I have used RethinkDB intensely for nearly two years, and I might be their biggest user in some sense. My product <a href="https://cloud.sagemath.com/">SageMathCloud</a>, which provides web-based course management, Python, R, Latex, etc., uses RethinkDB for everything. For example, every single time you enter some text in a realtime synchronized document, a RethinkDB table gets an entry inserted in it. I have RethinkDB tables with nearly 100 million records. I gave <a href="https://www.youtube.com/watch?v=WU6eSckPR7E">a talk at a RethinkDB meetup</a>, filed numerous bug reports, and have been described by them as "their most unlucky user". In short, in 2015 I bet big on RethinkDB, just like I bet big on Python back in 2004 when starting SageMath. And when visiting the RethinkDB devs in San Francisco (this year and also last year), I have said to them many times "I have a very strong vested interest in you guys not failing." My company SageMath, Inc. also pays RethinkDB for a support contract.<br /><br />Sustainable business models were very much on my mind, because of my upcoming meeting at A16Z and the upcoming board meeting for my company. SageMath, Inc.'s business model involves making money from subscriptions to SageMathCloud (which is hosted on Google Cloud Platform); of course, there are tons of details about exactly how our business works, which we've been refining based on customer feedback. Though absolutely all of our software is open source, what we sell is convenience, easy of access and use, and we provide value by hosting <a href="https://github.com/sagemathinc/smc/wiki/Teaching">hundreds of courses</a> on shared infrastructure, so it is much cheaper and easier for universities to pay us rather than hosting our software themselves (which is also <a href="https://github.com/sagemathinc/smc/blob/master/src/dev/docker/README.md">fairly easy</a>). So that's our business model, and I would argue that it is working; at least our MRR is steadily increasing and is more than twice our hosting costs (we are not cash flow positive yet due to developer costs).<br /><br />So far as I can determine, the business model of RethinkDB was to make money in the following ways: 1. Sell support contracts to companies (I bought one). 2. Sell a closed-source proprietary version of RethinkDB with extra features that were of interest to enterprise (they had a handful of such features, e.g., audit logs for queries). 3. Horizon would become a cloud-hosted competitor to Firebase, with unique advantages that users have the option to migrate from the cloud to their own private data center, and more customizability. This strategy depends on a trend for users to migrate <em>away</em> from the cloud, rather than to it, which some people at RethinkDB thought was a real trend (I disagree).<br /><br />I don't know of anything else they were seriously trying right now. The closed-source proprietary version of RethinkDB also seemed like a very recent last ditch effort that had only just begun; perhaps it directly contradicted a desire to be a 100% open source company?<br /><br />With enough users, it's easier to make certain business models work. I suspect RethinkDB does not have a lot of <strong>real users</strong>. Number of users tends to be roughly linearly related to mailing list traffic, and the <a href="https://groups.google.com/forum/#!forum/rethinkdb" target="_blank">RethinkDB mailing list</a> has an order of magnitude less traffic compared to the SageMath mailing lists, and SageMath has around 50,000 users. RethinkDB wasn't even advertised to be production ready until just over a year ago, so even they were telling people not to use it seriously until relatively recently. The adoption cycle for database technology is slow -- people wisely wait for <a href="https://aphyr.com/posts/330-jepsen-rethinkdb-2-2-3-reconfiguration" target="_blank">Aphyr's tests</a>, benchmarks comparing with similar technology, etc. I was unusual in that I chose RethinkDB much earlier than most people would, since I <strong>love the design of RethinkDB so much</strong>. It's the first database I loved, having seen a lot over many decades.<br /><br /><strong>Conclusion:</strong> RethinkDB wasn't a real business, and wouldn't become one without year(s) more runway.<br /><br />I'm also very worried about the future of RethinkDB <a href="https://docs.google.com/document/d/1Fy-drBGDTyibwEBBAX6G5otqtWiKOD2sBXmL2uVTFtE/edit" target="_blank">as an open source project</a>. I don't know if the developers have experience growing an open source community of volunteers; it's incredibly hard and its unclear they are even going to be involved. At a bare minimum, I think they must switch to a very liberal license (Apache instead of AGPL), and make everything (e.g., automated testing code, documentation, etc) open source. It's insanely hard getting any support for open source infrastructure work -- support mostly comes from small government grants (for research software) or contributions from employees at companies (that use the software). Relicensing in a company friendly way is thus critical.<br /><h2 id="company-incentives">Company Incentives</h2>Companies can be incentived in various ways, including:<br /><ul><li>to get to the next round of <strong>VC funding</strong></li><li>to be a <strong>sustainable profitable business</strong> by making more money from customers than they spend, or</li><li>to <strong>grow</strong> to have a very large number of users and somehow pivot to making money later.</li></ul>When founding a company, you have a chance to choose how your company will be incentived based on how much risk you are willing to take, the resources you have, the sort of business you are building, the current state of the market, and your model of what will happen in the future.<br /><br />For me, <a href="http://sagemath.org/">SageMath</a> is an open source project I started in 2004, and I'm in it for the long haul. I will make the business I'm building around SageMathCloud succeed, or I will die trying -- therefore I have <strong>very, very little tolerance</strong> for risk. Failure is not an option, and I am not looking for an exit. For me, the strategy that best matches my values is to incentive my company to build a profitable business, since that is most likely to survive, and also to give us the freedom to maintain our longterm support for open source and pure mathematics software.<br /><br />Thus for my company, neither optimizing for raising the next round of VC or growing at all costs makes sense. You would be surprised how many people think I'm completely wrong for concluding this.<br /><h2 id="andreessen-horowitz">Andreessen-Horowitz</h2>I spent the evening with RethinkDB developers, which scared the hell out of me regarding their business prospects. They are probably the most open source friendly VC-funded company I know of, and they had given me hope that it is possible to build a successful VC-funded tech startup around open source. I prepared for my meeting at A16Z, and deleted my slide about RethinkDB.<br /><br />I arrived at A16Z, and was greeted by incredibly friendly people. I was a little shocked when I saw their nuclear bomb art in the entry room, then went to a nice little office to wait. The meeting time arrived, and we went over my slides, and I explained my business model, goals, etc. They said there was no place for A16Z to invest directly in what I was planning to do, since I was very explicit that I'm not looking for an exit, and my plan about how big I wanted the company to grow in the next 5 years wasn't sufficiently ambitious. They were also worried about how small the total market cap of Mathematica and Matlab is (only a few hundred million?!). However, they generously and repeatedly offered to introduce me to more potential angel investors.<br /><br />We argued about the value of outside investment to the company I am trying to build. I had hoped to get some insight or introductions related to their portfolio companies that are of interest to my company (e.g., Udacity, GitHub), but they deflected all such questions. There was also some confusion, since I showed them slides about what I'm doing, but was quite clear that I was not asking for money, which is not what they are used to. In any case, I greatly appreciated the meeting, and it really made me think. They were crystal clear that they believed I was completely wrong to not be trying to do everything possible to raise investor money.<br /><h2 id="basecamp">Basecamp</h2>During the first year of SageMath, Inc., I was planning to raise a round of VC, and was doing everything to prepare for that. I then read some of <a href="https://medium.com/@dhh">DHH's books</a> about Basecamp, and realized many of those arguments applied to my situation, given my values, and -- after a lot of reflection -- I changed my mind. I think Basecamp itself is mostly closed source, so they may have an advantage in building a business. SageMathCloud (and SageMath) really are 100% open source, and building a completely open source business might be harder. Our open source IP is considered worthless by investors. Witness: RethinkDB just shut down and <a href="https://stripe.com/">Stripe</a> hired just the engineers -- all the IP, customers, etc., of RethinkDB was evidently considered worthless by investors.<br /><br />The day after the A16Z meeting, I met with my board, which went well (we discussed a huge range of topics over several hours). Some of the board members also tried hard to convince me that I should raise a lot more investor money.<br /><h2 id="will-poole-youre-doomed">Will Poole: you're doomed</h2>Two weeks ago I met with Will Poole, who is a friend of a friend, and we talked about my company and plans. I described what I was doing, that everything was open source, that I was incentivizing the company around building a business rather than raising investor money. He listened and asked a lot of follow up questions, making it very clear he understands building a company very, very well.<br /><br />His feedback was discouraging -- I said "So, you're saying that I'm basically doomed." He responded that I wasn't doomed, but might be able to run a small "lifestyle business" at best via my approach, but there was absolutely no way that what I was doing would have any impact or pay for my kids college tuition. If this was feedback from some random person, it might not have been so disturbing, but Will Poole joined Microsoft in 1996, where he went on to <strong>run Microsoft's multibillion dollar Windows business</strong>. Will Poole is like a retired four-star general that executed a successful campaign to conquer the world; he been around the block a few times. He tried pretty hard to convince me to make as much of SageMathCloud closed source as possible, and to try to convince my users to make content they create in SMC something that I can reuse however I want. I felt pretty shaken and convinced that I needed to close parts of SMC, e.g., the new Kubernetes-based backend that we spent all summer implementing. (Will: if you read this, though our discussion was really disturbing to me, I really appreciate it and respect you.)<br /><br /><a href="http://www.wallstreetoasis.com/forums/tomato-jos-the-extra-alternative-career-for-top-mba-grads" target="_blank">My friend</a>, who introduced me to Will Poole, introduced me to some other people and described me as that really frustrating sort of entrepreneur who doesn't want investor money. He then remarked that one of the things he learned in business school, which really surprised him, was that it is <strong>good</strong> for a company to have a lot of debt. I gave him a funny look, and he added "of course, I've never run a company".<br /><br />I left that meeting with Will convinced that I would close source parts of SageMathCloud, to make things much more defensible. However, after thinking things through for several days, and talking this over with other people involved in the company, I have chosen not to close anything. This just makes our job harder. Way harder. But I'm not going to make any decisions based purely on fear. I don't care what anybody says, I do not think it is impossible to build an open source business (I think <a href="https://wordpress.org/about/">Wordpress</a> is an example), and I do not need to raise VC.<br /><br />Hacker News Discussion: <a href="https://news.ycombinator.com/item?id=12663599">https://news.ycombinator.com/item?id=12663599</a><br /><br />Chinese version: <a href="http://www.infoq.com/cn/news/2016/10/Reflection-sustainable-profit-co" target="_blank">http://www.infoq.com/cn/news/2016/10/Reflection-sustainable-profit-co</a>William Steinnoreply@blogger.comhttp://sagemath.blogspot.com/SageMath: "it's not research"tag:blogger.com,1999:blog-6365588202025292315.post-18883664529235985732016-10-05T13:13:00+00:00The University of Washington (UW) mathematics department has funding for grad students to "travel to conferences". What sort of travel funding? <br /><br /> <ul><li>The department has some money available.</li><li>The UW Graduate school has some money available: They only provide funding for students giving a talk or presenting a poster.</li><li>The UW GPSS has some money available: contact them directly to apply (they only provide funds for "active conference participation", which I think means giving a talk, presenting a poster, or similar)</li></ul> <br />One of my two Ph.D. students at UW asked our Grad program director: <i>"I'll be going to Joint Mathematics Meetings (JMM) to help out at the SageMath booth. Is this a thing I can get funding for?"</i> <br /><br /><b>ANSWER:</b> Travel funds are primarily meant to support research, so although I appreciate people helping out at the SageMath booth, I think that's not the best use of the department's money. <br /><br />I think this "it's not research" perspective on the value of mathematical software is unfortunate and shortsighted. Moreover, it's especially surprising as the person who wrote the above answer has contributed substantially to the algebraic topology functionality of Sage itself, so he knows exactly what Sage is. <br /><br />Sigh. Can some blessed person with an NSF grant out there pay for this grad student's travel expenses to help with the Sage booth? Or do I have to use the handful of $10, $50, etc., donations I've got the last few months for this purpose?William Steinnoreply@blogger.comhttp://sagemath.blogspot.com/Overview of what was donetag:blogger.com,1999:blog-3534817490044613273.post-10793020885104271462016-08-22T14:18:00+00:00My project has been extending the functionality of SageMath in a matroid direction.<br />As part of my application, and before the summer officially started, I worked on two tickets: <a href="https://trac.sagemath.org/ticket/20290">https://trac.sagemath.org/ticket/20290</a> and <a href="https://trac.sagemath.org/ticket/14666">https://trac.sagemath.org/ticket/14666</a>. The first was fixing a typo (and learning how to use the interface), and the second one modified the code to find a maximum weighted basis of a matroid so that a user could also see if there was exactly one maximum weighted basis. These are both currently incorporated into <span>official release version of SageMath</span>.<br /><br />At the beginning of the summer, I was focused on adding certificates to the pre written algorithms <a href="https://trac.sagemath.org/ticket/20660">is_isomorphic()</a>, <a href="https://trac.sagemath.org/ticket/20696">chordal functions</a>, <a href="https://trac.sagemath.org/ticket/20689">has_minor()</a>, and <a href="https://trac.sagemath.org/ticket/20778">has_line_minor()</a>. All of these are closed tickets except the last one, which had a merge conflict. This also enabled me to get a feel for the documentation culture of my organization.<br /><br />The bulk of my project has been working on implementing <a href="http://www.jstor.org/stable/3689867?seq=1#page_scan_tab_contents" target=""><i>An Almost Linear-Time Algorithm</i></a> for Graph Realization by Robert Bixby and Donald Wagner. This algorithm was written with data structures that didn't exactly match the code base that I was incorporating the function into, so some changes were made there, and some simple (but not necessarily easy) supporting functions were added. There are still some bugs in the code, whose current version can be found <a href="https://trac.sagemath.org/ticket/20834">here</a>. Much of the rest of this post will be devoted to explaining the data structures that we used for the algorithm. It is aimed mostly at whoever (hopefully future me) is going to finish this function.<br /><br />We used two new data structures Node, and Decomposition. The decomposition is composed of nodes and relations between them. In particular, it contains a directed tree, where each vertex corresponds to a node. A decomposition also stores information which is useful to the functions that need it. The root of the tree is stored, as are the nodes which contain the first and last verticies of the hypopath along with these verticies. Also stored are integers to makes sure that we don't double name two verticies or two edges the same thing.<br /><br />A node contains a graph, a parent marker edge, and a parent marker vertex. The latter is one of the <span>vertices</span> of the parent marker edge, and is manipulated so that it is the edge which will end up being included in the path that comes from the hypopath. It also stores an integer T, which depends on the iteration of adding edges, and is stored after being computed.<br /><br />The flow structure of the main functions is given below. Each function is a decomposition function.<br /><div class="separator"><a href="https://3.bp.blogspot.com/-5xvyY925m5Q/V7sIsmAheUI/AAAAAAAABG0/O0RUUuz6o-A4POAGtIuIyD9DXH4iT5e0QCLcB/s1600/Diagram.png"><img border="0" height="320" src="https://3.bp.blogspot.com/-5xvyY925m5Q/V7sIsmAheUI/AAAAAAAABG0/O0RUUuz6o-A4POAGtIuIyD9DXH4iT5e0QCLcB/s320/Diagram.png" width="280" /></a></div><br /><br /><div>Here is the list of all the functions and the status of each of them. Most of them are supporting functions, with the exception of <b>relink1</b>, <b>typing</b>, <b>relink2</b>, and <b>hypopath</b> from section 4 of the paper, <b>squeeze</b> and <b>update</b> from section 5, and <b>is_graphic</b> from section 6.</div><div><br /></div><div><span>Nodes</span></div><div><br /></div><div><b>get_graph(self)</b></div><div>Done</div><div><b>get_parent_marker(self)</b></div><div>Done</div><div><b>get_named_edge(self, f)</b></div><div>Done</div><div><b>get_parent_marker_edge(self)</b></div><div>Done</div><div><b>get_f(self) </b></div><div>Done</div><div><b>set_f(self, int n)</b></div><div>Done</div><div><b>is_polygon(self)</b></div><div>Done</div><div><b>s_path(self, P)</b></div><div>Done</div><div><b>is_cycle(self, P)</b></div><div>Done</div><div><b>_T(self, P, Z=*)</b></div><div>This will correctly give the T value when self is a leaf of the reduced arborescence. It does not correctly compute the T value otherwise.</div><div><b>__relink1(self, Z=*, WQ=*)</b></div><div>Done</div><div><b>__relink2(self, Z=*, WQ=*)</b></div><div>Done</div><div><b>get_T(self)</b></div><div>Done</div><div><b>set_T(self, int T)</b></div><div>Done</div><div><br /></div><div><br /></div><div><br /></div><div><span>CunninghamEdmondsDecomposition</span></div><div><br /></div><div><b>relink1(self, Q, Z=*, WQ=*)</b></div><div>Done</div><div><b>get_D_hat(self, P)</b></div><div>Done</div><div><b>T(self, N, P, T)</b></div><div>This is not done. It needs to be fixed so that it takes into account the types of the children of self.</div><div><b>__typing(self, P, pi)</b></div><div>This is not tested as it relies on T. There are, however, no known deficiencies with the algorithm.</div><div><b>__relink2(Q, Z=*, WQ=*)</b></div><div>Done</div><div><b>__hypopath(self, P)</b></div><div>This is not tested as it relies on <b>__typing</b>. The assigning of u_1 and u_2 needs to be fixed.</div><div><b>__squeeze(self, N, L)</b></div><div>Done</div><div><b>__update(self, P, C)</b></div><div>This is not tested as it relies on <b>__hypopath</b>. It is essentially done, except that the variables u_1, u_2, K_1, and K_2 are not necessarily computed correctly, and U2.4 is not written.</div><div><b>__is_graphic(self)</b></div><div>This is not done. G2 and G3 need to be written, and it needs to be tested. This cannot happen until the rest of the problems are fixed.</div><div><b>merge_with_parent(self, N, N_vertex=*, P_vertex=*)</b></div><div>This is done, but it doesn't use the f is N_vertex and P_vertex are undefined. This should probably be changed.</div><div><b>merge_branch(self, N, P)</b></div><div>This is written, but in order to insure that the intersection of P with this graph is always a path if possible, P should be replaced with P_0, and the parent markers of children that intersect P should be added to P_0 initially, and removed, in turn, when that child is merged with N.</div><div><b>__add_cycle(self, cycle)</b></div><div>Done</div><div><b>get_arborescence(self)</b></div><div>Done</div><div><b>get_nodes(self)</b></div><div>Done</div><div><b>get_root(self)</b></div><div>Done</div><div><b>__get_pi(self)</b></div><div>This is done, but it should be changed so that it can take a sub tree of self.arborescence as an input, and give pi on the reduced decomposition.</div><div><b>branch(self, N)</b></div><div>Done</div><div><b>get_parent(self, N)</b></div><div> Done</div>Taranoreply@blogger.comhttp://extendingmatroidfunctionality.blogspot.com/Jupyter: "take the domain name down immediately"tag:blogger.com,1999:blog-6365588202025292315.post-45923246745673366852016-08-12T10:46:26+00:00The <a href="http://jupyter.org/">Jupyter notebook</a> is an open source BSD-licensed browser-based code execution environment, inspired by my early work on the Sage Notebook (which we launched in 2007), which was in turn inspired heavily by Mathematica notebooks and Google docs. Jupyter used to be called <a href="https://www.google.com/trends/explore#q=jupyter%2C%20ipython&cmpt=q&tz=Etc%2FGMT%2B7">IPython</a>.<br /><br /><a href="https://cloud.sagemath.com/">SageMathCloud</a> is an open source web-based environment for using Sage worksheets, terminals, LaTeX documents, course management, and Jupyter notebooks. I've put much hard work into making it so that multiple people can simultaneously edit Jupyter notebooks in SageMathCloud, and the history of all changes are recorded and browsable via a slider.<br /><br />Many people have written to me asking for there to be a modified version of <a href="https://cloud.sagemath.com/">SageMathCloud</a>, which is oriented around Jupyter notebooks instead of Sage worksheets. So the default file type is Jupyter notebooks, the default kernel doesn't involve the extra heft of Sage, etc., and the domain name involves Jupyter instead of "sagemath". Some people are disuased from using SageMathCloud for Jupyter notebooks because of the "SageMath" name.<br /><br />Dozens of web applications (including SageMathCloud) use the word "Jupyter" in various places. However, I was unsure about using "jupyter" in a domain name. I found <a href="https://github.com/jupyter/governance/issues/12">this github issue</a> and requested clarification 6 weeks ago. We've had some back and forth, but they recently made it clear that it would be at least a month until any decision would be considered, since they are too busy with other things. In the meantime, I rented jupytercloud.com, which has a nice ring to it, as the <a href="https://www.google.com/search?q=jupiter+cloud&safe=off&rlz=1C5CHFA_enUS691US691&tbm=isch&tbo=u&source=univ&sa=X&ved=0ahUKEwj-vJubvJLOAhVEwYMKHRLlCCgQsAQIKg&biw=1147&bih=643">planet Jupiter has clouds.</a> Yesterday, I made jupytercloud.com point to cloud.sagemath.com to see what it would "feel like" and Tim Clemans started experimenting with customizing the page based on the domain name that the client sees. I did not mention jupytercloud.com publicly anywhere, and there were no links to it.<br /><br />Today I received this message:<br /><br /><pre><code> William,<br /><br /> I'm writing this representing the Jupyter project leadership<br /> and steering council. It has recently come to the Jupyter<br /> Steering Council's attention that the domain jupytercloud.com<br /> points to SageMathCloud. Do you own that domain? If so,<br /> we ask that you take the domain name down immediately, as<br /> it uses the Jupyter name.</code></pre><pre></pre>I of course immediately complied. It is well within their rights to dictate how their name is used, and I am obsessive about scrupulously doing everything I can to respect people's intellectual property; with Sage we have put huge amounts of effort into honoring both the letter and spirit of copyright statements on open source software.<br /><br />I'm writing this because it's unclear to me what people really want, and I have no idea what to do here.<br /><br />1. Do <strong>you</strong> want something built on the same technology as SageMathCloud, but much more focused on Jupyter notebooks?<br /><br />2. Does the name of the site matter to <strong>you</strong>?<br /><br />3. What model should the Jupyter project use for their trademark? Something like Python? like Git?Like Linux? Like Firefox? Like the email program PINE? Something else entirely?<br /><br />4. Should I be worried about using Jupyter at all anywhere? E.g., in this blog post? As the default notebook for the SageMath project?<br /><br />I appreciate any feedback.<br /><br /><a href="https://news.ycombinator.com/item?id=12169979" target="_blank">Hacker News Discussion</a><br /><br /><b>UPDATE (Aug 12, 2016): </b>The official decision is that I <b>cannot</b> use the domain jupytercloud.com. They did say I can use <b>jupyter.sagemath.com </b>or <b>sagemath.com/jupyter</b>. Needless to say, I'm disappointed, but I fully respect their (very foolish, IMHO) decision.<br /><br /><br />William Steinnoreply@blogger.comhttp://sagemath.blogspot.com/DataDog's pricing: don't make the same mistake I madetag:blogger.com,1999:blog-6365588202025292315.post-69499859983136143552016-07-22T14:17:05+00:00I stupidly made a mistake recently by choosing to use <a href="https://www.datadoghq.com/">DataDog</a> for monitoring the infrastructure for my startup (<a href="https://cloud.sagemath.com/">SageMathCloud</a>).<br /><br />I got bit by their pricing UI design that looks similar to many other sites, but is different in a way that caused me to <strong>spend far more money than I expected.</strong><br /><br />I'm writing this post so that you won't make the same mistake I did. As a product, DataDog is of course a lot of hard work to create, and they can try to charge whatever they want. However, my problem is that <strong>what</strong> they are going to charge was confusing and misleading to me.<br /><br />I wanted to see some nice web-based data about my new autoscaled Kubernetes cluster, so I looked around at options. DataDog looked like a new and awesomely-priced service for seeing live logging. And when I looked (not carefully enough) at the pricing, it looked like only $15/month to monitor a bunch of machines. I'm naive about the cost of cloud monitoring -- I've been using Stackdriver on Google cloud platform for years, which is completely free (for now, though that will change), and I've also used self hosted open solutions, and some quite nice solutions I've written myself. So my expectations were way out of whack.<br /><br />Ever busy, I signed up for the "$15/month plan":<br /><div class="separator"><a href="https://1.bp.blogspot.com/-NK09JkZDOD0/V5Jyf6jYy2I/AAAAAAABYNA/l_LP-NJv6hgODAvvaO868frbtJ4hP9SUQCLcB/s1600/dd-pricing.png"><img border="0" height="225" src="https://1.bp.blogspot.com/-NK09JkZDOD0/V5Jyf6jYy2I/AAAAAAABYNA/l_LP-NJv6hgODAvvaO868frbtJ4hP9SUQCLcB/s400/dd-pricing.png" width="400" /></a></div><br /><br />One of the people on my team spent a little time and installed datadog on all the VM's in our cluster, and also made DataDog automatically start running on any nodes in our Kubernetes cluster. That's a lot of machines.<br /><br />Today I got the first monthly bill, which is for the month that just happened. The cost was $639.19 USD charged to my credit card. I was really confused for a while, wondering if I had bought a year subscription.<br /><br /><div class="separator"><a href="https://3.bp.blogspot.com/-LK7iRxeqMKI/V5JymhrBN-I/AAAAAAABYNE/lCA0YC3cfSMJ9LuTsFgsrt8vTUR4rvRIQCLcB/s1600/dd-invoice.png"><img border="0" height="198" src="https://3.bp.blogspot.com/-LK7iRxeqMKI/V5JymhrBN-I/AAAAAAABYNE/lCA0YC3cfSMJ9LuTsFgsrt8vTUR4rvRIQCLcB/s400/dd-invoice.png" width="400" /></a></div><br /><br />After a while I realized that the cost is per host! When I looked at the pricing page the first time, I had just saw in big letters "$15", and "$18 month-to-month" and "up to 500 hosts". I completely missed the "Per Host" line, because I was so naive that I didn't think the price could possibly be that high.<br /><br />I tried immediately to delete my credit card and cancel my plan, but the "Remove Card" button is greyed out, and it says you can "modify your subscription by contacting us at success@datadoghq.com":<br /><br /><div class="separator"><a href="https://3.bp.blogspot.com/-iohuYjKf3_A/V5JzPDN7qHI/AAAAAAABYNM/QBn6pqJ_OL0roteJIyxHWx5wajJRs4_EwCLcB/s1600/dd-cancel.png"><img border="0" height="318" src="https://3.bp.blogspot.com/-iohuYjKf3_A/V5JzPDN7qHI/AAAAAAABYNM/QBn6pqJ_OL0roteJIyxHWx5wajJRs4_EwCLcB/s400/dd-cancel.png" width="400" /></a></div><br /><br />So I wrote to success@datadoghq.com:<br /><br /><pre><code>Dear Datadog,<br /><br />Everybody on my team was completely mislead by your<br />horrible pricing description.<br /><br />Please cancel the subscription for wstein immediately<br />and remove my credit card from your system.<br /><br />This is the first time I've wasted this much money<br />by being misled by a website in my life.<br /><br />I'm also very unhappy that I can't delete my credit<br />card or cancel my subscription via your website. It's<br />like one more stripe API call to remove the credit card<br />(I know -- I implemented this same feature for my site).</code></pre><pre><code><br /></code></pre><hr />And they responded:<br /><br /><pre><code>Thanks for reaching out. If you'd like to cancel your<br />Datadog subscription, you're able to do so by going into<br />the platform under 'Plan and Usage' and choose the option<br />downgrade to 'Lite', that will insure your credit card<br />will not be charged in the future. Please be sure to<br />reduce your host count down to the (5) allowed under<br />the 'Lite' plan - those are the maximum allowed for<br />the free plan.<br /><br />Also, please note you'll be charged for the hosts<br />monitored through this month. Please take a look at<br />our billing FAQ.</code></pre><hr /><br />They were right -- I was able to uninstall the daemons, downgrade to Lite, remove my card, etc. all through the website without manual intervention.<br /><br />When people have been confused with billing for <a href="https://cloud.sagemath.com/">my site</a>, I have apologized, immediately refunded their money, and opened a ticket to make the UI clearer. DataDog didn't do any of that.<br /><br />I wish DataDog would at least clearly state that when you use their service you are potentially on the hook for an <strong>arbitrarily large</strong> charge for any month. Yes, if they had made that clear, they wouldn't have had me as a customer, so they are not incentivized to do so.<br /><br />A fool and their money are soon parted. I hope this post reduces the chances you'll be a fool like me. If you chose to use DataDog, and their monitoring tools are very impressive, I hope you'll be aware of the cost. <br /><br /><br />ADDED:<br /><br />On <a href="https://news.ycombinator.com/threads?id=williamstein" target="_blank">Hacker News</a> somebody asked: "<span>How could their pricing page be clearer? It says per host in fairly large letters underneath it. </span><span>I'm asking because I will be designing a similar page soon (that's also billed per host) and I'd like to avoid the same mistakes." My answer:</span><br /><span><br /></span><span>[EDIT: This pricing page by the top poster in this thread is way better than I suggest below -- https://www.serverdensity.com/pricing/]</span><br /><span><br /></span><span>1. </span><i></i><span>VERY clearly</span><i></i><span> state that when you sign up for the service, then you are on the hook for up to $18*500 = $9000 + tax in charges for any month. Even Google compute engine (and Amazon) don't create such a trap, and have a clear explicit quota increase process.</span><br /><div>2. Instead of "HUGE $15" newline "(small light) per host", put "HUGE $18 per host" all on the same line. It would easily fit. I don't even know how the $15/host datadog discount could ever really work, given that the number of hosts might constantly change and there is no prepayment.</div><div>3. Inform users clearly in the UI at any time how much they are going to owe for that month (so far), rather than surprising them at the end. Again, Google Cloud Platform has a very clear running total in their billing section, and any time you create a new VM it gives the exact amount that VM will cost per month.</div><div>4. If one works with a team, 3 is especially important. The reason that I had monitors on 50+ machines is that another person working on the project, who never looked at pricing or anything, just thought -- he I'll just set this up everywhere. He had no idea there was a per-machine fee.</div><span class="comment"><span class="c00"></span></span><br /><div class="reply"><div><span class="comment"><span class="c00"><span><u><a href="https://news.ycombinator.com/reply?id=12146416&goto=item%3Fid%3D12145879%2312146416">reply</a></u></span></span></span></div></div><span class="comment"><span class="c00"></span></span>William Steinnoreply@blogger.comhttp://sagemath.blogspot.com/Midterm ishtag:blogger.com,1999:blog-3534817490044613273.post-38284326547879848902016-06-27T17:41:00+00:00My summer of code is broken up into several projects. There were a lot of small ones, a couple medium ones, and one large one. Right now, I'm in the midst of working on the large project. Basically, we want to feed Sage a collection of subsets of an edge set E, and have Sage tell us if there is a graph that has cycles which correspond to the subsets of E, and if so, to give a corresponding. This boils down to asking if a matroid is <a href="https://en.wikipedia.org/wiki/Graphic_matroid" target="_blank">graphic</a>, and asking for a graph that realizes the matroid.<br /><br />For instance, if we give have E = {1, 2, 3, 4}, and our collection of sets is any three element subset of E, then we can't get an appropriate graph. To see this, we start constructing a graph. Our first cycle is {1, 2, 3}, There is only one graph on three elements that has this cycle, namely a triangle. To add the edge 4, we need to have a cycle {1, 2, 4}. But this means that we have to add 4 in parallel to the edge 3. This is a problem, because then {1, 3, 4}, in particular, is not a cycle of our graph.<br /><br />This example illustrates a key idea of the algorithm. The set {1, 2} is a maximal set that is not contained in a cylce, so we skipped over those elements, and started with 3. We then added 3 and any needed elements of {1, 2} to our partial graph. And we kept adding elements till we either had a problem, or till we added all of the elements.<br /><br />In our case, we didn't get so complicated of a graph that we had a choice about which graph to use for our partial graph. In general, this is not the case. It would be troublesome to check if we could add the new element to every graphs that realizes the already added elements, so we use a decomposition made possible by <a href="http://onlinelibrary.wiley.com/doi/10.1002/jgt.3190040106/pdf" target="_blank">Whitney's 2 isomorphism theorem</a> to check all of the graphs options at once. This of course makes the code more complicated. The algorithm that we are following comes from a <a href="http://www.jstor.org/stable/3689867?seq=1#page_scan_tab_contents" target="_blank">paper</a> by Ronald Bixby and Donald Wagner.<br /><br />The tricky part, so far, has been trying to get information in and out of graphs. graph theorists care a lot about the vertices of a graph and much less about the edges of the graph. That is, they store their edges as a list of the two vertices that they are incident with, and a possible label. matroid theorists, however, care a lot more about the edges of a graph. This is true in general, and is true in particular for this project.Taranoreply@blogger.comhttp://extendingmatroidfunctionality.blogspot.com/