1 SRI International Bioinformatics Introduction to Lisp Peter D. Karp, Ph.D. Bioinformatics Research...
-
Upload
anis-wilcox -
Category
Documents
-
view
213 -
download
1
Transcript of 1 SRI International Bioinformatics Introduction to Lisp Peter D. Karp, Ph.D. Bioinformatics Research...
![Page 1: 1 SRI International Bioinformatics Introduction to Lisp Peter D. Karp, Ph.D. Bioinformatics Research Group SRI International pkarp@ai.sri.com.](https://reader035.fdocuments.in/reader035/viewer/2022072011/56649e035503460f94aeda8a/html5/thumbnails/1.jpg)
1 SRI International Bioinformatics
Introduction to Lisp
Peter D. Karp, Ph.D.Bioinformatics Research Group
SRI International
![Page 2: 1 SRI International Bioinformatics Introduction to Lisp Peter D. Karp, Ph.D. Bioinformatics Research Group SRI International pkarp@ai.sri.com.](https://reader035.fdocuments.in/reader035/viewer/2022072011/56649e035503460f94aeda8a/html5/thumbnails/2.jpg)
2 SRI International Bioinformatics
Approx presentation time along with hello.lisp: 1.5 hrs
![Page 3: 1 SRI International Bioinformatics Introduction to Lisp Peter D. Karp, Ph.D. Bioinformatics Research Group SRI International pkarp@ai.sri.com.](https://reader035.fdocuments.in/reader035/viewer/2022072011/56649e035503460f94aeda8a/html5/thumbnails/3.jpg)
3 SRI International Bioinformatics
Common Lisp ProgrammingEnvironment
Interpreted and/or compiled executionInteractive data explorationFabulous debugging environmentHigh-level languageExtensive built-in libraries: XML, regexpsDynamic redefinition
Find out more! See ALU.org or http://www.international-lisp-conference.org/
![Page 4: 1 SRI International Bioinformatics Introduction to Lisp Peter D. Karp, Ph.D. Bioinformatics Research Group SRI International pkarp@ai.sri.com.](https://reader035.fdocuments.in/reader035/viewer/2022072011/56649e035503460f94aeda8a/html5/thumbnails/4.jpg)
4 SRI International Bioinformatics
Why Do We Code in Common Lisp?
Gatt studied Lisp and Java implementation of 16 programs by 14 programmers (Intelligence 11:21 2000)
The average Lisp program ran 33 times faster than the average Java program
The average Lisp program was written 5 times faster than the average Java program
Roberts compared Java and Lisp implementations of a Domain Name Server (DNS) resolver
http://www.findinglisp.com/papers/case_study_java_lisp_dns.html The Lisp version had ½ as many lines of code
![Page 5: 1 SRI International Bioinformatics Introduction to Lisp Peter D. Karp, Ph.D. Bioinformatics Research Group SRI International pkarp@ai.sri.com.](https://reader035.fdocuments.in/reader035/viewer/2022072011/56649e035503460f94aeda8a/html5/thumbnails/5.jpg)
5 SRI International Bioinformatics
The Common Lisp ProgrammingEnvironment
Gatt studied Lisp and Java implementation of 16 programs by 14 programmers (Intelligence 11:21 2000)
![Page 6: 1 SRI International Bioinformatics Introduction to Lisp Peter D. Karp, Ph.D. Bioinformatics Research Group SRI International pkarp@ai.sri.com.](https://reader035.fdocuments.in/reader035/viewer/2022072011/56649e035503460f94aeda8a/html5/thumbnails/6.jpg)
6 SRI International Bioinformatics
Peter Norvig’s Solution
“I wrote my version in Lisp. It took me about 2 hours (compared to a range of 2-8.5 hours for the other Lisp programmers in the study, 3-25 for C/C++ and 4-63 for Java) and I ended up with 45 non-comment non-blank lines (compared with a range of 51-182 for Lisp, and 107-614 for the other languages). (That means that some Java programmer was spending 13 lines and 84 minutes to provide the functionality of each line of my Lisp program.)”
http://www.norvig.com/java-lisp.html
![Page 7: 1 SRI International Bioinformatics Introduction to Lisp Peter D. Karp, Ph.D. Bioinformatics Research Group SRI International pkarp@ai.sri.com.](https://reader035.fdocuments.in/reader035/viewer/2022072011/56649e035503460f94aeda8a/html5/thumbnails/7.jpg)
7 SRI International Bioinformatics
Interacting with Lisp
Read-eval-print loop
Load file of code into Lisp image
Use Emacs to incrementally redefine functions
hello.lisp
![Page 8: 1 SRI International Bioinformatics Introduction to Lisp Peter D. Karp, Ph.D. Bioinformatics Research Group SRI International pkarp@ai.sri.com.](https://reader035.fdocuments.in/reader035/viewer/2022072011/56649e035503460f94aeda8a/html5/thumbnails/8.jpg)
8 SRI International Bioinformatics
Lisp Images -- dumplisp
Load code and data into Lisp virtual memory
Save as executable binary file