Jump to page: 1 2 3
Thread overview
Can D be Interpreted?
Dec 26, 2013
Jeroen Bollen
Dec 26, 2013
Jernej Krempus
Dec 26, 2013
Iain Buclaw
Dec 27, 2013
Martin Nowak
Dec 27, 2013
Jacob Carlborg
Feb 11, 2014
Martin Nowak
Dec 26, 2013
thedeemon
Dec 26, 2013
Rémy Mouëza
Dec 26, 2013
bearophile
Dec 26, 2013
Manu
Dec 26, 2013
Adam D. Ruppe
Jan 01, 2014
Manu
Jan 01, 2014
David Nadlinger
Jan 06, 2014
deadalnix
Jan 06, 2014
deadalnix
Jan 06, 2014
deadalnix
Jan 01, 2014
Manu
Dec 27, 2013
Martin Nowak
Dec 27, 2013
ponce
Feb 12, 2014
Sean Kelly
December 26, 2013
Are there any programs allowing to interpret D and run it similarly to how you would run a Python application? It doesn't need to have the whole Window support, just console application using just the standard Phobos library is more than enough.
December 26, 2013
On Thu, 26 Dec 2013 18:50:25 +0000, Jeroen Bollen wrote:

> Are there any programs allowing to interpret D and run it similarly to how you would run a Python application? It doesn't need to have the whole Window support, just console application using just the standard Phobos library is more than enough.

No, there is currently no REPL for D.
December 26, 2013
On 26 December 2013 18:50, Jeroen Bollen <jbinero@gmail.com> wrote:
> Are there any programs allowing to interpret D and run it similarly to how you would run a Python application? It doesn't need to have the whole Window support, just console application using just the standard Phobos library is more than enough.

I've been tempted to implement D in Guile - which is a cool extension language platform.  Implementing D ontop of its VM would make it effectively a REPL (with one or two features missing).  But when will I ever get time to do this? Probably never. :)
December 26, 2013
On Thursday, 26 December 2013 at 18:50:27 UTC, Jeroen Bollen wrote:
> Are there any programs allowing to interpret D and run it similarly to how you would run a Python application?

If you don't mean interactively, then "rdmd prog.d" will act just as "python prog.py" or "ruby prog.rb" etc.
December 26, 2013
To execute a D source file as one would do with a Python script, you can use rdmd.
On Linux, you can make your can directly execute D source file by changing its mode (chmod u+x file.d) and adding a "shebang" first line like:
#!/usr/bin/rdmd --shebang -I/path/to/libs -L-L/path/to/libs -L-lyourLibName

Don't forget to add the "--shebang" option or your file won't be executed properly.

There also have been several projects to make a D REPL, the most recent one being dabble: https://github.com/callumenator/dabble but it only works on Windows. The principle is to compile the code one enter on the REPL line and dynamically load it.

Burton Radons had written an article on how to dynamically load some Windows executable code, if you are interested in how this works: http://members.shaw.ca/burton-radons/The%20Joy%20and%20Gibbering%20Terror%20of%20Custom-Loading%20Executables.html 


On 12/26/2013 07:50 PM, Jeroen Bollen wrote:
> Are there any programs allowing to interpret D and run it similarly to
> how you would run a Python application? It doesn't need to have the
> whole Window support, just console application using just the standard
> Phobos library is more than enough.

December 26, 2013
Rémy Mouëza:

> There also have been several projects to make a D REPL,

I'd like a good REPL in the default distributions, because it's an useful tool to speed up coding, to test and try things, it's very useful if you want to use D for exploratory coding, and it's kind of standard if you want to use a language for interactive mathematics (iPython with matPlotLib, Julia language, Mathematica, Sage, Scala etc). I'd like Walter to comment on this.

Bye,
bearophile
December 26, 2013
On 27 December 2013 06:59, bearophile <bearophileHUGS@lycos.com> wrote:

> Rémy Mouëza:
>
>
>  There also have been several projects to make a D REPL,
>>
>
> I'd like a good REPL in the default distributions, because it's an useful tool to speed up coding, to test and try things, it's very useful if you want to use D for exploratory coding, and it's kind of standard if you want to use a language for interactive mathematics (iPython with matPlotLib, Julia language, Mathematica, Sage, Scala etc). I'd like Walter to comment on this.
>

In my experience with vibe.d, it's a massive pain in the arse that it's
compiled.
It seems to me that web dev involves squillions of micro-changes and
tweaks, and it's bloody annoying to compile and reboot the server every
time.
vibe.d apps should be compiled for deployment, but a JIT option while
developing/tweaking/tuning would speed up development by about 934x.
I think that's the main hold-up for vibe.d compared to popular competition;
the iteration time is just not good, but otherwise it's awesome.


December 26, 2013
On Thursday, 26 December 2013 at 22:01:40 UTC, Manu wrote:
> In my experience with vibe.d, it's a massive pain in the arse that it's
> compiled.
> It seems to me that web dev involves squillions of micro-changes and
> tweaks, and it's bloody annoying to compile and reboot the server every
> time.
> vibe.d apps should be compiled for deployment, but a JIT option while
> developing/tweaking/tuning would speed up development by about 934x.
> I think that's the main hold-up for vibe.d compared to popular competition;
> the iteration time is just not good, but otherwise it's awesome.

Could it be workable to have a minimal server + plugins design akin to what you did with Remedy for game functionality?
December 26, 2013
On Thursday, 26 December 2013 at 23:37:07 UTC, Joseph Rushton Wakeling wrote:
> Could it be workable to have a minimal server + plugins design akin to what you did with Remedy for game functionality?

You could also just use CGI, which doesn't require any restart for changes, and can also easily enough compile and cache lazily (like or even with rdmd)
December 27, 2013
On 12/26/2013 11:01 PM, Manu wrote:
> In my experience with vibe.d, it's a massive pain in the arse that it's
> compiled.
> It seems to me that web dev involves squillions of micro-changes and
> tweaks, and it's bloody annoying to compile and reboot the server every
> time.
> vibe.d apps should be compiled for deployment, but a JIT option while
> developing/tweaking/tuning would speed up development by about 934x.
> I think that's the main hold-up for vibe.d compared to popular
> competition; the iteration time is just not good, but otherwise it's
> awesome.

If vibe.d is linked as library (instead of compiled with you app) you easily get down from 3s to 1s for compilation.
For bigger apps separate compilation would help.
Combined with inotify watches this should work out fine in the longer term.
« First   ‹ Prev
1 2 3