Git Product home page Git Product logo

ray-peat-rodeo's Introduction

raypeat.rodeo is the open-source effort to transcribe the public works of Ray Peat.

Deploy to GitHub Pages

banner

Developing

Requirements: Nix Package Manager

git clone [email protected]:marcuswhybrow/ray-peat-rodeo.git
cd ray-peat-rodeo

nix develop -c modd # Starts auto-reloading dev server

In a second terminal...

nix develop -c tailwind-watch # Allows tailwind to rebuild CSS classes

In a third terminal edit a transcription file...

vim ./assets/YYYY-MM-DD-title-of-new-transcription.md

ray-peat-rodeo's People

Contributors

marcuswhybrow avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

ray-peat-rodeo's Issues

Connect together mentions that occur together: mention propinquity

Propinquity
the state of being close to someone or something; proximity.

  1. The position in the final transcript of a particular mention is known.
  2. Calculate the distance (in characters) between one mention and all others.
  3. Rank all other mentions in order of average distance (smallest first).
  4. Show the best matches in the mention popup and mention page.

This removes some of the penalty for choosing an off-piste signature for a new mention.

Which literary critic claims Thomas Malthus was hired by King George III to put down a revolutionary spirit?

In Nervous System Protect & Restore Ray says

A literary critic wrote that he had seen evidence that the King hired Malthus specifically to help put down the revolutionary spirit. Because the monarchy was realizing that they were in danger, because people were impoverished, diseased and hating to be killed in pointless wars. So he had Malthus say, "It's good to suffer! Poverty, disease and war are creative. They eliminate the bad stuff."

Which literary critic was this? And where did he say it?

Which 1920s work By Michael Polanyi demonstrated metal crystals have life-like properties?

In A New Landscape of Life and Learning Ray says:

And at that time [there was] a physicist Michael Polanyi who later became a philosopher. I don't think he knew he was following in Bose's footsteps. Bose said that all substances displayed the same properties that life does, just in a different form. Including learning and fatigue and so on. Polanyi demonstrated that over and over through the 1920s working with metal crystals and metallurgy. That the mechanistic idea of inert so-called material substance was very far off of reality. It wasn't a matter of atom-to-atom organization. Energy was spread out over a wide area. And the structure went below the surface.

That explains why aeroplanes have to be finely polished if they're going to be supersonic. Because the stresses of a microscopic scratch on the surface will spread the influence over a great range. Polanyi demonstrated that working the surface of a crystal changed the whole depths properties of resistance and memory of the crystal.

Which work by physicist Michael Polanyi is Ray referring too?

Which mice and rat studies were used to advocate melatonin's anti-ageing effect?

In Thyroid Function with Gary Null Ray says

The studies that have been used to advocate melatonin's possibly anti-aging effect were done on mice and rats, and it turns out that they are very opposite to human beings and pigs, because they work at night in general and sleep in the daytime, and so melatonin for them has exactly the opposite meaning that it does for people and pigs. And for example, in humans and rats, melatonin raises prolactin, but in humans, prolactin knocks out progesterone production and causes infertility and stress and osteoperosis for example.

Which studies is Ray referring to?

Which news story reported hypothyroidism in China?

In Thyroid Function with Gary Null Ray mentions a "story about hypothryroidism in China":

The things that are happening to the national diet are mostly creating worse problems for cholesterol metabolism and thyroid function. A couple weeks ago in the news, there was a story about hypothyroidism in China. At least 100,000,000 Chinese are hypothyroid, and 25,000,000 are retarded and, actually, have cretinism from congenital low thyroid.

Which news story is Ray referring to? The conversation was published 1996-09-02.

Non-deterministic build failure

  • I just pushed a few commits (8f2c6fb)
  • GitHub workflow triggered a build, which failed during markdown parsing.
  • I re-ran the build and it completed without error.

Not sure what's going on, and I can't find the failed build in the history.

What is the full name of Ray Peat's wife Katherine?

In http://raypeat.rodeo/tribute-to-dr-raymond-peat#issue-39 a caller who knew Ray said

And what I found to be true from being friends with Ray was his relationship with his wife Katherine. Because she adored him. And we got together several times, and just to see how much love and caring, and how she felt about him–she calls him “Raymond”–and just when she would say his name you could feel her love!

What is Katherine's full name? Katherine Peat, perhaps?

Which Australian studies saw that oat-bran consumption increased the risk for bowel cancer?

In Endotoxin with the Herb Doctors Ray says:

Indigestible fibrous materials, types of starch that can't be broken down by animal or human enzymes, become good food for bacteria and many of these are being promoted for intestinal health to stimulate peristalsis and so on, but about 30 years ago some Australian studies saw that people who ate a lot of oat-bran actually were increasing the risk for bowel cancer. Certain types of fibre cause such intense growth of bacteria that the bacteria produce many types of toxins—not just the fragment of the bacterial coat that's known as endotoxin—but they can produce modified proteins, modified fats and so on from undigested foods. So endotoxin is just one kind of universal toxin. Everyone has some basic defences against it, while there are other types of toxins that are more specifically influenced by your diet.

Which Australian studies is Ray referring to?

Markdown -> AST -> Components

Markdown doesn't have to be wholesale transformed into HTML. Most parsers expose an Abstract Syntax Tree. That means markdown can serve as a declarative language for instantiating reactive components.

For example markdown-it.rs has the AST right here:

let ast  = parser.parse("Hello **world**!");
let html = ast.render();

Which studies by Alexander V. Sirotkin found melatonin suppresses progesterone and raises estrogen in pig tissue?

In Thyroid Function with Gary Null Ray says the following:

But the function of melatonin all by itself, when it isn't surrounded by the appropriate other conditions, melatonin, in studies done in pig tissue, by a man named Sirotkin, pigs are relatively close to humans in having daytime habits, nighttime sleep and so on—which is very important for melatonin because it's a nighttime dominant hormone—in pigs, he found that melatonin suppresses progesterone and raises estrogen, and this happens to be the same thing that low thyroid does.

To which studies is Ray referring?

fatal error: concurrent map writes

Running

nix build github:marcuswhybrow/ray-peat-rodeo

Gives

❯ nix log /nix/store/jc6l6ifb7p94afrs8pk9jxbax06gamib-build-unstable.drv
warning: The interpretation of store paths arguments ending in `.drv` recently changed. If this command is now failing try again with '/nix/store/jc6l6ifb7p94afrs8pk9jxbax06gamib-build-unstable.drv^*'
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/8l929rs8d558wap3i96040vydr478vxk-fpvihycy8cambyzs4cajh9xy9yk0h0fk-source
source root is fpvihycy8cambyzs4cajh9xy9yk0h0fk-source
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
no configure script, doing nothing
@nix { "action": "setPhase", "phase": "buildPhase" }
building
Building Ray Peat Rodeo...
2023/11/25 04:53:01 Scanning files in ./assets
fatal error: concurrent map writes

goroutine 8 [running]:
github.com/marcuswhybrow/ray-peat-rodeo/internal/cache.(*HTTPCache).request(0xc00027f8f0, 0xc000498400, {0x98d93d, 0x5}, 0x9d7cc0)
        github.com/marcuswhybrow/ray-peat-rodeo/internal/cache/cache.go:94 +0x9d
github.com/marcuswhybrow/ray-peat-rodeo/internal/cache.(*HTTPCache).Get(0xc0008a7ae8?, {0xc0008403c0, 0x39}, {0x98d93d, 0x5}, 0xaa12c0?)
        github.com/marcuswhybrow/ray-peat-rodeo/internal/cache/cache.go:86 +0x9a
github.com/marcuswhybrow/ray-peat-rodeo/internal/markdown/parser.(*githubIssueParser).Parse(0xaa12c0?, {0xc0003bec80?, 0xc0003bec80?}, {0xa9c610, 0xc000527800}, {0xa9d000, 0xc0003b0000})
        github.com/marcuswhybrow/ray-peat-rodeo/internal/markdown/parser/github_issue.go:62 +0x1b1
github.com/yuin/goldmark/parser.(*parser).parseBlock(0xc00022f500, {0xa9cdb8?, 0xc000527800}, {0xaa12c0, 0xc0003bec80}, {0xa9d000, 0xc0003b0000})
        github.com/yuin/goldmark/parser/parser.go:1208 +0x969
github.com/yuin/goldmark/parser.(*parser).Parse.func2({0xaa12c0?, 0xc0003bec80?})
        github.com/yuin/goldmark/parser/parser.go:880 +0x3d
github.com/yuin/goldmark/parser.(*parser).walkBlock(0xaa0420?, {0xaa12c0, 0xc0003bec80}, 0xc0003e1e08)
        github.com/yuin/goldmark/parser/parser.go:1133 +0x79
github.com/yuin/goldmark/parser.(*parser).walkBlock(0x9698c0?, {0xaa0420, 0xc0003d7b00}, 0xc0008a7e08)
        github.com/yuin/goldmark/parser/parser.go:1131 +0x4c
github.com/yuin/goldmark/parser.(*parser).walkBlock(0xc000398000?, {0xaa0e40, 0xc0003b4000}, 0xc0008a7e08)
        github.com/yuin/goldmark/parser/parser.go:1131 +0x4c
github.com/yuin/goldmark/parser.(*parser).Parse(0xc00022f500, {0xa9c560, 0xc0003b0070}, {0xc000392010, 0x1, 0x411f45?})
        github.com/yuin/goldmark/parser/parser.go:879 +0x1f3
github.com/yuin/goldmark.(*markdown).Convert(0xc000202300, {0xc000398000, 0x98c0, 0x98c1}, {0xa958c0, 0xc0003aa090}, {0xc000392010, 0x1, 0x1})
        github.com/yuin/goldmark/markdown.go:116 +0xce
main.main.func2({0xc00002ecc0?, 0x0?})
        github.com/marcuswhybrow/ray-peat-rodeo/cmd/ray-peat-rodeo/main.go:116 +0x1f9
created by main.main in goroutine 1
        github.com/marcuswhybrow/ray-peat-rodeo/cmd/ray-peat-rodeo/main.go:106 +0x6d3

goroutine 1 [semacquire]:
sync.runtime_Semacquire(0xc00043b060?)
        runtime/sema.go:62 +0x25
sync.(*WaitGroup).Wait(0xc0002a0000?)
        sync/waitgroup.go:116 +0x48
main.main()
        github.com/marcuswhybrow/ray-peat-rodeo/cmd/ray-peat-rodeo/main.go:141 +0x892

goroutine 6 [runnable]:

and later

goroutine 7 [semacquire]:
os.ReadFile({0xc00002ebc0?, 0x0?})
        os/file.go:738 +0xe5
main.NewFile({0xc00002ebc0, 0x37})
        github.com/marcuswhybrow/ray-peat-rodeo/cmd/ray-peat-rodeo/file.go:40 +0x138
main.main.func2({0xc00002ebc0?, 0x0?})
        github.com/marcuswhybrow/ray-peat-rodeo/cmd/ray-peat-rodeo/main.go:109 +0xab
created by main.main in goroutine 1
        github.com/marcuswhybrow/ray-peat-rodeo/cmd/ray-peat-rodeo/main.go:106 +0x6d3

What can RPR learn from bioenergetic.life?

Sheik let me know (here on the Ray Peat Forum) of bioenergetic.life, a similar project with source on GitHub (excludes logic).


Bioenergetic.life is a Next.js website with async search over 259 .vtt, and 103 .md source files.

  • .vtt stands for Web Video Text Tracks. VTT is a plain-text subtitle markup format. Each file was generated by whisper.cpp, an automatic speech recognition artificial intelligence.
  • .md stands for Markdown. it's a plain-text markup for rich text formatting. Some of these appear auto-generated from PDFs, other's hand made.

Bioenergetic.life's Advantages

  1. Huge search pool because...
  2. Non-curated transcriptions can be created very quickly.
  3. Audio co-location with text in search results.
  4. Non-interview content included also.

Proposals

  1. Consider adding non-curated transcripts to RPR to very quickly grow text search pool to parity with BL.
  2. Consider adding non-interview articles from raypeat.com, including books? newsletters? legality?
  3. Consider co-location of audio and text in general, and specifically in search results, mention pages, and mention popups.

Difficulties

  1. RPR's unique features are triggered via bespoke markdown syntax. The fine grained timestamp data of VTT is powerful, but the extensibility of markdown parsers is more important to RPR. RPR has a timestamp syntax ([2:23]), but one-to-one conversion may reduce the readability (of resulting HTML and source) by displacing curated timestamps with hundreds of auto-generated (distracting) timestamps. However, there are options, but can of worms.
  2. Mingling non-curated and curated data will confuse visual design, but is worth it.

Duplicate content slugs silently overwrite

./content/2022-09-08-hello-world.md and ./content/2023-10-09-hello-world.md are both written to the same out file ./build/hello-world/index.html without complaint. Which one succeeds is random. Both entries will be on the homepage, but both will link to one piece page in the final build.

Panic - Could panic on overwriting and ask for change of input file name.

Complicate target - Add interviewee name to the target file. Probably solves most conflicts, but some interviewees may duplication show names too.

Which 1970 article in Science explained memory in terms of selective death of brain cells?

In Nervous System Protect & Restore ray says

But in 1970 an article in Science took advantage of this background: all biology professors believing that their brains were dying massively every day for their life, and of the knowledge that, you know, people used to program computers by punching holes in cards: introducing information by punching out pieces of card, and this article in Science explained memory and learning through the lifespan in terms of selective death of brain cells.

Which article was it?

Which 2008-14 high-dose methylene blue rodent study showed no bad effects, and even life extension in females?

In Nitric Oxide ray says

Two studies, one by the NIH, 6 years ago and one more recent, gave greater doses up to what would be the equivalent of about 4 or 5 or 6 grams a day for a person of the crystalline material, many times higher than the curative, anti-depressive dose. And they did it for the whole lifespan of rats and mice and saw no life-shortening effects in either rats or mice. But in female mice, in both studies, they saw an extension of the maximum lifespan with the highest dose.

The interview is from 2014, so "6 years ago" gives a range of 2008-2014.

Add transcription preview for non-coders?

How could it be easier for someone to preview a transcript's HTML without using git to clone the repository?

Solutions?

  1. WASM markdown parsing into HTML in the browser.
  2. Executable that watches a markdown file for changes and serves results as local website.

Which 1960s work by a Korean introduced the idea of the "third circulatory system" and food changing your DNA?

In Nitric Oxide the interviewer, Andrew Murray says

Okay, alright, like I said, perhaps if you are available, I'd love to look into that new research. Well actually I think it was brought out in the mid 1960s by that Korean. It sounded very interesting about the third circulatory system in the body, and actually that ‘you are what you eat’. Because there is a pretty intimate interaction between food products and our own DNA. They can be switched on and off and regulated. That sounded pretty fascinating.

Timecode links don't work for mp3

  • The link currently query parameter ?t=01:02:03 but that's incorrect
  • It should be #t=01:02:03
  • Also, the colons are getting escaped unnecessarily.

Move to Tailwind (w/ Hot Lib Reloader)?

Currently I'm using Markup for macro-based HTML templates, with CSS served classically in a single global style.css.

I Propose moving to Tailwind CSS (probably using a rust port called Railwind).


But there's a catch. Current CSS was a plain text input to the final executable, which literally copies the file to a different directory. cargo watch was told to watch for changes in such files, and re-run the executable. If we moved to Tailwind inside Markup macros, then CSS changes would be a source code change, and require a recompile.

Hot Lib Reloader can replace functions at runtime, but we don't have a runtime, we fire once and finish. So I'd have to write a bespoke development server that does what cargo watch is doing. That way there is a "runtime" to hot reload into.

Oh, actually. cargo watch is just re-running the program on input file or source code changes. I'm using a development server called devd to watch for the changes in the output directory and hot-reload them into the browser. So there's a double watch chain/thing going on here. Complicated!

I don't like any of these solutions.

Issue callout markdown plugin

CONTEXT I recently (21b7877) removed the "placeholder" and "hidden" functionality of the markdown "mention" plugin. A mention is a custom markdown plugin written for this project that outputs an HTML link, and enters the mentioned entity into a site-wide lookup catalogue. A normal mention look like this [[mention signature|alternative display text]].

If the mention signature was not provided but the "alt text" was provided, I considered this a "placeholder" mention, because it had definite text to render into an HTML link, but no entity mentioned. This was not a feature I particularly needed, but was an easy logical interpretation for intention behind the omission of that part of the tag.

The alt text is optional, and is only interpreted as such if the pipe ("|") character appears in the body of the mention. If the pipe character is present but the alt text is following it is empty, and an entity is properly mention (so it is not a placeholder) this mention would be regarded as a "hidden" mention: no HTML link should be rendered, but an entry in the lookup catalogue should be made all the same.

Both the "placeholder" and "hidden" mention types added unnecessary complexity to the plugin code, which is already difficult to reason about, especially if one is unfamiliar with parsers and the particular parsing method employed. So I removed the aforementioned functionality, with a view to later evincing a more appropriate solution for the cases were I did find myself using the "placeholder" mention type.

USAGE I don't think I used the "hidden" mention type at all. But the "placeholder" type was useful to flag up a failure to identify something mentioned. For example "An american researcher found..." mentions a particular researcher, who we know not. Here a "placeholder" could be declared, and a supplemental HTML element could be rendered asking readers to get in contact if they know the answer. However I think there is a better solution.


SOLUTION A GitHub issues markdown plugin. For example, {#12} could render an HTML sidenote that links to a GitHub issue created to discuss the resolution of the identity of something mentioned. In this example the issue with ID 12 would be linked. The issue title and the number of comments could be scraped, or retrieved from an API. Therefore GitHub can take the primary role of orchestrating community efforts at resolving questions in a discoverable way.

Remuneration links in frontmatter

Most interviews and articles are made freely available, but some are published with a request for financial support from the publisher. It would be nice to put a link for remuneration in the frontmatter of each page that readers can follow.

I don't know if ray has an estate that could likewise be referenced? Perhaps providing details for how to buy a copy of Ray's books or newsletters? Is that still possible?

Which article in Prevention Magazine in 1954 by a Mexican professor, advocated a cup of linseed oil per day?

In Endotoxin with the Herb Doctors Ray says the following

In 1954, before Budwig had started writing about cancer, a Mexican professor had an article in Prevention magazine advocating—I think it was—a cup of linseed oil per day, as a purge, in the tradition of getting the intestine as clean as possible. And when you drink that much of a highly unsaturated oil, the unsaturated fatty acids are converted to prostaglandins and cause intense contraction and secretion of the intestine. So it's a very quick thorough kind of laxative.

To which article is Ray referring, and what is the name of the Mexican professor?

Webscraping at build-time not possible with Nix

Ray Peat Rodeo has bespoke markdown tags for citing external URLs and DOIs (unique IDs of scientific papers). Only the URL or the DOI is specified in the markdown tag. At build-time ./lib/citations/parser.go makes an HTTP request to the pertinent URL, scraping the HTML title from the response body to use as the citation's title when displayed on, say, the home page.

Nix works hard to make builds reproducible. It limits build-time communication to explicitly declared known inputs. You can't make arbitrary HTTP requests: 😠 Web scrapping must happen outside of build-time!

Solution: An update-citation-data.go tool that parses all citations (in the same way as main.go does now), but generates data.json which is committed into the source code. modd can run this automatically (non-blocking) every time a source file changes.

Which Ray Peat newsletter discusses A.C. Guyton?

In When Western Medicine Isn't Working ray mentions a newsletter in which he discussed Arthur Clifton Guyton:

Unfortunately, that mechanical thinking is extended to other areas, such as the circulation of blood. A good plumber could identify with the standard medical approaches to treating circulatory problems. Beyond the mechanical properties of the body, everything is physiological, and most doctors learned physiology from an absurdly bad textbook by A.C. Guyton, that I discussed in one of my newsletters.

Which newsletter is Ray referring to?

Need regression tests for "Interview Syntax"

I've built a custom template language to define which markdown paragraphs are spoken by Ray, and which are spoken by the interviewer. There's also a [[Identifier|Display Text]] syntax which identifies referenced books and people.

I need some to regression tests for those.

Which 2008 NIH high-dose methylene blue rodent study showed no bad effects, and life extension in females?

In Nitric Oxide ray says

Two studies, one by the NIH, 6 years ago and one more recent, gave greater doses up to what would be the equivalent of about 4 or 5 or 6 grams a day for a person of the crystalline material, many times higher than the curative, anti-depressive dose. And they did it for the whole lifespan of rats and mice and saw no life-shortening effects in either rats or mice. But in female mice, in both studies, they saw an extension of the maximum lifespan with the highest dose.

The interview is from 2014, so "6 years ago" is 2008.

Which studies (approaching 2014) showed nitric oxide excess creates the Warburg cancer metabolism, whilst methylene blue turned it off?

In Nitric Oxide ray says

Nitric oxide and carbon monoxide are both able to knock out the mitochondrial function and imitate the cancer metabolism. And there are several recent publications showing that the Warburg cancer metabolism is created by nitric oxide excess and is turned off by methylene blue.

This interview is from 2014. "Recent" may mean within 6 six years, as above in the same interview ray says "two studies, one by the NIH, 6 years ago and one more recent"

Mention popups cannot be closed on tablets

  • If you tap on a mention from a tablet, and the popup opens (sometime it doesn't see #41) the popup remains open forever.
  • It can be closed by tapping another mention, but then that mention is stuck open.

Solution?

  • Watch body for mousemove events and send the relevant event to close all popups.

Allow speakers other than Ray to occupy the left hand side (gray) chat bubbles.

  • Since Ray's passing, some pertinent transcripts talk about Ray, but do not include him.
  • Ordinarily, ray would appear on the left and other speakers appear on the right, aping iMessage.
  • However, since Ray is absent, all speakers are jammed into the right hand side.
  • This means no messages can be "short" messages, because "short" messages only happen when the previous speaker was on a different left/right alignment to the message being shortened, this limitation avoids visual confusion.
  • No "short" messages hurts readability a lot, and makes the transcript feel careless.

Solution?

  • Add a front matter field to specify speakers that should appear on the "Ray Peat", left hand side.
  • Current logic assumes only one speaker can occupy this this left hand side, so update that too.

Include Articles from raypeat.com?

As things stand the project has:

  • 7 transcripts
  • a functional tag-based index of names, books and DOIs
  • full site text search
  • timecode tags that link to source material at exact timecodes.

The main sources of Ray Peat's works are (in order of pertinence to this project):

  1. His audio/video/written interviews and lectures. (~300)
  2. His articles on raypeat.com (a subset of his longstanding newsletters)
  3. His newsletter articles
  4. His books

This project aims to tackle the first source, but could in principle continue down the list. Whether or not that is useful, or the honourable thing to do (i.e. would it take away revenue for Ray's estate?) will be the issue discussed here.

Currently I'm sticking to just the first source.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.