summaryrefslogtreecommitdiff
path: root/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.html
diff options
context:
space:
mode:
Diffstat (limited to 'gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.html')
-rw-r--r--gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.html14
1 files changed, 7 insertions, 7 deletions
diff --git a/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.html b/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.html
index 8f52ca73..f529263d 100644
--- a/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.html
+++ b/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.html
@@ -50,10 +50,10 @@ h2, h3 {
<body>
<h1>The fibonacci.pl.c Polyglot</h1>
<p class="quote"><i>Written by Paul Buetow 2014-03-24</i></p>
-<p>In computing, a polyglot is a computer program or script written in a valid form of multiple programming languages, which performs the same operations or output independent of the programming language used to compile or interpret it</p>
+<p>In computing, a polyglot is a computer program or script written in a valid form of multiple programming languages, which performs the same operations or output independent of the programming language used to compile or interpret it.</p>
<a class="textlink" href="https://en.wikipedia.org/wiki/Polyglot_(computing)">https://en.wikipedia.org/wiki/Polyglot_(computing)</a><br />
<h2>The Fibonacci numbers</h2>
-<p>For fun, I programmed my own Polyglot, which is both, valid Perl and C code. The interesting part about C is, that $ is a valid character to start variable names with:</p>
+<p>For fun, I programmed my own Polyglot, which is both valid Perl and C code. The exciting part about C is that $ is a valid character to start variable names with:</p>
<pre>
#include &lt;stdio.h&gt;
@@ -66,7 +66,7 @@ my $arg;
sub hello() {
printf("Hello, welcome to Perl-C!\n");
- printf("This program is both, valid C and Perl code!\n");
+ printf("This program is both valid C and Perl code!\n");
printf("It calculates all fibonacci numbers from 0 to 9!\n\n");
return 0;
}
@@ -98,13 +98,13 @@ BEGIN {
return 0;
}
</pre>
-<p>You can find the whole source code at GitHub:</p>
+<p>You can find the full source code at GitHub:</p>
<a class="textlink" href="https://github.com/snonux/perl-c-fibonacci">https://github.com/snonux/perl-c-fibonacci</a><br />
<h3>Let's run it with Perl:</h3>
<pre>
❯ perl fibonacci.pl.c
Hello, welcome to Perl-C!
-This program is both, valid C and Perl code!
+This program is both valid C and Perl code!
It calculates all fibonacci numbers from 0 to 9!
fib(0) = 0
@@ -124,7 +124,7 @@ fib(10) = 55
❯ gcc fibonacci.pl.c -o fibonacci
❯ ./fibonacci
Hello, welcome to Perl-C!
-This program is both, valid C and Perl code!
+This program is both valid C and Perl code!
It calculates all fibonacci numbers from 0 to 9!
fib(0) = 0
@@ -139,7 +139,7 @@ fib(8) = 21
fib(9) = 34
fib(10) = 55
</pre>
-<p>It's really fun to play with :-).</p>
+<p>It's entertaining to play with :-).</p>
<p>E-Mail me your thoughts at comments@mx.buetow.org!</p>
<a class="textlink" href="../">Go back to the main site</a><br />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">