archive
croner cron ocps scheduling javascript rust python dotnet cpp programming claude ai linux server sysadmin murmo csharp rootcard security encryption messaging bots cryptalk federation passwords identity authentication xigna post-quantum typescript cross-runtime nodejs deno bun packagemanagers jsr npm node css lumocs css-tricks html5 documentation lume markdown docker deploy pup hardening ssh firewall guide vanilla-js efficiency coding-paradigms developer-tips guide-to-ssh performance benchmark tetris denokv html websockets nginx library commonjs esm modules import time-zones conversion tz open-source blogging guest-blogging github community yaml tasks
One cron pattern, five languages: Croner and OCPS
by Hexagon,
Croner started as a small cron library for JavaScript. It then got a Rust version, and recently Python and .NET versions. Now there is a fifth one, for C++. Five libraries that should answer the same question in the same way: when does 0 0 L * FRI run next? That turned out to be the easy part. The hard part was deciding what the right answer is.
Talking to my servers, and letting them take notes
by Hexagon,
I have a couple of servers that I care about. Each was set up by me, at some point, in a hurry, and each has its own little surprises. These days I mostly just talk to them. Claude runs on each of them, and writes down what it learns, so it knows a bit more the next time.
Croner for Python and .NET: Stable releases
by Hexagon,
Croner started as a cron library for JavaScript, and later got a Rust version. It is now also available for Python and .NET, and both have reached their first stable releases.
Murmo bots: Letting Claude tap me on the shoulder
by Hexagon,
A few days ago I wrote about Murmo, the end-to-end encrypted messenger built on rootcard. Since then it has learned a new trick: bots. Any program can now write with Murmo users over plain HTTPS. And the first program I wanted to hook up was Claude, so it can tell me when it is done instead of me checking every five minutes.
Murmo: A secure messenger that is still just a messenger
by Hexagon,
So, there I was, with an identity system that I had just built for a space game. A login where the password never leaves the browser, and an account that belongs to the user instead of the server. I kept thinking that it would fit something else even better: a messenger. I had played with that idea once before, just for fun, a long time ago. This time I wanted to do it properly, and the result is Murmo.
rootcard: A new take on the password login, and an ID card for the web
by Hexagon,
So, there I was, with a game server where anyone could log in with just a name. The game is Xigna, a space MMO I'm building, and it needed real accounts. That should be easy. Hash the password, store the hash, add a reset by e-mail, done. But the more I looked at it, the less I liked it. A couple of weeks later I had built rootcard instead.
Cross-Runtime JavaScript: Navigating Runtime Differences
by Hexagon,
Discover strategies for handling runtime differences and ensuring smooth cross-platform execution of your JavaScript code.
Cross-Runtime JavaScript: Streamlining Your Project Setup
by Hexagon,
Embrace the 'less-is-more' philosophy for cross-runtime JavaScript development. Discover how Deno's and Bun's built-in features reduces complexity and enhances your workflow.
Cross-Runtime JavaScript: Introduction
by Hexagon,
Kickstart your cross-runtime JavaScript journey! Learn the basics and why building code for all runtimes (Node.js, Deno, and Bun) matters.
Two weeks with jsr.io: Do we need a new package registry?
by Hexagon,
A while ago, I wrote a post called How to Create a Dual-Mode Cross-Runtime JavaScript Package: How to Create a Dual-Mode Cross-Runtime JavaScript Package, and while possible - it sure isn't simple. There has to be a better way, and the creators behind jsr.io seem to agree.
A detour to Rust: Creating a Rust flavor of Croner
by Hexagon,
So, there I was, diving into Deno's new feature, Deno.cron, when something caught my eye. It was missing a few things – support for time zones, second granularity, and some extended cron-syntax I like. It got me thinking: could I fill these gaps? Despite not having dabbled in Rust before, I had a fair bit of fun creating the croner library for JavaScript and TypeScript, so why not give it a shot in Rust?
Creating a Dynamic CSS Color Palette for both Light and Dark Modes
by Hexagon,
Today, I have an exciting CSS trick to share. When working on Lumocs, I wanted users to be able to set a color of their choice and have the page automatically adapt to that color. I had the idea of using CSS variables to achieve this. Lumocs supports both light and dark modes, so this had to be automatic as well. After some tinkering, I discovered a technique that enables you to generate a full color palette using any hue for both light and dark modes using only CSS.
Introducing Lumocs: A Modern Documentation Engine based on Deno and Lume
by Hexagon,
Meet Lumocs, a documentation generator powered by JavaScript through Deno and Lume. This guide will walk you through the essential steps to set it up, create your first documentation page, and deploy your site.
If you want a quick showcase, check out the Lumocs Documentation, which is generated by Lumocs itself.
Autostarting And Monitoring Deno Applications And Services
by Hexagon,
Planning to host your Deno service or server on your own but unsure about how to launch it at system boot and ensure its uptime? This guide is here to help. Dive into Docker and Pup as robust options for managing Deno apps at system boot, guaranteeing their continuous operation, resilience, and monitoring.
Harden Your Linux Server Using These Foundational Measures
by Hexagon,
With the constant rise of online threats, it becomes more crucial to ensure that your server is secure. Review these basic measures, and make your server safer. The steps in this guide are primarily geared towards Ubuntu and Debian, but the fundamental principles are the same.
Unshackling JavaScript: Vanilla JS Over Shims
by Hexagon,
Vanilla JavaScript, in its pure and authentic form, enables developers to utilize the language's native capabilities, freeing them from the confines and redundancies of libraries like jQuery and Lodash. This article reveals the elegance of such native alternatives and advocates for purity in coding practices.
Advanced SSH Key Management - SSH CA
by Hexagon, , Updated:
Venture into advanced SSH key management concepts such as SSH Certificate Authority (CA) and learn how to set up and manage it manually.
Distributing and Using SSH Keys
by Hexagon, , Updated:
Explore the various methods for distributing and utilizing SSH keys, ensuring secure and seamless access to remote servers and GitHub.
Introduction to SSH Key Management
by Hexagon, , Updated:
SSH keys are cryptographic keys that enable user authentication to servers, providing a secure alternative to traditional passwords. They not only increase security but also greatly simplify daily tasks for developers.
Creating and Managing SSH Keys
by Hexagon, , Updated:
Delve deeper into the creation and management of SSH keys, learning about passphrase protection and the differences between public and private keys.
Getting Started with Bun: A Blazing Fast Runtime for JavaScript
by Hexagon,
In the ever-evolving world of JavaScript runtimes, Bun is emerging as a promising star. It might not have the maturity of Deno or Node.js, but it compensates with promising great performance. Let's explore Bun in detail.
Deno vs. Bun vs. Node.js: A Speed Comparison
by Hexagon,
Following our recent deep dive into the feature sets of JavaScript runtimes, I decided to put them to the test in terms of raw performance. I created a new benchmarking tool called jsrbench to provide a clearer picture of the performance of Deno, Bun, and Node.js under equivalent conditions. I also use another of my tools called primer to compare performance of prime number calculation using different approaches.
Deno vs. Bun vs. Node.js: A Feature Comparison
by Hexagon, , Updated:
Choosing a JavaScript runtime for your project? Then you've probably heard of Deno, Bun, and Node.js. They are all good, but each has its own set of features and trade-offs. This guide will break them down by features, ease of use, security, and other considerations.
Implementing Single-Player Mode: Server-Side Calculations
by Hexagon,
Now that we've got our frontend ready, it's time to dive into the game mechanics. In this article, we'll focus on implementing the main loop and single-player mode. We'll walk you through the server-side calculations that make the game tick. You'll learn how the game board updates, how rows are cleared, and how the game state evolves. By the end of this article, you'll have a functional single-player mode and a deeper understanding of the server-side logic that powers it. Let's get those blocks falling!
Event Loop and Concurrency Model in JavaScript
by Hexagon,
In this article, we delve into the Event Loop and Concurrency Model in JavaScript, revealing how they enable non-blocking asynchronous behavior.
Design Patterns in JavaScript
by Hexagon,
In this article, we'll explore common design patterns in JavaScript and how they can help you write clean, maintainable, and efficient code.
Getting Started with Deno: A Secure Runtime for JavaScript and TypeScript
by Hexagon, , Updated:
If you're into JavaScript or TypeScript, you've probably heard about Deno. It's an exciting new runtime that's often described as a more secure and simpler alternative to Node.js. In this blog post, we'll go over what makes Deno awesome and how to get started.
Introduction to Detris: Web-Based Tetris Using Deno
by Hexagon,
Welcome to the first part of our journey in building Detris, a web-based Tetris game using Deno. In this article, we'll introduce you to the classic game of Tetris and explain why I chose Deno as our runtime. We'll also give you a sneak peek into the special features of Detris, like single-player mode, multiplayer functionality, and even AI opponents. Get ready to dive deep into the world of Tetris, powered by modern web technologies!
Adding Multiplayer: Server Logic
by Hexagon,
Welcome to part five of our Detris series. In this article, we dive into multiplayer action, where we deal with multiple players, and real-time updates. Buckle up!
Creating AI Opponents: Dive into the Code
by Hexagon,
Welcome back to part six of our Detris series! After getting our hands dirty with multiplayer, let's tackle another cool feature: AI opponents. This article will walk you through the TypeScript code behind our Tetris AI. We'll look at how the AI decides to move and rotate blocks, and how to plug this AI into your game. Let's dive in!
Conclusion and Future Enhancements
by Hexagon,
Welcome to the grand finale of our Detris series, where we've been guiding you through the creation of a full-featured Tetris game using Deno.
Setting Up the Project: Main files and Dependencies
by Hexagon,
Welcome to the second part of our series on building Detris, a web-based Tetris game using Deno. In this article, we'll take you through the initial steps of setting up your project environment. We'll cover the importance of the deps.ts and main.ts files, setting the foundation for the game development that lies ahead. By the end of this article, you'll have a base for the project and be ready to dive into the exciting world of frontend development!
Building the Frontend: HTML, CSS, and Basic JS
by Hexagon,
Welcome to the third installment of our Detris series, where we're building a web-based Tetris game using Deno. Having set up our project and understood its core files, it's time to turn our attention to the frontend. In this article, we'll explore the assets folder to understand how our game will look and feel. We'll delve into the index.html file and the accompanying CSS to give our game its visual appeal. Furthermore, we'll discuss how the frontend and backend communicate to create a seamless gaming experience. By the end of this article, you'll have a good grasp of frontend development and be well on your way to creating an engaging user interface for your Tetris game.
Show All Visitor's Pointers on a Webpage
by Hexagon,
In this step-by-step guide, you'll learn how to create a simple but cool webpage that shows mouse pointers of all its visitors. From setting up a Deno server to optional perks like keeping your app alive with Pup and serving it securely through Nginx.
Error Handling and Debugging in JavaScript
by Hexagon,
In this article, we delve into the essential aspects of error handling and debugging in JavaScript. Learn about different types of errors, advanced debugging techniques, and various error-handling mechanisms to develop robust and maintainable JavaScript applications.
Closures and Scopes in JavaScript
by Hexagon,
In this article, we explore the important concepts of closures and scopes in JavaScript. Understand how scope works, what closures are, and how to use these features to write cleaner, more maintainable code.
Prototypes and Inheritance in JavaScript
by Hexagon,
In this article, we'll delve into prototypes and inheritance in JavaScript, explaining how they provide a powerful way to create and manage objects. We'll also compare them with other forms of inheritance, particularly the class-based approach seen in languages like Java and C++.
Building a Default Settings System Using the Spread Operator
by Hexagon,
Today, We'll have a look at how the spread operator works by building a small system for managing default settings and overrides.
Working with Arrays in JavaScript
by Hexagon,
In this section, we will explore arrays in JavaScript. You'll learn how to create arrays, access their elements, manipulate array data, and work with common array methods like push, pop, shift, and unshift. Understanding arrays is crucial as they are used extensively in JavaScript for storing and managing collections of data.
How to Create a Dual-Mode Cross-Runtime JavaScript Package
by Hexagon,
This article will guide you through publishing dual-mode, cross-runtime JavaScript packages. Learn to create libraries compatible with both ESM and CommonJS, as well as different runtimes like Node.js, Deno, and browsers.
Asynchronous code with JavaScript
by Hexagon,
In this lesson, we will explore asynchronous code in JavaScript, learn what promises is, and how they relate to async/await.
Introducing Minitz - Time zone conversion in JavaScript
by Hexagon,
Minitz is a minimal utility that allows you to convert to or from any timezone. It is compatible with Deno, Node, and browsers, and is less than 2KB when minified. The library is MIT-licensed, which means you can use it any way you want.
Strings and Numbers in JavaScript
by Hexagon,
In this post, we will explore two of the most common data types in JavaScript: strings and numbers. Strings are used to store text, while numbers are used to store numerical values. We will also learn how to manipulate strings and numbers using various methods and operators, how to avoid overflows using BigInts, and how to represent binary and hexadecimal numbers.
Guest Blogging using static site generators
by Hexagon,
If you're into tech, coding, or writing, you probably enjoy sharing your thoughts and ideas. Guest blogging is a fantastic way to reach a broader audience. In this post, I'll go through the benefits of guest blogging and why static site generators like Lume can make your life easier.
Working with Objects in JavaScript
by Hexagon,
After mastering control structures and arrays, the next step is to understand another cornerstone of JavaScript: objects. Objects are essential for bundling related data and functions together, which makes your code more organized and manageable. This extended article will explore objects in more depth, covering not just the basics but also advanced concepts like JSON, object constructors, prototypes, inheritance, and ES6 features for objects.
The Evolution of JavaScript and Why It Matters
by Hexagon,
Understanding the past and how we got here can give us good hints about where we're going. Let's dig into JavaScript's history and how it's grown over time. Knowing this stuff will help us when we move on to more complicated topics like Promises, template literals, async/await, and the latest JavaScript features.
Using Lume: A Static Site Generator for Deno
by Hexagon,
If you're like me, you probably appreciate the simplicity of using a static site generator for your blog or website. Today, I want to share the beauty of Lume, a static site generator built for Deno.
Control Structures in JavaScript
by Hexagon,
Control structures in JavaScript dictate how your code runs. They decide the flow of operations based on conditions and can repeat sections of code multiple times. Let's get a better understanding of these structures and their uses.
Functions and type guards in JavaScript
by Hexagon,
Now that we've covered control structures, let's step into another cornerstone of JavaScript: functions. Functions allow us to bundle code into reusable pieces. We will also cover type guards. Functions help reduce repetition and makes our code neater.
Scheduling Tasks in JavaScript or TypeScript with Croner
by Hexagon, , Updated:
Managing time-based tasks in JavaScript has never been easier with Croner, a powerful tool designed to trigger functions or evaluate cron expressions on various platforms. Whether you're working in Node.js, Deno, Bun, or even directly within a browser, Croner has you covered. In this article, I'll give you a brief introduction on how to use Croner.
Fundamental Concepts of JavaScript
by Hexagon,
In this section we'll cover the key elements that are essential to working with JavaScript. We'll touch on variables, debugging methods, and core principles. Let's dive in!
The Guide to JavaScript - Introduction
by Hexagon, , Updated:
The aim of this series is to give a thorough understanding of vanilla JavaScript and its many features. We won't be using any external libraries, and all the code will be cross-runtime. It'll work seamlessly whether you're in a browser or using runtimes like Deno, Bun or Node.js.