-
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 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 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 { |
This file contains 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 fs = require('fs'); | |
const qs = require('querystring'); | |
const https = require('https'); | |
const query = { | |
key: fs.readFileSync('/home/jcreed/private/maps-api2', 'utf8').replace(/\n/g, ''), | |
input: "chipotle", | |
inputtype: "textquery", | |
fields: "formatted_address,name", | |
location: "40.7831,-73.9712", // manhattan |
This file contains 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
#include <stdio.h> | |
#define GOOD1 99586915107664152904966939075856564224.0 | |
#define GOOD2 298759386401549014052982412761733529600.0 | |
#define BAD 298759406683958617704652836708984815616.0 | |
int isGood(float x) { | |
return 1.0 / (1.0 / x) == x; | |
} | |
float disc(float x) { |
This file contains 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 Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>> | |
type Elim<T extends { t: string }, U extends string> = T extends { t: U } ? never : T; | |
type Choose<T extends { t: string }, U extends string> = T extends { t: U } ? T : never; | |
type Prog<T, U> = { k: 'src', v: T } | { k: 'ans', v: U }; | |
interface PreMatcher<T extends { t: string }> { | |
cas<S extends string, U>(tag: S, f: (x: Omit<Choose<T, S>, 't'>) => U): Matcher<Elim<T, S>, U>; | |
} | |
interface Matcher<T extends { t: string }, U> { |
This file contains 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 Lang = 'en' | 'es'; | |
type Intl<T> = { | |
forms: { new_form: T }, | |
hello: T | |
}; | |
type Dict<T extends string, U> = { [k in T]: U }; | |
type LangDataIn = Dict<Lang, Intl<string>>; | |
type LangDataOut = Intl<Dict<Lang, string>>; |
This file contains 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 { range, sum, uniq } from './util'; | |
function paths(s) { | |
function swap(s, n) { | |
const sc = [].concat(s); | |
const tmp = sc[n]; | |
sc[n] = sc[n + 1]; | |
sc[n + 1] = tmp; | |
return sc; | |
} |