Comments (4)
Postgres has a levenshtein distance function already so we can use that as MVP. Transpositions cut costs more than I'd like but it's better than nothing.
from stacker.news.
Is the intent to show the cost of a nym change to a user before they submit the request?
Yes. Our current rule of thumb is that if any action costs more than 1 sat, show a receipt upfront (zapping excluded).
Yeah we'll have to beat up postgres either way. We already go to the db to check if a name is taken, so we could piggy back on that.
from stacker.news.
This piques my interest. I'll start looking into an implementation.
from stacker.news.
Is the intent to show the cost of a nym change to a user before they submit the request? I ask because relying on a postgres fn to calculate it seems like it might be somewhat inefficient, requiring us to go to the DB to provide the cost estimate up front. If that's the case, it might be worth finding a js lib that can calculate the levenshtein distance so we can do that calculation on the client?
Edit: I guess maybe it's still worth using the postgres fn since we'd have to calculate the distance against all existing nyms, so not transferring that much data over the wire is better. I'm just thinking out loud at this point lol
from stacker.news.
Related Issues (20)
- Feature Request : Comment Fee Control HOT 1
- Feature Request : Fee Credit HOT 1
- Feature Request : Custom Zaprank
- Make polls anonymous HOT 2
- Images are no longer reserving vertical space HOT 2
- Ticker in Sticky Header Does Not Inherit Changes HOT 1
- implement sndev fund_nym HOT 2
- Invalid freebie comment edits via /:id/edit
- Add popover support for markdown links to sn items `[]()`
- Search anomaly, is ":" in the title throwing something off?
- Comments non-deterministically missing after submission HOT 7
- Set a reasonable boost max HOT 1
- Can't withdraw sats to Alby Extension HOT 2
- Addition of Naira(NGN) to fiat currencies
- "Unable to get image fees" HOT 1
- Sats forwarded to anon don't go to rewards HOT 1
- Feature Request: Arrows to flip through photos HOT 2
- Prevent new account creation from /login
- Add 'This day on SN' to empty /search page
- Limited rights for "anon" account HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stacker.news.