Skip to content

Instantly share code, notes, and snippets.

View kangax's full-sized avatar

Juriy Zaytsev kangax

View GitHub Profile
@kangax
kangax / openset-vs-crossfit-logging.md
Created June 15, 2026 13:22
OpenSet vs CrossFit logging: where an open workout-data standard fits, and where it breaks

OpenSet vs CrossFit logging: where an open workout-data standard fits, and where it breaks

TL;DR

I evaluated OpenSet (openset.dev, an MIT-licensed open JSON standard for workout data — repo: https://github.com/getdiby/openset) against how we model workout data in PRzilla, focused on whether we could adopt it for logging.

Verdict: OpenSet is a strong, well-built standard and a clean fit for strength / hybrid (concurrent) training. It is a poor fit for CrossFit metcons for structural reasons, not polish. Its execution (logging) model is a delta against a prescription: it logs every set and derives outcomes. CrossFit logging is outcome-first (one score) and scaling-heavy (substituted movements), and those two facts break the model.

Single strongest finding: a prescription-anchored log cannot represent movement scaling (e.g. Amanda done with ring dips), and scaling is the common case in CrossFit.

Workout Difficulty & Benchmark Estimation Heuristics

Key Factors Considered

  • Workout Format:
    • Monostructural (run, row, bike): difficulty primarily based on distance/time domain; benchmarks well-established (e.g., 5k run, 2k row)
    • Couplets/Triplets: difficulty depends on load, skill, and volume
    • Chippers/Pyramids: longer duration, high volume, often higher difficulty
    • AMRAPs: difficulty varies widely; depends on movement mix, duration, and skill
  • Max load: difficulty based on % of Rx

1. Input WOD Data (from jq output):

  • WOD Name: Frelen

  • Description:

    5 Rounds for Time
    800 meter Run

15 Dumbbell Thrusters (45/35 lb)

Okay, I will analyze the provided WOD, determine its difficulty and difficulty explanation using the heuristics from src/memory-bank/systemPatterns.md, and then derive the re-evaluated band ranges with explanations.

WOD Details:

6 ROUNDS for time:

  • 400m Run
  • 5 Bar Muscle Ups
  • 10 Alternating DB Power Snatch (50/35 lbs)
  • 400m Run
@kangax
kangax / gem.md
Created May 7, 2025 18:27
Gemini 2.5 Pro

The user wants the overlay to cover the entire dialog without internal padding and ensure the dialog's close button (if one exists and is part of the dialog structure itself, not the form) remains functional and not covered.

The LogScoreForm is typically rendered inside a dialog/modal. The current implementation places the overlay inside the LogScoreForm's main Box wrapper.

// LogScoreForm.tsx
export const LogScoreForm: React.FC<LogScoreFormProps> = ({...}) => {
  // ...
  return (
  {/* Overlay is child of this Box */}
@kangax
kangax / components.child-component.js
Created February 9, 2021 19:16 — forked from kshitij-srv/components.child-component.js
Ember: Access child function from parent component
import Ember from 'ember';
const {
Component, set, get
} = Ember;
export default Component.extend({
imageSource:'',
didInsertElement() {
get(this, 'setChildReference')(this);
@kangax
kangax / components.person\.js
Last active August 6, 2020 17:17
defaultProps
import Component from '@glimmer/component';
const defaultProps = {
firstName: 'Kenneth',
lastName: 'Larsen',
};
export default class PersonComponent extends Component {
args = { defaultProps, ...this.args }
import type { GlobalState } from 'redux/modules';
export type ExtractReturn<Fn> = $Call<<T>((...Iterable<any>) => T) => T, Fn>;
// ...
export type BaseAction = $ReadOnly<{ type: string, error?: boolean }>;
// ...
/*
A collection of tests where Flow and TypeScript might have different behavior
Some tests are borrowed from https://github.com/vkurchatkin/typescript-vs-flow
Some tests now have the same behavior as the new versions of Flow/TS have fixed the bugs and improved type safety
*/
/* 1. Accessing unknown properties on objects */
@kangax
kangax / deps_age.js
Last active March 29, 2023 20:19
Find average age of npm dependencies
const fs = require('fs');
const { exec } = require('child_process');
const moment = require('moment');
const _ = require('lodash');
const chalk = require('chalk');
fs.readFile('package.json', (err, data) => {
const { dependencies } = JSON.parse(data.toString());
let totalDays = 0;