Mat Simon

Mat Simon

@matsimon.dev

Lead Architect @derstandard.at Full Stack Developer (SvelteKit, SwiftUI) https://www.matsimon.dev Founder of https://www.pausly.app ⭐️ Musician https://www.yesmeno.com 🎸 🎤 🎹 🥁 Blender enthusiast 🎨

165 followers213 following182 posts

The new #sveltekit explicit environment variables are really great! But one thing that has been bothering me, is how to handle missing env variables during build time. We just found a nice solution that you might want to use as well. 1/ #svelte

The docs suggest to make them optional during building, but the downside is that you then need to handle the optional type all over the code since the type of the variable will be `undefined | string`. Although this is technically correct it's not great DX and unnecessary during runtime. 2/

This runtimeOnly schema wrapper does two things: 1. It makes the value optional during build, but doesn't make the return type optional. 2. It transforms the value to an Error during build, so that _if_ it is accessed, it will be very apparent and the build will fail in all likelihood

Mat Simon reposted

We have implemented one of the most requested features! When you're in the lobby, waiting for the session to start, you now see all the other members standing next to you. We hope you'll love this feature as much as we do.

Mat Simon reposted

We completely overhauled the user interface for unboxing new outfits. Hopefully you get to experience it soon :)

Mat Simon reposted

High fiving has probably always been the most loved feature of Pausly. It's now possible to directly click on the 🙌 emoji to instantly react. No more stressing over finding the right emoji in time :)

Mat Simon reposted

It has always been possible to replace single movements before starting a session, but it's now possible to replace them during a session as well! Click on the settings button and hit the "Replace this movement" button and you'll instantly get a new one.

Mat Simon reposted

🎉 Happy 30-month anniversary to Container Queries – in every browser since Feb, 2023. It was supposed to be impossible, but here we are! Why 2.5 years? Nothing will change tomorrow, but Baseline uses this milestone to signal confidence a feature has gained "wide" support. youtu.be/bhHV0rQ3-CQ

Very interesting... This will enable us to use `await` directly inside `<script>`, `$derived` and template code. In a SvelteKit context, this potentially means that the `load` function will not remain the place to fetch your data, but that components can do that themselves. #svelte

github.comAsynchronous Svelte · sveltejs svelte · Discussion #15845This is a long document; get yourself a cup of tea. tl;dr You can now use the await keyword in Svelte — in your <script>, inside $derived expressions, and in your markup — by installing the async b...

Mat Simon reposted

I recently watched Adolescence on Netflix and at the risk of sounding a bit iconoclastic, I’d like to offer some criticisms and concerns about how the mini-series (perhaps inadvertently) perpetuates some myths related to the online radicalization of men and boys.

Mat Simon reposted

The power of view transitions is absolutely mind-boggling. Things like this 👇 are quickly done with some CSS (no hacks!) and no additional DOM elements. Wild! 🤯

Mat Simon reposted

Elon Musk pretending to be one of the best players of Path of Exile in the world, and then live streaming to prove it... just to show everybody that he has absolutely no clue what he's doing and just bought some Chinese account has got to be one of the funniest things this year so far.

I’m really happy about this. I see way too many people switching to Bluesky because it has not been taken over by a right wing lunatic. But the important thing about Bluesky is not that the company it is controlled by is not insane (yet), but that the network is decentralized!

Jay 🦋@jay.bsky.team

Exciting to see new, independent projects spin up to decentralize the atproto ecosystem! Building alternative infrastructure is a big step towards giving users more choice and making the network billionaire-proof.

In case you missed it, #vscode now has an option for custom labels! The #svelte vscode extension will set this automatically in the future, but until then, you can make these changes to optimize your tab labels in a #sveltekit project. github.com/sveltejs/lan...

I worded that poorly. It’s not about getting them off the main thread (for which you’d need a web worker) but yielding to the main thread so long running task don’t block the main thread for too long.

Mat Simon reposted

Why can't we just use // sharedState.svelte.js export const searchText = $state(""); in the new #Svelte v5? @matsimon.dev was so kind to explain it to me, I turned my learnings (and his answers) into a short blog post: dev.to/mandrasch/sv... Critical feedback welcome! #javascript #webdev

dev.toSvelte 5: Share state between components (for dummies)As soon as you see the new $state in Svelte 5, you might be tempted to do this: //...

I can't remember where I saw this tip, but it's so nice to use vite when you're working on something as simple as a single html file. Just create an index.html file, and run `vite .` in the same folder, and you have a live dev server without hot reloading!

It might be a sign of me getting old that I'm really excited and can't wait for the new washing machine that I just ordered to arrive.

I really don't understand the outcry about Magnus and Nepo deciding to share the world #chess blitz championship title. This has been done in other sports, both agreed to it, and I found it really sweet actually. Not a second was I thinking that they robbed me of an exciting finish.

How have I missed this elegant solution all this time?? This is the perfect way to version control my dotfiles (.zsh, .vimrc, etc...) without needing to create symlinks or any third party tools (apart from git). It's even really easy to support different machines with branches.

atlassian.comHow to Store Dotfiles - A Bare Git Repository | Atlassian Git TutorialIt&#039;s time to find a better way to store your dotfiles. Learn why you should start using a bare Git repository instead.

The only minor change I made, is that I renamed the config folder from `~/.myconfig/` (or `~/.cfg/`) to `~/.dotfiles.git/` since it's customary to give bare repos a `.git` extension.

Glad to see that Magnus is going to play the Blitz World Championship Tomorrow, despite his agreements with FIDE (the chess regulatory body) over his Jeans! #chess #JeansGate

FIDE is so antiquated. They banned Magnus, arguably the best player of all time, from playing their last round in the chess world rapid championship *because he was wearing jeans*. I’m all for nobody being above the rules, but these dress codes are just ridiculous. #fide #chess

"There is no argument, that is good enough, to convince me in any world, that you should put 800 classes on an element. There is not a single instance anywhere where I think that that is acceptable." –– @dangitalex.wtf on the compressed.fm podcast I share your sentiment Alex 😁 #tailwind

What a refreshing end of the world chess championship. Both players were so incredibly respectful to their opponent in the press conference after the match that it brought tears to my eyes.

Mat Simon reposted

It’s interesting that the emojis show the earth from three angles 🌎 🌍 🌏 but not the fourth. Though 🔵 is a fair approximation of what it would look like. People underestimate the Pacific.

Colter Shaw shows up at the apartment, ticking off two product placements like he’s settling a tab with the marketing department.

Mat Simon reposted

CSS position: sticky, scroll-snap + progressively enhanced scroll animation 📜 li { animation: bright; animation-range: calc(50% - 1lh) calc(50% + 1lh); animation-timeline: view(); scroll-snap-align: center; } @​keyframes bright { 50% { opacity: 1; }} line-height units are a gift 🎁

Mat Simon reposted

We have 6% of the followers here compared to the 100k in X. The vite 6.0 announcement in bluesky already got half the reposts and a third of the likes. And most of the comments and quotes from OSS maintainers happened here. I don't know about other communities, but OSS web dev is a bluesky game now.

Omg... These two lines of code have just cost me a few hours. I just couldn't figure out why my scroll driven animation wasn't working!

To help speed up the #svelte 5 migration, I wrote this simple writable store wrapper, that also exposes a $state value. This way I don't have to migrate all my code at once, but progressively switch to the $state. This works well, but did I miss a built-in solution for this? Feedback welcome!

Here is the updated version that makes use of the built-in "fromStore". I changed the .value accessor to .current as well, so it's in line with the "fromStore" API.

To help speed up the #svelte 5 migration, I wrote this simple writable store wrapper, that also exposes a $state value. This way I don't have to migrate all my code at once, but progressively switch to the $state. This works well, but did I miss a built-in solution for this? Feedback welcome!

Just realized that I can simplify by using the built in fromStore function. Nice. Thanks aptt (you should really create a Bluesky account btw ;) )