From 9c9cf328b9a38045e980eda26818326d1a0d68c7 Mon Sep 17 00:00:00 2001 From: Shu Uesugi Date: Tue, 29 Oct 2019 21:19:58 -0700 Subject: [PATCH 01/11] Continue revising 5 --- scripts/lib/runnerConfigs.ts | 12 +++ src/components/Runners/Zynf.tsx | 12 +++ src/components/Runners/fakeIndex.ts | 1 + src/components/Runners/index.ts | 1 + src/contents/5.en.tsx | 42 +++++----- src/contents/5.jp.tsx | 17 ++++ src/lib/runners/zynf.json | 115 ++++++++++++++++++++++++++++ 7 files changed, 180 insertions(+), 20 deletions(-) create mode 100644 src/components/Runners/Zynf.tsx create mode 100644 src/lib/runners/zynf.json diff --git a/scripts/lib/runnerConfigs.ts b/scripts/lib/runnerConfigs.ts index eecc73915..00670394c 100644 --- a/scripts/lib/runnerConfigs.ts +++ b/scripts/lib/runnerConfigs.ts @@ -106,6 +106,18 @@ export const qfbk: ExpressionRunnerShorthandConfig = { explanationsVisibility: 'visible' } +export const zynf: ExpressionRunnerShorthandConfig = { + runner: 'simple', + initialExpressionContainer: initialExpressionContainers.lqti, + initialState: 'showFuncBound', + showAllShowSteps: true, + showPriorities: true, + highlightOverrides: { + c: 'active' + }, + highlightOverrideActiveAfterStart: true +} + export const yfwd: ExpressionRunnerShorthandConfig = { runner: 'simple', initialExpressionContainer: initialExpressionContainers.lqti, diff --git a/src/components/Runners/Zynf.tsx b/src/components/Runners/Zynf.tsx new file mode 100644 index 000000000..3c24f4448 --- /dev/null +++ b/src/components/Runners/Zynf.tsx @@ -0,0 +1,12 @@ +import React from 'react' +import ExpressionRunnerPrecomputed from 'src/components/ExpressionRunnerPrecomputed' +import config from 'src/lib/runners/zynf.json' + +const Zynf = ({ children }: { children?: React.ReactNode }) => ( + // @ts-ignore + + {children} + +) + +export default Zynf diff --git a/src/components/Runners/fakeIndex.ts b/src/components/Runners/fakeIndex.ts index 0c9e2f429..9e92c0481 100644 --- a/src/components/Runners/fakeIndex.ts +++ b/src/components/Runners/fakeIndex.ts @@ -11,6 +11,7 @@ export { default as Qwzy } from 'src/components/FakeRunner' export { default as Igrl } from 'src/components/FakeRunner' export { default as Uppk } from 'src/components/FakeRunner' export { default as Qfbk } from 'src/components/FakeRunner' +export { default as Zynf } from 'src/components/FakeRunner' export { default as Yfwd } from 'src/components/FakeRunner' export { default as Wcer } from 'src/components/FakeRunner' export { default as Dhzf } from 'src/components/FakeRunner' diff --git a/src/components/Runners/index.ts b/src/components/Runners/index.ts index de3ee3c8c..06fb7bd3b 100644 --- a/src/components/Runners/index.ts +++ b/src/components/Runners/index.ts @@ -11,6 +11,7 @@ export { default as Qwzy } from 'src/components/Runners/Qwzy' export { default as Igrl } from 'src/components/Runners/Igrl' export { default as Uppk } from 'src/components/Runners/Uppk' export { default as Qfbk } from 'src/components/Runners/Qfbk' +export { default as Zynf } from 'src/components/Runners/Zynf' export { default as Yfwd } from 'src/components/Runners/Yfwd' export { default as Wcer } from 'src/components/Runners/Wcer' export { default as Dhzf } from 'src/components/Runners/Dhzf' diff --git a/src/contents/5.en.tsx b/src/contents/5.en.tsx index 857db4710..9c86d392f 100644 --- a/src/contents/5.en.tsx +++ b/src/contents/5.en.tsx @@ -1324,8 +1324,8 @@ export default () => (

- 🤔 Now, you might be wondering: What - labels do we use? + 🤔 Now, you might be wondering:{' '} + What labels do we use?

( , ]} - description={ - <> - What labels do we use? - - } + description={<>What labels do we use?} />

First: The top will be @@ -1353,8 +1349,8 @@ export default () => (

- >Third: The right and - the right will be labeled as{' '} + Third: The right and the + right will be labeled as{' '} .

@@ -1387,14 +1383,23 @@ export default () => ( , even though it looks like it’s in the middle.

+ + The right will be{' '} + +
+ because it touches the right edge +
) } ]} />

- Finally, the remaining will be - labeled as{' '} + Finally: The remaining {' '} + will be labeled as{' '} .

@@ -1425,8 +1430,8 @@ export default () => ( {' '} - for those items. + /> + .

@@ -1602,15 +1607,11 @@ export default () => ( It’s similar to the one that was used for the quiz, except… - + There’s no pair of{' '} 1’s on the left edge. - - - - So there’s only one inner pair of{' '} - 1’s. + @@ -1650,7 +1651,8 @@ export default () => ( content: ( <>

- Next, take a look at this + Next: Take a look at this{' '} +

There’s only one item (a )
diff --git a/src/contents/5.jp.tsx b/src/contents/5.jp.tsx index 50b13f67f..150b85103 100644 --- a/src/contents/5.jp.tsx +++ b/src/contents/5.jp.tsx @@ -1300,6 +1300,23 @@ export default () => ( んだ。

+ + 弁当箱の右端に接している料理には +
+ すべて{' '} + {' '} + の印がつくので +
+ 右の にも{' '} + {' '} + がつく +
) } diff --git a/src/lib/runners/zynf.json b/src/lib/runners/zynf.json new file mode 100644 index 000000000..01d8c1c10 --- /dev/null +++ b/src/lib/runners/zynf.json @@ -0,0 +1,115 @@ +{ + "expressionContainers": [ + { + "expression": { + "arg": { + "name": "a", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "callArg", + "type": "variable", + "argPriorityAgg": [ + 1 + ], + "funcPriorityAgg": [], + "emphasizePriority": true, + "bound": true, + "maxNestedFunctionDepth": 0 + }, + "func": { + "arg": { + "name": "b", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "funcArg", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": true, + "bound": false, + "maxNestedFunctionDepth": 0 + }, + "body": { + "arg": { + "name": "b", + "highlightType": "highlighted", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "funcBound", + "type": "variable", + "argPriorityAgg": [ + 1 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true, + "maxNestedFunctionDepth": 0 + }, + "func": { + "arg": { + "name": "c", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": false, + "maxNestedFunctionDepth": 0 + }, + "body": { + "name": "c", + "highlightType": "highlighted", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "funcBound", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true, + "maxNestedFunctionDepth": 0 + }, + "type": "function", + "maxNestedFunctionDepth": 1 + }, + "state": "default", + "type": "call", + "priority": 1, + "maxNestedFunctionDepth": 1 + }, + "type": "function", + "maxNestedFunctionDepth": 2 + }, + "state": "showFuncBound", + "type": "call", + "priority": 1, + "maxNestedFunctionDepth": 2 + }, + "previouslyChangedExpressionState": "showFuncBound", + "activePriority": 1, + "containerState": "stepped", + "numLeafNodes": 3 + } + ], + "speed": 1, + "hideControls": true, + "explanationsVisibility": "hidden", + "hidePriorities": false, + "hideRunButton": false, + "hideBottomRightBadges": false, + "skipToTheEnd": false, + "hideFuncUnboundBadgeOnExplanation": false, + "highlightOverridesCallArgAndFuncUnboundOnly": false, + "bottomRightBadgeOverrides": {}, + "highlightOverrides": { + "c": "active" + }, + "highlightOverrideActiveAfterStart": true, + "highlightFunctions": false, + "showAllShowSteps": true, + "showBottomProgressBar": false +} From 190c94b0154f3a7b49a738e11f1197f24a96cf05 Mon Sep 17 00:00:00 2001 From: Shu Uesugi Date: Tue, 29 Oct 2019 21:20:49 -0700 Subject: [PATCH 02/11] =?UTF-8?q?bentobox=20=E2=86=92=20lunchbox?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/H.tsx | 14 +++++++------- src/contents/16.jp.tsx | 4 ++-- src/contents/3.en.tsx | 26 +++++++++++++------------- src/contents/3.jp.tsx | 28 ++++++++++++++-------------- src/contents/4.en.tsx | 12 ++++++------ src/contents/4.jp.tsx | 14 +++++++------- src/contents/5.en.tsx | 16 ++++++++-------- src/contents/5.jp.tsx | 22 +++++++++++----------- src/contents/6.en.tsx | 4 ++-- src/contents/6.jp.tsx | 6 +++--- src/contents/7.en.tsx | 2 +- src/contents/7.jp.tsx | 2 +- src/contents/9.jp.tsx | 2 +- 13 files changed, 76 insertions(+), 76 deletions(-) diff --git a/src/components/H.tsx b/src/components/H.tsx index 7bff5c91f..861310c8f 100644 --- a/src/components/H.tsx +++ b/src/components/H.tsx @@ -72,7 +72,7 @@ interface HProps { | { name: 'yesNoQuizCorrectPostfix' } | { name: 'yesNoQuizIncorrectPostfix'; isYes: boolean } | { - name: 'bentoBoxPuzzle' + name: 'lunchBoxPuzzle' capitalize?: true indefinite?: true postfix?: string @@ -102,7 +102,7 @@ interface HProps { | { name: 'pageUnderConstructionTitle' } | { name: 'question' } | { name: 'whatHappensAtTheEndQuestion' } - | { name: 'lookAtThisBentoBox'; lowerCase?: true } + | { name: 'lookAtThisLunchBox'; lowerCase?: true } | { name: 'pressRun' skipColon?: boolean @@ -136,7 +136,7 @@ interface HProps { type: 'condition' | 'trueCase' | 'falseCase' capitalize?: true } - | { name: 'lookAtThisBentoBoxPuzzle' } + | { name: 'lookAtThisLunchBoxPuzzle' } | { name: 'convertToMathbox'; lowerCase?: true } | { name: 'undoConvertToMathbox' } | { name: 'doneConvertToMathbox' } @@ -384,7 +384,7 @@ const H = ({ args, highlightType, episodeNumberOverrides }: HProps) => { ) } } - if (args.name === 'bentoBoxPuzzle') { + if (args.name === 'lunchBoxPuzzle') { if (locale === 'en') { return ( <> @@ -831,7 +831,7 @@ const H = ({ args, highlightType, episodeNumberOverrides }: HProps) => { ) } } - if (args.name === 'lookAtThisBentoBox') { + if (args.name === 'lookAtThisLunchBox') { if (locale === 'en') { return <>{args.lowerCase ? 't' : 'T'}ake a look at this lunchbox } else { @@ -1335,7 +1335,7 @@ const H = ({ args, highlightType, episodeNumberOverrides }: HProps) => { } } } - if (args.name === 'lookAtThisBentoBoxPuzzle') { + if (args.name === 'lookAtThisLunchBoxPuzzle') { if (locale === 'en') { return ( <> @@ -1346,7 +1346,7 @@ const H = ({ args, highlightType, episodeNumberOverrides }: HProps) => { return ( <> こちらの - + をご覧ください ) diff --git a/src/contents/16.jp.tsx b/src/contents/16.jp.tsx index 8e1a11139..8eeebd48a 100644 --- a/src/contents/16.jp.tsx +++ b/src/contents/16.jp.tsx @@ -575,7 +575,7 @@ export default () => ( ラムダ計算の記述式は見た目が複雑なので、 - + という形で教えることで、とっつきやすくしていた というわけですね。 @@ -592,7 +592,7 @@ export default () => (
ラムダ計算の記述式は見た目が複雑なので、
- + という形で教える
ことで、とっつきやすくしていた。 diff --git a/src/contents/3.en.tsx b/src/contents/3.en.tsx index b491abeb0..52d6edb8d 100644 --- a/src/contents/3.en.tsx +++ b/src/contents/3.en.tsx @@ -293,7 +293,7 @@ export default () => ( <> @@ -310,7 +310,7 @@ export default () => (

The puzzle you’ll be solving is called{' '} - + .

@@ -376,7 +376,7 @@ export default () => (

Now, take a look at this below. This is an example of{' '} - + .

@@ -388,7 +388,7 @@ export default () => ( (

Yes. It’s called{' '} - + {' '} because it looks like a Japanese lunchbox.

@@ -488,7 +488,7 @@ export default () => ( Now, let’s talk about how we can{' '} {' '} .

@@ -510,7 +510,7 @@ export default () => ( <>

We can {' '} - , just + , just like how we can run a mathbox.{' '} below:

@@ -573,7 +573,7 @@ export default () => ( There’s a specific set of rules for
- . + .
Your task is to figure out what that is!
@@ -609,14 +609,14 @@ export default () => ( { title: ( <> - More examples of + More examples of ), content: ( <>

Let’s take a look at more examples of{' '} - . + .


@@ -813,7 +813,7 @@ export default () => ( />

{' '} - : + :

@@ -838,7 +838,7 @@ export default () => ( <>

{' '} - : + :

@@ -884,7 +884,7 @@ export default () => ( <>

We’ll talk about the patterns of{' '} - on the next page! + on the next page!

( { title: ( <> - + ), content: ( @@ -295,7 +295,7 @@ export default () => (

お前たちに解いてもらうパズルは、{' '} - + というものだ。

@@ -319,7 +319,7 @@ export default () => ( <>

そして、これがその - + だ。

@@ -328,11 +328,11 @@ export default () => ( ]} /> - の一例 + の一例

解説: 上のように、 - + には、実際の弁当箱のように、 四角の中にいくつかマスがあり、それぞれのマスの中に料理が入っています @@ -394,14 +394,14 @@ export default () => ( <>

実はこの - + は、計算箱と密接な関係がある んだが、これについては後に説明する。

とりあえず今は、 - の + について見ていこう。

@@ -425,7 +425,7 @@ export default () => ( <>

- + は、計算箱と同じように することができます。 @@ -513,14 +513,14 @@ export default () => ( title: ( <> 他の - + ), content: ( <>

では、他の - + も見てみましょう。


@@ -712,7 +712,7 @@ export default () => ( <>

これまでに4種類の - + を紹介しましたが、どれも {' '} する際にある法則に従っています。それが分かったかどうか、 @@ -725,7 +725,7 @@ export default () => ( />

{' '} - : + :

@@ -751,7 +751,7 @@ export default () => ( <>

こちらの - を{' '} + を{' '} すると、

@@ -803,7 +803,7 @@ export default () => ( <>

次のページで、 - + の法則を説明します!

( />

Looks like the villagers have figured out the patterns for{' '} - ! + !

( Before going to the next page, we still need to{' '} formalize the rules of{' '} - . + .

@@ -527,7 +527,7 @@ export default () => ( I’ll explain to you the formal, more detailed rules of{' '} - . + .

@@ -556,7 +556,7 @@ export default () => ( { title: ( <> - The formal rules of + The formal rules of ), type: 'summary', @@ -570,7 +570,7 @@ export default () => ( <>

Here are the formal rules of{' '} - . There are{' '} + . There are{' '} four steps:

@@ -1218,7 +1218,7 @@ export default () => ( <>

That’s it for the formal rules of{' '} - . + .

) diff --git a/src/contents/4.jp.tsx b/src/contents/4.jp.tsx index 01fa3d908..2c1c7d417 100644 --- a/src/contents/4.jp.tsx +++ b/src/contents/4.jp.tsx @@ -132,7 +132,7 @@ export default () => ( />

どうやら、ラムダ村の村人たちは - + の法則を見抜いたようです!

(

次に進む前に、 - + の法則を明確にする必要があるからな。

@@ -465,7 +465,7 @@ export default () => (

というわけで、これから - の + 明確な法則を紹介する。 それを理解した上で、さらに複雑なパズルを解いてもらおう。 @@ -491,7 +491,7 @@ export default () => ( { title: ( <> - + の明確な法則 ), @@ -506,7 +506,7 @@ export default () => ( <>

では、 - + の明確な法則をまとめてみよう。全部で 4つのステップがあるぞ。

@@ -544,7 +544,7 @@ export default () => ( <>

それぞれのステップについて、 こちらの - + を使って説明していきます。

@@ -1130,7 +1130,7 @@ export default () => ( <>

以上が、 - + の明確な法則だ。理解できたかな?

diff --git a/src/contents/5.en.tsx b/src/contents/5.en.tsx index 9c86d392f..7f91e747e 100644 --- a/src/contents/5.en.tsx +++ b/src/contents/5.en.tsx @@ -198,7 +198,7 @@ export default () => ( ⚠️ Warning:{' '} ( ]} /> - with{' '} + with{' '} 3 rows ( <>

The first step in solving{' '} - with 3 + with 3 rows is to{' '} focus on the pair of{' '} @@ -984,7 +984,7 @@ export default () => ( content: ( <>

- : + :

@@ -1303,7 +1303,7 @@ export default () => ( content: ( <>

- Take a look at this , which + Take a look at this , which has two pairs of 1 ’s:

@@ -1514,7 +1514,7 @@ export default () => ( content: ( <>

- : + :

@@ -1652,7 +1652,7 @@ export default () => ( <>

Next: Take a look at this{' '} - +

There’s only one item (a )
@@ -1904,7 +1904,7 @@ export default () => ( content: ( <>

- : + :

diff --git a/src/contents/5.jp.tsx b/src/contents/5.jp.tsx index 150b85103..b2c5a1199 100644 --- a/src/contents/5.jp.tsx +++ b/src/contents/5.jp.tsx @@ -171,7 +171,7 @@ export default () => ( <>

ここからは、より複雑な - + を解いてもらおう。たとえば、こういうパズルだ。

@@ -181,7 +181,7 @@ export default () => ( /> 3段の - + ( <>

ではまず、こういった3段の - + の解き方を説明しよう。

@@ -306,7 +306,7 @@ export default () => ( <>

3段の - + を解く際には、まず 左上と左下に 1{' '} @@ -905,7 +905,7 @@ export default () => ( content: ( <>

- : + :

@@ -1037,7 +1037,7 @@ export default () => ( <>

まず、こちらの - + を見てみな。

@@ -1072,7 +1072,7 @@ export default () => ( <>

続いて、こちらの - + を見てみな。

@@ -1212,7 +1212,7 @@ export default () => ( <>

まずは、こちらの - + から見ていきましょう。

@@ -1427,7 +1427,7 @@ export default () => ( content: ( <>

- : + :

@@ -1561,7 +1561,7 @@ export default () => ( <>

続いて、こちらの - + をご覧ください。

@@ -1809,7 +1809,7 @@ export default () => ( content: ( <>

- : + :

diff --git a/src/contents/6.en.tsx b/src/contents/6.en.tsx index a4a241904..cffa1be58 100644 --- a/src/contents/6.en.tsx +++ b/src/contents/6.en.tsx @@ -121,7 +121,7 @@ export default () => ( But: The mathboxes were taken by the devil{' '} 😈. To take them back, we must solve{' '} - + . A lunchbox works as follows:

@@ -945,7 +945,7 @@ export default () => ( previous .

- : + :

) diff --git a/src/contents/6.jp.tsx b/src/contents/6.jp.tsx index e0b664957..66c089e04 100644 --- a/src/contents/6.jp.tsx +++ b/src/contents/6.jp.tsx @@ -113,7 +113,7 @@ export default () => (

奪われた計算箱を取り返すためには、悪魔が出題する - + を解かないといけません。弁当箱には、以下のような法則があります。

@@ -306,7 +306,7 @@ export default () => ( <>

こちらの - + をご覧ください!

@@ -986,7 +986,7 @@ export default () => ( <>

続いて - + 。このページの冒頭で紹介した弁当箱です。

diff --git a/src/contents/7.en.tsx b/src/contents/7.en.tsx index 4ae3dfbf8..455d403e7 100644 --- a/src/contents/7.en.tsx +++ b/src/contents/7.en.tsx @@ -243,7 +243,7 @@ export default () => (

Sure. First,{' '} .

diff --git a/src/contents/7.jp.tsx b/src/contents/7.jp.tsx index 4498de503..9b3c8c188 100644 --- a/src/contents/7.jp.tsx +++ b/src/contents/7.jp.tsx @@ -240,7 +240,7 @@ export default () => ( <>

わかりました。まず、 - 。 +

) diff --git a/src/contents/9.jp.tsx b/src/contents/9.jp.tsx index 90b1f79cb..e4bd323e5 100644 --- a/src/contents/9.jp.tsx +++ b/src/contents/9.jp.tsx @@ -885,7 +885,7 @@ export default () => ( children: ( <>

- + に、「 Date: Tue, 29 Oct 2019 21:55:27 -0700 Subject: [PATCH 03/11] Continue with 5 --- src/components/H.tsx | 5 +- src/contents/11.en.tsx | 2 +- src/contents/2.en.tsx | 2 +- src/contents/3.en.tsx | 4 +- src/contents/4.en.tsx | 4 +- src/contents/5.en.tsx | 182 ++++++++++++++++++++++++++--------------- src/contents/6.en.tsx | 5 +- 7 files changed, 131 insertions(+), 73 deletions(-) diff --git a/src/components/H.tsx b/src/components/H.tsx index 861310c8f..1e2a60d94 100644 --- a/src/components/H.tsx +++ b/src/components/H.tsx @@ -64,7 +64,7 @@ interface HProps { includeTwitter?: boolean } | { name: 'pressNext' } - | { name: 'yesNoQuiz'; postfix?: string } + | { name: 'yesNoQuiz'; postfix?: string; lowerCase?: true } | { name: 'yesNoQuizCorrect' } | { name: 'yesNoQuizIncorrect' } | { name: 'yesNoQuizYes'; hideText?: boolean } @@ -276,7 +276,8 @@ const H = ({ args, highlightType, episodeNumberOverrides }: HProps) => { if (locale === 'en') { return ( <> - 👍 Yes / 👎 No Quiz{args.postfix} + 👍 Yes / 👎 No{' '} + {args.lowerCase ? 'q' : 'Q'}uiz{args.postfix} ) } else { diff --git a/src/contents/11.en.tsx b/src/contents/11.en.tsx index fcea864af..dcd34ea91 100644 --- a/src/contents/11.en.tsx +++ b/src/contents/11.en.tsx @@ -650,7 +650,7 @@ export default () => (

I’ll show you another example. This one’s going to be a{' '} - + .{' '}

diff --git a/src/contents/2.en.tsx b/src/contents/2.en.tsx index 3ad1b13d8..3b3505e66 100644 --- a/src/contents/2.en.tsx +++ b/src/contents/2.en.tsx @@ -180,7 +180,7 @@ export default () => ( We’ll start this page with a{' '} - + . {' '} diff --git a/src/contents/3.en.tsx b/src/contents/3.en.tsx index 52d6edb8d..85e1ebf93 100644 --- a/src/contents/3.en.tsx +++ b/src/contents/3.en.tsx @@ -771,7 +771,9 @@ export default () => (

Alright.{' '} - Let’s do a then. + Let’s do a{' '} + {' '} + then.

diff --git a/src/contents/4.en.tsx b/src/contents/4.en.tsx index d8525c42e..2259a9e95 100644 --- a/src/contents/4.en.tsx +++ b/src/contents/4.en.tsx @@ -260,7 +260,7 @@ export default () => ( <>

So this is the solution for the first{' '} - : + :

) @@ -338,7 +338,7 @@ export default () => ( <>

So this is the solution for the second{' '} - : + :

) diff --git a/src/contents/5.en.tsx b/src/contents/5.en.tsx index 7f91e747e..4debf445b 100644 --- a/src/contents/5.en.tsx +++ b/src/contents/5.en.tsx @@ -329,7 +329,13 @@ export default () => ( Then:{' '} I will give you{' '} - {' '} + {' '} to solve. @@ -953,7 +959,7 @@ export default () => ( Let’s do a{' '} - + {' '} to check your understanding! @@ -1223,7 +1229,14 @@ export default () => (

After explaining them, I’ll give you more{' '} - ! + + !

) @@ -1303,8 +1316,8 @@ export default () => ( content: ( <>

- Take a look at this , which - has two pairs of 1 + Take a look at this lunchbox, which has two pairs of{' '} + 1 ’s:

@@ -1494,7 +1507,8 @@ export default () => ( <>

Yes. Hope you were following along!

- Let’s do a now. + Let’s do a{' '} + now.

) @@ -1651,8 +1665,7 @@ export default () => ( content: ( <>

- Next: Take a look at this{' '} - + Next: Take a look at this lunchbox:

There’s only one item (a )
@@ -1665,8 +1678,12 @@ export default () => ( children: ( <>

- Notice that there’s only one item (a{' '} - ) on the bottom row. + Notice that{' '} + + there’s only one item (a ) + on the bottom row + + .

) @@ -1676,8 +1693,11 @@ export default () => ( children: ( <>

- Okay… let’s assume that we start with the pair of{' '} - 1’s. + Okay…{' '} + + let’s see what happens if we start with the pair of{' '} + 1’s. +

) @@ -1692,8 +1712,10 @@ export default () => ( ]} description={ <> - Suppose that we start with the pair of{' '} - 1’s… + What happens if we start with +
+ the pair of 1 + ’s? } /> @@ -1704,20 +1726,23 @@ export default () => ( children: ( <>

- Then, which label (out of{' '} - {' '} - {' '} - - ) should we use for the ? + I’m wondering:{' '} + + Which label (out of{' '} + {' '} + {' '} + + ) should we use for the ? +

) @@ -1749,16 +1774,21 @@ export default () => ( <> Can’t use any of the labels for the
- + , because +
+ it’s the only item on the bottom row } />

- Therefore: In this scenario,{' '} - - you can’t start with the pair of{' '} - 1’s. - + Therefore:{' '} + + In this scenario,{' '} + + you can’t start with the pair of{' '} + 1’s. + +

Can’t start with the pair of{' '} @@ -1804,43 +1834,53 @@ export default () => ( 2’s, - You’ll be looking at{' '} - just the top two rows, and… + + We can label the on the + top as{' '} + + , and… + - There are two items () on - the bottom, which can be labeled as{' '} - {' '} - and{' '} - - . + + There are two items () + on the bottom, which can be labeled as{' '} + {' '} + and{' '} + + . + - - ) - }, - { - type: 'devil', - children: ( - <> -

Exactly. Here are the labels for each item:

+ + Adding labels:{' '} + {' '} + {' '} + + ) } ]} /> - - Adding labels:{' '} - {' '} - {' '} - -

The rest is simple.

@@ -2024,6 +2064,14 @@ export default () => (

) + }, + { + type: 'smile', + children: ( + <> +

Ok, got it!

+ + ) } ]} /> @@ -2043,8 +2091,14 @@ export default () => ( <>

I solved all of the{' '} - so - far! + {' '} + so far!

) diff --git a/src/contents/6.en.tsx b/src/contents/6.en.tsx index cffa1be58..81abf9a12 100644 --- a/src/contents/6.en.tsx +++ b/src/contents/6.en.tsx @@ -463,7 +463,7 @@ export default () => ( Let’s do a{' '} - + {' '} to check your understanding! @@ -942,7 +942,8 @@ export default () => ( <>

Let’s try to apply the rules on the lunchbox from the - previous . + previous{' '} + .

: From 120a6102cff51e2c44cec906397a503e33eb418d Mon Sep 17 00:00:00 2001 From: Shu Uesugi Date: Tue, 29 Oct 2019 22:02:57 -0700 Subject: [PATCH 04/11] Continue with 6 --- src/contents/6.en.tsx | 11 ++++++----- src/contents/6.jp.tsx | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/contents/6.en.tsx b/src/contents/6.en.tsx index 81abf9a12..b6c27993e 100644 --- a/src/contents/6.en.tsx +++ b/src/contents/6.en.tsx @@ -34,7 +34,7 @@ export default () => ( content: ( <>

- Welcome to the intermediate levels: They’ll be + Welcome to the intermediate levels: Things will be harder than the beginner levels, but you should be able to handle them!

@@ -131,17 +131,18 @@ export default () => (

We also learned about the mathboxes with 3 or more rows:

+ Lunchbox with 3 rows

- That’s what we’ve learned in the beginner levels:{' '} - You don’t need to remember them. You just need to - know that these rules exist, and you should be fine. + Note:{' '} + You don’t need to memorize the rules. You + just need to know that these rules exist, and you should be fine.

You don’t need to remember these rules!} + description={<>You don’t need to memorize these rules!} />

Let’s start the intermediate levels!

diff --git a/src/contents/6.jp.tsx b/src/contents/6.jp.tsx index 66c089e04..79e37e8be 100644 --- a/src/contents/6.jp.tsx +++ b/src/contents/6.jp.tsx @@ -124,6 +124,7 @@ export default () => ( そして初級編の最後では、3段以上ある弁当箱の法則について解説しました。

+ 3段の弁当箱

From a60087620bb31a39447a53d61cbe1ff0d094a124 Mon Sep 17 00:00:00 2001 From: Shu Uesugi Date: Tue, 29 Oct 2019 22:10:01 -0700 Subject: [PATCH 05/11] Continue with 6 --- src/contents/6.en.tsx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/contents/6.en.tsx b/src/contents/6.en.tsx index b6c27993e..62d119ef9 100644 --- a/src/contents/6.en.tsx +++ b/src/contents/6.en.tsx @@ -160,9 +160,12 @@ export default () => ( <>

We’ll start the intermediate levels.

- As promised: I’ll give you a{' '} - very difficult question. I’ll give you - the mathboxes back if you solve it! + As promised:{' '} + + I’ll give you a{' '} + very difficult question. I’ll give + you the mathboxes back if you solve it! +

) @@ -199,7 +202,7 @@ export default () => ( <>

But before I give you the question, let me introduce you{' '} - to my partner. + to my business partner.

) @@ -208,7 +211,7 @@ export default () => ( type: 'thinking', children: ( <> -

What? Your partner?

+

What? Your business partner?

) }, @@ -250,7 +253,8 @@ export default () => ( children: ( <>

- Thanks for coming! Everyone, this is my partner, Minion. + Thanks for coming! Everyone, this is my business + partner, Minion.

) From 3e525c25c8deafb40ece3eb33a37ed93910cd268 Mon Sep 17 00:00:00 2001 From: Shu Uesugi Date: Tue, 29 Oct 2019 22:16:06 -0700 Subject: [PATCH 06/11] Continue with 6 --- src/contents/6.en.tsx | 19 ++++++++++++------- src/contents/6.jp.tsx | 1 - 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/contents/6.en.tsx b/src/contents/6.en.tsx index 62d119ef9..98d768928 100644 --- a/src/contents/6.en.tsx +++ b/src/contents/6.en.tsx @@ -243,7 +243,8 @@ export default () => ( children: ( <>

- Hello, I’m Minion. How may I help you today, Mr. Devil? + Hello, I’m Minion. How may I help you + today, Mr. Devil?

) @@ -272,8 +273,8 @@ export default () => ( children: ( <>

- Well, Minion is not a regular dog. He’s got some{' '} - special tricks. + Well, Minion is a special dog. He’s got some{' '} + awesome tricks.

Minion, show these guys one of your tricks!

@@ -333,9 +334,9 @@ export default () => ( <>

By using my trick,{' '} - + I can convert this lunchbox into a mathbox - + .

@@ -370,7 +371,9 @@ export default () => ( <>

Yes, and importantly:{' '} - The conversion follows a specific rule. + + The conversion follows a specific rule. +

Try guessing what this rule is! @@ -391,7 +394,9 @@ export default () => ( <> I convert a lunchbox into a mathbox, and
- there’s a specific rule for the conversion + + there’s a specific rule for the conversion + } /> diff --git a/src/contents/6.jp.tsx b/src/contents/6.jp.tsx index 79e37e8be..66c089e04 100644 --- a/src/contents/6.jp.tsx +++ b/src/contents/6.jp.tsx @@ -124,7 +124,6 @@ export default () => ( そして初級編の最後では、3段以上ある弁当箱の法則について解説しました。

- 3段の弁当箱

From 071276a52f4aac228d13b2cc60c8d5a289f63dd2 Mon Sep 17 00:00:00 2001 From: Shu Uesugi Date: Tue, 29 Oct 2019 22:24:32 -0700 Subject: [PATCH 07/11] Continue with 6 --- src/contents/6.en.tsx | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/src/contents/6.en.tsx b/src/contents/6.en.tsx index 98d768928..5b5aa0d56 100644 --- a/src/contents/6.en.tsx +++ b/src/contents/6.en.tsx @@ -633,8 +633,11 @@ export default () => (

Important: I can only convert{' '} certain types of lunchboxes into - mathboxes. A lunchbox must match the following patterns - to be convertible. + mathboxes. +

+

+ A lunchbox must match the following patterns to be + convertible.

First:{' '} @@ -703,7 +706,7 @@ export default () => ( children: ( <>

- Let’s now add label each item as 🅰️ or{' '} + Let’s now label each item as 🅰️ or{' '} 🅱️’s using this rule:

@@ -851,10 +854,10 @@ export default () => ( children: ( <>

- + As long as it follows the same pattern, it doesn’t matter which items are used. - +

Example: Suppose that we have{' '} @@ -874,8 +877,8 @@ export default () => ( children: ( <>

- We’ll add 🅰️’s and 🅱️’s as - follows… + We’ll label 🅰️’s and 🅱️’s + as follows…

) @@ -1055,7 +1058,7 @@ export default () => ( <>

That means the number of 🅰️’s on the - bottom right is zero. + bottom right is zero.

So: After converting to a mathbox, it @@ -1081,7 +1084,7 @@ export default () => ( <>

I see, so the number of 🅰️’s on the - bottom right can be zero. + bottom right can be zero.

) @@ -1091,11 +1094,14 @@ export default () => ( children: ( <>

- Right: “Some 🅰️’s” can mean - “Zero 🅰️’s”. + Right:{' '} + + “Some 🅰️’s” can mean “ + Zero 🅰️’s”. +

- “Some 🅰️’s” can mean “ + “Some 🅰️’s” can also mean “ Zero 🅰️’s”. From dc875e277d3d38581b7220a5a77b8161762b5bbb Mon Sep 17 00:00:00 2001 From: Shu Uesugi Date: Tue, 29 Oct 2019 22:47:19 -0700 Subject: [PATCH 08/11] Fix 7 --- src/contents/7.en.tsx | 70 +++++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 32 deletions(-) diff --git a/src/contents/7.en.tsx b/src/contents/7.en.tsx index 455d403e7..2b2a3d311 100644 --- a/src/contents/7.en.tsx +++ b/src/contents/7.en.tsx @@ -94,7 +94,8 @@ export const StepTwo = () => ( Second: We can’t start with the leftmost pair of{' '} 1 ’s because there’s only one item on the bottom (a{' '} - ) + + ).

Therefore,{' '} @@ -127,9 +128,12 @@ export const StepThree = () => ( children: ( <>

- Third: We’ll need to start with the pair of{' '} - 2’s again, just - like the last time. + Third:{' '} + + We’ll need to start with the pair of{' '} + 2’s + {' '} + again, just like the last time.

) @@ -167,7 +171,9 @@ export default () => ( You don’t need to understand everything immediately. Even if you don’t completely get it, please keep reading! - + {' '} + After reading a few more pages, you might understand it.{' '} + 😉

( } /> -

- - There’s a lot of overlapping materials for the next few pages. - {' '} - So even if you have no idea what’s going on, after reading a few - more pages, you might understand it. 😉 -

) }, @@ -260,7 +259,7 @@ export default () => ( children: ( <>

- We learned on the last page that:{' '} + We learned on the last page that{' '} I can convert this lunchbox to{' '} . @@ -348,7 +347,7 @@ export default () => ( children: ( <>

- Now: + Here’s the challenge:

    @@ -379,7 +378,7 @@ export default () => ( After running it, it becomes a lunchbox
    - that can be converted to . + that can be converted to
    ( children: ( <>

    - Now, here’s the challenge: + So, here’s what you need to do:

      @@ -572,9 +571,11 @@ export default () => ( ]} /> + Randomly filled each icon + with +
      {' '} - を適当に{' '} - に入れてみた +
      ( children: ( <>

      - Now, we’ll the above - lunchbox, and… + Now, we’ll {' '} + the above lunchbox, and…

        @@ -607,7 +608,8 @@ export default () => ( ]} /> - We’ll this lunchbox, and… + We’ll this lunchbox, + and… @@ -625,7 +627,8 @@ export default () => ( children: ( <>

        - Ok, let’s it! + Ok, let’s {' '} + it!

        ) @@ -717,9 +720,7 @@ export default () => (

        Now, we want to convert this to a mathbox…

        But unfortunately:{' '} - - I won’t be able to convert this to a mathbox. - + I won’t be able to convert this.

        ) @@ -737,7 +738,7 @@ export default () => ( children: ( <>

        - Why? Because it doesn’t follow this + Why not? Because it doesn’t follow this pattern:

        @@ -749,8 +750,10 @@ export default () => ( />

        - There needs to be exactly one 🅱️ on the - top-right, but that’s not the case here. + + There needs to be exactly one 🅱️ on the + top-right, but that’s not the case here. +

        ) @@ -770,9 +773,12 @@ export default () => ( children: ( <>

        - Hmm… if the top-right was a {' '} - instead of a , it could have - been converted to . + Hmm…{' '} + + if the top-right was a {' '} + instead of a , it could + have been converted to . +

        It was so close!

        @@ -783,7 +789,7 @@ export default () => ( If the top-right was a ,
        - it could have been converted to + it could have been converted to
        From 0574b91d2d62b1c6e9fa90bb6c7fce8aa448149c Mon Sep 17 00:00:00 2001 From: Shu Uesugi Date: Tue, 29 Oct 2019 22:51:24 -0700 Subject: [PATCH 09/11] Fix 7 --- src/contents/7.en.tsx | 13 +++++++------ src/contents/7.jp.tsx | 6 ++---- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/contents/7.en.tsx b/src/contents/7.en.tsx index 2b2a3d311..aa2a60a3a 100644 --- a/src/contents/7.en.tsx +++ b/src/contents/7.en.tsx @@ -811,8 +811,9 @@ export default () => ( children: ( <>

        - So: Because it didn’t become{' '} - at the end… + So: Because it didn’t become a lunchbox + that can be converted to at + the end…

        ) @@ -826,7 +827,7 @@ export default () => ( It didn’t become a lunchbox
        - that can be converted to + that can be converted to
        ( type: 'dog', children: ( <> -

        Therefore, your answer was incorrect!

        +

        Your answer was incorrect!

        ) } @@ -875,7 +876,7 @@ export default () => ( children: ( <>

        - Hopefully you understand what the problem is asking. So + Hopefully you understood what the problem is asking. So let’s state it again:

          @@ -950,7 +951,7 @@ export default () => ( <>

          The villagers are so close to getting their mathboxes back, but - they’re struggling with such a difficult problem. + they’re struggling with the difficult problem.

          ( children: ( <>

          - つまり、実行しても{' '} - {' '} + つまり、実行しても {' '} に変換できる弁当箱にならなかったので…

          @@ -784,8 +783,7 @@ export default () => ( - {' '} - に変換できる弁当箱にならなかった + に変換できる弁当箱にならなかった Date: Tue, 29 Oct 2019 23:01:53 -0700 Subject: [PATCH 10/11] Fix 8 --- src/contents/8.en.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/contents/8.en.tsx b/src/contents/8.en.tsx index 366594067..a06662013 100644 --- a/src/contents/8.en.tsx +++ b/src/contents/8.en.tsx @@ -49,7 +49,7 @@ export default () => ( We’re doomed!, + title: <>The challenge, content: ( <> ( <>

          But we need to solve this to get our mathboxes{' '} - back! We’re doomed! + back!

          ) @@ -143,7 +143,8 @@ export default () => ( <>

          We appreciate it, but this isn’t for kids.

          - We tried hard but couldn’t solve it. So I doubt you can. + We tried hard but couldn’t solve it. I don’t think you + can do it!

          ) @@ -208,7 +209,8 @@ export default () => ( ]} /> - We’ll this lunchbox, and… + We’ll this lunchbox, + and… @@ -277,7 +279,7 @@ export default () => ( type: 'surprised', children: ( <> -

          Wait…! It can’t be…!

          +

          Wait…! This is…!

          ) }, @@ -397,7 +399,7 @@ export default () => ( type: 'thinking', children: ( <> -

          Hmm…?

          +

          Hmm… ok, let me hear what you have to say.

          ) }, From f726184a6c35f95441fb2354058097c26546c6a0 Mon Sep 17 00:00:00 2001 From: Shu Uesugi Date: Tue, 29 Oct 2019 23:17:48 -0700 Subject: [PATCH 11/11] Fix 8 --- src/contents/8.en.tsx | 87 ++++++++++++++++++------------------------- 1 file changed, 37 insertions(+), 50 deletions(-) diff --git a/src/contents/8.en.tsx b/src/contents/8.en.tsx index a06662013..c50633d68 100644 --- a/src/contents/8.en.tsx +++ b/src/contents/8.en.tsx @@ -640,11 +640,11 @@ export default () => ( children: ( <>

          - Let’s it! This time, we’ll - continue running until the end.{' '} + Let’s it! + This time, we’ll continue running until the end without + stopping.{' '}

          - If you can’t wait,{' '}

          @@ -706,7 +706,7 @@ export default () => ( - If we it, + If we it,
          it becomes a lunchbox
          @@ -821,35 +821,19 @@ export default () => ( <>

          Maybe… - + it can add ? - +

          ) }, - { - type: 'dog', - children: ( - <> -

          Exactly!

          - - ) - }, - { - type: 'thinking', - children: ( - <> -

          What do you mean?

          - - ) - }, { type: 'dog', children: ( <>

          - Here’s what I mean: + Exactly!

            @@ -1052,10 +1036,12 @@ export default () => ( -

            I see…, so:

            +

            + So, to add 1 to a number: +

              @@ -1136,9 +1122,10 @@ export default () => ( type: 'saya', children: ( <> +

              I got it!

              - I got it! First, we’ll use this lunchbox that can be - converted to : + First, we’ll use this lunchbox that can be converted to{' '} + :

              ) @@ -1184,8 +1171,9 @@ export default () => ( children: ( <>

              - Correct! Let’s {' '} - it to check! + Correct! Let’s{' '} + it to + check!

              ( @@ -1346,7 +1334,8 @@ export default () => (

              Therefore: There are many lunchboxes that can - reproduce . + reproduce .{' '} + 😉

              } @@ -1446,7 +1435,7 @@ export default () => ( type: 'sad', children: ( <> -

              Hey Minion, I want to tell you about something…

              +

              Hey Minion, I want to tell you something…

              ) }, @@ -1463,8 +1452,10 @@ export default () => ( children: ( <>

              - Wasn’t that problem too difficult?{' '} - There’s no way we could’ve come up with an answer + + The problem on the last page was too difficult! + {' '} + There’s no way we could’ve come up with an answer as quickly as Saya did.

              @@ -1480,7 +1471,7 @@ export default () => ( The previous problem: - 😢 + 😢
              There’s no way we could’ve come up with
              @@ -1493,15 +1484,12 @@ export default () => ( children: ( <>

              - Please don’t worry! In fact, only a super - genius would be able to come up with an answer for this - question. + Oh, don’t worry! The problem was very + difficult. We didn’t expect you to answer it.

              - - And you don’t need to be a super genius to learn about - computer science or Y combinator. - + You don’t need to be able to answer questions like this + to learn computer science.

              ) @@ -1518,14 +1506,10 @@ export default () => ( type: 'dog', children: ( <> -

              - Yes: It was a very difficult question. We - didn’t expect you to answer it. -

              - As long as you can look at the answer and understand - why it’s correct, you’ll be fine. + As long as you understand it after looking at the + answer, you’ll be fine.

              @@ -1577,7 +1561,8 @@ export default () => ( ]} />

              - However, Saya doesn’t seem too happy. + However:{' '} + Saya doesn’t seem too happy.

              ( children: ( <>

              - Hey Minion, I noticed something{' '} - very strange… + + Hey Minion, I noticed something{' '} + very strange… +

              )