I’ve been doing the Weekly Challenges. The latest involved array analysis and matrix incrementing. (Note that this ends today.)| RogerBW's Blog: Latest posts
Scala does not move in the direction of more monadic IO, but rather in the direction of “direct style”, preferring continuations to monads, but without providing support for continuations out of the box.| Alexandru Nedelcu
Effects as Capabilities| nrinaudo.github.io
昨日のこれ xuwei-k.hatenablog.com の続きのような、関連するような話です。| xuwei-k's blog
タイトルがややこしくて何言ってるかわかりづらいと思うので、ひとまず具体的な例で説明します。 例えば以下のようなbuild.sbtだったときに| xuwei-k's blog
これ https://openjdk.org/jeps/502| xuwei-k's blog
Hands on Capture Checking| nrinaudo.github.io
You might have read my article about plugging Wasm into Kafka Connect, but I wanted to revisit this from a different angle: what if instead of consuming data from a topic and manipulating such data on the client-side, we intercepted data as it lands on the Kafka broker? But first of all, is it possible to extend the Kafka broker at all?| blog.evacchi.dev
I’ve been doing the Weekly Challenges. The latest involved array slicing and point filtering. (Note that this ends today.)| RogerBW's Blog
以下のライブラリの話をします。 github.com このライブラリの基本的な紹介はしません。ググるとか、流行のAIに聞く、などして調べてください。| xuwei-k's blog
それ scala.util.boundary 使えば良くない???という話である気もするのですが、とりあえずググっても簡単には見つからなかったので書いておきます。| xuwei-k's blog
Minimal Scala Container Images using Nix| blog.aiono.dev
以前こういうことをtweetしたのですが caes object 何か extends sealedの親を大量に作るScala 2形式より、Scala 3のenumの方が、それぞれ別の型にならない(classファイル作らない)ので、生成されるjar sizeが大抵(?)小さくなるというメリットがあるぞぃ— Kenji Yoshida (@xuwei_k) November 23, 2024 よく考えたら、これってcompile速度にも影響するのでは???と思って調べてみた結果を書いてい...| xuwei-k's blog
というパターンがScala標準で不可能な気がするので、build.sbtで頑張るサンプルを作ってみたのですが、Scala標準で不可能ですよね??? どういうパターンか?をもう少し詳細に説明すると| xuwei-k's blog
Pattern matching is a major feature in software development. While pattern matching applies in several locations, its current usage is limited to switch case blocks. I want to compare the power of pattern matching across a couple of programming languages I’m familiar with in this post. I assume that every reader is familiar with the switch case syntax inherited from C. In short: The switch clause references a value-returning statementEach case clause sets another statement; if the value| A Java geek
Notice The work in this article is in progress. But you are free to read it in its current state and free to post comments. If you want to see the change set, go to the bottom of the page. Maybe you are of those people who gets headache when writing a parser. LL or […]| Kerflyn's Blog
Guava is a kind of Swiss Army knife API proposed by Google for Java 5 and more. It contains many functionalities that help the developer in its every day life. Guava proposes also a basic functional programming API. You can represent almost statically typed functions with it, map functions on collections, compose them, etc. Since […]| Kerflyn's Blog
I’ve been doing the Weekly Challenges. The latest involved string manipulation. (Note that this ends today.)| RogerBW's Blog
I often hear online in Scala-related discussions that ZLayer is "too complex" or "unnecessary". Those statements couldn’t be more different from my own experience: I think ZLayer is an incredible lifesaver! While it is true that it had some issues in...| Pierre Ricadat's Tech Blog
After working on several different services and spending a lot of time improving the code to make it easier to use, I discovered a pattern for layering my applications that I found very useful. First, a disclaimer: this architecture is not a one-size...| Pierre Ricadat's Tech Blog
Today, I'm going to answer a question asked by Łukasz Biały on Twitter: Is there a way to get field-level RBAC (Role-Based Access Control)? It turns out there is! However, Caliban's approach to authentication and authorization is quite flexible. In...| Pierre Ricadat's Tech Blog
Let's start with a disclaimer. What is discussed in this article is not the ultimate truth: how to make your application faster highly depends on what your application is actually doing. Depending on your use case, the overhead of ZIO might be comple...| Pierre Ricadat's Tech Blog
Shardcake is a Scala open source library I created in 2022 to easily distribute entities across multiple servers (sharding) and to interact with them using their ID without knowing their actual location (location transparency). To support a real-life...| Pierre Ricadat's Tech Blog
In this new series of posts, I will share walkthroughs of debugging sessions I had to do at work to solve real-life problems, in the hope that both the process and the lessons learned will be useful to others working in the Scala ecosystem. The probl...| Pierre Ricadat's Tech Blog
In my Beginner's Guide to GraphQL in Scala, I created a simplistic resolver that just returned data from an immutable value loaded in memory. In real-life use cases, things are usually quite different: data may come from a database, external APIs, or...| Pierre Ricadat's Tech Blog
In my Beginner's Guide to GraphQL in Scala, I explained how Caliban can automatically transform Scala types into GraphQL types through a process called schema derivation. This mechanism enables you to generate a Schema for user-defined types using a ...| Pierre Ricadat's Tech Blog
Crafting a simple GraphQL API using Scala and Caliban| Pierre Ricadat's Tech Blog
これ https://github.com/nrinaudo/kantan.csv を以下にforkして、0.9.0をpublishしました https://github.com/kantan-scala/kantan-csv https://repo1.maven.org/maven2/io/github/kantan-scala/| xuwei-k's blog
3年以上前に書いたこれ https://t.co/ozAxha1yfSresources/META-INF/services/scalafix.v1.Ruleの生成が面倒だからsbt側で自動生成するやつ作った— Kenji Yoshida (@xuwei_k) February 5, 2022| xuwei-k's blog
Graal Native Launchers by Default| mill-build.org
Entrée du 2024-12-14 14:00:00, à propos de conference, paris, scala, ocaml, ide, merlin, lsp| xvw.feed
Entrée du 2024-03-12 13:33:29, à propos de conference, scala, gadts, nantes| xvw.feed
Entrée du 2023-10-24 11:19:35, à propos de ocaml, scala, meetup, lambda-nantes| xvw.feed
OSSではまだまだScala 2と3でcross buildしているものも多いですが、 2025年4月からフリーランスになってひたすらScalaやっていて、他の社でもScala 3移行進んで、場合によってはimplicit消す作業なども多少やり始めています。 とにかくimplicit消すだけならば、数十万行あっても1週間程度で撲滅出来るくらいには慣れてきました。 以前書いたものだと以下のようなものがあります...| xuwei-k's blog
I’ve been doing the Weekly Challenges. The latest involved a date calculation and run-length encoding. (Note that this ends today.)| RogerBW's Blog
正確にはそれをするだけのつもりで作りはじめたら、微妙に思い出して追加のtask入れたのでそれだけではないのですが、とりあえず scalafixAll --check するだけの scalafixCheckAll taskの話をします。| xuwei-k's blog
以下を試してみたという話 github.com| xuwei-k's blog
mockitoとは以下のJavaのライブラリです。 github.com Javaのライブラリなので、当然Scalaでも使えます。*1しかし、 *1:scala-jsやscala-native除く| xuwei-k's blog
ここでいう「コンフリクト」とは、 「GitHubでpull req自分が出した変更箇所に対して、他の人のpull reqが先にmergeされてコンフリクトしてそのままmerge出来なくなったぁ〜」 というようなものですね。*1 GitHubでもgitでなくてもなんでもよいというか、現代の開発において大体同じだと思いますが。 *1:他人ではなく自分のpull reqでも有り得る| xuwei-k's blog
以前書いた通り xuwei-k.hatenablog.com 予定通り2025年3月末で某社を退職して、2025年4月からフリーランスをしてます。 ソフトウェアエンジニアでフリーランスやってる人なんて世の中に大量にいると思いますし、 ある程度当たり前の感想などしか書かないかもしれませんが、とりあえず個人の感想などを書いておきます。| xuwei-k's blog
以下のこれ https://github.com/slick/slick/blob/v3.6.0/slick/src/main/scala-3/slick/lifted/TableQuery.scala#L37-L55| xuwei-k's blog
4年近く前に以下のような記事を書きましたが、それを微妙に改変してライブラリにしてpublishした、という話 xuwei-k.hatenablog.com| xuwei-k's blog
build.sbtに以下のように書くのはやめましょう、という話です libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % "test"| xuwei-k's blog
この人またcompile速度の話してる・・・| xuwei-k's blog
What’s the difference between Option[A] and A | Null? What about between Either[A, B] and A | B?| Alexandru Nedelcu - Blog
これ ↓ 作りました。 https://github.com/xuwei-k/shapeless-annotation 以下の記事の続きでもあります| xuwei-k's blog
https://github.com/xuwei-k/shapeless-generic-counter shapeless.Generic というのは、case classなどをHListなどと相互変換し、それによってgeneric programmingを実現するためのするためのものです。 結構昔に作られて以来、色々なライブラリの裏側で使われていますし、直接使ってgeneric programmingする例や解説もあります。さて、| xuwei-k's blog
Case classes in Scala facilitate the instantiation by removing the use of the keyword new. It isn’t a big invention, but it helps to have a source code more readable. Especially when you imbr…| Kerflyn's Blog
前回に引き続いて、なぜかcompile速度関連の話題を詳細に解説する回。| xuwei-k's blog
I covered our migration to Scala 3 extensively in my last blog post, but we deployed the migrated code to production only a week ago. Such releases are always a little stressful because you never know what kind of unexpected bug can occur, and on top...| Pierre Ricadat's Tech Blog
This sample shows an HTTP server and an HTTP client that can cleanly cancel requests. It’s using Tapir and Sttp, with Netty and AsyncHttpClient backends, all powered by Cats-Effect.| Alexandru Nedelcu - Blog
When generating random numbers for certain use-cases, such as when generating keys / IDs, it’s recommended for the random function to be “cryptographically strong”. Otherwise, attackers could predict random values, enabling serious security vulnerabilities.| Alexandru Nedelcu - Blog
As software developers, we invest a lot in our tools. Time, energy, and feelings. We recommend tools to others; we build on top; we belong to a community; we contribute; hence we're eventually becoming stakeholders. And there's no other tool more clamored or risky in our belt than the programming language. Well, gather around, kids, let me tell you two stories from my past with the software industry…| Alexandru Nedelcu - Blog
Today I was reminded how awesome Scala is for scripting, via Scala CLI. And it goes beyond having “batteries included”.| Alexandru Nedelcu - Blog
This is an update to my december adventure, in which I took it upon myself to learn the Rust programming langauge.| Alexandru Nedelcu - Blog
This December I’m off to a great personal adventure in programming. Everyone can have their own fun December Adventure. You pick something you want to do, or maybe learn, and you do a little of it everyday, as long as it involves some coding.| Alexandru Nedelcu - Blog
Scala’s coding style advised to use 2 spaces of indentation, but that was before Scala 3’s optional braces, which introduces significant indentation. It’s time for an upgrade of the coding style.| Alexandru Nedelcu - Blog
What’s the difference?| Alexandru Nedelcu - Blog
In Java and other JVM languages, “volatile” reads and writes are part of the concurrency toolbox. But adding volatile on variables can be a mistake. This is a poorly understood concept. Let’s gain a better understanding.| Alexandru Nedelcu - Blog
Here’s a fairly straightforward Scala 3 sample, using significant indentation. Can you spot the compilation error?| Alexandru Nedelcu - Blog
In Scala, how do we model enumerations of values? What are the possible issues? How does Scala compare with Java? What are the changes in Scala 3?| Alexandru Nedelcu - Blog
Kotlin Coroutines are usually integrated in Java code via Java’s CompletableFuture, but a tighter integration might be possible with Cats-Effect.| Alexandru Nedelcu - Blog
We are using a combination of Akka and Cats-Effect (ver. 3) for building payment processors. This post describes some solutions we’ve discovered.| Alexandru Nedelcu - Blog
Snippet for when you’re using Circe and want to define custom Jackson serializers/deserializers from Circe’s codec definitions.| Alexandru Nedelcu - Blog
I find Scala’s community to be really nice, welcoming, warm, and productive. I am not talking just of the Typelevel sub-community, which is awesome, but of the whole Scala community. The whole thing.| Alexandru Nedelcu - Blog
Mutable collection types should only be used strategically, with purpose, otherwise for correctness/safety purposes, the default should be immutable collection types, aka persistent data structures.| Alexandru Nedelcu - Blog
I dislike Scala 3’s significant whitespace syntax. At this point it’s safe to say that I hate it, being (IMO) an unfortunate evolution of the language.| Alexandru Nedelcu - Blog
The marketing for Functional Programming is made of technobabble. Technobabble was used in Star Trek. Those long discussions are what Star Trek was loved for, but technobabble isn’t good for sharing knowledge or advancing our field.| Alexandru Nedelcu - Blog
As Scala developers and fans of the functional programming promoted by Haskell, how do we justify the use of IO to newbies coming from Java? It’s been a fun ride, but the truth is that Java 19 is changing everything.| Alexandru Nedelcu - Blog
The following describes snippets for executing shell commands, in Java, Scala, and Kotlin, using standard functionality. It’s also useful to compare Java vs Scala vs Kotlin for this particular problem.| Alexandru Nedelcu - Blog
Java’s Checked Exceptions are problematic, and it’s not only due to their ergonomics. The bigger problem is that they are in conflict with abstraction and OOP. Also, few people care about typed exceptions (unless they are happy path results, not errors).| Alexandru Nedelcu - Blog
Java 19 is now released, and it’s a big deal, as it ships with Virtual Threads (JEP 425), among other goodies, like structured concurrency (JEP 428), or improvements to pattern matching (JEPs 405, 427). I haven’t been as excited about a Java release in a long time.| Alexandru Nedelcu - Blog
Lightbend made Akka proprietary from version 2.7.x onward. This left the community wondering about the possibility of a fork, and unfortunately, I see some FUD that needs to be addressed.| Alexandru Nedelcu - Blog
Unix has a long tradition with scripting — small programs represented as text files that can be inspected, modified, and executed. Scala can be used for scripting too.| Alexandru Nedelcu - Blog
I’ve just spent over a day, going to sleep at 1:00 am, to upgrade dependencies and fix eviction warnings in the build of a Scala project.| Alexandru Nedelcu - Blog
According to today’s announcement, Lightbend is changing Akka’s licensing to “Business Source License (BSL)”. This is not an Open Source, or a Free Software license. This is a proprietary license.| Alexandru Nedelcu - Blog
What if we’d use Scala’s type system for tracking side-effects in impure code, too? In the Scala/FP community we use and love effect systems, such as Cats Effect, with its IO data type. “Suspending side-effects” in IO is great, but in Scala it’s either IO or forgoing any kind of type-safety for side-effects, and that’s bad.| Alexandru Nedelcu - Blog
This is the 1st article of a series that explores the difference between OOP design, and parametric polymorphism with Type Classes, as both are possible in Scala.| Alexandru Nedelcu - Blog
I don’t like given, as an alternative to implicit in Scala 3. The more I try working with it, the more it annoys me; and my understanding may be superficial, but I don’t like this direction. Here’s a comparisson between given and implicit, that I hope is fair…| Alexandru Nedelcu - Blog
Scala is considered a multi-paradigm language, for better or worse, being one of the best OOP languages, which is why it’s so versatile. Let’s do a design exercise, going from OOP to static FP, and back. Let’s understand the various techniques promoted in the community, and understand why the OOP design isn’t just “idiomatic” for Scala, but can be superior to alternatives.| Alexandru Nedelcu - Blog
The Scala community is increasingly using Discord for “real-time chat”. This was announced in December, and the community page lists several Discord “servers”, one of them belonging to Typelevel. I think this move from Gitter to Discord is probably a mistake.| Alexandru Nedelcu - Blog
Snippet for cleaning up a Scala project’s directory of all compiled files.| Alexandru Nedelcu - Blog
You can recommend the required VSCode extensions per repository to your fellow programmers. This is what VSCode calls “workspace recommended extensions”.| Alexandru Nedelcu - Blog
Snippet for an impure way (no IO) to create a resource that can later be closed.| Alexandru Nedelcu - Blog
⌘+Click on a file path triggers my terminal to open that file inside my IDE, and that helps a lot.| Alexandru Nedelcu - Blog
Online meetup on Scala 3’s newly introduced types and features for encoding type classes.| Alexandru Nedelcu - Blog
Yo dawg, I heard you liked concurrency primitives. Let’s implement our own asynchronous, dirty CountDownLatch.| Alexandru Nedelcu - Blog
OOP couples the data with the methods operating on it, and this is considered bad in FP circles. But is it?| Alexandru Nedelcu - Blog
Turning imperative algorithms to tail-recursive functions isn’t necessarily obvious. In this article (and video) I’m showing you the trick you need, and in doing so, we’ll discover the Zen of Functional Programming.| Alexandru Nedelcu - Blog
Snippet of code discussing Tagless Final vs OOP-style dependency injection.| Alexandru Nedelcu - Blog
Just a regular expression.| Alexandru Nedelcu - Blog
Helpers for integrating with cats.effect.IO.| Alexandru Nedelcu - Blog
Definitions of scala.math.Ordering MUST BE consistent with equals, an often overlooked law that can lead to problems.| Alexandru Nedelcu - Blog
The database schema should be described as code, in your repository. And you should be able to semi-automatically update your database schema on new deployments.| Alexandru Nedelcu - Blog
We should strive to make illegal states unrepresentable. Option.get is a partial function that, according to many, shouldn’t be in the standard library. Yet it doesn’t bother me; the inability of Scala to make it safe is the problem.| Alexandru Nedelcu - Blog
IOApp alternative, for Cats Effect v2, that can work with any effect type.| Alexandru Nedelcu - Blog
Defining a “runtime” for Cats-Effect v2 that provides the underlying environment necessary (i.e. ContextShift, Timer, Clock).| Alexandru Nedelcu - Blog