October 14, 2017
On Saturday, 14 October 2017 at 07:45:06 UTC, Walter Bright wrote:
> 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

The surprising strength of DMDScript is that it uses the same GC as D does, making sharing of objects between JS and Host transparent and 0-copy.
A typical JS engine run internal GC which the host has to interact with in cumbersome ways b/c it doesn’t know about hosts’s memory.
October 14, 2017
On 10/14/2017 12:54 AM, Dmitry Olshansky wrote:
> On Saturday, 14 October 2017 at 07:45:06 UTC, Walter Bright wrote:
>> 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
> 
> The surprising strength of DMDScript is that it uses the same GC as D does, making sharing of objects between JS and Host transparent and 0-copy.
> A typical JS engine run internal GC which the host has to interact with in cumbersome ways b/c it doesn’t know about hosts’s memory.

I always thought DMDScript would be a great plugin extension language to use in a D IDE.
October 14, 2017
Am Fri, 13 Oct 2017 17:57:12 +0000
schrieb John Gabriele <jgabriele@fastmail.fm>:

> 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.

I agree with that. Whenever the time comes to make adjustments to the Lua code I miss the good old "compiler will tell me where type became incompatible" style of refactoring. As common in scripting languages nothing stops you from having typos in a property name that you want to assign a new value. It'll just create a new one.

-- 
Marco

October 14, 2017
On Saturday, 14 October 2017 at 07:45:06 UTC, Walter Bright wrote:
> 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

What about a DScript interpreter ?

I mean an interactive D code compiler, which compiles D code on the fly and runs it directly within an application, like the eval() function of JavaScript.

Something that works at least for some D subset.

For C++, there is the Cling interactive interpreter, based on LLVM :

https://github.com/vgvassilev/cling

October 14, 2017
On 10/14/2017 1:52 AM, Ecstatic Coder wrote:
> On Saturday, 14 October 2017 at 07:45:06 UTC, Walter Bright wrote:
>> 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
> 
> What about a DScript interpreter ?

That could be done, but for small plugins a small dynamic language can be more convenient.

October 14, 2017
On Saturday, 14 October 2017 at 08:52:54 UTC, Ecstatic Coder wrote:
> On Saturday, 14 October 2017 at 07:45:06 UTC, Walter Bright wrote:
>> 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
>
> What about a DScript interpreter ?
>
> I mean an interactive D code compiler, which compiles D code on the fly and runs it directly within an application, like the eval() function of JavaScript.
>
> Something that works at least for some D subset.
>
> For C++, there is the Cling interactive interpreter, based on LLVM :
>
> https://github.com/vgvassilev/cling

Something like this?

https://github.com/dlang-community/drepl
October 14, 2017
On Saturday, 14 October 2017 at 10:48:40 UTC, Joakim wrote:
> On Saturday, 14 October 2017 at 08:52:54 UTC, Ecstatic Coder wrote:
>> On Saturday, 14 October 2017 at 07:45:06 UTC, Walter Bright wrote:
>>> 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
>>
>> What about a DScript interpreter ?
>>
>> I mean an interactive D code compiler, which compiles D code on the fly and runs it directly within an application, like the eval() function of JavaScript.
>>
>> Something that works at least for some D subset.
>>
>> For C++, there is the Cling interactive interpreter, based on LLVM :
>>
>> https://github.com/vgvassilev/cling
>
> Something like this?
>
> https://github.com/dlang-community/drepl

Not exactly the LLVM-based compile-to-memory interpreter I was thinking about, but this could indeed do the job ;)


1 2 3
Next ›   Last »