From 6fb1cd644308ac46a71536cc7da3a16377107b4f Mon Sep 17 00:00:00 2001 From: Thomas Albers Raviola Date: Tue, 21 May 2024 11:32:09 +0200 Subject: Rename test files --- .gitignore | 1 + chains-test.asd | 0 src/interpreter.lisp | 0 t/test1.chn | 14 ----------- t/test2.chn | 19 --------------- t/test3.chn | 9 -------- t/test4.chn | 65 ---------------------------------------------------- test/test1.chn | 14 +++++++++++ test/test1.html | 8 +++++++ test/test2.chn | 19 +++++++++++++++ test/test2.html | 16 +++++++++++++ test/test3.chn | 9 ++++++++ test/test4.chn | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 13 files changed, 132 insertions(+), 107 deletions(-) create mode 100644 chains-test.asd create mode 100644 src/interpreter.lisp delete mode 100644 t/test1.chn delete mode 100644 t/test2.chn delete mode 100644 t/test3.chn delete mode 100644 t/test4.chn create mode 100644 test/test1.chn create mode 100644 test/test1.html create mode 100644 test/test2.chn create mode 100644 test/test2.html create mode 100644 test/test3.chn create mode 100644 test/test4.chn diff --git a/.gitignore b/.gitignore index 5d49f1a..8c713ff 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ sandbox.lisp archive/* notes t/test*.html +plan.org diff --git a/chains-test.asd b/chains-test.asd new file mode 100644 index 0000000..e69de29 diff --git a/src/interpreter.lisp b/src/interpreter.lisp new file mode 100644 index 0000000..e69de29 diff --git a/t/test1.chn b/t/test1.chn deleted file mode 100644 index f55fb70..0000000 --- a/t/test1.chn +++ /dev/null @@ -1,14 +0,0 @@ -{@define}{@author}{Thomas Albers Raviola}% -{@define}{@today}{May 12, 2024}% -{@define}{@printdate}{{@lambda}{@date}{the date is @date}}% -{@section}{Introduction} - -Hello, this is a sample of a program written in chains - -Chains was created by @author to help him write articles of questionable -usefulness. - -{@printdate}{@today} -{@section}[Conclusion] - -idk man, guess it works, don't it? diff --git a/t/test2.chn b/t/test2.chn deleted file mode 100644 index a637b61..0000000 --- a/t/test2.chn +++ /dev/null @@ -1,19 +0,0 @@ -{@define}{@html-element}{{@lambda}{@name}{{@lambda}{@attr @content}{<@name @attr> -@content -}}}% -% -% -{@define}{@html-html}{{@html-element}{html}}% -{@define}{@html-head}{{@html-element}{head}}% -{@define}{@html-body}{{@html-element}{body}}% -{@define}{@html-title}{{@html-element}{title}}% -{@define}{@html-h1}{{@html-element}{h1}}% -{@define}{@html-p}{{@html-element}{p}}% -% -% -{@html-html}{}{% -{@html-head}{}{{@html-title}{}{Website}}% - -{@html-body}{}{ -{@html-h1}{}{Chains test} -{@html-p}{}{Hello World!}}} diff --git a/t/test3.chn b/t/test3.chn deleted file mode 100644 index 2fbdeab..0000000 --- a/t/test3.chn +++ /dev/null @@ -1,9 +0,0 @@ -@define{@define-function}{@syntax{@name @args @body}{@define{@name}{@lambda{@args}{@body}}}}% -@define-function{@foo}{@a @b}{hola @b}% -@foo{mundo}{casa} -@define{@section}{@lambda*{@title}{@gp{@quote{@section}}}{@title@siblings@title -}}% -@section{Hello World} -hola -@section{Good Bye World} -chao diff --git a/t/test4.chn b/t/test4.chn deleted file mode 100644 index e126091..0000000 --- a/t/test4.chn +++ /dev/null @@ -1,65 +0,0 @@ -{@define}{@title}{Method for solving first order and Bernoulli's differential equations} -{@define}{@author}{Thomas Albers Raviola} -{@define}{@date}{2022-10-01} -% -{@template} -{@section}{History} -I came across the method concerning this article in an old math book from Doctor -Granville (Elements of differential and integral calculus - ISBN-13: -978-968-18-1178-5). It doesn't appear to be a popular technique as when using it -for my assignments I always had to explain what I was doing. As of yet, I still -haven't found another text referencing it, which is why I decided to include it -in my website. - -In the original book this procedure is shown but never really explained, it is -left as a sort of "it just works" thing. Here is my attempt to it clear. - -{@section}{Theory} -Throughout this article we'll consider first order differential equations with -function coefficients just as a special case of the Bernoulli's differential -equation with {@eq*}{n = 0}. - -Consider now the following ODE: -{@equation}{ -y' + P(x)y = Q(x)y^n -} - -let {@eq*}{y} be the product of two arbitrary functions {@eq*}{w} and {@eq*}{z} -such that - -{@equation}{ -y &= wz \\ -y' &= w'z + wz' -} - -we now restrict {@eq*}{z} to be the solution of the ODE - -{@equation}{ -z' + P(x)z = 0 -} - -with this it is possible to solve for {@eq*}{z} by integrating - -{@equation}{ -\frac{z'}{z} = - P(x) -} - -using {@eq}{z} we solve for {@eq}{w} by replacing {@eq}{y} inside the original -ODE - -{@align}{ -w'z + wz' + P(x)wz &= Q(x)w^nz^n \\ -w'z + w\left(z' + P(x)z\right) &= Q(x)w^nz^n \\ -w'z &= Q(x)w^nz^n \\ -\frac{w'}{w^n} &= Q(x)z^{n-1} -} - -the general solution to our original ODE can be simply obtained by multiplying -{@eq*}{w} and {@eq*}{z}. - -{@section}{Comments} -This method, while functional, may not always be the most practical. In some -cases the differential equations for $w$ and $z$ may not have closed algebraic -solutions. A more traditional substitution may in some situations also be easier -than this method. Like always it is up to one to know which tool to apply for a -given problem. diff --git a/test/test1.chn b/test/test1.chn new file mode 100644 index 0000000..f55fb70 --- /dev/null +++ b/test/test1.chn @@ -0,0 +1,14 @@ +{@define}{@author}{Thomas Albers Raviola}% +{@define}{@today}{May 12, 2024}% +{@define}{@printdate}{{@lambda}{@date}{the date is @date}}% +{@section}{Introduction} + +Hello, this is a sample of a program written in chains + +Chains was created by @author to help him write articles of questionable +usefulness. + +{@printdate}{@today} +{@section}[Conclusion] + +idk man, guess it works, don't it? diff --git a/test/test1.html b/test/test1.html new file mode 100644 index 0000000..5da418f --- /dev/null +++ b/test/test1.html @@ -0,0 +1,8 @@ +

Introduction

+Hello, this is a sample of a program written in chains +Chains was created by Thomas Albers Raviola to help him write articles of questionable +usefulness. +the date is May 12, 2024 +

Conclusion

+idk man, guess it works, don't it? +
\ No newline at end of file diff --git a/test/test2.chn b/test/test2.chn new file mode 100644 index 0000000..a637b61 --- /dev/null +++ b/test/test2.chn @@ -0,0 +1,19 @@ +{@define}{@html-element}{{@lambda}{@name}{{@lambda}{@attr @content}{<@name @attr> +@content +}}}% +% +% +{@define}{@html-html}{{@html-element}{html}}% +{@define}{@html-head}{{@html-element}{head}}% +{@define}{@html-body}{{@html-element}{body}}% +{@define}{@html-title}{{@html-element}{title}}% +{@define}{@html-h1}{{@html-element}{h1}}% +{@define}{@html-p}{{@html-element}{p}}% +% +% +{@html-html}{}{% +{@html-head}{}{{@html-title}{}{Website}}% + +{@html-body}{}{ +{@html-h1}{}{Chains test} +{@html-p}{}{Hello World!}}} diff --git a/test/test2.html b/test/test2.html new file mode 100644 index 0000000..98a250a --- /dev/null +++ b/test/test2.html @@ -0,0 +1,16 @@ + + + +Website + + + + +

+Chains test +

+

+Hello World! +

+ + diff --git a/test/test3.chn b/test/test3.chn new file mode 100644 index 0000000..2fbdeab --- /dev/null +++ b/test/test3.chn @@ -0,0 +1,9 @@ +@define{@define-function}{@syntax{@name @args @body}{@define{@name}{@lambda{@args}{@body}}}}% +@define-function{@foo}{@a @b}{hola @b}% +@foo{mundo}{casa} +@define{@section}{@lambda*{@title}{@gp{@quote{@section}}}{@title@siblings@title +}}% +@section{Hello World} +hola +@section{Good Bye World} +chao diff --git a/test/test4.chn b/test/test4.chn new file mode 100644 index 0000000..e126091 --- /dev/null +++ b/test/test4.chn @@ -0,0 +1,65 @@ +{@define}{@title}{Method for solving first order and Bernoulli's differential equations} +{@define}{@author}{Thomas Albers Raviola} +{@define}{@date}{2022-10-01} +% +{@template} +{@section}{History} +I came across the method concerning this article in an old math book from Doctor +Granville (Elements of differential and integral calculus - ISBN-13: +978-968-18-1178-5). It doesn't appear to be a popular technique as when using it +for my assignments I always had to explain what I was doing. As of yet, I still +haven't found another text referencing it, which is why I decided to include it +in my website. + +In the original book this procedure is shown but never really explained, it is +left as a sort of "it just works" thing. Here is my attempt to it clear. + +{@section}{Theory} +Throughout this article we'll consider first order differential equations with +function coefficients just as a special case of the Bernoulli's differential +equation with {@eq*}{n = 0}. + +Consider now the following ODE: +{@equation}{ +y' + P(x)y = Q(x)y^n +} + +let {@eq*}{y} be the product of two arbitrary functions {@eq*}{w} and {@eq*}{z} +such that + +{@equation}{ +y &= wz \\ +y' &= w'z + wz' +} + +we now restrict {@eq*}{z} to be the solution of the ODE + +{@equation}{ +z' + P(x)z = 0 +} + +with this it is possible to solve for {@eq*}{z} by integrating + +{@equation}{ +\frac{z'}{z} = - P(x) +} + +using {@eq}{z} we solve for {@eq}{w} by replacing {@eq}{y} inside the original +ODE + +{@align}{ +w'z + wz' + P(x)wz &= Q(x)w^nz^n \\ +w'z + w\left(z' + P(x)z\right) &= Q(x)w^nz^n \\ +w'z &= Q(x)w^nz^n \\ +\frac{w'}{w^n} &= Q(x)z^{n-1} +} + +the general solution to our original ODE can be simply obtained by multiplying +{@eq*}{w} and {@eq*}{z}. + +{@section}{Comments} +This method, while functional, may not always be the most practical. In some +cases the differential equations for $w$ and $z$ may not have closed algebraic +solutions. A more traditional substitution may in some situations also be easier +than this method. Like always it is up to one to know which tool to apply for a +given problem. -- cgit v1.2.3