Better HN
topnewbestaskshowjobs
Log inSign up

mfwgenerics

46 karma · joined Jul 11, 2023 (3y ago) · 5 submissions

Submissions

comment 3y ago · link · parent

I'd like to see some deeper explanation around the following:

> My average sleep efficiency (time asleep vs time in bed) according to Apple Watch & Oura is ~85%, meaning to get my 7h30 of sleep to feel rested I will stay more than 10h in bed. That sucks!

1. Where does the 10h figure here come from? It seems to me that 85% SE would reach 7h30 sleep hours at 8h50m bed hours (7.5/0.85).

2. What is an expected healthy sleep efficiency? Does 85% fall outside the normal range?

3. Where does the 7h30 target come from? If this is based on the standard adult recommendation of 7-8 hours, are we sure that this recommendation assumes 100% SE? If it doesn't, we're mixing different units.

comment 3y ago · link · parent

> Most startups needlessly accelerate their corporatization by copying the processes of larger companies, usually by poaching managers from large companies who bring their playbooks with them.

This is painfully on point.

comment 3y ago · link · parent

This is neat! Cheers

comment 3y ago · link · parent

That sounds about right. The approach I'm working on won't allow you to embed runnable code in your docs. Instead, it requires you to write your documentation in Kotlin e.g. using a Markdown DSL where source code from the codebase can be included in the output. I'm working on a separate project to programmatically generate file trees and Docusaurus doc sites in code.

I'm not aware of anything exactly like Livebook in the Kotlin ecosystem but you might be interested in kotlinx-knit which takers a more incremental approach to executable documentation:

https://github.com/Kotlin/kotlinx-knit

Neither of these approaches will result in interactive documentation.

comment 3y ago · link · parent

The ability to execute sample code during documentation generation seems invaluable. Instead of being subject to rot, documentation turns into an executable test suite.

I've been working on something like this for Kotlin using a compiler plugin that allows code to access the source text of lambdas, functions and classes being executed. You write code that spits out markdown and captures its own source into code blocks.

https://github.com/mfwgenerics/kapshot