News for hackers. Stuff that matters.
Re:Show HN: Free boring character counter but with modern UI by _mitterpach on Tuesday March 04, 2025 @09:51AM (#43255387)
That's a very nice and polished site, I especially like the sidebar for reading and speaking time, that seems very useful. I notice emojis count as two characters, but that's probably the standard, right?

I think there is a large market for apps that just work, they do one thing and one thing well. I remember reading about somebody who makes a living out of their app, which is just a crossword maker, but accessible enough to be used by teachers and ordinary people.

Re:Show HN: Free boring character counter but with modern UI by MajorBaguette on Tuesday March 04, 2025 @02:13PM (#43258783)
Some emojis require two UTF-16 code units so yep, standard

Thanks btw, I made this one as a test to see how it could perform as I can't stand terrible UI ones. I'll probably launch more. What'd you like to see next ?

Re:Show HN: Free boring character counter but with modern UI by amake on Wednesday March 05, 2025 @07:42AM (#43265781)
> Some emojis require two UTF-16 code units so yep, standard

But not acceptable in a "character counter", in my opinion. What exactly is the use case for this counter, since it won't align with anyone's real-world intuition for the meaning of "character"?

Re:Show HN: Free boring character counter but with modern UI by MajorBaguette on Wednesday March 05, 2025 @08:01AM (#43265895)
You're actually right, I didn't think of this.

My counter is based on JS .length and can get up to 11 characters for specific emojis while X count all emojis as 2 characters.

Thanks for highlighting this

Re:Show HN: Free boring character counter but with modern UI by amake on Tuesday March 04, 2025 @09:32PM (#43261918)
It's not counting "characters"; it's counting UTF-16 code units, so for instance a country flag is 4 "characters" because it's two regional indicator symbols, each composed of two surrogates.

It should really be using `Intl.Segmenter` instead of `string.length`: https://stackoverflow.com/questions/10287887/get-grapheme-ch...

Re:Show HN: Free boring character counter but with modern UI by _mitterpach on Wednesday March 05, 2025 @03:03AM (#43264029)
I mean, if this uses the same calculation as Twitter, Instagram and other sites that limit characters, then it should probably stay as it is, I don't have a problem with that.

However, a quirk in the way Unicode handles emoji has meant that some of the symbols take up many more characters than others. For example, a flag can take up as many as 14 spaces in your Tweet. Twitter has announced that it's changing the way it counts emoji so that they're all counted equally, as two characters. - https://www.theverge.com/2018/10/11/17963230/twitter-emoji-c...

So 4 character flag, which is written as 1 character, is sometimes counted as 2 characters. Honestly, I don't know, I did not expect for this to go so deep.

Re:Show HN: Free boring character counter but with modern UI by amake on Wednesday March 05, 2025 @07:40AM (#43265762)
> I mean, if this uses the same calculation as Twitter, Instagram and other sites that limit characters

Almost certainly those sites use much more sophisticated counting schemes.

> Honestly, I don't know, I did not expect for this to go so deep

You're not the creator of the tool in question, so it's OK for you not to know about this stuff, but I would really expect more from someone who is setting out to create a "character counter" tool.

Re:Show HN: Free boring character counter but with modern UI by rrr_oh_man on Tuesday March 04, 2025 @10:32AM (#43255971)
Nice UI, indeed!

I posted the first thing on my clipboard (a YouTube URL) and, interestingly, it showed me

  Words: 1
  Sentences: 3

PS: thank you for not shoveling LLMs into this
Re:Show HN: Free boring character counter but with modern UI by MajorBaguette on Tuesday March 04, 2025 @02:09PM (#43258751)
Interesting... I'll have a look at the "algo"

Yep no need to over engineer things here :)

Re:Show HN: Free boring character counter but with modern UI by glonq on Tuesday March 04, 2025 @03:14PM (#43259381)
i posted an emoji and it counted it as two characters
Re:Show HN: Free boring character counter but with modern UI by rrr_oh_man on Wednesday March 05, 2025 @02:15AM (#43263798)
Check this out if you're interested: https://www.youtube.com/watch?v=sTzp76JXsoY (Tom Scott, 3min, "Why Do Flag Emoji Count As Two Characters?")

Or even more in depth: https://www.youtube.com/watch?v=mubfp9WYvvI (Jennifer Lee, 55min, "Emoji by the People, For the People, a CS50 tech talk")

Re:Show HN: Free boring character counter but with modern UI by amake on Wednesday March 05, 2025 @07:44AM (#43265787)
Yes, but it raises the question of what exactly the "character" count is supposed to mean.

Does anyone need a "UTF-16 code unit count"? Somehow I don't think so. So it should really be counting graphemes, in my opinion.

Re:Show HN: Free boring character counter but with modern UI by rrr_oh_man on Wednesday March 05, 2025 @08:05AM (#43265931)
I don't think anyone was arguing this point, really.
Re:Show HN: Free boring character counter but with modern UI by amake on Wednesday March 05, 2025 @05:12PM (#43273388)
I am arguing this point, because it’s a huge flaw in the premise of the tool in question.
Re:Show HN: Free boring character counter but with modern UI by rrr_oh_man on Thursday March 06, 2025 @04:47AM (#43278262)
This is probably just someone’s weekend passion project. The issue looks more like an edge case than something the creator is super attached to.

Let’s be kind. Everyone’s just doing their best. (I know I also come off too harsh too often, especially online.)

Re:Show HN: Free boring character counter but with modern UI by glonq on Thursday March 06, 2025 @10:42AM (#43281476)
Agreed! FWIW I was doing more free QA than nit-picking ;)
Re:Show HN: Free boring character counter but with modern UI by MajorBaguette on Thursday March 06, 2025 @04:04PM (#43285061)
This !

But I implemented Twitter and SMS accurate count thanks to all the comment, win/win!

Re:Show HN: Free boring character counter but with modern UI by billybuckwheat on Tuesday March 04, 2025 @01:40PM (#43258431)
Nice work! A clean, simple but effective tool. Plan to use it in the future as I need it.
Re:Show HN: Free boring character counter but with modern UI by MajorBaguette on Tuesday March 04, 2025 @02:14PM (#43258790)
Cool thanks! I plan to launch more "boring" tools in a near future, what would you find useful?
Re:Show HN: Free boring character counter but with modern UI by billybuckwheat on Wednesday March 05, 2025 @01:32AM (#43263539)
To be honest, it's hard for me to say what I'd find useful until I need it.
Re:Show HN: Free boring character counter but with modern UI by mondov on Tuesday March 04, 2025 @04:25PM (#43259928)
Really nice UI! and the social media limits are useful. I needed this a few days ago, bookmarked and will use in the future. Thanks!
Re:Show HN: Free boring character counter but with modern UI by super5000 on Tuesday March 04, 2025 @04:29PM (#43259971)
Nice!

You could also count LLM tokens, too- that’d be helpful.

Note: The Pro threw me off, because Pro typically means “paid SaaS.”

Re:Show HN: Free boring character counter but with modern UI by MajorBaguette on Wednesday March 05, 2025 @05:30AM (#43264985)
That's actually a great idea!

I just added general one (I want the app to stay simple + maintaining specific models token cost would be a nightmare)