software necromancy with perl
play

Software necromancy with Perl Dave Lambley dlambley@cpan.org - PowerPoint PPT Presentation

Software necromancy with Perl Dave Lambley dlambley@cpan.org Accounting software Informix C-ISAM 1987 Perl 1.0 GCC 1.0 TPS report example Historic 4GL Variables bound to database fields. Schema defined outside code using UI.


  1. Software necromancy with Perl Dave Lambley dlambley@cpan.org

  2. Accounting software

  3. Informix C-ISAM

  4. 1987 ● Perl 1.0 ● GCC 1.0

  5. TPS report example

  6. Historic 4GL ● Variables bound to database fields. ● Schema defined outside code using UI. ● Weakish types.

  7. Implied dualvars, predating Perl’s?

  8. Regexp::Grammars ● Perl 5.10 recursive regexps. ● Build a parser from familiar regexps. ● No separate lexical analysis. ● Mis-parses are slow and hard to debug

  9. a s s i g n m e n t c o n s t a n t l v a l u e c o n s t a n t = 0 i d e n t i fj e r = t p s _ r e p o r t _ i d

  10. a s s i g n m e n t c o n s t a n t l v a l u e c o n s t a n t = 0 i d e n t i fj e r = t p s _ r e p o r t _ i d

  11. Regexp::Grammars

  12. s

  13. S e t a c c u m u l a t o r o n t p s _ s t a t u s C o m p a r i s o n I d e n t i fj e r = t p s _ s t a t u s e q 1 S e t a c c u m u l a t o r C o n s t a n t = 1 F o l l o w i n g l i n e s e t t p s _ n u m A d d t o a c c u m u l a t o r I d e n t i fj e r = t p s _ n u m + 1 Mu l t i p l y a c c u m u l a t o r C o n s t a n t = 1 * 3 S t o r e i n v a r i a b l e C o n s t a n t = 3 = t p s _ n u m S e t a c c u m u l a t o r I d e n t i fj e r = t p s _ n u m s e t t p s _ c h e c k o u t A d d t o a c c u m u l a t o r I d e n t i fj e r = t p s _ c h e c k o u t + 1 S t o r e i n v a r i a b l e C o n s t a n t = 1 = t p s _ c h e c k e d I d e n t i fj e r = t p s _ c h e c k e d

  14. Phases ● Preprocess text (join line continuations, remove comments. ● Parse lines to parse tree. ● Flatten parse tree to op list. ● Execute op list.

  15. In summary ● Laziness as a virtue predates Perl 1.0.

  16. But next ● Is Perl dead? ● Is the Perl demoscene dead?

  17. Presenting demo#1 ● Code by DLAMBLEY of CPAN. ● Grafix by .. no-one. ● Music by no-one.

  18. Demos and games need hardware Sources: CSG and Acorn Computer

  19. Source: https://www.khronos.org/opengl/wiki/Rendering_Pipeline_Overview

  20. OpenGL ● SDL.pm recommends OpenGL.pm. ● OpenGL.pm gives you most of OpenGL 1.2.

  21. Source: https://www.khronos.org/opengl/wiki/Rendering_Pipeline_Overview

  22. A vertex shader

  23. A fragment shader

  24. s

  25. Pascal? ● ObjectWindows ++ ● Pointer arithmetic ++ ● Compiler ++ ● IDE ++ ● System library --

  26. FreePascal ● Author terrified of leaving DOS. ● https://www.freepascal.org/ ● fpc -Mtp foo.pas ● fpc -Mtp -Ci -Co -CR -Cr -Ct -g foo.pas

  27. Artistic license? DFSG??

  28. A new GRAPHWIN.PAS ● “graphwin.pas”

  29. Running it

  30. Does it work?

  31. Grab the code! It works! ● https://github.com/davel/perldemo ● https://github.com/davel/pascal-games ● My customer needs more Perl, talk to me.

Recommend


More recommend