Skip to content

Commit 910ba24

Browse files
committed
Deploying to gh-pages from @ eefd67c 🚀
1 parent 5bc4d61 commit 910ba24

11 files changed

Lines changed: 830 additions & 18 deletions

File tree

feed.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://sampleprograms.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://sampleprograms.io/" rel="alternate" type="text/html" /><updated>2026-05-28T12:35:42+00:00</updated><id>https://sampleprograms.io/feed.xml</id><title type="html">Sample Programs in Every Language</title><subtitle>A Collection of Code Snippets in as Many Programming Languages as Possible</subtitle></feed>
1+
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://sampleprograms.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://sampleprograms.io/" rel="alternate" type="text/html" /><updated>2026-05-28T12:38:55+00:00</updated><id>https://sampleprograms.io/feed.xml</id><title type="html">Sample Programs in Every Language</title><subtitle>A Collection of Code Snippets in as Many Programming Languages as Possible</subtitle></feed>

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ <h1>Sample Programs in Every Language</h1>
157157
<p></p>
158158

159159

160-
<p>Welcome to Sample Programs in Every Language, a collection of code snippets in as many languages as possible. Thanks for taking an interest in our collection which currently contains 1845 articles written by 302 authors.</p>
160+
<p>Welcome to Sample Programs in Every Language, a collection of code snippets in as many languages as possible. Thanks for taking an interest in our collection which currently contains 1848 articles written by 302 authors.</p>
161161

162162
<p>If you'd like to contribute to this growing collection, check out our <a href="https://github.com/TheRenegadeCoder/sample-programs/blob/master/.github/CONTRIBUTING.md">contributing document</a> for more information. In addition, you can explore our documentation which is organized by <a href="/projects">project</a> and by <a href="/languages">language</a>. If you don't find what you're look for, check out our list of related <a href="/related">open-source projects</a>. Finally, if code isn't your thing but you'd still like to help, there are plenty of other ways to <a href="https://therenegadecoder.com/updates/5-ways-you-can-support-the-renegade-coder/">support the project</a>.</p>
163163

languages/elixir/index.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,19 +249,22 @@ <h2 id="description">Description</h2>
249249

250250
<h2 id="articles">Articles</h2>
251251

252-
<p>There are 10 articles:</p>
252+
<p>There are 13 articles:</p>
253253

254254
<ul>
255255
<li><a href="/projects/baklava/elixir">Baklava in Elixir</a></li>
256256
<li><a href="/projects/bubble-sort/elixir">Bubble Sort in Elixir</a></li>
257257
<li><a href="/projects/capitalize/elixir">Capitalize in Elixir</a></li>
258258
<li><a href="/projects/even-odd/elixir">Even Odd in Elixir</a></li>
259259
<li><a href="/projects/factorial/elixir">Factorial in Elixir</a></li>
260+
<li><a href="/projects/file-input-output/elixir">File Input Output in Elixir</a></li>
260261
<li><a href="/projects/fizz-buzz/elixir">Fizz Buzz in Elixir</a></li>
261262
<li><a href="/projects/hello-world/elixir">Hello World in Elixir</a></li>
262263
<li><a href="/projects/longest-common-subsequence/elixir">Longest Common Subsequence in Elixir</a></li>
263264
<li><a href="/projects/longest-word/elixir">Longest Word in Elixir</a></li>
265+
<li><a href="/projects/palindromic-number/elixir">Palindromic Number in Elixir</a></li>
264266
<li><a href="/projects/remove-all-whitespace/elixir">Remove All Whitespace in Elixir</a></li>
267+
<li><a href="/projects/reverse-string/elixir">Reverse String in Elixir</a></li>
265268
</ul>
266269

267270
</section>

languages/index.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ <h1>Programming Languages</h1>
170170
<p></p>
171171

172172

173-
<p>Welcome to the Languages page! Here, you'll find a list of all of the languages represented in the collection. At this time, there are 158 languages, of which 157 are tested, 1 is untestable, and 1649 code snippets.</p>
173+
<p>Welcome to the Languages page! Here, you'll find a list of all of the languages represented in the collection. At this time, there are 158 languages, of which 157 are tested, 1 is untestable, and 1652 code snippets.</p>
174174

175175
<h2 id="language-breakdown">Language Breakdown</h2>
176176

@@ -182,7 +182,7 @@ <h2 id="language-breakdown">Language Breakdown</h2>
182182

183183
<tr>
184184
<td class="right nowrap">ALGOL 60</td>
185-
<td class="right">8.95%</td>
185+
<td class="right">8.94%</td>
186186
<td class="bar-graph"><div style="width: 100.00%; background-color: #D1E0DB;"></div></td>
187187
</tr>
188188

@@ -200,7 +200,7 @@ <h2 id="language-breakdown">Language Breakdown</h2>
200200

201201
<tr>
202202
<td class="right nowrap">m4</td>
203-
<td class="right">4.30%</td>
203+
<td class="right">4.29%</td>
204204
<td class="bar-graph"><div style="width: 48.00%; background-color: #CCCCCC;"></div></td>
205205
</tr>
206206

@@ -230,7 +230,7 @@ <h2 id="language-breakdown">Language Breakdown</h2>
230230

231231
<tr>
232232
<td class="right nowrap">C++</td>
233-
<td class="right">3.12%</td>
233+
<td class="right">3.11%</td>
234234
<td class="bar-graph"><div style="width: 34.83%; background-color: #F34B7D;"></div></td>
235235
</tr>
236236

@@ -428,8 +428,8 @@ <h2 id="language-breakdown">Language Breakdown</h2>
428428

429429
<tr>
430430
<td class="right nowrap">Elixir</td>
431-
<td class="right">0.34%</td>
432-
<td class="bar-graph"><div style="width: 3.83%; background-color: #6E4A7E;"></div></td>
431+
<td class="right">0.42%</td>
432+
<td class="bar-graph"><div style="width: 4.67%; background-color: #6E4A7E;"></div></td>
433433
</tr>
434434

435435
<tr>
@@ -746,7 +746,7 @@ <h2 id="language-breakdown">Language Breakdown</h2>
746746

747747
<tr>
748748
<td class="right nowrap">ArkScript</td>
749-
<td class="right">0.04%</td>
749+
<td class="right">0.03%</td>
750750
<td class="bar-graph"><div style="width: 0.39%; background-color: #00AAD4;"></div></td>
751751
</tr>
752752

@@ -1240,13 +1240,13 @@ <h3 id="d">D</h3>
12401240

12411241
<h3 id="e">E</h3>
12421242

1243-
<p>The 'E' collection contains 9 languages, of which 9 are tested, and 79 code snippets.</p>
1243+
<p>The 'E' collection contains 9 languages, of which 9 are tested, and 82 code snippets.</p>
12441244

12451245
<ul>
12461246
<li><a href="/languages/egison">Egison</a> (2 code snippets)</li>
12471247
<li><a href="/languages/eiffel">Eiffel</a> (3 code snippets)</li>
12481248
<li><a href="/languages/elena">Elena</a> (2 code snippets)</li>
1249-
<li><a href="/languages/elixir">Elixir</a> (10 code snippets)</li>
1249+
<li><a href="/languages/elixir">Elixir</a> (13 code snippets)</li>
12501250
<li><a href="/languages/elvish">Elvish</a> (14 code snippets)</li>
12511251
<li><a href="/languages/emojicode">Emojicode</a> (2 code snippets)</li>
12521252
<li><a href="/languages/erlang">Erlang</a> (6 code snippets)</li>
Lines changed: 256 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,256 @@
1+
<!DOCTYPE html>
2+
<html lang=" en-US">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
6+
7+
<link rel="shortcut icon" type="image/x-icon" href="/assets/images/favicon.ico">
8+
9+
<link rel="stylesheet" href="/assets/css/style.css?v=eefd67c39c36d58b99451ccfef07bda8356bf95e">
10+
11+
<script src="/assets/js/image_titler.js"></script>
12+
<script src="/assets/js/scale.fix.js"></script>
13+
14+
<script defer data-domain="sampleprograms.io" src="https://plausible.io/js/plausible.js"></script>
15+
16+
<link type="application/atom+xml" rel="alternate" href="https://sampleprograms.io/feed.xml" title="Sample Programs in Every Language" />
17+
18+
19+
<!-- Twitter cards -->
20+
<meta name="twitter:title" content="File Input Output in Elixir">
21+
<meta name="twitter:description" content="">
22+
23+
<meta name="twitter:card" content="summary_large_image">
24+
<meta name="twitter:image" content="https://sampleprograms.io/assets/images/file-input-output-in-every-language.jpg">
25+
<!-- end of Twitter cards -->
26+
<!-- Begin Jekyll SEO tag v2.8.0 -->
27+
<title>File Input Output in Elixir | Sample Programs in Every Language</title>
28+
<meta name="generator" content="Jekyll v3.10.0" />
29+
<meta property="og:title" content="File Input Output in Elixir" />
30+
<meta name="author" content="Ricardo Mapurunga Junior" />
31+
<meta property="og:locale" content="en_US" />
32+
<meta name="description" content="A Collection of Code Snippets in as Many Programming Languages as Possible" />
33+
<meta property="og:description" content="A Collection of Code Snippets in as Many Programming Languages as Possible" />
34+
<link rel="canonical" href="https://sampleprograms.io/projects/file-input-output/elixir/" />
35+
<meta property="og:url" content="https://sampleprograms.io/projects/file-input-output/elixir/" />
36+
<meta property="og:site_name" content="Sample Programs in Every Language" />
37+
<meta property="og:type" content="article" />
38+
<meta property="article:published_time" content="2026-05-28T00:00:00+00:00" />
39+
<meta name="twitter:card" content="summary" />
40+
<meta property="twitter:title" content="File Input Output in Elixir" />
41+
<script type="application/ld+json">
42+
{"@context":"https://schema.org","@type":"BlogPosting","author":{"@type":"Person","name":"Ricardo Mapurunga Junior"},"dateModified":"2026-05-28T00:00:00+00:00","datePublished":"2026-05-28T00:00:00+00:00","description":"A Collection of Code Snippets in as Many Programming Languages as Possible","headline":"File Input Output in Elixir","mainEntityOfPage":{"@type":"WebPage","@id":"https://sampleprograms.io/projects/file-input-output/elixir/"},"url":"https://sampleprograms.io/projects/file-input-output/elixir/"}</script>
43+
<!-- End Jekyll SEO tag -->
44+
45+
46+
<meta name="theme-color" content="#157878">
47+
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
48+
<meta name="monetization" content="$ilp.uphold.com/qgNaxDa2QH77">
49+
50+
<!-- start custom head snippets, customize with your own _includes/head-custom.html file -->
51+
52+
<!-- Setup Google Analytics -->
53+
54+
55+
56+
<!-- You can set your favicon here -->
57+
<!-- link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" -->
58+
59+
<!-- end custom head snippets -->
60+
61+
</head>
62+
63+
<!-- Default document body -->
64+
<body>
65+
<div class="wrapper">
66+
<header class="page-header" role="banner">
67+
<h1 class="header">
68+
Sample Programs in Every Language
69+
</h1>
70+
71+
<p class="header">
72+
A Collection of Code Snippets in as Many Programming Languages as Possible
73+
</p>
74+
75+
<ul>
76+
77+
<li class="download">
78+
<a class="buttons" href="https://github.com/TheRenegadeCoder/sample-programs-website/zipball/main">Download ZIP</a>
79+
</li>
80+
<li class="download">
81+
<a class="buttons" href="https://github.com/TheRenegadeCoder/sample-programs-website/tarball/main">Download TAR</a>
82+
</li>
83+
84+
85+
<li>
86+
<a class="buttons github" href="https://github.com/TheRenegadeCoder/sample-programs-website">
87+
View on GitHub
88+
</a>
89+
</li>
90+
</ul>
91+
92+
93+
<p class="header">
94+
This project is maintained by
95+
<a class="header name" href="https://github.com/TheRenegadeCoder">
96+
TheRenegadeCoder
97+
</a>
98+
</p>
99+
100+
</header>
101+
102+
<section>
103+
<nav class="top-nav">
104+
<ul>
105+
<li><a href="/" id="home">Home</a></li>
106+
<li><a href="/languages/" id="lang">Languages</a></li>
107+
<li><a href="/projects/" id="proj">Projects</a></li>
108+
</ul>
109+
</nav>
110+
111+
<nav aria-label="Breadcrumb" class="site-navigation">
112+
<ol class="breadcrumb">
113+
<li><a href="/">Home</a></li>
114+
115+
116+
117+
118+
119+
120+
121+
122+
123+
124+
<li>
125+
126+
<a href="/projects/">
127+
Projects
128+
</a>
129+
130+
</li>
131+
132+
133+
134+
135+
136+
<li>
137+
138+
<a href="/projects/file-input-output/">
139+
File input output
140+
</a>
141+
142+
</li>
143+
144+
145+
146+
147+
148+
<li>
149+
150+
<span class="active">
151+
Elixir
152+
</span>
153+
154+
</li>
155+
156+
</ol>
157+
</nav>
158+
159+
<h1>File Input Output in Elixir</h1>
160+
161+
162+
<small>
163+
164+
Published on 28 May 2026
165+
166+
167+
168+
(Updated: 28 May 2026)
169+
170+
</small>
171+
172+
173+
174+
175+
<div class="featured-image">
176+
<img
177+
src="/assets/images/file-input-output-in-every-language.jpg"
178+
alt="File Input Output in Elixir"
179+
loading="eager"
180+
>
181+
182+
183+
<div class="image-container" id="title1">
184+
<div class="image-title">File Input</div>
185+
</div>
186+
187+
188+
189+
<div class="image-container" id="title2">
190+
<div class="image-title">Output in Elixir</div>
191+
</div>
192+
193+
</div>
194+
195+
<p></p>
196+
197+
198+
<!--
199+
AUTO-GENERATED -- PLEASE DO NOT EDIT!
200+
201+
Instead, please edit the following:
202+
203+
- sources/programs/file-input-output/elixir/how-to-implement-the-solution.md
204+
- sources/programs/file-input-output/elixir/how-to-run-the-solution.md
205+
206+
See .github/CONTRIBUTING.md for further details.
207+
-->
208+
209+
<p>Welcome to the <a href="/projects/file-input-output">File Input Output</a> in <a href="/languages/elixir">Elixir</a> page! Here, you'll find the source code for this program as well as a description of how the program works.</p>
210+
211+
<h2 id="current-solution">Current Solution</h2>
212+
213+
<div class="language-elixir highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">with</span> <span class="ss">:ok</span> <span class="o">&lt;-</span> <span class="no">File</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s2">"output.txt"</span><span class="p">,</span> <span class="s2">"Oh, hi Mark."</span><span class="p">),</span>
214+
<span class="p">{</span><span class="ss">:ok</span><span class="p">,</span> <span class="n">contents</span><span class="p">}</span> <span class="o">&lt;-</span> <span class="no">File</span><span class="o">.</span><span class="n">read</span><span class="p">(</span><span class="s2">"output.txt"</span><span class="p">)</span> <span class="k">do</span>
215+
<span class="no">String</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="n">contents</span><span class="p">,</span> <span class="s2">"</span><span class="se">\n</span><span class="s2">"</span><span class="p">)</span> <span class="o">|&gt;</span> <span class="no">Enum</span><span class="o">.</span><span class="n">each</span><span class="p">(</span><span class="o">&amp;</span><span class="no">IO</span><span class="o">.</span><span class="n">puts</span><span class="o">/</span><span class="mi">1</span><span class="p">)</span>
216+
<span class="k">else</span>
217+
<span class="p">{</span><span class="ss">:error</span><span class="p">,</span> <span class="n">reason</span><span class="p">}</span> <span class="o">-&gt;</span> <span class="ss">:file</span><span class="o">.</span><span class="n">format_error</span><span class="p">(</span><span class="n">reason</span><span class="p">)</span>
218+
<span class="k">end</span>
219+
220+
</code></pre></div></div>
221+
222+
<p>File Input Output in <a href="/languages/elixir">Elixir</a> was written by:</p>
223+
224+
<ul>
225+
<li>Ricardo Mapurunga Junior</li>
226+
</ul>
227+
228+
<p>If you see anything you'd like to change or update, <a href="https://github.com/TheRenegadeCoder/sample-programs">please consider contributing</a>.</p>
229+
230+
<h2 id="how-to-implement-the-solution">How to Implement the Solution</h2>
231+
232+
<p>No 'How to Implement the Solution' section available. <a href="https://github.com/TheRenegadeCoder/sample-programs-website">Please consider contributing</a>.</p>
233+
234+
<h2 id="how-to-run-the-solution">How to Run the Solution</h2>
235+
236+
<p>No 'How to Run the Solution' section available. <a href="https://github.com/TheRenegadeCoder/sample-programs-website">Please consider contributing</a>.</p>
237+
238+
</section>
239+
240+
<footer class="site-footer" role="contentinfo">
241+
242+
<span class="site-footer-owner">
243+
<a href="https://github.com/TheRenegadeCoder/sample-programs-website">
244+
sample-programs-website
245+
</a>
246+
is maintained by
247+
<a href="https://github.com/TheRenegadeCoder">TheRenegadeCoder</a>.
248+
</span>
249+
250+
</footer>
251+
252+
</div>
253+
</body>
254+
<!-- End of default document body -->
255+
256+
</html>

projects/file-input-output/index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ <h1>File Input Output</h1>
152152

153153

154154

155-
(Updated: 18 May 2026)
155+
(Updated: 28 May 2026)
156156

157157
</small>
158158

@@ -235,7 +235,7 @@ <h2 id="testing">Testing</h2>
235235

236236
<h2 id="articles">Articles</h2>
237237

238-
<p>There are 41 articles:</p>
238+
<p>There are 42 articles:</p>
239239

240240
<ul>
241241
<li><a href="/projects/file-input-output/algol68">File Input Output in ALGOL 68</a></li>
@@ -249,6 +249,7 @@ <h2 id="articles">Articles</h2>
249249
<li><a href="/projects/file-input-output/cobol">File Input Output in COBOL</a></li>
250250
<li><a href="/projects/file-input-output/commodore-basic">File Input Output in Commodore BASIC</a></li>
251251
<li><a href="/projects/file-input-output/dg">File Input Output in Dg</a></li>
252+
<li><a href="/projects/file-input-output/elixir">File Input Output in Elixir</a></li>
252253
<li><a href="/projects/file-input-output/elvish">File Input Output in Elvish</a></li>
253254
<li><a href="/projects/file-input-output/euphoria">File Input Output in Euphoria</a></li>
254255
<li><a href="/projects/file-input-output/f-sharp">File Input Output in F#</a></li>

0 commit comments

Comments
 (0)