Skip to content

Instantly share code, notes, and snippets.

@jezell
jezell / action.yaml
Last active March 26, 2025 09:16
Build Flutter Engine
# .github/actions/build-engine/action.yml
name: ""
description: "Build the engine with a specific gclient setup and config name"
inputs:
gclient:
description: "gclient name"
required: false
default: ""
config_name:
description: "name of a valid et config"
@jezell
jezell / error.txt
Created March 21, 2025 01:11
openai error
INFO:room_server:llm.output: {'context': 'd78a95ab-1e6c-4d6d-bc5a-2740f480703f', 'participant_id': '06eea232-f000-4daa-9066-1e7d3767bb17', 'participant_name': 'coder', 'response': {'item': {'id': 'msg_67dcbc10a9248191809772c5d9862c020450ddcac89f65d4', 'content': [{'annotations': [], 'text': "Sure! I'll add four more pages to your website. I'll include links to these pages from the main page and provide basic content for each one.\n\nThe pages will include:\n\n1. **About**\n2. **Projects**\n3. **Blog**\n4. **Contact**\n\nI'll create the files now.", 'type': 'output_text'}], 'role': 'assistant', 'status': 'completed', 'type': 'message'}, 'output_index': 0, 'type': 'response.output_item.done'}}
INFO:websocket-server:SSE chunk received: event: response.function_call_arguments.delta
data: {"type":"response.function_call_arguments.delta","item_id":"fc_67dcbc116b9c8191a8e703b496f5bdc30450ddcac89f65d4","output_index":1,"delta":"\","}
event: response.function_call_arguments.delta
data: {"type":"response.function_cal
@jezell
jezell / bug.py
Created March 16, 2025 01:56
openai_parallel_tool_call_id_bug.md
from openai import AsyncOpenAI
import os
import asyncio
openai=AsyncOpenAI(
api_key=os.getenv("OPENAI_API_KEY")
)
async def run():

That sounds like an ambitious and exciting project! I'll research how to upgrade the SkWasm renderer to use Skia Graphite and adapt it to run natively on iOS. This will involve understanding the SkWasm renderer, Skia Graphite integration, and modifying the Flutter engine for iOS compatibility. I'll get back to you with a detailed breakdown and potential implementation steps.

Upgrading Flutter’s SkWasm Renderer to Skia Graphite (with iOS Native Integration)

Introduction

Flutter’s SkWasm renderer is a new WebAssembly-based rendering backend that uses Skia for Flutter Web apps. It aims to reduce download size and enable multi-threaded rendering on the web (Web renderers | Flutter). Meanwhile, Skia Graphite is an upcoming Skia rendering architecture designed for modern graphics APIs (Metal, Vulkan, WebGPU) to replace Skia’s traditional GPU backend (Ganesh) ([Switch from Ganesh to G

@app.cls(concurrency_limit=1, allow_concurrent_inputs=1)
class RoomProvisioner:
project_id: str = modal.parameter()
room_name: str = modal.parameter()
sandbox = None
@modal.web_endpoint()
def lookup(self):
@jezell
jezell / flutter matrix build.yaml
Last active February 22, 2025 00:27
matrix build
name: Build Flutter Engine with Engine Tool (Matrix)
on:
push:
branches: [ "main", "engine-builds" ]
pull_request:
branches: [ "main", "engine-builds" ]
env:
# don't try to install google's internal copy of visual studio
DEPOT_TOOLS_WIN_TOOLCHAIN: 0

Overview

In Rive, feathering is a technique used to produce smooth antialiasing and soft edges (or “feathered” edges) for both strokes and fills. Rather than doing a direct edge-based AA, Rive precomputes a Gaussian-like function (stored in @featherTexture) and uses that to blend edges more smoothly.

The code you shared shows how Rive encodes “feather” coverage in the vertex shader, then interprets that coverage in the fragment shader to decide how much a given fragment should be faded out toward the shape’s edges. Below is a step-by-step explanation of how it all comes together.


1. Coverage Encoding and Classification

name: Build Flutter Engine with Engine Tool
on:
# Run on push or pull requests, modify to your needs.
push:
branches: [ "main", "engine-builds" ]
pull_request:
branches: [ "main", "engine-builds" ]
jobs:

In Flutter, the “cursor” you see when typing into a TextField (or any other text input widget) is actually drawn (painted) by a lower-level rendering object called RenderEditable, which lives inside an EditableText widget. Here is a conceptual overview of how it works:


1. The hierarchy under the hood

  1. TextField:
    The high-level widget most developers use. It wraps lower-level widgets to handle text input, focus, styling, etc.

  2. EditableText:

@jezell
jezell / monorepo.md
Created January 15, 2025 08:01
Monorepo engine buidls

Below is an example GitHub Actions workflow updated for the new monorepo structure, where the former Engine repository now resides inside an engine/ folder in the main Flutter repository. This assumes you still want to build the native engine artifacts (e.g., for Linux, Windows, macOS, iOS, Android, Web) using GN + Ninja (i.e., the Chromium-based build system).

Important: The monorepo is still in flux as of this writing. The steps below might require adjustments based on the latest official instructions from the Flutter repository. The general ideas—installing depot_tools, running gclient sync, running gn gen, and then ninja—remain the same, but you may need to tweak paths and GN args.


1. Workflow Overview

  1. Check out the main Flutter repo (which contains engine/ folder).
  2. Install dependencies needed for building the engine, including [depot_tools](https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/