HackerTrans
TopNewTrendsCommentsPastAskShowJobs

sekun

no profile record

Submissions

Create static binaries, and Docker images with Nix

blog.sekun.dev
1 points·by sekun·hace 4 años·0 comments

Show HN: I made an emoji URL shortener

emojied.net
15 points·by sekun·hace 4 años·13 comments

comments

sekun
·hace 4 años·discuss
Wait, that's awesome! TIL.
sekun
·hace 4 años·discuss
There seems to be an issue in Chrome in general. Thanks for reporting, I'll look into it. :)
sekun
·hace 4 años·discuss
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
sekun
·hace 4 años·discuss
Thank you for your kind words, and for checking it out! I'll look into it.
sekun
·hace 4 años·discuss
Very true. I could use some advice for where to start. I replied to your Twitter DM!
sekun
·hace 4 años·discuss
Unfortunately IDNs aren't allowed to have emojis. :( That definitely would've been fun though.
sekun
·hace 4 años·discuss
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?
sekun
·hace 4 años·discuss
Could you elaborate? I can update things just fine with a combination of USING, and WITH CHECK. USING can imply WITH CHECK too IIRC.
sekun
·hace 4 años·discuss
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.
sekun
·hace 4 años·discuss
UTF-8 as the de facto for `text` was merged a few months ago. It's in >=2.0.