esolang 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +55 -0
- data/doc/Esolang/Interpreters/BaseInterpreter.html +339 -0
- data/doc/Esolang/Interpreters/Boolfuck.html +383 -0
- data/doc/Esolang/Interpreters/Brainfuck.html +391 -0
- data/doc/Esolang/Interpreters/Ook.html +391 -0
- data/doc/Esolang/Interpreters/Paintfuck.html +419 -0
- data/doc/Esolang/Interpreters/Smallfuck.html +369 -0
- data/doc/Esolang/Interpreters.html +117 -0
- data/doc/Esolang/Refinements.html +120 -0
- data/doc/Esolang.html +778 -0
- data/doc/_index.html +211 -0
- data/doc/class_list.html +51 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +58 -0
- data/doc/css/style.css +497 -0
- data/doc/file.README.html +127 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +17 -0
- data/doc/index.html +127 -0
- data/doc/js/app.js +314 -0
- data/doc/js/full_list.js +216 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +187 -0
- data/doc/top-level-namespace.html +110 -0
- metadata +27 -14
data/doc/Esolang.html
ADDED
@@ -0,0 +1,778 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Module: Esolang
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.34
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" />
|
16
|
+
|
17
|
+
<script type="text/javascript">
|
18
|
+
pathId = "Esolang";
|
19
|
+
relpath = '';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="_index.html">Index (E)</a> »
|
40
|
+
|
41
|
+
|
42
|
+
<span class="title">Esolang</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Module: Esolang
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<dl>
|
80
|
+
<dt>Defined in:</dt>
|
81
|
+
<dd>lib/esolang.rb<span class="defines">,<br />
|
82
|
+
lib/refinements/refinements.rb,<br /> lib/interpreters/ook_interpreter.rb,<br /> lib/interpreters/base_interpreter.rb,<br /> lib/interpreters/boolfuck_interpreter.rb,<br /> lib/interpreters/brainfuck_interpreter.rb,<br /> lib/interpreters/paintfuck_interpreter.rb,<br /> lib/interpreters/smallfuck_interpreter.rb</span>
|
83
|
+
</dd>
|
84
|
+
</dl>
|
85
|
+
|
86
|
+
</div>
|
87
|
+
|
88
|
+
<h2>Overview</h2><div class="docstring">
|
89
|
+
<div class="discussion">
|
90
|
+
|
91
|
+
<p>“‘ruby using Esolang::Refinements “`</p>
|
92
|
+
|
93
|
+
|
94
|
+
</div>
|
95
|
+
</div>
|
96
|
+
<div class="tags">
|
97
|
+
|
98
|
+
|
99
|
+
</div><h2>Defined Under Namespace</h2>
|
100
|
+
<p class="children">
|
101
|
+
|
102
|
+
|
103
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Esolang/Interpreters.html" title="Esolang::Interpreters (module)">Interpreters</a></span>, <span class='object_link'><a href="Esolang/Refinements.html" title="Esolang::Refinements (module)">Refinements</a></span>
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
</p>
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
<h2>
|
118
|
+
Class Method Summary
|
119
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
120
|
+
</h2>
|
121
|
+
|
122
|
+
<ul class="summary">
|
123
|
+
|
124
|
+
<li class="public ">
|
125
|
+
<span class="summary_signature">
|
126
|
+
|
127
|
+
<a href="#boolfuck-class_method" title="boolfuck (class method)">.<strong>boolfuck</strong>(code, input = '') ⇒ String </a>
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
</span>
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
<span class="summary_desc"><div class='inline'>
|
142
|
+
<p>Interprets Boolfuck code.</p>
|
143
|
+
</div></span>
|
144
|
+
|
145
|
+
</li>
|
146
|
+
|
147
|
+
|
148
|
+
<li class="public ">
|
149
|
+
<span class="summary_signature">
|
150
|
+
|
151
|
+
<a href="#brainfuck-class_method" title="brainfuck (class method)">.<strong>brainfuck</strong>(code, input = '') ⇒ String </a>
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
</span>
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
<span class="summary_desc"><div class='inline'>
|
166
|
+
<p>Interprets Brainfuck code.</p>
|
167
|
+
</div></span>
|
168
|
+
|
169
|
+
</li>
|
170
|
+
|
171
|
+
|
172
|
+
<li class="public ">
|
173
|
+
<span class="summary_signature">
|
174
|
+
|
175
|
+
<a href="#ook-class_method" title="ook (class method)">.<strong>ook</strong>(code, input = '') ⇒ String </a>
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
</span>
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
<span class="summary_desc"><div class='inline'>
|
190
|
+
<p>Interprets Ook! code.</p>
|
191
|
+
</div></span>
|
192
|
+
|
193
|
+
</li>
|
194
|
+
|
195
|
+
|
196
|
+
<li class="public ">
|
197
|
+
<span class="summary_signature">
|
198
|
+
|
199
|
+
<a href="#paintfuck-class_method" title="paintfuck (class method)">.<strong>paintfuck</strong>(code, iterations, width, height) ⇒ String </a>
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
</span>
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
<span class="summary_desc"><div class='inline'>
|
214
|
+
<p>Interprets Paintfuck code.</p>
|
215
|
+
</div></span>
|
216
|
+
|
217
|
+
</li>
|
218
|
+
|
219
|
+
|
220
|
+
<li class="public ">
|
221
|
+
<span class="summary_signature">
|
222
|
+
|
223
|
+
<a href="#smallfuck-class_method" title="smallfuck (class method)">.<strong>smallfuck</strong>(code, tape) ⇒ String </a>
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
</span>
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
<span class="summary_desc"><div class='inline'>
|
238
|
+
<p>Interprets Smallfuck code.</p>
|
239
|
+
</div></span>
|
240
|
+
|
241
|
+
</li>
|
242
|
+
|
243
|
+
|
244
|
+
</ul>
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
<div id="class_method_details" class="method_details_list">
|
250
|
+
<h2>Class Method Details</h2>
|
251
|
+
|
252
|
+
|
253
|
+
<div class="method_details first">
|
254
|
+
<h3 class="signature first" id="boolfuck-class_method">
|
255
|
+
|
256
|
+
.<strong>boolfuck</strong>(code, input = '') ⇒ <tt>String</tt>
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
</h3><div class="docstring">
|
263
|
+
<div class="discussion">
|
264
|
+
|
265
|
+
<p>Interprets Boolfuck code.</p>
|
266
|
+
|
267
|
+
|
268
|
+
</div>
|
269
|
+
</div>
|
270
|
+
<div class="tags">
|
271
|
+
<p class="tag_title">Parameters:</p>
|
272
|
+
<ul class="param">
|
273
|
+
|
274
|
+
<li>
|
275
|
+
|
276
|
+
<span class='name'>code</span>
|
277
|
+
|
278
|
+
|
279
|
+
<span class='type'>(<tt>String</tt>)</span>
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
—
|
284
|
+
<div class='inline'>
|
285
|
+
<p>The Boolfuck code to interpret.</p>
|
286
|
+
</div>
|
287
|
+
|
288
|
+
</li>
|
289
|
+
|
290
|
+
<li>
|
291
|
+
|
292
|
+
<span class='name'>input</span>
|
293
|
+
|
294
|
+
|
295
|
+
<span class='type'>(<tt>String</tt>)</span>
|
296
|
+
|
297
|
+
|
298
|
+
<em class="default">(defaults to: <tt>''</tt>)</em>
|
299
|
+
|
300
|
+
|
301
|
+
—
|
302
|
+
<div class='inline'>
|
303
|
+
<p>The input for the Boolfuck program (optional).</p>
|
304
|
+
</div>
|
305
|
+
|
306
|
+
</li>
|
307
|
+
|
308
|
+
</ul>
|
309
|
+
|
310
|
+
<p class="tag_title">Returns:</p>
|
311
|
+
<ul class="return">
|
312
|
+
|
313
|
+
<li>
|
314
|
+
|
315
|
+
|
316
|
+
<span class='type'>(<tt>String</tt>)</span>
|
317
|
+
|
318
|
+
|
319
|
+
|
320
|
+
—
|
321
|
+
<div class='inline'>
|
322
|
+
<p>The result of the Boolfuck interpretation.</p>
|
323
|
+
</div>
|
324
|
+
|
325
|
+
</li>
|
326
|
+
|
327
|
+
</ul>
|
328
|
+
|
329
|
+
</div><table class="source_code">
|
330
|
+
<tr>
|
331
|
+
<td>
|
332
|
+
<pre class="lines">
|
333
|
+
|
334
|
+
|
335
|
+
24
|
336
|
+
25
|
337
|
+
26</pre>
|
338
|
+
</td>
|
339
|
+
<td>
|
340
|
+
<pre class="code"><span class="info file"># File 'lib/esolang.rb', line 24</span>
|
341
|
+
|
342
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_boolfuck'>boolfuck</span><span class='lparen'>(</span><span class='id identifier rubyid_code'>code</span><span class='comma'>,</span> <span class='id identifier rubyid_input'>input</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
343
|
+
<span class='const'><span class='object_link'><a href="Esolang/Interpreters.html" title="Esolang::Interpreters (module)">Interpreters</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Esolang/Interpreters/Boolfuck.html" title="Esolang::Interpreters::Boolfuck (class)">Boolfuck</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Esolang/Interpreters/Boolfuck.html#initialize-instance_method" title="Esolang::Interpreters::Boolfuck#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_code'>code</span><span class='comma'>,</span> <span class='id identifier rubyid_input'>input</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_run'><span class='object_link'><a href="Esolang/Interpreters/Boolfuck.html#run-instance_method" title="Esolang::Interpreters::Boolfuck#run (method)">run</a></span></span>
|
344
|
+
<span class='kw'>end</span></pre>
|
345
|
+
</td>
|
346
|
+
</tr>
|
347
|
+
</table>
|
348
|
+
</div>
|
349
|
+
|
350
|
+
<div class="method_details ">
|
351
|
+
<h3 class="signature " id="brainfuck-class_method">
|
352
|
+
|
353
|
+
.<strong>brainfuck</strong>(code, input = '') ⇒ <tt>String</tt>
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
|
358
|
+
|
359
|
+
</h3><div class="docstring">
|
360
|
+
<div class="discussion">
|
361
|
+
|
362
|
+
<p>Interprets Brainfuck code.</p>
|
363
|
+
|
364
|
+
|
365
|
+
</div>
|
366
|
+
</div>
|
367
|
+
<div class="tags">
|
368
|
+
<p class="tag_title">Parameters:</p>
|
369
|
+
<ul class="param">
|
370
|
+
|
371
|
+
<li>
|
372
|
+
|
373
|
+
<span class='name'>code</span>
|
374
|
+
|
375
|
+
|
376
|
+
<span class='type'>(<tt>String</tt>)</span>
|
377
|
+
|
378
|
+
|
379
|
+
|
380
|
+
—
|
381
|
+
<div class='inline'>
|
382
|
+
<p>The Brainfuck code to interpret.</p>
|
383
|
+
</div>
|
384
|
+
|
385
|
+
</li>
|
386
|
+
|
387
|
+
<li>
|
388
|
+
|
389
|
+
<span class='name'>input</span>
|
390
|
+
|
391
|
+
|
392
|
+
<span class='type'>(<tt>String</tt>)</span>
|
393
|
+
|
394
|
+
|
395
|
+
<em class="default">(defaults to: <tt>''</tt>)</em>
|
396
|
+
|
397
|
+
|
398
|
+
—
|
399
|
+
<div class='inline'>
|
400
|
+
<p>The input for the Brainfuck program (optional).</p>
|
401
|
+
</div>
|
402
|
+
|
403
|
+
</li>
|
404
|
+
|
405
|
+
</ul>
|
406
|
+
|
407
|
+
<p class="tag_title">Returns:</p>
|
408
|
+
<ul class="return">
|
409
|
+
|
410
|
+
<li>
|
411
|
+
|
412
|
+
|
413
|
+
<span class='type'>(<tt>String</tt>)</span>
|
414
|
+
|
415
|
+
|
416
|
+
|
417
|
+
—
|
418
|
+
<div class='inline'>
|
419
|
+
<p>The result of the Brainfuck interpretation.</p>
|
420
|
+
</div>
|
421
|
+
|
422
|
+
</li>
|
423
|
+
|
424
|
+
</ul>
|
425
|
+
|
426
|
+
</div><table class="source_code">
|
427
|
+
<tr>
|
428
|
+
<td>
|
429
|
+
<pre class="lines">
|
430
|
+
|
431
|
+
|
432
|
+
53
|
433
|
+
54
|
434
|
+
55</pre>
|
435
|
+
</td>
|
436
|
+
<td>
|
437
|
+
<pre class="code"><span class="info file"># File 'lib/esolang.rb', line 53</span>
|
438
|
+
|
439
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_brainfuck'>brainfuck</span><span class='lparen'>(</span><span class='id identifier rubyid_code'>code</span><span class='comma'>,</span> <span class='id identifier rubyid_input'>input</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
440
|
+
<span class='const'><span class='object_link'><a href="Esolang/Interpreters.html" title="Esolang::Interpreters (module)">Interpreters</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Esolang/Interpreters/Brainfuck.html" title="Esolang::Interpreters::Brainfuck (class)">Brainfuck</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Esolang/Interpreters/Brainfuck.html#initialize-instance_method" title="Esolang::Interpreters::Brainfuck#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_code'>code</span><span class='comma'>,</span> <span class='id identifier rubyid_input'>input</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_run'><span class='object_link'><a href="Esolang/Interpreters/Brainfuck.html#run-instance_method" title="Esolang::Interpreters::Brainfuck#run (method)">run</a></span></span>
|
441
|
+
<span class='kw'>end</span></pre>
|
442
|
+
</td>
|
443
|
+
</tr>
|
444
|
+
</table>
|
445
|
+
</div>
|
446
|
+
|
447
|
+
<div class="method_details ">
|
448
|
+
<h3 class="signature " id="ook-class_method">
|
449
|
+
|
450
|
+
.<strong>ook</strong>(code, input = '') ⇒ <tt>String</tt>
|
451
|
+
|
452
|
+
|
453
|
+
|
454
|
+
|
455
|
+
|
456
|
+
</h3><div class="docstring">
|
457
|
+
<div class="discussion">
|
458
|
+
|
459
|
+
<p>Interprets Ook! code.</p>
|
460
|
+
|
461
|
+
|
462
|
+
</div>
|
463
|
+
</div>
|
464
|
+
<div class="tags">
|
465
|
+
<p class="tag_title">Parameters:</p>
|
466
|
+
<ul class="param">
|
467
|
+
|
468
|
+
<li>
|
469
|
+
|
470
|
+
<span class='name'>code</span>
|
471
|
+
|
472
|
+
|
473
|
+
<span class='type'>(<tt>String</tt>)</span>
|
474
|
+
|
475
|
+
|
476
|
+
|
477
|
+
—
|
478
|
+
<div class='inline'>
|
479
|
+
<p>The Ook! code to interpret.</p>
|
480
|
+
</div>
|
481
|
+
|
482
|
+
</li>
|
483
|
+
|
484
|
+
<li>
|
485
|
+
|
486
|
+
<span class='name'>input</span>
|
487
|
+
|
488
|
+
|
489
|
+
<span class='type'>(<tt>String</tt>)</span>
|
490
|
+
|
491
|
+
|
492
|
+
<em class="default">(defaults to: <tt>''</tt>)</em>
|
493
|
+
|
494
|
+
|
495
|
+
—
|
496
|
+
<div class='inline'>
|
497
|
+
<p>The input for the Ook! program (optional).</p>
|
498
|
+
</div>
|
499
|
+
|
500
|
+
</li>
|
501
|
+
|
502
|
+
</ul>
|
503
|
+
|
504
|
+
<p class="tag_title">Returns:</p>
|
505
|
+
<ul class="return">
|
506
|
+
|
507
|
+
<li>
|
508
|
+
|
509
|
+
|
510
|
+
<span class='type'>(<tt>String</tt>)</span>
|
511
|
+
|
512
|
+
|
513
|
+
|
514
|
+
—
|
515
|
+
<div class='inline'>
|
516
|
+
<p>The result of the Ook! interpretation.</p>
|
517
|
+
</div>
|
518
|
+
|
519
|
+
</li>
|
520
|
+
|
521
|
+
</ul>
|
522
|
+
|
523
|
+
</div><table class="source_code">
|
524
|
+
<tr>
|
525
|
+
<td>
|
526
|
+
<pre class="lines">
|
527
|
+
|
528
|
+
|
529
|
+
62
|
530
|
+
63
|
531
|
+
64</pre>
|
532
|
+
</td>
|
533
|
+
<td>
|
534
|
+
<pre class="code"><span class="info file"># File 'lib/esolang.rb', line 62</span>
|
535
|
+
|
536
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_ook'>ook</span><span class='lparen'>(</span><span class='id identifier rubyid_code'>code</span><span class='comma'>,</span> <span class='id identifier rubyid_input'>input</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
537
|
+
<span class='const'><span class='object_link'><a href="Esolang/Interpreters.html" title="Esolang::Interpreters (module)">Interpreters</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Esolang/Interpreters/Ook.html" title="Esolang::Interpreters::Ook (class)">Ook</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Esolang/Interpreters/Ook.html#initialize-instance_method" title="Esolang::Interpreters::Ook#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_code'>code</span><span class='comma'>,</span> <span class='id identifier rubyid_input'>input</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_run'><span class='object_link'><a href="Esolang/Interpreters/Ook.html#run-instance_method" title="Esolang::Interpreters::Ook#run (method)">run</a></span></span>
|
538
|
+
<span class='kw'>end</span></pre>
|
539
|
+
</td>
|
540
|
+
</tr>
|
541
|
+
</table>
|
542
|
+
</div>
|
543
|
+
|
544
|
+
<div class="method_details ">
|
545
|
+
<h3 class="signature " id="paintfuck-class_method">
|
546
|
+
|
547
|
+
.<strong>paintfuck</strong>(code, iterations, width, height) ⇒ <tt>String</tt>
|
548
|
+
|
549
|
+
|
550
|
+
|
551
|
+
|
552
|
+
|
553
|
+
</h3><div class="docstring">
|
554
|
+
<div class="discussion">
|
555
|
+
|
556
|
+
<p>Interprets Paintfuck code.</p>
|
557
|
+
|
558
|
+
|
559
|
+
</div>
|
560
|
+
</div>
|
561
|
+
<div class="tags">
|
562
|
+
<p class="tag_title">Parameters:</p>
|
563
|
+
<ul class="param">
|
564
|
+
|
565
|
+
<li>
|
566
|
+
|
567
|
+
<span class='name'>code</span>
|
568
|
+
|
569
|
+
|
570
|
+
<span class='type'>(<tt>String</tt>)</span>
|
571
|
+
|
572
|
+
|
573
|
+
|
574
|
+
—
|
575
|
+
<div class='inline'>
|
576
|
+
<p>The Paintfuck code to interpret.</p>
|
577
|
+
</div>
|
578
|
+
|
579
|
+
</li>
|
580
|
+
|
581
|
+
<li>
|
582
|
+
|
583
|
+
<span class='name'>iterations</span>
|
584
|
+
|
585
|
+
|
586
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
587
|
+
|
588
|
+
|
589
|
+
|
590
|
+
—
|
591
|
+
<div class='inline'>
|
592
|
+
<p>The number of iterations for the Paintfuck program.</p>
|
593
|
+
</div>
|
594
|
+
|
595
|
+
</li>
|
596
|
+
|
597
|
+
<li>
|
598
|
+
|
599
|
+
<span class='name'>width</span>
|
600
|
+
|
601
|
+
|
602
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
603
|
+
|
604
|
+
|
605
|
+
|
606
|
+
—
|
607
|
+
<div class='inline'>
|
608
|
+
<p>The width of the Paintfuck canvas.</p>
|
609
|
+
</div>
|
610
|
+
|
611
|
+
</li>
|
612
|
+
|
613
|
+
<li>
|
614
|
+
|
615
|
+
<span class='name'>height</span>
|
616
|
+
|
617
|
+
|
618
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
619
|
+
|
620
|
+
|
621
|
+
|
622
|
+
—
|
623
|
+
<div class='inline'>
|
624
|
+
<p>The height of the Paintfuck canvas.</p>
|
625
|
+
</div>
|
626
|
+
|
627
|
+
</li>
|
628
|
+
|
629
|
+
</ul>
|
630
|
+
|
631
|
+
<p class="tag_title">Returns:</p>
|
632
|
+
<ul class="return">
|
633
|
+
|
634
|
+
<li>
|
635
|
+
|
636
|
+
|
637
|
+
<span class='type'>(<tt>String</tt>)</span>
|
638
|
+
|
639
|
+
|
640
|
+
|
641
|
+
—
|
642
|
+
<div class='inline'>
|
643
|
+
<p>The result of the Paintfuck interpretation.</p>
|
644
|
+
</div>
|
645
|
+
|
646
|
+
</li>
|
647
|
+
|
648
|
+
</ul>
|
649
|
+
|
650
|
+
</div><table class="source_code">
|
651
|
+
<tr>
|
652
|
+
<td>
|
653
|
+
<pre class="lines">
|
654
|
+
|
655
|
+
|
656
|
+
44
|
657
|
+
45
|
658
|
+
46</pre>
|
659
|
+
</td>
|
660
|
+
<td>
|
661
|
+
<pre class="code"><span class="info file"># File 'lib/esolang.rb', line 44</span>
|
662
|
+
|
663
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_paintfuck'>paintfuck</span><span class='lparen'>(</span><span class='id identifier rubyid_code'>code</span><span class='comma'>,</span> <span class='id identifier rubyid_iterations'>iterations</span><span class='comma'>,</span> <span class='id identifier rubyid_width'>width</span><span class='comma'>,</span> <span class='id identifier rubyid_height'>height</span><span class='rparen'>)</span>
|
664
|
+
<span class='const'><span class='object_link'><a href="Esolang/Interpreters.html" title="Esolang::Interpreters (module)">Interpreters</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Esolang/Interpreters/Paintfuck.html" title="Esolang::Interpreters::Paintfuck (class)">Paintfuck</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Esolang/Interpreters/Paintfuck.html#initialize-instance_method" title="Esolang::Interpreters::Paintfuck#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_code'>code</span><span class='comma'>,</span> <span class='id identifier rubyid_iterations'>iterations</span><span class='comma'>,</span> <span class='id identifier rubyid_width'>width</span><span class='comma'>,</span> <span class='id identifier rubyid_height'>height</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_run'><span class='object_link'><a href="Esolang/Interpreters/Paintfuck.html#run-instance_method" title="Esolang::Interpreters::Paintfuck#run (method)">run</a></span></span>
|
665
|
+
<span class='kw'>end</span></pre>
|
666
|
+
</td>
|
667
|
+
</tr>
|
668
|
+
</table>
|
669
|
+
</div>
|
670
|
+
|
671
|
+
<div class="method_details ">
|
672
|
+
<h3 class="signature " id="smallfuck-class_method">
|
673
|
+
|
674
|
+
.<strong>smallfuck</strong>(code, tape) ⇒ <tt>String</tt>
|
675
|
+
|
676
|
+
|
677
|
+
|
678
|
+
|
679
|
+
|
680
|
+
</h3><div class="docstring">
|
681
|
+
<div class="discussion">
|
682
|
+
|
683
|
+
<p>Interprets Smallfuck code.</p>
|
684
|
+
|
685
|
+
|
686
|
+
</div>
|
687
|
+
</div>
|
688
|
+
<div class="tags">
|
689
|
+
<p class="tag_title">Parameters:</p>
|
690
|
+
<ul class="param">
|
691
|
+
|
692
|
+
<li>
|
693
|
+
|
694
|
+
<span class='name'>code</span>
|
695
|
+
|
696
|
+
|
697
|
+
<span class='type'>(<tt>String</tt>)</span>
|
698
|
+
|
699
|
+
|
700
|
+
|
701
|
+
—
|
702
|
+
<div class='inline'>
|
703
|
+
<p>The Smallfuck code to interpret.</p>
|
704
|
+
</div>
|
705
|
+
|
706
|
+
</li>
|
707
|
+
|
708
|
+
<li>
|
709
|
+
|
710
|
+
<span class='name'>tape</span>
|
711
|
+
|
712
|
+
|
713
|
+
<span class='type'>(<tt>String</tt>)</span>
|
714
|
+
|
715
|
+
|
716
|
+
|
717
|
+
—
|
718
|
+
<div class='inline'>
|
719
|
+
<p>The initial tape state for the Smallfuck program.</p>
|
720
|
+
</div>
|
721
|
+
|
722
|
+
</li>
|
723
|
+
|
724
|
+
</ul>
|
725
|
+
|
726
|
+
<p class="tag_title">Returns:</p>
|
727
|
+
<ul class="return">
|
728
|
+
|
729
|
+
<li>
|
730
|
+
|
731
|
+
|
732
|
+
<span class='type'>(<tt>String</tt>)</span>
|
733
|
+
|
734
|
+
|
735
|
+
|
736
|
+
—
|
737
|
+
<div class='inline'>
|
738
|
+
<p>The result of the Smallfuck interpretation.</p>
|
739
|
+
</div>
|
740
|
+
|
741
|
+
</li>
|
742
|
+
|
743
|
+
</ul>
|
744
|
+
|
745
|
+
</div><table class="source_code">
|
746
|
+
<tr>
|
747
|
+
<td>
|
748
|
+
<pre class="lines">
|
749
|
+
|
750
|
+
|
751
|
+
33
|
752
|
+
34
|
753
|
+
35</pre>
|
754
|
+
</td>
|
755
|
+
<td>
|
756
|
+
<pre class="code"><span class="info file"># File 'lib/esolang.rb', line 33</span>
|
757
|
+
|
758
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_smallfuck'>smallfuck</span><span class='lparen'>(</span><span class='id identifier rubyid_code'>code</span><span class='comma'>,</span> <span class='id identifier rubyid_tape'>tape</span><span class='rparen'>)</span>
|
759
|
+
<span class='const'><span class='object_link'><a href="Esolang/Interpreters.html" title="Esolang::Interpreters (module)">Interpreters</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Esolang/Interpreters/Smallfuck.html" title="Esolang::Interpreters::Smallfuck (class)">Smallfuck</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Esolang/Interpreters/Smallfuck.html#initialize-instance_method" title="Esolang::Interpreters::Smallfuck#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_code'>code</span><span class='comma'>,</span> <span class='id identifier rubyid_tape'>tape</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_run'><span class='object_link'><a href="Esolang/Interpreters/Smallfuck.html#run-instance_method" title="Esolang::Interpreters::Smallfuck#run (method)">run</a></span></span>
|
760
|
+
<span class='kw'>end</span></pre>
|
761
|
+
</td>
|
762
|
+
</tr>
|
763
|
+
</table>
|
764
|
+
</div>
|
765
|
+
|
766
|
+
</div>
|
767
|
+
|
768
|
+
</div>
|
769
|
+
|
770
|
+
<div id="footer">
|
771
|
+
Generated on Mon Jan 22 14:49:08 2024 by
|
772
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
773
|
+
0.9.34 (ruby-3.1.2).
|
774
|
+
</div>
|
775
|
+
|
776
|
+
</div>
|
777
|
+
</body>
|
778
|
+
</html>
|