Skip to content

Commit

Permalink
Add 2 new tutorials: 1) netcat client & server, 2) tcp chat server
Browse files Browse the repository at this point in the history
  • Loading branch information
nazmulidris committed Jan 15, 2024
1 parent 45e21ad commit 9884628
Show file tree
Hide file tree
Showing 25 changed files with 1,430 additions and 160 deletions.
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"dribbble",
"DSLs",
"firamono",
"giti",
"Gjengset",
"gothambold",
"helveticaneue",
Expand All @@ -16,12 +17,14 @@
"nadiaidris",
"nazmulidris",
"Ndot",
"netcat",
"qself",
"rtelnet",
"stackoverflow",
"strikethrough",
"toolkits",
"tuis",
"vtable",
"wght"
]
}
}
20 changes: 20 additions & 0 deletions _includes/featured.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

<blockquote>
<p>
🌟 Please star the
<a href="https://github.com/r3bl-org/r3bl-open-core/tree/main/cmdr">r3bl-open-core</a> repo.

You can get lots of useful Rust command line apps from the <code>r3bl-cmdr</code> crate in this repo:
<ul>
<li>🐱<code>giti</code>: run interactive git commands with confidence in your terminal</li>
<li>🦜<code>edi</code>: edit Markdown with style in your terminal</li>
</ul>

📦 You can install them using <code>cargo install r3bl-cmdr</code>
</p>

<p>If you would like to get involved in an open source project and like Rust crates, we
welcome your contributions to the
<a href="https://github.com/r3bl-org/r3bl-open-core/tree/main/cmdr">r3bl-open-core repo</a>.
</p>
</blockquote>
29 changes: 19 additions & 10 deletions _includes/sidebar.html
Original file line number Diff line number Diff line change
@@ -1,33 +1,42 @@
<div>
<section class="sidebar">
<h2 class="star-us-github-heading">
Please star and contribute to our Github <span class="heading-emoji">🙏</span>
Please star our Github and use our apps & libs<span class="heading-emoji">🙏</span>
</h2>
<ul class="sidebar-ul">
<li class="app-container">
<a href="https://github.com/r3bl-org/r3bl-open-core/tree/main/tui" target="_blank">
<a href="https://github.com/r3bl-org/r3bl-open-core/tree/main/cmdr" target="_blank">
<img class="star-icon-img" src="{{ '/assets/star-gradient.svg' | relative_url }}" />
<div class="sidebar-list-item">
<p class="p-tag">R3BL TUI</p>
<h3 class="sidebar-h3"><code>r3bl_tui</code></h3>
<p class="p-tag">INSTALL & USE OUR APPS (giti, edi)</p>
<h3 class="sidebar-h3"><code>r3bl-cmdr</code></h3>
</div>
</a>
</li>
<li class="app-container">
<a href="https://github.com/r3bl-org/r3bl-open-core/tree/main/tuify" target="_blank">
<a href="https://github.com/r3bl-org/shortlink" target="_blank">
<img class="star-icon-img" src="{{ '/assets/star-gradient.svg' | relative_url }}" />
<div class="sidebar-list-item">
<p class="p-tag">R3BL Tuify</p>
<h3 class="sidebar-h3"><code>r3bl_tuify</code></h3>
<p class="p-tag">SHORTLINK browser extension</p>
<h3 class="sidebar-h3"><code>shortlink</code></h3>
</div>
</a>
</li>
<li class="app-container">
<a href="https://github.com/r3bl-org/shortlink" target="_blank">
<a href="https://github.com/r3bl-org/r3bl-open-core/tree/main/tui" target="_blank">
<img class="star-icon-img" src="{{ '/assets/star-gradient.svg' | relative_url }}" />
<div class="sidebar-list-item">
<p class="p-tag">SHORTLINK browser ext</p>
<h3 class="sidebar-h3"><code>shortlink</code></h3>
<p class="p-tag">R3BL TUI LIB</p>
<h3 class="sidebar-h3"><code>r3bl_tui</code></h3>
</div>
</a>
</li>
<li class="app-container">
<a href="https://github.com/r3bl-org/r3bl-open-core/tree/main/tuify" target="_blank">
<img class="star-icon-img" src="{{ '/assets/star-gradient.svg' | relative_url }}" />
<div class="sidebar-list-item">
<p class="p-tag">R3BL TUIFY LIB</p>
<h3 class="sidebar-h3"><code>r3bl_tuify</code></h3>
</div>
</a>
</li>
Expand Down
4 changes: 3 additions & 1 deletion _posts/2019-10-31-fish-scripting-manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ categories:

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

Learn how to write fish shell scripts by example.
{%- include featured.html -%}

## Shebang line at the top of your scripts

Expand Down Expand Up @@ -827,3 +827,5 @@ function timed -d Pass the program or function that you want to execute as an ar
echo "⏲ Total runtime: $RUNTIME min ⏲"
end
```
{%- include featured.html -%}
10 changes: 4 additions & 6 deletions _posts/2022-02-24-rust-non-binary-tree.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,9 @@ will be allow us to make the tree thread safe and parallel friendly (we will nam
> [`r3bl_rs_utils`](https://crates.io/crates/r3bl_rs_utils) crate.
> 📜 You can take a look the source code of this thread safe non-binary tree data structure named
> `Arena` in its github [repo](https://github.com/r3bl-org/r3bl-rs-utils).
> `Arena` in its github [repo](https://github.com/r3bl-org/r3bl-open-core/tree/main/utils).
> 🌟 Please star the [`r3bl-open-core` repo](https://github.com/r3bl-org/r3bl-open-core) on github if
> you like it 🙏.
{%- include featured.html -%}

## Naive approach using weak and strong references

Expand Down Expand Up @@ -661,7 +660,6 @@ There are functions that make it easy to unwrap things in Rust that are wrapped
> [`r3bl_rs_utils`](https://crates.io/crates/r3bl_rs_utils) crate.
> 📜 You can take a look the source code of this thread safe non-binary tree data structure named
> `Arena` in its github [repo](https://github.com/r3bl-org/r3bl-rs-utils).
> `Arena` in its github [repo](https://github.com/r3bl-org/r3bl-open-core/tree/main/utils).
> 🌟 Please star the [`r3bl-open-core` repo](https://github.com/r3bl-org/r3bl-open-core) on github if
> you like it 🙏.
{%- include featured.html -%}
6 changes: 3 additions & 3 deletions _posts/2022-03-02-rust-grep-cli-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ arguments, stdin, stdout, and piping.
> object oriented), please take a look at this [paper](https://arxiv.org/pdf/2307.07069.pdf)
> by Will Crichton demonstrating Typed Design Patterns with Rust.
{%- include featured.html -%}

## Building the main function

The first thing we need to do is build the main function. This is where we will be routing
Expand Down Expand Up @@ -263,6 +265,4 @@ Here are a list of crates that are used in this app.

We will explore more complex TUIs built w/ Rust in the future.

> 🌟 Please star the [`r3bl-open-core` repo](https://github.com/r3bl-org/r3bl-open-core) on
> github if you like it 🙏. If you would like to contribute to it, please click
> [here](https://github.com/r3bl-org/r3bl-open-core/contribute).
{%- include featured.html -%}
14 changes: 2 additions & 12 deletions _posts/2022-03-12-rust-redux.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,7 @@ tasks. But the reducer functions will be run in sequence (not in separate Tokio
> 📜 The source code for the finished Redux library can be found
> [here](https://github.com/r3bl-org/r3bl-rs-utils).
> 📦 You can use this Redux library today by adding
> [`r3bl_rs_utils`](https://crates.io/crates/r3bl_rs_utils/) crate as a dependency in your
> `Cargo.toml`.
>
> 🌟 Please star the [`r3bl-open-core` repo](https://github.com/r3bl-org/r3bl-open-core) on github if
> you like it 🙏.
{%- include featured.html -%}

This article is getting us ready to building more complex TUI apps next using crates like `termion`
and `tui`.
Expand Down Expand Up @@ -638,9 +633,4 @@ Tokio tasks.
> information on this library in it's
> [`README`](https://github.com/r3bl-org/r3bl-rs-utils/blob/main/README.md#redux) file.
> 📦 You can use this Redux library today by adding
> [`r3bl_rs_utils`](https://crates.io/crates/r3bl_rs_utils/) crate as a dependency in your
> `Cargo.toml`.
>
> 🌟 Please star the [`r3bl-open-core` repo](https://github.com/r3bl-org/r3bl-open-core) on github if
> you like it 🙏.
{%- include featured.html -%}
9 changes: 3 additions & 6 deletions _posts/2022-03-12-rust-tokio.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ more complex TUI apps next using crates like `termion` and `tui`.
> object oriented), please take a look at this [paper](https://arxiv.org/pdf/2307.07069.pdf)
> by Will Crichton demonstrating Typed Design Patterns with Rust.
{%- include featured.html -%}

## Concurrency and async/await, vs parallelism

Concurrency is being able to break up your program or function into smaller tasks that can be
Expand Down Expand Up @@ -691,9 +693,4 @@ Tokio, along w/ the tutorials that are provided on the [Tokio website](https://t
We will take this and build upon it further to create a full Redux library in Rust using Tokio
[here](https://developerlife.com/2022/03/12/rust-redux/).

> 📦 For a real implementation of this middleware and Redux library, check out the
> [`r3bl_rs_utils`](https://crates.io/crates/r3bl_rs_utils/) crate. The README has excellent
> documentation on async traits, parallel and concurrent execution, and Tokio.
>
> 🌟 Please star the [`r3bl-open-core` repo](https://github.com/r3bl-org/r3bl-open-core) on github if
> you like it 🙏.
{%- include featured.html -%}
Loading

0 comments on commit 9884628

Please sign in to comment.