We’ve been searching for a memory-safe programming language to replace C++ in Ladybird for a while now. We previously explored Swift, but the C++ interop never quite got there, and platform support outside the Apple ecosystem was limited. Rust is a different story. The ecosystem is far more mature for systems programming, and many of our contributors already know the language. Going forward, we are rewriting parts of Ladybird in Rust.

Porting LibJS

I used Claude Code and Codex for the translation. This was human-directed, not autonomous code generation. I decided what to port, in what order, and what the Rust code should look like. It was hundreds of small prompts, steering the agents where things needed to go. After the initial translation, I ran multiple passes of adversarial review, asking different models to analyze the code for mistakes and bad patterns.

no comments (yet)

sorted by: hot top controversial new old
there doesn't seem to be anything here
56 comments in c/opensource@lemmy.ml view that post
[–] 48 points 8 months ago (1 child)

We need competition in the browser market, ANY competition!

* ladybird appears *

Well... that was on me, I set the bar too low

  • source
  • hideshow 1 child comment
  • [–] [S] 48 points 8 months ago (1 child)

    I am completely disappointed in Ladybird, even though I had some hope for the project until now. I guess all that's left to do is wait for Servo.

  • source
  • hideshow 1 child comment
  • [–] 31 points 8 months ago (1 child)

    Your final hope at this point is announcing you will not use LLM to write any part of your program, including tests. Adopting a language which your developers are less familiar is bad enough, and you're writing it with LLM? I'd rather you stick with C++.

  • source
  • hideshow 1 child comment
  • [–] 9 points 8 months ago

    The Lunduke vid about this is going to be lit

  • source
  • [–] 86 points 8 months ago* (36 children)

    "We want rust for safety. That's why we made the code in the most unreliable way to code known to humanity".

    Not surprising from the devs that think that not being a fascist is political I guess

    Edit : ah apparently the guy is not trying to be an enlightened centrist anymore and is a full-on nazi. Heh, who could have guessed? /s

  • source
  • hideshow 36 child comments
  • [–] 21 points 8 months ago (1 child)

    Woah wait what? The “let’s vibecode it” angle is fucking stupid, to be clear, but I was unaware of that user drama. Very interesting.

  • source
  • parent
  • hideshow 1 child comment
  • [–] [S] 9 points 8 months ago* (last edited 8 months ago) (31 children)

    I will copy my comment here:

    Just so you know, Drew DeVault is a pedophile apologist. He cannot even remotely be considered a reliable source of information.

    However, I completely agree regarding the use of AI, especially in a project such as a browser engine.

    EDIT: I accidentally replied to this comment instead of the one with the link to Drew DeVault's blog. My bad.

  • source
  • parent
  • hideshow 31 child comments
  • [–] 5 points 8 months ago*

    That is appalling, and I don't mean to diminish the importance of this, but if the claims on fascism stand to scrutiny then it's not relevant, and if the claims don't stand to scrutiny they can be easily refuted.

    Edit: and to be clear, I know DHH, I've read his blog and his social media activity, he's clearly a fascist.

  • source
  • parent
  • [–] 4 points 8 months ago (28 children)

    Most of the information that you get about terrible people comes from terrible people because that is who knows them. Should we discount Trump accusations from Epstein because they came from a known pedo? No, pedos are the people that Trump hangs out with because that is what he is.

  • source
  • parent
  • hideshow 28 child comments
  • [+] -10 points 8 months ago (27 children)

    Given that Drew Devault has pity for pedophiles, the correct choice is to discount anything he says, much like you should discount anything Trump or Epstein claims without further primary sources of evidence from unaffiliated parties

  • source
  • parent
  • hideshow 27 child comments
  • [–] 4 points 8 months ago* (last edited 8 months ago) (26 children)

    This is not at all comparable to Trump/Epstein. Drew was only pitying pedophiles, not actual rapists This may come as a surprise to you, but there is a very clear difference (one is a choice, the other is not).

  • source
  • parent
  • hideshow 26 child comments
  • [+] -8 points 8 months ago (25 children)

    Nobody should pity pedophiles, you should want them removed from society permanently. If that's controversial, so be it

  • source
  • parent
  • hideshow 25 child comments
  • [–] 7 points 8 months ago (24 children)

    With this line of thinking I'd rather remove you from society

  • source
  • parent
  • hideshow 24 child comments
  • [–] -5 points 8 months ago (23 children)

    You'd agree of course, that pedophiles should be removed from society? Is the idea of shaming pedophiles and pedo apologists some kind of line in the sand that shouldn't be crossed in your eyes?

  • source
  • parent
  • hideshow 23 child comments
  • [–] 4 points 8 months ago (22 children)

    You'd agree of course, that pedophiles should be removed from society?

    No, I would most definitely not. In the same way that I would not agree that we should remove all men from society just because they make up the majority of rapists.

    Is the idea of shaming pedophiles and pedo apologists some kind of line in the sand that shouldn't be crossed in your eyes?

    Yes.

  • source
  • parent
  • hideshow 22 child comments
  • [–] -3 points 8 months ago (21 children)

    Right, all rapists should be removed from society, regardless of gender

  • source
  • parent
  • hideshow 21 child comments
  • [–] 1 point 8 months ago* (last edited 8 months ago) (20 children)

    That wasn't the point here. You should work on your reading comprehension. Unless you genuinely believe that all men are potential rapists that should preventively be removed from society? In which case I would just give up explaining this to someone who has the mental capacity of a toddler.

  • source
  • parent
  • hideshow 20 child comments
  • [–] -3 points 8 months ago (19 children)

    I genuinely believe that all rapists should be removed from society, regardless of gender. It wasn't very complicated of a point, surely you're smart enough to pick up on that, without resorting to ad hominem.

  • source
  • parent
  • hideshow 19 child comments
  • [–] 3 points 8 months ago (18 children)

    Jesus fucking Christ, are you just ragebaiting or are you genuinely this bad at comprehending stuff? I am talking about the equivalent of your original point, that being the PREEMPTIVE removal of ALL MEN from society due to the fact that they are the main perpetrators of rape, despite the overwhelming majority of them not being rapists at all.

    Is this clear now, or should I send your Mum over to explain it to you?

  • source
  • parent
  • hideshow 18 child comments
  • [–] -1 points 8 months ago (17 children)

    I never made that point, so I didn't address it. After you said "I’d rather remove you from society" it was pretty clear to me you were letting emotions get the best of you. Again, no need for ad hominem depictions.

  • source
  • parent
  • hideshow 17 child comments
  • [–] 4 points 8 months ago (11 children)

    Their point is that attraction doesn't entail crime or even willingness to commit crimes. Punishing someone for a thought crime is unenforceable and absurd.

  • source
  • parent
  • hideshow 11 child comments
  • [–] 0 points 8 months ago (10 children)

    I wouldn't consider resident rehabilitation punishment, more of an opportunity really, but it still serves the purpose of keeping those people away from the rest of society and reintegrating them once they're fit to be around vulnerable individuals

  • source
  • parent
  • hideshow 10 child comments
  • [–] 3 points 8 months ago (9 children)

    You said:

    Nobody should pity pedophiles, you should want them removed from society permanently. If that's controversial, so be it

    (Emphasis mine)

    You backpedaled after being called out, and it's particularly annoying because removing permanently can also mean extermination. But giving you grace and only interpreting it as rehabilitation (assuming the individual is deemed to no longer be a danger to others), it's still impossible to enforce until there's a crime.

  • source
  • parent
  • hideshow 9 child comments
  • [–] -2 points 8 months ago (8 children)

    Someone who undergoes resident rehabilitation as a pedophile and is successfully treated results in someone who is no longer a pedophile. That permanently removes the pedophile from society.

  • source
  • parent
  • hideshow 8 child comments
  • [–] 1 point 8 months ago* (7 children)

    You can't make someone "no longer a pedophile" any more than you can make someone "no longer gay/lesbian/bisexual/[insert any other sexual orientation]".

  • source
  • parent
  • hideshow 7 child comments
  • [–] 0 points 8 months ago (6 children)

    A sexual preference towards men, women, or nonbinary isn’t a mental illness. A sexual preference to children is. Refer to this for further explanation.

  • source
  • parent
  • hideshow 6 child comments
  • [–] 1 point 8 months ago (5 children)

    Does a condition being considered a mental illness magically make it curable? Was homosexuality curable when it was still classified as a mental disorder? Not that I know of. But feel free to show me a reputable study claiming that is indeed possible to cure pedophilia or paraphilias in general.

  • source
  • parent
  • hideshow 5 child comments
  • [–] -1 points 8 months ago (4 children)

    Of course not, an individual with such a disorder can be successfully treated to reduce if not fully eliminate pedophilic urges or inclinations. Medications and treatments are available to reduce sexual libido and urges in afflicted individuals, as well as to rebuild the mental pathways from pedophilic to normophilic, without altering sexual orientation. A resource to consider is the Handbook of Clinical Sexuality for Mental Health Professionals by Stephen B Levine, Candace B Rice, Stanley E Althof. For a study, as you've requested, feel free to give Changes in Sexual Arousal as Measured by Penile Plethysmography in Men with Pedophilic Sexual Interest a cursory reading.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 1 point 8 months ago (3 children)

    Of course your LLM response provides a study that is heavily flawed in it's methodology and has been criticised a number. of. times..

    I'm not convinced, neither are most experts in this field of research.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 0 points 8 months ago (2 children)

    No LLMs used here, just regular old fashioned search engines and common sense. Not that I expect that to convince you :D I wouldn't bother wasting an LLM's time on this, it's much more entertaining not to. If you feel so inclined, I'd be curious what your take on antiandrogen medications, serotonergic agents or gonadotropin-releasing hormone antagonists for treatment is, since it seems effective in the limited trials that have taken place. Of course, there should always be more thorough research into the capacity for full remission.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 8 months ago

    You have demonstrated no common sense at all and a complete lack of knowledge in your previous comments, so yeah, you won't convince me that this was not written by an LLM.

    Antiandrogens (and by extension GnRH antagonists) have the bad side effect of bone loss/osteoporosis, so not really a good long term solution, and like SSRIs, they just reduce the sexual drive as a whole. I don't know where you see any effectiveness here.

  • source
  • parent
  • Reducing sex drive doesn't change who you are attracted to even if you change how penises respond, at least not from antiandrogens (my experience being with spiro+estrodial). But as far as I know, at least for sex crimes as a whole, variation in sex drive is a poor explainer of who will or will not sexually abuse. Not sure on the details of the regimens being pushed here, but it seems sorta like you want men to be forcibly transitioned (as much as a jokingly supported that as an egg, I'm actually not a fan of the idea on a mass scale)? And no clue what your suggestion for women are. All to achieve a different penis volume?

  • source
  • parent
  • [–] 1 point 8 months ago* (4 children)

    Yes, you did make that point, by claiming that "we should remove all pedophiles from society". I gave you an equivalent example to show you how stupid that is. And you didn't just "not address it", you completely spun it around to fit your narrative. That whole point was your emotional knee-jerk reaction, I was simply throwing it back at you.

  • source
  • parent
  • hideshow 4 child comments
  • [–] -1 points 8 months ago (3 children)

    It's pretty simple, thorough and extensive rehabilitation to treat and rid individuals of the severe mental illness, such that they're fit for reintroduction into society. That's how rehab works.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 1 point 8 months ago (2 children)

    treat and rid individuals of the severe mental illness

    It's not a mental illness. If anything, it's a mental disorder or just a sexual orientation. And when exactly have we ever been able to get rid of a sexual preference? Is conversion therapy your goal? That shit doesn't work.

    You seem to be making a lot of wrong assumptions here. Because just like men in the rapists example, pedophiles overwhelmingly are fit for society and don't need treatment or rehabilitation in the first place. And for the ones that do feel like they need help, it would actually be better to not shame and stigmatize them to actually give them the chance of trusting someone to talk about it.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 8 months ago (1 child)

    It’s not a mental illness. If anything, it’s a mental disorder

    Those are the same thing. "A mental disorder, also referred to as a mental illness, a mental health condition, or a psychiatric disability"

    Most mental illnesses can be successfully treated, many live to tell the tale. Drug addicts who become treated are no longer addicts, sufferers of emotional cognitive disorders who become successfully treated are no longer emotionally suffering. Some disorders are treatment resistant, and afflicted individuals undergo life-long consistent maintenance therapy.

    A sexual preference towards men, women, or nonbinary isn't a mental illness. A sexual preference to children is.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 1 point 8 months ago* (last edited 8 months ago)

    I thought I've read somewhere that "mental disorder" is a broader term, whereas "mental illness" was mostly referring to conditions that impact general behaviour and functioning. But okay, let's use them synonymously, in which case it's still not a severe mental illness that can be cured.

    A sexual preference towards men, women, or nonbinary isn't a mental illness. A sexual preference to children is.

    Even if go with this assumption, that doesn't mean it requires treatment (which is not really possible anyway), let alone forcefully.

  • source
  • parent
  • [–] 2 points 8 months ago

    When they don't seem to know what definition the person is using for the word after writing an actual and seem confused why some of the quotes are against sexual abuse of 14 year olds, it's sorta hard to take their claims serious. IF DD's point is just people with the sexual preference deserve pity, then I agree. Just in the same way I think people with problems such as gambling or drug addictions should be pitied - it's not something they've chosen and it negatively effects their quality of life. Otoh, I don't think a gambling addict, for example, should be forgiven if they bankrupt their family and cause their children to grow up in poverty unnecessarily. Otoh, it it's a history of defending child abuse, then agreed there should be some discounting going on (but that seems the opposite of the quotes provided).

    Either way, isn't the record for ladybird stuff in the git repo or something like that? Doesn't really matter what the source is that brought attention to it if you have the primary source (but people shouldn't be linking to problematic blogs - either link to the primary source or find/make another user-friendly secondary source).

  • source
  • parent
  • [–] 6 points 8 months ago

    So confused why they openly admitted to using AI to code it for them

  • source
  • [–] 5 points 8 months ago* (last edited 8 months ago)

    We previously explored Swift, but the C++ interop never quite got there, and platform support outside the Apple ecosystem was limited

    It's as if everybody told you this the second you announced your move to Swift but aight.

  • source
  • [–] 8 points 8 months ago

    The requirement from the start was byte-for-byte identical output from both pipelines. The result was about 25,000 lines of Rust, and the entire port took about two weeks. The same work would have taken me multiple months to do by hand. We’ve verified that every AST produced by the Rust parser is identical to the C++ one, and all bytecode generated by the Rust compiler is identical to the C++ compiler’s output. Zero regressions across the board:

    Seems like a non-issue.

  • source
  • [+] -9 points 8 months ago (7 children)

    Actually not a terrible way to use AI. Hopefully the port goes well

  • source
  • hideshow 7 child comments
  • [–] -5 points 8 months ago (4 children)

    I came to say this sounds like a good example of how to use ai. Its going to be used but the big problem is folks who will take the output and say good enough.

  • source
  • parent
  • hideshow 4 child comments
  • [–] -4 points 8 months ago (3 children)

    Yeah, using AI to help you rewrite code (which is tedious) in a scenario where there are clear test cases (it either works or it doesn't) is basically the ideal usecase.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 9 points 8 months ago (2 children)

    ...no… this is a bad idea. Especially in a browser, given the myriad safety and security concerns in play. This is an objectively bad way to make changes to the project. I can just about guarantee they’re going to introduce some horrid subtle flaws.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 10 points 8 months ago (1 child)

    I may be misinformed but the article says

    We’ve verified that every AST produced by the Rust parser is identical to the C++ one, and all bytecode generated by the Rust compiler is identical to the C++ compiler’s output.

    which I took to mean that the new code behaves 100% identically to the old code, like a byte-perfect decompilation. If that's not the case and it's just the same in their suite of tests then I'd agree with you.

  • source
  • parent
  • hideshow 1 child comment
  • load more comments (1 reply)