{"id":14267,"date":"2026-10-27T22:38:37","date_gmt":"2026-10-28T02:38:37","guid":{"rendered":"https:\/\/spinor.info\/weblog\/?p=14267"},"modified":"2026-10-27T22:38:37","modified_gmt":"2026-10-28T02:38:37","slug":"some-26000-lines-of-code-later","status":"publish","type":"post","link":"https:\/\/spinor.info\/weblog\/?p=14267","title":{"rendered":"Some 26,000 lines of code later&#8230;"},"content":{"rendered":"<p>A few days ago, I exchanged some e-mails with a fellow volunteer Maxima developer. That exchange reminded me of a pet project of mine, something I&#8217;ve been contemplating for quite some time: a computer algebra system, one significantly less ambitious than a frontier-class system like Mathematica, Maple or, I dare include it in that list, Maxima, but one that runs in the browser, with no server-side code and nothing to install on the user&#8217;s computer either.<\/p>\n<p>This time around, I decided to test my idea with Claude Opus 5.5, their latest and greatest model. I outlined my ambition in a couple of paragraphs. The result was less than overwhelming: After some 20 minutes, Claude ran out of &#8220;thinking&#8221; tokens, and returned nothing other than 128,000 tokens wasted.<\/p>\n<p>Never mind, I figured, let&#8217;s try it again, with a slightly refined prompt to ensure that Claude doesn&#8217;t embark on a project bigger than itself. And that, well, worked. Claude presented a plan and then, following my instructions and my replies to its questions, began to proceed with the implementation one step at a time.<\/p>\n<p>In this past, this is usually where things got derailed. Sometimes, the model got too ambitious and ran into token limits. Sometimes, the model&#8217;s code was incoherent, self-contradictory. Sometimes, the initial code was working, more-or-less, but additions did not.<\/p>\n<p>But not this time. Claude kept churning out sensible code and, most notably, starting at the very first stage, included a testsuite. So even though we had no usable system yet, the testsuite was an assurance that the code we&#8217;re building is doing what it was supposed to do.<\/p>\n<p>Notice that I am not using Claude as an &#8220;agent&#8221;. I did not give it carte blanche in a folder of its own, to build code, download libraries, mess around. No. Claude was talking to me. It was then I who decided if the code Claude presented was good enough or not, it was I who incorporated it into the code base. Claude, accordingly, provided helpful, detailed explanations at each stage. The important point is that the role I retained was that of a senior programmer who may delegate subtasks to junior programmers, but retains overall control of the project at a technical level.<\/p>\n<p>And Claude delivered beyond expectations. Soon, I found myself hooked. One module after another, which I added, tested, tried. A rather nice-looking application was beginning to take shape. And there was both breadth and depth: the application was already acquiring features more sophisticated than I ever dared to plan for, while at the same time Claude never forgot to deal with the mundane, such as appropriate visual representation via MathJax or a growing collection of sections in interactive help.<\/p>\n<p>About halfway through the project we got to basic calculus. I was beginning to wonder: When will Claude falter? When will useful code give way to AI hallucinations, code referencing non-existent language features or capabilities? But none of that happened. Claude robustly, methodically implemented basic calculus, one subroutine at a time.<\/p>\n<p><a href=\"https:\/\/wispl.com\/webcas.php\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-14270 size-large\" src=\"https:\/\/spinor.info\/weblog\/wp-content\/uploads\/2026\/10\/WebCAS-1024x852.png\" alt=\"\" width=\"695\" height=\"578\" srcset=\"https:\/\/spinor.info\/weblog\/wp-content\/uploads\/2026\/10\/WebCAS-1024x852.png 1024w, https:\/\/spinor.info\/weblog\/wp-content\/uploads\/2026\/10\/WebCAS-300x250.png 300w, https:\/\/spinor.info\/weblog\/wp-content\/uploads\/2026\/10\/WebCAS-150x125.png 150w, https:\/\/spinor.info\/weblog\/wp-content\/uploads\/2026\/10\/WebCAS-768x639.png 768w, https:\/\/spinor.info\/weblog\/wp-content\/uploads\/2026\/10\/WebCAS.png 1369w\" sizes=\"(max-width: 695px) 100vw, 695px\" \/><\/a><\/p>\n<p>Again, I stress, Claude had no free reign. We were proceeding step by step, I took the code Claude wrote, integrated it into the application, scrutinized it when I had to, looked for testsuite failures, even corrected the trivial ones.<\/p>\n<p>Once we got past linear algebra and multivariate equations, I decided to get really greedy. I asked Claude, can we do ODEs and PDEs? Because even a half-decent differential equation solver makes a world of a difference when it comes to the usability of a CAS. Claude accordingly revised our plan, and then did the grunt work.<\/p>\n<p>Claude remained enthusiastic throughout, but I began to notice that its responses felt&#8230; a little less coherent. Nothing big, no real mistakes, just subtle things like harder-to-understand explanations or instructions on where to place a code patch. No wonder: we were by now around 700,000 input tokens per conversational turn, rapidly approaching Claude&#8217;s 1 million token limit. (I also noticed the increasing frequency at which I received notifications from Anthropic about additional credit card charges. But, I digress.)<\/p>\n<p>Claude was still eager to proceed with more ambitious additions but I asked it for something else: something genuinely useful in a CAS, a broader class of special functions like hypergeometric functions or Lambert&#8217;s W function. Claude delivered.<\/p>\n<p>So roughly 36 hours after I sent my first prompt to Claude, I was in possession of a full-featured, rich, eminently capable browser-based computer algebra application. One that can also be installed on an Android device as an offline computer algebra tool.<\/p>\n<p>This has been an amazing experience. Was it &#8220;vibe coding&#8221;? I don&#8217;t think so. I was not just playing the dumb user, asking the agentic AI to deliver a solution. I was a senior partner with an incredibly capable, knowledgeable junior assistant, but I retained intellectual ownership of the result, indeed I can confidently edit, and fix\/expand the code myself when I have to, since I understand what it does.<\/p>\n<p>End result: 26,412 code lines in 163 files, at the cost of 31,006,699 input tokens and 3,048,131 output tokens, consumed over the course of less than two days. And <a href=\"https:\/\/wispl.com\/CAS\">WebCAS<\/a> &#8212; the name picked by Claude &#8212; is already my favorite computer algebra application, one that will likely receive regular updates frmo me in the future.<\/p>\n<fb:like href='https:\/\/spinor.info\/weblog\/?p=14267' send='false' layout='button_count' show_faces='true' width='450' height='65' action='like' colorscheme='light' font='lucida grande'><\/fb:like>","protected":false},"excerpt":{"rendered":"<p>A few days ago, I exchanged some e-mails with a fellow volunteer Maxima developer. That exchange reminded me of a pet project of mine, something I&#8217;ve been contemplating for quite some time: a computer algebra system, one significantly less ambitious than a frontier-class system like Mathematica, Maple or, I dare include it in that list, <a href='https:\/\/spinor.info\/weblog\/?p=14267' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[49,58,35,36],"tags":[],"class_list":["post-14267","post","type-post","status-publish","format-standard","hentry","category-computer-algebra","category-cybernetics","category-personal","category-programming","category-49-id","category-58-id","category-35-id","category-36-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"_links":{"self":[{"href":"https:\/\/spinor.info\/weblog\/index.php?rest_route=\/wp\/v2\/posts\/14267","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/spinor.info\/weblog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/spinor.info\/weblog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/spinor.info\/weblog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/spinor.info\/weblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14267"}],"version-history":[{"count":7,"href":"https:\/\/spinor.info\/weblog\/index.php?rest_route=\/wp\/v2\/posts\/14267\/revisions"}],"predecessor-version":[{"id":14275,"href":"https:\/\/spinor.info\/weblog\/index.php?rest_route=\/wp\/v2\/posts\/14267\/revisions\/14275"}],"wp:attachment":[{"href":"https:\/\/spinor.info\/weblog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14267"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/spinor.info\/weblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14267"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/spinor.info\/weblog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14267"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}