Skip to content

Commit

Permalink
deploy: fbe14f0
Browse files Browse the repository at this point in the history
  • Loading branch information
tassiluca committed Mar 6, 2024
1 parent 15aeddb commit 32fd464
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 24 deletions.
2 changes: 1 addition & 1 deletion 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<link rel="canonical" href="https://tassiluca.github.io/direct-style-experiments/404.html">
<link rel="stylesheet" href="/direct-style-experiments/book.min.42504dd4648e8da78376617fd32b73c3ae6afbe9f805c36868bc831b07002332.css" integrity="sha256-QlBN1GSOjaeDdmF/0ytzw65q&#43;&#43;n4BcNoaLyDGwcAIzI=" crossorigin="anonymous">
<script defer src="/direct-style-experiments/flexsearch.min.js"></script>
<script defer src="/direct-style-experiments/en.search.min.0b62eab04741714c6fff9863d4f1b1c55360b9d32d60312669a9b010f0ea7a99.js" integrity="sha256-C2LqsEdBcUxv/5hj1PGxxVNgudMtYDEmaamwEPDqepk=" crossorigin="anonymous"></script>
<script defer src="/direct-style-experiments/en.search.min.103fe240c64dfac838151e2076d9e47f9cf5e03187ec7af6348c675d1835a82e.js" integrity="sha256-ED/iQMZN&#43;sg4FR4gdtnkf5z14DGH7Hr2NIxnXRg1qC4=" crossorigin="anonymous"></script>
<!--
Made with Book Theme
https://github.com/alex-shpak/hugo-book
Expand Down
2 changes: 1 addition & 1 deletion categories/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<link rel="canonical" href="https://tassiluca.github.io/direct-style-experiments/categories/">
<link rel="stylesheet" href="/direct-style-experiments/book.min.42504dd4648e8da78376617fd32b73c3ae6afbe9f805c36868bc831b07002332.css" integrity="sha256-QlBN1GSOjaeDdmF/0ytzw65q&#43;&#43;n4BcNoaLyDGwcAIzI=" crossorigin="anonymous">
<script defer src="/direct-style-experiments/flexsearch.min.js"></script>
<script defer src="/direct-style-experiments/en.search.min.0b62eab04741714c6fff9863d4f1b1c55360b9d32d60312669a9b010f0ea7a99.js" integrity="sha256-C2LqsEdBcUxv/5hj1PGxxVNgudMtYDEmaamwEPDqepk=" crossorigin="anonymous"></script>
<script defer src="/direct-style-experiments/en.search.min.103fe240c64dfac838151e2076d9e47f9cf5e03187ec7af6348c675d1835a82e.js" integrity="sha256-ED/iQMZN&#43;sg4FR4gdtnkf5z14DGH7Hr2NIxnXRg1qC4=" crossorigin="anonymous"></script>
<link rel="alternate" type="application/rss+xml" href="https://tassiluca.github.io/direct-style-experiments/categories/index.xml" title="direct-style-experiments" />
<!--
Made with Book Theme
Expand Down
2 changes: 1 addition & 1 deletion docs/01-boundaries/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<link rel="canonical" href="https://tassiluca.github.io/direct-style-experiments/docs/01-boundaries/">
<link rel="stylesheet" href="/direct-style-experiments/book.min.42504dd4648e8da78376617fd32b73c3ae6afbe9f805c36868bc831b07002332.css" integrity="sha256-QlBN1GSOjaeDdmF/0ytzw65q&#43;&#43;n4BcNoaLyDGwcAIzI=" crossorigin="anonymous">
<script defer src="/direct-style-experiments/flexsearch.min.js"></script>
<script defer src="/direct-style-experiments/en.search.min.0b62eab04741714c6fff9863d4f1b1c55360b9d32d60312669a9b010f0ea7a99.js" integrity="sha256-C2LqsEdBcUxv/5hj1PGxxVNgudMtYDEmaamwEPDqepk=" crossorigin="anonymous"></script>
<script defer src="/direct-style-experiments/en.search.min.103fe240c64dfac838151e2076d9e47f9cf5e03187ec7af6348c675d1835a82e.js" integrity="sha256-ED/iQMZN&#43;sg4FR4gdtnkf5z14DGH7Hr2NIxnXRg1qC4=" crossorigin="anonymous"></script>
<!--
Made with Book Theme
https://github.com/alex-shpak/hugo-book
Expand Down
2 changes: 1 addition & 1 deletion docs/02-basics/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<link rel="canonical" href="https://tassiluca.github.io/direct-style-experiments/docs/02-basics/">
<link rel="stylesheet" href="/direct-style-experiments/book.min.42504dd4648e8da78376617fd32b73c3ae6afbe9f805c36868bc831b07002332.css" integrity="sha256-QlBN1GSOjaeDdmF/0ytzw65q&#43;&#43;n4BcNoaLyDGwcAIzI=" crossorigin="anonymous">
<script defer src="/direct-style-experiments/flexsearch.min.js"></script>
<script defer src="/direct-style-experiments/en.search.min.0b62eab04741714c6fff9863d4f1b1c55360b9d32d60312669a9b010f0ea7a99.js" integrity="sha256-C2LqsEdBcUxv/5hj1PGxxVNgudMtYDEmaamwEPDqepk=" crossorigin="anonymous"></script>
<script defer src="/direct-style-experiments/en.search.min.103fe240c64dfac838151e2076d9e47f9cf5e03187ec7af6348c675d1835a82e.js" integrity="sha256-ED/iQMZN&#43;sg4FR4gdtnkf5z14DGH7Hr2NIxnXRg1qC4=" crossorigin="anonymous"></script>
<!--
Made with Book Theme
https://github.com/alex-shpak/hugo-book
Expand Down
20 changes: 9 additions & 11 deletions docs/03-channels/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
<meta property="og:type" content="article" />
<meta property="og:url" content="https://tassiluca.github.io/direct-style-experiments/docs/03-channels/" /><meta property="article:section" content="docs" />

<meta property="article:modified_time" content="2024-03-04T23:51:25+01:00" />
<meta property="article:modified_time" content="2024-03-06T23:01:41+01:00" />

<title>03 Channels | direct-style-experiments</title>
<link rel="manifest" href="/direct-style-experiments/manifest.json">
<link rel="icon" href="/direct-style-experiments/favicon.png" >
<link rel="canonical" href="https://tassiluca.github.io/direct-style-experiments/docs/03-channels/">
<link rel="stylesheet" href="/direct-style-experiments/book.min.42504dd4648e8da78376617fd32b73c3ae6afbe9f805c36868bc831b07002332.css" integrity="sha256-QlBN1GSOjaeDdmF/0ytzw65q&#43;&#43;n4BcNoaLyDGwcAIzI=" crossorigin="anonymous">
<script defer src="/direct-style-experiments/flexsearch.min.js"></script>
<script defer src="/direct-style-experiments/en.search.min.0b62eab04741714c6fff9863d4f1b1c55360b9d32d60312669a9b010f0ea7a99.js" integrity="sha256-C2LqsEdBcUxv/5hj1PGxxVNgudMtYDEmaamwEPDqepk=" crossorigin="anonymous"></script>
<script defer src="/direct-style-experiments/en.search.min.103fe240c64dfac838151e2076d9e47f9cf5e03187ec7af6348c675d1835a82e.js" integrity="sha256-ED/iQMZN&#43;sg4FR4gdtnkf5z14DGH7Hr2NIxnXRg1qC4=" crossorigin="anonymous"></script>
<!--
Made with Book Theme
https://github.com/alex-shpak/hugo-book
Expand Down Expand Up @@ -607,18 +607,16 @@ <h3 id="future-monadic-version">
</span></span></span></code></pre></div><p>Then, the implementation of the <code>analyze</code> method becomes:</p>
<div class="highlight"><pre tabindex="0" style="color:#4c4f69;background-color:#eff1f5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-scala" data-lang="scala"><span style="display:flex;"><span><span style="color:#8839ef">override</span> <span style="color:#8839ef">def</span> analyze<span style="color:#04a5e5;font-weight:bold">(</span>organizationName<span style="color:#8839ef">:</span> <span style="color:#d20f39">String</span><span style="color:#04a5e5;font-weight:bold">)(</span>
</span></span><span style="display:flex;"><span> updateResults<span style="color:#8839ef">:</span> <span style="color:#d20f39">RepositoryReport</span> <span style="color:#04a5e5;font-weight:bold">=&gt;</span> <span style="color:#df8e1d">Unit</span><span style="color:#04a5e5;font-weight:bold">,</span>
</span></span><span style="display:flex;"><span><span style="color:#04a5e5;font-weight:bold">)(</span>using <span style="color:#df8e1d">Async</span><span style="color:#04a5e5;font-weight:bold">)</span><span style="color:#8839ef">:</span> <span style="color:#d20f39">Either</span><span style="color:#04a5e5;font-weight:bold">[</span><span style="color:#d20f39">String</span>, <span style="color:#d20f39">Seq</span><span style="color:#04a5e5;font-weight:bold">[</span><span style="color:#d20f39">RepositoryReport</span><span style="color:#04a5e5;font-weight:bold">]]</span> <span style="color:#8839ef">=</span> either<span style="color:#8839ef">:</span>
</span></span><span style="display:flex;"><span><span style="color:#04a5e5;font-weight:bold">)(</span>using <span style="color:#df8e1d">Async</span><span style="color:#04a5e5;font-weight:bold">,</span> <span style="color:#df8e1d">AsyncOperations</span><span style="color:#04a5e5;font-weight:bold">)</span><span style="color:#8839ef">:</span> <span style="color:#d20f39">Either</span><span style="color:#04a5e5;font-weight:bold">[</span><span style="color:#d20f39">String</span>, <span style="color:#d20f39">Seq</span><span style="color:#04a5e5;font-weight:bold">[</span><span style="color:#d20f39">RepositoryReport</span><span style="color:#04a5e5;font-weight:bold">]]</span> <span style="color:#8839ef">=</span> either<span style="color:#8839ef">:</span>
</span></span><span style="display:flex;"><span> <span style="color:#d20f39">val</span> <span style="color:#d20f39">reposInfo</span> <span style="color:#04a5e5;font-weight:bold">=</span> repositoryService<span style="color:#04a5e5;font-weight:bold">.</span>incrementalRepositoriesOf<span style="color:#04a5e5;font-weight:bold">(</span>organizationName<span style="color:#04a5e5;font-weight:bold">)</span> <span style="color:#9ca0b0;font-style:italic">// 1
</span></span></span><span style="display:flex;"><span><span style="color:#9ca0b0;font-style:italic"></span> <span style="color:#8839ef">var</span> allReports <span style="color:#8839ef">=</span> <span style="color:#df8e1d">Seq</span><span style="color:#04a5e5;font-weight:bold">[</span><span style="color:#d20f39">RepositoryReport</span><span style="color:#04a5e5;font-weight:bold">]()</span>
</span></span><span style="display:flex;"><span> <span style="color:#8839ef">var</span> futures <span style="color:#8839ef">=</span> <span style="color:#df8e1d">Seq</span><span style="color:#04a5e5;font-weight:bold">[</span><span style="color:#d20f39">Future</span><span style="color:#04a5e5;font-weight:bold">[</span><span style="color:#d20f39">Unit</span><span style="color:#04a5e5;font-weight:bold">]]()</span>
</span></span></span><span style="display:flex;"><span><span style="color:#9ca0b0;font-style:italic"></span> <span style="color:#8839ef">var</span> futures <span style="color:#8839ef">=</span> <span style="color:#df8e1d">Seq</span><span style="color:#04a5e5;font-weight:bold">[</span><span style="color:#d20f39">Future</span><span style="color:#04a5e5;font-weight:bold">[</span><span style="color:#d20f39">RepositoryReport</span><span style="color:#04a5e5;font-weight:bold">]]()</span>
</span></span><span style="display:flex;"><span> reposInfo<span style="color:#04a5e5;font-weight:bold">.</span>foreach <span style="color:#04a5e5;font-weight:bold">{</span> repository <span style="color:#8839ef">=&gt;</span> <span style="color:#9ca0b0;font-style:italic">// 2
</span></span></span><span style="display:flex;"><span><span style="color:#9ca0b0;font-style:italic"></span> futures <span style="color:#8839ef">=</span> futures <span style="color:#8839ef">:</span><span style="color:#d20f39">+</span> <span style="color:#d20f39">Future:</span> <span style="color:#9ca0b0;font-style:italic">// 3
</span></span></span><span style="display:flex;"><span><span style="color:#9ca0b0;font-style:italic"></span> <span style="color:#8839ef">val</span> report <span style="color:#8839ef">=</span> repository<span style="color:#04a5e5;font-weight:bold">.?.</span>performAnalysis<span style="color:#04a5e5;font-weight:bold">.</span>awaitResult<span style="color:#04a5e5;font-weight:bold">.?</span>
</span></span></span><span style="display:flex;"><span><span style="color:#9ca0b0;font-style:italic"></span> <span style="color:#8839ef">val</span> report <span style="color:#8839ef">=</span> repository<span style="color:#04a5e5;font-weight:bold">.?.</span>performAnalysis<span style="color:#04a5e5;font-weight:bold">.</span>run<span style="color:#04a5e5;font-weight:bold">.</span>awaitResult<span style="color:#04a5e5;font-weight:bold">.?</span>
</span></span><span style="display:flex;"><span> updateResults<span style="color:#04a5e5;font-weight:bold">(</span>report<span style="color:#04a5e5;font-weight:bold">)</span>
</span></span><span style="display:flex;"><span> allReports <span style="color:#8839ef">=</span> allReports <span style="color:#8839ef">:</span><span style="color:#d20f39">+</span> <span style="color:#d20f39">report</span>
</span></span><span style="display:flex;"><span> report
</span></span><span style="display:flex;"><span> <span style="color:#04a5e5;font-weight:bold">}</span>
</span></span><span style="display:flex;"><span> futures<span style="color:#04a5e5;font-weight:bold">.</span>awaitAllOrCancel <span style="color:#9ca0b0;font-style:italic">// 4
</span></span></span><span style="display:flex;"><span><span style="color:#9ca0b0;font-style:italic"></span> allReports
</span></span><span style="display:flex;"><span> futures<span style="color:#04a5e5;font-weight:bold">.</span>awaitAllOrCancel
</span></span></code></pre></div><ol>
<li>we get the channel of repositories from the repository service;</li>
<li>the <code>foreach</code> method of <code>TerminableChannel</code> is used to iterate over all the repositories sent over the channel as soon as they are retrieved by the service. This is a blocking operation, i.e. it suspends until all the repositories are retrieved;</li>
Expand Down Expand Up @@ -980,9 +978,9 @@ <h2 id="takeaways">
<div class="flex flex-wrap justify-between">


<div><a class="flex align-center" href="https://github.com/tassiLuca/direct-style-experiments/commit/c36803ea684e9cc9c688657c48a87813fba8186a" title='Last modified by Luca Tassinari | March 4, 2024' target="_blank" rel="noopener">
<div><a class="flex align-center" href="https://github.com/tassiLuca/direct-style-experiments/commit/fbe14f05a9b7b30ce482ecdb4aa7d6120943c89b" title='Last modified by Luca Tassinari | March 6, 2024' target="_blank" rel="noopener">
<img src="/direct-style-experiments/svg/calendar.svg" class="book-icon" alt="Calendar" />
<span>March 4, 2024</span>
<span>March 6, 2024</span>
</a>
</div>

Expand Down
2 changes: 1 addition & 1 deletion docs/04-rears/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<link rel="canonical" href="https://tassiluca.github.io/direct-style-experiments/docs/04-rears/">
<link rel="stylesheet" href="/direct-style-experiments/book.min.42504dd4648e8da78376617fd32b73c3ae6afbe9f805c36868bc831b07002332.css" integrity="sha256-QlBN1GSOjaeDdmF/0ytzw65q&#43;&#43;n4BcNoaLyDGwcAIzI=" crossorigin="anonymous">
<script defer src="/direct-style-experiments/flexsearch.min.js"></script>
<script defer src="/direct-style-experiments/en.search.min.0b62eab04741714c6fff9863d4f1b1c55360b9d32d60312669a9b010f0ea7a99.js" integrity="sha256-C2LqsEdBcUxv/5hj1PGxxVNgudMtYDEmaamwEPDqepk=" crossorigin="anonymous"></script>
<script defer src="/direct-style-experiments/en.search.min.103fe240c64dfac838151e2076d9e47f9cf5e03187ec7af6348c675d1835a82e.js" integrity="sha256-ED/iQMZN&#43;sg4FR4gdtnkf5z14DGH7Hr2NIxnXRg1qC4=" crossorigin="anonymous"></script>
<!--
Made with Book Theme
https://github.com/alex-shpak/hugo-book
Expand Down
2 changes: 1 addition & 1 deletion docs/05-conclusions/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<link rel="canonical" href="https://tassiluca.github.io/direct-style-experiments/docs/05-conclusions/">
<link rel="stylesheet" href="/direct-style-experiments/book.min.42504dd4648e8da78376617fd32b73c3ae6afbe9f805c36868bc831b07002332.css" integrity="sha256-QlBN1GSOjaeDdmF/0ytzw65q&#43;&#43;n4BcNoaLyDGwcAIzI=" crossorigin="anonymous">
<script defer src="/direct-style-experiments/flexsearch.min.js"></script>
<script defer src="/direct-style-experiments/en.search.min.0b62eab04741714c6fff9863d4f1b1c55360b9d32d60312669a9b010f0ea7a99.js" integrity="sha256-C2LqsEdBcUxv/5hj1PGxxVNgudMtYDEmaamwEPDqepk=" crossorigin="anonymous"></script>
<script defer src="/direct-style-experiments/en.search.min.103fe240c64dfac838151e2076d9e47f9cf5e03187ec7af6348c675d1835a82e.js" integrity="sha256-ED/iQMZN&#43;sg4FR4gdtnkf5z14DGH7Hr2NIxnXRg1qC4=" crossorigin="anonymous"></script>
<!--
Made with Book Theme
https://github.com/alex-shpak/hugo-book
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<link rel="canonical" href="https://tassiluca.github.io/direct-style-experiments/docs/">
<link rel="stylesheet" href="/direct-style-experiments/book.min.42504dd4648e8da78376617fd32b73c3ae6afbe9f805c36868bc831b07002332.css" integrity="sha256-QlBN1GSOjaeDdmF/0ytzw65q&#43;&#43;n4BcNoaLyDGwcAIzI=" crossorigin="anonymous">
<script defer src="/direct-style-experiments/flexsearch.min.js"></script>
<script defer src="/direct-style-experiments/en.search.min.0b62eab04741714c6fff9863d4f1b1c55360b9d32d60312669a9b010f0ea7a99.js" integrity="sha256-C2LqsEdBcUxv/5hj1PGxxVNgudMtYDEmaamwEPDqepk=" crossorigin="anonymous"></script>
<script defer src="/direct-style-experiments/en.search.min.103fe240c64dfac838151e2076d9e47f9cf5e03187ec7af6348c675d1835a82e.js" integrity="sha256-ED/iQMZN&#43;sg4FR4gdtnkf5z14DGH7Hr2NIxnXRg1qC4=" crossorigin="anonymous"></script>
<link rel="alternate" type="application/rss+xml" href="https://tassiluca.github.io/direct-style-experiments/docs/index.xml" title="direct-style-experiments" />
<!--
Made with Book Theme
Expand Down

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<link rel="canonical" href="https://tassiluca.github.io/direct-style-experiments/">
<link rel="stylesheet" href="/direct-style-experiments/book.min.42504dd4648e8da78376617fd32b73c3ae6afbe9f805c36868bc831b07002332.css" integrity="sha256-QlBN1GSOjaeDdmF/0ytzw65q&#43;&#43;n4BcNoaLyDGwcAIzI=" crossorigin="anonymous">
<script defer src="/direct-style-experiments/flexsearch.min.js"></script>
<script defer src="/direct-style-experiments/en.search.min.0b62eab04741714c6fff9863d4f1b1c55360b9d32d60312669a9b010f0ea7a99.js" integrity="sha256-C2LqsEdBcUxv/5hj1PGxxVNgudMtYDEmaamwEPDqepk=" crossorigin="anonymous"></script>
<script defer src="/direct-style-experiments/en.search.min.103fe240c64dfac838151e2076d9e47f9cf5e03187ec7af6348c675d1835a82e.js" integrity="sha256-ED/iQMZN&#43;sg4FR4gdtnkf5z14DGH7Hr2NIxnXRg1qC4=" crossorigin="anonymous"></script>
<link rel="alternate" type="application/rss+xml" href="https://tassiluca.github.io/direct-style-experiments/index.xml" title="direct-style-experiments" />
<!--
Made with Book Theme
Expand Down
Loading

0 comments on commit 32fd464

Please sign in to comment.