Gleam Weekly の 3 つめが配信されました。
<div class="flex justify-center border-t border-gray-200 h-15 md:h-25 mx-5 md:mx-10"> <a href="https://gleamweekly.com/issues/3/" class="!no-underline flex w-full bg-white rounded-lg border border-gray-200 shadow hover:bg-gray-100" title="Link Card" > <div class="flex grow flex-col"> <span class="!text-xs md:!text-base px-3 pt-2 py-0 h-20 !mt-0 !mb-0 font-bold tracking-tight text-gray-900 overflow-hidden text-ellipsis"> gleamweekly.com </span> <span class="font-xs px-3 pb-3 !mb-0 text-gray-700 text-sm max-w-48 md:max-w-full overflow-hidden whitespace-nowrap text-ellipsis"> https://gleamweekly.com </span> </div> </a> </div>前回から 3 日しか経っていないですが次が来たので書いていきます。
今回から自分が気になったトピックだけ書いていきます。
This week in Gleam
Supervisors (3/3)
<div class="flex justify-center border-t border-gray-200 h-15 md:h-25 mx-5 md:mx-10"> <a href="https://code-change.nl/gleam-blog/20240326-monitoring-processes.html" class="!no-underline flex w-full bg-white rounded-lg border border-gray-200 shadow hover:bg-gray-100" title="Link Card" > <div class="flex grow flex-col"> <span class="!text-xs md:!text-base px-3 pt-2 py-0 h-20 !mt-0 !mb-0 font-bold tracking-tight text-gray-900 overflow-hidden text-ellipsis"> code-change.nl </span> <span class="font-xs px-3 pb-3 !mb-0 text-gray-700 text-sm max-w-48 md:max-w-full overflow-hidden whitespace-nowrap text-ellipsis"> https://code-change.nl </span> </div> </a> </div>前回の続編です。今回はスーパーバイザーを用いたプロセスの監視について解説しています。 Erlang VM の醍醐味とも言えるのでこれについても解説していきたいです。
Ivy language
<div class="flex justify-center border-t border-gray-200 h-15 md:h-25 mx-5 md:mx-10"> <a href="https://github.com/RyanBrewer317/ivy" class="!no-underline flex w-full bg-white rounded-lg border border-gray-200 shadow hover:bg-gray-100" title="Link Card" > <div class="flex grow flex-col"> <span class="!text-xs md:!text-base px-3 pt-2 py-0 h-20 !mt-0 !mb-0 font-bold tracking-tight text-gray-900 overflow-hidden text-ellipsis"> github.com </span> <span class="font-xs px-3 pb-3 !mb-0 text-gray-700 text-sm max-w-48 md:max-w-full overflow-hidden whitespace-nowrap text-ellipsis"> https://github.com </span> </div> </a> </div>Gleam で書かれたスクリプト言語 ivy がリリースされました。 まだ基本的な型と関数程度しか実装されていませんが、Gleam は言語が実装できるレベルの機能を持っているという実証になると思います。
A little webring in Gleam
<div class="flex justify-center border-t border-gray-200 h-15 md:h-25 mx-5 md:mx-10"> <a href="https://erikarow.land/notes/gleam-webring" class="!no-underline flex w-full bg-white rounded-lg border border-gray-200 shadow hover:bg-gray-100" title="Link Card" > <div class="flex grow flex-col"> <span class="!text-xs md:!text-base px-3 pt-2 py-0 h-20 !mt-0 !mb-0 font-bold tracking-tight text-gray-900 overflow-hidden text-ellipsis"> erikarow.land </span> <span class="font-xs px-3 pb-3 !mb-0 text-gray-700 text-sm max-w-48 md:max-w-full overflow-hidden whitespace-nowrap text-ellipsis"> https://erikarow.land </span> </div> </a> </div>Gleam で Webring を実装したというブログ記事です。 Webring とは、共通のテーマを扱っているサイト同士をリンクで繋ぎ、文字通りリングのようにグルグル回れるようにしたものです。 検索エンジンのようにクロールする必要もなく、インターネット初期によく使われたそうです。 自分も FF の人達で webring やってみたい...
Even more great Gleam stuff
Gleam bindings to Erlang's code module Project update
<div class="flex justify-center border-t border-gray-200 h-15 md:h-25 mx-5 md:mx-10"> <a href="https://github.com/grodaus/glcode" class="!no-underline flex w-full bg-white rounded-lg border border-gray-200 shadow hover:bg-gray-100" title="Link Card" > <div class="flex grow flex-col"> <span class="!text-xs md:!text-base px-3 pt-2 py-0 h-20 !mt-0 !mb-0 font-bold tracking-tight text-gray-900 overflow-hidden text-ellipsis"> github.com </span> <span class="font-xs px-3 pb-3 !mb-0 text-gray-700 text-sm max-w-48 md:max-w-full overflow-hidden whitespace-nowrap text-ellipsis"> https://github.com </span> </div> </a> </div>Gleam と Erlang コードをバインディングするライブラリです。 正直@external との差異が分からなかったのでもう少しちゃんと調べたいです。
Carpenter, ETS bindings in Gleam Project update
<div class="flex justify-center border-t border-gray-200 h-15 md:h-25 mx-5 md:mx-10"> <a href="https://github.com/grottohub/carpenter" class="!no-underline flex w-full bg-white rounded-lg border border-gray-200 shadow hover:bg-gray-100" title="Link Card" > <div class="flex grow flex-col"> <span class="!text-xs md:!text-base px-3 pt-2 py-0 h-20 !mt-0 !mb-0 font-bold tracking-tight text-gray-900 overflow-hidden text-ellipsis"> github.com </span> <span class="font-xs px-3 pb-3 !mb-0 text-gray-700 text-sm max-w-48 md:max-w-full overflow-hidden whitespace-nowrap text-ellipsis"> https://github.com </span> </div> </a> </div>Gleam で ETS を扱うライブラリとしてgtsというものがあるのですが、現在のバージョンでは動かなくなっています。 その代替として gts を fork して作られたのがこのライブラリになります。自分も gts が動かなくて代替を作ろうと思っていたのでありがたい。
Remote data for Gleam, Elm inspired Project update
<div class="flex justify-center border-t border-gray-200 h-15 md:h-25 mx-5 md:mx-10"> <a href="https://hexdocs.pm/remote_data/index.html" class="!no-underline flex w-full bg-white rounded-lg border border-gray-200 shadow hover:bg-gray-100" title="Link Card" > <div class="flex grow flex-col"> <span class="!text-xs md:!text-base px-3 pt-2 py-0 h-20 !mt-0 !mb-0 font-bold tracking-tight text-gray-900 overflow-hidden text-ellipsis"> hexdocs.pm </span> <span class="font-xs px-3 pb-3 !mb-0 text-gray-700 text-sm max-w-48 md:max-w-full overflow-hidden whitespace-nowrap text-ellipsis"> https://hexdocs.pm </span> </div> </a> </div>Elm の Remote_data にインスパイアされて作られた Lustre でリモートデータを取得するライブラリです。 Elm のことがよく分からない1のでなんとも言えないですが、副作用を共なうデータフェッチをクリーンに書けそうで良さそうな気がします。
余談
段々ライブラリや紹介動画や記事が増えてきていて、Gleam の人気が高まってきていると感じる内容でした。 来週の Gleam Weekly も楽しみです。
脚注
以前ハンズオンで触った程度。Elm アーキテクチャへの理解を深めるためにも触っていきたい。
↩︎