Jump to page: 1 2 3
Thread overview
Discussion: Porting 58000 lines of D and C++ to jai, Part 0: Why and How
Nov 23, 2022
Kyle Ingraham
Nov 23, 2022
rikki cattermole
Nov 23, 2022
12345swordy
Nov 23, 2022
Johan
Nov 24, 2022
TheGag96
Nov 23, 2022
ryuukk_
Nov 23, 2022
ryuukk_
Nov 23, 2022
Sergey
Nov 23, 2022
Kyle Ingraham
Nov 23, 2022
Guillaume Piolat
Nov 23, 2022
Kyle Ingraham
Nov 24, 2022
Guillaume Piolat
Nov 23, 2022
IGotD-
Nov 23, 2022
Kyle Ingraham
Nov 24, 2022
Hipreme
Nov 24, 2022
FeepingCreature
Nov 24, 2022
FeepingCreature
Dec 02, 2022
Iain Buclaw
Nov 24, 2022
cc
Nov 25, 2022
Dukc
Nov 25, 2022
FeepingCreature
Nov 25, 2022
Dukc
Nov 25, 2022
FeepingCreature
Nov 30, 2022
Kyle Ingraham
November 23, 2022

Hi all. I came across this article on Hacker News: https://www.yet-another-blog.com/porting_the_game_to_jai_part0/

I’m interested in reading your thoughts on the ‘Why not D’ section. Anyone have experiences that match the specific points there? I haven’t experienced them but I also don’t debug on Windows. I also find D’s documentation to be excellent.

I’m super-positive on D but also interested in whether there are others with the same issues as the article’s author.

November 24, 2022
On 24/11/2022 6:20 AM, Kyle Ingraham wrote:
> I’m interested in reading your thoughts on the ‘Why not D’ section. Anyone have experiences that match the specific points there? I haven’t experienced them but I also don’t debug on Windows. I also find D’s documentation to be excellent.

I haven't experienced the exact set of issues listed, but yeah debugging can be quite janky even when it works. If I can help it I will not start up VS to debug, it messes with window order OS wide, not fun.

> I’m super-positive on D but also interested in whether there are others with the same issues as the article’s author.

I'm quite surprised that the issues surrounding shared libraries wasn't mentioned. That's the big one I'm facing. Windows is basically a write off for dmd and there isn't much support on the compiler dev side to fix this.
November 23, 2022

On Wednesday, 23 November 2022 at 17:20:54 UTC, Kyle Ingraham wrote:

>

Hi all. I came across this article on Hacker News: https://www.yet-another-blog.com/porting_the_game_to_jai_part0/

I’m interested in reading your thoughts on the ‘Why not D’ section. Anyone have experiences that match the specific points there? I haven’t experienced them but I also don’t debug on Windows. I also find D’s documentation to be excellent.

I’m super-positive on D but also interested in whether there are others with the same issues as the article’s author.

I have with regards to debugging on windows. It is unironically so terrible that I have to stop using the d programming language all together. The difficulty in fixing requires too much time from me and it a requires a full time developer just to fix this. I can't recommend programming d on windows platform for serious work, due to this major issue.

  • Alex
November 23, 2022

On Wednesday, 23 November 2022 at 17:20:54 UTC, Kyle Ingraham wrote:

>

Hi all. I came across this article on Hacker News: https://www.yet-another-blog.com/porting_the_game_to_jai_part0/

I’m interested in reading your thoughts on the ‘Why not D’ section. Anyone have experiences that match the specific points there? I haven’t experienced them but I also don’t debug on Windows. I also find D’s documentation to be excellent.

About the compilation speed, I think the author does not yet realize that you have to think about performance of compile-time execution, similarly as with runtime execution. The algorithm used matters a lot, also at compile time. Spending 60sec on that small of a codebase is not my experience (*), so I think it's just a piece of compile-time code that is consuming most of the time (note that his optimized build only takes 2x longer).

-Johan

(*) >10 times larger linecount project with lots of compile-time stuff and template complexity, 1.8GB main executable binary in debug mode, about ten 100MB executables, just tested: builds in 300seconds. Just semantic analysis (compile without machine codegen) takes 130seconds.

November 23, 2022

On Wednesday, 23 November 2022 at 17:20:54 UTC, Kyle Ingraham wrote:

>

Hi all. I came across this article on Hacker News: https://www.yet-another-blog.com/porting_the_game_to_jai_part0/

I’m interested in reading your thoughts on the ‘Why not D’ section. Anyone have experiences that match the specific points there? I haven’t experienced them but I also don’t debug on Windows. I also find D’s documentation to be excellent.

I’m super-positive on D but also interested in whether there are others with the same issues as the article’s author.

Some valid criticisms, specially regarding to debugging, it has improved so there is that

>

Reducing noise in the code due to various syntax improvements

This one i agree too, it's nice when the language allows you to be expressive without being noisy

The Enum Type Inference DIP is a move in the right direction imo

>

Replacing build-scripts with jai code

I also like that idea, i wonder if dub could support something like it, at the end of the day, dub just parse a json into a struct

// build.d

import dub;

void build(Builder* builder)
{
    builder.target_type = .exe;
    builder.target_name = "game";

    auto config = builder.create_configuration("config_a");
    config.(..)

    config.prebuild_commands ~= () {
        // do stuff
    };
}

And then dub could just run that function directly instead of parsing a json

>

Reducing compile times from about 60s right now to under 5s, hopefully around 1s

This one i find suspicious and very surprising

My 30+k LOC game rebuilds fully in just 1.2 sec, i don't touch phobos and i'm light on templates

On picks D because it's fast at compilation, so by the time it reaches 60s i wonder why he didn't think there is a problem somewhere before... like at 2-5 seconds it already is slow, at that time you need to guess that the code you wrote is cat piss and it is time to reflect on what you are doing..

I suggest that autho to stick to D for fast iteration and to ping the forum whenever there is a bug that's blocking you...

That's why it's important to be pro active, most users won't complain about issues, they'll just move on..

Programming languages should:

  • be easy to debug out of the box
  • be easy to write/read without being verbose
  • be fast at compilation
  • be fast at runtime

Once my game will be at a visually pleasant state, i'll write a proper blog post, i'll prove these people wrong

November 23, 2022

On Wednesday, 23 November 2022 at 21:17:42 UTC, ryuukk_ wrote:

>

I suggest that author to stick to DMD (..)

Damn, typos..

November 23, 2022

On Wednesday, 23 November 2022 at 21:20:17 UTC, ryuukk_ wrote:

>

On Wednesday, 23 November 2022 at 21:17:42 UTC, ryuukk_ wrote:

>

I suggest that author to stick to DMD (..)

Damn, typos..

He wrote that DMD is not acceptable for him, that the debug info in DMD is just wrong somehow.. “DMD has historically had a lot of issues with the quality of its debug info”
I think that's why the proposal: for development iteration use DMD, for production LDC is not suitable for his code and his case.

November 23, 2022

On Wednesday, 23 November 2022 at 17:20:54 UTC, Kyle Ingraham wrote:

>

I’m super-positive on D but also interested in whether there are others with the same issues as the article’s author.

I'm using VisualD and yeah it has become a bit strange over time, with debugging values being shown wrong, it also depends what's your compiler and whether youa re using Mago or isual studio debugger, breakpoints sometimes not triggering unless you rebuild... I'm pretty sure it used to be a bit better.

... but the last thing I would do is rewrite a whole codebase just for such a reason. It's not even clear Jai has a Visual Studio extension at all.

November 23, 2022

On Wednesday, 23 November 2022 at 17:20:54 UTC, Kyle Ingraham wrote:

>

Hi all. I came across this article on Hacker News: https://www.yet-another-blog.com/porting_the_game_to_jai_part0/

I’m interested in reading your thoughts on the ‘Why not D’ section. Anyone have experiences that match the specific points there? I haven’t experienced them but I also don’t debug on Windows. I also find D’s documentation to be excellent.

I’m super-positive on D but also interested in whether there are others with the same issues as the article’s author.

Just a quick question about Jai, can anybody obtain the Jai compiler today?

November 23, 2022

On Wednesday, 23 November 2022 at 22:29:24 UTC, IGotD- wrote:

>

On Wednesday, 23 November 2022 at 17:20:54 UTC, Kyle Ingraham wrote:

>

Hi all. I came across this article on Hacker News: https://www.yet-another-blog.com/porting_the_game_to_jai_part0/

I’m interested in reading your thoughts on the ‘Why not D’ section. Anyone have experiences that match the specific points there? I haven’t experienced them but I also don’t debug on Windows. I also find D’s documentation to be excellent.

I’m super-positive on D but also interested in whether there are others with the same issues as the article’s author.

Just a quick question about Jai, can anybody obtain the Jai compiler today?

It looks like it’s accessible through a closed beta: https://github.com/Jai-Community/Jai-Community-Library/wiki/Overview#history

« First   ‹ Prev
1 2 3