Better HN
topnewbestaskshowjobs
Log inSign up

sekun

10 karma · joined Mar 10, 2022 (4y ago) · 12 submissions

Submissions

1.

Create static binaries, and Docker images with Nix(blog.sekun.dev ↗)

1 points · by sekun · 4y ago · discuss

comment 4y ago · link · parent

Wait, that's awesome! TIL.

comment 4y ago · link · parent

There seems to be an issue in Chrome in general. Thanks for reporting, I'll look into it. :)

comment 4y ago · link · parent

Currently no, since this was just meant to be a toy project. But I agree with you that I have to deal with moderation if I intend to keep this up. The only countermeasure is to peek into the URL without having to be redirected cause each shortened URL has a stats page. e.g https://emojied.net/stats/%F0%9F%8D%8A%F0%9F%8C%90

comment 4y ago · link · parent

Thank you for your kind words, and for checking it out! I'll look into it.

comment 4y ago · link · parent

Very true. I could use some advice for where to start. I replied to your Twitter DM!

comment 4y ago · link · parent

Unfortunately IDNs aren't allowed to have emojis. :( That definitely would've been fun though.

8.

Show HN: I made an emoji URL shortener(emojied.net ↗)

15 points · by sekun · 4y ago · 13 comments

comment 4y ago · link · parent

I don’t understand what metrics you use for “more scalable” and “more maintainable”. If your application’s needs is sufficiently fulfilled by RLS, you don’t have to reinvent the wheel in the application level. Less code there to maintain is good.

Plus, I don’t see how “just by reading application code you can tell the expected behavior” doesn’t apply to RLS. Policies are written in a consistent format. USING for visibility, WITH CHECK for altering. I only have to keep an eye for these, and I’ll already get a good summary on what it does, no?

comment 4y ago · link · parent

Could you elaborate? I can update things just fine with a combination of USING, and WITH CHECK. USING can imply WITH CHECK too IIRC.

comment 4y ago · link · parent

You can create a role whose sole job is to switch to the roles needed. Doesn’t require you to escalate to superuser-level privileges that way. But still, if SQL injections aren’t properly considered then it’s possible for a user to gain more privileges than planned. Although SQL injections are usually mitigated by the DB libraries these days.

Also, it’s more convenient to use SET LOCAL ROLE <ROLE_NAME>, since that only keeps the role for the transaction. Manually resetting it is error prone (IME), and forgetting will have the supposedly “temporary” role bleed to the next transaction.

comment 4y ago · link · parent

UTF-8 as the de facto for `text` was merged a few months ago. It's in >=2.0.