Compare commits
No commits in common. "4f25a3bc3dc5d74ad1ee7c722f60f3a3aab341fa" and "910f531207936bea816372198332ee26e36ba57a" have entirely different histories.
4f25a3bc3d
...
910f531207
@ -4,6 +4,7 @@ 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` || '';
|
||||
|
@ -30,8 +30,6 @@ 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
|
||||
|
37
lib/date.ts
37
lib/date.ts
@ -14,43 +14,22 @@ 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();
|
||||
const suffix = getOrdinalDaySuffix(day)
|
||||
let out = '';
|
||||
out = !disable?.month ? `${month}` : '';
|
||||
out = !disable?.day ? `${out} ${day}${suffix}` : out;
|
||||
out = !disable?.year ? `${out}, ${year}` : out;
|
||||
|
||||
let out = !disable?.day ? `${day}${getOrdinalDaySuffix(day)}` : '';
|
||||
out = !disable?.month ? `${out} ${month}` : out;
|
||||
out = !disable?.year ? `${out} ${year}` : out;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
export function getOrdinalDaySuffix(day: number): string {
|
||||
export function getOrdinalDaySuffix(day: number) {
|
||||
switch (day) {
|
||||
case 1:
|
||||
case 21:
|
||||
@ -67,11 +46,6 @@ export function getOrdinalDaySuffix(day: number): string {
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
@ -126,7 +100,6 @@ const DateTool = {
|
||||
getFullMonth,
|
||||
isValid,
|
||||
getOrdinalDaySuffix,
|
||||
toLocaleString,
|
||||
};
|
||||
|
||||
export default DateTool;
|
||||
|
@ -8,6 +8,7 @@ const config = {
|
||||
{
|
||||
test: /\.ya?ml$/,
|
||||
use: 'js-yaml-loader',
|
||||
|
||||
},
|
||||
{
|
||||
test: /\.svg$/,
|
||||
|
@ -3,61 +3,50 @@
|
||||
A handy list of blog posts, articles, videos, and books that I would probably
|
||||
refer to someone or within something.
|
||||
|
||||
## Memory Allocation Strategies
|
||||
- Untangling Lifetimes: The Arena Allocator
|
||||
|
||||
- https://www.gingerbill.org/series/memory-allocation-strategies/
|
||||
Making performant dynamic manual memory management in C feel almost like
|
||||
garbage collection.
|
||||
|
||||
## Untangling Lifetimes: The Arena Allocator
|
||||
https://www.rfleury.com/p/untangling-lifetimes-the-arena-allocator
|
||||
|
||||
Making performant dynamic manual memory management in C feel almost like
|
||||
garbage collection.
|
||||
- Ryan Fleury's UI Series
|
||||
|
||||
- https://www.rfleury.com/p/untangling-lifetimes-the-arena-allocator
|
||||
Semi-paywalled
|
||||
|
||||
## Immediate-Mode Graphical User Interfaces (2005)
|
||||
https://www.rfleury.com/p/ui-series-table-of-contents
|
||||
|
||||
- https://caseymuratori.com/blog_0001
|
||||
- Immediate-Mode Graphical User Interfaces (2005)
|
||||
|
||||
- https://www.youtube.com/watch?v=Z1qyvQsjK5Y
|
||||
https://caseymuratori.com/blog_0001
|
||||
|
||||
## What Color is Your Function?
|
||||
https://www.youtube.com/watch?v=Z1qyvQsjK5Y
|
||||
|
||||
- https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function/
|
||||
- What Color is Your Function?
|
||||
|
||||
## Real-time audio programming 101: time waits for nothing
|
||||
https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function/
|
||||
|
||||
- http://www.rossbencina.com/code/real-time-audio-programming-101-time-waits-for-nothing
|
||||
- Real-time audio programming 101: time waits for nothing
|
||||
|
||||
## Triangulation
|
||||
http://www.rossbencina.com/code/real-time-audio-programming-101-time-waits-for-nothing
|
||||
|
||||
- https://www.humus.name/index.php?ID=228
|
||||
- Triangulation
|
||||
|
||||
## Quantifying the Performance of Garbage Collection vs. Explicit Memory Management
|
||||
https://www.humus.name/index.php?ID=228
|
||||
|
||||
- https://people.cs.umass.edu/~emery/pubs/gcvsmalloc.pdf
|
||||
- Quantifying the Performance of Garbage Collection vs. Explicit Memory
|
||||
Management
|
||||
|
||||
## Typing is Hard
|
||||
https://people.cs.umass.edu/~emery/pubs/gcvsmalloc.pdf
|
||||
|
||||
- https://3fx.ch/typing-is-hard.html
|
||||
- Typing is Hard
|
||||
|
||||
## The Aggregate Magic Algorithms
|
||||
https://3fx.ch/typing-is-hard.html
|
||||
|
||||
- http://aggregate.org/MAGIC/
|
||||
- The Aggregate Magic Algorithms
|
||||
|
||||
## Ryan Fleury's UI Series
|
||||
http://aggregate.org/MAGIC/
|
||||
|
||||
Semi-paywalled
|
||||
- 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
|
||||
https://www.gingerbill.org/series/memory-allocation-strategies/
|
||||
|
@ -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
|
||||
|
@ -39,10 +39,6 @@ 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/)
|
||||
@ -50,5 +46,11 @@ 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
|
||||
|
@ -9,17 +9,15 @@ function AboutPage() {
|
||||
<Layout >
|
||||
<section className='block'>
|
||||
<p>Paul'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>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>
|
||||
<p>Why did I create this?
|
||||
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>contact [at] paulw [dot] xyz</code>.</p>
|
||||
<p>Got any questions, concerns, or issues? Contact me via email: <code>lambdapaul [at] pm [dot] me</code>.</p>
|
||||
</section>
|
||||
<hr />
|
||||
<section className='block'>
|
||||
<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>Source for this site is available on GitHub: <a href='https://github.com/LambdaPaul/www'>https://github.com/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'>
|
||||
|
@ -7,12 +7,12 @@ import RecentPosts from '../components/recent-posts';
|
||||
import RootInfo from '../public/home.json';
|
||||
|
||||
function Nav() {
|
||||
const nav = Object.entries(RootInfo);
|
||||
const nav = RootInfo;
|
||||
return (
|
||||
<div className='block'>
|
||||
<h2>Navigation</h2>
|
||||
{
|
||||
nav.map(([slug, info], i) => {
|
||||
Object.entries(nav).map(([slug, info], i) => {
|
||||
return <Link key={i} href={slug} className='button green'>{info.title}</Link>
|
||||
})
|
||||
}
|
||||
|
@ -8,15 +8,11 @@ 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 {
|
||||
@ -25,7 +21,7 @@ interface Notes {
|
||||
|
||||
function Markdown({ content }: any) {
|
||||
return <ReactMarkdown
|
||||
remarkPlugins={[remarkGithubAdmonitionsToDirectives, remarkDirective, remarkGfm]}
|
||||
remarkPlugins={[remarkGithubAdmonitionsToDirectives, remarkDirective]}
|
||||
rehypePlugins={[rehypeRaw]}
|
||||
components={{
|
||||
code({ node, className, children, ...props }) {
|
||||
@ -51,12 +47,9 @@ function Markdown({ content }: any) {
|
||||
>{content}</ReactMarkdown>
|
||||
}
|
||||
|
||||
function Note({ note }: { note: Note } ) {
|
||||
function Note({ note }: any) {
|
||||
return (<>
|
||||
<Layout >
|
||||
<span className={style['last-updated']}>
|
||||
Last updated: {toLocaleString(note.mtime)}
|
||||
</span>
|
||||
<section className='block'>
|
||||
<Markdown content={note.content} />
|
||||
</section>
|
||||
@ -65,7 +58,7 @@ function Note({ note }: { note: Note } ) {
|
||||
);
|
||||
}
|
||||
|
||||
export async function getStaticProps({ params }: { params: { note: string } }) {
|
||||
export async function getStaticProps({ params }: any) {
|
||||
const note: string = params.note;
|
||||
const notesInfo: Notes = NotesInfo;
|
||||
const noteInfo: Note = notesInfo[note];
|
||||
|
@ -10,27 +10,13 @@ function traverseMap(head: Site, cwd = '', depth = 0) {
|
||||
for (const [slug, info] of Object.entries(head.subpages)) {
|
||||
if (slug === 'sitemap')
|
||||
continue;
|
||||
if (slug.startsWith('http://')) {
|
||||
elements.push(<>
|
||||
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={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}
|
||||
</>);
|
||||
}
|
||||
<dd><Link href={path}>paulw.xyz{path}</Link></dd>
|
||||
{children}
|
||||
</>);
|
||||
}
|
||||
return elements;
|
||||
}
|
||||
|
@ -10,11 +10,5 @@
|
||||
},
|
||||
"sitemap": {
|
||||
"title": "Site Map"
|
||||
},
|
||||
"https://git.paulw.xyz": {
|
||||
"title": "Git.PaulW.XYZ"
|
||||
},
|
||||
"https://social.paulw.xyz": {
|
||||
"title": "Social.PaulW.XYZ"
|
||||
}
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
{"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"}}
|
||||
{"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"}}
|
@ -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"},"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"}}}
|
||||
{"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"}}}
|
@ -1,7 +0,0 @@
|
||||
.last-updated {
|
||||
text-align: right;
|
||||
display: block;
|
||||
font-style: italic;
|
||||
font-size: 1rem;
|
||||
margin: 0.5rem 0.75rem;
|
||||
}
|
Loading…
Reference in New Issue
Block a user