• issue6 Gleam Weekly

    2024年5月2日

    5月になりましたね。 今週もGleam Weeklyやっていきます。

    This week in Gleam

    Scriptorium - A simple blog generator

    <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/scriptorium" 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>

    Lustreで書かれたシンプルなブログジェネレーターです。 LustreのOrgにはSSGのリポジトリがあるのでいつか出るとは思っていましたがわりと早く出てきました。

    注意点として、Node.js上でしか動かないので注意です。

    The optimizations in Erlang/OTP 27

    <div class="flex justify-center border-t border-gray-200 h-15 md:h-25 mx-5 md:mx-10"> <a href="https://www.erlang.org/blog/optimizations/" 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"> www.erlang.org </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://www.erlang.org </span> </div> </a> </div>

    Erlang 27で追加された最適化についての記事です。 ErlangのJITにまつわる最適化について詳細に書かれていて参考になります。

    Big Ben 1.0

    <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/maxdeviant/bigben" 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の時刻ライブラリにはbirlというのがありますが、bigbenはbirlに擬似的な時刻を与えるものとなっています。 なので開発というよりテストに向いていそうな印象を受けました。

    Even more great Gleam stuff

    Catppuccin: Soothing pastel library 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/MAHcodes/catppuccin" 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>

    カラーテーマで有名なCatppuccinのGleamライブラリがアップデートされました。 このライブラリを使うと、GleamコードからCatppuccinのカラーパレットにアクセスできます。

    A simple parallel map library 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/PastMoments/parallel_map" 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のリストを用いて並列処理を簡単に実行できる単純なライブラリです。 個人的にElixirのFlowに近いものを感じました。Gleamでもそのような計算向けのライブラリが増えていって欲しいですね~。

    まとめ

    今回のGleam Weeklyはライブラリのアップデートが中心になってました。 最近のGleam界隈はライブラリがポンポン生まれていて圧倒されます。自分もそろそろ何か書いて公開したいです。


    ko-fi ☕GitHub Sponsors 🐙