screwlisp on Nostr: Just for the people *not* mutual on #izzzzi with me, in my #lisp #series quest I ...
Just for the people *not* mutual on #izzzzi with me, in my #lisp #series quest I wrote a converter for published #fortran like https://web.archive.org/web/20081220142747/http://cnx.org/content/m17626/latest/ into #lisp s-expressions.
> (f2lisps "wfta3.f.txt")
(((C31 -0.8660254) (C32 -1.5)))
((R2 (* (A (+ (2) (- A)) (3)) C31)) (R1 (+ A2 A3)) (A1 (+ A1 R1))
(R1 (+ A1 (* R1 C32))) (S2 (* (B (+ (2) (- B)) (3)) C31)) (S1 (+ B2 B3))
(B1 (+ B1 S1)) (S1 (+ B1 (* S1 C32))) (A2 (+ R1 (- S2))) (A3 (+ R1 S2))
(B2 (+ S1 R2)) (B3 (+ S1 (- R2))))
inb4 wrong
> (f2lisps "wfta3.f.txt")
(((C31 -0.8660254) (C32 -1.5)))
((R2 (* (A (+ (2) (- A)) (3)) C31)) (R1 (+ A2 A3)) (A1 (+ A1 R1))
(R1 (+ A1 (* R1 C32))) (S2 (* (B (+ (2) (- B)) (3)) C31)) (S1 (+ B2 B3))
(B1 (+ B1 S1)) (S1 (+ B1 (* S1 C32))) (A2 (+ R1 (- S2))) (A3 (+ R1 S2))
(B2 (+ S1 R2)) (B3 (+ S1 (- R2))))
inb4 wrong