Re: dmd as a library

2022-11-09 Thread vushu via Digitalmars-d-learn
On Wednesday, 9 November 2022 at 11:45:46 UTC, Dennis wrote: On Tuesday, 8 November 2022 at 05:48:54 UTC, vushu wrote: Ah thanks that's nice to have some examples. Here's an example of tools using dmd as a library: https://github.com/jacob-carlborg/dlp Thanks, much appreciated 

Re: dmd as a library

2022-11-09 Thread Dennis via Digitalmars-d-learn
On Tuesday, 8 November 2022 at 05:48:54 UTC, vushu wrote: Ah thanks that's nice to have some examples. Here's an example of tools using dmd as a library: https://github.com/jacob-carlborg/dlp

Re: dmd as a library

2022-11-07 Thread vushu via Digitalmars-d-learn
On Tuesday, 8 November 2022 at 06:35:43 UTC, Mike Parker wrote: On Tuesday, 8 November 2022 at 06:21:11 UTC, vushu wrote: So I do feel, that I am in need for some learning materials or guidance. You might find Lucian Danescu's DConf '22 presentation helpful: https://youtu.be/JYkb3PjIn4c

Re: dmd as a library

2022-11-07 Thread Mike Parker via Digitalmars-d-learn
On Tuesday, 8 November 2022 at 06:21:11 UTC, vushu wrote: So I do feel, that I am in need for some learning materials or guidance. You might find Lucian Danescu's DConf '22 presentation helpful: https://youtu.be/JYkb3PjIn4c

Re: dmd as a library

2022-11-07 Thread vushu via Digitalmars-d-learn
On Tuesday, 8 November 2022 at 02:55:34 UTC, max haughton wrote: On Tuesday, 8 November 2022 at 00:05:18 UTC, vushu wrote: Any where to find learning material for using dmd as a library? thanks. What do you want to do with it. Im trying to understand the idiomatic way of using visitors

Re: dmd as a library

2022-11-07 Thread vushu via Digitalmars-d-learn
On Tuesday, 8 November 2022 at 03:11:15 UTC, Tejas wrote: On Tuesday, 8 November 2022 at 00:05:18 UTC, vushu wrote: Any where to find learning material for using dmd as a library? thanks. https://github.com/Superbelko/dmdlib-notes This is the only resource I know of Ah thanks that's nice

Re: dmd as a library

2022-11-07 Thread Tejas via Digitalmars-d-learn
On Tuesday, 8 November 2022 at 00:05:18 UTC, vushu wrote: Any where to find learning material for using dmd as a library? thanks. https://github.com/Superbelko/dmdlib-notes This is the only resource I know of

Re: dmd as a library

2022-11-07 Thread max haughton via Digitalmars-d-learn
On Tuesday, 8 November 2022 at 00:05:18 UTC, vushu wrote: Any where to find learning material for using dmd as a library? thanks. What do you want to do with it.

dmd as a library

2022-11-07 Thread vushu via Digitalmars-d-learn
Any where to find learning material for using dmd as a library? thanks.

Re: Is it possible to use DMD as a library to compile strings at runtime?

2020-02-10 Thread Basile B. via Digitalmars-d-learn
On Monday, 10 February 2020 at 12:31:03 UTC, Basile B. wrote: On Friday, 31 January 2020 at 14:25:30 UTC, Basile B. wrote: [...] about [1] (llvm) I've made a better binding this weekend: https://gitlab.com/basile.b/llvmd-d Seriouly I cant believe that at some point in the past I translated

Re: Is it possible to use DMD as a library to compile strings at runtime?

2020-02-10 Thread Basile B. via Digitalmars-d-learn
On Friday, 31 January 2020 at 14:25:30 UTC, Basile B. wrote: On Friday, 31 January 2020 at 11:19:37 UTC, Saurabh Das wrote: I see that DUB has DMD as a library package, but I was not able to understand how to use it. Is it possible to use DMD as a library within a D program to compile

Re: Is it possible to use DMD as a library to compile strings at runtime?

2020-02-03 Thread Saurabh Das via Digitalmars-d-learn
On Sunday, 2 February 2020 at 06:03:01 UTC, H. S. Teoh wrote: On Sun, Feb 02, 2020 at 03:16:46AM +, Saurabh Das via Digitalmars-d-learn wrote: [...] [...] > [...] [...] [...] [...] It's very simple. Let's say you have your code in some string called 'code'. Since dmd nowadays can

Re: Is it possible to use DMD as a library to compile strings at runtime?

2020-02-01 Thread H. S. Teoh via Digitalmars-d-learn
On Sun, Feb 02, 2020 at 03:16:46AM +, Saurabh Das via Digitalmars-d-learn wrote: > On Saturday, 1 February 2020 at 20:37:03 UTC, H. S. Teoh wrote: [...] > > I've actually done this before in an equation grapher program: the > > user inputs an equation, the program generates D code to compute

Re: Is it possible to use DMD as a library to compile strings at runtime?

2020-02-01 Thread Saurabh Das via Digitalmars-d-learn
On Saturday, 1 February 2020 at 20:37:03 UTC, H. S. Teoh wrote: On Sat, Feb 01, 2020 at 08:01:34PM +, Andre Pany via Digitalmars-d-learn wrote: [...] Another approach: - include the dmd compiler package with your application - within your app call the compiler executable and compile the

Re: Is it possible to use DMD as a library to compile strings at runtime?

2020-02-01 Thread H. S. Teoh via Digitalmars-d-learn
On Sat, Feb 01, 2020 at 08:01:34PM +, Andre Pany via Digitalmars-d-learn wrote: [...] > Another approach: > - include the dmd compiler package with your application > - within your app call the compiler executable and compile the source > code to a dll / so > - call the dll / so function

Re: Is it possible to use DMD as a library to compile strings at runtime?

2020-02-01 Thread Andre Pany via Digitalmars-d-learn
On Friday, 31 January 2020 at 11:19:37 UTC, Saurabh Das wrote: I see that DUB has DMD as a library package, but I was not able to understand how to use it. Is it possible to use DMD as a library within a D program to compile a string to machine code and run the compiled code at runtime

Re: Is it possible to use DMD as a library to compile strings at runtime?

2020-01-31 Thread Saurabh Das via Digitalmars-d-learn
On Friday, 31 January 2020 at 14:25:30 UTC, Basile B. wrote: On Friday, 31 January 2020 at 11:19:37 UTC, Saurabh Das wrote: [...] Fundamentally DMD as a library is a front-end. Jitting is to the backend side. You'll be able to lex and parse the source to get an AST, to perform the semantic

Re: Is it possible to use DMD as a library to compile strings at runtime?

2020-01-31 Thread Basile B. via Digitalmars-d-learn
On Friday, 31 January 2020 at 11:19:37 UTC, Saurabh Das wrote: I see that DUB has DMD as a library package, but I was not able to understand how to use it. Is it possible to use DMD as a library within a D program to compile a string to machine code and run the compiled code at runtime

Is it possible to use DMD as a library to compile strings at runtime?

2020-01-31 Thread Saurabh Das via Digitalmars-d-learn
I see that DUB has DMD as a library package, but I was not able to understand how to use it. Is it possible to use DMD as a library within a D program to compile a string to machine code and run the compiled code at runtime? Thanks, Saurabh

Re: A DUB Case Study: Compiling DMD as a Library

2017-12-21 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-12-21 05:12, Venkat wrote: I did a fresh clone of dmd and added that as a dependency. That fixed it. Should've thought of it !! Thankyou. Great that it works :) -- /Jacob Carlborg

Re: A DUB Case Study: Compiling DMD as a Library

2017-12-20 Thread Venkat via Digitalmars-d-learn
I did a fresh clone of dmd and added that as a dependency. That fixed it. Should've thought of it !! Thankyou.

Re: A DUB Case Study: Compiling DMD as a Library

2017-12-20 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-12-20 05:52, Venkat wrote: This is regarding the latest D blog post. Jacob Carlborg is here, so I figured I'd post it. https://dlang.org/blog/2017/08/01/a-dub-case-study-compiling-dmd-as-a-library/#comment-2922 Simply changing the targetType from library to dynamicLibrary breaks

Re: A DUB Case Study: Compiling DMD as a Library

2017-12-19 Thread Venkat via Digitalmars-d-learn
This is regarding the latest D blog post. Jacob Carlborg is here, so I figured I'd post it. https://dlang.org/blog/2017/08/01/a-dub-case-study-compiling-dmd-as-a-library/#comment-2922 Simply changing the targetType from library to dynamicLibrary breaks the code. What is going