4 ms·
Author here. This is a work-in-progress. Ask Me Anything.
by braythwayt 10y ago
Author here. This is a work-in-progress.
Ask Me Anything.
- fermigier 10y agoCool project. I enjoyed some of your previous books. Q: what's the story behind your nickname ("Raganwald"), assuming it's a nickname?
- braythwayt 10y agoThe English name “Reginald” is cognate with the Nordic names “Ragnvoldr” and “Ragnvald.” I made up the name “Raganwald” in the 1970s—possibly for a D&D character—and kept it as a nerdy nickname through the eras of BBS’s, newsgroups, email, &c.
- eternalban 10y agoInteresting that Regina is queen in Latin and Vald is ruler in old Germanic. (Ragn apparently means judgment or advice in old Germanic.)
- Pamar 10y agoKing in Latin is Rex (Nominative) but other cases like Genitive (Regis) drop the X in favor of a G. So R+G is the key element for King (and Queen). Also Regnum (Reign).
- braythwayt 10y agoI believe it’s all cognate with Raj, due to the influence of Sanskrit on Indo-European languages.
- eternalban 10y agoI would argue 'Rex' is closer to Avestan (old Persian) Rastar than Sanskrit Rājati. (In shared words between these two Indo-Iranian languages, Sanskrit 'j' typically is 's' in Avestan.)
- camus2 10y agoI read all your previous books about Javascript and Coffeescript, they are all great. What is this about? it's not that clear from the description. Writing compilers?
- braythwayt 10y agoGreat question. There will be compilers, debuggers, package management, monitoring performance, test frameworks, and anything else I can cram into a decent length of book. The premise is to use the difficulty of writing non-trivial Turing Machines as an excuse to build tools to manage that difficulty.
- wpietri 10y agoInteresting! Will the tooling be written in the same medium as the production programs? I think forcing the early need for tooling is very interesting, but I'm wondering how you'll keep the complexity from making the tooling difficult to understand.
- braythwayt 10y agoThe tooling will not, initially, be written in and running on Turing Machines.
- defen 10y agoGreat idea for a book. 1) What "level" of programmer will this be pitched at? e.g. No experience programming, regular "working programmer" with no theory background, someone with an undergrad CS degree, someone with 20 years of industry experience, etc. 2) Have you decided on the Turing machine yet? Will the interpreter be provided as a "given" or will the reader have to write an interpreter in a higher-level language first? e.g. I'm imagining something that reads a state table description and a representation of an input tape, performs the work, and then hopefully stops and outputs the tape.
- braythwayt 10y agoLike JavaScript Allongé, I am planning for it to be readable by someone with just a smattering of programming familiarity. But also like JavaScript Allongé, I hope for a fairly substantial learning slope. I don’t imagine writing the first interpreter will be onerous. Here’s one I wrote specifically to be “pessimum” without being gratuitously so: const aMachine = (() => { const HALT = 'HALT'; const LEFT = 2; const RIGHT = 3; function kiss4({ description, tape: _tape }) { const tape = Array.from(_tape); let tapeIndex = 0; let currentState = description[0][0]; while (true) { if (tapeIndex < 0) { console.log('moved off the left edge of the world'); console.log({ tapeIndex, currentState, currentMark, tape: tape.join(' ') }); return tape; } const currentMark = tape[tapeIndex]; const rule = description.find(([state, mark]) => state === currentState && mark === currentMark); if (rule == null) { if (currentState !== HALT) { console.log('no rule for this state and mark'); console.log({ tapeIndex, currentState, currentMark, tape: tape.join(' ') }); } return tape; } const [_, __, nextState, action] = rule; if (action === LEFT) { --tapeIndex; } else if (action === RIGHT) { ++tapeIndex; if (tape[tapeIndex] == null) tape[tapeIndex] = 0; } else if ([0, 1].includes(action)) { tape[tapeIndex] = action; } currentState = nextState; } } return Object.assign( ({ description, tape = [] }) => kiss4({ description, tape }), { constants: { LEFT, RIGHT, HALT } } ); })();