Let's implement a tokenizer with our new knowledge.

This type splits a string, similar to the previous example. We look for the first dot as the split point.

The result is the first token, followed by the recursive tokenization of the remainder.

Angular's `get` method tokenizes its argument using this technique. Then, we can check for the specified property at compile time.

(P.S. Follow me for more about TypeScript and Angular!)

Show thread

The previous example generates a string type by concatenation. However, can we also go the other direction, breaking apart a string type?

The answer is yes! Using the `infer` keyword, we can implement a simple parser. This `ProductFrom` type extracts product names from columns.

Show thread

Imagine you have a type listing various products, and you want to automatically generate a type for corresponding database columns.

We define a template literal type called DatabaseColumn. It takes any subtype of string, and maps each element onto a string with a column prefix.

Show thread

In Typed Forms, the `get` method takes a string with dot-separated control names, and returns a fully typed value. How is this possible?

We can actually parse the argument at compile time, using the magic of template literal types! Let's see how it works.

Every few months I check on the progress of LLMs, and I'm astounded. We're about to live through a technological revolution on the scale of the internet or the iPhone.

I asked a very obscure original question about art dealing with death. On Google, nobody has ever asked this. Astounding.

dylhunn boosted

The v15 release was pretty big for the future of @Angular@twitter.com. Feels like we're just getting started, again.

👀👇🏿

youtu.be/NhBdqnYEIMg

dylhunn boosted

Saying not to bother with the favourite button on mastodon because it doesn't affect any algorithm is like saying not to say thank you to someone because no one else will hear.

Stop thinking in those old social media ways of engagement and visibility and algorithms and reach and audience and start thinking about being social.

dylhunn boosted

The enemy of your enemy is NOT your friend. #Apple  is the largest natural monopoly in the tech industry. They have far too much power with their App Store lock-in.

Apple caves to the demands of repressive regimes in the US, Israel, and China. Apple actively deplatforms sex workers. Apple exploits poor workers in China and the global south.

We can praise some of Apple's privacy decisions (e.g. standing up to governments pushing for crypto backdoors) while also recognizing that no corporation will EVER have your best interests in mind.

We must bring all tech companies to heel with regulation. We also need to build alternative digital ecosystems that don't rely on monopolistic private companies.

cbsnews.com/news/elon-musk-app

dylhunn boosted

Have you ever been annoyed about having to pay $6.40 when entering a BART station and then leaving without riding because of train delays or cancellations?

Now is the time to write BoardOfDirectors@bart.gov and ask for a 30-minute grace period before an excursion fare is charged - the BART board will be discussing this soon!

dylhunn boosted
dylhunn boosted

Mind absolutely blown to discover the MacOS's most annoying behavior can be stopped by just unchecking a box.

dylhunn boosted

"State of JavaScript" went out last week!

You can share your experience with Angular here

survey.devographics.com/survey

dylhunn boosted
dylhunn boosted

✨ KDE runs on the Apple M2!!!! ✨

With full GPU acceleration! 🚀🚀
Running Xonotic, glmark2, and eglgears at the same time!!

My 🦀 Linux kernel driver now supports the M2!! And it works out of the box with @alyssa's Mesa driver, no userspace changes needed~!!

dylhunn boosted
dylhunn boosted

#ElonMusk, who endorsed the Republican Party, wields absolute control over the information on Twitter. Mark Zuckerberg, who allowed Russian ads to flood Facebook in 2016, wields absolute control over the information on Facebook & Instagram. Social Media is a right-wing oligarchy:

dylhunn boosted
dylhunn boosted

Oh dear. I've just been informed that collecting the names of every person on the planet for my naughty and nice lists is, and I quote, “a significant and wholly irresponsible breach of #GDPR “.
I'm going to hand out about 8 billion consent forms soon. If you could all get them back to me ASAP that would be appreciated.

dylhunn boosted

I see people talking about #Hive, I wish them the best but if we're going to create an alternative to Twitter, Facebook, Instagram etc. then we need to be willing to firstly learn from their mistakes (especially around the governance structure/financing model) and secondly willing to give up some creature comforts and do some hard graft learning how to use a new platform. Profit driven social media bet that people are willing to trade away the benefits of the fediverse for 'ease of use'.

dylhunn boosted

Here's my primary advice for anyone looking to join Mastodon, but especially BIPOC folks, and particularly those that are social activists.

Do not join Mastodon.social or Mastodon.online
Do not join instances with more than 20k active users

Edit: In fact, I'd trend toward instances with fewer than 2000 active users.

Thank you.

Show older
towns.gay

Collectively managed by radical queers, who believe that cities are for us too. #VisionQueero #GayTowns #acab 🏳️‍🌈🚒🌆🌼🔰🐈♿️🍆🍭🗼⛺️🚡🌳🦋🕺🏽🌈♋