Jump to page: 1 2
Thread overview
D is the best tool for this!!! How do we tell them??
Aug 03
Emmanuel
Aug 03
monkyyy
Aug 04
aberba
Aug 04
aberba
Aug 06
Martyn
Aug 05
matheus
Aug 06
aberba
Aug 05
monkyyy
August 03

https://www.theregister.com/2024/08/03/darpa_c_to_rust/#:~:text=The%20term%20stands%20for%20TRanslating,do%20so%20is%20memory%20safety.

the DARPA project wants to translate all their legacy C code to Rust. they prefer using a programming language which will reject unsafe programs at compile times.

maybe one PULL request from the D community can???? showing how good D is for a job like this!!

August 03

On Saturday, 3 August 2024 at 18:52:42 UTC, Emmanuel wrote:

>

https://www.theregister.com/2024/08/03/darpa_c_to_rust/#:~:text=The%20term%20stands%20for%20TRanslating,do%20so%20is%20memory%20safety.

the DARPA project wants to translate all their legacy C code to Rust. they prefer using a programming language which will reject unsafe programs at compile times.

maybe one PULL request from the D community can???? showing how good D is for a job like this!!

Don't trust what they are saying, think backwards from their conclusions.

They could have pick 50 other languages, they could have commissioned a new c subset and compiler, they could have made calls for new languge that ports c easily but have such and such safety features.

Instead they picked rust, the language that killed firefox, has no final spec and by all accounts is painful to work with. They wanted to dig ditches to refill them.

Why would they want this, well, congress made on-shoring technology a priority a few years back, while silicone valley was getting ready for the mass firings. From their prospective keeping Americans employable with stem skills is a responsible act for "the digital supply chain".

August 04

On Saturday, 3 August 2024 at 23:04:06 UTC, monkyyy wrote:

>

On Saturday, 3 August 2024 at 18:52:42 UTC, Emmanuel wrote:

>

[...]

Don't trust what they are saying, think backwards from their conclusions.

They could have pick 50 other languages, they could have commissioned a new c subset and compiler, they could have made calls for new languge that ports c easily but have such and such safety features.

Instead they picked rust, the language that killed firefox, has no final spec and by all accounts is painful to work with. They wanted to dig ditches to refill them.

Why would they want this, well, congress made on-shoring technology a priority a few years back, while silicone valley was getting ready for the mass firings. From their prospective keeping Americans employable with stem skills is a responsible act for "the digital supply chain".

What killed Firefox are all the devs that ship Chrome everywhere with their Electron crap, and while complaining about Google, cannot care less to test anything else beyond Chrome.

August 04

On Sunday, 4 August 2024 at 08:20:25 UTC, Paulo Pinto wrote:

>

On Saturday, 3 August 2024 at 23:04:06 UTC, monkyyy wrote:

>

[...]

What killed Firefox are all the devs that ship Chrome everywhere with their Electron crap, and while complaining about Google, cannot care less to test anything else beyond Chrome.

Mozilla killed Firefox when the lost focus of their main product. Follow when they were spending their money.

August 04
On Sunday, 4 August 2024 at 09:51:48 UTC, aberba wrote:
> On Sunday, 4 August 2024 at 08:20:25 UTC, Paulo Pinto wrote:
>> On Saturday, 3 August 2024 at 23:04:06 UTC, monkyyy wrote:
>>> [...]
>>
>> What killed Firefox are all the devs that ship Chrome everywhere with their Electron crap, and while complaining about Google, cannot care less to test anything else beyond Chrome.
>
> Mozilla killed Firefox when the lost focus of their main product. Follow when they were spending their money.

Firefox was really bad, it has little to do with any specific language IMO, it was an organizational failure. The DevTool relied upon by front-end devs was horrible. It's gotten better since then but now it's almost too late.
August 04

On Saturday, 3 August 2024 at 18:52:42 UTC, Emmanuel wrote:

>

https://www.theregister.com/2024/08/03/darpa_c_to_rust/#:~:text=The%20term%20stands%20for%20TRanslating,do%20so%20is%20memory%20safety.

the DARPA project wants to translate all their legacy C code to Rust. they prefer using a programming language which will reject unsafe programs at compile times.

maybe one PULL request from the D community can???? showing how good D is for a job like this!!

From translating heaps of C to D: it's not that easy sometimes.

  • Some C headers like j40.h and miniz.h use the "switch-based coroutine" and exploit the fact the case label can be anywhere to create push parsers. Rust match doesn't allow labels anywhere, but D does so you can do the switch-based coroutine. Example: https://gist.github.com/mrtrizer/a14c033a054c191d9d23bfa516ad8107
    At least this case is easy in D.

  • Some C headers like j40.h and stb_image_resize2.h use header self-include to change macros and have some sort of templates. A single C header can include itself many times (imagine the poor lexer). When translating this, it can be tempting to just expand however the translated code may make more sense if done with a policy-based template and mixin.

August 05

On Sunday, 4 August 2024 at 08:20:25 UTC, Paulo Pinto wrote:

>

What killed Firefox are all the devs that ship Chrome everywhere with their Electron crap, and while complaining about Google, cannot care less to test anything else beyond Chrome.

Servo never shipping plays a role in firefoxs death

A 8 year example of someone big running head first into a spiketrap; everyone since has no excuse to expect different results, Rust has a bad feedback loop of getting code running, compiling quickly and seeing if its work; their talking point of "it will be perfect when you get it compiling" evidently didnt save whatever was going on in firefox.

August 05

On Monday, 5 August 2024 at 01:37:38 UTC, monkyyy wrote:

>

On Sunday, 4 August 2024 at 08:20:25 UTC, Paulo Pinto wrote:

>

What killed Firefox are all the devs that ship Chrome everywhere with their Electron crap, and while complaining about Google, cannot care less to test anything else beyond Chrome.

Servo never shipping plays a role in firefoxs death

A 8 year example of someone big running head first into a spiketrap; everyone since has no excuse to expect different results, Rust has a bad feedback loop of getting code running, compiling quickly and seeing if its work; their talking point of "it will be perfect when you get it compiling" evidently didnt save whatever was going on in firefox.

If you think that was the reason, I have a bridge to sell.

August 05
On Sunday, 4 August 2024 at 09:51:48 UTC, aberba wrote:
> ...
> Mozilla killed Firefox when the lost focus of their main product. Follow when they were spending their money.

I think that "bundling" IE with windows (IE vs Netscape) and google telling users to try chrome on its biggest search engine helped then a lot against Mozilla too.

I'm NOT evangelist, but I use FF on PC e Mobile because it gives me a better experience together with uBlock Origin and other plugins.

Nevermind cases of youtube throttling or teams (microsoft) rejecting FF, in the latter I had that problem myself and it was "fixed" using a User-Agent Switch add-on on FF and cheating teams, which by the way worked perfectly after... nonsense.

By the way, in this Forum with UBO blocking fonts.googleapis.com, ajax.googleapis.com gives me literally a instant load. (I ran private browsing).

Finally I'm not saying FF is perfect, in fact there to opposite is quite true. But again I think it currently gives me better experience with UBO than the alternatives.

Matheus.
August 05
On 8/4/2024 3:06 AM, Guillaume Piolat wrote:
> - Some C headers like j40.h and miniz.h use the "switch-based coroutine" and exploit the fact the case label can be anywhere to create push parsers. Rust match doesn't allow labels anywhere, but D does so you can do the switch-based coroutine. Example: https://gist.github.com/mrtrizer/a14c033a054c191d9d23bfa516ad8107
> At least this case is easy in D.

It's one reason why pattern matching in D will be a construct separate from the switch statement.


> - Some C headers like j40.h and stb_image_resize2.h use header self-include to change macros and have some sort of templates. A single C header can include itself many times (imagine the poor lexer). When translating this, it can be tempting to just expand however the translated code may make more sense if done with a policy-based template and `mixin`.

ImportC can do translations of C to D, but not translations of non-trivial preprocessor metaprogramming.

Problems aside, reports from the field are that ImportC can do maybe 90% of the job, the rest by hand. Still a big win.

My experience hand-translating C to D is about 1000 lines per hour.
« First   ‹ Prev
1 2