HackerTrans
トップ新着トレンドコメント過去質問紹介求人

nalgeon

no profile record

投稿

Micro-libraries should never be used

bvisness.me
180 ポイント·投稿者 nalgeon·2 年前·173 コメント

Private Internet

kevincox.ca
31 ポイント·投稿者 nalgeon·2 年前·14 コメント

Go Maps Explained: How Key-Value Pairs Are Stored

victoriametrics.com
4 ポイント·投稿者 nalgeon·2 年前·0 コメント

Show HN: High-precision date/time in SQLite

antonz.org
274 ポイント·投稿者 nalgeon·2 年前·68 コメント

Durable Objects – Unlimited single-threaded servers spread across the world

lambrospetrou.com
2 ポイント·投稿者 nalgeon·2 年前·0 コメント

Basic MetaProgramming in Zig

openmymind.net
104 ポイント·投稿者 nalgeon·2 年前·7 コメント

Show HN: High-precision date/time in SQLite

antonz.org
6 ポイント·投稿者 nalgeon·2 年前·0 コメント

The Painful Pitfalls of C++ STL Strings

ashvardanian.com
2 ポイント·投稿者 nalgeon·2 年前·0 コメント

Generating Mazes

healeycodes.com
1 ポイント·投稿者 nalgeon·2 年前·0 コメント

Friendly Lists and Their Buddies, the Lambdas

duckdb.org
1 ポイント·投稿者 nalgeon·2 年前·0 コメント

HTTP Requests via /Dev/TCP

rednafi.com
4 ポイント·投稿者 nalgeon·2 年前·0 コメント

Golang Sync Mutex: Normal and Starvation Mode

victoriametrics.com
3 ポイント·投稿者 nalgeon·2 年前·0 コメント

The Rule of 5 and Inheritance

sandordargo.com
3 ポイント·投稿者 nalgeon·2 年前·0 コメント

Zig's HashMap

openmymind.net
4 ポイント·投稿者 nalgeon·2 年前·0 コメント

Using Units in Racket

defn.io
3 ポイント·投稿者 nalgeon·2 年前·0 コメント

Resetting Timers in Go

antonz.org
1 ポイント·投稿者 nalgeon·2 年前·0 コメント

Log context propagation in Python ASGI apps

rednafi.com
2 ポイント·投稿者 nalgeon·2 年前·0 コメント

Formulosity – Surveys as Code

github.com
1 ポイント·投稿者 nalgeon·2 年前·0 コメント

Gist of Go: Wait Groups

antonz.org
1 ポイント·投稿者 nalgeon·2 年前·0 コメント

Watchexec: Execute commands in response to file modifications

github.com
2 ポイント·投稿者 nalgeon·2 年前·0 コメント

コメント

nalgeon
·2 年前·議論
The title of the article is "Micro-libraries need to die already". Renaming the submission to "Micro-libraries should never be used" is pathetic, Daniel. I'm not surprised though.
nalgeon
·2 年前·議論
I appreciate your comments, and thank you for trying out the extension.

This query returns -1 (minus one, not one), which seems correct to me. The first date is before the second:

    select time_compare(
      time_date(1927, 12, 31, 23, 58, 08, 0, 28800000),
      time_date(1927, 12, 31, 23, 58, 09, 0, 28800000)
    );

    -1
nalgeon
·2 年前·議論
Thanks for the suggestion! True, only fixed offsets are supported, not timezone names.
nalgeon
·2 年前·議論
Storing unix timestamp as nanoseconds is not Go's style, but you can do just that with this extension.

    select time_to_nano(time_now());
    -- 1722979335431295000
nalgeon
·2 年前·議論
[flagged]
nalgeon
·2 年前·議論
> If the result exceeds the maximum value that can be stored in a Duration, the maximum duration will be returned.
nalgeon
·2 年前·議論
It works very well for me and thousands of other Go developers. That's why I chose this approach.
nalgeon
·2 年前·議論
If you find the official release notes a bit dry (they really are), I've prepared an interactive version with lots of examples:

- Iterators (range / types / pull / slices / maps).

- Timer changes (garbage collection and reset/stop behavior).

- Canonical values with the `unique` package.

- HTTP cookie handling.

- Copying directories.

- Slices and atomics changes.

https://antonz.org/go-1-23
nalgeon
·2 年前·議論
Thank you, glad you like it! In fact, one of the reasons I started Codapi in 2023 was to have a playground for an interactive book on Go concurrency.

I got a bit carried away with Codapi and later Redka (Redis+SQLite), but eventually returned to the book :)
nalgeon
·2 年前·議論
Context in Go is (mostly) a tool for canceling operations. There will be a chapter on contexts in part 1 of the book.
nalgeon
·2 年前·議論
Educative also has a very strange (to say the least) way of interacting with authors: https://antonz.org/educative
nalgeon
·2 年前·議論
Thanks, Michael! I think it's pretty clear even without it :)
nalgeon
·2 年前·議論
Codapi works with mkdocs (and basically any other static generator).

Here is the JS widget and integration guides:

https://github.com/nalgeon/codapi-js
nalgeon
·2 年前·議論
I like to explain things by example, and interactive examples are even better. So I built a sandbox server that lets you run virtually any software. And a widget to easily add interactive code examples to any kind of technical documentation.

You can use it to build your own sandboxes, or use existing ones to write interactive guides like these: https://github.com/nalgeon/tryxinyminutes
nalgeon
·2 年前·議論
Sure! I really like your writing.
nalgeon
·2 年前·議論
It works with redis-py (which python-rq uses), but I doubt it will be any good in this case. python-rq seems to use Lua scripting in Redis, which is not planned for 1.0. I'd rather not add it at all, but we'll see.
nalgeon
·2 年前·議論
The goal is to have a convenient API to work with common data structures, with an SQL backend and all the benefits it provides. Such as:

— Small memory footprint even for large datasets.

— ACID transactions.

— SQL interface for introspection and reporting.
nalgeon
·2 年前·議論
Great tips, thank you! The thing is, getting maximum throughput is not the goal of the project (at least not at this stage). I'm using reasonable SQLite defaults (including WAL), but that's it for now.
nalgeon
·2 年前·議論
Thank you! I also think that the relational model can get you pretty far if you don't need to squeeze every last bit of performance out of the program. And the added benefit of using a battle-tested SQL engine is far fewer storage-related bugs.
nalgeon
·2 年前·議論
Thought about it, decided to start with simpler and good enough option. The goal here is not to beat Redis anyway.