Skip to content

Commit

Permalink
Generated Sample Programs website automatically
Browse files Browse the repository at this point in the history
on-behalf-of: @TheRenegadeCoder <jeremy.grifski@therenegadecoder.com>
  • Loading branch information
actions-user committed Dec 23, 2024
1 parent 930a6e5 commit 85b49e3
Show file tree
Hide file tree
Showing 7 changed files with 128 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ layout: default
title: Sample Programs in Every Language
---

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 1152 articles written by 260 authors.
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 1154 articles written by 260 authors.

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/).
8 changes: 4 additions & 4 deletions docs/languages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ layout: default
title: Programming Languages
---

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 961 code snippets.
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 963 code snippets.

## Language Collections by Letter

Expand Down Expand Up @@ -239,11 +239,11 @@ The 'N' collection contains 3 languages, of which 3 are tested, and 6 code snipp

### O

The 'O' collection contains 7 languages, of which 7 are tested, and 33 code snippets.
The 'O' collection contains 7 languages, of which 7 are tested, and 35 code snippets.

- [Objective C](https://sampleprograms.io/languages/objective-c) (10 code snippets)
- [Ocaml](https://sampleprograms.io/languages/ocaml) (1 code snippet)
- [Octave](https://sampleprograms.io/languages/octave) (13 code snippets)
- [Ocaml](https://sampleprograms.io/languages/ocaml) (2 code snippets)
- [Octave](https://sampleprograms.io/languages/octave) (14 code snippets)
- [Odin](https://sampleprograms.io/languages/odin) (6 code snippets)
- [Opa](https://sampleprograms.io/languages/opa) (1 code snippet)
- [Orc](https://sampleprograms.io/languages/orc) (1 code snippet)
Expand Down
5 changes: 3 additions & 2 deletions docs/languages/ocaml/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
date: 2018-10-17
featured-image: programming-languages.jpg
last-modified: 2018-10-17
last-modified: 2024-12-23
layout: default
tags:
- ocaml
Expand All @@ -26,6 +26,7 @@ No 'Description' section available. [Please consider contributing](https://githu

## Articles

There is 1 article:
There are 2 articles:

- [Baklava in Ocaml](https://sampleprograms.io/projects/baklava/ocaml)
- [Hello World in Ocaml](https://sampleprograms.io/projects/hello-world/ocaml)
5 changes: 3 additions & 2 deletions docs/languages/octave/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ authors:
- rzuckerm
date: 2018-04-11
featured-image: programming-languages.jpg
last-modified: 2023-12-11
last-modified: 2024-12-23
layout: default
tags:
- octave
Expand Down Expand Up @@ -72,8 +72,9 @@ chemistry professors, who published a textbook on chemical reactions.

## Articles

There are 13 articles:
There are 14 articles:

- [Baklava in Octave](https://sampleprograms.io/projects/baklava/octave)
- [Bubble Sort in Octave](https://sampleprograms.io/projects/bubble-sort/octave)
- [Capitalize in Octave](https://sampleprograms.io/projects/capitalize/octave)
- [Even Odd in Octave](https://sampleprograms.io/projects/even-odd/octave)
Expand Down
4 changes: 3 additions & 1 deletion docs/projects/baklava/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Verify that the actual output matches the expected output

## Articles

There are 80 articles:
There are 82 articles:

- [Baklava in Ada](https://sampleprograms.io/projects/baklava/ada)
- [Baklava in Algol68](https://sampleprograms.io/projects/baklava/algol68)
Expand Down Expand Up @@ -112,6 +112,8 @@ There are 80 articles:
- [Baklava in Lua](https://sampleprograms.io/projects/baklava/lua)
- [Baklava in Malbolge](https://sampleprograms.io/projects/baklava/malbolge)
- [Baklava in Mathematica](https://sampleprograms.io/projects/baklava/mathematica)
- [Baklava in Ocaml](https://sampleprograms.io/projects/baklava/ocaml)
- [Baklava in Octave](https://sampleprograms.io/projects/baklava/octave)
- [Baklava in Pascal](https://sampleprograms.io/projects/baklava/pascal)
- [Baklava in Perl](https://sampleprograms.io/projects/baklava/perl)
- [Baklava in Phix](https://sampleprograms.io/projects/baklava/phix)
Expand Down
58 changes: 58 additions & 0 deletions docs/projects/baklava/ocaml/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
authors:
- rzuckerm
date: 2024-12-23
featured-image: baklava-in-every-language.jpg
last-modified: 2024-12-23
layout: default
tags:
- baklava
- ocaml
title: Baklava in Ocaml
---

<!--
AUTO-GENERATED -- PLEASE DO NOT EDIT!
Instead, please edit the following:
- sources/programs/baklava/ocaml/how-to-implement-the-solution.md
- sources/programs/baklava/ocaml/how-to-run-the-solution.md
See .github/CONTRIBUTING.md for further details.
-->

Welcome to the [Baklava](https://sampleprograms.io/projects/baklava) in [Ocaml](https://sampleprograms.io/languages/ocaml) page! Here, you'll find the source code for this program as well as a description of how the program works.

## Current Solution

{% raw %}

```ocaml
(** https://rosettacode.org/wiki/Repeat_a_string#OCaml **)
let string_repeat n s =
String.concat "" (Array.to_list (Array.make n s));;
for n = -10 to 10 do
let num_spaces = abs n in
let num_stars = 21 - 2 * num_spaces in
Printf.printf "%s%s\n" (string_repeat num_spaces " ") (string_repeat num_stars "*");
done
```

{% endraw %}

Baklava in [Ocaml](https://sampleprograms.io/languages/ocaml) was written by:

- rzuckerm

If you see anything you'd like to change or update, [please consider contributing](https://github.com/TheRenegadeCoder/sample-programs).

## How to Implement the Solution

No 'How to Implement the Solution' section available. [Please consider contributing](https://github.com/TheRenegadeCoder/sample-programs-website).

## How to Run the Solution

No 'How to Run the Solution' section available. [Please consider contributing](https://github.com/TheRenegadeCoder/sample-programs-website).
56 changes: 56 additions & 0 deletions docs/projects/baklava/octave/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
authors:
- rzuckerm
date: 2024-12-23
featured-image: baklava-in-every-language.jpg
last-modified: 2024-12-23
layout: default
tags:
- baklava
- octave
title: Baklava in Octave
---

<!--
AUTO-GENERATED -- PLEASE DO NOT EDIT!
Instead, please edit the following:
- sources/programs/baklava/octave/how-to-implement-the-solution.md
- sources/programs/baklava/octave/how-to-run-the-solution.md
See .github/CONTRIBUTING.md for further details.
-->

Welcome to the [Baklava](https://sampleprograms.io/projects/baklava) in [Octave](https://sampleprograms.io/languages/octave) page! Here, you'll find the source code for this program as well as a description of how the program works.

## Current Solution

{% raw %}

```octave
function baklava()
for n = -10:10
num_spaces = abs(n);
num_stars = 21 - 2 * num_spaces;
disp([repmat(' ', 1, num_spaces), repmat('*', 1, num_stars)]);
end
end
```

{% endraw %}

Baklava in [Octave](https://sampleprograms.io/languages/octave) was written by:

- rzuckerm

If you see anything you'd like to change or update, [please consider contributing](https://github.com/TheRenegadeCoder/sample-programs).

## How to Implement the Solution

No 'How to Implement the Solution' section available. [Please consider contributing](https://github.com/TheRenegadeCoder/sample-programs-website).

## How to Run the Solution

No 'How to Run the Solution' section available. [Please consider contributing](https://github.com/TheRenegadeCoder/sample-programs-website).

0 comments on commit 85b49e3

Please sign in to comment.