Re: D scripting in D

2017-06-04 Thread Joakim via Digitalmars-d-learn
On Saturday, 3 June 2017 at 17:28:36 UTC, Adam D. Ruppe wrote: On Saturday, 3 June 2017 at 17:24:08 UTC, Russel Winder wrote: So why isn't rdmd shipped as a separate thing if it can wrap any of the three compilers? it is... the link above is all there is to it, you simply compile it. The docs

Re: D scripting in D

2017-06-03 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 3 June 2017 at 17:24:08 UTC, Russel Winder wrote: So why isn't rdmd shipped as a separate thing if it can wrap any of the three compilers? it is... the link above is all there is to it, you simply compile it. The docs also call it a download: http://dlang.org/rdmd.html dmd just

Re: D scripting in D

2017-06-03 Thread Russel Winder via Digitalmars-d-learn
On Sat, 2017-06-03 at 17:08 +, Adam D. Ruppe via Digitalmars-d- learn wrote: > On Saturday, 3 June 2017 at 05:04:24 UTC, Russel Winder wrote: > > Not enough is made of rdmd. rdmd needs to be separated from dmd  > > so it works with gdc and ldc2. > > rdmd has always worked with them, at least w

Re: D scripting in D

2017-06-03 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 3 June 2017 at 05:04:24 UTC, Russel Winder wrote: Not enough is made of rdmd. rdmd needs to be separated from dmd so it works with gdc and ldc2. rdmd has always worked with them, at least with their gdmd and ldmd wrappers https://github.com/dlang/tools/blob/master/rdmd.d#L46

Re: D scripting in D

2017-06-03 Thread rikki cattermole via Digitalmars-d-learn
On 03/06/2017 4:43 PM, Lewis wrote: On Saturday, 3 June 2017 at 09:28:03 UTC, rikki cattermole wrote: A lot of this can be done by simply implementing shared libraries fully on Windows. There is a reason why TypeInfo doesn't cross the dll boundary right now. Sadly it isn't a high priority (and

Re: D scripting in D

2017-06-03 Thread Lewis via Digitalmars-d-learn
On Saturday, 3 June 2017 at 09:28:03 UTC, rikki cattermole wrote: A lot of this can be done by simply implementing shared libraries fully on Windows. There is a reason why TypeInfo doesn't cross the dll boundary right now. Sadly it isn't a high priority (and it really really needs to be "just d

Re: D scripting in D

2017-06-03 Thread rikki cattermole via Digitalmars-d-learn
On 03/06/2017 10:03 AM, Mike B Johnson wrote: On Saturday, 3 June 2017 at 00:02:54 UTC, Lewis wrote: On Friday, 2 June 2017 at 20:47:31 UTC, Mike B Johnson wrote: [...] For sure. I actually want to post the source code at some point, but the changes I made are very much set up specifically f

Re: D scripting in D

2017-06-03 Thread Mike B Johnson via Digitalmars-d-learn
On Saturday, 3 June 2017 at 00:02:54 UTC, Lewis wrote: On Friday, 2 June 2017 at 20:47:31 UTC, Mike B Johnson wrote: [...] For sure. I actually want to post the source code at some point, but the changes I made are very much set up specifically for this project. I'll sift through at some poi

Re: D scripting in D

2017-06-02 Thread Russel Winder via Digitalmars-d-learn
On Fri, 2017-06-02 at 20:47 +, Mike B Johnson via Digitalmars-d- learn wrote: > […] > > Would you mind, when you get some time, to write up a more  > detailed analysis of the problems you had to overcome to get it  > to work? Possibly we could get some type of library solution that  > just "wo

Re: D scripting in D

2017-06-02 Thread Russel Winder via Digitalmars-d-learn
On Fri, 2017-06-02 at 12:27 +, Adam D. Ruppe via Digitalmars-d- learn wrote: > On Friday, 2 June 2017 at 09:39:51 UTC, Russel Winder wrote: > > With D and Go, both of which claim compilation so fast you do  > > not notice: > > 1. Edit > 2. run rdmd > There is no rdmd on Fedora Rawhide. There

Re: D scripting in D

2017-06-02 Thread Lewis via Digitalmars-d-learn
On Friday, 2 June 2017 at 20:47:31 UTC, Mike B Johnson wrote: Would you mind, when you get some time, to write up a more detailed analysis of the problems you had to overcome to get it to work? Possibly we could get some type of library solution that just "works" with very little change and res

Re: D scripting in D

2017-06-02 Thread Mike B Johnson via Digitalmars-d-learn
On Friday, 2 June 2017 at 15:55:53 UTC, Lewis wrote: On Friday, 2 June 2017 at 02:06:27 UTC, Mike B Johnson wrote: I wonder if it is possible to somehow turn D in to a scripting language that can be run inside D? On a game project I'm working on at home, I've done: - Hot reloading via a DLL -

Re: D scripting in D

2017-06-02 Thread Stefan Koch via Digitalmars-d-learn
On Friday, 2 June 2017 at 17:50:30 UTC, H. S. Teoh wrote: On Fri, Jun 02, 2017 at 05:22:20PM +, Stefan Koch via Digitalmars-d-learn wrote: On Friday, 2 June 2017 at 16:13:03 UTC, Laeeth Isharc wrote: > [...] No there is not. First it's woefully incomplete and secondly it's tightly bound t

Re: D scripting in D

2017-06-02 Thread Laeeth Isharc via Digitalmars-d-learn
On Friday, 2 June 2017 at 17:22:20 UTC, Stefan Koch wrote: On Friday, 2 June 2017 at 16:13:03 UTC, Laeeth Isharc wrote: On Friday, 2 June 2017 at 02:06:27 UTC, Mike B Johnson wrote: [...] Stefan Koch has written a good part of an interpreter for D AST, no? And I guess the lexing and parsing

Re: D scripting in D

2017-06-02 Thread H. S. Teoh via Digitalmars-d-learn
On Fri, Jun 02, 2017 at 05:22:20PM +, Stefan Koch via Digitalmars-d-learn wrote: > On Friday, 2 June 2017 at 16:13:03 UTC, Laeeth Isharc wrote: > > On Friday, 2 June 2017 at 02:06:27 UTC, Mike B Johnson wrote: > > > [...] > > > > Stefan Koch has written a good part of an interpreter for D AST

Re: D scripting in D

2017-06-02 Thread Stefan Koch via Digitalmars-d-learn
On Friday, 2 June 2017 at 16:13:03 UTC, Laeeth Isharc wrote: On Friday, 2 June 2017 at 02:06:27 UTC, Mike B Johnson wrote: [...] Stefan Koch has written a good part of an interpreter for D AST, no? And I guess the lexing and parsing stage doesn't take so long, whereas not having to link save

Re: D scripting in D

2017-06-02 Thread Laeeth Isharc via Digitalmars-d-learn
On Friday, 2 June 2017 at 02:06:27 UTC, Mike B Johnson wrote: I wonder if it is possible to somehow turn D in to a scripting language that can be run inside D? The point? To have the same uniform syntax for quickly developing scripts that can then be easily transferred, if desired, in to a co

Re: D scripting in D

2017-06-02 Thread Lewis via Digitalmars-d-learn
On Friday, 2 June 2017 at 02:06:27 UTC, Mike B Johnson wrote: I wonder if it is possible to somehow turn D in to a scripting language that can be run inside D? On a game project I'm working on at home, I've done: - Hot reloading via a DLL - A build script that runs in the background, detects f

Re: D scripting in D

2017-06-02 Thread jmh530 via Digitalmars-d-learn
On Friday, 2 June 2017 at 02:06:27 UTC, Mike B Johnson wrote: I wonder if it is possible to somehow turn D in to a scripting language that can be run inside D? The point? To have the same uniform syntax for quickly developing scripts that can then be easily transferred, if desired, in to a co

Re: D scripting in D

2017-06-02 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 2 June 2017 at 09:39:51 UTC, Russel Winder wrote: With D and Go, both of which claim compilation so fast you do not notice: 1. Edit 2. run rdmd Especially if you only expose to the "script" in D the same functions you'd expose to, say, a javascript script, that compile can be und

Re: D scripting in D

2017-06-02 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 2 June 2017 at 04:50:00 UTC, Mike B Johnson wrote: 4. Passing of the hosting D app's context. this could be pretty hard to get right? You'd ideally access the data through functions and shared value types instead of loading it directly. Then you can easily do it with shared libs or

Re: D scripting in D

2017-06-02 Thread Russel Winder via Digitalmars-d-learn
On Fri, 2017-06-02 at 02:39 +, Stefan Koch via Digitalmars-d-learn wrote: > […] > The D compiler is fast enough that it will not break your flow. > This argument may work for you but it definitely doesn't work for me. Using a language like Python, Groovy, Clojure, Lisp: 1. Edit 2. Run With

Re: D scripting in D

2017-06-01 Thread Mike B Johnson via Digitalmars-d-learn
On Friday, 2 June 2017 at 03:33:37 UTC, Adam D. Ruppe wrote: On Friday, 2 June 2017 at 02:32:43 UTC, Mike B Johnson wrote: But it would be nice if a D had a scripting language that used the same D syntax as this would make porting a piece of cake. So my script.d has kinda similar syntax, but

Re: D scripting in D

2017-06-01 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 2 June 2017 at 02:32:43 UTC, Mike B Johnson wrote: But it would be nice if a D had a scripting language that used the same D syntax as this would make porting a piece of cake. So my script.d has kinda similar syntax, but fairly different semantics than good D code (though my jsvar.

Re: D scripting in D

2017-06-01 Thread Mike B Johnson via Digitalmars-d-learn
On Friday, 2 June 2017 at 02:39:47 UTC, Stefan Koch wrote: On Friday, 2 June 2017 at 02:32:43 UTC, Mike B Johnson wrote: 1. change test12.wav to test123.wav 2. save file 3. recompile. 4. run 5. Get back to same test point(could be a lot or a little amount of work). If that is all you want; th

Re: D scripting in D

2017-06-01 Thread Stefan Koch via Digitalmars-d-learn
On Friday, 2 June 2017 at 02:32:43 UTC, Mike B Johnson wrote: 1. change test12.wav to test123.wav 2. save file 3. recompile. 4. run 5. Get back to same test point(could be a lot or a little amount of work). If that is all you want; then compile your code into a dll/so and load the new version

Re: D scripting in D

2017-06-01 Thread Mike B Johnson via Digitalmars-d-learn
On Friday, 2 June 2017 at 02:15:27 UTC, Adam D. Ruppe wrote: On Friday, 2 June 2017 at 02:06:27 UTC, Mike B Johnson wrote: I wonder if it is possible to somehow turn D in to a scripting language that can be run inside D? Why not just use regular compiled D? Because it requires one to recomp

Re: D scripting in D

2017-06-01 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 2 June 2017 at 02:06:27 UTC, Mike B Johnson wrote: I wonder if it is possible to somehow turn D in to a scripting language that can be run inside D? Why not just use regular compiled D?