HNHacker News
TopNewBestAskShowJobs

yccs27

1,217 karma · joined November 21, 2020

submissionscomments
yccs27··on Wax motor
I always wondered what the actuator in the exhaust air valve for my apartment ventilation was - now I'm pretty sure it's a wax motor! You can use a switch to increase the airflow, but it takes a few seconds to react and opens/closes very slowly and quietly.
yccs27··on Amazon pilots ad services in ChatGPT
Paid tier just means you're a more lucrative ad target.
yccs27··on Worst-case glacial lake flood scenarios in a transboundary Himalayan basin 2022
It's just the opposite side of the same mountain, used as a case study for modeling GLOF risk. In fact, they prominently cite "Potentially dangerous glacial lakes across the Tibetan Plateau" [1], which includes Gyirong Port and the downstream valley as a high risk of GLOFs and notes that many buildings there are exposed to potential flash flooding. Take a look at Fig. 5 [2] - the upper left cluster of dangerous lakes and exposed buildings is the site of the disaster. They also name Jilong, Nyalam, Dingri and Kangding as the Tibetan counties with the highest lake danger; the glacier collapse happened at the border of Jilong county.

[1] referenced as Allen et al. (2019), https://doi.org/10.1016/j.scib.2019.03.011

[2] https://ars.els-cdn.com/content/image/1-s2.0-S20959273193015...

yccs27··on TIME Is Serving AI Bots a Different Website, with Ads Built In
They might be trying to get into the context of long-running chat sessions.
yccs27··on Rust project goals: Immobile types and guaranteed destructors
Yes, editions are a great mechanism. It still has its limits, especially if you want easy edition migrations. All existing Rust code assumes it can drop any type whenever it wants, and that is not something you can just change across editions. You have to be very careful with defaults if you don't want conflicts when crossing edition boundaries.
yccs27··on Rust project goals: Immobile types and guaranteed destructors
Yes, destructuring is typically the only allowed way to get rid of linear/indestructible values. If the type has private fields, this is only possible in the same module, so commit(txn) and rollback(txn) would have to be implemented in the same module as the Transaction type.
yccs27··on Rust project goals: Immobile types and guaranteed destructors
Ah, thanks, I didn't realize "pin ergonomics" was the Rust Project name for @withoutboats' pinned places.
yccs27··on Rust project goals: Immobile types and guaranteed destructors
There's a different proposal by @withoutboats to make immovability a property of the place/reference instead of the type:

https://without.boats/blog/pinned-places/

Does this project goal mean that the rust maintainers have decided to implement @yoshuawuyts' immovable types proposal in favor of pinned places?

yccs27··on Show HN: Elevators
You could also detect when the elevator call button gets pressed again right after the elevator has left a floor. That means someone wasn't able to get on the elevator (and is now waiting for the next one).
yccs27··on How Many Elementary Particles Are There, Really?
The gluon with color (|g1> + |g2> + |g8>) / √3 is just a superposition of the gluons with colors g1, g2 and g8, the same way you can make superpositions of any other particles. You are right that the choice of basis vectors is arbitrary, but that doesn't make it wrong to count the number of dimensions. It also doesn't make it fundamentally different than, say, polarizations of photons or even flavors of quarks. You can have superpositions of photon polarizations or quark flavors.

All of these are continuous properties in an n-dimensional vector space.

yccs27··on Correlated randomness in Slay the Spire 2
I guess it's mainly a limit to savescumming.
yccs27··on Bias Compounds, Variance Washes Out
Yeah, this is basically stochastic dithering applied to numeric floating point quantization instead of image color quantization.

This makes me wonder whether you could apply different dithering approaches to numeric computations. You cannot use diffusion or similar mehods, because you don't have information about neighboring pixels/computations. Using low-discrepancy sequences might work to reduce stochastic noise, but it could also reintroduce bias for some computations.

yccs27··on What it takes to transpose a matrix
It's the same topology! Just replace each shuffle/blend with multiplication by a root of unity and addition, and you get FFT!
yccs27··on What it takes to transpose a matrix
A good example for this is A + A^T; you can fuse the two operations but you cannot get around the access pattern of matrix transposition.
yccs27··on Minnesota becomes first state to ban prediction markets
Making laws more explicit in important cases is valuable because it reduces uncertainty about legal interpretation. Using your example of cellphone use, under distracted driving laws the prosecution would have to prove that the specific case of cellphone use was distracting enough to be a safety hazard. With the more specific ban on cellphones, that is no longer an obstacle.
yccs27··on Show HN: Hsrs – Type-Safe Haskell Bindings Generator for Rust
Thank you for the detailed answers!

I think purity is something the programmer just has to annotate themselves. Any boundary between languages with different type system guarantees will always have this kind of friction - Rust to C/C++ FFI also has to deal with ownership, lifetimes and aliasing manually.

Regarding type classes, monomorphisation indeed seems like a difficult obstacle for polymorphic function. But just translating type classes and impls might not be as difficult? So going from:

    trait Foo {
      fn foo(&self);
    }
    
    impl Foo for Bar {
      fn foo(&self) {...}
    }
to

    class Foo a where
      foo :: a -> IO ()
    
    instance Foo Bar where
      foo :: Bar -> IO ()
      foo self = ...
yccs27··on Show HN: Hsrs – Type-Safe Haskell Bindings Generator for Rust
It's great that this allows passing Rust structs both as ForeignPtr and as native records with marshalling!

Some questions/ideas:

- Is there a way to generate #[hsrs::data_type] bindings for Rust library types, or do you need to create custom wrapper types for them?

- It seems like all #[hsrs::function]s are translated to return IO (since Rust functions can do arbitrary side effects). It would be great if you could (unsafely) mark functions as pure, to get pure Haskell functions without having to wrap them in unsafePerformIO.

- Both Haskell and Rust have HM type systems, so I wonder if you could also translate type classes from Rust to Haskell.

yccs27··on Monad Tutorials Timeline
Monads got their name from monoids (being a monoid in the category of endofunctors). Monoids are equivalent to one-object categories, so the name uses the greek syllable "mono" for one.
yccs27··on Illegal vs. Unwanted States
I've noticed this with UI interfaces before: For example, an IBAN field which actively blocks you from entering more than the expected number of characters. Seems like a good idea - except whoever sent me their account number helpfully included spaces to separate blocks of numbers, so when I copy-paste it the last few digits get cut off. Now I not only have to delete the spaces, but also copy the missing digits again! Just make the field red and block me from submitting until I fix my input!
yccs27··on [dead]
Does "Pharma" actually dose medication based on the Eyring equation? I'm not convinced we actually know the value of ΔG. AFAIK, the optimal biological dose is determined via dose-ranging studies during Phase I/II of clinical trials. And drug metabolism rate is measured, not derived from theoretical models.
yccs27··on Waymo Safety Impact
Road capacity does not increase with speed above 50 km/h on urban roads or 70 km/h on highways. Following distance scales with speed, so more speed can actually mean fewer cars per unit of time.

In theory, braking distance scales quadratically with speed. In practice, people leave less room on highways, because they rely on others driving predictably, but spacing still increases faster than linear.

yccs27··on Hisense TVs add unskippable startup ads before live TV
I'm not so sure this is really a free market equilibrium. There are two effects which explain the prevalence of ads even if consumers are willing to pay more for ad-free products:

- Imperfect information, aka Market for Lemons: It can be hard to find out how prevalent ads will be when buying a product. Consumers often make a purchasing decision without knowledge about ads.

- Changing terms after lock-in, aka Enshittification: Manufacturers (like Hisense here) can add advertising to products after consumers have already bought them. Initially, consumers have negotiation power since they can freely choose a product, but later they are locked in and cannot easily react to the manufacturer changing the product to their detriment.

yccs27··on The “JVG algorithm” only wins on tiny numbers
The last line of the introduction

> By doing so, we aim to provide a novel paradigm [...]

also made me think of item 19 on your list:

> 10 points for claiming that your work is on the cutting edge of a "paradigm shift".

I'm sad though that you didn't call it the "Baez crackpot index"...

yccs27··on Voith Schneider Propeller
This reads a lot like an advertisement. The linked page [[Cyclorotor]] is more neutral and has more information on the design and applications outside of marine vessels:

https://en.wikipedia.org/wiki/Cyclorotor

yccs27··on Wisconsin communities signed secrecy deals for billion-dollar data centers
It‘s preying on the city‘s desperation to get a cash payout, to get space and utilities worth much more. Facebook abuses its market power to pit city governments against each other, while the cities don‘t have many alternatives.
yccs27··on Are two heads better than one?
The saying probably assumes that each chronometer has a certain small probability of malfunctioning, resulting in a significant error (basically a fat-tailed error distribution). With three chronometers, you can use a robust estimator of the true value (consensus value or median). With two, there's no robust estimator and if you use the mean, you have twice the probability of being significantly wrong (though only by half as much).
yccs27··on Show HN: Cachekit – High performance caching policies library in Rust
Thanks for the link, nice to see the informal conventions spelled out like this!
yccs27··on The chess bot on Delta Air Lines will destroy you (2024) [video]
True, although better pruning can massively lower the effective branching ratio compared to pure alpha-beta, making the algorithm benefit more from longer search time again (which is why pruning is so important).
yccs27··on Looking for flagged discussions on HN? See what's active
Users with enough karma can "flag" posts and comments, which a) calls for moderator attention and b) decreases ranking. It's meant for off-topic/inflammatory/low-quality submissions.
yccs27··on Some Junk Theorems in Lean
It is enforced automatically for most purposes: If you're writing a proof involving e.g. the sqrt function, you want to use theorems about it, e.g. that (sqrt(x))^2 = x. Almost all of those theorems have x>=0 as a precondition, so you do need to prove it when it matters.
Page 1 of 14Next →