HackerTrans
TopNewTrendsCommentsPastAskShowJobs

nalgeon

no profile record

Submissions

Micro-libraries should never be used

bvisness.me
180 points·by nalgeon·2 yıl önce·173 comments

Private Internet

kevincox.ca
31 points·by nalgeon·2 yıl önce·14 comments

Go Maps Explained: How Key-Value Pairs Are Stored

victoriametrics.com
4 points·by nalgeon·2 yıl önce·0 comments

Show HN: High-precision date/time in SQLite

antonz.org
274 points·by nalgeon·2 yıl önce·68 comments

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

lambrospetrou.com
2 points·by nalgeon·2 yıl önce·0 comments

Basic MetaProgramming in Zig

openmymind.net
104 points·by nalgeon·2 yıl önce·7 comments

Show HN: High-precision date/time in SQLite

antonz.org
6 points·by nalgeon·2 yıl önce·0 comments

The Painful Pitfalls of C++ STL Strings

ashvardanian.com
2 points·by nalgeon·2 yıl önce·0 comments

Generating Mazes

healeycodes.com
1 points·by nalgeon·2 yıl önce·0 comments

Friendly Lists and Their Buddies, the Lambdas

duckdb.org
1 points·by nalgeon·2 yıl önce·0 comments

HTTP Requests via /Dev/TCP

rednafi.com
4 points·by nalgeon·2 yıl önce·0 comments

Golang Sync Mutex: Normal and Starvation Mode

victoriametrics.com
3 points·by nalgeon·2 yıl önce·0 comments

The Rule of 5 and Inheritance

sandordargo.com
3 points·by nalgeon·2 yıl önce·0 comments

Zig's HashMap

openmymind.net
4 points·by nalgeon·2 yıl önce·0 comments

Using Units in Racket

defn.io
3 points·by nalgeon·2 yıl önce·0 comments

Resetting Timers in Go

antonz.org
1 points·by nalgeon·2 yıl önce·0 comments

Log context propagation in Python ASGI apps

rednafi.com
2 points·by nalgeon·2 yıl önce·0 comments

Formulosity – Surveys as Code

github.com
1 points·by nalgeon·2 yıl önce·0 comments

Gist of Go: Wait Groups

antonz.org
1 points·by nalgeon·2 yıl önce·0 comments

Watchexec: Execute commands in response to file modifications

github.com
2 points·by nalgeon·2 yıl önce·0 comments

comments

nalgeon
·2 yıl önce·discuss
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 yıl önce·discuss
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 yıl önce·discuss
Thanks for the suggestion! True, only fixed offsets are supported, not timezone names.
nalgeon
·2 yıl önce·discuss
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 yıl önce·discuss
[flagged]
nalgeon
·2 yıl önce·discuss
> If the result exceeds the maximum value that can be stored in a Duration, the maximum duration will be returned.
nalgeon
·2 yıl önce·discuss
It works very well for me and thousands of other Go developers. That's why I chose this approach.
nalgeon
·2 yıl önce·discuss
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 yıl önce·discuss
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 yıl önce·discuss
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 yıl önce·discuss
Educative also has a very strange (to say the least) way of interacting with authors: https://antonz.org/educative
nalgeon
·2 yıl önce·discuss
Thanks, Michael! I think it's pretty clear even without it :)
nalgeon
·2 yıl önce·discuss
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 yıl önce·discuss
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 yıl önce·discuss
Sure! I really like your writing.
nalgeon
·2 yıl önce·discuss
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 yıl önce·discuss
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 yıl önce·discuss
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 yıl önce·discuss
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 yıl önce·discuss
Thought about it, decided to start with simpler and good enough option. The goal here is not to beat Redis anyway.