RSSAmplifier

Blog

Hypersphere

Tech blog, mostly about TypeScript

hypersphere.blogRSS feed ↗9 posts

Latest posts

SQLSeal's new features - syntax highlighting, templates, charts and much more!

I recently posted about my Obsidian Plugin - SQLSeal , which helps you query notes and datafiles stored in Obsidian. Since then, I've added many new features that make the plugin even better and easier to use. Many of these improvements came from suggestions from our wonderful community on Discord ! Below is the summary of the most exciting changes! What is SQLSeal # Before we start with the…

SQLSeal - SQL Engine for Your Obsidian Vault

Have you ever looked at your growing collection of notes and wished you could easily find answers in them? Maybe you're tracking movies to watch, keeping daily journals, or logging your expenses. Over time, these notes become treasure troves of personal information. But finding patterns or getting quick insights often means manually searching through dozens of files. That's where SQLSeal comes in.…

TypeScript Typeguards: To use or not to use?

TypeScript's static typing adds a layer of reliability and maintainability to JavaScript. Typeguards are a cornerstone of TypeScript and custom Typeguards can provide a lot of powerful typing options that would otherwise be impossible to achieve. In this article, I will go through built-in ways of typeguarding and how to create custom ones. I will also explain why it's not always a good idea to…

Randomness in CSS using trigonometry

In the past, I have covered the topic of pseudo-randomness in CSS using modulo operation and I used prime numbers to create an automatic counter that can be used to generate different values for each object . Thanks to that, we could compute pseudo-random values for each element independently. As robust as this solution is, it has few downsides: The modulo function is not continuous It is overly…

How I created a GameBoy-like game in 13kb

How I created a GameBoy-like game in 13kb History of Gravepassing — my entry for js13kgames 2022. Web Game Development TypeScript JavaScript Canvas JS13K This year I decided to participate in the js13kgames game jam. It’s a yearly, month-long competition to create a game in JavaScript from scratch that will fit 13kb (zipped). It does not sound like plenty of space, but with enough creativity, a…

Randomness in CSS

The majority of the languages have some mechanisms for generating random numbers. Unfortunately, that is not the case in CSS. This might not be a problem for most websites, but when dealing with a more generative approach (which CSS is really great for) we have to resort to JavaScript to generate random values. In his article, I will explore a nice way of generating it using only CSS. I will cover…

Counting in CSS: Unlock magic of CSS variables

CSS evolved like no other technology during its lifespan. The tool that started in 1994 as a simple way of styling basic documents on an early internet, became a language offering animations, matrix transformations, variables, several layouting systems, and much more. Because of the constant ecosystem changes, it is hard to keep up with all of them. Rather than announcing the next big CSS release…

Advanced TypeScript: Mapped Types and more

Advanced TypeScript Mapped Types and more TypeScript Mapped Types as const Using strongly typed language has a lot of benefits. But TypeScript is not a magical tool — the stronger types you provide, the better results you will get. Unfortunately, in a lot of the cases we can end up using very broad types to describe much narrower sets of values — it’s foremost apparent when using primitives like…

Better typings for strings and numbers in TypeString using opaque types

TypeScript is a great tool to ensure your code is correct and you are not passing incorrect data around. Unfortunately, there are still cases when we can’t guarantee that the types are correct — especially when dealing with primitives like strings or numbers. In almost every modern application we use strings to represent a bunch of different types of data: tokens, resource identifiers, names of…