PHPnews.io

Overview for 'remysharp'

When magenta isn't magenta [blog]

Written by Remy Sharp / Original link on Oct. 2, 2020

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 graphic imports into my ZX Spectrum Next. The or…


Package Diff [link]

Written by Remy Sharp / Original link on Sep. 30, 2020

Title is a bit misleading, but this tool gives a complete diff of the changes between versions.This is especially useful when you want to vet a potential upgrade to a core package in a project, to understand what and why.Or equally to look at a vulnerability fix to learn from the changes.Source: di…


Indexing Outbound Blog Links [link]

Written by Remy Sharp / Original link on Sep. 24, 2020

I really like this idea and more power to those of us who have full control of our online identities....an idea struck me: what if I could see all the outbound links on my blog?I'm using markdown-it (where as Jim Nielsen is using marked) so I can definitely hook into the parser to generate all my…


Smarter throwing [blog]

Written by Remy Sharp / Original link on Sep. 24, 2020

With async/await becoming standard procedure for a lot of my code, I find myself wrapping blocks of code in try/catch to ensure I'm handling errors properly.As a result of this, I also try to make my errors a little more useful at the same that I want to show you in this mini post.The exampleI have…


About the LoRes layer 1,0 [spectrum] [blog]

Written by Remy Sharp / Original link on Sep. 18, 2020

For the most part I use layer 2 (L2) for my projects on the Spectrum Next, so when I wanted to start incorporating layer 1 (L1) there were some surprises waiting for me.Context: Layer 2Layer 2 is 256x192 pixels with 256 colour support and 2 palettes (with an available colour palette of 512 colours)…


Fast mod [til/computing]

Written by Remy Sharp / Original link on Sep. 10, 2020

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 if (x % 8 === 0), so when x is 192, the result is…