June 18
On Sunday, 18 June 2017 at 10:38:49 UTC, Ecstatic Coder wrote:
> Something I really appreciate a lot with D is how close it is to JavaScript.

Have you ever seen my jsvar.d ?

http://forum.dlang.org/thread/kuxfkakrgjaofkrdvgmx@forum.dlang.org
June 19
On 18/06/2017 5:29 PM, Meta wrote:
> We should be careful not to make *too* close a comparison. While Javascript is a necessary evil for web applications and some people do like it, I get the feeling that it's becoming less and less liked. It's not quite a fractal of bad design like PHP, but it has more than a few drastic shortcomings and design flaws.

The moment webasm becomes a realistic target, I will do EVERYTHING in my power to get Lua in the browser (yes there already is solutions).

Stuff Javascript, kill it, replace it with something actually properly designed!
June 19
On Sunday, 18 June 2017 at 23:11:25 UTC, rikki cattermole wrote:
> On 18/06/2017 5:29 PM, Meta wrote:
>> We should be careful not to make *too* close a comparison. While Javascript is a necessary evil for web applications and some people do like it, I get the feeling that it's becoming less and less liked. It's not quite a fractal of bad design like PHP, but it has more than a few drastic shortcomings and design flaws.
>
> The moment webasm becomes a realistic target, I will do EVERYTHING in my power to get Lua in the browser (yes there already is solutions).
>
> Stuff Javascript, kill it, replace it with something actually properly designed!

Why not D? And why wait till it's a realistic target? Wasm is clearly going to be the answer and it's an answer to a problem that exists, so what does one gain by waiting?


June 19
On 19/06/2017 2:57 AM, Laeeth Isharc wrote:
> On Sunday, 18 June 2017 at 23:11:25 UTC, rikki cattermole wrote:
>> On 18/06/2017 5:29 PM, Meta wrote:
>>> We should be careful not to make *too* close a comparison. While Javascript is a necessary evil for web applications and some people do like it, I get the feeling that it's becoming less and less liked. It's not quite a fractal of bad design like PHP, but it has more than a few drastic shortcomings and design flaws.
>>
>> The moment webasm becomes a realistic target, I will do EVERYTHING in my power to get Lua in the browser (yes there already is solutions).
>>
>> Stuff Javascript, kill it, replace it with something actually properly designed!
> 
> Why not D? And why wait till it's a realistic target? Wasm is clearly going to be the answer and it's an answer to a problem that exists, so what does one gain by waiting?

(1) eval
(2) time+not all API's required are available just yet.
June 19
> Have you ever seen my jsvar.d ?
>
> http://forum.dlang.org/thread/kuxfkakrgjaofkrdvgmx@forum.dlang.org

AWESOME !!!
October 12
On Sunday, 18 June 2017 at 10:38:49 UTC, Ecstatic Coder wrote:
> Something I really appreciate a lot with D is how close it is to JavaScript.
>
> For instance, I have to maintain two similar versions of Pendown, a Markdown alternative for colored documents.
>
> There is a server-side version, in D :
>
>     https://github.com/senselogic/PENDOWN/blob/master/pendown.d
>
> And a client-side version, in JavaScript :
>
>     https://github.com/senselogic/PENDOWN/blob/master/pendown.js
>
> If you look at both file, you should see how close both files are.
>
> Thanks to a few methods (charAt, slice, push, pop, etc) added to the string and array types, when I change a function implementation in one version, all I have to do is copy-paste the modifications in the other file and just make a few minor changes (==/===, ~/+, etc).
>
> Everything else works unchanged : string and array methods (length, split, join, startsWith, endsWith), closures, etc.
>
> I think that's really AWESOME to have designed the D language and its standard library in such a way, keeping it so close to JavaScript, the most used scripting languages on earth !!!
>
> That's why I personally advertise it like a "strongly-typed super-powered JavaScript", as it is the best scripting language I know.
>
> Even if D is obviously much more than that, this still accurately describes what many programmers should feel when using this fantastic language.
>
> Therefore I think that this closeness is something that should be advertised much more, so that people know that :
> - a JavaScript programmer will immediately feel at home with D;
> - porting text manipulation code back and forth between D and JavaScript is just a breeze.

Not directly related to my post, but in the unlikely event that somebody on this forum has started to use Pendown, I must inform you that I've slightly changed the list and image syntaxes to make the even more practical.

I always do my best to avoid making breaking changes in my open source tools, but as this project has zero stars on Github, I thought I could freely fix the syntax, as this generally implies that people have no interest in using it.

And if I was wrong, that's really easy to fix the existing documents anyway, by making just a few find'n'replace in any plain text editor...
October 13
As just requested by a user, I've put the image size on the right. Nice remark, this indeed improves their readability.

The image syntax will now be frozen this way : [[image_name.jpg:size]].

To update the existing files, just open them all in Geany, and replace the regular expression "\[\[(.+?):(.+?)\]\]" by "[[\2:\1]]" to fix the old images, and if needed "^( *?)#" by "\1\1*   " to fix the old lists.

Many thanks for this positive feedback from the D community, that was really appreciated :D

October 13
On Monday, 19 June 2017 at 02:02:05 UTC, rikki cattermole wrote:
> On 19/06/2017 2:57 AM, Laeeth Isharc wrote:
>> On Sunday, 18 June 2017 at 23:11:25 UTC, rikki cattermole wrote:
>>> On 18/06/2017 5:29 PM, Meta wrote:
>>>> We should be careful not to make *too* close a comparison. While Javascript is a necessary evil for web applications and some people do like it, I get the feeling that it's becoming less and less liked. It's not quite a fractal of bad design like PHP, but it has more than a few drastic shortcomings and design flaws.
>>>
>>> The moment webasm becomes a realistic target, I will do EVERYTHING in my power to get Lua in the browser (yes there already is solutions).
>>>
>>> Stuff Javascript, kill it, replace it with something actually properly designed!
>> 
>> Why not D? And why wait till it's a realistic target? Wasm is clearly going to be the answer and it's an answer to a problem that exists, so what does one gain by waiting?
>
> (1) eval
> (2) time+not all API's required are available just yet.

Why do you choose Lua? Whatever replaces Javascript (and compiles to wasm) will be used for large apps, like how Javascript is currently used. My understanding is that Lua is not particularly well suited for building large apps.

October 14
On Monday, 19 June 2017 at 01:57:00 UTC, Laeeth Isharc wrote:
> On Sunday, 18 June 2017 at 23:11:25 UTC, rikki cattermole wrote:
>> On 18/06/2017 5:29 PM, Meta wrote:
>>> We should be careful not to make *too* close a comparison. While Javascript is a necessary evil for web applications and some people do like it, I get the feeling that it's becoming less and less liked. It's not quite a fractal of bad design like PHP, but it has more than a few drastic shortcomings and design flaws.
>>
>> The moment webasm becomes a realistic target, I will do EVERYTHING in my power to get Lua in the browser (yes there already is solutions).
>>
>> Stuff Javascript, kill it, replace it with something actually properly designed!
>
> Why not D? And why wait till it's a realistic target? Wasm is clearly going to be the answer and it's an answer to a problem that exists, so what does one gain by waiting?

+1

At the moment, for web development I use Go or PHP on the server side, and JavaScript on the client side.

Using Node.js on the server side would allow me to use the same language on both side, which would be PERFECT.

But programming asynchronous code with Node.js is a pain in the ass compared to Go.

D's syntax and standard libraries make it very similar to both JavaScript and Go.

I know it because it was incredibly easy to convert my Node.js tools to D.

With Wasm, D has the potential to become a perfect alternative to Dart and JavaScript, by being available on both the server and the client side.

This is a unique window of opportunity for D, as this would make it a very solid and serious contender to both Dart, Go, JavaScript and C++.

So why not try to promote the development of a D to Wasm compiler as a master thesis to the software engineering students in universities ?

October 14
On 6/18/2017 3:38 AM, Ecstatic Coder wrote:
> Something I really appreciate a lot with D is how close it is to JavaScript.

There's also a D implementation of Javascript:

https://github.com/DigitalMars/DMDScript
1 2 3