digitalmars.D.learn - javascript or typescript
- Fred (7/7) Nov 04 2018 hi,
- Adam D. Ruppe (3/4) Nov 04 2018 Why do you need to convert it to javascript? D can serve up web
- Fred (8/12) Nov 05 2018 did you mean vibe.d?
- Laurent =?UTF-8?B?VHLDqWd1aWVy?= (4/11) Nov 05 2018 I haven't personally tried it, but there is an example of
- Fred (3/16) Nov 05 2018 ok will look at it. thanks.
- Dukc (9/22) Nov 05 2018 The example I used (thanks to Cosinuns):
- Dukc (26/33) Nov 05 2018 Let me recommend https://bridge.net/
hi, my javascript skill is bad. but i want to host some nodejs app i am aware that there is converter to js like dtojs. but it is out of date. i'd like to give d a try. is there any other converter available. a decent one.
Nov 04 2018
On Monday, 5 November 2018 at 02:51:19 UTC, Fred wrote:i'd like to give d a try.Why do you need to convert it to javascript? D can serve up web stuff by itself too.
Nov 04 2018
On Monday, 5 November 2018 at 05:07:49 UTC, Adam D. Ruppe wrote:On Monday, 5 November 2018 at 02:51:19 UTC, Fred wrote:did you mean vibe.d? but i want to use in a shared hosting environment where my options are : ruby, python, nodejs and as usual php vibe.d as standalone app will not work. i know kotlin with js support, but maybe there is another option .. thanks for your answer and insight.i'd like to give d a try.Why do you need to convert it to javascript? D can serve up web stuff by itself too.
Nov 05 2018
On Monday, 5 November 2018 at 02:51:19 UTC, Fred wrote:hi, my javascript skill is bad. but i want to host some nodejs app i am aware that there is converter to js like dtojs. but it is out of date. i'd like to give d a try. is there any other converter available. a decent one.I haven't personally tried it, but there is an example of compiling D to Javascript here : https://github.com/Ace17/dscripten
Nov 05 2018
On Monday, 5 November 2018 at 08:49:42 UTC, Laurent Tréguier wrote:On Monday, 5 November 2018 at 02:51:19 UTC, Fred wrote:ok will look at it. thanks.hi, my javascript skill is bad. but i want to host some nodejs app i am aware that there is converter to js like dtojs. but it is out of date. i'd like to give d a try. is there any other converter available. a decent one.I haven't personally tried it, but there is an example of compiling D to Javascript here : https://github.com/Ace17/dscripten
Nov 05 2018
On Monday, 5 November 2018 at 08:49:42 UTC, Laurent Tréguier wrote:On Monday, 5 November 2018 at 02:51:19 UTC, Fred wrote:The example I used (thanks to Cosinuns): https://github.com/cosinus2/dlang-emscripten-demo I'd try DScripten first, though. Without, I need to compile parts of Phobos myself to JS. Plus the Emscripten linker seemingly can't link D symbols because of some bug. I have to manually call the LLVM linker, which sometimes seems to have different ideas about what the program is calling.hi, my javascript skill is bad. but i want to host some nodejs app i am aware that there is converter to js like dtojs. but it is out of date. i'd like to give d a try. is there any other converter available. a decent one.I haven't personally tried it, but there is an example of compiling D to Javascript here : https://github.com/Ace17/dscripten
Nov 05 2018
On Monday, 5 November 2018 at 02:51:19 UTC, Fred wrote:hi, my javascript skill is bad. but i want to host some nodejs app i am aware that there is converter to js like dtojs. but it is out of date. i'd like to give d a try. is there any other converter available. a decent one.Let me recommend https://bridge.net/ using JavaScript directly. Minority of my JavaScript is also transpiled from D. If you do the same, you will need a lot more determination and know-how than normal, and you can't except to use all D features. Multithearding and GC among other features are out. You could use DScripten which will probably make D better in this regard, but still not like normal. Personally I haven't still tried DScripten because there is not much I could easily port to D. The reason for that is that D cannot call most js functions directly, because it cannot handle most JavaScript types. Except if you manage to translate Emscripten headers val.h and wire.h (which are heavily templated c++) into D. I have put some effort to that, but it's not going well. Because of the reasoms above, I don't currently recommend D as a JavaScript source for the average programmer. However, you will most likely want to make some utility programs to assist you -build scripts, mass file handling, translating configuration file formats etc. There D works very well. Also, as said, the server backend does not have to be JavaScript - only the frontend. For backend, you can use D web frameworks -vibe.d/hunt/diamond- instead.
Nov 05 2018