#dev 2024-05-25

2024-05-25 UTC
geoffo joined the channel
#
cygnusx01
Possibly wrong place for this but I'm looking for a list of time zones that I could potentially put into the timezone: argument new Date().toLocalString. https://stackoverflow.com/questions/10087819/convert-date-to-another-timezone-in-javascript
#
cygnusx01
MDN docs keeps referencing a timezone value but doesn't say where the list/database is... https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString
#
cygnusx01
[edit] MDN docs keeps referencing a timezone value but doesn't say where the list/database is... https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString
#
aaronpk
i think this is the canonical https://www.iana.org/time-zones
#
aaronpk
if you want to see my horrible hack that works better than it should, check out https://github.com/aaronpk/p3k-timezone/blob/master/src/p3k/Timezone.php
#
cygnusx01
aaronpk: Is there a plain text version of this somewhere or HTML? Seems weird that they make people dig into the data file itself to get a simple string or UTC value? Would explain why there's so many people on Stack Overflow having trouble picking a timezone value
#
[snarfed]
this is the zoneinfo db on *nix OSes, right? usually in /usr/share/zoneinfo ?
geoffo joined the channel
#
cophee
[Paul_Robert_Ll]: Those were the only logs from Cloud Run logs :((
#
cophee
I tried enabling the debugger through their cloud client but they can't recognise the project id for some reason
#
cophee
Should I still make a ticket?
#
cophee
NVM! I figured it out
#
cophee
I had
#
cophee
`<link rel="authorization_endpoint" href="https://indieauth.com/auth">`
#
cophee
As my auth endpoint as well as indiekit
#
cophee
cloud run ux really sucks though
#
cophee
gonna try something else
barnaby, GuestZero, barnabywalters, gRegorLove_, amyiscoolz, [jeremycherfas], chimo, geoffo, [qubyte] and gRegor joined the channel
#
capjamesg[d]
harbinger_of_decay[d] I learned so much building a static site generator!
#
capjamesg[d]
Suppose you have two folders: `posts` and `templates`. My generator reads all the posts then saves them in memory in a Python program. Then, each template is read. Where there is logic like a list of posts, the list of posts that were read from `posts` are added to the template then saved to a new place: `site`. Then all the posts are saved in `site` too. Then that folder is made public.
#
capjamesg[d]
My generator has more than two folders, but it is basically that logic.
#
capjamesg[d]
I use a tool called `jinja2` to control some of the logic in `templates` so I can list posts, make things appear if I set a variable, etc.
#
harbinger_of_decay
Wow okay! Conceptually that's quite simple then (I can imagine that it is probably not in practice)
#
harbinger_of_decay
What format are your posts written in?
#
harbinger_of_decay
I did play around with Node.js generating a dynamic blog from markdown files, and recently been using Gatsby.js as generating web pages from markdown files is sort of a main feature.
#
IWDiscord
<h​arbinger_of_decay>
#
IWDiscord
<h​arbinger_of_decay>
#
IWDiscord
<h​arbinger_of_decay>
#
harbinger_of_decay
How are you implementing structured data or similar (if you're doing that)
#
capjamesg[d]
I use the same format as a lot of static site generators.
#
capjamesg[d]
Let me take a screenshot of a post.
#
capjamesg[d]
I use the same "front matter" as many other static site generators.
#
harbinger_of_decay
Ahh okay that's the same as my posts too! Cool!
#
harbinger_of_decay
Well that will probably be my next project!
#
IWDiscord
<h​arbinger_of_decay>
#
capjamesg[d]
Static site generators are fun to build!
#
capjamesg[d]
What is your domain name?
lagomorph_ joined the channel
#
harbinger_of_decay
I've got a few, paddy-mccabe.com, paddymccabe.com, millennium-webdesign.com. but there's nothing on them at present. I was never happy with the sites so I am rebuilding them.
#
harbinger_of_decay
Paddymccabe.com is going to be a more focussed webdev portfolio and I will build that in Laravel or Node (probably Laravel just to play around with PHP)
#
harbinger_of_decay
Millennium web design is just a freelancing site.
#
harbinger_of_decay
Paddy-mccabe.com will be a personal diary/blog. I'm working on that right now. That's being built in gatsby because I can't get the canvas aninations to work in laravel (but the other javascript works fine)
#
IWDiscord
<h​arbinger_of_decay>
#
IWDiscord
<h​arbinger_of_decay>
#
IWDiscord
<h​arbinger_of_decay>
#
IWDiscord
<h​arbinger_of_decay>
#
harbinger_of_decay
I've got a half finished spell generator for warhammer the old on a netlify subdomain and I am working on an army builder.
#
IWDiscord
<h​arbinger_of_decay>
#
harbinger_of_decay
But yeah there's not a lot left to show people these days
GuestZero and geoffo joined the channel
#
capjamesg[d]
Where do you all store images for your website?
barnaby joined the channel
#
harbinger_of_decay
In an assets folder in the source files
rrix and barnabywalters joined the channel
#
capjamesg[d]
reacted with 👍 to <harbinger_of_decay[d]> I've got a few, paddy-mccabe.com, …
#
harbinger_of_decay
reacted with 👍 to <harbinger_of_decay[d]> I've got a few, paddy-mccabe.com, …
#
[qubyte]
Yeah, same. And that’s three formats in 1x and 2x, so I’m thinking about this a lot too.
#
capjamesg[d]
I think I have shaved ~1 minute off my site build time today (all in GitHub Actions optimizations).
#
capjamesg[d]
Maybe not. Something is broken.
[tantek] joined the channel
#
[qubyte]
I use actions to do those image conversions and commit them, yup.
#
capjamesg[d]
I don't have image conversions, but I do have a 400 MB repository and it takes 15 seconds to be processed and another 45 to upload to my server. Every commit 😭
#
[qubyte]
That’s a big repo. Is it mostly media?
#
[qubyte]
hmm. Mine is 88MB. Creeping up. First build is ~1s and progressive rebuilds are in ms using my home-baked graph build system in Node. I wonder when I’ll start to hit memory or file descriptor issues.
#
capjamesg[d]
Yeah. It's mostly images and some short (<20s) mp4s/movs.
#
capjamesg[d]
Your graph build system is exactly what I need 😂
#
capjamesg[d]
My site build time is ~1m:06s for 4k pages.
#
capjamesg[d]
Is your code open source [qubyte]?
#
capjamesg[d]
I'm looking at your repo on GitHub. I tried to implement some of this but my current system is already complicated enough.
#
capjamesg[d]
I have lost a lot of the context I had with my generator, so I really need to read back up on it or start again.
#
[qubyte]
It’s complicated. It’s open to look at, and I think I’ve marked the code as open source, but the content is not (and it’s all in the same repo). You have my blessing to borrow what you see, if it’s useful to you.
#
[qubyte]
It’s due an overhaul though. I have some ideas…
#
capjamesg[d]
[qubyte] Were there any substantial reference materials you used in implementation?
#
capjamesg[d]
I need to revisit the concept before I implement.
#
capjamesg[d]
I understand I'd be building a dependency graph where every file has dependents and dependencies, then I'd need to traverse that graph so every dependency is met before a file is built?
#
[0x3b0b]
That reminds me, I should really upgrade Jinja2 past 3.1.2 even if I don't think the vulnerability should affect me
JadedBlueEyes joined the channel
#
capjamesg[d]
Upgrades are important!
#
[qubyte]
Nope, I totally winged it. The basic idea is that each node declares its dependencies, and you register all the nodes at the same time. As the inputs of a node become available, it gets computed. Should a node be invalidated (for example, a file changes), it’s subtree of dependants becomes invalid and computation starts again at the invalidated node. There are caveats though. For example, nodes can declare teardown (for example, clean up o
#
[qubyte]
files with cache-busting hashes in their names), and also the system doesn’t handle plural things / collections (think notes, replies, etc.) so those are implemented with their own special nodes.
#
[qubyte]
I’m in the middle or overhauling it completely so it doesn’t need a runner library (just the nodes themselves). Here’s the existing version though: https://github.com/qubyte/qubyte-codes/blob/main/lib/execution-graph.js
#
capjamesg[d]
Thank you for sharing!
[0x3b0b] joined the channel