do not use replaceAll in GitHub Actions...

This commit is contained in:
Wouter Groeneveld 2021-03-24 19:43:42 +01:00
parent 6ec9736568
commit eb61ddc04b
5 changed files with 42 additions and 12 deletions

View File

@ -6,11 +6,11 @@ categories:
- webdesign
---
Web 2.0 is a monstrosity that never should have been evolved the way it did. It is now officially impossible to develop a new web browser, and Google's most-used Chrome keeps on kicking people in the nuts by [removing privacy-focused extensions](https://www.bleepingcomputer.com/news/security/google-removes-privacy-focused-clearurls-chrome-extension/) from the Chrome Web Store - because it's "not in line with their business model". Did you know the W3C specification set is [114 million words long](https://drewdevault.com/2020/03/18/Reckless-limitless-scope.html)? That's simply insane.
Web 2.0 is a monstrosity that never should have been evolved the way it did. It is now officially impossible to develop a new web browser, and Google's [dangerously massively-used](https://gs.statcounter.com/browser-market-share) Chrome browser keeps on kicking people in the nuts by [removing privacy-focused extensions](https://www.bleepingcomputer.com/news/security/google-removes-privacy-focused-clearurls-chrome-extension/) from the Chrome Web Store - because it's "not in line with their business model". Did you know the W3C specification set is [114 million words long](https://drewdevault.com/2020/03/18/Reckless-limitless-scope.html)? That's simply insane.
Lately, I've been implementing the [Webmention](/post/2021/03/the-indieweb-mixed-bag/) and Pingback W3C protocols in [my jamstack-augmented microservice](https://github.com/wgroeneveld/serve-my-jams), and I've come to realize that, although Webmention is the post-modernistic hailed and IndieWeb-backed successor to Pingbacks, they technically both suffer form the same problems. I honestly do _not_ see any real difference between `POST`-ing an encoded form or an XML-formatted message. The specs are full of ambiguities that leave the door wide open to (1) interpretation and (2) a proliferation of wildly diverging implementations.
Don't get me wrong, I love JavaScript. I used to be that guy that constantly yells "check it out, `const()={wait...]`!" But the more I tried implementing something inherently _simple_, the more I realized how many different ways the same problem can be tackled in just one language. And then I used `.replaceAll()` in an older version of Node. Many programming languages evolve by borrowing ideas from each other, but really, why would JS need classes? [As Rob Pike argues](https://www.youtube.com/watch?v=rFejpH_tAHM&t=91s), keeping things simple in a language can be quite complex. I hope Go will keep it together.
Don't get me wrong, I love JavaScript. I used to be that guy that constantly yells "check it out, `const()={await...]`!" But the more I tried implementing something inherently _simple_, the more I realized how many different ways the same problem can be tackled in just one language. And then I used `.replaceAll()` in an older version of Node. Many programming languages evolve by borrowing ideas from each other, but really, why would JS need classes? [As Rob Pike argues](https://www.youtube.com/watch?v=rFejpH_tAHM&t=91s), keeping things simple in a language can be quite complex. I hope Go will keep it together.
First, there was CSS. Then CSS2. Then things got complicated, and people started using Bootstrap. Next, Font Awesome. Now, the consensus is to ditch that in favor for `<svg/>`. Then, flexbox. Material stuff. CSS3. Scratch that, use SASS instead! Hey, what's [Tailwind CSS](https://tailwindcss.com/)? The fact that these frameworks evolve more rapidly than I can think might be an indicator of something...[^old]

View File

@ -1,3 +1,3 @@
{
"since": "2021-03-20T12:21:05.401Z"
"since": "2021-03-24T18:30:23.720Z"
}

View File

@ -10,7 +10,7 @@
"url": "https://www.jvt.me/mf2/2021/03/1bkre/",
"source": "https://www.jvt.me/mf2/2021/03/1bkre/",
"target": "https://brainbaking.com/post/2021/03/the-indieweb-mixed-bag/",
"publishedFromNow": "5 days ago",
"publishedFromNow": "9 days ago",
"relativeTarget": "/post/2021/03/the-indieweb-mixed-bag/"
},
{
@ -25,7 +25,7 @@
"url": "https://brainbaking.com/notes/2021/03/13h09m58s25/",
"source": "https://brainbaking.com/notes/2021/03/13h09m58s25/",
"target": "https://brainbaking.com/post/2021/03/getting-rid-of-tracking-using-lineageos/",
"publishedFromNow": "7 days ago",
"publishedFromNow": "11 days ago",
"relativeTarget": "/post/2021/03/getting-rid-of-tracking-using-lineageos/"
},
{
@ -40,7 +40,7 @@
"url": "https://brainbaking.com/notes/2021/03/09h15m17s30/",
"source": "https://brainbaking.com/notes/2021/03/09h15m17s30/",
"target": "https://brainbaking.com/post/2021/03/the-indieweb-mixed-bag/",
"publishedFromNow": "11 days ago",
"publishedFromNow": "15 days ago",
"relativeTarget": "/post/2021/03/the-indieweb-mixed-bag/"
},
{
@ -55,7 +55,7 @@
"url": "https://brainbaking.com/notes/2021/03/03h16m00s44/",
"source": "https://brainbaking.com/notes/2021/03/03h16m00s44/",
"target": "https://brainbaking.com/notes/",
"publishedFromNow": "17 days ago",
"publishedFromNow": "21 days ago",
"relativeTarget": "/notes/"
},
{
@ -70,7 +70,7 @@
"url": "https://brainbaking.com/notes/2021/03/03h16m00s44/",
"source": "https://brainbaking.com/notes/2021/03/03h16m00s44/",
"target": "http://brainbaking.com",
"publishedFromNow": "17 days ago",
"publishedFromNow": "21 days ago",
"relativeTarget": ""
},
{
@ -85,7 +85,7 @@
"url": "https://brainbaking.com/notes/2021/03/02h17m13s27/",
"source": "https://brainbaking.com/notes/2021/03/02h17m13s27/",
"target": "https://brainbaking.com/post/2021/02/my-retro-desktop-setup/",
"publishedFromNow": "18 days ago",
"publishedFromNow": "22 days ago",
"relativeTarget": "/post/2021/02/my-retro-desktop-setup/"
},
{
@ -100,7 +100,37 @@
"url": "https://brainbaking.com/notes/2021/03/01h20m03s35/",
"source": "https://brainbaking.com/notes/2021/03/01h20m03s35/",
"target": "https://brainbaking.com/post/2021/03/getting-rid-of-tracking-using-lineageos/",
"publishedFromNow": "19 days ago",
"publishedFromNow": "23 days ago",
"relativeTarget": "/post/2021/03/getting-rid-of-tracking-using-lineageos/"
},
{
"author": {
"name": "Jefklak",
"picture": "https://jefklakscodex.com/img/avatar.jpg"
},
"name": "Rainbow Six 3: Raven Shield - 17 Years Later",
"content": "Its amazing that the second disk is still readable by my Retro WinXP machine. It has been heavily abused in 2003 and the years after that. Rainbow Six' third installment, Raven Shield (or simply RvS), is quite a departure from the crude looking Rogu...",
"published": "2020-11-01",
"type": "mention",
"url": "https://jefklakscodex.com/articles/retrospectives/raven-shield-17-years-later/",
"source": "https://jefklakscodex.com/articles/retrospectives/raven-shield-17-years-later/",
"target": "https://brainbaking.com/post/2020/10/building-a-core2duo-winxp-retro-pc/",
"publishedFromNow": "5 months ago",
"relativeTarget": "/post/2020/10/building-a-core2duo-winxp-retro-pc/"
},
{
"author": {
"name": "Jefklak",
"picture": "https://jefklakscodex.com/img/avatar.jpg"
},
"name": "Reviews from 2001 revived!",
"content": "Good news everyone! Futurama might not be back, but old PC gaming previews and reviews from UnionVault.NET, one of Jefklaks Codex ancestors, have been revived. I happened to stumble upon a few readable HTML files wile looking for something else and ...",
"published": "2020-09-25",
"type": "mention",
"url": "https://jefklakscodex.com/articles/features/reviews-from-2001-revived/",
"source": "https://jefklakscodex.com/articles/features/reviews-from-2001-revived/",
"target": "https://brainbaking.com/post/2020/09/reviving-a-80486/",
"publishedFromNow": "6 months ago",
"relativeTarget": "/post/2020/09/reviving-a-80486/"
}
]

View File

@ -17,7 +17,7 @@ const fsp = require('fs').promises;
// 2. update goodreads JS widget
console.log("2. Updating Goodreads Widget...")
const widget = await goodreads.createWidget("https://www.goodreads.com/review/grid_widget/5451893.Wouter's%20bookshelf:%20read?cover_size=medium&hide_link=&hide_title=&num_books=12&order=d&shelf=read&sort=date_added&widget_id=1496758344")
await fsp.writeFile(`${__dirname}/static/js/goodreads.js`, widget.replaceAll("src=", "loading=\"lazy\" src="), 'utf-8')
await fsp.writeFile(`${__dirname}/static/js/goodreads.js`, widget.replace(/src=/g, "loading='lazy' src="), 'utf-8')
// 3. build Lunr index
console.log("3. Building lunr search index...")

File diff suppressed because one or more lines are too long