News for hackers. Stuff that matters.

tttp

Re:Exploring Alternatives to UUIDv4; Enter ULIDs on Saturday December 28, 2024 @11:27PM (#42537516)
we encoded the id with a base that removes most vowels (to avoid generating words, potentially offensive ones, and added a checksum to prevent copy paste mistakes

it worked quite well so far

https://dxid.tttp.eu/

Re:CSVs Are Kinda Bad. DSVs Are Kinda Good on Wednesday August 14, 2024 @11:47PM (#41252965)
"This memo provides information for the Internet community. It does not specify an Internet standard of any kind."
Re:The UX of UUIDs on Thursday April 11, 2024 @11:51PM (#40009234)
We need to separate the storage format (Postgres and MySQL both have a bigint serial for primary key and it should stay that way)

for display, you have various ways to encode that number into something easier for humans, what I prefer:

- short word - no offensive words - with a checksum (so we easily spot any copy paste mistake) - not sequential - can be put in a url without extra encoding

this is our implementation of that (base32 and luhn code)

https://github.com/tttp/dxid

Re:He blew the whistle on Amazon. He's still paying the price on Thursday December 07, 2023 @06:31AM (#38555280)
OP is protesting against Amazon providing infrastructure for selecting targets for the IDF to bomb. I'm not aware of Amazon providing services to Hamas, so that the OP is not protesting there isn't that surprising, nor does it imply that OP isn't protesting against Hamas attack.
Re:Sqids – Generate Short Unique IDs from Numbers on Saturday November 25, 2023 @01:35PM (#38415441)
I tried something similar with a fixed alphabet that guarantees no profanity and a checksum (luhn)

https://github.com/tttp/dxid

Re:You Don't Need UUID on Wednesday September 13, 2023 @07:02AM (#37495097)
you might want to consider an alternative with a base32 encoding with a luhn checksum

https://github.com/tttp/dxid

thanks for the feedback, you're right, the "url safe" isn't the main focus (well, shouldn't, it's just that it's the last issue I had ;)

For further context, we are working on online campaigns (petitions, sending emails to elected representative...) and everything has either ids (numbers) that we generate (a campaign, a action, a supporter...) or given externally (eg. the elected representatives or vote reference).

Most of these ids are in the 1k to 100k range, that happen to often be the same range as the number of actions taken or emails sent) and mixing these KPIs and ids on the same lists happen to be confusing for users.

It might be that we shouldn't try to put these ids in lists and summaries, but they are super convenient there sometimes and unavoidable when exporting to excel, so dxid was my solution to work around our potentially poor ux design ;)

Hi,

It's solving a tiny problem that annoyed me for many years: find a way to have unique keys for entities that don't have an obvious one without displaying their primary key as a number.

base 10 is not the best representation here.

feedback welcome!

Re:Funds, server hosting and more on Saturday May 14, 2022 @03:49AM (#31375917)
"I have spent my own personal money to pay for the curl server and I've spent my own (spare) time on its maintanence now for over twenty years"

So some of the hosting is paid by him directly

If you live in Europe, you might want to sign the European citizen initiative banning biometrics

Reclaimyourface.eu

A patent is granted to something new, here the goal was to show that the patent is void, because it was already existing before the patent was (wrongly) granted. It doesn't matter if it was invented less or more than 20 years ago, or even that the original invention was patented.
Re:European Urbanism and High-Speed Rail on Saturday April 10, 2021 @01:21AM (#26759130)
You are comparing relatively empty trains with hypothetically 100% full planes

It's the same with the wsj, they are comparing a 100% occupancy rate of the plane with a 20% for the car (a single passenger)

Assuming the consumption of a train doesn't change much based on how many passengers, you can travel by train for carbon free, as the 56 mpg won't change if you are in the train or not

Of course trains should be electrified, but take the train today already, the higher the occupancy rate, the better the averaged mpg will be

And who knows, it might change how the fret trains seems to always have the priority over passengers ones and finally make it a pleasant experience

I'd argue that you have other countries that have a better functioning direct democracy (Switzerland has lots of initiatives each year)

Isn't the main problem in ça that there are few limitations on how much can be spent to promote and initiative and essentially buy the result?

And this seems to impact the quality of representative democracy too...

Re:Ask HN: Would you use Phoenix/Elixir for your SaaS startup? on Thursday September 10, 2020 @01:15PM (#24434358)
We built our online campaigning tool with a graphql phoenix backend

For our use case (burst of visitors staying for a minute) it served us well and we were quickly productive with it.

I ran/coded similar petition tools in rails and php, the concurrency level you achieve with elixir is an order of magnitude higher (or we became better ;)

https://github.com/TechToThePeople/proca-backend

Really nice!

"After completing our curriculum, you will gain access to our internal code repository that powers c0d3.com"

Out of curiosity, why aren't you opensourcing the code? That would make it easier for your students to showcase their contributions and how they communicate.

My personal experience when I was a gsoc admin was that it was hard to get the students stick around after the end of the summer, do you manage and have some tips to share?

Please don't drag the rest of the world in it,

this student loan construction is certainly the current state of the USA

Re:Ask HN: What projects are you working on now? on Saturday March 21, 2020 @06:45PM (#22650902)
We are working on a petition tool (more broadly an online action tool, think emailing or calling your representatives before a vote)

Https://proca.foundation

It's as well a pretext to learn react, graphql and elixir, all opensource, feel free to join and contribute ;)

Github.com/TechToThePeople/proca

Re:Swiss immigration: 50.3% back quotas, final results show on Monday February 10, 2014 @07:20AM (#7210569)
1) No you can't gerneralise. Immigrants from France and Germany in CH are less criminal (well, technically less arrested ;) than swiss citizen.

2) CH immigration has always been selective, like most countries. The difference was that a few years ago citizen from "rich" eu countries could come without extra barrier. That's what has been voted to be changed.

As for the unified culture,I'm swiss and I lived both in CH and other countries in Europe. We have a lot in common within the country, but at least as much that is different. And language is one huge part of a culture, because it frames how you think and defines what books or movies you can access too.

X+

Re:Swiss immigration: 50.3% back quotas, final results show on Sunday February 09, 2014 @05:06PM (#7207534)
I'm not sure you have enough facts to support your arguments

1) most probably if you take into account other factors (social economics ones), the nationality it's not a major one

2) as you said, the wealth created by migrants can be a net positive effect

3) many immigrants (85%) come from EU

4) almost none "ethnic ghettos" in CH

5) agree it's different. CH has about a 1/3 of its population that are migrants and they are generally welcomed and integrated (the regions that got most migrants rejected the initiative).

Beside, there isn't a unified "swiss culture". If you simply look at the languages, they are 3 different ones.

It doesn't matter, each of them would do, no matter how niche if you can become really good at it.

...but if you can learn only 1 programming language, you won't.

Re:The Guardian Moves to .com Domain on Tuesday July 30, 2013 @11:36AM (#6127613)
Wwhat makes you say the guardian is UK-specific?

they had two domain names that they seem to put together under a single one. That seems to be a logical move.

http://www.theguardian.com/gnm-press-office/guardian-us-grow...

The latest big news was about Snowden, hardly qualifies as a uk news ;)

Not to be pedantic, but I suppose you mean license as "you have to pay to use it". Both Apache and nginx have a (free software) licence.
Re:Sex Machine: Get gender from first name in Ruby on Tuesday April 16, 2013 @06:15PM (#5561296)
In quite a few languages, you need to know the gender to write personalised emails, eg. Cher Joe vs. Chère Jane.

Older »