skysight-inc/HackerNews huggingface dataset:
I'm catching up on this thread now, sorry for the delay. You're absolutely correct. My function needs A, B and C to work is valid. That's perfectly fine.

if __name__ == "__main__":
a = os.getenv("foo")
b = get_from_somewhere()
c = "some_hardcoded_variable"
my_app(a, b, c)

Is what I would expect in any reasonable codebase. The indirection and cognitive overhead was taken from Java where seeing @Autowired or @Inject, hitting reverse search and not being able to keyword search for the thing being injected is nightmare fuel. That is not something I would wish on an enemy, let alone on any user of a programming language I care for.

My original reply was in response to "please don't make Python Java", where that flavor of spooky action DI seems to be common.

To your original question: `what do I suggest`. I point to the authors example:

di = Di()

@di.register('A')
class A:

def __init__(self, di: Di):
pass

def action(self):
print("Hi from A")

@di.register('B')
class B:

def __init__(self, di: Di):
self._di = di
self._a = None

def run(self):
self.get_a().action()

def get_a(self):
if self._a is None:
self._a = self._di.get('A')
return self._a

@di.override('A') # replace class A definition with a new one
class C:

def __init__(self, di: Di):
pass

def action(self):
print("Hi from C")

di.get('B').run() # prints "Hi from C"
di.remove('B') # removes the B dependency from the registry

My suggestion: please not that.

How about:

class A:

def __init__(self):
pass

def action(self):
print("Hi from A")

class B:

# A is default for some reason
def __init__(self, a=A()):
self._a = a

def run(self):
self._a.action()

class C:

def __init__(self):
pass

def action(self):
print("Hi from C")

if __name__ == "__main__":
if os.getenv('ENV') == "PROD":
a = A()
b = B()
# test/non-prod/whatever version
else:
a = A()
b = B(C())

As someone who's been writing python for a while, I could walk into this having never read it before and say...ok sure, when prod, B takes A behavior, but when not prod, B takes C behavior.

In the proposed example, I would go in, read it (assuming I know to even look for this non-idiomatic use of the language) and then read through this code to figure out what should have just been an argument passed to B.

Which leads back to my original question: what is this buying me over dunder main or handing some arguments? In terms of cost, I have to understand something and walk through the code to understand something that could have been done more simply and more explicitly without this DI pattern.

Edit: formatting
I use bitcoin to do my sports gambling all the time. Works out great and the online bookie I use gives incentives to use it as well. It works perfectly for that. I also give BTC as gifts. Also works perfectly for that. It's not a day-to-day thing for me because I use USD and my insurance-backed credit card for that.
Or how about an OS-level software mute? Like you have for muting the speaker.
How about Dogecoin via a random Starlink base far from your normal route?

That could be coming soon. If it doesn't, something like it will.
Let's say I'm building a stack overflow style editor (you type markdown and it gets rendered in a preview tab) -- would there be any reason to use lexical?
re: programing/code comment...(disclaimer, I work for Neeva) we are actually an ad-free, private search engine. Comprehensive search which includes user friendly code query results and no ads and no affiliate links. We also block third party trackers, give you agency over preferred sources, and lots of unique features that no other traditional search engine that relies on ad revenue can offer. If your curious, check us out at neeva.co
This is a great idea. On YouTube I use the 'Don't recommend channel' button a lot and consequently the algorithm has learned to filter out a lot of the nonsense.
I’ve seen customer and resource level restores deprioritized more than once and the only hypothetical given serious thought is avoiding helping customers who accidentally deleted something because of the support burden/cost. No one seems to have much concern for what happens when they’re the ones that screwed up.
Whatever happened to Oath
Meta Plans to Take a Nearly 50% Commission on Purchases Made Inside Metaverse
Wow would you look at that, a complete Atlassian puff piece got published in the WSJ just hours ago.

How peculiar that the biggest active outage in the history of this company is not mentioned once in this "article".

I'm left to assume that PR teams can plant whatever they see fit in the WSJ at a moment's notice. I guess that's what passes for journalism these days.

https://www.wsj.com/articles/atlassian-puts-easy-to-use-codi...
At the hardware level, it takes 0 time (10's of microseconds at most for I2C connected codecs, maybe a millisecond for USB 2.0 sound card) to mute the mic input channel to the mixer sitting before the A/D converter.

If it takes any more than 0 time, it's caused by badly written software.

I wouldn't blame the HW for the privacy issues, here.
Plenty of us have cold storage wallets from years ago. Not theoretically impossible to track but pretty darn difficult. To contrast, any and every bank account and ETF holdings (in the USA) are extremely KYC'd.
According to the chart here: https://arstechnica.com/science/2022/04/higher-w-boson-mass-...

It seems to align with measurements from:

* D0 I

* CDF I

* OPAL

* ALEPH

I do not know what refinements happened between D0 1/2, or CDF 1/2.
A long time ago I did something like this with ImageMagick using what it called "Extract SIFT Correspondences". I don't know if that still exists, but the homography feature in OpenCV looks like the same idea: https://learnopencv.com/image-alignment-feature-based-using-...
I agree with the first point which is definitely a blessing even if we can't see it directly.

To the second point I would argue (and I unfortunately do argue) that "responsibility" can be a vague and subjective term. Like is it a hard-coded responsibility to make your bed every morning? Some would argue yes and use funny arguments like "ask anyone normal" or "all highly intelligent/successful people do it". I would say it's generally a waste of time unless you're bed is so off that you can't comfortably get back into it.
Neither does a meter-tall Mercedes badge, but they keep selling vehicles in North America.
Ask HN: What excites you about web development at the moment?
I'll be honest, I used to get so excited by web development when I was still a teenager. I would spend hours building websites in PHP, learning HTML, hacking vBulletin forums, copying and pasting code from tutorials online.

15 years later and I actually work as a web developer, and frankly, the work is becoming a bit stale. I've probably spent too long working on the same sorts of things: Laravel, WordPress plugins, CRUD stuff mostly. But really, I think part of the joy has disappeared because it's become something I rely on for my income, rather than a passion.

I'd like to re-capture the joy I used to feel when I first started coding.

Web devs: what excites you about web development at the moment? I'd like to hear the frameworks, languages, projects or dreams you have that energise you.
ISTM the fairly obvious approach would be to bring up a complete copy of the affected database(s) and move the affected tenants to that "copy", while eventually deleting non-affected tenants. Can't imagine they don't have the ability to move tenants to different shards, they got to need that to deal with quickly growing customers etc.
I use cat like this all the time. It means I can easily change whatever program I'm using to interact with the program (e.g. switching `tr` to `sed`).
Do Your Marketing Metrics Show You the Full Picture?
Not as easy as googling for a restaurant, but definitely doable with the right tools.
I made a Firefox extension (and accompanying autohotkey script) because muting Twitch streams of League of Legends esports broadcasts in between games with my mouse was irritating and I could find no existing way to do it with a keyboard shortcut. https://github.com/RheingoldRiver/MuteTabsMatchingPattern
Yeah, you could easily do that. We do the exactly that right now for Workplace.

You could also roll with a `<textarea>` but that can be limiting if you want additional functionality further on down the line – such as mentions or inline markdown shortcuts.
Reminds me of https://xkcd.com/2606/

Explained: https://www.explainxkcd.com/wiki/index.php/2606
A reanalysis of data from a stopped detector wont continue to deform but nice try...
0.1% isn't close to the truth worldwide either, so it's inaccurate regardless.
> They're sitting on a huge pile of cash, far more than they need to operate their already massively bloated organization for many years to come.

This is the most ignorant comment I've ever read on an org that relies on donations. Cash runs out my friend (shit happens, operations change and scale, bad decisions occur). It's not like they are a for profit business that can rely on other methods.
Yeah bunch of scripts mostly. Things I find most useful are tamper/grease monkey scripts that makes interacting with common websites easier.

- I play a lot of chess and I want to click a button to copy the chess PGNs from chess.com easily while playing a game: https://pastebin.com/UKVUXQxc

- Another one is to grab property info from Redfin and paste it in google sheet for easier analysis and comparison b/w properties: https://pastebin.com/EmH66Q0r
Magnetizing an Atomic Gas with Light
Just a note on 1. It’s not incitement when it’s orders. Putin is in a position to give the orders.
>A Meta spokesperson confirmed to CNBC Wednesday that Meta will take an overall cut of up to 47.5% on each transaction. That includes a “hardware platform fee” of 30% for sales made through the Meta Quest Store, where it sells apps and games for its virtual reality headsets. On top of that, Horizon Worlds, will charge a 17.5% fee.

I don't know how anyone would be able to turn a profit paying those fees.
One of the big frustrations with DraftJS is that Facebook moved on (which is understandable), but the core repo wasn’t given control to the community, so patches and updates couldn’t be pulled in. Obviously it’s open source and could be hard forked, but that’s not ideal.

I’d be curious if there are plans internally to make sure Lexical continues
to be supported by Facebook and doesn’t end up with the same fate.
Why in God's name is it 500$ ? OEM windows licenses are basically free.

Even if you brought it individually it's only 200$.

https://www.microsoft.com/en-us/d/windows-10-pro/df77x4d43rk...

Definitely leaves a bad taste in my mouth. Looks like you'd save a solid 1500 by just buying a 3080 Razer laptop and setting it up yourself.

https://www.bestbuy.com/site/razer-blade-15-advanced-15-6-ga...
Last snapshot on Oct 02 2021 before page was changed: https://web.archive.org/web/20211002154145/https://www.badmo...

The site seems to be focusing on latency/jitter issues: https://web.archive.org/web/20210506114456fw_/https://badmod...

I'm not entirely sure what to make of the information presented. The page above includes an embedded video demonstrating a difference between ICMP and TCP load-testing: https://www.youtube.com/watch?v=15cJ400yR_E

I'm not knocking that there is interesting data, I'm rather trying to consider potential confounding factors that could call the conclusions being drawn into question.

In particular, I have two questions:

- This doesn't talk about "bufferbloat" (https://en.wikipedia.org/wiki/Bufferbloat) or internal buffering happening inside the modem, only latency/jitter. I'm honestly completely naive about the relationship between the two concepts, but I thought they had reasonable overlap, and could even potentially go some way to explaining the dynamics of what's going on. Why not?

- The video seems to just be TCP- and ICMP-pinging 8.8.8.8. Surely that address is sufficiently hammered that it probably implements fairly aggressive rate control algorithms...?
You are mistaken, the analysis derives out of one of the core elements of firm theory. It doesn't assume a zero-sum situation at all.

There's a lot of literature on 'the analysis', which happens to not be mine. It's actually one of the core elements of neoclassical economics.

>one could just as easily argue that labor is exploiting capital

No, one couldn't.

>In a chapter 11 bankruptcy, capital is lost while wages remain protected.

Depending on the jurisdiction, wages are provided a super-priority status. Other super-priority stakeholders are afforded equal protection amongst themselves. Priority stakeholders, such as lenders with security, are provided more protection than unsecured lenders, etc. Protection for missing wages exists solely due to rectifying legislation attempting to address of how disadvantaged a worker is when a business's assets are encumbered and they have no priority.

However, when it comes to managing risk, workers have to hope they'll get paid, while a secured lender can request assurances that potential super-priority stakeholders have been paid to determine the amount of exposure they're willing to entertain, and call their loans due in the event covenants and other monitoring systems indicate financial duress. Workers have no equivalent protective system.

Honestly most of these points feel like they're relatively uninformed and don't hold up to much scrutiny.
It’s only defamation if the statement is false and you can prove some sort of harm was done.

Really? You can’t write about anyone else? How do newspapers exist? Biographies?
Do you have any support for collaborative editing such as with Yjs or Automerge?
Do you have insight into the design trade offs made by the apple silicon teams? Because it sounds like Apple's silicon team disagree and took a different design approach to what you would do in your designs?
I thought it was about DSLReports and not DSLR cameras…

But the entire thread was hard to follow on that site. There wasn’t much context.
Yes, I agree. That's why I pointed out that it was specifically US market share. I just found those quickly. The percentages are lower in other regions, but the total numbers are still huge.
Thinking about all the folks with sites powered by Confluence and this quote I heard from a customer today:

“We build to static HTML, deploy to S3 and Cloudfront, and it’s f*ing bomb proof”
I think history proved fairly convincingly that people would still get scammed with the old system. Given that, I'll take encrypted traffic almost universally across the internet and scams still being a thing over mostly unencrypted traffic any day.
For that you need an actual pro laptop like a lenovo which has mute button and led for Mic
Free peaceful expression should never be a crime, as there is no victim and no one is harmed.

Teaching itself is never inherently harmful. Sanctions are authoritarian nonsense.
ProseMirror wasn't a good fit for us because it's integration (especially with React 18+) isn't quite there. Furthermore, we're also looking into building native ports of Lexical, and given's Lexical's API isn't DOM centric, it allows us to do that.

Lastly, we found ProseMirror was too heavy in terms of bytes for very minimal almost plain-text interfaces where we only wanted mentions + hashtags + custom emojis. Lexical comes in at around 22kb min+gzip, so it works really well for us.
> ...while Ukraine certainly ceases to exist. Also, the only country that nuked another country hasn't ceased to exist, so not sure where your claim comes from.

My claim comes from the clear line that was drawn in the sand by NATO. A nuclear attack demands a deviating response. This is also the exact reason why Russia will never use nukes. They understand that there state ceases to exist once that button is pushed.

The comparison to the only use of nukes during a war is also invalid as during that time every nuclear power was effectively on the same side. That’s obviously no longer true with the current conflict.

> Again, unsure where that claim comes from. Fog of war doesn't allow anyone to know the ratio for sure.

These are the visually confirmed loses that we are seeing. But if you want to dismiss them with the same comment sure but if you do that you can claim to know what it is (3:1 or otherwise).

> In the long term, this doesn't matter. Allies have captured lots of Enigma machines, but that's not what got them to decypher the Axis communications.

Knowing how a cryptosystem works and knowing the EW capabilities of your opponent is a huge upper hand. It may not lead to the instant breaking of ciphers or countermeasures against Russian EW equipment but it makes it a lot easier.

This ignores all the ELINT/SIGINT that America is getting from hoovering up all the signals at the border too.

> Finally, the argument I'm making is that short-term doesn't matter, only long-term does, and we haven't seen that yet. The formidable resistance that Ukraine has managed to put up so far is impressive; but the final outcome will not necessarily be determined by it.

Here’s the long term outcomes if Ukraine loses the war. Multiple European countries that border Russia likely want to join NATO and the European countries in NATO largely increases there defence spending.

That seems like a pretty poor victory to me.

But long term we don’t know who is going to win, but we do know it’s not going to be via suicidal moves like nuking Ukraine or building T-34s again.
Ask HN: Does music play a significant role in your life?
Does music play a significant role in your life? How so?

Do you appreciate the art/composition of music? The atmosphere?

What genres/artists?

Do you have a preference for headphones or stereo?

Do you make/write music? Are there particular aspects you enjoy the most?

Do you listen to feel?

Do you listen to cope with particular experiences/emotions? Or maybe to reach particular emotions/emotional states?

Do you find that music (the listening and/or the making of it) has therapeutic benefits?

Or if you love music for any other reason, do share!
> I really wish I could have read it sooner in my marriage, like before my marriage.

A thousand times this, yes.

I may start giving it to people as an engagement present, now that you say that...
even in the middle of the crisis they will play with ambiguity around the words "user" and "customer" to obfuscate the real situation (presumably they don't consider users 'customers', which goes right to the heart of enterprise software in general)
I'd been dealing with an RSI issue for about six years and had largely given up programming because of it, seeing no way around—then had an idea for a new kind of code editor that would let me program with motion sensors instead of seated with mouse + keyboard: http://symbolflux.com/projects/tiledtext

Once I was far enough in I saw the tech could be generalized beyond my own personal use case (it is vaporware though, never got the level where others could use it)—but 99% of the drive was just making something so that I personally could code without pain again.
Can't help with Europe vs European, but there's an option in the setting to automatically guess plural versions of words.
I watched the CDF presentation early yesterday morning at the April APS meeting. Nothing to indicate they were anything but meticulous in their data analysis and modeling. Keep in mind the main change in CDF II is a great reduction in uncertainty - the central value is not much changed from the original CDF results many years ago.

Tommaso Dorigo [1] covers a lot of the points where some of their assumptions/methods can be reasonably questioned but the effects would not push the result that much closer to the current SM theoretical value.

[1] https://www.science20.com/tommaso_dorigo/is_the_cdf_w_mass_m...
Self portraits while not as common as today, were not rare before smartphones on a stick.

There are ample examples and we know the term selfie originated from the term self portrait. Photographers before smartphones did use the term selfie though it wasn’t in wide use.

That said, I’m happy to see very old self portraits —I didn’t realize they went that far back as it would be harder before the 35mm cameras came around though Vivian Maier[1] used her rolleiflex quite often for her own self portraits.

[1] http://www.vivianmaier.com/gallery/self-portraits/
Wow, this is such a specific problem that I also have. Thanks for this.
I don't think this is a party issue as much as a broader cultural issue because in my experience you can extend 'America' to 'The Americas' rather than the United States specifically.

What Paul Graham is using that picture for is in my experience visible across the entire American continent and uniquely so. I've been to poor countries (comparably to the US) in the ME like Jordan when a quarter(!) of the population where refugees. It's just as corrupt of a place as anywhere else, but there was little fear of violent gun crime or violence in general as you have in bad parts of cities across the Americas.

You're pointing to the two party system, another commentator is pointing out that SF is a one party dystopia, PG is lashing out at the far-left but in Vietnam they have a literal one party communist government and that country feels perfectly safe so I really don't think political details is where the problem's at.
The Chinese Cartoon That Beat the Censors
Yeah I think this is confusing the gambler's fallacy with something like the hot hands hypothesis. The former has to be true by definition, assuming everything is as it should be, and there's no deceit or malfunction; the latter might be true empirically in reality.

I do think there's an interesting question that's raised by the essay though, which is at what point does a string become so inconsistent with a certain probability distribution that you have to question whether things are as they are assumed? That is, let's say you go into a casino and you keep getting wins. At what point do you say "this is so improbable under X probability of wins that something is off"? Gaming regulators must have some definition of this.
Ok, let's break it down:

You spend a year writing a book.

Labor rendered ideas into a form others can use.

It is capital. It is also a means. And it is a book.

Now you sell copies, right?

Capital did not sell copies. You did, and you had to labor to do that.

In the digital case, literally thousands of people and their labor copy, distribute and take payment for your book. It takes a lot of people to maintain that network your book is on.

Capital can amplify labor. That is a tool, device, mechanism.

Capital can compensate others for labor too.

What it does not do is create. That is what people do. That is what labor is.
Potentially just a refinement in the strategy of the analysis and/or more compute/time. Not the first time a measurement like this was off due to poor blinding...
Typical steam turbines have efficiency up to around 50%. I think the EPA is referring to isentropic efficiency[0], which is "efficiency" compared to the theoretical maximum for the delta T involved.

[0] https://en.wikipedia.org/wiki/Steam_turbine#Thermodynamics_o...
Congrats! You've invented a very bare bones inventory management system :)
>I don't understand the complaint here. It sounds like your wife is trying to get you, incrementally, to act like a responsible adult

The fundamental conflict is that the person and their wife's goals are not aligned.

If the husband does not want to develop into a "responsible adult" in this respect, their goals are not aligned. A good partner can help the other achieve their goals, but but if there is no alignment on the who one partner wants to be and work towards, this will always be a source of conflict.
Despite it's exploitative nature, I think Roblox will be sited by a lot of people as their first experience with game dev in the future.
True. Like their laid back approach to operations.