Replies: 21 comments 13 replies
-
|
Beta Was this translation helpful? Give feedback.
-
Hi, you can fork or remove hashids-tsql since it was never fully complete and is no longer maintained. Thanks! |
Beta Was this translation helpful? Give feedback.
-
It's really an Obfuscated ID, so maybe a play somewhere off that, like OID
or OBID. You could call it ObfusicatID. Just a thought....
…On Mon, Jun 19, 2023 at 12:40 PM Miquel Fire Burns ***@***.***> wrote:
Yes, if we were to use a name like that, the q would need to be changed.
As far as getting things moving for a better name, something like snid or
scid (Scrambled Number/Character ID). I don't really like these names,
but maybe that could help someone else brainstorm a better name. I like
hashids, but the hash in the name really confuses people on the purpose in
the wrong way, as said in the OP.
—
Reply to this email directly, view it on GitHub
<#92 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAG33ENPWEXFOZIDWLL4QHDXMB6GZANCNFSM6AAAAAAZMCK4JQ>
.
You are receiving this because you are on a team that was mentioned.Message
ID: ***@***.***
.com>
|
Beta Was this translation helpful? Give feedback.
-
It's great to have you back, Ivan. We definitely welcome any improvements, and it's probably a wise decision to rebrand the project with simpler defaults, as you suggested. I took a look at the repository and I've made an initial attempt to create a PHP version. I used AI to generate most of the code, but there are memory leak issues. We'll probably need to rewrite the logic using a math extension. |
Beta Was this translation helpful? Give feedback.
-
Hey @4kimov! Great to hear back from you. One thing I'd like to add to the official spec is support for Unicode characters in the alphabet. I've added it to the JavaScript port, but I'm not sure it's compatible with all the other implementations. This allows things like generating a string of emojis by using an emoji alphabet. Treating the alphabet and individual tokens as an array of strings generally does the trick. It could also unlock scenarios like generating an array of tokens, if the "alphabet" allowed arbitrary multichar words, e.g. if using a dictionary of English words, you could get results like: [pepperoni, lemon, wonder, amazing, tree, open, anxious] which could easily be turned into a word token: ’pepperoni-lemon-wonder-amazing-tree-open-anxious’. Might be useful for use cases where a person might dictate the ID, e.g. error codes. We should also make sure the new version is at least as performant as the original hashids. I have received complaints about regressions as I developed hashids.js, which I mediated after adding a benchmarking test (and actually made it faster than the original v1 version by using arrays internally, rather than string manipulation). |
Beta Was this translation helpful? Give feedback.
-
Thank you all for the on-going feedback. @speps @miquelfire @dswitzer, interesting observation regarding SQL. This is what I meant initially regarding rebranding: https://sqids.org/ (logo is temporary; plural ending is a nod to Hashids). My hope is different capitalization and pronunciation would distance it further from SQL. Naming things is hard. Most good names (+domains) are already taken. I'll wait for others to weight in, but if there's a name that has .com|.org available + Github username available + shorter than Hashids + something relatively pronounceable & googleable, then let's check it out. @waynebloss Roger that. @vinkla Thank you, great to be back. Wow, you're quick! And it's also impressive how much help AI can be. Copy that regarding PHP math extensions. I was hoping to try and finalize sqids-spec this + next week. I'm still testing shuffling, encoding, etc to see what could be optimized or improved. If you have ideas on how to upgrade & stabilize the API / algorithm, please do share. @niieani Thank you, great to hear from you as well. I'm still messing around with v2 API over at https://github.com/sqids/sqids-spec/blob/main/index.ts - as you can see it's still missing checks & error handling (please feel free to suggest what could be done better/simpler). I saw your awesome test suites, think you could help me move them over to here? We should discuss support for word tokens separately (this is a big topic, I see some pros + cons). I hear you on the performance. The spec repo right now is optimized for readability & clarity (this is by no means meant to be a JavaScript port). I'm hoping to base other ports on it, but the individual implementations should def take freedom to optimize anything and everything possible for performance. I've added some todos based on your suggestions, am I missing anything? |
Beta Was this translation helpful? Give feedback.
-
Hi @4kimov, It's exciting to have you back!
I think this should be the first step when we start v2 work, and all v1 repo should add same introductions about v2 in their README file.
I like this squids and the new logo. One more thing, I suggest we add WebAssembly implementation in "what language are you using?" section. |
Beta Was this translation helpful? Give feedback.
-
@fanweixiao Thank you, great to be back. Copy that re: one Github repo + READMEs + sqids. Regarding WebAssembly, do you mean the filter should show repos that support compiling to wasm (JavaScript, Rust, etc), or you had a separate implementation in mind? |
Beta Was this translation helpful? Give feedback.
-
Hi @4kimov. This is a great initiative. Please add me as well. 👍 I'll have a look at the spec and start working on the Haskell port ASAP. |
Beta Was this translation helpful? Give feedback.
-
@4kimov, good to see you're back! :-) My 2 cents here -- it's nice to have an idea for a new simplified library (even though the blacklist will complicate things a bit.) |
Beta Was this translation helpful? Give feedback.
-
@laserpants Nice, will do, thank you. @tzvetkoff Thank you, appreciate it. TCL would be great, as well as the other languages you mentioned. And yes, the custom blacklist would be a bit more effective, but also we'd have to get the list just right (words can't be too short to have too many hits, but also not too specific so the size of the library doesn't blow up). I'm still adjusting the spec and it will take me a bit of time, so atm it's still early to port versions. However, if anybody would like to take part in shaping the spec, you can find it here. Btw, there's also a separate Unicode discussion going on here if anybody has any feedback on that. |
Beta Was this translation helpful? Give feedback.
-
Thank you all for the feedback. I'll close the discussion for now, but feel free to comment if you have more -- I'll continue replying. Quick update:
I'll wait another few days for the comments on the algorithm's RFC, and if it looks good the next steps would be to write individual implementations (I'll invite individual members to different repos). |
Beta Was this translation helpful? Give feedback.
-
Any chance we could source the blocklist from somewhere else, instead of having to curate our own? |
Beta Was this translation helpful? Give feedback.
-
I haven’t read the spec yet, but I wonder if instead of managing blocklists
we could just guarantee no more than like 2 alphabet characters appear
before a non-letter.
…On Sat, Jun 24, 2023 at 8:45 PM Ivan Akimov ***@***.***> wrote:
I've been trying to find reliable lists, but so far no luck. Some are very
large & a bit inaccurate and many have attribution requirements. I've also
been trying not to include everything I find so I don't blow up the library
size or degrade performance unnecessarily. If you have suggestions, feel
free to open a discussion <https://github.com/orgs/sqids/discussions>.
I'm curious about this problem myself.
—
Reply to this email directly, view it on GitHub
<#92 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAG33EL7RL3ZW4CMSKOZSHDXM6CY5ANCNFSM6AAAAAAZMCK4JQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
The trick would be to insert a character that should help to avoid
***@***.***
So no zero, one, three, five.
…On Sat, Jun 24, 2023 at 9:26 PM Ivan Akimov ***@***.***> wrote:
That'd be a bit hard to implement since we don't control neighboring
chars. It would also not block leetspeak (eg: "he11o").
—
Reply to this email directly, view it on GitHub
<#92 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAG33EM2DX3KGTZTDADLH3TXM6HVTANCNFSM6AAAAAAZMCK4JQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Hey @4kimov, I noticed that the website says "no dependencies". Is this a strict requirement for all language implementations? Although this is technically possible, it does introduce some limitations. Could you clarify, please? |
Beta Was this translation helpful? Give feedback.
-
I'm seeing some more on-going comments, so I'll re-open for more visibility. |
Beta Was this translation helpful? Give feedback.
-
Another quick update:
If questions or feedback, I'm here 🙏 |
Beta Was this translation helpful? Give feedback.
-
I'll close this discussion - thank you all for the feedback. To sum it up:
Thank you all. |
Beta Was this translation helpful? Give feedback.
-
Can you send me another invite? I forgot to accept it originally.
Thanks!
…On Thu, Jul 20, 2023 at 9:36 AM Ivan Akimov ***@***.***> wrote:
I'll close this discussion - thank you all for the feedback.
To sum it up:
- Spec has been finalized <https://github.com/sqids/sqids-spec>, if
you'd like to discuss something there's a separate discussion here
<sqids/sqids-spec#2>
- Individual repos have been created & everyone that I can think of
has been invited. I see some invitations have expired (they automatically
expire after 7 days of inactivity), so please let me know if you need
another one
- Hashids README <https://github.com/hashids> has been updated
- The following are already done: Julia
<https://sqids.org/julia?hashids>, Haskell
<https://sqids.org/haskell?hashids> & Go <https://sqids.org/go?hashids>
💪
- The following are being worked on: JavaScript
<https://github.com/sqids/sqids-javascript> & Rust
<https://github.com/sqids/sqids-rust>
- The rest haven't been started yet -- I could use your help on
getting them to the finish line 🏁
- I'll aim to redirect hashids.org to sqids.org next week. It's ok
that some repos haven't been implemented yet, since the new website links
to existing Hashids implementations anyway, but if you were planning on
implementing a repo, now is the best time 💪
Thank you all.
—
Reply to this email directly, view it on GitHub
<#92 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAG33EPHZHZO2N7V2MEQWRDXREX5HANCNFSM6AAAAAAZMCK4JQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Hey folksI also missed my initial invite, please resend. 🙂20 juli 2023 kl. 19:33 skrev Ivan Akimov ***@***.***>:
Done 👍
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are on a team that was mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
tl&dr: My name is Ivan Akimov, I'm the original creator of Hashids. I'd like to suggest an updated algorithm, better support on my part, rebranding, better docs/website and a few other minor things. Reasons & details below. Asking for feedback.
Hey all, it's been a decade since the release of Hashids. I'm very proud of the support this project has received over the years. The initial traction was unexpected, and so were the numerous ports that poured in from all of you. What followed were many happy users and millions of combined installs.
You're probably aware that a few years in, I took a backseat role within the project, and transferred my own versions over to @niieani and @vinkla for maintenance, who did an amazing job not only maintaining but moving them forward. And so did all of you who have been running your own ports.
I've always lurked in the background of Hashids, but throughout the years wanted to improve certain aspects and simplify parts of the implementation.
What follows is ideas/suggestions on v2 and the org itself:
House only new ports/versions/repos under one roof (a Github org), as opposed to them being scattered throughout Github. A single repo port would have several maintainers for redundancy. If someone is no longer able to maintain the repo, we'd have the ability to add other maintainers. It would also be easier for new users to find all ports when they're under one roof. Current implementations can and should stay where they are, and we would link to them.
Remove the
salt
parameter. It's confusing and implies having something to do with encryption. If users would like custom ids, they can pass a manually shuffled alphabet to the constructor.All versions should produce the same output. Having the same unit tests & all ports being under one Github org would help.
Profanity filtering handled through a wordlist. Current version only works against most common English curse words. I'd like it to support any custom words for multiple languages/countries.
Simpler interface: only
encode(numbers: u64[])
anddecode(id: string)
functions. PossiblyminValue()
andmaxValue()
functions if the programming language is not clear on what the max value might be (min value would still always be 0)...BigInt support / max integer values would depend on the individual implementations. Hence the
maxValue()
function.A new name. I've been going back and forth on this for a while, and previous discussions were kind of split. The Hashids name still doesn't sit well with me for the following reasons (even tho I'm the one that came up with it):
I think the new name would help avoid some of the existing confusion, and since the core would change so much, this would be a good time to name v2 something else.
New website: simpler docs, up-to-date design, good use cases + bad, features list, why use it, a simple playground, dark mode, etc. all of this is long overdue. Also: proper 301 redirects to the new website not to break SEO (with links to the original Hashids Github implementations) + explanation on why Hashids has been upgraded.
I paid for hashids.org to be registered through 2029. I'd like one of my companies to sponsor v2. It can pay for Github teams, domain name registration, hosting costs (Vercel teams for backend support), Cloudflare, Plausible, FortAwesome, etc. Hashids is not a product that makes money, it's a project that costs money -- sponsoring it would help ensure this project can be sustained for years.
I've registered sqids.org. It doesn't stand for anything significant, other than: it's shorter than Hashids, doesn't have the word "hash" in it, theoretically could stand for "short quick ids" or "short quality ids", and it's arguably fun/goofy sounding (like squids). If you have better suggestions, please do share.
Random notes:
I would like to hear from current @hashids/owners (and users) & their thoughts on the above.
Beta Was this translation helpful? Give feedback.
All reactions