Compare commits

..

7 Commits

Author SHA1 Message Date
4f25a3bc3d
Fix type and other minor issues 2024-10-10 02:50:21 -04:00
41d67d7a98
Update metadata 2024-10-10 02:04:28 -04:00
7500465542
Add last updated to note pages 2024-10-10 01:58:33 -04:00
c2e1817567
Re-add GitHub-flavored MD 2024-10-10 01:08:53 -04:00
6198ca2a35
Update prgm-resources with new stuff 2024-10-10 01:05:27 -04:00
a0a926d346
Update steam tool info 2024-10-10 00:56:24 -04:00
f9021b7712
Add new links, fix title-gen edge case 2024-10-10 00:51:55 -04:00
15 changed files with 148 additions and 76 deletions

View File

@ -4,7 +4,6 @@ import Pages from '../public/external.json';
function QuickLinks() {
return (
<div className='block'>
<h2>Quick Links</h2>
{
Object.entries(Pages).map(([title, link], i) => {
const extern = link.match(/^http/) && `blue extern` || '';

View File

@ -30,6 +30,8 @@ function Title() {
if (pagePath !== '/') {
const subPaths = pagePath.split('?')[0].split('#')[0].split('/');
for (const p of subPaths.slice(1, subPaths.length)) {
if (!p)
continue;
splitPath.push({ name: currRoot[p].title, path: p });
if (currRoot === undefined

View File

@ -14,22 +14,43 @@ const months = [
'December'
];
function get12HourTime(pdate: Date | string): string {
const date = (typeof pdate === 'string') ? new Date(pdate) : pdate;
let hours = date.getHours();
const minutes = date.getMinutes();
let meridiem = 'A.M.';
let strhours = ''
if (hours > 12) {
hours -= 12;
meridiem = 'P.M.';
}
if (hours === 0)
hours = 12;
return `${hours}:${minutes < 10 ? '0' : ''}${minutes} ${meridiem}`;
}
function toHumanReadableDate(date: Date | string, disable?: { year?: boolean, month?: boolean, day?: boolean }) {
const oDate = (typeof date === 'string') ? new Date(date) : date;
const year = oDate.getFullYear();
const month = months[oDate.getMonth()];
const day = oDate.getDate();
let out = !disable?.day ? `${day}${getOrdinalDaySuffix(day)}` : '';
out = !disable?.month ? `${out} ${month}` : out;
out = !disable?.year ? `${out} ${year}` : out;
const suffix = getOrdinalDaySuffix(day)
let out = '';
out = !disable?.month ? `${month}` : '';
out = !disable?.day ? `${out} ${day}${suffix}` : out;
out = !disable?.year ? `${out}, ${year}` : out;
return out;
}
export function getOrdinalDaySuffix(day: number) {
export function getOrdinalDaySuffix(day: number): string {
switch (day) {
case 1:
case 21:
@ -46,6 +67,11 @@ export function getOrdinalDaySuffix(day: number) {
}
}
export function toLocaleString(pdate: Date | string): string {
const date = (typeof pdate === 'string') ? new Date(pdate) : pdate;
return `${toHumanReadableDate(date)} at ${get12HourTime(date)}`;
}
export function toRelativeDate(date: Date | string): string {
const oDate = (typeof date === 'string') ? new Date(date) : date;
@ -100,6 +126,7 @@ const DateTool = {
getFullMonth,
isValid,
getOrdinalDaySuffix,
toLocaleString,
};
export default DateTool;

View File

@ -8,7 +8,6 @@ const config = {
{
test: /\.ya?ml$/,
use: 'js-yaml-loader',
},
{
test: /\.svg$/,

View File

@ -3,50 +3,61 @@
A handy list of blog posts, articles, videos, and books that I would probably
refer to someone or within something.
- Untangling Lifetimes: The Arena Allocator
## Memory Allocation Strategies
Making performant dynamic manual memory management in C feel almost like
garbage collection.
- https://www.gingerbill.org/series/memory-allocation-strategies/
https://www.rfleury.com/p/untangling-lifetimes-the-arena-allocator
## Untangling Lifetimes: The Arena Allocator
- Ryan Fleury's UI Series
Making performant dynamic manual memory management in C feel almost like
garbage collection.
Semi-paywalled
- https://www.rfleury.com/p/untangling-lifetimes-the-arena-allocator
https://www.rfleury.com/p/ui-series-table-of-contents
## Immediate-Mode Graphical User Interfaces (2005)
- Immediate-Mode Graphical User Interfaces (2005)
- https://caseymuratori.com/blog_0001
https://caseymuratori.com/blog_0001
- https://www.youtube.com/watch?v=Z1qyvQsjK5Y
https://www.youtube.com/watch?v=Z1qyvQsjK5Y
## What Color is Your Function?
- What Color is Your Function?
- https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function/
https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function/
## Real-time audio programming 101: time waits for nothing
- Real-time audio programming 101: time waits for nothing
- http://www.rossbencina.com/code/real-time-audio-programming-101-time-waits-for-nothing
http://www.rossbencina.com/code/real-time-audio-programming-101-time-waits-for-nothing
## Triangulation
- Triangulation
- https://www.humus.name/index.php?ID=228
https://www.humus.name/index.php?ID=228
## Quantifying the Performance of Garbage Collection vs. Explicit Memory Management
- Quantifying the Performance of Garbage Collection vs. Explicit Memory
Management
- https://people.cs.umass.edu/~emery/pubs/gcvsmalloc.pdf
https://people.cs.umass.edu/~emery/pubs/gcvsmalloc.pdf
## Typing is Hard
- Typing is Hard
- https://3fx.ch/typing-is-hard.html
https://3fx.ch/typing-is-hard.html
## The Aggregate Magic Algorithms
- The Aggregate Magic Algorithms
- http://aggregate.org/MAGIC/
http://aggregate.org/MAGIC/
## Ryan Fleury's UI Series
- Memory Allocation Strategies
Semi-paywalled
https://www.gingerbill.org/series/memory-allocation-strategies/
- https://www.rfleury.com/p/ui-series-table-of-contents
## You Could Have Invented Monads! (And Maybe You Already Have.)
- http://blog.sigfpe.com/2006/08/you-could-have-invented-monads-and.html
## Fix Your Timestep!
- https://gafferongames.com/post/fix_your_timestep/
## UTF-8 Everywhere
- http://utf8everywhere.org

View File

@ -45,7 +45,7 @@ MimeType=text/plain; # $XDG_PATH contains the paths used to fetch icons, extensi
menu.
- Sample code for the electron app (assuming you can build linux binaries
for the target platform):
```javascript
```javascript
// sample code to get started
const { app, BrowserWindow } = require('electron');
app

View File

@ -39,6 +39,10 @@ values.
- [SteamDB](https://steamdb.info/)
- tracks depot changes, price history, everything steam
- [gg.deals](https://gg.deals)
- tracks game deals for steam, steam key stores and other platforms
- [IsThereAnyDeal](https://isthereanydeal.com)
- similar to gg.deals except it does not support key seller tracking
- [SteamGifts](https://steamgifts.com/)
- giveaway Steam keys or take part in giveaways
- [SteamTradeMatcher](https://steamtradematcher.com/)
@ -46,11 +50,5 @@ values.
- [ArchiSteamFarm](https://asf.justarchi.net)
- useful bot written in C# to farm trading cards for owned games that can be
sold
- [IsThereAnyDeal](https://isthereanydeal.com)
- tracks game deals for steam, steam key stores and other platforms
- somewhat broken although it is being migrated and modernized, see [New
ITAD](https://new.isthereanydeal.com)
- [gg.deals](https://gg.deals)
- newer than and similar to IsThereAnyDeal with modern UI
- [SteamGridDB](https://steamgriddb.com/)
- custom video game assets for games available and not available on steam

View File

@ -9,15 +9,17 @@ function AboutPage() {
<Layout >
<section className='block'>
<p>Paul&apos;s Personal Website. I go by <a href='https://github.com/LambdaPaul'>@LambdaPaul</a> on GitHub and <a href='https://x.com/lambda_paul'>@lambda_paul</a> on X/Twitter.</p>
<p>Why did I create this?
<p>I also have a Gitea server at <a href='https://git.paulw.xyz'>git.paulw.xyz</a> and a Pleroma (ActivityPub/Mastodon-compatible) server at <a href='https://social.paulw.xyz'>social.paulw.xyz</a> as back-ups for my GitHub and X/Twitter.</p>
<p>Why did I create this? Why do I have the back-ups?</p>
<p>
The original motivation was to just play with Next.js as it pretty much did the things I wanted web pages to do. But it came at the cost of needless complexity. As I use the JavaScript/ECMAScript/Whatever-you-want-to-call-it-script more and more, I am convinced that it is not a platform worth pursuing because the more complex it gets, the less control I have over what it does and this platform and its users seems to be okay with that sort of loss. I have been instead pivoting toward things that impressed and got me interested in working with computers.</p>
<p>Most services/products are keen on going against what Steph Ango calls <a href='https://stephango.com/file-over-app'>File over app</a>, a philosophy in which you prioritize data over software, and anticipate and embrace the eventual death of software. People instead want subscription services that barely support open formats and sometimes do not support exporting data to commonly used formats. The goal here is to avoid storing artifacts under locations that are easily not accessible, not under my control, and does not lock me out of using it with other software. The only reason I have not completely abandoned this is thanks to my decision to rely on Markdown files alone. Had it been reliant on any cloud software, I would have started over.</p>
<p>Got any questions, concerns, or issues? Contact me via email: <code>lambdapaul [at] pm [dot] me</code>.</p>
<p>Got any questions, concerns, or issues? Contact me via email: <code>contact [at] paulw [dot] xyz</code>.</p>
</section>
<hr />
<section className='block'>
<p>Source for this site is available on GitHub: <a href='https://github.com/LambdaPaul/www'>https://github.com/LambdaPaul/www</a></p>
<p>Source for this site is available on GitHub: <a href='https://github.com/LambdaPaul/www'>github.com/LambdaPaul/www</a> and <a href='https://git.paulw.xyz/LambdaPaul/www'>git.paulw.xyz/LambdaPaul/www</a></p>
<p>Relevant information regarding the source is available on the repo and is also provided below.</p>
</section>
<section className='block'>

View File

@ -7,12 +7,12 @@ import RecentPosts from '../components/recent-posts';
import RootInfo from '../public/home.json';
function Nav() {
const nav = RootInfo;
const nav = Object.entries(RootInfo);
return (
<div className='block'>
<h2>Navigation</h2>
{
Object.entries(nav).map(([slug, info], i) => {
nav.map(([slug, info], i) => {
return <Link key={i} href={slug} className='button green'>{info.title}</Link>
})
}

View File

@ -8,11 +8,15 @@ import remarkGithubAdmonitionsToDirectives from 'remark-github-admonitions-to-di
import Layout from '../../components/layout';
import readMarkdown from '../../lib/read-markdown';
import { toLocaleString } from '../../lib/date';
import NotesInfo from '../../public/notes.json';
import style from '../../styles/note.module.css';
interface Note {
title: string,
mtime: string,
content?: string,
}
interface Notes {
@ -21,7 +25,7 @@ interface Notes {
function Markdown({ content }: any) {
return <ReactMarkdown
remarkPlugins={[remarkGithubAdmonitionsToDirectives, remarkDirective]}
remarkPlugins={[remarkGithubAdmonitionsToDirectives, remarkDirective, remarkGfm]}
rehypePlugins={[rehypeRaw]}
components={{
code({ node, className, children, ...props }) {
@ -47,9 +51,12 @@ function Markdown({ content }: any) {
>{content}</ReactMarkdown>
}
function Note({ note }: any) {
function Note({ note }: { note: Note } ) {
return (<>
<Layout >
<span className={style['last-updated']}>
Last updated: {toLocaleString(note.mtime)}
</span>
<section className='block'>
<Markdown content={note.content} />
</section>
@ -58,7 +65,7 @@ function Note({ note }: any) {
);
}
export async function getStaticProps({ params }: any) {
export async function getStaticProps({ params }: { params: { note: string } }) {
const note: string = params.note;
const notesInfo: Notes = NotesInfo;
const noteInfo: Note = notesInfo[note];

View File

@ -10,13 +10,27 @@ function traverseMap(head: Site, cwd = '', depth = 0) {
for (const [slug, info] of Object.entries(head.subpages)) {
if (slug === 'sitemap')
continue;
const path = `${cwd}/${slug}`;
const children = (<><dl style={{marginLeft: '3rem'}}> {traverseMap(info, path, depth + 1)}</dl></>);
elements.push(<>
if (slug.startsWith('http://')) {
elements.push(<>
<dt>{info.title}</dt>
<dd><Link href={path}>paulw.xyz{path}</Link></dd>
{children}
</>);
<dd><Link href={slug}>{slug.substring(7)}</Link></dd>
</>);
}
else if (slug.startsWith('https://')) {
elements.push(<>
<dt>{info.title}</dt>
<dd><Link href={slug}>{slug.substring(8)}</Link></dd>
</>);
}
else {
const path = `${cwd}/${slug}`;
const children = (<><dl style={{marginLeft: '3rem'}}> {traverseMap(info, path, depth + 1)}</dl></>);
elements.push(<>
<dt>{info.title}</dt>
<dd><Link href={path}>paulw.xyz{path}</Link></dd>
{children}
</>);
}
}
return elements;
}

View File

@ -10,5 +10,11 @@
},
"sitemap": {
"title": "Site Map"
},
"https://git.paulw.xyz": {
"title": "Git.PaulW.XYZ"
},
"https://social.paulw.xyz": {
"title": "Social.PaulW.XYZ"
}
}

View File

@ -1 +1 @@
{"mos-6502":{"title":"MOS 6502 Microprocessor","mtime":"2023-10-29T18:05:52.439Z"},"zilog-z80":{"title":"Zilog Z80 Microprocessor","mtime":"2023-10-29T18:07:08.579Z"},"steam":{"title":"Steam Client","mtime":"2024-02-13T22:34:17.609Z"},"steam-deck":{"title":"Steam Deck","mtime":"2024-02-13T22:53:51.919Z"},"programming-resources":{"title":"Programming Resources","mtime":"2024-04-20T19:59:46.944Z"},"os":{"title":"Operating Systems","mtime":"2024-05-10T16:07:32.581Z"},"lua":{"title":"Lua Programming Language","mtime":"2024-09-13T08:45:18.515Z"},"browsers":{"title":"Web Browsers","mtime":"2024-09-13T08:47:57.942Z"}}
{"mos-6502":{"title":"MOS 6502 Microprocessor","mtime":"2023-10-29T18:05:52.439Z"},"browsers":{"title":"Web Browsers","mtime":"2024-09-13T08:47:57.942Z"},"zilog-z80":{"title":"Zilog Z80 Microprocessor","mtime":"2023-10-29T18:07:08.579Z"},"steam":{"title":"Steam Client","mtime":"2024-10-10T04:56:04.393Z"},"programming-resources":{"title":"Programming Resources","mtime":"2024-10-10T05:04:27.709Z"},"steam-deck":{"title":"Steam Deck","mtime":"2024-10-10T05:19:16.140Z"},"lua":{"title":"Lua Programming Language","mtime":"2024-09-13T08:45:18.515Z"},"os":{"title":"Operating Systems","mtime":"2024-05-10T16:07:32.581Z"}}

View File

@ -1 +1 @@
{"title":"PaulW.XYZ","subpages":{"posts":{"title":"Posts","subpages":{}},"notes":{"title":"Notes","subpages":{"mos-6502":{"title":"MOS 6502 Microprocessor","mtime":"2023-10-29T18:05:52.439Z"},"zilog-z80":{"title":"Zilog Z80 Microprocessor","mtime":"2023-10-29T18:07:08.579Z"},"steam":{"title":"Steam Client","mtime":"2024-02-13T22:34:17.609Z"},"steam-deck":{"title":"Steam Deck","mtime":"2024-02-13T22:53:51.919Z"},"programming-resources":{"title":"Programming Resources","mtime":"2024-04-20T19:59:46.944Z"},"os":{"title":"Operating Systems","mtime":"2024-05-10T16:07:32.581Z"},"lua":{"title":"Lua Programming Language","mtime":"2024-09-13T08:45:18.515Z"},"browsers":{"title":"Web Browsers","mtime":"2024-09-13T08:47:57.942Z"}}},"about":{"title":"About"},"sitemap":{"title":"Site Map"}}}
{"title":"PaulW.XYZ","subpages":{"posts":{"title":"Posts","subpages":{}},"notes":{"title":"Notes","subpages":{"mos-6502":{"title":"MOS 6502 Microprocessor","mtime":"2023-10-29T18:05:52.439Z"},"browsers":{"title":"Web Browsers","mtime":"2024-09-13T08:47:57.942Z"},"zilog-z80":{"title":"Zilog Z80 Microprocessor","mtime":"2023-10-29T18:07:08.579Z"},"steam":{"title":"Steam Client","mtime":"2024-10-10T04:56:04.393Z"},"programming-resources":{"title":"Programming Resources","mtime":"2024-10-10T05:04:27.709Z"},"steam-deck":{"title":"Steam Deck","mtime":"2024-10-10T05:19:16.140Z"},"lua":{"title":"Lua Programming Language","mtime":"2024-09-13T08:45:18.515Z"},"os":{"title":"Operating Systems","mtime":"2024-05-10T16:07:32.581Z"}}},"about":{"title":"About"},"sitemap":{"title":"Site Map"},"https://git.paulw.xyz":{"title":"Git.PaulW.XYZ"},"https://social.paulw.xyz":{"title":"Social.PaulW.XYZ"}}}

7
styles/note.module.css Normal file
View File

@ -0,0 +1,7 @@
.last-updated {
text-align: right;
display: block;
font-style: italic;
font-size: 1rem;
margin: 0.5rem 0.75rem;
}