Hacker Newsnew | past | comments | ask | show | jobs | submit | yoshuaw's commentslogin

A lot of us are our own instance admins, with our own accounts being the only accounts associated with our domains. I don't self-host though; I pay a dedicated hosting provider to handle this for me. This means I end up having a very similar relationship to my Mastodon provider as to my email- and cloud storage providers.

> I always forget the order of precedence for FnOnce/Fn/FnMut

The way I remember the ordering is by thinking about the restrictions the various Fn traits provide from a caller's perspective:

  1. FnOnce can only ever be called once and cannot be called concurrently. This is the most restrictive.

  2. FnMut can be called multiple times but cannot be called concurrently. This is less restrictive than FnOnce.

  3. Fn can be called multiple times and can even be called concurrently. This is the least restrictive.
So going from most to least restrictive gives you `FnMut: FnOnce` and `Fn: FnMut`.

Fn can only be called concurrently if its environment is Sync, which is often true but not necessarily.

It’s more precise to say that Fn can be called even when you only have shared access to it, which is a necessary, but not sufficient, condition for being able to be called concurrently.


I'm not sure myself, does Fn correspond to reentrancy or is there some detail I am missing?

`Fn`, `FnMut`, and `FnOnce` can also implement and not implement `Sync` (also `Send`, `Clone`, `Copy`, lifetime bounds, and I think `use<...>` applies to `impl Fn...` return types).

EDIT: https://news.ycombinator.com/item?id=46750011 also mentioned `AsyncFn`, `AsyncFnMut`, and `AsyncFnOnce`.


If we're talking sanitation tech: I'm personally really excited by the further miniaturization of (far)-UVC light sources [1]. Far-UVC lamps deactivate airborne pathogens, but cannot penetrate the human eyes or skin making them generally safe to use.

Right now they do require rather bulky lamps (Krypton Chloride), but last I checked there had been promising advancements in producing far-UVC LEDs [2]. Which should make installation and deployment of far-UVC both more practical and economical in the future.

[1]: https://en.wikipedia.org/wiki/Far-UVC

[2]: https://ece.engin.umich.edu/stories/ece-spinout-company-ns-n...


I couldn't agree more. And in the rare cases where destructors do need to be created inline, it's not hard to combine destructors with closures into library types.

To point at one example: we recently added `std::mem::DropGuard` [1] to Rust nightly. This makes it easy to quickly create (and dismiss) destructors inline, without the need for any extra keywords or language support.

[1]: https://doc.rust-lang.org/nightly/std/mem/struct.DropGuard.h...


The differences in regional prices are interesting to me. From a recent article comparing BYD's offerings [1]:

> The BYD Dolphin EV sells for the equivalent of around $16,500 in China, while in Germany, with the same battery pack, it’s over $37,400, or more than double the price. The Seal costs around $30,300 in China, while a similar version currently on sale in Germany is over $48,000. Reuters found Dolphin prices outside China between 39% and 178% higher, while those for the Seal ranged between 30% and 130% higher.

Affordable EVs are here already, though access to them is not evenly distributed.

[1]: https://insideevs.com/news/718036/byd-major-ev-markup-prices...


Some anecdata from my kitchen, which has an air quality monitor positioned approx. 4 meters away from the stove:

- Most days when cooking PM2.5 doesn't exceed 5ppm.

- I accidentally burned some vegetable oil this week, and PM2.5 shot up to around 70ppm.

- I fried up pancetta a little too hot a few months ago, rendering the fat entirely, and both PM2.5 and PM10 went up to >999ppm.


> Running a relay is not expensive anymore [...]

$30/mo is $360/yr, which for most people is a prohibitively large sum of money. That would make Bluesky access more expensive than even the most expensive Netflix subscription; closer to the cost of a cellular plan.

For comparison: for my Mastodon account I pay $5/mo or $60/yr to a dedicated hosting provider. This puts it in the same ballpark as paying for a private email host or a VPN subscription.


This makes sense, but a Relay isn't something you'd expect a normal user to run.

It doesn't meaningfully make you "more independent" because all Relays are trivial (they're just dumb re-broadcasters of a stream) and it makes sense to use one run by somebody else — a company or a community that's pooling resources.


Aren't the entities who manage relays the ones who broker access to the network? E.g. if you subscribe to a relay, you must also subscribe to their moderation decisions.

Say if Bluesky (the company) bans someone, that person could still have the keys to their data, but their feeds will no longer be "re-broadcast" by that company's servers - right?


Relays aren't really user-facing, so most relay operators would probably only censor a user on the relay if there is some legal or network reason to do so, say content illegal in their jurisdiction or excessive spam.

If an app is concerned that a relay is censoring some user that they care about, the easiest solution is just to host their own relay. It's probably cheaper to operate than their app is. But if they really wanted to, they could listen to multiple relays to "cover the gap" or just manually listen to the event stream from specific users' PDSs directly whenever they notice censorship (effectively operating a partial relay in addition to listening to a full but censored one). But, again, in reality they'd just host their own relay and not bother complicating things.

The hardest problem of relays censoring content is to notice it happening, but once you notice you can easily verify it and switch to a different relay.


The PDS is closer to the Mastodon account and will run you the same amount of money. The relay or appview is what takes the load when one of your posts goes viral, whereas in mastadon your $5 VPs has to handle that spike in traffic. Been several a story about how AP has DDoS'd a small server because there is no equivalent to the relay


There's no real reason to set up a relay for just one person, though.

It's less like a cellular plan and more like building your own private cell tower just because you can.


It's hard to tell honestly. I studied psychology for two years in uni, and I dropped out rather disillusioned about the field. Some of my least favorite aspects included:

  - Acknowledgement by our professors that P-hacking (pruning datasets to get the desired results) was not just common, but rampant

  - One of our classes being thrown in limbo for several months after we found out that a bunch of foundational research underpinning it was entirely made up (See: Diederik Stapel).

  - Experiencing first-hand just how unreproducible most research in our faculty was (SPSS was the norm, R was the exception, Python was unused).

  - Learning that most psychology research is conducted on white psychology students in their early/mid-twenties in the EU and US. But the findings are broadly generalized across populations and cultures.

  - Learning that the DSM-IV classified homosexuality as a mental disorder. Though the DSM-V has since dropped this. 
The DSM-V is still incredibly hostile towards trans people through a game of internal power politics and cherry-picked research. It's really bad honestly.

Though I do generally hold psychologists in high regard (therapy is good), I'm not particularly impressed by psychology as a science. And in turn don't necessarily trust the DSM all that much.


> Experiencing first-hand just how unreproducible most research in our faculty was (SPSS was the norm, R was the exception, Python was unused).

How did you experience this? Did you fail to reproduce the same results when doing the research again while using R? This is how I interpret your statement, but I think it's not what you mean.

If SPSS was the norm, R or SciPy shouldn't have made a difference in reproducibility as the statistics should be more or less the same. I did social science with SPSS fine; T-Tests, MANOVA, Cronbach's alpha, Kruskall-Wallis, it's all in there. It seems you suggest that using SPSS inherently makes for bad and irreproducible science, it's similar to saying using Word instead of an open source package like LaTeX makes research unreproducible even if the data, methodology and statistics are openly accessible. This is not the case. What i mean is that while I agree there can be friction between using Word and SPSS and Open Science and FAIR principles because of the proprietary formats, this isn't inherently a problem as people can use the dataset (csv or sqlite) and do the mentioned statistical tests outlined in the published pdf (or even an imported docx) in any statistical language.

https://www.go-fair.org/fair-principles/

For anyone looking for an easy to use alternative to R, Jamovi is a capable and easy to use open source alternative to SPSS and RStudio. https://medium.com/@Frank.M.LoSchiavo/jamovi-a-free-alternat...


obviously p-hacking wouldnt be as prevalent if we just re-wrote DSM in rust


there'd be way too many personality traits included tho


>One of our classes being thrown in limbo for several months after we found out that a bunch of foundational research underpinning it was entirely made up (See: Diederik Stapel).

That's mild. In one of Chile's largest and most prestigious universities, Jodorowsky "psychomagic" is teached as a real therapeutic approach.


At least you're working with Rust now.

As someone with zero knowledge of psychology, I'm biased against it. Partly because of my vague impression that psychology tries to fit people to models, rather than viewing models as limited approximations.

For a while I've thought it would be nice to know what results the field of psychology actually has that are trusted. Was there anything at all in the taught content which you liked? I didn't realise the DSM-V was that bad. If research on trans people can be cherry-picked, then does that mean that some reliable research exists?


> As someone with zero knowledge of psychology, I'm biased against it.

Then you are biased against "the science of mind and behavior"[0] by definition.

> For a while I've thought it would be nice to know what results the field of psychology actually has that are trusted.

Perhaps that people who seek out and engage in therapy with qualified professionals can (but not always) improve their lived experience?

Or that by studying the mind and human behavior, mental illness is now considered a medical condition, worthy of treatment, and has much less social stigma than years past?

0 - https://www.merriam-webster.com/dictionary/psychology


> One of our classes being thrown in limbo for several months after we found out that a bunch of foundational research underpinning it was entirely made up (See: Diederik Stapel).

I wonder if you can sue for fraud over this. The researcher knowingly deceived academia, and it's foreseeable that students would then pay to study the the false research.


>P-hacking rampant

give us your best academic hypothesis as to why p-hacking is rampant: I'll bet it will sound like psych analysis


Incentives. Straight outta the dismal science.


people go into academia for the money? no. they do it for the recognition they seek, the status they will attain. publish or perish.


> publish or perish

Yes, that's the summary of the incentive system. It's not a highly remunerative profession although the rockstars can do quite well (usually through side gigs).

Practitioners of economics accept many types of scarcity and currency. Consider, for example, the marketplace of ideas paid for with attention, belief, energy spent spreading our favorites.


We are more or less trying to solve this exact problem with Wasm Components [1]. If core WebAssembly is a portable instruction format, WebAssembly Components are a portable executable/linkable format.

Using them is unfortunately not yet quite as easy as using repr(wasm)/extern "wasm". But with wit-bindgen [2] and the wasm32-wasip2 target [3], it's not that hard either.

[1]: https://youtu.be/tAACYA1Mwv4

[2]: https://github.com/bytecodealliance/wit-bindgen

[3]: https://doc.rust-lang.org/nightly/rustc/platform-support/was...


I love WASM and WASI, but it's not nearly the same, unfortunately. Performance takes a hit, you can't use async in a straightforward way, launching hundreds of thousands of tasks is problematic etc. WASM is great for allowing to extend your app, but I don't see it as a replacement for an ABI anytime soon


Hey all, today the Azure Core Upstream team has open sourced Wassette: a WebAssembly-based runtime that allows Wasm Components to connect to AI agents using the Model Context Protocol. Wassette’s main contribution to the MCP space is efficient sandboxing: because if you’re going to run untrusted third-party tools locally, it’s probably a good idea to proactively restrict which system resources it can access.

In this post we explain what Wassette is, how to set it up locally, and finally walk through an example that exercises Wassette’s capability system. What we don’t cover in the post is how to write Wasm Component-based tooling for Wassette, but we have some docs for that in the README [1].

Anyway, I hope this interesting to folks here! I’ll be around for a couple of hours here to answer questions folk might have. And if I don’t know the answer, I can probably find an engineer who does. Thanks!

[1]: https://github.com/microsoft/wassette#building-for-wassette


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: