Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

[48d3fe]: doc / html / about_pyke / index.html Maximize Restore History

Download this file

index.html    218 lines (205 with data), 10.0 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>About Pyke</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="../stylesheets/pyke.css" type="text/css" />
</head>
<body>
<table id="page-table">
<thead class="head">
<tr id="header1"><th id="header" colspan="3">
&nbsp;
</th></tr>
<tr id="header2">
<th id="crumb-left"></th>
<th id="crumb-line">
<div id="nav">
<ul>
<li><a href="../index.html">Home</a></li>
<li>&gt;</li>
<li>About Pyke</li>
</ul>
</div>
</th>
<th id="crumb-right"></th>
</tr>
</thead>
<tbody id="body">
<tr id="body-tr">
<td id="left-nav">
<div id="left-nav-div">
<div class="title-nav"><a href="../index.html">Home</a></div><div class="nav-branch">
<div class="title-nav"><a href="index.html">About Pyke</a></div><div class="nav-branch">
<div class="normal-nav"><a href="cooking_functions.html">Cooking Functions</a></div>
<div class="normal-nav"><a href="what_is_pyke.html">What is Pyke?</a></div>
<div class="normal-nav"><a href="steps_to_using_pyke.html">Steps to Using Pyke</a></div>
<div class="normal-nav"><a href="installing_pyke.html">Installing Pyke</a></div>
</div>
<div class="normal-nav"><a href="../logic_programming/index.html">Logic Programming</a></div>
<div class="normal-nav"><a href="../knowledge_bases/index.html">Knowledge Bases</a></div>
<div class="normal-nav"><a href="../pyke_syntax/index.html">Pyke Syntax</a></div>
<div class="normal-nav"><a href="../using_pyke.html">Using Pyke</a></div>
<div class="normal-nav"><a href="../examples.html">Examples</a></div>
<div class="normal-nav"><a href="../PyCon2008-paper.html">PyCon 2008 Paper</a></div>
</div>
</div>
<div id="icons">
<div id="project-page">
<a href="http://sourceforge.net/projects/pyke/">Pyke Project Page</a>
</div>
Please Make a Donation:<br />
<a href="http://sourceforge.net/donate/index.php?group_id=207724">
<img src="http://images.sourceforge.net/images/project-support.jpg"
width="88" height="32" border="0"
alt="Support This Project" /> </a> <br /><br />
Hosted by: <br />
<a href="http://sourceforge.net/projects/pyke">
<img src="http://sflogo.sourceforge.net/sflogo.php?group_id=207724&amp;type=14"
width="150" height="40"
alt="Get Python Knowledge Engine (PyKE) at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a>
</div>
</td>
<td id="main-td">
<div id="main">
<a name="startcontent" id="startcontent"></a>
<div class="document" id="about-pyke">
<h1 class="title">About Pyke</h1>
<h2 class="subtitle" id="what-does-pyke-do-for-me">What Does Pyke Do for Me?</h2>
<p>Pyke was primarily designed to allow you to &quot;cook&quot; your <a class="reference external" href="http://www.python.org">Python</a> code. You
write Python code, and then you write Pyke code to cook that Python
code -- i.e. to assemble the Python functions that you've written and
customize them for a specific situation or use-case.</p>
<p>Pyke can also be used for difficult decision making applications where each
part of the problem has multiple possible solutions and the selection of a
solution to one part of the problem affects whether another part of the problem
can be solved or not.</p>
<div class="section" id="cooking-your-python-code">
<h2>Cooking Your Python Code</h2>
<p>Cooking your Python code is a form of meta-programming, or writing programs
that manipulate other programs. I.e., it's a means of <a class="reference external" href="http://portal.acm.org/citation.cfm?id=808431">programming in the
large</a>.</p>
<p>Thus, Pyke provides a way to directly &quot;program in the large&quot;, which dovetails
with using Python to &quot;program in the small&quot;. Pyke supplements but does not
replace Python!</p>
<p>Pyke helps programmers to achieve order of magnitude improvements in:</p>
<ul class="simple">
<li>Adaptability/Customization<ul>
<li>Using Pyke allows your Python code to be combined into thousands of
different configurations.</li>
<li>Thus, your application or library takes on the characteristics of a
Domain Specific Language to achieve an order of magnitude increase in
adaptability without a corresponding increase in your program's &quot;surface
area&quot; to your users.</li>
</ul>
</li>
<li>Performance<ul>
<li>Thinking of your application or library as a Domain Specific Language
(DSL), you're using Pyke to &quot;compile&quot; rather than &quot;interpret&quot; your DSL to
achieve an order of magnitude improvement in performance.</li>
</ul>
</li>
<li>Code Reuse<ul>
<li>Making your code an order of magnitude more adaptable and an order of
magnitude faster allows it to be (re)used in a correspondingly broader
range of situations.</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="examples-of-cooking-python-code">
<h2>Examples of Cooking Python Code</h2>
<div class="section" id="database-access-library">
<h3>Database Access Library</h3>
<p>You're writing a library package to make it easier for Python programmers to
access relational databases. You write Python code that deals with the
mechanics of accessing relational databases, and then you write Pyke code to
make a cooked version of this code for each database access with your user's
application.</p>
<p>You might also use Pyke to provide help installing and configuring the
database and help creating the schema.</p>
<p>By taking this approach, your library will be an order of magnitude faster
than competing database access libraries because you've used Pyke to
essentially compile custom code for each database access.</p>
<p>The <a class="reference external" href="../examples.html#sqlgen">sqlgen</a> example demonstrates this approach.</p>
</div>
<div class="section" id="html-templating-library">
<h3>HTML Templating Library</h3>
<p>Or you're writing an HTML templating package to make it easier for Python
programmers to generate HTML. You write Python code that deals with the
mechanics of HTML, and then you write Pyke code to make a cooked version of
this code for each HTML template.</p>
<p>By taking this approach, your library will be an order of magnitude faster
than competing HTML templating libraries because you've used Pyke to
essentially compile custom code for each HTML template.</p>
<p>The <a class="reference external" href="../examples.html#web-framework">web_framework</a> example demonstrates this approach. It uses the <a class="reference external" href="../examples.html#sqlgen">sqlgen</a>
example to make a little web framework. The 2 HTML templates in this example
were also done in <a class="reference external" href="http://turbogears.org/2.0/">TurboGears 2</a> and then a <a class="reference external" href="http://www.joedog.org/index/siege-home">siege</a> benchmark test done on
both:</p>
<ul class="simple">
<li>TurboGears 2 ran 75.83 transactions/sec</li>
<li>The Pyke example ran 791.01 transactions/sec</li>
</ul>
</div>
<div class="section" id="linux-configuration-program">
<h3>Linux Configuration Program</h3>
<p>Or you're writing a new Linux configuration program. You write the Python
code to query and set the various system configuration options, and then you
write Pyke code to ask the user what he wants and build a cooked version of
your code to make the necessary changes.</p>
<p>In this case, you're not looking for performance. You use Pyke to handle the
complicated decision making and use its <a class="reference external" href="../logic_programming/plans.html">plan</a> facility to postpone making any
configuration changes until your program is sure that it's &quot;dotted all of the
i's and crossed all the t's&quot;.</p>
<!-- ADD_LINKS MARKER -->
</div>
</div>
</div>
<!-- <div id="return-to-top">
<a href="#">Return to Top</a>
</div>
-->
</div>
</td>
<td id="right-nav">
<div id="right-nav-div">
<h3>More:</h3>
<div class="right-item"><a href="cooking_functions.html">Cooking Python Functions</a><p>Explanation of how Pyke &quot;cooks&quot; Python functions.</p>
</div>
<div class="right-item"><a href="what_is_pyke.html">What is Pyke?</a><p>An overview of Pyke's features.</p>
</div>
<div class="right-item"><a href="steps_to_using_pyke.html">Steps to Using Pyke</a><p>A brief list of the steps involved in programming in Pyke (with lots
of links).</p>
</div>
<div class="right-item"><a href="installing_pyke.html">Installing Pyke</a><p>System Requirements and installing Pyke.</p>
</div>
</div>
</td>
</tr>
</tbody>
<tfoot id="foot">
<tr id="foot2">
<td id="copyright" colspan="3">
Copyright &copy; 2007-2009 Bruce Frederiksen
</td>
</tr>
</tfoot>
</table>
<div id="last-modified">
Page last modified
Thu, May 14 2009.
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ?
"https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost +
"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-6310805-1");
pageTracker._trackPageview();
} catch(err) {}
</script>
</body>
</html>