November 18, 2020
On Wednesday, 18 November 2020 at 22:05:40 UTC, Stefan Koch wrote:
> On Wednesday, 18 November 2020 at 17:23:17 UTC, Guillaume Piolat wrote:
>> Blow seems to think there is a lot of native design space with plenty of things that would make a way better language than D.
>>
>> He then went on to repeat many mistakes successfully avoided by D:
>> - new syntax
>> - lack of exceptions
>> - AST macros
>> - the SoA and AoS features can be replicated with one D template
>> - imperative build system
>> - unsafe CTFE
>> - "Jai will not have subtype polymorphism", let that sink in
>> ...
>
> I don't think that those are mistakes if implemented properly.
> Implementation quality is key.

Please let me disagree here.

Exceptions + RAII are super useful for reliable software, as shown in C++.

Subtype polymorphism is basically required for any type of UI.

Unrestricted CTFE? On the JaiPrimer.md page it reads:

> Download the OpenGL spec and build the most recent gl.h header file
> Contact a build server and retrieve/send build data
> Talk to your Mars probe on Mars and wait for the packets to come back and get a photo of what Mars looks like

That's 3 more attack vectors etc.

The list goes on and on, I think it has variable-sized integers too.
November 18, 2020
On Wed, Nov 18, 2020 at 10:36:05PM +0000, Guillaume Piolat via Digitalmars-d wrote: [...]
> Unrestricted CTFE? On the JaiPrimer.md page it reads:
> 
> > Download the OpenGL spec and build the most recent gl.h header file
> > Contact a build server and retrieve/send build data
> > Talk to your Mars probe on Mars and wait for the packets to come back
> > and get a photo of what Mars looks like
> 
> That's 3 more attack vectors etc.

It's not just a security concern.  It also mixes diverse concerns (e.g. build procedure vs. application logic vs. data acquisition) into one big tangled hairball that represents a maintenance nightmare.

Build-specific logic is no longer restricted to the build scripts, now *any* random piece of code *anywhere* in any source file can contain build logic.  Or arbitrary network code that performs arbitrary network operations while the code is compiling.  Y'know, like while the code is compiling it starts editing a database on some remote server somewhere and publishes stuff to Facebook.

And let's not mention build reproducibility, which goes right out the window.  Good luck debugging your code, that modifies arbitrary remote resources during compilation, and potentially "helpfully" reinstalls your debugger for you while it's at it. Or reinstalls your entire OS, for that matter.  You may argue, build scripts can already do this.  No doubt -- but at least we knew where to look when things go wrong: in the build scripts.  Now build logic can be sprinkled *anywhere* in the code. There can be hidden "gems" slipped into the codebase by Johnny Junior Programmer that does who knows what with the overall build logic.  Now instead of debugging the build scripts, you're hunting for random bits of build logic sprinkled all across the entire codebase.  It's an undebuggable, free-for-all, wild-wild-west nightmare for maintenance.


T

-- 
The problem with the world is that everybody else is stupid.
November 19, 2020
On Thursday, 19 November 2020 at 01:02:17 UTC, H. S. Teoh wrote:
> Build-specific logic is no longer restricted to the build scripts, now *any* random piece of code *anywhere* in any source file can contain build logic.  Or arbitrary network code that performs arbitrary network operations while the code is compiling.  Y'know, like while the code is compiling it starts editing a database on some remote server somewhere and publishes stuff to Facebook.
>
> And let's not mention build reproducibility, which goes right out the window.  Good luck debugging your code, that modifies arbitrary remote resources during compilation. [...]
> It's an undebuggable, free-for-all, wild-wild-west nightmare for maintenance.
>
>
> T

Right, but if you're pulling in remote software with a package manager you *already* trust that that software is sane. Sure, with a Turing-complete build system those packages may be able to do arbitrary things on your systems - but if you don't check their code, they may be able to do arbitrary things on your *customers'* systems *anyway*, which is arguably worse. You already embrace this risk when you use packages.

I think stuff like reproducibility is better solved as convention. For instance, require that your package hoster get a clean test build for every published package, and limit network access during the test build.
November 19, 2020
On Wednesday, 18 November 2020 at 16:53:44 UTC, Meta wrote:
> On Wednesday, 18 November 2020 at 16:13:20 UTC, Jack wrote:
>> So I find out jonathan Blow is devloping his own programming language, because "C++ is wild mess". I know pretty much nothing about game dev and I was wondering if D could be used in the way Jonathan Blow would like to? Anyone experienced on game dev stuff could answer this? as far I know, the jai's compiler is not ready yet.Maybe let him know about D language, assuming it fits its game needs, would be interesting?
>
> It's funny, there seem to be a lot of gamedev people that *know* about D, but aren't interested in using it for various reasons (I think the primary one is probably that most/all modern game engines are written in C++ - except Unity, which is still C++ under the hood - and the toolchains are usually geared toward C++ as well).
>
> John Carmack mentioned its support for functional purity in an article back in 2012:
> https://www.gamasutra.com/view/news/169296/Indepth_Functional_programming_in_C.php
>
> And Jonathan Blow has mentioned it at least in passing before, not to mention one of Ubisoft's development studios evaluating it (which I don't think panned out), and D code actually shipping in a modern AAA game (Alan Wake from Remedy Entertainment).
>
> Manu and Ethan are the ones that are/were down in the trenches actually using D for gamedev, but it seems to me like the language is very well suited to it; potentially moreso than C++. C++ has almost completely dominated that space for 20+ years, though, so I don't think D will get big there anytime soon.

There is plenty of C# stuff out there, not only Unity.

Want to make D attractive to game devs? Talking about what Remedy use is way past date.

Here are some options that I as either C# or Java dev can quickly reach out for,

https://stride3d.net/

https://waveengine.net/

https://flatredball.com/

https://www.cryengine.com/

https://www.neoaxis.com/

https://www.monogame.net/

https://jmonkeyengine.org/

https://libgdx.badlogicgames.com/

This is what D needs to actually be relevant to indie game studios, the language alone, or a couple of raw OpenGL/DirectX bindings isn't enough to be competitive with what comes in the box from the alternatives.
November 19, 2020
On Wednesday, 18 November 2020 at 16:13:20 UTC, Jack wrote:
> So I find out jonathan Blow is devloping his own programming language, because "C++ is wild mess". I know pretty much nothing about game dev and I was wondering if D could be used in the way Jonathan Blow would like to? Anyone experienced on game dev stuff could answer this? as far I know, the jai's compiler is not ready yet.Maybe let him know about D language, assuming it fits its game needs, would be interesting?

I don't understand his secrecy, it makes the whole thing unnecessarily strange. Even fully public languages (like zig or nim) have a hard time getting enough recognition, what the hell is he trying to achieve with a compiler that was only seen by a handful of people? Just look at a successful project like rust and check out how many manhour is needed for something like that, it's insane. And most people don't even know rust exists.. Even if Jai is the most perfect language ever, it's still doomed. The language itself is a strange mutation of C, I don't see it becoming the next best thing because it doesn't actually do anything that is interesting enough to switch to it.
November 19, 2020
On Thursday, 19 November 2020 at 12:47:08 UTC, elisecoen wrote:
> And most people don't even know rust exists..

How much truth is there to this? It's probably because of the little corner of the internet that I have carved out for myself, but I see discussions and posts about Rust in a lot of places--to a detriment, even. Further, Nim and Zig are also visible (more so than D).


November 19, 2020
On Thursday, 19 November 2020 at 12:47:08 UTC, elisecoen wrote:
>
> I don't understand his secrecy, it makes the whole thing unnecessarily strange. Even fully public languages (like zig or nim) have a hard time getting enough recognition, what the hell is he trying to achieve with a compiler that was only seen by a handful of people? Just look at a successful project like rust and check out how many manhour is needed for something like that, it's insane. And most people don't even know rust exists.. Even if Jai is the most perfect language ever, it's still doomed. The language itself is a strange mutation of C, I don't see it becoming the next best thing because it doesn't actually do anything that is interesting enough to switch to it.

The reason he doesn't release it, is because it's not done yet.
He does not want to release and unfinished or broken product.
Which is a good stance to take, both for once reputations as well for the users happiness.
November 19, 2020
On Wednesday, 18 November 2020 at 16:13:20 UTC, Jack wrote:
> So I find out jonathan Blow is devloping his own programming language, because "C++ is wild mess". I know pretty much nothing about game dev and I was wondering if D could be used in the way Jonathan Blow would like to? Anyone experienced on game dev stuff could answer this? as far I know, the jai's compiler is not ready yet.Maybe let him know about D language, assuming it fits its game needs, would be interesting?

If I recall well, he made a video about Rust, golang, and D in the context of game development, and the crux of the issue is that each of these languages are too opinionated for him--or at least incorrectly opinionated.
November 19, 2020
On Thursday, 19 November 2020 at 13:25:33 UTC, starcanopy wrote:
>
> If I recall well, he made a video about Rust, golang, and D in the context of game development, and the crux of the issue is that each of these languages are too opinionated for him--or at least incorrectly opinionated.

Can you explain what it means when a language is "opinionated". If I'm going to guess it means that Jonathan Blow doesn't like a language that he doesn't have full control over?
November 19, 2020
On Thursday, 19 November 2020 at 12:47:08 UTC, elisecoen wrote:
> On Wednesday, 18 November 2020 at 16:13:20 UTC, Jack wrote:
>> [...]
>
> I don't understand his secrecy, it makes the whole thing unnecessarily strange. Even fully public languages (like zig or nim) have a hard time getting enough recognition, what the hell is he trying to achieve with a compiler that was only seen by a handful of people? Just look at a successful project like rust and check out how many manhour is needed for something like that, it's insane. And most people don't even know rust exists.. Even if Jai is the most perfect language ever, it's still doomed. The language itself is a strange mutation of C, I don't see it becoming the next best thing because it doesn't actually do anything that is interesting enough to switch to it.

He is doing it for himself, he doesn't care to share it with the world.

Doing in-house languages is quite common in game studios.