Re: D to Javascript converter (a hacked up dmd)

2012-02-29 Thread Robert Clipsham
On 29/02/2012 03:11, Adam D. Ruppe wrote: On Wednesday, 29 February 2012 at 02:42:38 UTC, Piotr Szturmaj wrote: 44 KB - that's not bad! It actually gets better: 9kb if you trim the mangled names down to size (I've written a mangle name trimmer and an unused function cutter; hello world is

Re: D to Javascript converter (a hacked up dmd)

2012-02-29 Thread Adam D. Ruppe
On Wednesday, 29 February 2012 at 09:27:53 UTC, Robert Clipsham wrote: Pretty impressive! It did spit out 86 warnings though... A lot of it is probably the same kind of thing my linker does. (I call it that, but it doesn't actually *link* anything.) I get down to 6 KB running it through that.

Re: D to Javascript converter (a hacked up dmd)

2012-02-29 Thread Adam D. Ruppe
I found the std.algorithm problem. I skipped outputting templated structs because it crashes my compiler. For some reason. microd.d(130): Error: variable t forward declaration Segmentation fault. Poo. Function templates work fine, though.

Mono-D 0.3.0

2012-02-29 Thread alex
A couple of new completion features + several bugfixes - [Internal] Refactored and re-organized code structures, hopefully easier to maintain understand; Removal of unnecessary code - [Resolver] Implemented selective imports scoped importing - [Resolver] Foreach iterator resolution

Re: D to Javascript converter (a hacked up dmd)

2012-02-29 Thread Bystroushaak
Daniel Murphy's microd fork of dmd, meant to output C Link please.

Re: Mono-D 0.3.0

2012-02-29 Thread Nick Sabalausky
alex i...@alexanderbothe.com wrote in message news:ruxkzdvwiaugvazsf...@forum.dlang.org... A couple of new completion features + several bugfixes - [Internal] Refactored and re-organized code structures, hopefully easier to maintain understand; Removal of unnecessary code - [Resolver]

Re: Mono-D 0.3.0

2012-02-29 Thread Andrea Fontana
Keep up the good work! Il giorno mer, 29/02/2012 alle 17.21 +0100, alex ha scritto: A couple of new completion features + several bugfixes - [Internal] Refactored and re-organized code structures, hopefully easier to maintain understand; Removal of unnecessary code - [Resolver]

Re: D to Javascript converter (a hacked up dmd)

2012-02-29 Thread Robert Clipsham
On 29/02/2012 16:56, Bystroushaak wrote: Daniel Murphy's microd fork of dmd, meant to output C Link please. https://github.com/yebblies/dmd/tree/microd -- Robert http://octarineparrot.com/

Re: Mono-D 0.3.0

2012-02-29 Thread Andrei Alexandrescu
On 2/29/12 10:21 AM, alex wrote: A couple of new completion features + several bugfixes - [Internal] Refactored and re-organized code structures, hopefully easier to maintain understand; Removal of unnecessary code - [Resolver] Implemented selective imports scoped importing - [Resolver]

Re: D to Javascript converter (a hacked up dmd)

2012-02-29 Thread Andrei Alexandrescu
On 2/26/12 9:51 PM, Adam D. Ruppe wrote: https://github.com/downloads/adamdruppe/dtojs/dtojs.zip [snip] That's interesting. So the idea is to make an entire subset of D convertible to Javascript? What use cases do you have in mind? Andrei

Re: D to Javascript converter (a hacked up dmd)

2012-02-29 Thread Alex Rønne Petersen
On 29-02-2012 18:32, Andrei Alexandrescu wrote: On 2/26/12 9:51 PM, Adam D. Ruppe wrote: https://github.com/downloads/adamdruppe/dtojs/dtojs.zip [snip] That's interesting. So the idea is to make an entire subset of D convertible to Javascript? What use cases do you have in mind? Andrei

Re: D to Javascript converter (a hacked up dmd)

2012-02-29 Thread Adam D. Ruppe
On Wednesday, 29 February 2012 at 15:46:40 UTC, Adam D. Ruppe wrote: microd.d(130): Error: variable t forward declaration Segmentation fault. And that's fixed... and handling if(__ctfe)... and boom! It worked. Generated 70 KB of javascript though, a lot of it is obvious garbage - global

Re: D to Javascript converter (a hacked up dmd)

2012-02-29 Thread Adam D. Ruppe
On Wednesday, 29 February 2012 at 17:32:42 UTC, Andrei Alexandrescu wrote: So the idea is to make an entire subset of D convertible to Javascript? What use cases do you have in mind? Andrei

Re: TDPL monthly sales at 12-month high

2012-02-29 Thread Andrei Alexandrescu
On 2/28/12 2:19 PM, deadalnix wrote: Is that by contract or because you don't know/want to tell numbers ? Some of both. Sales information is traditionally guarded closely and only disclosed on terrific numbers (e.g. one million readers etc). Also, I don't have data outside Amazon, and on

Re: Mono-D 0.3.0

2012-02-29 Thread Piotr Szturmaj
alex wrote: A couple of new completion features + several bugfixes - [Internal] Refactored and re-organized code structures, hopefully easier to maintain understand; Removal of unnecessary code - [Resolver] Implemented selective imports scoped importing - [Resolver] Foreach iterator

Re: D to Javascript converter (a hacked up dmd)

2012-02-29 Thread Adam D. Ruppe
Sorry if I sent twice, it is so easy to hit the wrong button on things. On Wednesday, 29 February 2012 at 17:32:42 UTC, Andrei Alexandrescu wrote: So the idea is to make an entire subset of D convertible to Javascript? Yeah, and I'm pretty much there - I just built a little sort program with

Re: D to Javascript converter (a hacked up dmd)

2012-02-29 Thread Bystroushaak
Thx. On 29.2.2012 18:03, Robert Clipsham wrote: On 29/02/2012 16:56, Bystroushaak wrote: Daniel Murphy's microd fork of dmd, meant to output C Link please. https://github.com/yebblies/dmd/tree/microd

Re: D to Javascript converter (a hacked up dmd)

2012-02-29 Thread Dmitry Olshansky
On 29.02.2012 21:58, Adam D. Ruppe wrote: [...] 4) This is an insane idea, but one that came to mind. I'm testing this by piping the generated JS into dmdscript. dmd runs insanely fast when compiling this code. Phobos is kinda slow to compile, but you don't have to use it here. Write D1 style

Re: D to Javascript converter (a hacked up dmd)

2012-02-29 Thread Dmitry Olshansky
On 29.02.2012 23:40, Adam D. Ruppe wrote: On Wednesday, 29 February 2012 at 19:10:27 UTC, Dmitry Olshansky wrote: If you are serious about dmd I would recommend it, as I've spent weeks to figure out proper try/catch/finally implementation and fix closures that were broken. Indeed, I still

Re: D to Javascript converter (a hacked up dmd)

2012-02-29 Thread Adam D. Ruppe
I probably should have been working today but instead spent a good amount of time on this again. New zip: https://github.com/downloads/adamdruppe/dtojs/dtojs-0.3.zip (I haven't cleaned up the github fork yet) To give you an idea of what is working, check out my tests.d file:

Re: D to Javascript converter (a hacked up dmd)

2012-02-29 Thread Jacob Carlborg
On 2012-03-01 06:20, Adam D. Ruppe wrote: I probably should have been working today but instead spent a good amount of time on this again. BTW, how do you fit D's class based object model in JavaScript's prototype based object model? -- /Jacob Carlborg

Re: D to Javascript converter (a hacked up dmd)

2012-02-29 Thread Mikael Lindsten
2012/2/29 Adam D. Ruppe destructiona...@gmail.com 4) This is an insane idea, but one that came to mind. I'm testing this by piping the generated JS into dmdscript. dmd runs insanely fast when compiling this code. Phobos is kinda slow to compile, but you don't have to use it here. Write D1