Conversation
A line-by-line TypeScript port of the Python lessons, meant to be read side by side with them. The Python chapters remain the canonical course; nothing in the teaching structure changes. - 14 `code.ts` files (~11.6k lines) mirroring `sNN_topic/code.py` - `ts/README.md` documents the Python->TypeScript naming map and the 27 deliberate divergences (no `**kwargs`, `splice` for in-place list replacement, `fast-glob` instead of `glob.glob`, etc.) - `tsc --noEmit` passes under `strict` - s12 (cron scheduler), s16 and s17 are not ported The root `.gitignore` gains `node_modules/` so `ts/node_modules/` stays out. AI assistance: written with Claude Code; I have read and stand behind it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A line-by-line TypeScript port of the Python lessons, living in a single top-level
ts/directory, meant to be read side by side with the originals.code.tsfiles (~11.6k lines) mirroringsNN_topic/code.pyts/README.mddocuments the Python→TypeScript naming map and the 27 deliberate divergences (no**kwargs,splicefor in-place list replacement,fast-globinstead ofglob.glob,readline/promisesforinput(), …)tsc --noEmitpasses understrict.gitignoregainsnode_modules/sots/node_modules/stays outWhy this doesn't expand the teaching scope
The Python chapters remain the canonical course. Nothing under
sNN_topic/is touched, no chapter README changes, and no chapter gains or loses a concept. The port is additive and self-contained — deletingts/returns the repo to its exact current state.Where the two languages genuinely cannot be 1:1 (Python's
**kwargs,pathlib.is_relative_to,glob.glob(recursive=True)),ts/README.mdnames the divergence and explains it rather than silently papering over it. The intent is that the gap itself is instructive.Honest caveats
This PR is not tied to an issue, which CONTRIBUTING lists as grounds for closing without detailed review. I'm opening it directly because the artifact is easier to judge than a description of it — but I fully understand if you'd rather I file an issue first and close this. Say the word and I'll do that instead.
Adding a second language is a structural addition, so it's reasonable to not want it at all. A "no thanks, the repo is Python-only by design" is a completely fine outcome and I won't re-litigate it.
Three-language README sync (CONTRIBUTING #3) does not apply here: no chapter README is modified. If you'd want
ts/README.mditself mirrored into EN/JA before this is mergeable, tell me and I'll add them.AI assistance disclosure
Written with Claude Code. I have read the port and stand behind it.
🤖 Generated with Claude Code