HNHacker News
TopNewBestAskShowJobs

AlexErrant

1,060 karma · joined November 15, 2022

Building collaborative spaced repetition at https://github.com/AlexErrant/Pentive
submissionscomments
AlexErrant··on The Dictionary of Obscure Sorrows
> ZIELSCHMERZ

> n. the dread of finally pursuing a lifelong dream, which requires you to put your true abilities out there to be tested on the open savannah, no longer protected inside the terrarium of hopes and delusions that you started up in kindergarten and kept sealed as long as you could.

God I hope I don't fuck it up. But at least I tried.

AlexErrant··on Flyweight: A Node.js ORM Specifically for SQLite
Probably not, since it has a dependency on sqlite3 which also depends on node.

I just use kysely for my sqlite-in-browser project.

AlexErrant··on Show HN: Flash Notes – Flashcards for Your Notes, LLM, iOS/macOS Sync
Is your "recall probability estimating algorithm" similar to FSRS's retrievability?

https://github.com/open-spaced-repetition/fsrs4anki/wiki/ABC...

If you ever feel like moving beyond the Apple market you might look into https://github.com/vlcn-io/cr-sqlite I've been using it in my own Anki-clone and am very happy with it.

AlexErrant··on Ask HN: What non-AI products are you working on?
An Anki-clone.

> A free, open source, local-first, spaced repetition system that works offline, has p2p syncing, plugins, and first class support for collaboration. It's GitHub/Reddit for flashcards.

https://github.com/AlexErrant/Pentive/

All the "hard" tech has been more or less built out... all that's left is drawing the rest of the owl >_>

AlexErrant··on Lezer: A parsing system for CodeMirror, inspired by Tree-sitter
Indeed ;) https://discuss.codemirror.net/t/help-with-regex-expression-...
AlexErrant··on Lezer: A parsing system for CodeMirror, inspired by Tree-sitter
> Unfortunately, tree-sitter is written in C, which is still awkward to run in the browser (and CodeMirrror targets non-WASM browsers). It also generates very hefty grammar files because it makes the size/speed trade-off in a different way than a web system would.

I would be curious if there's been an effort to get tree-sitter working on the web.

AlexErrant··on Lezer: A parsing system for CodeMirror, inspired by Tree-sitter
He's incredibly responsive too. He just answered my question about an hour after it was asked... on a Sunday evening.

Slightly off topic; is anyone aware of any Lezer grammar for regex? I've not been able to find any in the FOSS world. I suspect Regex101 has one, bit it's sadly closed source.

AlexErrant··on Show HN: Hypersplit – Like Infinite Craft but in reverse
Game idea for someone with more time than me: an LLM powered "roguelike".

You fine-tune the LLM to spit out RPG skills based on the player's chosen class. (Dwarven princess = summon dwarf minions, has a rare bloodline magic, whatever). The classes could get _real_ weird, like a school bus character could summon school children minions and skill up to flying a la The Magic School Bus. (Or that could be a prestige class haha.)

A second model would match the RPG skills to a known/finite set of game mechanics supported by your game. This is ultimately a simple classifier - not really an LLM (though the skills on the input side are language, okay pedants). Determining the set of game mechanics to support shouldn't be too hard - how many different ways of doing damage and (de)buffs could there be? (Okay there can be a shit-ton.) Balancing the game could be done live via reinforcement learning. To constrain the search space, it'd follow the old Zelda format of limiting you to one room/screen until the enemy is defeated (or like Binding of Isaac for those too young.)

It'd have to use 2d/sprite based/placeholder graphics because I don't think the rigging/animation AI is currently good enough... but bad graphics hasn't stopped fun gameplay before. Imagine Charizard vs Death Star. Good luck with the DMCAs.

Another problem is that with simple graphics and literally infinitely variable enemies, there's no learning on the player's side so there's no real "skill" accumulation to improve on for the next run. There would be a lot of reading on the player's part if you decide to just show a stats-list for an enemy type. I suppose you could turn it into a zombie game where new enemies are slowly introduced in a horde of other enemies the player's familiar with.

AlexErrant··on Cranelift code generation comes to Rust
Not quite fresh, but

> A paper from 2020 [0] showed that Cranelift was an order of magnitude faster than LLVM, while producing code that was approximately twice as slow on some benchmarks.

[0] https://arxiv.org/pdf/2011.13127.pdf

AlexErrant··on A cheap, generic drug became a darling of longevity enthusiasts
This is no different than "my grandmother smoked a pack every day and lived to 130."

---

On a related note, I love posting this study https://jamanetwork.com/journals/jamanetworkopen/fullarticle...

Look at Figure 2C in particular. The hazard ratio of smoking is 1.41. The hazard ratio between "Low" (<25th percentile) and "Below Average" (25th-49th percentile) cardiovascular health is 1.95.

In other words, it is better to be a smoker than in the lower 25% of non-exercisers. By far. It's not even close.

AlexErrant··on Asciinema 3.0 will be rewritten in Rust
The player is still in SolidJS.

https://github.com/asciinema/asciinema-player/blob/develop/p...

https://news.ycombinator.com/item?id=29387761

The Rust frontend frameworks have been creeping up the perf charts, though.

AlexErrant··on Working in the Vision Pro [video]
I "install" high usage chrome tabs as apps so I can pin them to my taskbar and bring them up with a shortcut, e.g. Win+9. I actually do this more more than programs, so I use AutoHotKey to get more shortcuts, e.g. CapsLock+F1 may bring up something less common like Authy.

Tab/Window hunting via CtrlTab/AltShiftA is... not great. A goal of mine is to never AltTab.

AlexErrant··on Missile Game
You can change the level under Menu > Setting
AlexErrant··on Hearing aids slow cognitive decline in people at high risk
The retracted paper discusses an association since it was observational:

> We used Cox proportional hazards models to estimate hazard ratios... between self-reported hearing aid use status (hearing loss with or without hearing aids) at baseline and risk of dementia

The top-level article discusses a randomized controlled study and therefore can make a much stronger claim of causality:

> The researchers randomly assigned participants to one of two interventions. About half received hearing aids and instruction in how to use them. The other half were assigned to a health education program focused on promoting healthy aging. Both groups received follow-up visits every six months to reinforce the training.

AlexErrant··on Enemy drone that killed US troops in Jordan seemingly mistaken for US drone
> Data include personnel who are assigned to the State Department and Embassies overseas.
AlexErrant··on Anki – Powerful, intelligent flash cards
> I wonder what the ecosystem would look like if things were otherwise.

Shameless plug - I'm building https://github.com/AlexErrant/Pentive which is basically GitHub/Reddit for flashcards. Very much pre-product and a WIP, though the offline client proof of concept is done.

AlexErrant··on Show HN: RemoteStorage – sync localStorage across devices and browsers
I'm a happy user of https://github.com/vlcn-io/cr-sqlite/
AlexErrant··on Citigroup Plans to Cut 20k Jobs
How does this reconcile with "enshitification" as popular platforms with millions of users try to become profitable by removing features and paywalling access? My understanding was that the zero-interest era was the time of optimism and building new cool things.
AlexErrant··on Contra Wirecutter on the IKEA air purifier (2022)
Let me introduce you to a YouTube channel all about DIY air filters https://www.youtube.com/watch?v=XAJ__E-hIJc
AlexErrant··on Reasons to grow and keep big muscles
The thing is, you want great cardio capability. https://jamanetwork.com/journals/jamanetworkopen/fullarticle...

> Extreme cardiorespiratory fitness (≥2 SDs above the mean for age and sex) was associated with the lowest risk-adjusted all-cause mortality compared with all other performance groups.

Sure your cardio might be "good" now, but see Table 2 for what happens to you over time (with and without training).

Put more plainly https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6153509/

> Individuals with higher cardiorespiratory fitness (CRF) showed lower risks of all-cause, CVD and cancer mortality; those with higher grip strength (GS) had lower all-cause mortality. All-cause and CVD mortality risk was lowest in adults with both higher CRF and higher. Improving both CRF and muscle strength, as opposed to either of the two alone, may be the most effective behavioral strategy to reduce all-cause and cardiovascular mortality risk.

AlexErrant··on Reasons to grow and keep big muscles
Cardio is important to the health of your mitochondria. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8793839/

> Mitochondrial dynamics, including continuous biogenesis, fusion, fission, and autophagy, are crucial to maintain mitochondrial integrity, distribution, size, and function, and play an important role in cardiovascular homeostasis. Cardiovascular health improves with aerobic exercise, a well-recognized non-pharmaceutical intervention for both healthy and ill individuals that reduces overall cardiovascular disease (CVD) mortality. Increasing evidence shows that aerobic exercise can effectively regulate the coordinated circulation of mitochondrial dynamics, thus inhibiting CVD development. This review aims to illustrate the benefits of aerobic exercise in prevention and treatment of cardiovascular disease by modulating mitochondrial function.

Attia is a fan of "zone 2" training in particular because it trains mitochondria to burn fat, which leads to "metabolic flexibility". https://pubmed.ncbi.nlm.nih.gov/28467922

> Metabolic flexibility is the ability to respond or adapt to conditional changes in metabolic demand. This broad concept has been propagated to explain insulin resistance and mechanisms governing fuel selection between glucose and fatty acids, highlighting the metabolic inflexibility of obesity and type 2 diabetes. In parallel, contemporary exercise physiology research has helped to identify potential mechanisms underlying altered fuel metabolism in obesity and diabetes.

Weightlifting, if anything, depletes muscle glycogen, a sugar, so you aren't really training your fat-burning.

AlexErrant··on A future for SQL on the web (2021)
We now have absurd-sql, wa-sqlite, and the official SQLite project all running in a browser. Their tradeoffs are discussed here https://www.powersync.com/blog/sqlite-persistence-on-the-web

That article was written in July, and in the intervening time, Chrome's announced an intent to ship "Multiple Readers and Writers in File System Access API" aka `readwrite-unsafe` [0] in v121 (stable in 2 weeks) which could help improve SQLite's performance even more.

[0] https://chromestatus.com/feature/5172892632875008

Edit: It looks like wa-sqlite already has a prototype VFS taking advantage of the above feature https://github.com/rhashimoto/wa-sqlite/discussions/116

AlexErrant··on THAT: A brand new analog computer
Analog and digital quantum computing are distinct things https://www.quera.com/glossary/analog-quantum-computing
AlexErrant··on DeskHop – Fast Desktop Switching
"fine grained" is relative, but you can go forwards/backwards 10 seconds in YouTube Android by doubletapping to the left/right of center on a video. If it's paused, doubletap to the left/right of the play button. It should also work on iOS, but I don't have an iPhone so can't confirm.

https://www.majorgeeks.com/content/page/youtube_double_tap.h...

AlexErrant··on Self-teaching, spaced repetition, and why books don't work
Sadly, hard disagree. I programmed Clojure professionally for ~2 years, and its REPL is significantly better than Python's. Despite that, nothing compares to "dot" autocomplete and being certain that a method can take a certain object type. Like, I could type dir/help and then the token in question then parse the output with my eyes, remove the help/dir and type in what I wanted... or I can hit dot and scroll the available methods/properties. It's not even close.
AlexErrant··on Researchers uncover on/off switch for breast cancer metastasis in mice
A caveat for the rest of the world:

> our finding showed a significant increase in breast cancer mortality rate in the world during the past 25 years ... Statistical analysis showed a significant increase for breast cancer mortality rate in all super regions, except for High-income super region. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6745227/

and for women under 40:

> Female breast cancer mortality rates have stopped declining in women younger than 40 years, ending a trend that existed from 1987 to 2010. Conversely, mortality rates have continued to decline in women aged 40–79 years. https://pubs.rsna.org/doi/full/10.1148/radiol.2021203476

AlexErrant··on Self-teaching, spaced repetition, and why books don't work
LOL I'll check it out.
AlexErrant··on Self-teaching, spaced repetition, and why books don't work
I was listening to a podcast with someone who went from BS/Mechanical Engineering => MD. He had to give up his "first principles" style of engineering-thinking and just accept that rote memorization was the way to go, at least for the majority of his courses.

I disagree that rote memorization limits innovation in the medical field. Biology has complex problems, and "For every complex problem there is an answer that is clear, simple, and wrong". There's a reason why so many clinical trials fail, and it's not for a lack of technical innovation.

I feel like the medical _system_ as a whole needs systematic/organizational disruption, not technological disruption. For example, CGMs are a technology that have been around for decades and only now are we seeing usage in non-diabetic populations. The system (they require a prescription) is preventing the innovation.

AlexErrant··on Self-teaching, spaced repetition, and why books don't work
> the book "The programmer's brain" says that spaced repetition is the best way to learn the syntax, idioms, caveats of a programming language

Unfortunately, hard disagree. The best way to learn a Lisp is to write Lisp. You can look at code all you want, but you won't get used to the syntax/parens until you start writing it. Same applies to non-Lisps.

> I think a lot of people program in Python but programming in Python is not their main occupation. These people struggle to accumulate knowledge, because they may encounter concepts or APIs only from time to time, and by that time they already forgot.

This is a great point. Static typing is great for API discovery, which Python sadly lacks. However, I wonder how much LLMs are eating this "low-code" market. Also, if Python is non-critical to their jobs, I suspect that they won't feel motivated to explicitly study Python over the long term. Doing spaced repetition is famously hard, and non-motivated people will likely give up and just do "JIT learning".

> Also, I want to cover some "unorthodox" topics for which spaced repetition may be specially well suited. For example, I'm building a deck called "A tour of the standard library", where you can learn all the modules that are available, just so you know what is out there, without going deep into it.

FWIW I'm learning Rust, and to "learn what's out there" I've just been binging random Rust videos on Youtube at 2x over lunch. Granted I'm an experienced dev and I have an intuition as to what "should" be out there, so perhaps this story is of limited use.

AlexErrant··on Self-teaching, spaced repetition, and why books don't work
> keep working and at some point it'll just click for you

Haha, monads still haven't clicked for me despite knowing F# and Clojure pretty well. I think of them as "functors that you can flatten" (and functors are "things you can `map` over", and `map` is "a structure-preserving transformation"). I know monads syntactically, but not intuitively. Despite this I still manage to work with monads pretty well - sometimes rote knowledge is enough. Maybe if my work involved discovering new monads I'd feel like I'd know them better. (I just see the same option/list/result(ish)/generator-style monads over and over.)

← PreviousPage 8 of 11Next →