A long, long time ago, fresh from churning out static pages using the still brand-new HTML language, I was offered the opportunity to forage even further into programming by my former company. At the time we were using a proprietary scripting language that worked somewhat like ColdFusion, at a very basic level. In my spare time, I noodled around with it.
I hate doing math, but much of knitting relies on math (for instance, a sweater that is knit at 5 inches per inch as opposed to 6 inches per stitch, with a circumference totaling 250 stitches will result in two very different sizes, one of which, should you pick the wrong gauge, will swim on your designated recipient and will be quietly designated to the darkest corner of his closet). And so does dyeing. Say you have liquid totaling 100% with which to dye yarn. And you want to use two different colors such as magenta and turquoise to get that nice blue shade. And you want to make sure it doesn't come out too light - somehow I don't think Cousin Jim would appreciate a pastel-blue sweater.
So, I developed a web-based dye calculator using that dead, proprietary language. Here's what the code that did the calculations on the back-end looks like:
\r\n##VAR.oz.declare(##PARAM.oz##)##\r\n##VAR.gram.declare("""")##\r\n\r\n##VAR.volume.declare(##PARAM.volume##)##\r\n##VAR.percent.declare(##PARAM.percent##)##\r\n##VAR.gdp.declare("""")##\r\n\r\n##VAR.fiber.declare(##PARAM.fiber##)##\r\n##VAR.dos.declare(##PARAM.dos##)##\r\n##VAR.strength.declare(##PARAM.strength##)##\r\n##VAR.TempFibdos.declare("""")##\r\n##VAR.totsol.declare("""")##\r\n\r\n##VAR.TempColper1.declare("""")##\r\n##VAR.TempColper2.declare("""")##\r\n##VAR.colper1.declare(##PARAM.colper1##)##\r\n##VAR.colper2.declare(##PARAM.colper2##)##\r\n##VAR.stocksol.declare(##PARAM.stocksol##)##\r\n##VAR.colora.declare("""")##\r\n##VAR.colorb.declare("""")##\r\n\r\n<!REM These two IF statements converts from ounces to grams>\r\n\r\n<!IF ##PARAM.Action## .eq. ""Ounces to Grams"">\r\n <!IF ##PARAM.oz## .ne. NULL>\r\n ##VAR.gram.assign(##FUNC.math(""*"", ##VAR.oz##, 28, 1)##)##\r\n <!ENDIF>\r\n<!ENDIF>\r\n\r\n<!REM These two IF statements calculate the stock solution formula>\r\n\r\n<!IF ##PARAM.Action## .eq. ""Calculate Dye Powder"">\r\n <!IF ##PARAM.volume## .ne. NULL>\r\n ##VAR.volume.assign(##FUNC.math(""/"", ##VAR.volume##, 100, 2)##)##\r\n <!ENDIF>\r\n \r\n <!IF ##PARAM.percent## .ne. NULL>\r\n ##VAR.TempVar.declare(##VAR.volume##)##\r\n ##VAR.gdp.assign(##FUNC.math(""*"", ##VAR.TempVar##, ##VAR.percent##, 1)##)##\r\n <!ENDIF>\r\n<!ENDIF>\r\n\r\n<!REM These two IF statements calculate the fiber/total stock solution formula>\r\n\r\n<!IF ##PARAM.Action## .eq. ""Calculate Volume"">\r\n \r\n <!IF ##PARAM.fiber## .ne. NULL .and. ##PARAM.dos## .ne. NULL>\r\n ##VAR.TempFibdos.assign(##FUNC.math(""*"", ##VAR.fiber##, ##VAR.dos##, 2)##)##\r\n <!ENDIF>\r\n \r\n <!IF ##PARAM.strength## .ne. NULL>\r\n ##VAR.totsol.assign(##FUNC.math(""/"", ##VAR.TempFibdos##, ##VAR.strength##, 2)##)##\r\n <!ENDIF>\r\n<!ENDIF>\r\n\r\n<!REM These two IF statements calculate the % for 2 colors>\r\n\r\n<!IF ##PARAM.Action## .eq. ""Color Ratios"">\r\n <!IF ##PARAM.colper1## .ne. NULL .and. ##PARAM.colper2## .ne. NULL>\r\n ##VAR.TempColper1.assign(##FUNC.math(""/"", ##VAR.colper1##, 100, 1)##)##\r\n ##VAR.TempColper2.assign(##FUNC.math(""/"", ##VAR.colper2##, 100, 1)##)##\r\n ##VAR.colora.assign(##FUNC.math(""*"", ##VAR.TempColper1##, ##VAR.stocksol##, 1)##)##\r\n ##VAR.colorb.assign(##FUNC.math(""*"", ##VAR.TempColper2##, ##VAR.stocksol##, 1)##)##\r\n <!ENDIF>\r\n<!ENDIF>\r\n
Well, as I said, this language is dead, consigned to the dustbin of Obscure Historical Facts.