Skip to content

Commit

Permalink
chore: rename, auth URL
Browse files Browse the repository at this point in the history
  • Loading branch information
ctjlewis committed May 25, 2023
1 parent 0a10441 commit d6e835d
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
26 changes: 13 additions & 13 deletions packages/upg/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
```

This is an initial public release. It will be ugly. Please send feedback to
[`@gptlabs` on Twitter](https://twitter.com/gptlabs).
[`@SpellcraftAI` on Twitter](https://twitter.com/SpellcraftAI).

## What is UPG?

Expand All @@ -26,13 +26,13 @@ execute the output file.
Using Yarn:

```bash
yarn global add @gptlabs/upg
yarn global add @spellcraft/upg
```

Using NPM:

```bash
npm i -g @gptlabs/upg
npm i -g @spellcraft/upg
```

After installing, you can update with `upg update`.
Expand Down Expand Up @@ -65,11 +65,11 @@ for Linux, and `cmd` for Windows.
1. Generating `ffmpeg` spaghetti to convert all `.mov` files in the current
directory to `.mp4`:

![](https://github.com/gptlabs/tools/raw/master/packages/upg/assets/ffmpeg.gif)
![](https://github.com/SpellcraftAI/tools/raw/master/packages/upg/assets/ffmpeg.gif)

2. Converting screen recordings of these demos to `.gif` for use in this README:

![](https://github.com/gptlabs/tools/raw/master/packages/upg/assets/ffmpeg-gif.gif)
![](https://github.com/SpellcraftAI/tools/raw/master/packages/upg/assets/ffmpeg-gif.gif)

## Example: Other programs

Expand All @@ -79,14 +79,14 @@ You can generate programs for any language.

An oldie but a goodie.

![](https://github.com/gptlabs/tools/raw/master/packages/upg/assets/mandelbrot.gif)
![](https://github.com/SpellcraftAI/tools/raw/master/packages/upg/assets/mandelbrot.gif)

### Generating and demonstrating the Y combinator function

Also adds a demo, and executes using [TS
Module](https://github.com/tsmodule/tsmodule)¹.

![](https://github.com/gptlabs/tools/raw/master/packages/upg/assets/ycombinator.gif)
![](https://github.com/SpellcraftAI/tools/raw/master/packages/upg/assets/ycombinator.gif)

<sub>¹ Similar to `ts-node`, but won't throw on account of type errors.
You'll need to install `@tsmodule/tsmodule` for now to run TS.</sub>
Expand All @@ -112,7 +112,7 @@ Finally, once it converged on a working solution, it was asked to optimize
performance using the **Edit** command: `refactor: make it faster`. (For
some reason, that spell works very well for performance optimization.)

![](https://github.com/gptlabs/tools/raw/master/packages/upg/assets/min-edit.png)
![](https://github.com/SpellcraftAI/tools/raw/master/packages/upg/assets/min-edit.png)

### Converting to other languages

Expand All @@ -124,7 +124,7 @@ language context will not automatically change yet - in the meantime, use

Translates the Y combinator output above.

![](https://github.com/gptlabs/tools/raw/master/packages/upg/assets/yc.gif)
![](https://github.com/SpellcraftAI/tools/raw/master/packages/upg/assets/yc.gif)


#### Translating comments
Expand All @@ -138,7 +138,7 @@ fluently. See examples below for even harder language targets.
Translates the comments in the generated minimum edit distance
solution to English.

![](https://github.com/gptlabs/tools/raw/master/packages/upg/assets/translate.png)
![](https://github.com/SpellcraftAI/tools/raw/master/packages/upg/assets/translate.png)

**Difficulty: HARD**

Expand All @@ -153,7 +153,7 @@ begin", "to initiate"), due to it looking closer to English
[`initialize`](https://en.wiktionary.org/wiki/initialize). But it
remains a reliable transation more or less.

![](https://github.com/gptlabs/tools/raw/master/packages/upg/assets/latin.png)
![](https://github.com/SpellcraftAI/tools/raw/master/packages/upg/assets/latin.png)

**Difficulty: SUICIDE**

Expand All @@ -163,7 +163,7 @@ language with approximately 180,000 native speakers.
It seems to drop the macrons (e.g. ā) due to code comments almost
always being ASCII only.

![](https://github.com/gptlabs/tools/raw/master/packages/upg/assets/maori.png)
![](https://github.com/SpellcraftAI/tools/raw/master/packages/upg/assets/maori.png)

## Example: Explanations

Expand All @@ -179,7 +179,7 @@ The following explanation was generated:
> transform one string into another. The program uses a dynamic programming
> approach to solving the problem.
![](https://github.com/gptlabs/tools/raw/master/packages/upg/assets/explain.png)
![](https://github.com/SpellcraftAI/tools/raw/master/packages/upg/assets/explain.png)

## Known issues

Expand Down
6 changes: 3 additions & 3 deletions packages/upg/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@gptlabs/upg",
"name": "@spellcraft/upg",
"description": "A terminal utility for generating, editing, and executing programs in any language.",
"keywords": [
"UPG",
Expand Down Expand Up @@ -50,6 +50,6 @@
},
"repository": {
"type": "git",
"url": "https://github.com/gptlabs/tools.git"
"url": "https://github.com/SpellcraftAI/tools.git"
}
}
}
2 changes: 1 addition & 1 deletion packages/upg/src/commands/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { CANARY } from "../globs/shared";

export const updateCommand = async () => {
const DEBUG = createDebugLogger(updateCommand);
const packageName = CANARY ? "@gptlabs/upg@canary" : "@gptlabs/upg";
const packageName = CANARY ? "@spellcraft/upg@canary" : "@spellcraft/upg";

if (CANARY) {
log("Installing canary version.");
Expand Down
2 changes: 1 addition & 1 deletion packages/upg/src/globs/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const SUBSCRIPTION_LOCK = true;
*/
export const PACKAGE_JSON = await getPackageJson();
if (!PACKAGE_JSON) {
throw new Error("Failed to get package.json. Please report this: https://twitter.com/gptlabs");
throw new Error("Failed to get package.json. Please report this: https://twitter.com/SpellcraftAI");
}

/**
Expand Down
4 changes: 2 additions & 2 deletions packages/upg/src/utils/checkSubscription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { getPackageJsonValue } from "../packageJson";
export const checkSubscription = async () => {
const version = await getPackageJsonValue("version");
if (!version) {
throw new Error("Failed to get version. Please report this: https://twitter.com/gptlabs");
throw new Error("Failed to get version. Please report this: https://twitter.com/SpellcraftAI");
}

const searchParams = new URLSearchParams({ version });
Expand All @@ -15,7 +15,7 @@ export const checkSubscription = async () => {
.then(res => res.json()) as any;

if (typeof result.subscription !== "boolean") {
throw new Error(result?.error ?? "Failed to check subscription. Please report this: https://twitter.com/gptlabs");
throw new Error(result?.error ?? "Failed to check subscription. Please report this: https://twitter.com/SpellcraftAI");
}

return result.subscription;
Expand Down

0 comments on commit d6e835d

Please sign in to comment.