<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/sources/Karl%20Seguin/best-of/2024" -->

---
title: Best openmymind posts of 2024 | daily.dev
description: The most upvoted openmymind posts of 2024, curated by the daily.dev community.
canonical: https://daily.dev/sources/Karl%20Seguin/best-of/2024
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:url: https://daily.dev/sources/Karl%20Seguin/best-of/2024
og:type: website
og:site_name: daily.dev
og:title: Best openmymind posts of 2024 | daily.dev
og:description: The most upvoted openmymind posts of 2024, curated by the daily.dev community.
og:image: https://media.daily.dev/image/upload/s--VAY5ToZt--/f_auto/v1724209435/public/daily.dev%20-%20open%20graph
---

# Best of openmymind — 2024

1. 1  
[](/posts/tcp-server-in-zig---part-6---epoll-o0xhfyt93 "TCP Server in Zig - Part 6 - Epoll")  
[![Karl Seguin's profile](https://media.daily.dev/image/upload/s--Dey09a13--/f_auto/v1723789434/logos/Karl%20Seguin)](/sources/[source]/best-of/[year])  
21m read time • Oct 23, 2024  
### TCP Server in Zig - Part 6 - Epoll  
This guide explores how to build a TCP server in Zig using the epoll system call, which is specific to Linux and offers various advantages over poll. The article introduces the three key epoll system calls (\`epoll\_create1\`, \`epoll\_ctl\`, and \`epoll\_wait\`) and explains how to use them to manage socket events more efficiently. The guide also covers how to associate each epoll event with client-specific data, simplifying client management, and demonstrates how to implement edge-triggered notifications.

+2  
18
2. 2  
[](/posts/zig-s-syntax-hi6pujveq "Zig's (.{}){} syntax")  
[![Karl Seguin's profile](https://media.daily.dev/image/upload/s--Dey09a13--/f_auto/v1723789434/logos/Karl%20Seguin)](/sources/[source]/best-of/[year])  
5m read time • Nov 05, 2024  
### Zig's (.{}){} syntax  
Zig's (.{}){} syntax can be confusing for beginners. This post explains that it combines three features - generics, anonymous struct literals, and default field values. It breaks down how generics allow functions to return types, how anonymous struct literals let Zig infer types, and how default field values simplify struct initialization. By understanding these concepts, you can better interpret complex lines of Zig code such as std.heap.GeneralPurposeAllocator(.{}){}.

+1  
13  
1
3. 3  
[](/posts/zig-s-new-declaration-literals-fyrurcxmd "Zig's new declaration literals")  
[![Karl Seguin's profile](https://media.daily.dev/image/upload/s--Dey09a13--/f_auto/v1723789434/logos/Karl%20Seguin)](/sources/[source]/best-of/[year])  
4m read time • Nov 14, 2024  
### Zig's new declaration literals  
Zig has introduced new declaration literals, which generalize the concept of enum literals to make variable initialization clearer. This new syntax simplifies code by using .init for default initializations, allowing for customized groups of defaults under meaningful labels. Though the old patterns are still valid, the new syntax can enhance readability and flexibility, particularly for newcomers to the language.

+1  
11  
1
4. 4  
[](/posts/closures-in-zig-9uacjyomo "Closures in Zig")  
[![Karl Seguin's profile](https://media.daily.dev/image/upload/s--Dey09a13--/f_auto/v1723789434/logos/Karl%20Seguin)](/sources/[source]/best-of/[year])  
9m read time • Sep 10, 2024  
### Closures in Zig  
Zig does not have a straightforward way to create closures due to its 'no hidden allocation' policy. The post explains how to create closures using an allocator, introduces the concept of an interface to handle various message types, and demonstrates how to write a runnable example that includes capturing and running closures. It also touches on Zig's compile-time type requirements and provides a complete example with memory management.

+1  
11

[See all openmymind archives](/sources/Karl%20Seguin/best-of)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@graph":[{"@type":"CollectionPage","@id":"https://daily.dev/sources/Karl%20Seguin/best-of/2024#page","url":"https://daily.dev/sources/Karl%20Seguin/best-of/2024","name":"Best openmymind Posts of 2024","description":"The most upvoted openmymind posts of 2024, curated by the daily.dev community.","isPartOf":{"@type":"WebSite","url":"https://daily.dev"}},{"@type":"ItemList","@id":"https://daily.dev/sources/Karl%20Seguin/best-of/2024#items","numberOfItems":4,"itemListElement":[{"@type":"ListItem","position":1,"url":"https://daily.dev/posts/tcp-server-in-zig---part-6---epoll-o0xhfyt93","name":"TCP Server in Zig - Part 6 - Epoll"},{"@type":"ListItem","position":2,"url":"https://daily.dev/posts/zig-s-syntax-hi6pujveq","name":"Zig's (.{}){} syntax"},{"@type":"ListItem","position":3,"url":"https://daily.dev/posts/zig-s-new-declaration-literals-fyrurcxmd","name":"Zig's new declaration literals"},{"@type":"ListItem","position":4,"url":"https://daily.dev/posts/closures-in-zig-9uacjyomo","name":"Closures in Zig"}]},{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Sources","item":"https://daily.dev/sources"},{"@type":"ListItem","position":3,"name":"openmymind","item":"https://daily.dev/sources/Karl%20Seguin"},{"@type":"ListItem","position":4,"name":"Best of","item":"https://daily.dev/sources/Karl%20Seguin/best-of"},{"@type":"ListItem","position":5,"name":"2024"}]}]}
```

