Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

got rid of some lurking (and useless) relative references to util.scm…

… which were causes PLaneT to barf
  • Loading branch information...
commit 605cb6b2ebc0010e7f231205720d4235ade50135 1 parent 32bc964
@vegashacker authored
View
2  info.ss
@@ -3,7 +3,7 @@
(define blurb '((p "LeftParen lets you make web apps quickly.")))
(define release-notes '((p "This is a major upgrade that is now compatible with PLT 4.1. There are many other miscellaneous improvements too.")))
(define primary-file "leftparen.scm")
-(define scribblings '(("doc.scrbl" ())))
+(define scribblings '(("scribblings/leftparen.scrbl" ())))
(define required-core-version "4.1")
(define repositories '("4.x"))
(define categories '(devtools net))
View
2  profiler.scm
@@ -1,6 +1,6 @@
#lang scheme/base
-(require (file "../leftparen/util.scm"))
+(require (file "util.scm"))
(provide profile
define-profile)
View
6 scribblings/doc.html → scribblings/leftparen.html
@@ -1,5 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html><head><meta http-equiv="content-type" content="text-html; charset=utf-8" /><title>LeftParen 0.3 Documentation</title><link rel="stylesheet" type="text/css" href="scribble.css" title="default" /><script type="text/javascript" src="scribble-common.js"></script></head><body><div class="tocset"><div class="tocview"><div class="tocviewlist" style="margin-bottom: 1em;"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_0&quot;);">&#9658;</a></td><td></td><td><a href="file:///Users/rob/leftparen/doc.html" class="tocviewselflink">Left<span class="mywbr"> </span>Paren 0.3 Documentation</a></td></tr></table></div><div class="tocviewsublistonly" style="display: none;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1&nbsp;</td><td><a href="file:///Users/rob/leftparen/doc.html#(part._.Installing_.Left.Paren)" class="tocviewlink">Installing Left<span class="mywbr"> </span>Paren</a></td></tr><tr><td align="right">2&nbsp;</td><td><a href="file:///Users/rob/leftparen/doc.html#(part._tutorials)" class="tocviewlink">Tutorials</a></td></tr><tr><td align="right">3&nbsp;</td><td><a href="file:///Users/rob/leftparen/doc.html#(part._.More_.Documentation_to_.Come)" class="tocviewlink">More Documentation to Come</a></td></tr><tr><td align="right">4&nbsp;</td><td><a href="file:///Users/rob/leftparen/doc.html#(part._.About_.Acknowledgements)" class="tocviewlink">About/<span class="mywbr"> </span>Acknowledgements</a></td></tr></table></div></div></div><div class="tocsub"><table class="tocsublist" cellspacing="0"><tr><td><span class="tocsublinknumber">1<tt>&nbsp;</tt></span><a href="#(part._.Installing_.Left.Paren)" class="tocsubseclink">Installing Left<span class="mywbr"> </span>Paren</a></td></tr><tr><td><span class="tocsublinknumber">2<tt>&nbsp;</tt></span><a href="#(part._tutorials)" class="tocsubseclink">Tutorials</a></td></tr><tr><td><span class="tocsublinknumber">2.1<tt>&nbsp;</tt></span><a href="#(part._.Hello__.World)" class="tocsubseclink">Hello, World</a></td></tr><tr><td><span class="tocsublinknumber">2.2<tt>&nbsp;</tt></span><a href="#(part._.Blogerton_the_.Blog)" class="tocsubseclink">Blogerton the Blog</a></td></tr><tr><td><span class="tocsublinknumber">2.2.1<tt>&nbsp;</tt></span><a href="#(part._.Changes_to_app_scm)" class="tocsubseclink">Changes to <span class="stt">app.scm</span></a></td></tr><tr><td><span class="tocsublinknumber">2.2.2<tt>&nbsp;</tt></span><a href="#(part._.Changes_to_main_scm)" class="tocsubseclink">Changes to <span class="stt">main.scm</span></a></td></tr><tr><td><span class="tocsublinknumber">2.2.3<tt>&nbsp;</tt></span><a href="#(part._.Launch_.Blogerton)" class="tocsubseclink">Launch Blogerton</a></td></tr><tr><td><span class="tocsublinknumber">3<tt>&nbsp;</tt></span><a href="#(part._.More_.Documentation_to_.Come)" class="tocsubseclink">More Documentation to Come</a></td></tr><tr><td><span class="tocsublinknumber">4<tt>&nbsp;</tt></span><a href="#(part._.About_.Acknowledgements)" class="tocsubseclink">About/<span class="mywbr"> </span>Acknowledgements</a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="versionbox"><span class="version">Version: 4.1.0.3</span></div><div class="navset" style="margin-bottom: 2em; border-bottom: 2px solid #e0e0c0;"><span class="navleft"><input style="width: 16em; margin: 0px; padding: 0px; background-color: #eee; color: #888; border: 1px solid #ddd; text-align: center; vertical-align: middle;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;4.1.0.3&quot;, &quot;&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }" />&nbsp;&nbsp;</span>&nbsp;</div><h2><a name="(part._.Left.Paren_0_3_.Documentation)"></a>LeftParen 0.3 Documentation</h2><p>Website: <a href="http://leftparen.com">http://leftparen.com</a></p><p>LeftParen is a framework for quickly creating web apps. It runs on
+<html><head><meta http-equiv="content-type" content="text-html; charset=utf-8" /><title>LeftParen 0.3 Documentation</title><link rel="stylesheet" type="text/css" href="scribble.css" title="default" /><script type="text/javascript" src="scribble-common.js"></script></head><body><div class="tocset"><div class="tocview"><div class="tocviewlist" style="margin-bottom: 1em;"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_0&quot;);">&#9658;</a></td><td></td><td><a href="file:///Users/rob/leftparen/scribblings/leftparen.html" class="tocviewselflink">Left<span class="mywbr"> </span>Paren 0.3 Documentation</a></td></tr></table></div><div class="tocviewsublistonly" style="display: none;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1&nbsp;</td><td><a href="file:///Users/rob/leftparen/scribblings/leftparen.html#(part._.Installing_.Left.Paren)" class="tocviewlink">Installing Left<span class="mywbr"> </span>Paren</a></td></tr><tr><td align="right">2&nbsp;</td><td><a href="file:///Users/rob/leftparen/scribblings/leftparen.html#(part._tutorials)" class="tocviewlink">Tutorials</a></td></tr><tr><td align="right">3&nbsp;</td><td><a href="file:///Users/rob/leftparen/scribblings/leftparen.html#(part._.More_.Documentation_to_.Come)" class="tocviewlink">More Documentation to Come</a></td></tr><tr><td align="right">4&nbsp;</td><td><a href="file:///Users/rob/leftparen/scribblings/leftparen.html#(part._.About_.Acknowledgements)" class="tocviewlink">About/<span class="mywbr"> </span>Acknowledgements</a></td></tr></table></div></div></div><div class="tocsub"><table class="tocsublist" cellspacing="0"><tr><td><span class="tocsublinknumber">1<tt>&nbsp;</tt></span><a href="#(part._.Installing_.Left.Paren)" class="tocsubseclink">Installing Left<span class="mywbr"> </span>Paren</a></td></tr><tr><td><span class="tocsublinknumber">2<tt>&nbsp;</tt></span><a href="#(part._tutorials)" class="tocsubseclink">Tutorials</a></td></tr><tr><td><span class="tocsublinknumber">2.1<tt>&nbsp;</tt></span><a href="#(part._.Hello__.World)" class="tocsubseclink">Hello, World</a></td></tr><tr><td><span class="tocsublinknumber">2.2<tt>&nbsp;</tt></span><a href="#(part._.Blogerton_the_.Blog)" class="tocsubseclink">Blogerton the Blog</a></td></tr><tr><td><span class="tocsublinknumber">2.2.1<tt>&nbsp;</tt></span><a href="#(part._.Changes_to_app_scm)" class="tocsubseclink">Changes to <span class="stt">app.scm</span></a></td></tr><tr><td><span class="tocsublinknumber">2.2.2<tt>&nbsp;</tt></span><a href="#(part._.Changes_to_main_scm)" class="tocsubseclink">Changes to <span class="stt">main.scm</span></a></td></tr><tr><td><span class="tocsublinknumber">2.2.3<tt>&nbsp;</tt></span><a href="#(part._.Launch_.Blogerton)" class="tocsubseclink">Launch Blogerton</a></td></tr><tr><td><span class="tocsublinknumber">3<tt>&nbsp;</tt></span><a href="#(part._.More_.Documentation_to_.Come)" class="tocsubseclink">More Documentation to Come</a></td></tr><tr><td><span class="tocsublinknumber">4<tt>&nbsp;</tt></span><a href="#(part._.About_.Acknowledgements)" class="tocsubseclink">About/<span class="mywbr"> </span>Acknowledgements</a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="versionbox"><span class="version">Version: 4.1.0.3</span></div><div class="navset" style="margin-bottom: 2em; border-bottom: 2px solid #e0e0c0;"><span class="navleft"><input style="width: 16em; margin: 0px; padding: 0px; background-color: #eee; color: #888; border: 1px solid #ddd; text-align: center; vertical-align: middle;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;4.1.0.3&quot;, &quot;&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }" />&nbsp;&nbsp;</span>&nbsp;</div><h2><a name="(part._.Left.Paren_0_3_.Documentation)"></a>LeftParen 0.3 Documentation</h2><p>Website: <a href="http://leftparen.com">http://leftparen.com</a></p><p>LeftParen is a framework for quickly creating web apps. It runs on
PLT Scheme v4.1 or greater. LeftParen is released under an <a href="http://github.com/vegashacker/leftparen/tree/master/MIT-LICENSE.txt">MIT License</a>. The source is available on <a href="http://github.com/vegashacker/leftparen/tree/master">github</a>.</p><h3>1<tt>&nbsp;</tt><a name="(part._.Installing_.Left.Paren)"></a>Installing LeftParen</h3><p>You&rsquo;ll need PLT Scheme v4.1 or greater installed.</p><p>Make sure that <span class="schemesymbol">mzscheme</span> is in your path. You should be ready
-to go if you can do this:</p><p><table cellspacing="0"><tr><td><p><span class="stt"><span class="stt">% mzscheme</span></span></p></td></tr><tr><td><p><span class="stt"><span class="stt">Welcome to MzScheme v4.1...</span></span></p></td></tr><tr><td><p><span class="stt"><span class="stt">&gt;</span></span></p></td></tr></table></p><p>Installing LeftParen is done behind the scenes with a <a href="http://planet.plt-scheme.org/">PLaneT</a> <span class="schemesymbol">require</span>. See <a href="file:///Users/rob/leftparen/doc.html#(part._tutorials)">Tutorials</a> for an example of this. When you
-first issue one of these <span class="schemesymbol">require</span> commands, you&rsquo;ll automatically download the LeftParen files to your local PLaneT cache. This can sometimes take a few moments, so be prepared to wait a bit.</p><h3>2<tt>&nbsp;</tt><a name="(part._tutorials)"></a>Tutorials</h3><h4>2.1<tt>&nbsp;</tt><a name="(part._.Hello__.World)"></a>Hello, World</h4><p>We&rsquo;re going to make a project called <span class="stt">hello-world</span>. Change to the directory that you&rsquo;d like to make the project in. Then issue</p><p><table cellspacing="0"><tr><td><p><span class="stt"><span class="stt">% mzscheme -e '(require (planet "bootstrap.scm" ("vegashacker" "leftparen.plt" 2 0)))' project hello-world</span></span></p></td></tr></table></p><p>This will create a <span class="stt">hello-world</span> project directory for you. In this directory you&rsquo;ll find the <span class="stt">script</span> directory, which contains some useful scripts. All paths are relative to this project directory, so when calling scripts, you always want to be at the project root.</p><p><table cellspacing="0"><tr><td><p><span class="stt"><span class="stt">% cd hello-world</span></span></p></td></tr></table></p><p>We need to make the scripts executable:</p><p><table cellspacing="0"><tr><td><p><span class="stt"><span class="stt">% chmod u+x script/*</span></span></p></td></tr></table></p><p>LeftParen has automatically generated everything we need to run our web app &ndash; we just need to start the server (again, you should be at the project root directory):</p><p><table cellspacing="0"><tr><td><p><span class="stt"><span class="stt">% ./script/server</span></span></p></td></tr><tr><td><p><span class="stt"><span class="stt">Web server started on port 8765</span></span></p></td></tr><tr><td><p><span class="stt"><span class="stt">Listening on IP address: 127.0.0.1</span></span></p></td></tr><tr><td><p><span class="stt"><span class="stt">Type stop to stop the server and exit</span></span></p></td></tr><tr><td><p><span class="stt"><span class="stt">Type restart to restart the server</span></span></p></td></tr></table></p><p>Point your browser to <a href="http://localhost:8765">http://localhost:8765</a> and you should see a familiar greeting:</p><p><span class="stt">Hello, World!</span></p><h4>2.2<tt>&nbsp;</tt><a name="(part._.Blogerton_the_.Blog)"></a>Blogerton the Blog</h4><p>Now let&rsquo;s try implementing the true "hello world" of web apps &ndash; a blog. First, execute the following commands from the directory in which you want to create your project directory:</p><p><table cellspacing="0"><tr><td><p><span class="stt"><span class="stt">% mzscheme -e '(require (planet "bootstrap.scm" ("vegashacker" "leftparen.plt" 1 3)))' project blogerton</span></span></p></td></tr><tr><td><p><span class="stt"><span class="stt">% cd blogerton</span></span></p></td></tr><tr><td><p><span class="stt"><span class="stt">% chmod u+x script/*</span></span></p></td></tr></table></p><h5>2.2.1<tt>&nbsp;</tt><a name="(part._.Changes_to_app_scm)"></a>Changes to <span class="stt">app.scm</span></h5><p>We need to register a couple of pages in our app. The <span class="schemesymbol">index-page</span> was already set up for you, but you&rsquo;ll need to add a page to create new posts, and one to view them. Make the <span class="schemesymbol">define-app</span> call look like this:</p><p><table cellspacing="0" class="schemeblock"><tr><td><p><span class="hspace">&nbsp;&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">define-app</span><span class="hspace">&nbsp;</span><span class="schemesymbol">my-app</span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span><span class="hspace">&nbsp;&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">index-page</span><span class="hspace">&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">url</span><span class="hspace">&nbsp;</span><span class="schemevalue">"/"</span><span class="schemeparen">)</span><span class="schemeparen">)</span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span><span class="hspace">&nbsp;&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">create-post-page</span><span class="hspace">&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">url</span><span class="hspace">&nbsp;</span><span class="schemevalue">"/post"</span><span class="schemeparen">)</span><span class="schemeparen">)</span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span><span class="hspace">&nbsp;&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">view-post-page</span><span class="hspace">&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">url</span><span class="hspace">&nbsp;</span><span class="schemevalue">"/view/"</span><span class="hspace">&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">string-arg</span><span class="schemeparen">)</span><span class="schemeparen">)</span><span class="schemeparen">)</span><span class="schemeparen">)</span></p></td></tr></table></p><h5>2.2.2<tt>&nbsp;</tt><a name="(part._.Changes_to_main_scm)"></a>Changes to <span class="stt">main.scm</span></h5><p>Now we need to define those pages that we declared in <span class="stt">app.scm</span>.</p><p><table cellspacing="0" class="schemeblock"><tr><td><p><span class="hspace">&nbsp;&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">define-page</span><span class="hspace">&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">index-page</span><span class="hspace">&nbsp;</span><span class="schemesymbol">req</span><span class="schemeparen">)</span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span><span class="hspace">&nbsp;&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">**</span><span class="hspace">&nbsp;</span><span class="schemevalue">`</span><span class="schemevalue">(</span><span class="schemevalue">h1</span><span class="hspace">&nbsp;</span><span class="schemevalue">"Blogerton"</span><span class="schemevalue">)</span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="schemevalue">`</span><span class="schemevalue">(</span><span class="schemevalue">p</span><span class="hspace">&nbsp;</span><span class="schemereader">,</span><span class="schemeparen">(</span><span class="schemesymbol">web-link</span><span class="hspace">&nbsp;</span><span class="schemevalue">"Create a new post"</span><span class="hspace">&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">page-url</span><span class="hspace">&nbsp;</span><span class="schemesymbol">create-post-page</span><span class="schemeparen">)</span><span class="schemeparen">)</span><span class="schemevalue">)</span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="schemevalue">`</span><span class="schemevalue">(</span><span class="schemevalue">ul</span><span class="hspace">&nbsp;</span><span class="schemereader">,@</span><span class="schemeparen">(</span><span class="schemesymbol">map</span><span class="hspace">&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">lambda</span><span class="hspace">&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">p</span><span class="schemeparen">)</span><span class="hspace">&nbsp;</span><span class="schemevalue">`</span><span class="schemevalue">(</span><span class="schemevalue">li</span><span class="hspace">&nbsp;</span><span class="schemereader">,</span><span class="schemeparen">(</span><span class="schemesymbol">paint-blog-post</span><span class="hspace">&nbsp;</span><span class="schemesymbol">p</span><span class="schemeparen">)</span><span class="schemevalue">)</span><span class="schemeparen">)</span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">load-where</span><span class="hspace">&nbsp;</span><span class="schemevalue">'</span><span class="schemevalue">(</span><span class="schemevalue">(</span><span class="schemevalue">type</span><span class="hspace">&nbsp;</span><span class="schemevalue">. </span><span class="schemevalue">blog-post</span><span class="schemevalue">)</span><span class="schemevalue">)</span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="schemeparen">#:sort-by</span><span class="hspace">&nbsp;</span><span class="schemevalue">'</span><span class="schemevalue">created-at</span><span class="hspace">&nbsp;</span><span class="schemeparen">#:compare</span><span class="hspace">&nbsp;</span><span class="schemesymbol">&gt;</span><span class="schemeparen">)</span><span class="schemeparen">)</span><span class="schemevalue">)</span><span class="schemeparen">)</span><span class="schemeparen">)</span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span><span class="schemeparen">(</span><span class="schemesymbol">define-page</span><span class="hspace">&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">create-post-page</span><span class="hspace">&nbsp;</span><span class="schemesymbol">req</span><span class="schemeparen">)</span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span><span class="hspace">&nbsp;&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">form</span><span class="hspace">&nbsp;</span><span class="schemevalue">'</span><span class="schemevalue">(</span><span class="schemevalue">(</span><span class="schemevalue">title</span><span class="hspace">&nbsp;</span><span class="schemevalue">"Title"</span><span class="hspace">&nbsp;</span><span class="schemevalue">text</span><span class="schemevalue">)</span><span class="hspace">&nbsp;</span><span class="schemevalue">(</span><span class="schemevalue">body</span><span class="hspace">&nbsp;</span><span class="schemevalue">"Body"</span><span class="hspace">&nbsp;</span><span class="schemevalue">long-text</span><span class="schemevalue">)</span><span class="schemevalue">)</span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="schemeparen">#:init</span><span class="hspace">&nbsp;</span><span class="schemevalue">'</span><span class="schemevalue">(</span><span class="schemevalue">(</span><span class="schemevalue">type</span><span class="hspace">&nbsp;</span><span class="schemevalue">. </span><span class="schemevalue">blog-post</span><span class="schemevalue">)</span><span class="schemevalue">)</span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="schemeparen">#:on-done</span><span class="hspace">&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">lambda</span><span class="hspace">&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">post</span><span class="schemeparen">)</span><span class="hspace">&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">redirect-to-page</span><span class="hspace">&nbsp;</span><span class="schemesymbol">view-post-page</span><span class="hspace">&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">rec-id</span><span class="hspace">&nbsp;</span><span class="schemesymbol">post</span><span class="schemeparen">)</span><span class="schemeparen">)</span><span class="schemeparen">)</span><span class="schemeparen">)</span><span class="schemeparen">)</span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span><span class="schemeparen">(</span><span class="schemesymbol">define-page</span><span class="hspace">&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">view-post-page</span><span class="hspace">&nbsp;</span><span class="schemesymbol">req</span><span class="hspace">&nbsp;</span><span class="schemesymbol">post-id</span><span class="schemeparen">)</span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span><span class="hspace">&nbsp;&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">paint-blog-post</span><span class="hspace">&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">load-rec</span><span class="hspace">&nbsp;</span><span class="schemesymbol">post-id</span><span class="hspace">&nbsp;</span><span class="schemeparen">#:ensure</span><span class="hspace">&nbsp;</span><span class="schemevalue">'</span><span class="schemevalue">(</span><span class="schemevalue">(</span><span class="schemevalue">type</span><span class="hspace">&nbsp;</span><span class="schemevalue">. </span><span class="schemevalue">blog-post</span><span class="schemevalue">)</span><span class="schemevalue">)</span><span class="schemeparen">)</span><span class="schemeparen">)</span><span class="schemeparen">)</span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span><span class="schemeparen">(</span><span class="schemesymbol">define</span><span class="hspace">&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">paint-blog-post</span><span class="hspace">&nbsp;</span><span class="schemesymbol">post</span><span class="schemeparen">)</span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span><span class="hspace">&nbsp;&nbsp;</span><span class="schemevalue">`</span><span class="schemevalue">(</span><span class="schemevalue">div</span><span class="hspace">&nbsp;</span><span class="schemevalue">(</span><span class="schemevalue">h2</span><span class="hspace">&nbsp;</span><span class="schemereader">,</span><span class="schemeparen">(</span><span class="schemesymbol">rec-prop</span><span class="hspace">&nbsp;</span><span class="schemesymbol">post</span><span class="hspace">&nbsp;</span><span class="schemevalue">'</span><span class="schemevalue">title</span><span class="schemeparen">)</span><span class="schemevalue">)</span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="schemevalue">(</span><span class="schemevalue">p</span><span class="hspace">&nbsp;</span><span class="schemereader">,</span><span class="schemeparen">(</span><span class="schemesymbol">rec-prop</span><span class="hspace">&nbsp;</span><span class="schemesymbol">post</span><span class="hspace">&nbsp;</span><span class="schemevalue">'</span><span class="schemevalue">body</span><span class="schemeparen">)</span><span class="schemevalue">)</span><span class="schemevalue">)</span><span class="schemeparen">)</span></p></td></tr></table></p><h5>2.2.3<tt>&nbsp;</tt><a name="(part._.Launch_.Blogerton)"></a>Launch Blogerton</h5><p>You&rsquo;re ready for launch. Start the server with</p><p><table cellspacing="0"><tr><td><p><span class="stt"><span class="stt">% ./script/server</span></span></p></td></tr></table></p><p>and you should have a basic blogging app, with persistent data, in 19 lines of code.</p><h3>3<tt>&nbsp;</tt><a name="(part._.More_.Documentation_to_.Come)"></a>More Documentation to Come</h3><p>We need to get a full LeftParen reference up (not just simple tutorials). There&rsquo;s lots more cool stuff in LeftParen that this document doesn&rsquo;t yet address.</p><h3>4<tt>&nbsp;</tt><a name="(part._.About_.Acknowledgements)"></a>About/Acknowledgements</h3><p>LeftParen was written by <a href="http://robhunter.org">Rob Hunter</a>, but it builds heavily on (and, in fact, often directly incorporates) the work of <a href="http://untyped.com/">Untyped</a> (<a href="http://planet.plt-scheme.org/display.ss?package=instaservlet.plt&amp;owner=untyped">instaservlet</a> and <a href="http://planet.plt-scheme.org/display.ss?package=dispatch.plt&amp;owner=untyped">dispatch</a>), <a href="http://scheme.dk/blog/">Jens Axel Soegaard</a> (<a href="http://planet.plt-scheme.org/display.ss?package=web.plt&amp;owner=soegaard">web.plt</a>), and of course, <a href="http://www.plt-scheme.org/">PLT Scheme</a>.</p><div class="navset" style="margin-top: 2em; border-top: 2px solid #e0e0c0;"><span class="navleft"><input style="width: 16em; margin: 0px; padding: 0px; background-color: #eee; color: #888; border: 1px solid #ddd; text-align: center; vertical-align: middle;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;4.1.0.3&quot;, &quot;&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }" />&nbsp;&nbsp;</span>&nbsp;</div></div></div></body></html>
+to go if you can do this:</p><p><table cellspacing="0"><tr><td><p><span class="stt"><span class="stt">% mzscheme</span></span></p></td></tr><tr><td><p><span class="stt"><span class="stt">Welcome to MzScheme v4.1...</span></span></p></td></tr><tr><td><p><span class="stt"><span class="stt">&gt;</span></span></p></td></tr></table></p><p>Installing LeftParen is done behind the scenes with a <a href="http://planet.plt-scheme.org/">PLaneT</a> <span class="schemesymbol">require</span>. See <a href="file:///Users/rob/leftparen/scribblings/leftparen.html#(part._tutorials)">Tutorials</a> for an example of this. When you
+first issue one of these <span class="schemesymbol">require</span> commands, you&rsquo;ll automatically download the LeftParen files to your local PLaneT cache. This can sometimes take a few moments, so be prepared to wait a bit.</p><h3>2<tt>&nbsp;</tt><a name="(part._tutorials)"></a>Tutorials</h3><h4>2.1<tt>&nbsp;</tt><a name="(part._.Hello__.World)"></a>Hello, World</h4><p>We&rsquo;re going to make a project called <span class="stt">hello-world</span>. Change to the directory that you&rsquo;d like to make the project in. Then issue</p><p><table cellspacing="0"><tr><td><p><span class="stt"><span class="stt">% mzscheme -e '(require (planet "bootstrap.scm" ("vegashacker" "leftparen.plt" 2 1)))' project hello-world</span></span></p></td></tr></table></p><p>This will create a <span class="stt">hello-world</span> project directory for you. In this directory you&rsquo;ll find the <span class="stt">script</span> directory, which contains some useful scripts. All paths are relative to this project directory, so when calling scripts, you always want to be at the project root.</p><p><table cellspacing="0"><tr><td><p><span class="stt"><span class="stt">% cd hello-world</span></span></p></td></tr></table></p><p>We need to make the scripts executable:</p><p><table cellspacing="0"><tr><td><p><span class="stt"><span class="stt">% chmod u+x script/*</span></span></p></td></tr></table></p><p>LeftParen has automatically generated everything we need to run our web app &ndash; we just need to start the server (again, you should be at the project root directory):</p><p><table cellspacing="0"><tr><td><p><span class="stt"><span class="stt">% ./script/server</span></span></p></td></tr><tr><td><p><span class="stt"><span class="stt">Web server started on port 8765</span></span></p></td></tr><tr><td><p><span class="stt"><span class="stt">Listening on IP address: 127.0.0.1</span></span></p></td></tr><tr><td><p><span class="stt"><span class="stt">Type stop to stop the server and exit</span></span></p></td></tr><tr><td><p><span class="stt"><span class="stt">Type restart to restart the server</span></span></p></td></tr></table></p><p>Point your browser to <a href="http://localhost:8765">http://localhost:8765</a> and you should see a familiar greeting:</p><p><span class="stt">Hello, World!</span></p><h4>2.2<tt>&nbsp;</tt><a name="(part._.Blogerton_the_.Blog)"></a>Blogerton the Blog</h4><p>Now let&rsquo;s try implementing the true "hello world" of web apps &ndash; a blog. First, execute the following commands from the directory in which you want to create your project directory:</p><p><table cellspacing="0"><tr><td><p><span class="stt"><span class="stt">% mzscheme -e '(require (planet "bootstrap.scm" ("vegashacker" "leftparen.plt" 2 1)))' project blogerton</span></span></p></td></tr><tr><td><p><span class="stt"><span class="stt">% cd blogerton</span></span></p></td></tr><tr><td><p><span class="stt"><span class="stt">% chmod u+x script/*</span></span></p></td></tr></table></p><h5>2.2.1<tt>&nbsp;</tt><a name="(part._.Changes_to_app_scm)"></a>Changes to <span class="stt">app.scm</span></h5><p>We need to register a couple of pages in our app. The <span class="schemesymbol">index-page</span> was already set up for you, but you&rsquo;ll need to add a page to create new posts, and one to view them. Make the <span class="schemesymbol">define-app</span> call look like this:</p><p><table cellspacing="0" class="schemeblock"><tr><td><p><span class="hspace">&nbsp;&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">define-app</span><span class="hspace">&nbsp;</span><span class="schemesymbol">my-app</span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span><span class="hspace">&nbsp;&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">index-page</span><span class="hspace">&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">url</span><span class="hspace">&nbsp;</span><span class="schemevalue">"/"</span><span class="schemeparen">)</span><span class="schemeparen">)</span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span><span class="hspace">&nbsp;&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">create-post-page</span><span class="hspace">&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">url</span><span class="hspace">&nbsp;</span><span class="schemevalue">"/post"</span><span class="schemeparen">)</span><span class="schemeparen">)</span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span><span class="hspace">&nbsp;&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">view-post-page</span><span class="hspace">&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">url</span><span class="hspace">&nbsp;</span><span class="schemevalue">"/view/"</span><span class="hspace">&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">string-arg</span><span class="schemeparen">)</span><span class="schemeparen">)</span><span class="schemeparen">)</span><span class="schemeparen">)</span></p></td></tr></table></p><h5>2.2.2<tt>&nbsp;</tt><a name="(part._.Changes_to_main_scm)"></a>Changes to <span class="stt">main.scm</span></h5><p>Now we need to define those pages that we declared in <span class="stt">app.scm</span>.</p><p><table cellspacing="0" class="schemeblock"><tr><td><p><span class="hspace">&nbsp;&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">define-page</span><span class="hspace">&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">index-page</span><span class="hspace">&nbsp;</span><span class="schemesymbol">req</span><span class="schemeparen">)</span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span><span class="hspace">&nbsp;&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">**</span><span class="hspace">&nbsp;</span><span class="schemevalue">`</span><span class="schemevalue">(</span><span class="schemevalue">h1</span><span class="hspace">&nbsp;</span><span class="schemevalue">"Blogerton"</span><span class="schemevalue">)</span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="schemevalue">`</span><span class="schemevalue">(</span><span class="schemevalue">p</span><span class="hspace">&nbsp;</span><span class="schemereader">,</span><span class="schemeparen">(</span><span class="schemesymbol">web-link</span><span class="hspace">&nbsp;</span><span class="schemevalue">"Create a new post"</span><span class="hspace">&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">page-url</span><span class="hspace">&nbsp;</span><span class="schemesymbol">create-post-page</span><span class="schemeparen">)</span><span class="schemeparen">)</span><span class="schemevalue">)</span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="schemevalue">`</span><span class="schemevalue">(</span><span class="schemevalue">ul</span><span class="hspace">&nbsp;</span><span class="schemereader">,@</span><span class="schemeparen">(</span><span class="schemesymbol">map</span><span class="hspace">&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">lambda</span><span class="hspace">&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">p</span><span class="schemeparen">)</span><span class="hspace">&nbsp;</span><span class="schemevalue">`</span><span class="schemevalue">(</span><span class="schemevalue">li</span><span class="hspace">&nbsp;</span><span class="schemereader">,</span><span class="schemeparen">(</span><span class="schemesymbol">paint-blog-post</span><span class="hspace">&nbsp;</span><span class="schemesymbol">p</span><span class="schemeparen">)</span><span class="schemevalue">)</span><span class="schemeparen">)</span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">load-where</span><span class="hspace">&nbsp;</span><span class="schemevalue">'</span><span class="schemevalue">(</span><span class="schemevalue">(</span><span class="schemevalue">type</span><span class="hspace">&nbsp;</span><span class="schemevalue">. </span><span class="schemevalue">blog-post</span><span class="schemevalue">)</span><span class="schemevalue">)</span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="schemeparen">#:sort-by</span><span class="hspace">&nbsp;</span><span class="schemevalue">'</span><span class="schemevalue">created-at</span><span class="hspace">&nbsp;</span><span class="schemeparen">#:compare</span><span class="hspace">&nbsp;</span><span class="schemesymbol">&gt;</span><span class="schemeparen">)</span><span class="schemeparen">)</span><span class="schemevalue">)</span><span class="schemeparen">)</span><span class="schemeparen">)</span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span><span class="schemeparen">(</span><span class="schemesymbol">define-page</span><span class="hspace">&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">create-post-page</span><span class="hspace">&nbsp;</span><span class="schemesymbol">req</span><span class="schemeparen">)</span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span><span class="hspace">&nbsp;&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">form</span><span class="hspace">&nbsp;</span><span class="schemevalue">'</span><span class="schemevalue">(</span><span class="schemevalue">(</span><span class="schemevalue">title</span><span class="hspace">&nbsp;</span><span class="schemevalue">"Title"</span><span class="hspace">&nbsp;</span><span class="schemevalue">text</span><span class="schemevalue">)</span><span class="hspace">&nbsp;</span><span class="schemevalue">(</span><span class="schemevalue">body</span><span class="hspace">&nbsp;</span><span class="schemevalue">"Body"</span><span class="hspace">&nbsp;</span><span class="schemevalue">long-text</span><span class="schemevalue">)</span><span class="schemevalue">)</span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="schemeparen">#:init</span><span class="hspace">&nbsp;</span><span class="schemevalue">'</span><span class="schemevalue">(</span><span class="schemevalue">(</span><span class="schemevalue">type</span><span class="hspace">&nbsp;</span><span class="schemevalue">. </span><span class="schemevalue">blog-post</span><span class="schemevalue">)</span><span class="schemevalue">)</span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="schemeparen">#:on-done</span><span class="hspace">&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">lambda</span><span class="hspace">&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">post</span><span class="schemeparen">)</span><span class="hspace">&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">redirect-to-page</span><span class="hspace">&nbsp;</span><span class="schemesymbol">view-post-page</span><span class="hspace">&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">rec-id</span><span class="hspace">&nbsp;</span><span class="schemesymbol">post</span><span class="schemeparen">)</span><span class="schemeparen">)</span><span class="schemeparen">)</span><span class="schemeparen">)</span><span class="schemeparen">)</span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span><span class="schemeparen">(</span><span class="schemesymbol">define-page</span><span class="hspace">&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">view-post-page</span><span class="hspace">&nbsp;</span><span class="schemesymbol">req</span><span class="hspace">&nbsp;</span><span class="schemesymbol">post-id</span><span class="schemeparen">)</span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span><span class="hspace">&nbsp;&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">paint-blog-post</span><span class="hspace">&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">load-rec</span><span class="hspace">&nbsp;</span><span class="schemesymbol">post-id</span><span class="hspace">&nbsp;</span><span class="schemeparen">#:ensure</span><span class="hspace">&nbsp;</span><span class="schemevalue">'</span><span class="schemevalue">(</span><span class="schemevalue">(</span><span class="schemevalue">type</span><span class="hspace">&nbsp;</span><span class="schemevalue">. </span><span class="schemevalue">blog-post</span><span class="schemevalue">)</span><span class="schemevalue">)</span><span class="schemeparen">)</span><span class="schemeparen">)</span><span class="schemeparen">)</span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span><span class="schemeparen">(</span><span class="schemesymbol">define</span><span class="hspace">&nbsp;</span><span class="schemeparen">(</span><span class="schemesymbol">paint-blog-post</span><span class="hspace">&nbsp;</span><span class="schemesymbol">post</span><span class="schemeparen">)</span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span><span class="hspace">&nbsp;&nbsp;</span><span class="schemevalue">`</span><span class="schemevalue">(</span><span class="schemevalue">div</span><span class="hspace">&nbsp;</span><span class="schemevalue">(</span><span class="schemevalue">h2</span><span class="hspace">&nbsp;</span><span class="schemereader">,</span><span class="schemeparen">(</span><span class="schemesymbol">rec-prop</span><span class="hspace">&nbsp;</span><span class="schemesymbol">post</span><span class="hspace">&nbsp;</span><span class="schemevalue">'</span><span class="schemevalue">title</span><span class="schemeparen">)</span><span class="schemevalue">)</span></p></td></tr><tr><td><p><span class="schemeplain"><span class="hspace">&nbsp;&nbsp;</span></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="schemevalue">(</span><span class="schemevalue">p</span><span class="hspace">&nbsp;</span><span class="schemereader">,</span><span class="schemeparen">(</span><span class="schemesymbol">rec-prop</span><span class="hspace">&nbsp;</span><span class="schemesymbol">post</span><span class="hspace">&nbsp;</span><span class="schemevalue">'</span><span class="schemevalue">body</span><span class="schemeparen">)</span><span class="schemevalue">)</span><span class="schemevalue">)</span><span class="schemeparen">)</span></p></td></tr></table></p><h5>2.2.3<tt>&nbsp;</tt><a name="(part._.Launch_.Blogerton)"></a>Launch Blogerton</h5><p>You&rsquo;re ready for launch. Start the server with</p><p><table cellspacing="0"><tr><td><p><span class="stt"><span class="stt">% ./script/server</span></span></p></td></tr></table></p><p>and you should have a basic blogging app, with persistent data, in 19 lines of code.</p><h3>3<tt>&nbsp;</tt><a name="(part._.More_.Documentation_to_.Come)"></a>More Documentation to Come</h3><p>We need to get a full LeftParen reference up (not just simple tutorials). There&rsquo;s lots more cool stuff in LeftParen that this document doesn&rsquo;t yet address.</p><h3>4<tt>&nbsp;</tt><a name="(part._.About_.Acknowledgements)"></a>About/Acknowledgements</h3><p>LeftParen was written by <a href="http://robhunter.org">Rob Hunter</a>, but it builds heavily on (and, in fact, often directly incorporates) the work of <a href="http://untyped.com/">Untyped</a> (<a href="http://planet.plt-scheme.org/display.ss?package=instaservlet.plt&amp;owner=untyped">instaservlet</a> and <a href="http://planet.plt-scheme.org/display.ss?package=dispatch.plt&amp;owner=untyped">dispatch</a>), <a href="http://scheme.dk/blog/">Jens Axel Soegaard</a> (<a href="http://planet.plt-scheme.org/display.ss?package=web.plt&amp;owner=soegaard">web.plt</a>), and of course, <a href="http://www.plt-scheme.org/">PLT Scheme</a>.</p><div class="navset" style="margin-top: 2em; border-top: 2px solid #e0e0c0;"><span class="navleft"><input style="width: 16em; margin: 0px; padding: 0px; background-color: #eee; color: #888; border: 1px solid #ddd; text-align: center; vertical-align: middle;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;4.1.0.3&quot;, &quot;&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }" />&nbsp;&nbsp;</span>&nbsp;</div></div></div></body></html>
View
4 scribblings/doc.scrbl → scribblings/leftparen.scrbl
@@ -30,7 +30,7 @@ first issue one of these @scheme[require] commands, you'll automatically downloa
We're going to make a project called @tt{hello-world}. Change to the directory that you'd like to make the project in. Then issue
-@verbatim{% mzscheme -e '(require (planet "bootstrap.scm" ("vegashacker" "leftparen.plt" 2 0)))' project hello-world}
+@verbatim{% mzscheme -e '(require (planet "bootstrap.scm" ("vegashacker" "leftparen.plt" 2 1)))' project hello-world}
This will create a @tt{hello-world} project directory for you. In this directory you'll find the @tt{script} directory, which contains some useful scripts. All paths are relative to this project directory, so when calling scripts, you always want to be at the project root.
@@ -59,7 +59,7 @@ Point your browser to @link["http://localhost:8765"]{http://localhost:8765} and
Now let's try implementing the true "hello world" of web apps---a blog. First, execute the following commands from the directory in which you want to create your project directory:
@verbatim{
-% mzscheme -e '(require (planet "bootstrap.scm" ("vegashacker" "leftparen.plt" 1 3)))' project blogerton
+% mzscheme -e '(require (planet "bootstrap.scm" ("vegashacker" "leftparen.plt" 2 1)))' project blogerton
% cd blogerton
% chmod u+x script/*
}
View
2  task-queue.scm
@@ -1,6 +1,6 @@
#lang scheme/base
-(require "../leftparen/util.scm")
+(require "util.scm")
(provide make-threaded-task-queue sleep-task-thread-for-at-least)
Please sign in to comment.
Something went wrong with that request. Please try again.