Archive
javascript typescript cross-runtime nodejs deno bun packagemanagers jsr npm node programming rust croner cron scheduling css lumocs css-tricks html5 documentation lume markdown docker deploy pup linux security server hardening ssh firewall guide vanilla-js efficiency coding-paradigms developer-tips guide-to-ssh performance benchmark tetris html websockets nginx denokv library commonjs esm modules import time-zones conversion tz yaml open-source blogging guest-blogging github community tasks
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: Navigating Runtime Differences
by Hexagon,
Discover strategies for handling runtime differences and ensuring smooth cross-platform execution of your JavaScript code.
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.
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!
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.
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!
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!
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!
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.
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++.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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!
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.
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.