HNHacker News
TopNewBestAskShowJobs

nalgeon

6,898 karma · joined December 12, 2016

antonz.org
submissionscomments
nalgeon··on Learning Zig
Shameless plug: you can try Zig without installing in a playground:

https://codapi.org/zig

Soon it will also support running tests.

And I'd be happy to help make all the Learning Zig examples interactive, if the author is interested.

nalgeon··on Mastering curl: interactive text guide
Of course they do! Mostly through libcurl. For example, every single PHP http-related library/framework uses libcurl. Many others too.
nalgeon··on Mastering curl: interactive text guide
Yes, it is a docker hostname. See the docs here: http://httpbingo.org
nalgeon··on OpenAI Insists on Deadnaming Me
I hate the way OpenAI treats its users. It's like you're a fraud by default and you have to prove otherwise. Terrible.
nalgeon··on Writing a Package Manager
A couple of reasons:

1) I wanted human readable specs and lockfiles.

2) I didn't want to introduce a dependency (working with SQLite in Go is pretty ugly, it either requires GCC or a ton of other dependencies for a pure Go implementation).

nalgeon··on Writing a Package Manager
There is quite a difference between "the author added a lockfile without understanding why they exist" and "I really don't see why they added a lockfile".

It's better to start with the latter if you seek to understand, not attack.

nalgeon··on Sqlpkg – SQLite Package Registry
I believe you can do this even without the `closure` extension, using standard SQL `with recursive`.

https://sqlite.org/lang_with.html#recursive_common_table_exp...

nalgeon··on Sqlpkg – SQLite Package Registry
Sometimes they do! The `unhex` function, for example, has finally made it's way into the core function set. So did `json1`.

Some text functions like `trim` have been added recently, and there will even be a (long-awaited) `timediff` function in the next release.

nalgeon··on I don't need your query language
SQL is infinitely composable. Each SELECT returns a relation that another SELECT can query (or combine with another relation using set operators like UNION etc).
nalgeon··on I don't need your query language
I think the problem here is with the query, not the language. You can immediately improve its maintainability and readability by using CTEs.

https://antonz.org/cte/

nalgeon··on I don't need your query language
No. I'm talking about "SQL shaming" and about my preference for SQL over yet-another-query-language.

I have absolutely nothing against EdgeDB or its creators. As far as I can tell, it's a great product.

nalgeon··on Show HN: Interactive SQL Examples in JavaScript
Reading about SQL is fun, but trying out live examples is even better! So I created JavaScript widgets that turn static SQL code in articles into interactive examples.

Interactive SQL examples give readers the ability to edit a query and see how the results change. Or even write their own queries.

It works entirely in the browser, without a server (powered by SQLite Wasm), and requires only minimal changes to existing HTML code.

https://github.com/nalgeon/sqlime

nalgeon··on sqlean: A set of SQLite extensions
I don't expect anyone to use all the incubator extensions (like the cube root you mentioned). They are in the incubator and not in the main set for a reason.

Even the main set extensions are split into modules, rather than released as a single binary - so people can use them independently.

As for 'noise'. Well, good luck implementing `regexp_substr` and `regexp_replace` using the well-maintained and tested sqlite codebase. Or streaming file I/O.

nalgeon··on Making SQLite extensions pip install-able
Alex has developed a framework that allows him to write SQLite extensions in Rust instead of C. Very clever! This way, he can be productive and avoid a lot of potential bugs while keeping the raw performance.

As a maintainer of a large set of C SQLite extensions, I envy him :)

nalgeon··on JSON and Virtual Columns in SQLite
No matter how fast the parsing is — queries are going to be slow.

For example, on 1M rows table with very simple flat JSON values like these:

    {"object": "user", "object_id": 10, "action": "login"}
Without index, this query is going to take 500ms or more:

    select * from events where json_extract(value, '$.object_id') = ?;
With index on json_extract(value, '$.object_id'), it is going to take 1ms.

See for yourself:

https://sqlime.org/#gist:c452550ae694382f32188bc29412b24a

nalgeon··on JSON and Virtual Columns in SQLite
> Virtual columns are defined of SQL:2003 as Generated Column, and are only implemented by some DBMSs, like MariaDB, SQL Server, Oracle, PostgreSQL, SQLite and Firebird.

https://en.wikipedia.org/wiki/Virtual_column

nalgeon··on Proposal: JSON Arrow Syntax in SQLite
There is also a discussion thread:

https://sqlite.org/forum/forumpost/152354d5c474067e

nalgeon··on Word Embeddings Explained
Actually, that's not a single article, but a whole book (kind of):

1. Word Embeddings (this article)

2. Text Classification

https://lena-voita.github.io/nlp_course/text_classification....

3. Language Modeling

https://lena-voita.github.io/nlp_course/language_modeling.ht...

4. Seq2Seq and Attention

https://lena-voita.github.io/nlp_course/seq2seq_and_attentio...

5. ELMo, GPT, BERT

https://lena-voita.github.io/nlp_course/transfer_learning.ht...

All by Lena Voita, who has a real talent for explaining complex stuff.

nalgeon··on Bashing JSON into Shape with SQLite
You can even automate JSON scraping/parsing with GitHub Actions:

https://github.com/nalgeon/metro/blob/main/.github/workflows...

nalgeon··on Show HN: SQLite Playground
Thanks! I was even thinking of loading the demo database by default (instead of creating the empty one).
nalgeon··on Show HN: SQLite Playground
It's easier to say how are they similar: both are capable of executing SQL in the browser. The rest is different.
nalgeon··on Show HN: SQLite Playground
True, sql.js just asks for something like that :–) Thank you!
nalgeon··on Show HN: SQLite Playground
Thanks! Not really — the playground is meant for small databases. Just as one won't develop the whole app in JSFiddle, they probably won't import a large database to the playground.
nalgeon··on Show HN: SQLite Playground
Their work is a great POC how to handle large databases in the browser.

Mine is a tool for testing and sharing small snippets of SQL code.

nalgeon··on Show HN: SQLite Playground
Thanks! I've always liked the idea of SQL in the browser, since the Web SQL times.

That part is provided by the excellent sql.js project btw: https://github.com/sql-js/sql.js/

nalgeon··on Show HN: SQLite Playground
Nope — that's not SQL. Dot commands are available only in SQLite's CLI.

But there are 'more > show tables' command in the toolbar and Ctrl+/ shortcut which do exactly that.

nalgeon··on Show HN: SQLite Playground
Thanks a lot! Glad you find it useful.
nalgeon··on Show HN: SQLite Playground
What I've always lacked is something similar to JSFiddle / CodePen, but for SQLite. An online playground to quickly test the SQL query and share it with others.

Here is what I wanted:

— Binary database import, not just SQL schema.

— Support both local and remote databases (by url).

— Save the database and queries in the cloud.

— Free of charge, no sign-up required.

— The latest version of SQLite.

— Minimalism.

So I did it myself — an online SQLite playground for debugging and sharing SQL snippets.

Sample database: https://sqlime.org/#gist:e012594111ce51f91590c4737e41a046

nalgeon··on Show HN: I turned an infographics standard into an open-source book
Not exactly. It's kinda like an algorithms design manual, which teaches the fundamentals. After learning how to design charts in different cases, you can apply the knowledge in any programming language.
nalgeon··on Show HN: I turned an infographics standard into an open-source book
Some folks in Germany created a highly practical infographics / data visualization standard. It's a 150-page manual with nearly 200 examples. They released it under a free license (CC BY-SA), but did everything so that no one will appreciate the good work they did:

— Confusingly named it 'Business Communication Standards'

— Published the web version in a barely readable way

— Hid the PDF behind the paywall

Honestly, I've got no idea why one would publish a standard under Creative Commons license in such a strange way. Nevertheless, I've found it.

I believe the guide itself is useful. So with some Python and a lot of manual work I turned it into a GitHub-hosted markdown book, EPUB and PDF. Give it a try ツ

← PreviousPage 3 of 4Next →