profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/zephraph/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Justin Bennett zephraph @oxidecomputer Brooklyn, NY https://just-be.dev

egoist/docute 3510

📚 Effortless documentation, done right.

intuit/auto 1314

Generate releases based on semantic version labels on pull requests.

vue-play/vue-play 974

🍭 A minimalistic framework for demonstrating your Vue components

relay-tools/relay-compiler-language-typescript 227

A language plugin for Relay that adds TypeScript support, including emitting type definitions.

ben-eb/css-values 62

Validate CSS property value pairs.

obsidian-tools/obsidian-tools 50

An unofficial collection of tools that helps you build plugins for obsidian.md

auto-it/autobot 10

A GitHub app for intuit's auto

zephraph/atom-github-notifications 5

A Github Notifications package for the Atom editor

auto-it/setup-auto 2

Install Auto release tool

jmichaliga/ssr-js-talk 2

A discussion about Server Side Rendering

issue openedoctokit/plugin-throttling.js

Distributed types seem to be incomplete

I was configuring the throttle plugin essentially as it's written in the example in the readme and noticed onRateLimit and onAbuseLimit neither are inheriting the correct types. Opening up throttle's index.d.ts this is what I see:

import { Octokit } from "@octokit/core";
export declare function throttling(octokit: Octokit, octokitOptions?: {}): {};
export declare namespace throttling {
    var VERSION: string;
    var triggersNotification: (string: string) => boolean;
}

I cloned the project and built from source just to verify the output. I'm seeing the same thing in pkg/dist-types/index.d.ts on build. I did look through the tests and it seems like the types pull through fine there... I'm not counting out user error here 😄

Here's the code I'm using:

import { Octokit } from "@octokit/rest";
import { retry } from "@octokit/plugin-retry";
import { throttling } from "@octokit/plugin-throttling";

//...

const RetryAndThrottleOctokit = Octokit.plugin(retry, throttling);
const octokit = new RetryAndThrottleOctokit({
  auth: process.env.GITHUB_TOKEN,
  throttle: {
    onRateLimit: (retryAfter, { method, url, request }) => {
      octokit.log.warn(`Request quota exhausted for request ${method} ${url}`);

      if (request.retryCount <= 2) {
        octokit.log.info(
          `Retrying after ${retryAfter} seconds! ${
            2 - request.retryCount
          } retries left.`
        );
        return true;
      }
      return false;
    },
    onAbuseLimit: (options) => {
      octokit.log.error(
        `Abuse detected for request ${options.method} ${options.url}, halting`
      );
      process.exit(1);
    },
  },
});

// ...

versions

"@octokit/plugin-retry": "^3.0.9",
"@octokit/plugin-throttling": "^3.5.2",
"@octokit/rest": "^18.10.0",

created time in 13 hours

startedlarslockefeer/obsidian-plugin-todo

started time in a day

delete branch zephraph/mutik

delete branch : upgrade-react

delete time in a day

PR closed jaredpalmer/mutik

Bump react to fix example

This upgrades the version of react to fix the example. It's the latest experimental for now. I'm going to PR the upgrade to switch over to useSyncExternalStore shortly and I'll bump this back down to 16 or 17.

I had to pair this with #26 to get the example to run.

+16 -19

1 comment

2 changed files

zephraph

pr closed time in a day

issue commentcrcn/paperclip

PC files need to be compiled into intermediate format

So we're going from pc to an intermediate layer. It's still up to the consumer of that AST to interpret what code it actually needs to output. So here's sort of what I'm thinking.

I'm going to represent the AST in kdl just for terseness and focus for a second on the first example.

div data-pc-label="my element" {
  style {
    color "red"
  }
}

By default, maybe this is the raw AST output. There's no processing done here and the client can choose how to transform this into their base representation. Maybe an HTML processor decides it wants to inline the nested styles:

<div data-pc-label="my element" style="color: red"> 
</div>

Maybe though, we provide an option to remove nesting. The challenge on paperclip's side is to determine the impacts of that option on the output AST. Perhaps your second code block is how we'd decided to do that.

style {
  selector class="_059bb_my_element" {
    color "red"
  }
}

div data-pc-label="my element" class="_059bb_my_element"

Now this is an interpretation of what that transformation might look like, but at this point it's still on the consumer of the AST to determine how they want this to output. Styles in svelte are scoped by default, so maybe when the translator for svelte is written it has some internal optimizations to recognize that these are the same and optimizes it away. The resulting svelte might be something like...

<style>
div {
  color: red;
}
</style>

<div data-pc-label="my element"/>

Or the translator could still decide to inline it like the HTML example above. The point here is, we don't necessarily care. That's not our business. What should be our business though, is providing mechanisms to make the AST as simple as reasonably possible for translation to another target.

I mean, the first target should be just outputting a raw AST in some consumable format. Then we can iterate on transformations that generate ASTs more optimized for various consumers.

crcn

comment created time in 3 days

issue commentcrcn/paperclip

PC files need to be compiled into intermediate format

Yes, exactly. The translatePcToSvelte and translatePcToHTML could ostensibly be user land printers that act on the transformed AST. You could also wrap this whole API up into a cli tool that could be invoked as a subprocess of whatever runtime language the creator of the printer wanted to use.

Contrived example

paperclip-compile --config=paperclip.compile.json | my-svelte-printer
crcn

comment created time in 3 days

issue commentcrcn/paperclip

PC files need to be compiled into intermediate format

Pretty much, yes.

I see the intermediate layer as an AST. The configuration would allow disabling certain nodes of that AST from being output. I.e. nested styles in this case. The resulting AST would be a subset of the raw representation of the pc component with the appropriate transformations applied.

crcn

comment created time in 3 days

issue commentcrcn/paperclip

PC files need to be compiled into intermediate format

Not to overly complicate the initial translation but you could reduce downstream complexity by pre-compiling specific aspects of pc files based on a given configuration.

For example, with svelte you can largely preserve nested styles :global selectors, etc. When writing an HTML compiler though, nesting is an unnecessary complexity to that implementation. You could pass a compiler config that effectively disables that output (by essentially pre-compiling it)

{
  "compilerOptions": {
     "nesting": false
   }
}

The features list would be relatively extensive and you might want to version this config, but it would greatly simplify compile targets.

crcn

comment created time in 3 days

startedkdl-org/kdl-rs

started time in 4 days

startedsycamore-rs/sycamore

started time in 4 days

startedseed-rs/seed

started time in 4 days

startedthedodd/trunk

started time in 4 days

startedWebAssembly/esm-integration

started time in 4 days

startedoxidecomputer/steno

started time in 5 days

startedrust-lang/rust-clippy

started time in 6 days

startedbustle/ts-eager

started time in 6 days

push eventdevtools-fm/devtools.fm

Justin Bennett

commit sha a8decdc2e362bdac41a6787d2331da24f1552341

Add links to e13

view details

push time in 8 days

push eventdevtools-fm/devtools.fm

Justin Bennett

commit sha 1dbf24fcf07bf3f5459aee4fbeea9ea7a6145ae3

Add ep13 tooltips

view details

push time in 8 days

issue commentlucydsl/liblucy

Compile hangs if too many repeated event definitions

This is perhaps a misunderstanding on my part. Looking at xstate visualizations, it may not be possible to overload event transitions like that.

zephraph

comment created time in 9 days

issue openedlucydsl/liblucy

Compile hangs if too many repeated event definitions

I believe I've isolated this down. In the tableau state there are multiple repeated up and down transitions with different given guards. If you delete any two of those event transitions it'll correctly compile. With three or more present it'll hang the compiler.

machine highlighted {

  guard isUnderStock = :isUnderStock
  guard isUnderWaste = :isUnderWaste
  guard isUnderFoundation = :isUnderFoundation

  initial state stock {
    up => tableau
    down => tableau
    left => foundation
    right => waste
  }

  state foundation {
    up => tableau
    down => tableau

    left => guard(:isStartOfFoundation) => waste
    left => foundation

    right => guard(:isEndOfFoundation) => stock
    right => foundation
  }

  state waste {
    up => tableau
    down => tableau
    left => stock
    right => foundation
  }

  state tableau {
    up => isUnderStock => stock
    up => isUnderWaste => waste
    up => isUnderFoundation => foundation
    up => tableau

    down => isUnderStock => stock
    down => isUnderWaste => waste
    down => isUnderFoundation => foundation
    down => tableau

    left => tableau
    right => tableau
  }
}

created time in 9 days

startedRoyalIcing/yieldmachine

started time in 9 days

push eventzephraph/solitaire

Justin Bennett

commit sha 6ec2025e96f131ec44398f0c47e1302eeae92252

Ensure tableau only highlights movable cards

view details

Justin Bennett

commit sha 2438dc164f4975848d875704274da53aecfa7d3c

Correctly enable card flipping in tabeau

view details

push time in 10 days

push eventzephraph/solitaire

Justin Bennett

commit sha 2e1773a25d139c3bf9c13e25bcd75ac40363f843

Add saving, new games, fix some bugs

view details

push time in 10 days

startedmicrosoft/wslg

started time in 11 days

startedlucydsl/liblucy

started time in 11 days

push eventzephraph/solitaire

Justin Bennett

commit sha 572e2bde19b37a66a6077632bb9f53de27c06f62

Use parcel, @zephraph/mutik

view details

push time in 11 days

push eventzephraph/mutik

Justin Bennett

commit sha 786deefac44e594aada011a2a6fea0db68a4dec0

Add publish config

view details

push time in 11 days

push eventzephraph/mutik

Justin Bennett

commit sha 5dd57a9beab0c8b999aa51724cf59ab03de697f9

Update version, package name, add description

view details

push time in 11 days

push eventzephraph/mutik

Justin Bennett

commit sha edc2ac512c8bc0338612b8fdf5c7e0ecb17eb21c

Upgrade parcel

view details

Justin Bennett

commit sha 6928baaaf1c617b39008abdfd5a5d60008c757f8

Migrate to useSyncExternalStore, make typesafe

view details

Justin Bennett

commit sha 5544538d27b4dc477a37adffa62e89a3af882e48

Update readme

view details

Justin Bennett

commit sha c77e8fbbbe5b209cc41a9c19ba1ab1c157e642a2

Merge branch 'use-sync-external-store'

view details

push time in 11 days

startedreact-hook-form/react-hook-form

started time in 11 days