Readit News logoReadit News
krukah commented on Comptime.ts: compile-time expressions for TypeScript   comptime.js.org/... · Posted by u/excalo
apatheticonion · 21 days ago
I literally just want Rust style macros and proc macros in JavaScript. e.g. using

``` const MyComponent = () => jsx!(<div></div>) ```

rather than a .tsx file.

That or wasm to be usable so I can just write my web apps in Rust

krukah · 21 days ago
Maybe the (relative) lack of ecosystem has kept you away, but I really recommend checking out both Dioxus and Leptos. Leptos is incredibly similar to React, but with Rust ergonomics, and it's been a pleasure to learn and use. With an LLM by my side that knows React and Rust pretty well, I've found myself not even needing the React libraries that I thought I would, since I can easily build on the fly the features/components I actually need.

I too, eventually gave up on React <> WASM <> Rust but I was able to port all my existing React over into Leptos in a few hours.

krukah commented on Peacock feathers can be lasers   science.org/content/artic... · Posted by u/ohjeez
krukah · a month ago
Yesterday was Pigeons As Hard Drives, today is Peacocks As Lasers.

I look forward to what tomorrow brings.

krukah commented on Numbering should start at zero (1982)   cs.utexas.edu/~EWD/transc... · Posted by u/checkyoursudo
IshKebab · 5 months ago
That's a very confused way of thinking about it IMO. I say:

* Start from 0 if you are indexing. I.e. you are identifying an item or its position.

* Start from 1 if you are counting. I.e. you are saying how many items there are.

It doesn't matter what it is. I don't know why you think pages in a book are somehow different to memory addresses.

krukah · 5 months ago
You know what I like this much better...rule of thumb updated.
krukah commented on Numbering should start at zero (1982)   cs.utexas.edu/~EWD/transc... · Posted by u/checkyoursudo
krukah · 5 months ago
Whenever I explain to someone when or why to use 0-indexing, I like to say:

Start from 0 if you are counting boundaries (fenceposts, memory addresses)

Start from 1 if you are counting spaces (pages in a book, ordinals)

Floors are a case where both make intuitive sense, which is maybe how we ended up with European vs American floor numbering.

krukah commented on Thought experiments that fray the fabric of space-time   quantamagazine.org/the-th... · Posted by u/thcipriani
bongodongobob · 10 months ago
? It by definition has a radius of 1.
krukah · 10 months ago
unit sphere != unit ball

The former is the boundary, the latter is the interior + boundary. One of the great arbitrary naming conventions of math.

krukah commented on Spikey Spheres (2010)   penzba.co.uk/cgi-bin/PvsN... · Posted by u/alexmolas
krukah · a year ago
I love the counter-intuition of high-dimensional spaces, seems to be making the rounds on my feeds these days.

One of the harder generalizations to develop intuition for is the fact that the measure of a d-sphere tends to 0 as d approaches infinity, even though for all d = 0, 1, 2, 3 that our meager brains can visualize, the opposite is true! Geometry goes crazy.

krukah commented on Pin   without.boats/blog/pin/... · Posted by u/thunderbong
krukah · a year ago
Another great WithoutBoats writeup. Admittedly, this is one of those corners of Rust that I'm glad is abstracted away and buried in async runtime internals.

That said, I'm curious if/when/why/how anyone uses Pin<T> outside of a custom Future implementation?

krukah commented on Professional poker players know the optimal strategy but don't always use it   scientificamerican.com/ar... · Posted by u/alexahn
krukah · a year ago
One thing I haven't seen anyone mention yet is that Nash equilibria do not actually exist when you move beyond heads-up into multi-way play. There's strong empirical evidence that solving abstracted games using MCCFR and using real-time depth-limited tree search dominates humans and outperforms all other AI strategies, but these results aren't theoretically sound, unlike in heads-up play.

I've actually been working slowly on https://github.com/krukah/robopoker, an open-source Rust implementation of Pluribus, the SOTA poker AI. What I've found interesting is the difference in how I approach actually playing poker versus how I approach building a solver. Playing the game naturally consists of reasoning about narratives and incorporating information like hand history, play style, live tells. Whereas solving the game is about evaluating tradeoffs between the guarantees of imperfect-information game theory and the constraints of Texas Hold'em, finding a balance between abstract and concrete reasoning.

Deleted Comment

u/krukah

KarmaCake day118March 21, 2022
About
co-founder & cto @ novig (yc s22) obsessively curious student of the universe
View Original