126 lines
8.1 KiB
HTML
126 lines
8.1 KiB
HTML
|
<!DOCTYPE html>
|
|||
|
<html>
|
|||
|
<head>
|
|||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|||
|
<title>CLiki: Exercises</title>
|
|||
|
<link rel="alternate" type="application/atom+xml" title="ATOM feed of edits to current article"
|
|||
|
href="https://www.cliki.net/site/feed/article.atom?title=Exercises">
|
|||
|
<link rel="stylesheet" href="static/css/style.css">
|
|||
|
<link rel="stylesheet" href="static/css/colorize.css">
|
|||
|
</head>
|
|||
|
|
|||
|
<body>
|
|||
|
<span class="hidden">CLiki - Exercises</span>
|
|||
|
<div id="content"><div id="content-area"><div id="article-title">Exercises</div><div id="article"><h2>Common Lisp Programming Exercises</h2><p>In general, you don't have to use a strict Common Lisp exercise
|
|||
|
source: a problem statement or a specification can be implemented in
|
|||
|
any programming language, including Common Lisp, even if the author of
|
|||
|
the problem had another specific programming language in mind. Of
|
|||
|
course, that means that some exercises become trivial, and other may
|
|||
|
be more difficult, so some adaptation may be needed: just take it as
|
|||
|
part of the exercise ;-)<p>Nevertheless, Common Lisp has specific and unique features which can only be addressed by a carefully designed set of exercises tailored to it. For example, standard exercises won't cover conditions or multiple (return) values, let alone macros.<p>Lisp Books:<p><ul><p><li>
|
|||
|
<a href="http://www.paulgraham.com/acl.html">ANSI Common Lisp</a> by Paul Graham seems to be the only textbook in existence coming with what resembles an exhaustive set of basic exercises. Check out <a href="http://www.cs.northwestern.edu/academics/courses/325/readings/graham/graham-notes.html">annotations</a> on this book by Chris Riesbeck as Graham's CL style is not flawless.</li><p><li>Despite its title, the book <a href="https://github.com/norvig/paip-lisp">Paradigms of Artificial Intelligence Programming</a> by Peter Norvig is a very good introductory book to Common Lisp. Each chapter contains exercises and answers to them.</li><p><li>
|
|||
|
<a href="http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-4.html">
|
|||
|
Structure and Interpretation of Computer Programs</a>
|
|||
|
has a number of exercises, similarly designed with scheme in mind,
|
|||
|
but that one can implement in Common Lisp without difficulty, such as:
|
|||
|
<a href="http://eli.thegreenplace.net/tag/sicp">Solutions in CL</a>
|
|||
|
by Eli Bendersky (only the first exercises are in CL, later he
|
|||
|
switched to scheme, but you can do everything in CL).<p></li>
|
|||
|
</ul><p>
|
|||
|
Probably the best sources of lisp exercises are your university
|
|||
|
courses and teachers, for example:<p><ul><p><li>
|
|||
|
<a href="http://www.eecs.yorku.ca/course_archive/2005-06/F/3401/LispProg.pdf">
|
|||
|
Lisp Recursive Programming Exercises</a> from York University (<a href="https://web.archive.org/web/20171118083355/https://www.eecs.yorku.ca/course_archive/2005-06/F/3401/LispProg.pdf">archive link</a>)<p></li>
|
|||
|
<li>
|
|||
|
<a href="http://dept-info.labri.fr/~idurand/enseignement/lst-info/PFS/TD/feuilles/">
|
|||
|
Travaux dirigés de programmation Lisp</a> from the Laboratoire de Recherche en Informatique (Bordeaux, France).<p></li>
|
|||
|
</ul><p>
|
|||
|
Here are some other lisp exercises sources.<p><ul><p><li>
|
|||
|
<a href="https://github.com/google/lisp-koans">Lisp Koans</a>
|
|||
|
Common Lisp Koans is a language learning exercise in the same vein as
|
|||
|
the ruby koans, python koans and others. It is a port of the prior
|
|||
|
koans with some modifications to highlight lisp-specific features<p>
|
|||
|
</li>
|
|||
|
<li>
|
|||
|
<a href="http://www.ic.unicamp.br/~meidanis/courses/mc336/2006s2/funcional/L-99_Ninety-Nine_Lisp_Problems.html">
|
|||
|
L-99: Ninety-Nine Lisp Problems</a>
|
|||
|
actually derived from a set of <a href="http://www.scribd.com/doc/18339544/99-prolog-problems">99 prolog problems</a>
|
|||
|
(<a href="http://informatimago.com/develop/lisp/l99/index.html">
|
|||
|
with CL solutions by informatimago</a>).<p></li>
|
|||
|
<li>Similarly, a set of Java array exercises:
|
|||
|
<a href="http://javarevisited.blogspot.com/2015/06/top-20-array-interview-questions-and-answers.html">
|
|||
|
30 Java array interview questions and answers</a>
|
|||
|
(<a href="https://gitlab.com/common-lisp-exercises/l30/blob/master/l30.lisp">
|
|||
|
with CL solutions by informatiamgo</a>).<p></li>
|
|||
|
<li>
|
|||
|
<a href="http://exercism.io/languages/common-lisp/about">Excercism.io</a> offers a Common Lisp track with 42 exercises. Each exercise comes with a unit test script.
|
|||
|
</li>
|
|||
|
</ul>
|
|||
|
<ul><p><li>
|
|||
|
<a href="http://programmingpraxis.com/">The blog Programming Praxis</a>
|
|||
|
proposes regularly interesting exercises (the blog author proposes scheme
|
|||
|
solutions but solutions in any language are accepted in the comments).
|
|||
|
<a href="https://gitlab.com/common-lisp-exercises/programming-praxis">Repository with Solutions in Common Lisp</a><a>.<p></a>
|
|||
|
</li>
|
|||
|
</ul><p>Some automatic on-line programming series accept lisp submissions, or
|
|||
|
lisp produced results, including:<p><ul><p><li>
|
|||
|
<a href="https://open.kattis.com/">Kattis Online Judge</a>
|
|||
|
where you would submit CL programs run with sbcl. See <a href="https://open.kattis.com/help/lisp">Kattis Lisp Help</a>.<p></li>
|
|||
|
<li>
|
|||
|
<a href="http://www.spoj.com/">Sphere Online Judge</a>
|
|||
|
where you would submit CL programs run with sbcl<p></li>
|
|||
|
<li>
|
|||
|
<a href="https://projecteuler.net/">Project Euler</a>
|
|||
|
where I'm told you only have to submit the answers,
|
|||
|
so you can use any CL implementation to compute them.<p></li>
|
|||
|
<li>
|
|||
|
<a href="https://www.codeeval.com/">CodeEval</a>
|
|||
|
has many coding challenges categorized easy, moderate, hard.
|
|||
|
It doesn't accept solutions written in CL, but who cares?
|
|||
|
</li>
|
|||
|
</ul><p>There are also language agnostic programming exercises books such as:
|
|||
|
<ul>
|
|||
|
<li>
|
|||
|
<a href="https://pragprog.com/book/bhwb/exercises-for-programmers">
|
|||
|
Exercises for Programmers – 57 Challenges to Develop Your Coding Skills</a>
|
|||
|
by Brian P. Hogan
|
|||
|
</li>
|
|||
|
<li><a href="https://techiedelight.quora.com/500-Data-Structures-and-Algorithms-interview-questions-and-their-solutions">500 Data Structures and Algorithms interview questions and their solutions</a></li>
|
|||
|
</ul><p>A useful resource can be <a href="http://ideone.com">IDEone</a>, a web IDE allowing you to write, compile and run little programs in various languages, including Common Lisp (sbcl or clisp).</div></div>
|
|||
|
<div id="footer" class="buttonbar"><ul><li><a href="Exercises.html">Current version</a></li>
|
|||
|
<li><a href="https://www.cliki.net/site/history?article=Exercises">History</a></li>
|
|||
|
<li><a href="https://www.cliki.net/site/backlinks?article=Exercises">Backlinks</a></li><li><a href="https://www.cliki.net/site/edit-article?title=Exercises&from-revision=3858409044">Edit</a></li><li><a href="https://www.cliki.net/site/edit-article?create=t">Create</a></li></ul></div>
|
|||
|
</div>
|
|||
|
<div id="header-buttons" class="buttonbar">
|
|||
|
<ul>
|
|||
|
<li><a href="https://www.cliki.net/">Home</a></li>
|
|||
|
<li><a href="https://www.cliki.net/site/recent-changes">Recent Changes</a></li>
|
|||
|
<li><a href="CLiki.html">About</a></li>
|
|||
|
<li><a href="Text Formatting.html">Text Formatting</a></li>
|
|||
|
<li><a href="https://www.cliki.net/site/tools">Tools</a></li>
|
|||
|
</ul>
|
|||
|
<div id="search">
|
|||
|
<form action="https://www.cliki.net/site/search">
|
|||
|
<label for="search_query" class="hidden">Search CLiki</label>
|
|||
|
<input type="text" name="query" id="search_query" value="" />
|
|||
|
<input type="submit" value="search" />
|
|||
|
</form>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div id="pageheader">
|
|||
|
<div id="header">
|
|||
|
<span id="logo">CLiki</span>
|
|||
|
<span id="slogan">the common lisp wiki</span>
|
|||
|
<div id="login"><form method="post" action="https://www.cliki.net/site/login">
|
|||
|
<label for="login_name" class="hidden">Account name</label>
|
|||
|
<input type="text" name="name" id="login_name" class="login_input" />
|
|||
|
<label for= "login_password" class="hidden">Password</label>
|
|||
|
<input type="password" name="password" id="login_password" class="login_input" />
|
|||
|
<input type="submit" name="login" value="login" id="login_submit" /><br />
|
|||
|
<div id="register"><a href="https://www.cliki.net/site/register">register</a></div>
|
|||
|
<input type="submit" name="reset-pw" value="reset password" id="reset_pw" />
|
|||
|
</form>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</body></html>
|