Hello, I'm Hexagon

I've been into JavaScript since 1996, having created libraries like Croner, a cross-runtime cron scheduler, and Pup, a process manager similar to pm2 for Deno. My blog covers everything from JavaScript and TypeScript to modern runtimes like Deno. I'm all about Open Source, portable code and minimal bloat.

For a solid foundation in pure JavaScript, check out my article series The guide to JavaScript.

This blog is built using Deno and Lume, and the source code is available at github.com/hexagon/blog.



Recent posts

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.

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.

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.

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.

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.

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!

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.

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.

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.

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.

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!