Skip to content

Commit

Permalink
+++
Browse files Browse the repository at this point in the history
  • Loading branch information
Offirmo committed Sep 18, 2024
1 parent 2adc4a9 commit 74e0ac3
Show file tree
Hide file tree
Showing 14 changed files with 96 additions and 31 deletions.
1 change: 1 addition & 0 deletions stack--current/0-meta/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"noImplicitThis": true,
"noPropertyAccessFromIndexSignature": true,
"noUncheckedIndexedAccess": true,
"noUncheckedSideEffectImports": true,
"noUnusedLocals": false,
"noUnusedParameters": false,
"strict": true,
Expand Down
2 changes: 2 additions & 0 deletions stack--current/0-meta/tsconfig.json.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ REMINDER: the build script relax a few rules in dev mode (--watch), see `build-t

* 5.6 https://devblogs.microsoft.com/typescript/announcing-typescript-5-6/
* DOESNT WORK use "typeRoots": ["node_modules/@types", "typings"] instead of replicating the reference to types?
* added nouncheckedsideeffectimports https://devblogs.microsoft.com/typescript/announcing-typescript-5-6/#the---nouncheckedsideeffectimports-option
*

### 2024/08/29

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ type CheckedNode = {
// hints for renderers. May or may not be used.
$hints: {
[k: string]: any
// TODO clarify, maybe make type-safe
// known:
// key, uuid, href, bullets_style, possible_emoji
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ cron https://onlineornot.com/the-complete-guide-to-cron-jobs
cross cutting concerns = aspects of a program that affect several modules without the possibility of being encapsulated in any of them https://en.wikipedia.org/wiki/Cross-cutting_concern
CRUD "create, read, update and delete"
crunch
culture -- low/high context https://journals.sagepub.com/doi/10.1177/0146167212455828
Cupertino effect = bad spell checking Cupertino effect
currying https://en.wikipedia.org/wiki/Currying
databases
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,4 @@ vendor lock-in
wartime vs peacetime https://newsletter.pragmaticengineer.com/p/wartime-vs-peacetime
what got us here won't get us there…
worse is better = there is a point where less functionality ("worse") is a preferable option ("better") in terms of practicality and usability. Software that is limited, but simple to use, may be more appealing to the user and market than the reverse https://en.wikipedia.org/wiki/Worse_is_better
You can develop the best strategy in the world, but if it isn’t producing the desired results, it’s time to reassess. "It’s not that we aren’t doing as well as we could, but it’s not the best strategy we could be doing to win." https://worldofwarcraft.blizzard.com/en-us/news/21952451/midgame-moves-adapt-survive-and-thrive
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
[ ] advanced architecture -- navigator.sendBeacon() for backup
[ ] advanced architecture -- Web Periodic Background Synchronization API https://devdocs.io/dom/web_periodic_background_synchronization_api
[ ] design https://www.youtube.com/@phoebeyutbt/videos
[ ] https://csswizardry.com/archive/
[ ] security https://portswigger.net/web-security/all-topics
[ ] security https://xsleaks.dev/
[ ] TODO shearing layers https://en.wikipedia.org/wiki/Shearing_layers
Expand All @@ -25,9 +26,15 @@ architecture -- microservices, API-first, cloud-native SaaS, headless (MACH) htt
architecture -- SSR, ISR, CSR, PPR (see 'rendering')
ARIA "Accessible Rich Internet Applications" https://www.w3.org/WAI/ARIA/apg/
Backends For Frontends (BFF) https://samnewman.io/patterns/architectural/bff/
blocking -- css -- Stylesheets are render blocking
blocking -- fetching -> parsing -> rendering https://csswizardry.com/2024/08/blocking-render-why-whould-you-do-that/
blocking -- inline = still blocking but not as bad
blocking -- js -- scripts are parse blocking
blocking -- not = async, defer, and type=module
blocking render https://csswizardry.com/2024/08/blocking-render-why-whould-you-do-that/
bot detection
browsing contexts = such as several windows, iframes or even workers
cache https://csswizardry.com/2024/08/cache-grab-how-much-are-you-leaving-on-the-table/
CDN
chrome = the graphical framework and elements surrounding the content. means different things depending on the context: In the context of a web browser it is the navigation, toolbar etc. In the context of a website it is navigation, ad-space and other fixed aspects of the design https://stackoverflow.com/a/5072092/587407
Chrome is not the standard https://v4.chriskrycho.com/2017/chrome-is-not-the-standard.html
Expand Down Expand Up @@ -111,6 +118,9 @@ DOM -- Nodes -- types = ELEMENT, ATTRIBUTE, TEXT, CDATA, PROCESSING_INSTRUCTION
DOM tree = Nodes = text, elements, attributes, comments... includes elements such as <body> and <table>, among many others.
ECMAScript - European Computer Manufacturers Association Script (ES)
events -- event delegation
flash of -- fallback font (FOFT)
flash of -- Undefined Custom Elements (FOUCE) https://www.abeautifulsite.net/posts/flash-of-undefined-custom-elements/
flash of -- unstyled content (FOUC) https://dev.to/lyqht/what-the-fouc-is-happening-flash-of-unstyled-content-413j
fonts
fonts -- calibration https://web.dev/articles/css-size-adjust#calibrating_fonts
fonts -- Font Friday https://pimpmytype.com/fontfriday/
Expand Down Expand Up @@ -197,6 +207,7 @@ testing -- component https://storybook.js.org/blog/component-testing/
testing -- Netflix's SafeTest https://www.infoq.com/news/2024/02/netflix-safetest-front-end-test/
testing https://www.testingjavascript.com/
the web contract = Everyone who publishes on the Web knows that their content can be copied and used by anyone for any purpose. This has always been a risk of providing content on the Web. https://meiert.com/en/blog/the-web-contract/
Three Cs: 🤝 Concatenate, 🗜️ Compress, 🗳️ Cache https://csswizardry.com/2023/10/the-three-c-concatenate-compress-cache/
typology -- dead simple site https://deadsimplesites.com/
typology -- landing site
typology -- naked site
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ https://github.com/bubkoo/html-to-image
unified inbox https://www.theverge.com/2023/8/9/23824562/slack-redesign-app-dms-activity-later


components https://resend.com/blog/react-email-3


https://devdocs.io/dom/contactaddress
Universal Postal Union website's Addressing S42 standard
Expand Down
16 changes: 16 additions & 0 deletions stack--current/9-rpg/xx-notes/common/notes--devnotes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@


## WoW


https://worldofwarcraft.blizzard.com/en-us/news/23882864/dragonflight-update-notes


https://worldofwarcraft.blizzard.com/en-us/news/23874318/updated-nov-15-dragonflight-pre-expansion-phase-2-update-notes-now-live
> Removed the ability for players who have not started Threads of Fate to access the system.
> Developers' note: The goal with Threads of Fate was to help alleviate the linear path of Shadowlands for alts as it was the only way for players to level from 50 to 60. Now that Shadowlands has been moved into Chromie time and Chromie Time’s level cap has been increased to 60, players have a multitude of methods to reach level 60. Players currently in Threads of fate can continue through it, but the option will not be available for any new characters.
> We do not have plans to do similar removals with Dragonflight’s Adventure Mode in future expansions. Threads of Fate is a choice to use in Shadowlands and irreversibly changes a player’s character once it is chosen. It previously created two different experiences of Shadowlands, which would double to four with both of the level up and Threads of Fate being accessible within Chromie time. Adventure Mode in Dragonflight is an overlay to the level up experience and is always on once it is earned regardless of decisions the player makes.


https://worldofwarcraft.blizzard.com/en-us/news/24130678/the-war-within-update-notes
1 change: 1 addition & 0 deletions stack--current/9-rpg/xx-notes/common/notes--mechanics.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@

WoW -- hero talents https://worldofwarcraft.blizzard.com/en-us/news/24125213/take-your-character-to-the-next-level-with-hero-talents
WoW -- warbands https://worldofwarcraft.blizzard.com/en-us/news/24115313/get-the-band-together-for-warbands
WoW -- trading post https://worldofwarcraft.blizzard.com/en-us/news/23877463/introducing-the-trading-post
4 changes: 4 additions & 0 deletions stack--current/9-rpg/xx-notes/common/notes--warfare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@


https://worldofwarcraft.blizzard.com/en-us/news/21952451/midgame-moves-adapt-survive-and-thrive
> Some teams rely heavily on securing a victory shortly after the match begins, while others intend to drag it out as long as possible until they can capitalize on heavy dampening in what essentially becomes a war of attrition. Your goal is to identify these setups, and react by surviving and disrupting that initial rush or by drawing out the enemy team long before dampening sets in and they can slowly rot you down.
3 changes: 3 additions & 0 deletions stack--current/9-rpg/xx-notes/setting--scifi/notes--polish.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ https://codepen.io/Offirmo/pen/OJeGMRG

hyperspace https://codepen.io/noahblon/pen/DpNRyR

collection
https://codepen.io/collection/DJRwWY


## tosort

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function find_element(u_state: Immutable<UState>, uuid: UUID): Immutable<Element
}

// TODO code duplication
function getꓽoldest_pending_flow_engagement(u_state: Immutable<UState>): { uid: number, $doc: RichText.Document, pe: PendingEngagement } | null {
function getꓽoldest_pending_engagementⵧflow(u_state: Immutable<UState>): { uid: number, $doc: RichText.Document, pe: PendingEngagement } | null {
const pe = getꓽoldest_queuedⵧflow(u_state.engagement)
if (!pe)
return null
Expand All @@ -64,7 +64,7 @@ function getꓽoldest_pending_flow_engagement(u_state: Immutable<UState>): { uid
pe,
}
}
function getꓽoldest_pending_non_flow_engagement(u_state: Immutable<UState>): { uid: number, $doc: RichText.Document, pe: PendingEngagement } | null {
function getꓽoldest_pending_engagementⵧnon_flow(u_state: Immutable<UState>): { uid: number, $doc: RichText.Document, pe: PendingEngagement } | null {
const pe = getꓽoldest_queuedⵧnon_flow(u_state.engagement)
if (!pe)
return null
Expand All @@ -82,6 +82,6 @@ function getꓽoldest_pending_non_flow_engagement(u_state: Immutable<UState>): {
export {
find_element,
appraise_player_power,
getꓽoldest_pending_flow_engagement,
getꓽoldest_pending_non_flow_engagement,
getꓽoldest_pending_engagementⵧflow,
getꓽoldest_pending_engagementⵧnon_flow,
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
import * as State from '@tbrpg/state'
import * as RRT from '@tbrpg/ui--rich-text'
import chalk from 'chalk'

import { injectꓽlibꓽchalk, prettifyꓽjson } from '@offirmo-private/prettify-any'
import * as RichText from '@offirmo-private/rich-text-format'
import to_terminal from '@offirmo-private/rich-text-format--to-terminal'

import * as State from '@tbrpg/state'
import * as RRT from '@tbrpg/ui--rich-text'

import '../services/misc.js'

import { renderꓽstateⵧprettified_text } from '../view/offirmo-state/generic--to-text.js'
import { renderꓽstateⵧrich_text } from '../view/offirmo-state/generic--to-rich-text.js'

/////////////////////////////////////////////////

injectꓽlibꓽchalk(chalk)

/////////////////////////////////////////////////

let state = State.create()
// TODO reseed
state = State.on_start_session(state, true)
Expand All @@ -22,43 +30,55 @@ state = State.play(state)
//function change_avatar_class(previous_state: Immutable<State>, new_class: CharacterClass, now_ms: TimestampUTCMs = getꓽUTC_timestamp‿ms())


//console.log('/////////////////////////////////////////////////')
//console.log(state)
/*
console.log('/////////////////////////////////////////////////')
console.log(state)
*/

//console.log('/////////////////////////////////////////////////')
//console.log(prettifyꓽjson(state))
/*
console.log('/////////////////////////////////////////////////')
console.log(prettifyꓽjson(state))
*/

//console.log('/////////////////////////////////////////////////')
//console.log(renderꓽstateⵧprettified_text(state))
/*
console.log('/////////////////////////////////////////////////')
console.log(renderꓽstateⵧprettified_text(state))
*/

/*
console.log('/////////////////////////////////////////////////')
const $doc = renderꓽstateⵧrich_text(state, {
})
const $doc = renderꓽstateⵧrich_text(state, {})
console.log(to_terminal($doc))
*/

console.log('/////////////////////////////////////////////////')
console.log(to_terminal(State.getꓽrecap(state.u_state)))
// always first
const $doc = State.getꓽrecap(state.u_state)
console.log(to_terminal($doc))

console.log('/////////////////////////////////////////////////')
if (State.is_inventory_full(state.u_state)) {
console.warn('Inventory is full!')
}
;((pef) => {
if (!pef)
return
console.log(to_terminal(pef.$doc))
// achievements

while (State.getꓽoldest_pending_engagementⵧflow(state.u_state)) {
const pef = State.getꓽoldest_pending_engagementⵧflow(state.u_state)!
console.log('[PEF]', to_terminal(pef.$doc))
state = State.acknowledge_engagement_msg_seen(state, pef.uid)
})(State.getꓽoldest_pending_flow_engagement(state.u_state))
;((penf) => {
if (!penf)
return
console.log(to_terminal(penf.$doc))
}

while (State.getꓽoldest_pending_engagementⵧnon_flow(state.u_state)) {
const penf = State.getꓽoldest_pending_engagementⵧnon_flow(state.u_state)!
console.log('[PENF]', to_terminal(penf.$doc))
state = State.acknowledge_engagement_msg_seen(state, penf.uid)
})(State.getꓽoldest_pending_non_flow_engagement(state.u_state))
}

console.log('/////////////////////////////////////////////////')
// TODO should be part of recap?
if (State.is_inventory_full(state.u_state)) {
console.warn('[special message] Inventory is full!')
}
if(State.getꓽavailable_energy‿float(state.t_state) >= 1) {
console.log('You can play now!')
console.log('[special message] You can play now!')
}
// TODO achievements

console.log('/////////////////////////////////////////////////')
console.log('Actions:', RichText.renderⵧto_actions($doc))
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import assert from 'tiny-invariant'
import { type Immutable } from '@offirmo-private/ts-types'
import { NORMALIZERS } from '@offirmo-private/normalize-string'
import * as NORMALIZERS from '@offirmo-private/normalize-string'
import * as RichText from '@offirmo-private/rich-text-format'

import {
Expand Down

0 comments on commit 74e0ac3

Please sign in to comment.