Better HN
topnewbestaskshowjobs
Log inSign up

tttp

107 karma · joined Aug 10, 2010 (16y ago) · 41 submissions

Submissions

comment 1y ago · link · parent

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/

comment 2y ago · link · parent

based on https://news.ycombinator.com/item?id=41889498

3.

Is this the future you wanted?(abonder.com ↗)

1 points · by tttp · 2y ago · 1 comment

comment 2y ago · link · parent

"This memo provides information for the Internet community. It does not specify an Internet standard of any kind."

comment 2y ago · link · parent

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

comment 2y ago · link · parent

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.

comment 3y ago · link · parent

I tried something similar with a fixed alphabet that guarantees no profanity and a checksum (luhn)

https://github.com/tttp/dxid

comment 3y ago · link · parent

you might want to consider an alternative with a base32 encoding with a luhn checksum

https://github.com/tttp/dxid

comment 3y ago · link · parent

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 ;)

comment 3y ago · link · parent

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!

11.

Show HN: Display primary keys the way humans and developers prefer(github.com ↗)

3 points · by tttp · 3y ago · 3 comments

comment 4y ago · link · parent

"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

comment 5y ago · link · parent

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

Reclaimyourface.eu

comment 5y ago · link · parent

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.

comment 5y ago · link · parent

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

16.

Prime+Probe 1, JavaScript 0: Overcoming Browser-Based Side-Channel Defenses(orenlab.sise.bgu.ac.il ↗)

2 points · by tttp · 5y ago · discuss

comment 6y ago · link · parent

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...

comment 6y ago · link · parent

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

comment 6y ago · link · parent

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?

comment 6y ago · link · parent

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

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

comment 6y ago · link · parent

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

22.

UK unlawfully copying data from EU police system(euobserver.com ↗)

1 points · by tttp · 7y ago · discuss

23.

EU bank ready to ditch fossil fuels(350.org ↗)

1 points · by tttp · 7y ago · discuss

24.

European data supervisor investigates Microsoft software used by EU(reuters.com ↗)

26 points · by tttp · 7y ago · discuss

comment 12y ago · link · parent

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+

comment 12y ago · link · parent

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.

comment 13y ago · link · parent

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.

comment 13y ago · link · parent

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 ;)

comment 13y ago · link · parent

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.

comment 13y ago · link · parent

In quite a few languages, you need to know the gender to write personalised emails, eg. Cher Joe vs. Chère Jane.
12