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

I mean you can opine about how Rust isn't suited for browser development, but as someone building a browser in Rust, I think it's just fine. If anything, Rust has been really shining in this project since Rust was designed to build a web browser.

https://github.com/dioxuslabs/blitz

Also I think it's a little ridiculous to build yet another new browser in a new language when so many amazing pieces are just sitting around ready for someone to use. Come contribute, we're already much further along :)

https://github.com/DioxusLabs/blitz/pull/292


agreed about rust literally being designed to build a browser, but when it was developed there were many amazing pieces sitting around in c++ :) let the zig folks have a go at building their own ecosystem.

That's why Rust was introduced into Firefox piece by piece. The goal wasn't to rewrite firefox in Rust - just to migrate the scary bits over to a memory safe lang. You can feel a lot of that in the servo codebase, weird pointer semantics as a result of needing to be API compatible with the C++ adapters.

If I were building a company around a new browser, I'd reach for the solid stuff that can be pulled in. Our whole blitz project is designed to be modular exactly for that use-case.


> but when it was developed there were many amazing pieces sitting around in c++ :) let the zig folks have a go at building their own ecosystem.

Servo had Mozilla's backing in that endeavor though, and even then they didn't manage to ship a full browser in a decade, the problem is just that hard.


> Servo had Mozilla's backing in that endeavor though, and even then they didn't manage to ship a full browser in a decade, the problem is just that hard.

Not that hard; Ladybird, with a fraction of the resources available to the servo team, is C++ (Moving to swift soon) and they got pretty damn far.

The lack of velocity in Rust is real; it's a trade-off between velocity and safety, and Ladybird has amply demonstrated just how rapid C++ velocity can be.

And this is coming from someone who doesn't even like C++.


> Not that hard; Ladybird, with a fraction of the resources available to the servo team, is C++ (Moving to swift soon) and they got pretty damn far.

You know the saying about the first 90% and then the second 90%? Making a web browser is the fractal version of that.

> The lack of velocity in Rust is real; it's a trade-off between velocity and safety,

No it's not, Rust has in fact much higher velocity than C++, even at Mozilla which was basically a C++ shop beforehand (and a pretty good one at that).

> and Ladybird has amply demonstrated just how rapid C++ velocity can be.

No, you seem to have a misunderstanding of what servo was. Mozilla didn't use Rust yo make a safer browser, they used Rust to make a faster browser by leveraging all the cores of modern CPUs. That was the primary motive for making Rust in the first place: making multithreading tractable for humans.

As a result, the servo project aimed for SotA performance and modules were rewritten multiple time as they improved the architecture for performance (see the different iterations of Stylo or Webrender, which ended up in Firefox proper when it converged).

That's why it was apparently slow, not because of safety but because it aimed to be the first fully parallel browser (which is something enabled by Rust's safety).

You can argue that Rust has lower velocity than garbage collected language because you need to think about ownership, but not that it has lower velocity than other low-level languages: they too need to think about ownership, they simply have no static check to catch errors at compile time: every error raised by the borrow checker would be as segfault. (And Rust keeps what makes C++ already much higher velocity than C, the ability to build powerful abstractions at no performance cost).


I’m really excited for blitz, thanks for this amazing project. Do you intend to wipe a full fledged browser out of it?

The browser UI will likely be more of a cool demonstration of the project instead of the end goal. We want blitz to exist to help make it easier to build stuff like lightpanda. There's a whole world of interesting browser forks that could exist but don't, and being able to easily remix the browser opens the door to new stuff like AI automation, hybrid native gui frameworks, better accessibility tools, etc.

It seems like the economy is on a “K” shaped flywheel. How much worse can the economy get for the regular worker before the systems just pops? We’ve put so much speculation into an AI/tech salvation that seems premature, especially when you look at ROI vs depreciation timelines.

I’m not sure what timeline to place on that but there has to be a floor for how bad it can get for the regular man.

Shit is just expensive. Young people can’t buy houses, good jobs are drying up, and inflation isn’t stopping.


Graph looks like it's going up to me.

https://fred.stlouisfed.org/series/MEHOINUSA672N


I'm sure the Fed chart is accurately measuring what it's measuring but when I was a kid in Southern California it was normal to buy a house and raise kids on a single teacher or construction worker salary. That has become nearly impossible over the past couple decades. Many others have seen similar changes in their own areas and I don't think they're being crazy when they say it has gotten much harder to finance a normal household on a normal salary.

I don't know what the disconnect is with that chart and people's observations. Is that chart controlling for number of incomes and hours worked? If a household income increases by 20% because the members are working a combined 80% more hours that's not great. Category differences in inflation might be another factor. Sure TVs and other niceties are a lot cheaper, but essentials like housing and medical care eat up a huge portion of most budgets.


The housing crisis is limited to California and other blue states; most places have the opposite problem.

Also, most US households are homeowners, which means housing prices going up increases their (imputed) income.

> Is that chart controlling for number of incomes and hours worked?

Why should it? It's bad practice to control for random things - that gets you collider bias.

But see:

https://fred.stlouisfed.org/graph/?g=cWvT

https://fred.stlouisfed.org/series/LNS11300060


> I don't know what the disconnect is with that chart and people's observations.

The disconnect is that CPI consistently significantly underestimates inflation as experienced by real people.


Slightly overestimates. Alternatives like Truflation show it lower.

You may be thinking of Shadowstats, which is run by a crank who just takes the official numbers and adds a number he made up to them.

I don't know why cranks always think inflation is secretly higher. Deflation is a lot worse than inflation, so if you're a doomer, believing in deflation would be more effective.


The idea that CPI sucks is far from a conspiracy theory... not sure why you're trying to color it like that.

The problem is that the error integrates over time, which IMHO is why graphs like that seem to suggest our standard of living is higher than ever... when a conversation with anyone at a local bus stop will tell you the exact opposite.


It's almost impossible for the standard of living to not be higher than ever. That becomes true if you assign any value at all to new medical discoveries. Like, people have been cured of type 1 diabetes in the last year.

I don't think a guy at a bus stop represents the median household well. I'd rather have https://www.census.gov/programs-surveys/cps.html.


That chart for sure includes higher portion of double income households (because now more women are in the workforce than in the 80s). This reconciles your view with the Fed graph

(Edit-misspelled Fed)


Households can have more than two incomes - roommates, children who work, grandparents etc.

In practice, household sizes have gone down over time as more people live on their own, which means the income graph is lower than it otherwise would be.

https://fred.stlouisfed.org/graph/?g=cWvT

As for dual income families, they're mostly a good thing that happens when women can afford to pay for childcare. That is, that book The Two-Income Trap was mostly false. This is part of the topic of Claudia Goldin's economics Nobel, the other part being that the gender wage gap is caused by motherhood interrupting women's careers.

https://www.nobelprize.org/uploads/2023/12/goldin-lecture-sl...


Inflation measures aren’t fit for purpose. The biggest expense is housing and housing as a proportion of income is what is killing people financially.


Housing is the largest component of both inflation measures.

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


I take it back.


In high school, I ran a robotics team that did lots of STEM outreach. We went to community centers, after school programs, and worked with other similar orgs like "girls who code."

I think we played an important role in the community. In our mission we stated we wanted to help bring "equity to STEM education."

In 2025, according to the current admin's stance on "DEI," my robotics team would not be able to receive grants without risk of being sued. It's plainly obvious the line is not drawn at restraining "overly progressive policies" - it's just arbitrarily placed so the govt can pick and choose the winners based on allegiance.

It's a shame that folks with a strong moral fiber are now punished for wanting to help their communities.


Around 2019, Guido official stated that he would not longer mentor any white male, and that there was enough white males around that any white male who wanted to learn developing python would have to do it on their own. The community in general seemed to follow the same policy back then, but now seem to have relaxed a bit.

Reducing complex individuals into two bits of information, skin and gender, will never be a stable system for equity. It always bring push back, which usually escalate hostilities and bring more polarization.

I would like to imagine than in the place of DEI or anti-DEI, we will instead see a push for programs that look to the individual and their need for support. Needing mentors and support is not born out of gender or skin color, nor faith or sexual orientation. Its born from human need to improve oneself and those around us. That is a program that deserve government grants, and I wish there was governments that would support that in 2025 political climate.

I noted today in local Swedish news that one of the largest STEM university in Sweden found that they have now reached their gender equallity goals for technical programs, and is looking to change the diversity program towards other demographics that has been overlooked and gotten worse over the years in term of gender equallity, like for students in biology and chemistry. Time will tell what the people with strong moral fiber will do, as there seems to be a lot of resistance among those who previous was supported by that diversity program.


>>> Reducing complex individuals into two bits of information, skin and gender, will never be a stable system for equity.

It's a remarkably stable system for inequity.


>Around 2019, Guido official stated that he would not longer mentor any white male

Honestly such statements weird me out. How did we come to saying such things being considered normal??


From my side of the coin, I've always thought that the best solution is ground level support.

Ensure that students of any type have excellent public schools. Ensure that people without resources, of any background, have access to higher education. This can be by grants for the very poor, just as it can be by government backed, guaranteed approved student loans.

Healthy, stable food in schools is an excellent way to keep a child's mind on education.

These things level the playing field. There are plenty of white males who need such help to be on a level playing field with wealthier families too. I grew up in a rural community in Canada, and saw many smart but underprivileged(including trouble with keeping food on the table) families end up with grants to go to university.

If you do this, if you provide the capability for merit to shine, and ensure that merit can be fed intellectually, you're doing much of the work required for true equality.

I frankly don't give a rat's ass about women being in any specific field, or someone of whatever skin tone. I do 100% care if people want to, but cannot!! I want all who are capable, to be able to express that capability.

If this is done, and done correctly, then the numbers of candidates applying for jobs will result in numbers indicative of candidates in the field. And more importantly, of people wanting to be in those fields. If you get 11% women in the field, and 11% women applicants, and nothing prevented women from entering that field, you're where you want to be.

We don't need to encourage people to enter a field. We need to only ensure they can if they want to.

This sort of "women are weak and are scared of entering fields" is bizarre, from an equality standpoint. The same for people with different skin tones. Why do people seem to think women, for example, are weak and incapable of pursing their dreams? They are not!

The women I've known in my life have been strong in opinion and in drive, the same goes for people of any racial background. There are of course those that are not, but I've seen lazy, undriven white males too.

People don't need to be prodded, dragged, pulled into a field.

They just need to have no way that they are hindered. They just need the freedom to choose. To know that they can pursue that which they desire.

Support at the ground level does this.


It's not like a white male cannot get mentored in Python by anybody. By 2019 Python was already one of the most popular languages in the world. Surely any dev on Earth who wants to learn Python has plenty of people and resources at their disposal, and it would take a very good set of reason to turn to the language inventor himself.

I agree that DEI often acts as a fig leave over a whole bunch of other systemic issues, and the European vs American cultural and historical landscapes are already so different as to make any cross-the-pound discussion on DEI extremely hard to navigate, but I still commend the PSF for not taking clearly ideological orders from a funding body. That road would have lead to nothing but trouble.


> The community in general seemed to follow the same policy back then

Our definitions of the community in general must differ. This was not what I saw.

> Reducing complex individuals into two bits of information, skin and gender

This is a straw man. Skin and gender were not the only factors he considered. And he considered gender because of patterns of failure when other mentors mentored women.


I appreciate your efforts to support community and people


> the line is ... arbitrarily placed so the govt can pick and choose the winners based on allegiance.

This is the real problem. They use vague statements to make decisions based on loyalty with just enough merit as distraction.

Everything will get much worse for everyone, and they will probably set back the progress of causes they use as vehicles in their loyalty crusade. I increasingly see other outcomes becoming less likely.


[flagged]


[flagged]


They don't like being found out.


Sorry. Given the context of the thread

Who is "they" exactly?


Presumably, somebody downvoting that comment. Of course, it doesn't have to be that reason, but if the shoe fits


Cronyism is back on the menu.


You state no details.. but things like "girls who code" sound discriminatory. What about outreach to people who can't learn to code for example because they're not wealthy enough?


Note that they said:

> We went to community centers, after school programs, and worked with other similar orgs like "girls who code."

This sounds like a fairly broad based outreach program. The inclusion of an organization that supports girls is just one of the avenues they used. There is nothing wrong with that.

Sometimes I feel like founding an organization called Men In Science & Engineering Research, simply because the acronym (MISER) would be a fitting parody for those who promote blind equality (i.e. the type of equality that hoards the riches of science for men).


[flagged]


Why are you so threatened by "girls who code?"


Why are you so threatened by girls who don’t code


I don't think there are really enough details on the parent comment to judge it either way, but can't you at least see how weird it is that 'Women in STEM' is very accepted but a 'Men in STEM' program would never fly? Whether or not white men have hidden advantages over non white men (and I'm not saying that they don't! Simply that they are not clearly visible), it should be very clear that there are large non hidden advantages for non white / non male people, which is obviously going to foster discontent, whether or not they are actually at a disadvantage in the big picture.

As a similar example: my close Vietnamese friend met all of his best friends and girlfriend in college in VSA, a Vietnamese club. All of my non white friends went to 'Latinos in X' 'Asians in X' etc. clubs. There were no equivalents for me! I don't resent anybody for this (by dint of my personality I don't really care), and in truth it was probably good for my cold networking skills (perhaps widening the unseen advantage gap that I supposedly have even further), but I also think it's difficult to look at this and not understand why people are so discontent with DEI identity politics.


> but can't you at least see how weird it is that 'Women in STEM' is very accepted but a 'Men in STEM' program would never fly?

I can see how it might seem weird to an alien who knew what men and women were, but had no context for the existing state and history of society.

I can't see how it would seem weird to anyone else, however.


Maybe I wasn't clear in my previous comment about what exactly rubs me the wrong way, so here's an analogy: imagine you went to school and the the teacher lined everyone up by gender and handed out a cookie to everyone. And then she handed out two extra cookies to all of the girls! You would be annoyed! Does it matter that back at home guys normally get 4 extra cookies every day? No, because as a guy, you don't see or know this! (In this world brothers don't have sisters and vice versa). And even if you do technically know this because you've heard about it, you don't really viscerally understand it because it's not really your lived in experience.

So what is the solution? I can't say I know. But I do know that these things very much breed discontentment and it is at the very least important to recognize why.


I think a hallmark of 2025 is a resounding lack of empathy and compassion from people. Maybe's it's smartphones, social media, or some sort of existential doomerism.

To reframe your scenario: imagine you went to a school and some of your classmates came from poor families and couldn't afford clothes, food, or a laptop etc. To help those students, the teacher used class funds to buy them new shoes and get them a nice laptop to get their work done. Do you still think it's unfair that you don't get new shoes, laptop, or cookies?

The solution to your original question is to understand why the teacher is giving girls 4 cookies and then just be happy that more people get a fair shot at life.


I feel like you're glossing over my main point, which is that this stuff 100% does breed resentment for the average person, which is how we end up with people like Trump (obviously there are many more factors to consider but this is definitely one of them).

The difference between your scenario is just how visible it is; I have never ever had somebody go up to me and say 'This opportunity is being given to you because you're a white male'! If anything, it's the opposite! Did you know I was not eligible _to apply_ for a single scholarship for college a few years back, solely based on my race and gender? It was pretty demoralizing!

Again, I'm not saying that I _haven't_ benefitted from being a white male in some indescribable unknown way; but unlike in your scenario, I cannot _see_ this. Think about the average person, who goes their whole life seeing others being handed stuff specifically because of their race and gender and when they complain about it they simply get told 'Do you have no empathy? Your life is much better off than theirs!'

Again, who knows what the right solution is. But I don't think that it's the status quo.


> I feel like you're glossing over my main point, which is that this stuff 100% does breed resentment for the average person, which is how we end up with people like Trump (obviously there are many more factors to consider but this is definitely one of them).

I mean, having to cater to the feelings of overly sensitive men is how most of these problems started in the first place.


Ack! There is nothing 'overly sensitive' about being annoyed when you see somebody else get an opportunity because of the color of their skin or gender. It's human nature! In fact I suspect the average person in favor of DEI and / or identity politics would still suffer a decent amount of cognitive dissonance if they were passed up because of something like this. Again, it's just human nature!

Please try to imagine advocating for women's rights 100 years ago and hearing somebody say something like 'overly sensitive women want to vote! Psh!' If you want to argue for DEI please try to present good faith arguments.

Personally, I don't really get butthurt about things, so this isn't a problem for me (although I do think it's a problem in general as it is obviously going to anger people). I do think one of the main problems with DEI is that it attempts to address the symptoms instead of the root cause of the problem. I.e. trying to get girls into stem / coding in highschool or college instead of figuring out why they're less interested in it from a much younger age (and if that's even a problem; classic nature vs nurture problem).


You just wrote a whole bunch of paragraphs talking about how appearances made you feel things without ever addressing the actual facts.

>DEI is that it attempts to address the symptoms instead of the root cause of the problem. I.e. trying to get girls into stem / coding in highschool or college instead of figuring out why they're less interested in it from a much younger age (and if that's even a problem; classic nature vs nurture problem).

Except there are DEI initiatives that look at every level.

Being in favor of the status quo is pretty easy, I admit, and hey, if you happen to benefit disproportionately from the status quo, bonus, right?


> You just wrote a whole bunch of paragraphs talking about how appearances made you feel things without ever addressing the actual facts.

Yes, appearances matter! That's why Trump is president right now (a fact, in case it isn't clear, I'm not happy about)! Because the American people were unhappy with the status quo. Whether or not you think DEI is "fair". And when people like you ignore this, you alienate the voting class, which you need on your side!

> Except there are DEI initiatives that look at every level.

No, there are not DEI initiatives for pre kindergarten / very early school. Not that I've heard of at least, and definitely not on a large scale. And I'm not even talking about adding DEI there; I'm simply saying that we should really be asking why the gap between men and women in STEM seems to start so young (and if it really is because of something that hurts girls, remove that. Which would still not be DEI!)

> Being in favor of the status quo is pretty easy, I admit, and hey, if you happen to benefit disproportionately from the status quo, bonus, right?

...what? I am arguing against the current status quo. And it's true, it would be beneficial to me for DEI to be removed / identity politics abolished. I also believe it would be beneficial to everyone (albeit to a lesser extent), but that's beyond the scope of this argument.


Imagine the teacher lines up all the kids, gives them cookies, notices all the kids are boys, so the teacher puts up a sign outside the girls restroom advertising free cookies for anyone who attends math class.

Now the boys have cookies and the girls have cookies.

Except the cookies are not actually cookies, they just represent what you'll learn by attending the class.

That is out reach.

I don't see jocks complaining about fitness outreach programs to geeks. That'd be absurd.

But guys famously will complain about:

1. Women reading science fiction

2. Women watching science fiction on TV.

3. Women playing d&d

4. Women playing online games

5. Women writing code.

To be fair, many women are judgemental about male nurses or even male teachers.

That type of idiocy has to stop both ways. Let people do what they want to do.


> But guys famously will complain about: > 1. Women reading science fiction > 2. Women watching science fiction on TV. > 3. Women playing d&d > 4. Women playing online games > 5. Women writing code.

In your head? The first two are specially absurd. How would anyone know what women watch or read in their houses?


As soon as women try to participate in fandom or attend conventions, they are derided as not being "real fans". This has been documented as a problem with geek culture for well over 50+ years.


I noticed that you have worked very hard in your strained analogy to setup conditions which validate my original statement:

“I can see how it might seem weird to an alien who knew what men and women were, but had no context for the existing state and history of society.”


If boys always get 4 cookies at home, and girls get none, and then we go to school and boys get 1 more cookie, and girls get 3 cookies, I'd think it was pretty weird that boys get 5 cookies and girls only get 3.

> No, because as a guy, you don't see or know this! (In this world brothers don't have sisters and vice versa).

In our world, men do know that women face barriers to entering STEM education and STEM careers that men do not face. Many men seem to ignore that fact, though, or pretend it's not true, and I will continue to roll my eyes at their annoyance about "Women in STEM" programs.

What a bizarre analogy...


If you include biological and medical sciences in STEM, STEM graduates have been majority female for decades.

Where is the DEI for men in the female dominated STEM subjects?


> If you include biological and medical sciences in STEM

Biological sciences are STEM of course. But if we're going to extend the definition, why not include all fields that involve technical skills? How about accountants and lawyers?

I'm concerned that you only proposed adding medical and nursing students because it's the only additional field that would support your argument. That strikes me as goalpost moving, so I hope it was just an omission.


Accounting and law schools are also graduating majority women these days. Have you not been paying attention?

DEI keeps on saying "more women in universities! More women in universities!" even though universities have been majority women for decades now. It's a one way ratchet that never stops.


Women were marginalized for millenia. Your mother/grandmother wasn't allowed to open her own bank account until 1974. It will take a long time to correct for that. It's a ratchet from the perspective of our very brief lives.

What's the theory of harm here? If we continue educating women they may gain too much social mobility?


[dead]


It was legal and common to discriminate on the basis of sex in banking services until 1974. I actually don't see anything in your link that disputes that. It discusses some earlier milestones about women being able to own certain types of property.

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

Even if we quibble about the dates involved, we all understand that historically women have been marginalized, denied property, voting, and other rights, and that this was the status quo for millenia, right? And that that has lasting effects that continue in our society?


> Your mother/grandmother wasn't allowed to open her own bank account until 1974.

And your father/grandfather was enslaved by the government to fight in the Vietnam war until 1975.

> What's the theory of harm here? If we continue educating women they may gain too much social mobility?

Blatant hypocrisy, you think 60% of college students being women is good, but consider it horrible sexism that at one time 60% of college students were men.

You don't want equality, you just want everything to be female dominated.


I actually don't care what the makeup of college students is. It's useful to encourage women to pursue education in order to promote equity. But there isn't some magic proportion of men to women graduates that I think we should be pursuing.

I don't want everything dominated by women, I just recognize that the work of undoing their marginalization is not complete.


Wow, way to make up words that the person you're replying to never said, and then arguing with them.

Bad-faith arguments seem to be your shtick, given your comment history on this post.


This is a bad faith argument: "What's the theory of harm here? If we continue educating women they may gain too much social mobility?"


If that's not your position, clarify what it is. You're complaining about efforts to encourage women to seek an education. What is the theory of harm, if not that women shouldn't be educated? Perhaps what I said was too snarky of inflammatory, but I genuinely don't understand what else it would be.


> DEI keeps on saying "more women in universities! More women in universities!"

No, “DEI” doesn’t keep saying that. Why are you making up a strawman to fight?


Erm…accounting is STEM via the M by many modern definitions.


Accounting is not a branch of mathematics.


Accounting is applied mathematics.


If that would make it count as STEM, you could just rename STEM to M because STE is arguably all just applied mathematics.


> Where is the DEI for men in the female dominated STEM subjects?

There’s actually quite a bit of outreach-type programs aimed at getting them in the door, and a lot less after that because despite women dominating degrees and entry-level hires, men still disproportionately dominate management and leadership roles.


> Where is the DEI for men in the female dominated STEM subjects?

Is that rhetorical? Have you looked, or just assumed their absence?

My cursory search seems to indicate that there are some, although I don't have bandwidth to investigate in any depth and I'm not sure just what criteria you'd want to use for qualification.


Where is your data showing those programs don’t exist? For example, conservatives like to talk about the plight of male nurses but even a cursory search shows that there are exactly the kind of programs you’d expect to find.


What's the equivalent of "Girls Who Code" - "Boys Who Nurse"? A club teaching First Aid to boys only? Does it exist at the same scale that Girls Who Code does?


You've never heard of programs to encourage men to be nurses or teachers? I certainly have.

Here's what I found after a quick search. If you're interested I'm sure you could research and find more information.

https://www.arizonacollege.edu/blog/men-wanted-new-efforts-t...

> Only 12% of the nurses providing patient care at hospitals and health clinics today are men. Although the percentage of nurses has increased — men made up just 2.7% of nurses in 1970 — nursing is still considered a “pink collar” profession, a female-dominated field.

https://www.belmont.edu/stories/articles/2025/men-in-educati...

> A critical shortage of male teachers continues to affect K-12 education across America, with men making up just 23% of elementary and secondary school teachers today, down from 30% in 1987, according to the National Center for Education Statistics. Belmont University's College of Education is addressing this gender gap through intentional recruitment, mentorship and innovative program design.


These people are very disconnected from reality. They make wild claims like groups for men are illegal and you’d never see a group dedicated to helping men in the nursing field. The feminists would destroy it! And yet…

https://www.aamn.org/


It’s really telling how they’re just so confident about easily debunked claims.

I’m reminded of a retired college admissions administrator whose theory was that some of the men in college gap was over-confidence: statistically the women who applied overall were far closer to the women who were accepted, whereas like a third of their male applicants had no chance so a roughly even balance of applicants turned 2:1 in favor of women being accepted. I’m sure that many of them grumble about DEI, unaware that merit is _why_ they weren’t accepted whereas their fathers’ generation would’ve found room for many of them via legacy or sports spots.


Are these studies easily debunked?

https://academic.oup.com/esr/article/38/3/337/6412759

> Gender discrimination is often regarded as an important driver of women’s disadvantage in the labour market, yet earlier studies show mixed results. However, because different studies employ different research designs, the estimates of discrimination cannot be compared across countries. By utilizing data from the first harmonized comparative field experiment on gender discrimination in hiring in six countries, we can directly compare employers’ callbacks to fictitious male and female applicants. The countries included vary in a number of key institutional, economic, and cultural dimensions, yet we found no sign of discrimination against women. This cross-national finding constitutes an important and robust piece of evidence. Second, we found discrimination against men in Germany, the Netherlands, Spain, and the UK, and no discrimination against men in Norway and the United States. However, in the pooled data the gender gradient hardly differs across countries. Our findings suggest that although employers operate in quite different institutional contexts, they regard female applicants as more suitable for jobs in female-dominated occupations, ceteris paribus, while we find no evidence that they regard male applicants as more suitable anywhere.

https://pubmed.ncbi.nlm.nih.gov/33513171/

> Male applicants were about half as likely as female applicants to receive a positive employer response in female-dominated occupations. For male-dominated and mixed occupations we found no significant differences in positive employer responses between male and female applicants.

https://www.sciencedirect.com/science/article/pii/S074959782...

> both scientists and laypeople overestimated the continuation of bias against female candidates. Instead, selection bias in favor of male over female candidates was eliminated and, if anything, slightly reversed in sign starting in 2009 for mixed-gender and male-stereotypical jobs in our sample. Forecasters further failed to anticipate that discrimination against male candidates for stereotypically female jobs would remain stable across the decades.


> that 'Women in STEM' is very accepted but a 'Men in STEM' program would never fly

That's because, in general, STEM itself is already a "Men in STEM" program. We men don't need a program to get us excited about pursuing STEM education & careers; that pursuit is already there, and already common. It goes back to innocuous-seeming things as young boys being given chemistry kits for their birthday, while young girls are given dolls, and continues all the way through teen years as boys are encouraged to pursue STEM-related coursework in greater numbers than girls, culminating in STEM careers being already full of men with conscious or unconscious biases against women.

Creating a "Men in STEM" program would be a waste of time, and would just be about scoring conservative political points.


Your argument is based on the fact that more men naturally gravitate towards STEM than women do. This doesn't mean there aren't still men who could go into STEM but lack motivation/opportunity/some other push. Maybe there are more of them than there is women like that, maybe not. You are saying it's ok to ignore all those men just because already bigger % of men naturally go into STEM. This is just discriminatory. Just because some people sharing some characteristic with me do better (in this context) doesn't mean I am in position to do better.

This is the mistake DEI proponents make. There is no "we men", there are individuals and discriminating towards them is not ok and also illegal.


It's fun that you say 'naturally' when there have been centuries of oppression and conditioning against women in STEM.


> We men don't need a program to get us excited about pursuing STEM education & careers; that pursuit is already there, and already common. It goes back to innocuous-seeming things as young boys being given chemistry kits for their birthday, while young girls are given dolls, and continues all the way through teen years as boys are encouraged to pursue STEM-related coursework in greater numbers than girls, culminating in STEM careers being already full of men with conscious or unconscious biases against women.

I don't believe this is true. I think the gendered difference in interest in the cluster of topics we label "STEM" is mostly biological and deeply-seated - one piece of evidence I find very convincing is the observation that non-human primates exhibit the same sorts of gendered behavior with toys that human children do (females wanting to treat any kind of toy as a doll, males wanting to treat any kind of toy as a tool, etc.).

I also don't think that boys are encouraged to pursue STEM-related coursework in greater numbers than girls. I think that girls are explicitly encouraged to pursue STEM-related coursework in much greater numbers than boys - this is exactly a consequence of the above-noted social fact that "Women in STEM' is very accepted but a 'Men in STEM' program would never fly". And as you say, this is because males are much more likely to be intrinsically interested in pursuing STEM education and careers, whereas females are more likely to require explicit societal encouragement to do so. I've read more than one account of a woman who had worked in some kind of software-related field admitting that she wasn't intrinsically excited about the work, but felt like she would be a bad feminist if she left a STEM track to do something more traditionally female-coded instead.


> one piece of evidence I find very convincing is the observation that non-human primates exhibit the same sorts of gendered behavior with toys that human children do (females wanting to treat any kind of toy as a doll, males wanting to treat any kind of toy as a tool, etc.).

This is actually why I don’t think the differences are mostly social: there’s a lot of evo-psych speculation which gets widely referenced in casual discussion but when you look at the details turns out to be much weaker. For example, that famous Hines 2002 study about vervet monkey toy preference relied on grouping toys into categories based on human leanings: a police car was masculine while a cooking pot feminine despite no vervet monkey ever associating a pot with mother’s home cooking, and the effect went away when they used other groupings (e.g. animate or inanimate objects).

What’s especially missing in these cases are controlling for social differences (e.g. any claims about women being innately worse at engineering need to center an explanation for the much lower gap in Soviet states which made an effort for gender neutrality) and attempting to explain how very complex behaviors reduce to the trait being studied. For example, a male vervet monkey preferring a police car to a cooking pot is a considerable remove from a Google software engineer or CS degree and there is usually an enormous amount of hand-waving trying to connect the two.

When I worked for a neuroscience lab years ago, this came up in conversation a bit and basically everyone thought there were innate cognitive differences but that they’d be low-level and relatively small: e.g. testosterone makes a big difference for things like grip strength and there are clearly low level anatomical differences but higher-level cognitive abilities depend on many factors and the unusual plasticity of our brains is an enormous confound. This gets harder the more advanced the skill you’re talking about: e.g. a question like whether a group of boys performed better at 3-D rotations is due to biology or because they’ve been encouraged to play with building toys and games is a already a hard research topic but looking at things like success as an engineer or scientist is orders of magnitude harder because it combines a range of different skills and the metrics are harder to quantify.


> This is actually why I don’t think the differences are mostly social: there’s a lot of evo-psych speculation which gets widely referenced in casual discussion but when you look at the details turns out to be much weaker. For example, that famous Hines 2002 study about vervet monkey toy preference relied on grouping toys into categories based on human leanings: a police car was masculine while a cooking pot feminine despite no vervet monkey ever associating a pot with mother’s home cooking, and the effect went away when they used other groupings (e.g. animate or inanimate objects).

It's certainly possible that particular study had limitations or was otherwise bad. This is a hard thing to study rigorously. My understanding wasn't that the primates were choosing toys based on gender association in (some) human societies, it's that they were playing with the same physical objects in gendered ways. And this is consistent with the anecdotal observation about human children I've heard from many parents that girls like to play with any toy as if it is a doll whereas boys like to play with any toy as if it is a tool or a gun; girls being given toy cars and then tucking them into a toy bed as if they were a doll, etc.

> What’s especially missing in these cases are controlling for social differences (e.g. any claims about women being innately worse at engineering need to center an explanation for the much lower gap in Soviet states which made an effort for gender neutrality) and attempting to explain how very complex behaviors reduce to the trait being studied. For example, a male vervet monkey preferring a police car to a cooking pot is a considerable remove from a Google software engineer or CS degree and there is usually an enormous amount of hand-waving trying to connect the two.

I don't think I would claim that women are innately worse at engineering (and I think that "engineering" is a broad enough field with enough subspecializations that it's difficult to judge engineering skill in a way that is both objective and useful). I'd claim that women are systematically less interested in the kinds of highly technical systems-focused work we associate with fields like software engineering. In other words, I think that both men and women can be taught to program a computer and do software engineering, but that men (really AMAB people, I think transwomen pattern like cis men in this respect) are much more likely to be deeply interested in programming computers and voluntarily spend a lot of time doing it to the exclusion of other things, which eventually caches out in programming as a whole being a very male-skewed field.

I think the lower gender gap in the Soviet Union and other mid-20th-century Communist states is explained by exactly what you said, explicit social and political pressure for gender equality. I also suspect that even in the Soviet system, there might have been more equal numbers of men and women doing STEM work or programming work specifically, but (at least as far as computer programming goes), males were systematically more intrinsically interested in and energized by the actual programming, whereas the women were more likely to just be doing their jobs and feeling like they would rather be spending their time doing something else. The Soviet system was in any case characterized by a large amount of state control over how people worked, in ways we generally find authoritarian today, and it's not a model I would like to see modern US employment policy follow.

> When I worked for a neuroscience lab years ago, this came up in conversation a bit and basically everyone thought there were innate cognitive differences but that they’d be low-level and relatively small: e.g. testosterone makes a big difference for things like grip strength and there are clearly low level anatomical differences but higher-level cognitive abilities depend on many factors and the unusual plasticity of our brains is an enormous confound. This gets harder the more advanced the skill you’re talking about: e.g. a question like whether a group of boys performed better at 3-D rotations is due to biology or because they’ve been encouraged to play with building toys and games is a already a hard research topic but looking at things like success as an engineer or scientist is orders of magnitude harder because it combines a range of different skills and the metrics are harder to quantify.

I agree that these are interesting and complex questions that cognitive scientists should attempt to study to the best of their ability. I don't think there's a reason to assume that boys are encouraged to play with building toys and games, rather than innately choosing to do this to the exclusion of other types of play - certainly it's as likely to be innately biological as being good at 3-D rotation itself is.


Not that you asked for a trans opinion here but

> I don't think there's a reason to assume that boys are encouraged to play with building toys and games, rather than innately choosing to do this to the exclusion of other types of play - certainly it's as likely to be innately biological as being good at 3-D rotation itself is.

Interesting take. I faced abusive repercussion in daycare for playing with the cooking set and dolls because “those aren’t my toys and it’s wrong”, so while I was inclined to think this was very much socially enforced dimorphism, your comment seems to suggest that I am in some way more “biologically feminine” than most skeptics would like to suggest. curious !

As for us being overrepresented in tech, for a lot of gals I know it’s a way for our merit to be judged over our appearance, similar to socially awkward guys preferring work that doesn’t take constant face-to-face.


So we shouldn’t focus on helping a subset of people because doing so is discriminatory to everyone else?


Well... if you're getting a grant to help group X (which is in need), and you're not helping group Y (that is also in need), that should be all right (one organization probably can't do everything). But there maybe ought to be someone else getting a grant to help group Y.


[flagged]


Some people are disadvantaged and some are not.

There's no St. Jude's Non-Cancer Cancer Research because that would be fucking stupid. Similarly, there is no "coding for white guys". Well, there is, we just call that the entire industry.

Source: I am a white man living in America.


I don't want "coding for white guys", if I could decide, I'd want for example "coding for people who work manual labor jobs living in rural America" (I live in Poland so it's not directly about me).

It seems you're also making a false assumption that since "white guys" make the majority of the industry that means all kinds of "white guys" are properly represented there. But I don't see colors or genders like that.


It’s very frustrating when non-residents or citizens have such strong opinions on US policy like this.

We do have those programs ("coding for people who work manual labor jobs living in rural America") already and we have for quite a long time.


The only people who have the privilege to not see color or gender are those in the majority.

You bet your ass black Americans see color, because they're reminded of it every day. In our policies, communities, and workplaces.

Also: I agree such a program would be great, but it's not an either or type thing. We can, and do, do both.

This crab bucket sort of whiney baby mentality of "daaaad why do THEY get stuff?" is destructive. It's literally anti-solutions.

Making everything worse across the board for everyone might be fair, but it's also shitty and intellectually lazy.


Is this one of those “what about white guys?” complaints, or am I misreading? Because the implied qualification for “subset of people” is “underrepresented”. Any political/cultural undertones are on you.


Yes. They've got several other comments in this same thread honestly curious why there aren't outreach programs for "conservatives."

As if any of the tech companies would have had even a fraction of their success if they were ran like a Truth Social forum...


You're calling an entire gender "compatible" with what, exactly?


[flagged]


> we want the people building our technology to have more diverse views than just well off men from the suburbs

is this actually true? i think we tend to move people into the suburbs and demand they act like a well off man from the suburbs.


Touché lmao


[flagged]


> > Women are half the population

> In the US, this also applies to Republican voters.

No, in fact, in the US, it is closer to true of voters without any partisan qualification than it is to being true of Republican voters.


Are Republican voters/conservatives underrepresented in tech? There seem to be plenty of safe spaces for them.


> In the US, this also applies to Republican voters. What about them?

Nobody cares about them. If you want to make a "coding for republicans", then go for it. Nobody is stopping you. You can't pretend people are stopping you so then you can turn around and act like a victim. That's not normal person behavior.

> conservative views? They're also pretty underrepresented in the tech industry

First off, not they're not. Second off - nobody is censoring conservative views.

They ARE censoring obvious racism, sometimes pedophilia, sometimes misogyny. Because those all suck. And when that happens, some conservatives cry. Which doesn't say what you think it says. That does not reflect well on you or the broader ideology.

At the end of the day, if I speak like Hilary Clinton at work, it's perfectly normal. If I speak like Trump and talk about "human garbage" and various brown people eating cats and dogs, I'm probably getting fired and potentially a referral to a psychiatrist.

That's the difference. Not the ideology, the words.


What is your evidence for this: "... because of structural problems that push them out, be that systemic misogyny in our educational systems ..." , "the toxicity present in the industry that pushes them out ... "?

What alternative reasons have you explored?


They presumably didn’t write an entire literature survey in an HN comment because the CS pipeline problem has been written about so much in the past that it’s reasonable to assume basic familiarity:

https://www.scientificamerican.com/article/punch-cards-pipel...


I mean there's reams of women in tech or academia who talk about this shit. "I left my PhD program because I was constantly belittled and harassed by my advisor and labmates" "I left my position for a different company because I kept getting passed over for promotion after I had kids" "I switched majors from CS in college because most of my classmates were men who made me uncomfortable" "I was bullied in high school by boys because they thought I didn't get accepted into school based on merit". These are all stories I've heard and there are many of them. Go ask some women in your workplace and I'd bet money they've heard stories like this from other women they know or have experienced it themselves. I'm a man and I'm tired of hearing the contrarian denials regarding these problems from my peers in the industry. Maybe every woman I know in the industry experiencing sexism at some point in their education or career is too anecdotal for you I guess.

I'm sure there's studies in labor and education stats to show some quantitative evidence of this stuff but I'm not going to waste my time proving the obvious to you.


I don't think it's our responsibility to educate you about a phenomenon that has been discussed, analyzed, and written about extensively over the past couple decades. If you haven't seen evidence of this, then you've been living under a rock.


[flagged]


Outreach programs like “girls who code” and encouraging underrepresented groups to get involved are absolutely not against the law. Explicit discriminatory practices in hiring practices would be.


Yes, they are literally against the law, your knowledge of the law is probably a few years out of date, and I think you should spend more time reading the statutes themselves, this has already been litigated up to the supreme court.


Can you point to the ruling that bans the organization of Girls Who Code?


It's literally not the law.

42 U.S.C. § 2000e-2(j) says:

> Nothing contained in this subchapter shall be interpreted to require any employer, employment agency, labor organization, or joint labor-management committee subject to this subchapter to grant preferential treatment to any individual or to any group because of the race, color, religion, sex, or national origin of such individual or group on account of an imbalance which may exist with respect to the total number or percentage of persons of any race, color, religion, sex, or national origin employed by any employer, referred or classified for employment by any employment agency or labor organization, admitted to membership or classified by any labor organization, or admitted to, or employed in, any apprenticeship or other training program, in comparison with the total number or percentage of persons of such race, color, religion, sex, or national origin in any community, State, section, or other area, or in the available work force in any community, State, section, or other area.

Which is to say, affirmative action or diversity programs.

29 C.F.R. § 1608.1–1608.1(c) says:

> Voluntary affirmative action to improve opportunities for minorities and women must be encouraged and protected in order to carry out the Congressional intent embodied in title VII.[4] Affirmative action under these principles means those actions appropriate to overcome the effects of past or present practices, policies, or other barriers to equal employment opportunity. Such voluntary affirmative action cannot be measured by the standard of whether it would have been required had there been litigation, for this standard would undermine the legislative purpose of first encouraging voluntary action without litigation.

34 C.F.R. § 106.3(b) says:

> a recipient may take affirmative action to overcome the effects of conditions which resulted in limited participation therein by persons of a particular sex.

The decision in United Steelworkers v. Weber states:

> Title VII's prohibition in §§ 703(a) and (d) against racial discrimination does not condemn all private, voluntary, race-conscious affirmative action plans. ... Albemarle Paper Co. v. Moody, 422 U. S. 405, 422 U. S. 418, cannot be interpreted as an absolute prohibition against all private, voluntary, race-conscious affirmative action efforts to hasten the elimination of such vestiges.

The decision in Johnson v. Transportation Agency similarly states that Santa Clara County Transportation Agency did not violate Title VII by promoting a less-qualified woman.

The decision in Cohen v. Brown University upheld the use of affirmative action to equalize opportunity.

The law _literally_ contemplates this. As you said, "you need to literally look it up sometime."


STUDENTS FOR FAIR ADMISSIONS, INC. v. PRESIDENT AND FELLOWS OF HARVARD COLLEGE 2023

Held: Harvard’s and UNC’s admissions programs violate the Equal Protection Clause of the Fourteenth Amendment. Pp. 6–40.

"(b) Proposed by Congress and ratified by the States in the wake of the Civil War, the Fourteenth Amendment provides that no State shall “deny to any person . . . the equal protection of the laws.” Proponents of the Equal Protection Clause described its “foundation[al] principle” as “not permit[ing] any distinctions of law based on race or color.” Any “law which operates upon one man,” they maintained, should “operate equally upon all.” Accordingly, as this Court’s early decisions interpreting the Equal Protection Clause explained, the Fourteenth Amendment guaranteed “that the law in the States shall be the same for the black as for the white; that all persons, whether colored or white, shall stand equal before the laws of the States.” ...

"Respondents suggest that the end of race-based admissions programs will occur once meaningful representation and diversity are achieved on college campuses. Such measures of success amount to little more than comparing the racial breakdown of the incoming class and comparing it to some other metric, such as the racial makeup of the previous incoming class or the population in general, to see whether some proportional goal has been reached. The problem with this approach is well established: “[O]utright racial balancing” is “patently unconstitutional.”


In regards to race conscious bias in the admissions process this is very different then an outreach program


AMERICAN ALLIANCE FOR EQUAL RIGHTS, versus FEARLESS FUND MANAGEMENT, LLC, 2023

To be sure, the line between “pure speech” that arguably entails discriminatory sentiments, see 303 Creative, 600 U.S. at 587, and the very act of discrimination itself may at times be hard to draw. And to be sure, Fearless characterizes its contest as reflecting its “commitment” to the “[b]lack women-owned” business community. The fact remains, though, that Fearless simply—and flatly— refuses to entertain applications from business owners who aren’t “black females.” Official Rules at 3. If that refusal were deemed sufficiently “expressive” to warrant protection under the Free Speech Clause, then so would be every act of race discrimination, ... "Moreover, and more specifically, each lost opportunity to enter Fearless’s contest works an irreparable injury because it prevents the Alliance’s members from competing at all—not just for the $20,000 cash prize but also for Fearless’s ongoing mentorship and the ensuing business opportunities that a contest victory might provide. "


The organization refused applications from anyone who wasn’t a black female, again different then an outreach group. I am sure if a male applied to “Girls who code” was denied and was able to establish this did harm to him he could have a case. As far as I know that has not happened so the group and others like it are perfectly legal.


Which law are you referring to? If you are referring to Presidential statements, they have to be followed by an actual regulation or else they are just a press release.


[flagged]


The ask for the former is to have competitive spaces that are designated specifically for female athletes. This of course implies that all male athletes must be excluded, regardless of their identity claims.

The rationale is the same for both: to provide opportunities for women and girls in an otherwise male-dominated space. Neither should be controversial.


[flagged]


You slipped in "based on sex" for an intentional reason that I'd like you to share with the class. Say, is your opinion of the "sex is an immutable characteristic and fixed at birth and therefore trans people are invalid and should..."? Or maybe I'm just reading into your wording a little too much.


You're talking to a trans woman by the way. Just thought I should throw that out there just in case you want to hurl some insults at me while you're at it too :)


Congratulations on immediately being vindicated :/


In humans and other mammals the immutability of sex is a fact, not an opinion. We are not a species of sequential hermaphrodites.

The cultural artefact of people identifying themselvee as the opposite gender is a different type of concept to this. It's more of a sociological or psychological phenomenon.


You seem to care a lot about it actually.


I believe you are always allowed to create a club "boys who code" if that's something you are interested in.


If you want to use any public spaces (libraries, community centers, parks) then no, you can't. Virtually every state has a prohibition on the use of public spaces that specifically prohibit discrimination on the basis of sex or gender

If you wanted to leverage the "private club" exemption per Roberts v Jaycees, then you would be disqualified from using public spaces as well, which -- my wife established a "girls who code" organization and it benefited greatly from the use of both public and lent private spaces, but she could not have done without the ability to use both as it would have been extremely cost prohibitive (and it wasn't in any way profitable anyway)


> Virtually every state has a prohibition on the use of public spaces that specifically prohibit discrimination on the basis of sex or gender

This ties into a very specific confusion about affinity groups. Specifically, they generally are not exclusionary (in part because it's largely illegal). The only thing preventing boys from participating in a "girls who code" type of event is the boys don't want to go to something with "girls" in the name.


I blearily put this reply to the wrong top-level comment earlier, but ...

That very much depends on the group. Years ago, my wife founded two chapters of a national organization who did "girls who code" sorts of things. There was (to her) a surprising amount of infighting about how to handle registrations from males. Leadership felt that men should not be allowed to attend, but there were at least a couple of chapter leads (including my wife) who felt that men should be allowed to attend, but where spots were scarce, they should be prioritized to women.

Disregarding the politics of it, there was definitely not a shortage of men who were discouraged from signing up because they were somehow icked out over the name. I'm sure some men were, and I'm sure others probably deferred on the grounds that they didn't want to take spots away from those for whom the mission was intended -- but because the organization was unwilling to publish official guidance for reasons I won't bother to opine on, my wife was routinely in the position of having to explain her attendance policies to men who had signed up


If you were to create a "boys who code" organization and get denied for use of a public space that a "girls who code" org has used, then a) you could sue for use of the space, citing the girls groups' use, and win, or b) you could sue saying that the girls group shouldn't be allowed to use it, and win.


That very much depends on the group.

Years ago, my wife founded two chapters of a national organization who did "girls who code" sorts of things. There was (to her) a surprising amount of infighting about how to handle registrations from males. Leadership felt that men should not be allowed to attend, but there were at least a couple of chapter leads (including my wife) who felt that men should be allowed to attend, but where spots were scarce, they should be prioritized to women.

Disregarding the politics of it, there was definitely not a shortage of men who were discouraged from signing up because they were somehow icked out over the name. I'm sure some men were, and I'm sure others probably deferred on the grounds that they didn't want to take spots away from those for whom the mission was intended -- but because the organization was unwilling to publish official guidance for reasons I won't bother to opine on, my wife was routinely in the position of having to explain her attendance policies to men who had signed up


So what about the girl scouts, is that also discriminatory?


Yes, there was an entire supreme court case about that 30 years ago, a lawsuit against the Boy Scouts I might add.


That was against the boy scouts but the reverse lawsuit hasn't been filed against the girl scouts to my knowledge.

That said, law in the US and one’s opinions on what constitutes discrimination are different things.


Gotta fetch images and stylesheets from the network!


It’s a developer tool to speed up rust iteration, not a production tool like erlang.

That being said, bevy is using bevy-reflect to implement proper struct hot-reloading between hot-patches.


The challenge is that if the program is busy in a spin loop, there's no way to preempt it and modify it. Things like malloc, spin loops, network requests, syscalls etc.

I looked into liveplusplus a lot and their unreal integration also requires a broker to get the most out of it. If you're building a game engine and want to support struct layout and alignment changes, you'll need to do some re-instancing. Hiding a `subsecond::call` deep in the bowels of the host framework hides it from the user and lets the framework handle any complicated state management it needs during hotpatches.

I wouldn't say it's purity - the first version of subsecond actually did do in-process modification - but after playing around with it for a while, I much preferred the light runtime integration. The dioxus integration was about 5 lines of code, so it's quite minimal.


FWIW I think the project is quite cool even if you “only” manage to roll out the subsecond integration into popular ecosystem runtimes.

Have you considered aiming at lower level dependencies that are even more ubiquitous? Like libc functions?


Yeah not sure why someone's first reaction to seeing 150ms Rust hot-patches is to call it BS and a "pain-in-the-ass." Tough crowd.

We could aim lower, or make it entirely automatic. The first prototype was entirely automatic, but I realized that you definitely need to signal to the program to hot-reload.

For code like:

```rust

while true {

    let msg = io.poll();
}

```

you're now stuck because the program is hung on a syscall. Doesn't matter if you hot-patch the loop, the program is stuck. My first prototype used the exception tables to unwind the program, but that didn't work on WASM and led to weird issues with cancellation and effects.

Similar issues with one-time initialization code at the beginning of the program. You could just hot-patch from `main` - basically restarting the program - but the whole point of hot-patching is that you can keep as much state around as possible while also changing its behavior.

For most apps, you just need one `subsecond::call()` and it works. The bevy folks wrote a `#[hot]` macro which we might integrate, but I'm also keen for frameworks to just adopt it and/or distribute a simple universal adapter.


Ha yeah tough crowd indeed.

That’s fair that you only really need one call and so trying for ubiquitous interception is probably overkill.

Anyways I am quite excited to have a use case to try it out!


You basically need to wrap your program's `tick()` function. Otherwise you might be in the middle of malloc, hot-patch, and your struct's layout and alignment changes, and your program crashes due to undefined behavior.

The goal is that frameworks just bake `subsecond::current` into their `tick()` function and end-users get hot-patching for free.


How would you preempt the running program during malloc? Isn't there a well-defined reload point? Major red flags going up if your program can just change at any random point..

Also, didn't the article say explicitly that struct layout changes aren't supported??


There is a well-defined reload point—it’s the `subsecond::call` wrapper around `tick()`. But the hypothetical design that you seem to have in mind where this doesn’t exist would not have a well-defined reload point, so it would need to be able to preempt your program anywhere.

Layout changes are supported for structs that don’t persist across the well-defined reload point.


Creator here - you only need one `subsecond::call` to hook into the runtime and it doesn't even need to be in your code - it can be inside a dependency.

Currently Dioxus and Bevy have subsecond integration so they get automatic hot-patching without any end-user setup.

We hope to release some general purpose adapters for axum, ratatui, egui, etc.


Could there be general purpose adapters for something like tokio more broadly so that if I have an app that’s not based on a framework I can leverage this?


Amazing! Looking forward to the egui adapter


Very nice! Thanks.


Creator here - haven't had a chance to write up a blog post yet! Stay tuned.

The gist of it is that we intercept the Rust linking phase and then drive `rustc` manually. There's some diffing logic that compares assembly between compiles and then a linking phase where we patch symbols against the running process. Works across macOS, Windows, Linux, iOS, Android, and WASM. On my m4 I can get 130ms compile-patch times, quite wicked stuff.

We handle the hard parts that the traditional dylib-reloading doesn't including TLS, statics, constructors, etc.

I've been posting demos of it to our twitter page (yes twitter, sorry...)

- With bevy: https://x.com/dioxuslabs/status/1924762773734511035

- On iOS: https://x.com/dioxuslabs/status/1920184030173278608

- Frontend + backend (axum): https://x.com/dioxuslabs/status/1913353712552251860

- Ratatui (tui apps): https://x.com/dioxuslabs/status/1899539430173786505

Our unfinished release notes are here:

https://github.com/DioxusLabs/dioxus/releases/tag/v0.7.0-alp...

More details to come!


[How] do you track when it's safe to delete the old version of a patched piece of code?

Edit: or, I guess since this doesn't seem to be something intended for use in prod, maybe that's not necessary. You can just bloat the runtime process more or less indefinitely.

I was curious because IIUC Linux kernel livepatches handle this via something related to RCU, which I guess is not possible in this context.


The axum example looks amazingly useful! Very cool project and idea.


can't access the xitter posts... is the axum part using the whole of dioxus or bare axum + code reloading?


There's a custom `axum::serve` equivalent we built that wraps the router construction in a hot-patchable function. When the patches are loaded, we reset the TCP connections.

It's a little specific to how dioxus uses axum today, but we plan to release an axum-only integration in the future.


awesome. thanks. i will definitely follow the project and hopefully participate. lack of hot reload for the FE folks is the biggest blocker we get from other options.


The author's blog is a FANTASTIC source of information. I recommend checking out some of their other posts:

- https://mcyoung.xyz/2021/06/01/linker-script/

- https://mcyoung.xyz/2023/08/09/yarns/

- https://mcyoung.xyz/2023/08/01/llvm-ir/


Given TFA's bias against GCC, I'm not so sure. e.g. looking at the linker script article… it's also missing the __start_XYZ and __stop_XYZ symbols automatically created by the linker.


It also focuses exclusively on sections. I wish it had at least mentioned segments, also known as program headers. Linux kernel's ELF loader does not care about sections, it only cares about segments.

Sections and segments are more or less the same concept: metadata that tells the loader how to map each part of the file into the correct memory regions with the correct memory protection attributes. Biggest difference is segments don't have names. Also they aren't neatly organized into logical blocks like sections are, they're just big file extents. The segments table is essentially a table of arguments for the mmap system call.

Learning this stuff from scratch was pretty tough. Linker script has commands to manipulate the program header table but I couldn't figure those out. In the end I asked developers to add command line options instead and the maintainer of mold actually obliged.

Looks like very few people know about stuff like this. One can use it to do some heavy wizardry though. I leveraged this machinery into a cool mechanism for embedding arbitrary data into ELF files. The kernel just memory maps the data in before the program has even begun execution. Typical solutions involve the program finding its own executable on the file system, reading it into memory and then finding some embedded data section. I made the kernel do almost all of that automatically.

https://www.matheusmoreira.com/articles/self-contained-lone-...


I wouldn't call them "same concept" at all. Segments (program headers) are all about the runtime (executables and shared libraries) and are low-cost. Sections are all about development (.o files) and are detailed.

Generally there are many sections combined into a single segment, other than special-purpose ones. Unless you are reimplementing ld.so, you almost certainly don't want to touch segments; sections are far easier to work with.

Also, normally you just just call `getauxval`, but if needed the type is already named `ElfW(auxv_t)*`.


> I wouldn't call them "same concept" at all.

They are both metadata about file extents and their memory images.

> sections are far easier to work with

Yes. They are not, however, loaded into memory by default. Linkers do not generate LOAD segments for section metadata since they are not needed for execution. Thus it's impossible for a program to introspect its own sections without additional logic and I/O to read them into memory.

> Also, normally you just just call `getauxval`, but if needed the type is already named `ElfW(auxv_t)*`.

True. I didn't use it because it was not available. I wrote my article in the context of a freestanding nolibc program.


Right, but you can just use the section start/end symbols for a section that already goes into a mapped segment.


Can you show me how that would work?

It's trivial to put arbitrary files into sections:

  objcopy --add-section program.files.1=file.1.dat \
          --add-section program.files.2=file.2.dat \
          program program+files
The problem is the program.files.* sections do not get mapped in by a LOAD segment. I ended up having to write my own tool to patch in a LOAD segment into the segments table because objcopy does not have the ability to do it.

Even asked a Stack Overflow question about this two years ago:

https://stackoverflow.com/q/77468641

The only answer I got told me to simply read the sections into memory via /proc/self/exe or edit the segments table and make it so that the LOAD segments cover the whole file. I eventually figured out ways to add LOAD segments to the table. By that point I didn't need sections anymore, just a custom segment type.


The whole point of section names is that they mean something. If you give it a name that matches `.rodata.*` it will be part of the existing read-only LOADed segments, or `.data.*` for (private) read-write.

Use `ld --verbose` to see what sections are mapped by default (it is impossible for a linker to work without having such a linker script; we're just lucky that GNU ld exposes it in a sane form rather than hard-coding it as C code). In modern versions of the linker (there is still old documentation found by search engines), you can specify multiple SECTIONS commands (likely from multiple scripts, i.e. just files passed on the command line), but why would you when you can conform to the default one?

You should pick a section name that won't collide with the section names generated by `-fdata-sections` (or `-ffunction-sections` if that's ever relevant for you).


That requires relinking the executable. That is not always desirable or possible. Unless the dynamic linker ignores the segments table in favor of doing this on the fly... Even if that's the case, it won't work for statically linked executables. Only the dynamic linker can assign meaning to section names at runtime and the dynamic linker isn't involved at all in the case of statically linked programs.


Absolutely agree. Had my own fun dealings with ELF, and to be clear, on plain mainline shipping products (amd64 Linux), not toys/exercise/funky embedded. (Wouldn't have known about section start/stop symbols otherwise)


I was really struck by the antipathy toward GCC. I'm not sure I quite understand where it's coming from.


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

Search: