Skip to content

Commit

Permalink
deploy: adf1a76
Browse files Browse the repository at this point in the history
  • Loading branch information
tassiluca committed Mar 21, 2024
1 parent fd99b3e commit 2d3d54f
Show file tree
Hide file tree
Showing 15 changed files with 143 additions and 82 deletions.
2 changes: 1 addition & 1 deletion 404.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/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.bf3e6c4047a74032e851536a446a84e22354d1e9cd8c7448337ec5431e8104e4.js" integrity="sha256-vz5sQEenQDLoUVNqRGqE4iNU0enNjHRIM37FQx6BBOQ=" crossorigin="anonymous"></script>
<script defer src="/direct-style-experiments/en.search.min.0a53d30665124409e5805f451a4cb784495cc6887fc81a30b7e8f9f397def877.js" integrity="sha256-ClPTBmUSRAnlgF9FGky3hElcxoh/yBowt&#43;j585fe&#43;Hc=" 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 @@ -16,7 +16,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.bf3e6c4047a74032e851536a446a84e22354d1e9cd8c7448337ec5431e8104e4.js" integrity="sha256-vz5sQEenQDLoUVNqRGqE4iNU0enNjHRIM37FQx6BBOQ=" crossorigin="anonymous"></script>
<script defer src="/direct-style-experiments/en.search.min.0a53d30665124409e5805f451a4cb784495cc6887fc81a30b7e8f9f397def877.js" integrity="sha256-ClPTBmUSRAnlgF9FGky3hElcxoh/yBowt&#43;j585fe&#43;Hc=" 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
15 changes: 9 additions & 6 deletions docs/01-overview/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
<meta property="og:type" content="article" />
<meta property="og:url" content="https://tassiluca.github.io/direct-style-experiments/docs/01-overview/" /><meta property="article:section" content="docs" />

<meta property="article:modified_time" content="2024-03-09T16:35:50+01:00" />
<meta property="article:modified_time" content="2024-03-21T01:32:29+01:00" />
<title>01 Overview | 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/01-overview/">
<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.bf3e6c4047a74032e851536a446a84e22354d1e9cd8c7448337ec5431e8104e4.js" integrity="sha256-vz5sQEenQDLoUVNqRGqE4iNU0enNjHRIM37FQx6BBOQ=" crossorigin="anonymous"></script>
<script defer src="/direct-style-experiments/en.search.min.0a53d30665124409e5805f451a4cb784495cc6887fc81a30b7e8f9f397def877.js" integrity="sha256-ClPTBmUSRAnlgF9FGky3hElcxoh/yBowt&#43;j585fe&#43;Hc=" crossorigin="anonymous"></script>
<!--
Made with Book Theme
https://github.com/alex-shpak/hugo-book
Expand Down Expand Up @@ -207,12 +207,14 @@ <h2 id="context">
</h2>
<p>In the realm of asynchronous programming, the Scala ecosystem offers a set of solid and widely adopted monadic constructs and libraries to tackle complex tasks functionally with elegance and efficiency, like <a href="https://monix.io/docs/current/eval/task.html">Monix Tasks</a> and <a href="https://typelevel.org/cats-effect/">Cats Effecs</a>, enabling a wide range of interesting and useful features, like composable error handling, cancellation mechanisms and structured concurrency that the standard library lacks.
However, they also come with a cost: the pervasiveness of the <code>flatMap</code> operator to compose values makes the code harder to reason about and difficult and awkward to integrate with regular control structures.</p>
<p>In the last years, we have been assisting the increase in adoption of continuation and coroutines in modern runtimes, either exploiting some kind of fibers support, like the project Loom with Virtual Threads, or via code generation, like Kotlin Coroutines, aiming to capture the essence of effects more cleanly compared to monads.</p>
<p>In the last years, we have been assisting the increase in adoption of continuations and coroutines in modern runtimes, either exploiting some kind of fiber support, like the project Loom with Virtual Threads, or via code generation, like <a href="https://kotlinlang.org/docs/coroutines-overview.html">Kotlin Coroutines</a>.
Even Scala is not immune to this trend and a new strawman library, <a href="https://github.com/lampepfl/gears">Gears</a>, is currently being developed, aiming to bring direct style support for asynchronous programming.
Despite the interest and the potential this new library could bring, it is just a speck that fits into a bigger picture, which is the management of effects: the ongoing research activity led by M. Odersky has indeed the goal to, instead of pushing effect management into external libraries, upgrade the type system to handle effects natively using capabilities, as research-oriented programming languages do with Algebraic Effects (like Koka).</p>
<h2 id="goals">
Goals
<a class="anchor" href="#goals">#</a>
</h2>
<p>The goal of this project is to explore, mainly focusing on Scala, the direct style, developing a few examples (not too complex) leveraging the new strawman library <a href="https://github.com/lampepfl/gears">Gears</a>, comparing it with <a href="https://kotlinlang.org/docs/coroutines-overview.html">Kotlin Coroutines</a> and the current implementation of monadic Futures, seeking to analyze aspects such as:</p>
<p>The goal of this project is to explore, mainly focusing on Scala, the direct style, developing a few examples (not too complex) leveraging the new strawman library Gears for asynchronous programming, comparing it with Kotlin Coroutines and the current implementation of monadic Futures, seeking to analyze aspects such as:</p>
<ul>
<li>ergonomics of the two styles;</li>
<li>which of the two approaches has a real advantage in adoption;</li>
Expand Down Expand Up @@ -269,6 +271,7 @@ <h2 id="references">
<li><a href="https://medium.com/scala-3/scala-3-what-is-direct-style-d9c1bcb1f810#:~:text=Dean%20Wampler-,Scala%203,without%20the%20boilerplate%20of%20monads.">Scala 3: What Is &ldquo;Direct Style&rdquo; by D. Wampler</a></li>
<li><a href="https://kotlinlang.org/docs/coroutines-overview.html">Kotlin Coroutines documentation</a></li>
<li><a href="https://contributors.scala-lang.org/t/pre-sip-suspended-functions-and-continuations/5801/20?u=adamw">Pre-SIP: Suspended functions and continuations in Scala 3</a></li>
<li><a href="https://www.youtube.com/watch?v=-qf8yteuxPs">Martin Odersky - Simply Scala</a></li>
<li><a href="https://www.youtube.com/watch?v=9I2xoQVzrhs">The Great Concurrency Smackdown: ZIO versus JDK by John A. De Goes</a></li>
<li><a href="https://medium.com/geekculture/continuation-coroutine-continuation-generator-9a1af03a3bed">Continuaton, coroutine, and generator by A. Ber</a></li>
<li><a href="https://www.youtube.com/watch?v=_hfBv0a09Jc">KotlinConf 2017 - Introduction to Coroutines by Roman Elizarov</a></li>
Expand Down Expand Up @@ -308,9 +311,9 @@ <h2 id="references">
<div class="flex flex-wrap justify-between">


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

Expand Down
Loading

0 comments on commit 2d3d54f

Please sign in to comment.