I have been waiting a long for this I use Quokka.js but I hate that the free version is almost useless
TypeCell, open source TypeScript notebooks live programming environment
11–20 of 26 posts
Re: TypeCell, open source TypeScript notebooks live programming environment
#12Cool. This may be a bit nitpicky, but most of the interactive JavaScript environments I have seen with auto-run ("evaluates as-you-type"), including this one, freeze in the following case. for (let i = 0; i
Re: TypeCell, open source TypeScript notebooks live programming environment
#13Cool. This may be a bit nitpicky, but most of the interactive JavaScript environments I have seen with auto-run ("evaluates as-you-type"), including this one, freeze in the following case. for (let i = 0; i
(no, I'm not kidding: https://www.npmjs.com/package/halting-problem)
Re: TypeCell, open source TypeScript notebooks live programming environment
#14 type Lazy = () => A;
const lazy = (f: Lazy) => {
let thunk: Lazy = () => { throw null; }
thunk = () => {
const y = f();
thunk = () => y
return y;
};
return thunk;
};
const tap = (f: Lazy) => Lazy>, a: Lazy): Lazy =>
lazy(() => f()(a)());
const ap = (f: any, a: any): any => tap(f, a);
const y = (f : (a: Lazy) => Lazy): Lazy => ap(((x: any) => ap(ap(f, x), x)),((x: any) => ap(ap(f,x),x)));
type Cat = {
name: string,
friend: Cat,
prefersDryFood: boolean,
foodPerWeek: number
};
export const cat = y(self => lazy(() => ({
name: "lol",
friend: self(),
prefersDryFood: false,
foodPerWeek: 4,
})))();
Breaks typescript though. Also, the laziness won't work here.Re: TypeCell, open source TypeScript notebooks live programming environment
#15Trying out the thing, and since this is ycombinator after all: type Lazy = () => A; const lazy = (f: Lazy ) => { let thunk: Lazy = () => { throw null; } thunk = () => { const y = f(); thunk = () => y return y; }; return thunk; }; const tap = (f: Lazy ) => Lazy >, a: Lazy ): Lazy => lazy(() => f()(a)()); const ap = (f: any, a: any): any => tap (f, a); const y = (f : (a: Lazy ) => Lazy ): Lazy => ap(((x: any) => ap(ap(…
return thunk;
with: return () => thunk();
Otherwise the assignment in thunk does nothing.Re: TypeCell, open source TypeScript notebooks live programming environment
#16Re: TypeCell, open source TypeScript notebooks live programming environment
#17One of the great mysteries of life is why Microsoft doesn't provide a good TypeScript notebook for VsCode. The JS notebook plugin is like a toy.
Re: TypeCell, open source TypeScript notebooks live programming environment
#18> Something went wrong: TypeError: Cannot read properties of null (reading 'useRef')
Appears to be an issue with the charting library used here at a glance?
Re: TypeCell, open source TypeScript notebooks live programming environment
#19Trying out the thing, and since this is ycombinator after all: type Lazy = () => A; const lazy = (f: Lazy ) => { let thunk: Lazy = () => { throw null; } thunk = () => { const y = f(); thunk = () => y return y; }; return thunk; }; const tap = (f: Lazy ) => Lazy >, a: Lazy ): Lazy => lazy(() => f()(a)()); const ap = (f: any, a: any): any => tap (f, a); const y = (f : (a: Lazy ) => Lazy ): Lazy => ap(((x: any) => ap(ap(…
Though you need to replace: return thunk; with: return () => thunk(); Otherwise the assignment in thunk does nothing.
Re: TypeCell, open source TypeScript notebooks live programming environment
#20so, observablehq. i like it. what's the pricing, and can you save private docs?