Sign in

Dmitrii Kovanikov

@chshersh.com
2K followers 144 following 883 posts

Senior Software Engineer. I use C++ Main: x.com/chshersh All opinions are my own.

PostsRepliesMedia
Dmitrii Kovanikov @chshersh.com · 14/09/2025
Starting another stream in 5 minutes. We continue torturing C++ with Functional Programming. Today, I will talk about Algebraic Data Types (ADTs) and pattern matching. You don't want to miss it. Link: www.twitch.tv/chshersh
1142
Dmitrii Kovanikov @chshersh.com · 14/09/2025
That's alright, we all do this sometimes. I even did it in OCaml
030
Dmitrii Kovanikov @chshersh.com · 13/09/2025
I started streaming on Twitch again. This time, I'm coding FUNctional Programming in Modern C++ First stream went well. The recording is already on YouTube. You can follow me on Twitch to get notified: www.twitch.tv/chshersh
3160
Dmitrii Kovanikov @chshersh.com · 17/03/2025
New York, I’m in you
2150
Dmitrii Kovanikov @chshersh.com · 08/03/2025
I haven't done OSS in OCaml for a while. I finally installed OCaml on Windows WSL, it was rather flawless this time. I'm currently busy with other activities, but hopefully can return to my projects soon 🤞
191
Dmitrii Kovanikov @chshersh.com · 06/02/2025
The video game studio Four Quarters accidentally created the best autism test ever. Loop Hero is so satisfying. You just do exactly the same thing with slight variations again and again and again...
1110
Dmitrii Kovanikov @chshersh.com · 02/02/2025
Another productive weekend with OCaml 🐫 Implemented the most difficult TUI element so far: Scrolling a generic list of UI elements. It required a week of thinking and touching the grass. But we got there.
0111
Dmitrii Kovanikov @chshersh.com · 01/02/2025
For some weird reason, I like that I can define type and let in the same single line in OCaml. It feels unexpectedly satisfying. (yes, I know I can just do Map.Make (String), this example is just for illustration purposes)
module StringMap = Map.Make (struct type t = string let compare = String.compare end)
190
Dmitrii Kovanikov @chshersh.com · 01/02/2025
The entire dynamic TUI layout is based on the following simple type. I feel like it's the cleverest ADT I created so far.
type t =
  | Str of Style.t * string
  | Horizontal_fill
  | Vertical_fill
  | Vertical of t list
  | Horizontal of t list
  | With_size of (width:int -> height:int -> t)
0100
Dmitrii Kovanikov @chshersh.com · 26/01/2025
Another productive weekend with OCaml. FInished the issues tab in my GitHub TUI app, including querying and filtering. There's still much to do. But I'm not worried. Consistency prevails.
0142
Dmitrii Kovanikov @chshersh.com · 25/01/2025
Another weekend, another coffee with OCaml 🐫☕ Back to my GitHub TUI project. I just love iterative UI development! It's so satisfying to see the UI evolution under a fast feedback loop.
3242
Dmitrii Kovanikov @chshersh.com · 23/01/2025
I rewrote a fold in OCaml to a for-loop with mutable variables just to feel something
https://github.com/chshersh/github-tui/commit/d1ac7ebb3e2bdae918f60b5e402a725062a00196
2201
Dmitrii Kovanikov @chshersh.com · 22/01/2025
Recently, we had our first OCaml Summit at Bloomberg! Everyone came to London to celebrate Functional Programming for the full week of: 🐫 OCaml training 🐫 Conference talks 🐫 Reflecting on the community past 🐫 Planning OCaml future More exciting news to share later!
3291
Dmitrii Kovanikov @chshersh.com · 19/01/2025
Typical OSS development: 1. Wrote a few lines of code 2. Created even more issues than solved But on a serious note, I'm trying to track low-hanging fruits in my GitHub TUI project to encourage OCaml contributions in the future. github.com/chshersh/git...
2211
Dmitrii Kovanikov @chshersh.com · 07/01/2025
Only in articles because they’re HTML generated from Markdown via pandoc. On the main page, it’s a pure state machine in Elm. Just small past of it.
110
Dmitrii Kovanikov @chshersh.com · 07/01/2025
I'm a big nerd. I love Vim motions. And I brought them to my website. You can now navigate my website FULLY WITH KEYBOARD ONLY. chshersh.com
3181
Dmitrii Kovanikov @chshersh.com · 31/12/2024
For some reason, it's so aesthetically pleasing to see structured diffs
1241
Dmitrii Kovanikov @chshersh.com · 30/12/2024
Only one
000
Dmitrii Kovanikov @chshersh.com · 29/12/2024
Omg, I can't believe it, I finally finished this article. It was my biggest blog post for a while, more than a thousand lines of text. There's so much juice inside, can't wait to share! I'll wait for one week tho. Need to reread with fresh eyes and polish.
0150
Dmitrii Kovanikov @chshersh.com · 28/12/2024
I just want to finish writing my latest Category Theory article but my brain be like: “No, you’d had been sleeping for only 7 hours 19 minutes, so nothing will be done. As bonus, you’ll be annoyed the whole day.” I guess we’re conquering the galaxy today.
1131
Dmitrii Kovanikov @chshersh.com · 24/12/2024
I know that I probably should give a neutral balanced overview of my config language if I claim it to be the most elegant, weighing pros and cons and providing reasonable arguments. But I'm having so much fun writing this!
050
Dmitrii Kovanikov @chshersh.com · 23/12/2024
I must avoid satisfactory, lol
020
Dmitrii Kovanikov @chshersh.com · 22/12/2024
I finished my CCL to a logical conclusion. Not everything was done. But maybe one day I'll return to it. Meanwhile, I want to describe what was achieved. So I finally started writing an article about it. Maybe I'll even finish it this year 😅
2150
Dmitrii Kovanikov @chshersh.com · 21/12/2024
Yeah, I've definitely drunk a bit of kool-aid on this one. The fact that all my let* are 'let* _ =' must've been a hint. Anyway, I fully rewrote this monadic eDSL to a few simple functions over strings and lists. The result is much simpler and smaller. P.S. Difftastic is amazing!
1160
Dmitrii Kovanikov @chshersh.com · 20/12/2024
I'm trying my skills in writing Odoc documentation for my OCaml package. It's kinda nice to write some basic stuff and see that it looks quite decent! However, quite a lot of work will go there eventually to make brilliant, helpful and user-friendly docs, without sounding too intimidating.
281
Dmitrii Kovanikov @chshersh.com · 20/12/2024
Lol, I didn't know about this syntax! But looks like it works only when you're inside an object. Do you know if there's a way to do the same but to create another object with only some fields changed?
210
Dmitrii Kovanikov @chshersh.com · 18/12/2024
God side-tracked from my latest hobby project CCL to writing another part of Pragmatic Category Theory series. I'll publish on Friday! And hope, I can write parts more often than *checks notes* once per 6 months 🫠
2120
Dmitrii Kovanikov @chshersh.com · 15/12/2024
Ngl, it's a bit annoying the standard OCaml library doesn't have 'take' and 'drop' functions. Not difficult to implement them manually but would be nice if they were available by default.
5161
Dmitrii Kovanikov @chshersh.com · 15/12/2024
I'm algebra-maxxing in my test-suite. My CCL implementations now passes standard algebraic property tests.
2120
Dmitrii Kovanikov @chshersh.com · 15/12/2024
After the website rewrite, not all things went smoothly. People have been writing me DMs, tagging me on social media and even creating issues directly on GitHub about feature requests and bug. I'm glad people care about my little static website to suggest improvements!
2130
Dmitrii Kovanikov @chshersh.com · 14/12/2024
I wrote *checks notes* 72 (!!) unit tests, and yet a single property-based roundtrip test found a corner case I didn't handle. Feels good man My solution now when I find such edge cases: add them as new unit tests.
1210
Dmitrii Kovanikov @chshersh.com · 14/12/2024
There is but look at this monstrosity
110
Dmitrii Kovanikov @chshersh.com · 14/12/2024
There's no nice syntax to create Maps in OCaml. So for testing purposes, I created a monadic eDSL in my CCL project to create dictionaries more easily. Here how it looks like.
480
Dmitrii Kovanikov @chshersh.com · 12/12/2024
I just finished teaching my Functional Programming in OCaml course officially at Bloomberg for the first time to a full room of people! Teaching and explaining complex topics in accessible way is my passion. And I’m really happy I had an opportunity to do it at Bloomberg.
7727
Dmitrii Kovanikov @chshersh.com · 09/12/2024
Teaching OCaml by day. Working on OCaml OSS projects by night. The grind never stops. Behold, a function to merge two dictionaries represented as fix-point combinators. It looks like this function does nothing and just recursively calls itself. Yet, it does everything. FP can be weird.
0171
Dmitrii Kovanikov @chshersh.com · 08/12/2024
This entire CCL config is represented as a map from string to.. itself. So it's a fix point over a map of strings. When I came up with this, I could believe how smart I am. Don't worry, I'll write an article to explain how the technology works!
090
Dmitrii Kovanikov @chshersh.com · 07/12/2024
I've been working on my Categorical Configuration Language (CCL) for a week now, and I'm delighted to share a sneak peek. Yes, it's just key-value pairs. Turns out, it's good enough to have: 1. Comments 2. Sections 3. Nested objects 4. Lists 5. Algebraic Data Types More category theory later.
/= This is a CCL document
title = CCL Example

database =
  enabled = true
  ports =
    = 8000
    = 8001
    = 8002
  limits =
    cpu = 1500mi
    memory = 10Gb

user =
  guestId = 42

user =
  login = chshersh
  createdAt = 2024-12-31
2231
Dmitrii Kovanikov @chshersh.com · 07/12/2024
Making some progress with my Categorical Configuration Language (CCL). Parser finished ✅ Now I'm writing tests (and fixing bugs) to make sure the parser actually works. It feels so nice when unit tests pass! Alcotest in OCaml is so good!
0150
Dmitrii Kovanikov @chshersh.com · 07/12/2024
I've written my most cursed parser with parser combinators in OCaml. It works but it's ugly as hell. Definitely a skill issue on my side for not being able to write it in a more elegant way. But also some problems can't be solved in an elegant way.
https://github.com/chshersh/ccl/blob/main/lib/parser.ml
380
Dmitrii Kovanikov @chshersh.com · 05/12/2024
Ngl, this is some wild syntax
010
Dmitrii Kovanikov @chshersh.com · 05/12/2024
F*ck it, I rewrote everything to Angstrom and it was 100x times easier
7231
Dmitrii Kovanikov @chshersh.com · 05/12/2024
Finished writing parser for my config language. Yes, it's that simple! The lexer, on the other hand 😅 Still, I'm enjoying menhir and ocamllex so far, even tho the learning curve is kinda steep
6211
Dmitrii Kovanikov @chshersh.com · 05/12/2024
My article “8 months of OCaml after 8 years of Haskell in production” is by far my most successful. It’s interesting to ponder why, but I had pretty good expectations from the start myself. chshersh.com/blog/2023-12...
3294
Dmitrii Kovanikov @chshersh.com · 04/12/2024
I'm slightly annoyed that I need to press this little S letter in the standard Map module in OCaml to view the actual API of a Map.
https://ocaml.org/manual/5.2/api/Map.html
2100
Dmitrii Kovanikov @chshersh.com · 01/12/2024
The decision to use Elm for my static website is paying off again. I've added a feature to use Vim-style keybindings for visiting my social links. chshersh.com
1111
Dmitrii Kovanikov @chshersh.com · 01/12/2024
BlueSky link included everywhere
020
Dmitrii Kovanikov @chshersh.com · 30/11/2024
I'm so happy I finally managed to port my entire blog (from dev.to and from my previous website) to my new website written in Elm and elm-ui! Ngl, it took quite a lot of pandoc, bash, HTML and CSS gymnastics. But I'm glad it works finally! chshersh.com Only minor touches left.
6440
Dmitrii Kovanikov @chshersh.com · 30/11/2024
This is all you need to start writing OCaml. What are you waiting for?
3280
Dmitrii Kovanikov @chshersh.com · 28/11/2024
The best thing about working on hobby projects is that I can just do things. Here I’m using OCaml naming convention for types in Elm.
https://github.com/chshersh/chshersh.github.io/blob/develop/src/Page/Main.elm
4260
Dmitrii Kovanikov @chshersh.com · 23/11/2024
Can’t believe I already have 1K followers here, and it’s just on pure OCaml and FP posting! Younger me looks at these results with envy. Thank y’all for supporting this kind of content!
6420