hello.js

var please = require('share');
console.log('thank you');

NEW !!!

Monday, 23 November, 2020 UTC

Marbles2 - 23-Nov 2020 [devlog/marbles2]

For the last few weeks I've had a mostly working version of the game logic for Marbles2 on the Spectrum Next. One of goals I wanted in place was to be able to share high scores and to get remote high scores from an online service. There's a number problems ... more


Monday, 19 October, 2020 UTC

Keeping track of live code with Netlify [blog]

For a lot of my open source and side projects, I tend to release code as soon as I've finished a distinct chunk and in most cases, when the code is for a web site, I won't have any concept of managed versioning (though I do use semantic/conventional ... more


Wednesday, 14 October, 2020 UTC

Marbles2 - 14-Oct 2020 [devlog/marbles2]

Just starting out and really wanting to start something new whilst making a game that I would enjoy playing myself. I'm come to appreciate that I really like puzzles in games - whether it's spotting patterns or solving problems. So I'm beginning Marbles2 ... more


Friday, 2 October, 2020 UTC

When magenta isn't magenta [blog]

Posting this mostly to help some future developer if they run into this issue or even myself after falling down a rabbit hole only to come up empty. The short version: what are colours anyway 🤷‍♀ On the side I've been working on some tools to help with ... more


Thursday, 10 September, 2020 UTC

Fast mod [til/computing]

In my work and side projects I make use of bit manipulation and maths. One function I use a great deal is the modulo operator, in JavaScript it's % , so if I wanted to know if an X coordinate on an 8x8 tiled grid is in a movable position, I would use ... more


Wednesday, 26 August, 2020 UTC

Simple 8-bit Assembler Simulator in Javascript [link]

Really interesting assembly simulator, both from the simplicity of the UX (I believe it's based on the 6502) but also the source code is fairly easy to reason with. I also like the visualisation of registers and memory during each step - very useful ... more


Thursday, 23 July, 2020 UTC

Old (way) Octal [til/javascript]

JavaScript has lots of numerical type support, my usual default is decimal. Then with a lot of the byte mangling work I do, I use hex a lot, so things like 0x80 give me a little more information than just 128 because it tells me that the MSB is on when ... more


Thursday, 16 July, 2020 UTC

A px is not a px [blog]

Recently I was trying to extract some glyphs from some various fonts and in doing so I had a fundamental assumption challenged and dispelled. A px in terms of fonts, is not a pixel. Or certainly not in the way I was using them. For as long as I can remember ... more


Tuesday, 7 July, 2020 UTC

Type Safe JavaScript with JSDoc [link]

I'm not a TypeScript user (I've tried and run in to my own issues), yet I do see the value in Types in code. Certainly during development with introspect into the method I want to call which helps me make sure I'm using the arguments correctly. JSDoc, ... more


Tuesday, 7 July, 2020 UTC

Oh Mummy - 7-Jul 2020 [devlog/oh-mummy]

This most recent round of development has been dedicated to squashing out bugs and investing in performance optimisations. What's particularly fun about NextBASIC is that it's so close to the metal (as it were) - NextBASIC -> interpreter -> machine ... more


Wednesday, 17 June, 2020 UTC

How to pad a file with specific bytes [blog]

On my ever onward quest for new useless knowledge I wanted to know how to change a file's length and pad it with a specific byte value, on the command line. Funnily enough, I know how to do this with JavaScript in the browser pretty easily (for me), ... more


Thursday, 4 June, 2020 UTC

Safari 10 supports module, but not nomodule [til/javascript]

More and more of my own project uses <script type="module" src="app.js"> , and for good measure, I tend to use Parcel (or Rollup) to compile a nomodule bundle that ships alongside the "regular" code. Except, of course, ... more


Wednesday, 3 June, 2020 UTC

No undefsafe [til/javascript]

I wrote a small JavaScript library called undefsafe which I use in my work. I believe the _.get lodash package is very similar (though I added a few super powers to my own library). However, with frameworks like Next.js and Nuxt.js (and likely others), ... more


Tuesday, 26 May, 2020 UTC

Consolidating Content [blog]

I've been quietly expanding the type of content I've been storing under this URL, remysharp dot com, but somehow I decided not to surface it … until now 🎉 So, if you've subscribed to my blog via RSS you'll find there's suddenly appeared a number of ... more


Tuesday, 26 May, 2020 UTC

Doesn't cost to _try_ [til/spectrum]

In JavaScript there's an inherent cost to a try/catch it adds another stack scope (or some such), but apparently there's no cost in NextBASIC (or indeed Sinclair BASIC): Unlike some compiled stack-based languages, ON ERROR doesn’t make NextBASIC any ... more


Wednesday, 20 May, 2020 UTC

Picking dependencies

Every web developer has faced this conundrum: which dependency should I pick? Why did we select jQuery over Prototype, or Prototype over Mootools, or Vue over React, or Angular over Ember, or Lodash over underscore and so on a forever for unlimited combinations ... more


Monday, 18 May, 2020 UTC

The Deno Manual [link]

With the release of Deno 1.0 it's time to take a look at this familiar language but new runtime for JavaScript on the server. What I was particularly interested in is that style guide in the manual that puts forth some really nice and straight forward ... more


Wednesday, 13 May, 2020 UTC

Testing for NaN [til/javascript]

Eslint complains about use of isNaN (in certain configurations). The proposed answer is to use Number.isNaN but if you're testing specifically for NaN this is the method to use: Number.isNaN(Number(value)) // bad isNaN('1.2'); // false isNaN('1.2.3'); ... more


Saturday, 9 May, 2020 UTC

New bytes from TextEncoder [til/javascript]

I've been working a lot with binary data and doing conversion in JavaScript and recently converted a byte array from 8 bytes to suddenly 20 bytes. Surma and Jake were kind enough to deep dive it in their 203 podcast, but it boils down to this: [Remy] ... more


Wednesday, 29 April, 2020 UTC

We're not smarter than browsers

This morning during performing another search through npm for the package that matched my needs, I was feeling lazy and didn't want to type "npm i x" - thankfully npm provided a helpful "click to copy". And that's where it went wrong. ... more


Monday, 20 April, 2020 UTC

How I'm teaching the kids coding for the web

Early this year (pre country-wide lockdown), my son, 8¼, asked that I start doing "Coding Mondays" with him and his sister (then 5½). Though the littlest wasn't so interested in programming (though she had some fun with BASIC, as story for ... more


Tuesday, 24 March, 2020 UTC

The one where the country went into lock-down

Although I picked up the news when it was announced last night at 8:30pm it's just starting to sink in this morning. And I need a place to put some thoughts. I want my blog to be a mix of web, tech and personal posts, but I have a sneaking suspicion ... more


Friday, 6 March, 2020 UTC

Auto-growing inputs

I was tinkering with an electron app I wanted to make for screencasting and it needed some input elements that were positioned in a very tight spot. As powerful as HTML and CSS is, one weird thing about the input elements is that they don't (typically) ... more


Tuesday, 11 February, 2020 UTC

Words, n'stuff

My son once asked me: "who decided house was house?". Was it invented? Why start with a 'h'? What's with the sound? Who came up with that? As a kid I always wondered why the word "women" contained the word "men" and who ... more


Wednesday, 5 February, 2020 UTC

How to convert xlsb to csv

Converting from Excel formats to csv is something I've had to do many times in my career - usually to get the data into a database-import friendly format. The problem with xlsb is that it's a binary/zip format where support isn't great. JavaScript is ... more


Sunday, 29 December, 2019 UTC

Emulators written in JavaScript [link]

A massive list of every emulator you didn't know that someone went to pains to write in JavaScript…because we need everything eventually ported to JavaScript!!! Ranging from gameboy to spectrum to 6502 to Babbage's Difference Engine! Source: www.cambus.net ... more


Monday, 16 December, 2019 UTC

Web faux pas'mas

In using the web, and listening to "12 days of Christmas" my mince pie addled brain decided it would be neat to do a list of things that annoyed me that were clearly crappy in web products. Except I crapped out at 10… so, yeah, there's 10. ... more


Friday, 29 November, 2019 UTC

Cyber Weekend Learnings

I'm not good a prompting my own stuff usually (I think ) but I think it should make a lot of sense to promote my own hard work on my own blog. It's the infamous black friday and "cyber monday" (the one where the shops try to stretch out the ... more


Friday, 29 November, 2019 UTC

Cyber Weekend Learnings

I'm not good a prompting my own stuff usually (I think ) but I think it should make a lot of sense to promote my own hard work on my own blog. It's the infamous black friday and "cyber monday" (the one where the shops try to stretch out the ... more


Thursday, 21 November, 2019 UTC

10 years ago: CSS Compression

What follows is a blog post that I had partially written over 10 years ago. In fact, I started writing it on an afternoon on 31st Jan 2009. I can't recall exactly what prompted the thoughts that are outlined in this post but I do know that there was ... more