-
Extension cleanup progress feels good, can release soon.
-
Interested in helping with porting Jenkins -> Actions, looking over https://github.com/github/dsp-codeql/issues/27 and https://github.com/github/dsp-codeql/issues/29,
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// for any integer coordinates x, y, returns a float in [0,1] which is | |
// interpreted as threshold a float-valued function should have to | |
// reach in order to make a bitmap pixel. | |
function dither(x: number, y: number): number { | |
return (x == 0 && y == 0 | |
? 0 | |
: ([0, 2, 3, 1][(y % 2) * 2 + (x % 2)] + dither(x >> 1, y >> 1)) / 4); | |
} | |
function tableau(edge: number, f: (x: number, y: number) => number): number[][] { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const SCALE = 3; | |
// return the nth dithering point in an 2ᵏ × 2ᵏ square | |
// n ∈ [0, 4ᵏ - 1] | |
type Point = { x: number, y: number }; | |
function ksquare(k: number): Point[] { | |
if (k == 0) | |
return [{ x: 0, y: 0 }]; | |
else { | |
const prev = ksquare(k - 1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Trying to think about a very modest generalization of the "Kolmogorov Puzzle" that | |
# dan piponi posted here: https://twitter.com/sigfpe/status/1474173467016589323 | |
Consider a directed graph with vertices V and edges E. Loops and multiple edges are allowed. | |
All graphs we consider will have the same vertices, so we more or less identify a graph with | |
its set of edges. | |
For any graph G, we: | |
1) write G[x, y] for the set of edges from x to y in G. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { MeshBuilder } from "@babylonjs/core"; | |
import { ArcRotateCamera } from "@babylonjs/core/Cameras/arcRotateCamera"; | |
import { Engine } from "@babylonjs/core/Engines/engine"; | |
import { HemisphericLight } from "@babylonjs/core/Lights/hemisphericLight"; | |
import { StandardMaterial } from "@babylonjs/core/Materials/standardMaterial"; | |
import { Color3, Color4 } from "@babylonjs/core/Maths/math"; | |
import { Vector3 } from "@babylonjs/core/Maths/math.vector"; | |
import { RibbonBuilder } from "@babylonjs/core/Meshes/Builders/ribbonBuilder"; | |
import { Mesh } from "@babylonjs/core/Meshes/mesh"; | |
import { TransformNode } from "@babylonjs/core/Meshes/transformNode"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Parsing sexpressions and turning them into nested array types, | |
// using template literal types. | |
// Cons a head onto an array type, assuming TL is actually an array type | |
type Cons<H, TL> = TL extends any[] ? [H, ...TL] : unknown; | |
// Interpret type names as types | |
type Interpret<TOK extends string> = | |
TOK extends 'number' ? number : | |
TOK extends 'string' ? string : |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// type Unary = 'Z' | `S${Unary}`; // considered circular | |
// Can implement unary addition and multiplication with template literal types | |
type Plus<T extends string, U extends string> = T extends `S${infer X}` ? `S${Plus<X, U>}` : U; | |
type Times<T extends string, U extends string> = T extends `S${infer X}` ? Plus<U, Times<X, U>> : 'Z'; | |
// Trying to do length-aware vectors as dependent types | |
module Attempt1 { | |
type Vector<T, LEN> = LEN extends `S${infer X}` ? [T, ...Vector<T, X>] : []; |
Even though Project Wall-E may very well mean that I won't be diving aggressively into QL internals in the short term, I'm still interested in hearing what you've been working on, just out of curiosity.
Just to pick a few PRs that I see you've done:
https://git.semmle.com/Semmle/code/pull/36653 I'm kind of interested in how fastTC works at all, not very familiar with that area
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as cp from 'child_process'; | |
type Prop = 'a' | 'b' | [Prop, Prop]; | |
function propToStr(p: Prop): string { | |
if (typeof p === 'string') return p; | |
return `im(${propToStr(p[0])}, ${propToStr(p[1])})`; | |
} | |
function propToStrIleancop(p: Prop): string { |