profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/rudi-c/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.

rudi-c/alchemy-book 84

Collaborative text editor written in Elixir/Phoenix, running at alchemy.digitalfreepen.com

figma/plugin-typings 47

Typings for the Figma Plugin API

figma/strict-null-check-migration-tools 42

Scripts used to migrate Figma's codebase to strictNullChecks

rudi-c/procedural-terrain-488 17

Final project for CS 488, implementing "Generating Complex Procedural Terrains Using the GPU"

ComputationalFinanceTools/fst-cuda-option-pricing 7

Pricing European and American options with jump models using CUDA on the GPU

rudi-c/perlin-range 4

Find the range of Perlin Noise values using automatic differentiation and gradient descent

rudi-c/playing-the-internship-game 2

the rules, tips, and tricks I've learned on how to approach tech internships

luckytoilet/the-waterloo-scraper 1

Scraper for the-waterloo-blogger

rudi-c/augmented-aa-tree 1

Immutable balanced binary search tree (AA tree) augmented with order statistics

PullRequestReviewEvent

Pull request review commentfigma/plugin-typings

figjam plugins: API typings

 declare global {   type StrokeJoin = "MITER" | "BEVEL" | "ROUND"   type HandleMirroring = "NONE" | "ANGLE" | "ANGLE_AND_LENGTH" -  interface GeometryMixin {-    fills: ReadonlyArray<Paint> | PluginAPI['mixed']+  interface MinimalStrokesMixin {     strokes: ReadonlyArray<Paint>+    strokeStyleId: string     strokeWeight: number-    strokeMiterLimit: number-    strokeAlign: "CENTER" | "INSIDE" | "OUTSIDE"-    strokeCap: StrokeCap | PluginAPI['mixed']     strokeJoin: StrokeJoin | PluginAPI['mixed']+    strokeAlign: "CENTER" | "INSIDE" | "OUTSIDE"     dashPattern: ReadonlyArray<number>+  }+  +  interface MinimalFillsMixin {+    fills: ReadonlyArray<Paint> | PluginAPI['mixed']     fillStyleId: string | PluginAPI['mixed']-    strokeStyleId: string+  }+  interface GeometryMixin extends MinimalStrokesMixin, MinimalStrokesMixin {

One of these is meant to be MinimalFillsMixin right?

SimplyAhmazing

comment created time in 2 months

PullRequestReviewEvent

Pull request review commentfigma/plugin-typings

figjam plugins: API typings

 declare global {     FramePrototypingMixin,     ReactionMixin {} +  interface OpaqueNodeMixin  {+    readonly id: string+    readonly absoluteTransform: Transform+    relativeTransform: Transform+    x: number+    y: number+    readonly width: number+    readonly height: number+    readonly removed: boolean+    remove(): void+    readonly parent: (BaseNode & ChildrenMixin) | null+    name: string+    toString(): string++    getPluginData(key: string): string+    setPluginData(key: string, value: string): void++    // Namespace is a string that must be at least 3 alphanumeric characters, and should+    // be a name related to your plugin. Other plugins will be able to read this data.+    getSharedPluginData(namespace: string, key: string): string+    setSharedPluginData(namespace: string, key: string, value: string): void+    setRelaunchData(data: { [command: string]: /* description */ string }): void+  }++  interface MinimalBlendMixin {+    readonly opacity?: number+    readonly blendMode?: BlendMode+  }++  interface TextSublayerNode {

It's a lot of duplication though. It's true that it's often hard to figure out exactly what properties are available on each node but 1) that's what the docs are for, a flattened representation 2) the typings file attempts to have the least amount of duplication, having a mix of approaches is the worst of both worlds

SimplyAhmazing

comment created time in 2 months

PullRequestReviewEvent

Pull request review commentfigma/plugin-typings

figjam plugins: API typings

 declare global {     FramePrototypingMixin,     ReactionMixin {} +  interface OpaqueNodeMixin  {+    readonly id: string+    readonly absoluteTransform: Transform+    relativeTransform: Transform+    x: number+    y: number+    readonly width: number+    readonly height: number+    readonly removed: boolean+    remove(): void+    readonly parent: (BaseNode & ChildrenMixin) | null+    name: string+    toString(): string++    getPluginData(key: string): string+    setPluginData(key: string, value: string): void++    // Namespace is a string that must be at least 3 alphanumeric characters, and should+    // be a name related to your plugin. Other plugins will be able to read this data.+    getSharedPluginData(namespace: string, key: string): string+    setSharedPluginData(namespace: string, key: string, value: string): void+    setRelaunchData(data: { [command: string]: /* description */ string }): void+  }++  interface MinimalBlendMixin {+    readonly opacity?: number+    readonly blendMode?: BlendMode+  }++  interface TextSublayerNode {+    readonly hasMissingFont: boolean++    paragraphIndent: number+    paragraphSpacing: number++    fontSize: number | PluginAPI['mixed']+    fontName: FontName | PluginAPI['mixed']+    textCase: TextCase | PluginAPI['mixed']+    textDecoration: TextDecoration | PluginAPI['mixed']+    letterSpacing: LetterSpacing | PluginAPI['mixed']+    lineHeight: LineHeight | PluginAPI['mixed']+    hyperlink: HyperlinkTarget | null | PluginAPI['mixed']++    characters: string+    insertCharacters(start: number, characters: string, useStyle?: "BEFORE" | "AFTER"): void+    deleteCharacters(start: number, end: number): void++    getRangeFontSize(start: number, end: number): number | PluginAPI['mixed']+    setRangeFontSize(start: number, end: number, value: number): void+    getRangeFontName(start: number, end: number): FontName | PluginAPI['mixed']+    setRangeFontName(start: number, end: number, value: FontName): void+    getRangeTextCase(start: number, end: number): TextCase | PluginAPI['mixed']+    setRangeTextCase(start: number, end: number, value: TextCase): void+    getRangeTextDecoration(start: number, end: number): TextDecoration | PluginAPI['mixed']+    setRangeTextDecoration(start: number, end: number, value: TextDecoration): void+    getRangeLetterSpacing(start: number, end: number): LetterSpacing | PluginAPI['mixed']+    setRangeLetterSpacing(start: number, end: number, value: LetterSpacing): void+    getRangeLineHeight(start: number, end: number): LineHeight | PluginAPI['mixed']+    setRangeLineHeight(start: number, end: number, value: LineHeight): void+    getRangeHyperlink(start: number, end: number): HyperlinkTarget | null | PluginAPI['mixed']+    setRangeHyperlink(start: number, end: number, value: HyperlinkTarget | null): void+    getRangeFills(start: number, end: number): Paint[] | PluginAPI['mixed']+    setRangeFills(start: number, end: number, value: Paint[]): void+    getRangeTextStyleId(start: number, end: number): string | PluginAPI['mixed']+    setRangeTextStyleId(start: number, end: number, value: string): void+    getRangeFillStyleId(start: number, end: number): string | PluginAPI['mixed']+    setRangeFillStyleId(start: number, end: number, value: string): void+  }++  interface ConnectorEndpointPosition {+    position: { x: number, y: number }+  }++  interface ConnectorEndpointPositionAndEndpointNodeId {+    position: { x: number, y: number }+    endpointNodeId: string+  }++  interface ConnectorEndpointEndpointNodeIdAndMagnet {+    endpointNodeId: string+    magnet: 'NONE' | 'AUTO' | 'TOP' | 'LEFT' | 'BOTTOM' | 'RIGHT' +  }++  type ConnectorEndpoint = ConnectorEndpointPosition | ConnectorEndpointEndpointNodeIdAndMagnet | ConnectorEndpointPositionAndEndpointNodeId 

It would be more consistent to put these further up in the file, not in the Mixins section

SimplyAhmazing

comment created time in 2 months

PullRequestReviewEvent

Pull request review commentfigma/plugin-typings

figjam plugins: API typings

 declare global {     outlineStroke(): VectorNode | null   } +  interface MinimalFillsMixin {+    fills: ReadonlyArray<Paint> | PluginAPI['mixed']+    fillStyleId: string | PluginAPI['mixed']+  }++interface MinimalStrokesMixin {+    strokes: ReadonlyArray<Paint>+    strokeStyleId: string+    strokeWeight: number+    strokeJoin: StrokeJoin | PluginAPI['mixed']+    strokeAlign: "CENTER" | "INSIDE" | "OUTSIDE"+    dashPattern: ReadonlyArray<number>+  }

Instead of duplicating these properties, GeometryMixin could be a composition of the "Minimal" mixins

SimplyAhmazing

comment created time in 2 months

PullRequestReviewEvent

Pull request review commentfigma/plugin-typings

figjam plugins: API typings

 declare global {     FramePrototypingMixin,     ReactionMixin {} +  interface OpaqueNodeMixin  {+    readonly id: string+    readonly absoluteTransform: Transform+    relativeTransform: Transform+    x: number+    y: number+    readonly width: number+    readonly height: number+    readonly removed: boolean+    remove(): void+    readonly parent: (BaseNode & ChildrenMixin) | null+    name: string+    toString(): string++    getPluginData(key: string): string+    setPluginData(key: string, value: string): void++    // Namespace is a string that must be at least 3 alphanumeric characters, and should+    // be a name related to your plugin. Other plugins will be able to read this data.+    getSharedPluginData(namespace: string, key: string): string+    setSharedPluginData(namespace: string, key: string, value: string): void+    setRelaunchData(data: { [command: string]: /* description */ string }): void+  }

Can we remove everything in here that already exists in BaseNodeMixin, which all node types will already be extending?

SimplyAhmazing

comment created time in 2 months

Pull request review commentfigma/plugin-typings

figjam plugins: API typings

 declare global {     FramePrototypingMixin,     ReactionMixin {} +  interface OpaqueNodeMixin  {+    readonly id: string+    readonly absoluteTransform: Transform+    relativeTransform: Transform+    x: number+    y: number+    readonly width: number+    readonly height: number+    readonly removed: boolean+    remove(): void+    readonly parent: (BaseNode & ChildrenMixin) | null+    name: string+    toString(): string++    getPluginData(key: string): string+    setPluginData(key: string, value: string): void++    // Namespace is a string that must be at least 3 alphanumeric characters, and should+    // be a name related to your plugin. Other plugins will be able to read this data.+    getSharedPluginData(namespace: string, key: string): string+    setSharedPluginData(namespace: string, key: string, value: string): void+    setRelaunchData(data: { [command: string]: /* description */ string }): void+  }++  interface MinimalBlendMixin {+    readonly opacity?: number+    readonly blendMode?: BlendMode+  }++  interface TextSublayerNode {

Could you try to deduplicate this with properties already in TextNode?

SimplyAhmazing

comment created time in 2 months

PullRequestReviewEvent
PullRequestReviewEvent