HackerTrans
TopNewTrendsCommentsPastAskShowJobs

nalgeon

no profile record

Submissions

Micro-libraries should never be used

bvisness.me
180 points·by nalgeon·قبل سنتين·173 comments

Private Internet

kevincox.ca
31 points·by nalgeon·قبل سنتين·14 comments

Go Maps Explained: How Key-Value Pairs Are Stored

victoriametrics.com
4 points·by nalgeon·قبل سنتين·0 comments

Show HN: High-precision date/time in SQLite

antonz.org
274 points·by nalgeon·قبل سنتين·68 comments

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

lambrospetrou.com
2 points·by nalgeon·قبل سنتين·0 comments

Basic MetaProgramming in Zig

openmymind.net
104 points·by nalgeon·قبل سنتين·7 comments

Show HN: High-precision date/time in SQLite

antonz.org
6 points·by nalgeon·قبل سنتين·0 comments

The Painful Pitfalls of C++ STL Strings

ashvardanian.com
2 points·by nalgeon·قبل سنتين·0 comments

Generating Mazes

healeycodes.com
1 points·by nalgeon·قبل سنتين·0 comments

Friendly Lists and Their Buddies, the Lambdas

duckdb.org
1 points·by nalgeon·قبل سنتين·0 comments

HTTP Requests via /Dev/TCP

rednafi.com
4 points·by nalgeon·قبل سنتين·0 comments

Golang Sync Mutex: Normal and Starvation Mode

victoriametrics.com
3 points·by nalgeon·قبل سنتين·0 comments

The Rule of 5 and Inheritance

sandordargo.com
3 points·by nalgeon·قبل سنتين·0 comments

Zig's HashMap

openmymind.net
4 points·by nalgeon·قبل سنتين·0 comments

Using Units in Racket

defn.io
3 points·by nalgeon·قبل سنتين·0 comments

Resetting Timers in Go

antonz.org
1 points·by nalgeon·قبل سنتين·0 comments

Log context propagation in Python ASGI apps

rednafi.com
2 points·by nalgeon·قبل سنتين·0 comments

Formulosity – Surveys as Code

github.com
1 points·by nalgeon·قبل سنتين·0 comments

Gist of Go: Wait Groups

antonz.org
1 points·by nalgeon·قبل سنتين·0 comments

Watchexec: Execute commands in response to file modifications

github.com
2 points·by nalgeon·قبل سنتين·0 comments

comments

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