Skip to content

Commit 8a16c1b

Browse files
committed
Generated Sample Programs website automatically
on-behalf-of: @TheRenegadeCoder <jeremy.grifski@therenegadecoder.com>
1 parent 0787cbd commit 8a16c1b

File tree

7 files changed

+132
-10
lines changed

7 files changed

+132
-10
lines changed

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ layout: default
55
title: Sample Programs in Every Language
66
---
77

8-
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 1174 articles written by 259 authors.
8+
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 1176 articles written by 259 authors.
99

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

docs/languages/idris/index.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
date: 2018-11-21
33
featured-image: programming-languages.jpg
4-
last-modified: 2018-11-21
4+
last-modified: 2025-01-01
55
layout: default
66
tags:
77
- idris
@@ -26,6 +26,7 @@ No 'Description' section available. [Please consider contributing](https://githu
2626

2727
## Articles
2828

29-
There is 1 article:
29+
There are 2 articles:
3030

31+
- [Baklava in Idris](https://sampleprograms.io/projects/baklava/idris)
3132
- [Hello World in Idris](https://sampleprograms.io/projects/hello-world/idris)

docs/languages/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ layout: default
66
title: Programming Languages
77
---
88

9-
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 154 languages, of which 153 are tested, 1 is untestable, and 983 code snippets.
9+
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 154 languages, of which 153 are tested, 1 is untestable, and 985 code snippets.
1010

1111
## Language Collections by Letter
1212

@@ -170,10 +170,10 @@ The 'H' collection contains 4 languages, of which 4 are tested, and 23 code snip
170170

171171
### I
172172

173-
The 'I' collection contains 2 languages, of which 2 are tested, and 2 code snippets.
173+
The 'I' collection contains 2 languages, of which 2 are tested, and 4 code snippets.
174174

175-
- [Idris](https://sampleprograms.io/languages/idris) (1 code snippet)
176-
- [Io](https://sampleprograms.io/languages/io) (1 code snippet)
175+
- [Idris](https://sampleprograms.io/languages/idris) (2 code snippets)
176+
- [Io](https://sampleprograms.io/languages/io) (2 code snippets)
177177

178178
&laquo; [Return to Top](#language-collections-by-letter) &raquo;
179179

docs/languages/io/index.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
date: 2021-05-24
33
featured-image: programming-languages.jpg
4-
last-modified: 2021-05-24
4+
last-modified: 2025-01-01
55
layout: default
66
tags:
77
- io
@@ -26,6 +26,7 @@ No 'Description' section available. [Please consider contributing](https://githu
2626

2727
## Articles
2828

29-
There is 1 article:
29+
There are 2 articles:
3030

31+
- [Baklava in Io](https://sampleprograms.io/projects/baklava/io)
3132
- [Hello World in Io](https://sampleprograms.io/projects/hello-world/io)
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
authors:
3+
- rzuckerm
4+
date: 2025-01-01
5+
featured-image: baklava-in-every-language.jpg
6+
last-modified: 2025-01-01
7+
layout: default
8+
tags:
9+
- baklava
10+
- idris
11+
title: Baklava in Idris
12+
---
13+
14+
<!--
15+
AUTO-GENERATED -- PLEASE DO NOT EDIT!
16+
17+
Instead, please edit the following:
18+
19+
- sources/programs/baklava/idris/how-to-implement-the-solution.md
20+
- sources/programs/baklava/idris/how-to-run-the-solution.md
21+
22+
See .github/CONTRIBUTING.md for further details.
23+
-->
24+
25+
Welcome to the [Baklava](https://sampleprograms.io/projects/baklava) in [Idris](https://sampleprograms.io/languages/idris) page! Here, you'll find the source code for this program as well as a description of how the program works.
26+
27+
## Current Solution
28+
29+
{% raw %}
30+
31+
```idris
32+
module Main
33+
34+
repeatString : String -> Int -> String
35+
repeatString s n = if n < 1 then "" else s ++ repeatString s (n - 1)
36+
37+
baklavaLine : Int -> String
38+
baklavaLine n = repeatString " " numSpaces ++ repeatString "*" numStars
39+
where
40+
numSpaces = abs n
41+
numStars = 21 - 2 * numSpaces
42+
43+
main : IO ()
44+
main = sequence_ $ map (putStrLn . baklavaLine) [-10..10]
45+
46+
```
47+
48+
{% endraw %}
49+
50+
Baklava in [Idris](https://sampleprograms.io/languages/idris) was written by:
51+
52+
- rzuckerm
53+
54+
If you see anything you'd like to change or update, [please consider contributing](https://github.com/TheRenegadeCoder/sample-programs).
55+
56+
## How to Implement the Solution
57+
58+
No 'How to Implement the Solution' section available. [Please consider contributing](https://github.com/TheRenegadeCoder/sample-programs-website).
59+
60+
## How to Run the Solution
61+
62+
No 'How to Run the Solution' section available. [Please consider contributing](https://github.com/TheRenegadeCoder/sample-programs-website).

docs/projects/baklava/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Verify that the actual output matches the expected output
7979

8080
## Articles
8181

82-
There are 102 articles:
82+
There are 104 articles:
8383

8484
- [Baklava in Ada](https://sampleprograms.io/projects/baklava/ada)
8585
- [Baklava in Algol68](https://sampleprograms.io/projects/baklava/algol68)
@@ -104,6 +104,8 @@ There are 102 articles:
104104
- [Baklava in Go](https://sampleprograms.io/projects/baklava/go)
105105
- [Baklava in Groovy](https://sampleprograms.io/projects/baklava/groovy)
106106
- [Baklava in Haskell](https://sampleprograms.io/projects/baklava/haskell)
107+
- [Baklava in Idris](https://sampleprograms.io/projects/baklava/idris)
108+
- [Baklava in Io](https://sampleprograms.io/projects/baklava/io)
107109
- [Baklava in Janet](https://sampleprograms.io/projects/baklava/janet)
108110
- [Baklava in Java](https://sampleprograms.io/projects/baklava/java)
109111
- [Baklava in Javascript](https://sampleprograms.io/projects/baklava/javascript)

docs/projects/baklava/io/index.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
authors:
3+
- rzuckerm
4+
date: 2025-01-01
5+
featured-image: baklava-in-every-language.jpg
6+
last-modified: 2025-01-01
7+
layout: default
8+
tags:
9+
- baklava
10+
- io
11+
title: Baklava in Io
12+
---
13+
14+
<!--
15+
AUTO-GENERATED -- PLEASE DO NOT EDIT!
16+
17+
Instead, please edit the following:
18+
19+
- sources/programs/baklava/io/how-to-implement-the-solution.md
20+
- sources/programs/baklava/io/how-to-run-the-solution.md
21+
22+
See .github/CONTRIBUTING.md for further details.
23+
-->
24+
25+
Welcome to the [Baklava](https://sampleprograms.io/projects/baklava) in [Io](https://sampleprograms.io/languages/io) page! Here, you'll find the source code for this program as well as a description of how the program works.
26+
27+
## Current Solution
28+
29+
{% raw %}
30+
31+
```io
32+
baklavaLine := method(n,
33+
num_spaces := n abs
34+
num_stars := 21 - (2 * num_spaces)
35+
(" " repeated(num_spaces)) .. ("*" repeated(num_stars))
36+
)
37+
38+
for(n, -10, 10, baklavaLine(n) println)
39+
40+
```
41+
42+
{% endraw %}
43+
44+
Baklava in [Io](https://sampleprograms.io/languages/io) was written by:
45+
46+
- rzuckerm
47+
48+
If you see anything you'd like to change or update, [please consider contributing](https://github.com/TheRenegadeCoder/sample-programs).
49+
50+
## How to Implement the Solution
51+
52+
No 'How to Implement the Solution' section available. [Please consider contributing](https://github.com/TheRenegadeCoder/sample-programs-website).
53+
54+
## How to Run the Solution
55+
56+
No 'How to Run the Solution' section available. [Please consider contributing](https://github.com/TheRenegadeCoder/sample-programs-website).

0 commit comments

Comments
 (0)