Re: ASCII-ART mandelbrot running under newCTFE

2017-08-05 Thread Igor Shirkalin via Digitalmars-d

On Friday, 4 August 2017 at 22:50:03 UTC, Stefan Koch wrote:

Hey Guys,
I just trans-compiled a brainfuck mandelbrot into ctfeable D.
newCTFE is able to execute it correctly (although it takes 3.5 
minutes to do so).


The code is here
https://gist.github.com/UplinkCoder/d4e4426e6adf9434e34529e8e1f8cb47

The gist it evaluates the function at runtime since the newCTFE 
version capable of running this, is not yet available as a 
preview release.


If you want a laugh you can compile the code with ldc and -Oz 
flag set.
LLVM will detect that the function is pure and will try to 
constant-fold it.
I do not know how long this takes though since my patience is 
limited.


Cheers,
Stefan
I have interest in mandelbtott. Some day, a long time ago, when 
turbo pascal was the part of the world and EGA monitors had 
320x240x1 bytes per pixel... That time it was interesting to 
algorithm to go around the Mandelbrott set because of one theorem 
where every point of manfelbrott set has continious connection 
with any other point. If I have time I'd love to write it in D.




Re: ASCII-ART mandelbrot running under newCTFE

2017-08-05 Thread Timon Gehr via Digitalmars-d

On 05.08.2017 02:59, Johnson Jones wrote:



Any screenshots? I don't wanna have to install something I won't use but 
once or twice but would be interested in seeing what is going on since I 
used to be a fractal freak ;)


https://dpaste.dzfl.pl/d7791f4e2845


Re: ASCII-ART mandelbrot running under newCTFE

2017-08-04 Thread Stefan Koch via Digitalmars-d

On Saturday, 5 August 2017 at 01:22:46 UTC, 12345swordy wrote:

On Friday, 4 August 2017 at 22:50:03 UTC, Stefan Koch wrote:

Hey Guys,
I just trans-compiled a brainfuck mandelbrot into ctfeable D.
newCTFE is able to execute it correctly (although it takes 3.5 
minutes to do so).


You planning to do the same thing with other languages?


Other Domain-Specific-Langauges ?
Sure that is a useful application.

However if you are asking about translating non-trivial langauges 
like c++;

Frankly, there is little point in doing so.
Since non-trivial languages require non-trivial amounts of 
parsing and semantic-processing.
This would more fittingly done in a separate application rather 
then doing it at ctfe.




Re: ASCII-ART mandelbrot running under newCTFE

2017-08-04 Thread 12345swordy via Digitalmars-d

On Friday, 4 August 2017 at 22:50:03 UTC, Stefan Koch wrote:

Hey Guys,
I just trans-compiled a brainfuck mandelbrot into ctfeable D.
newCTFE is able to execute it correctly (although it takes 3.5 
minutes to do so).


The code is here
https://gist.github.com/UplinkCoder/d4e4426e6adf9434e34529e8e1f8cb47

The gist it evaluates the function at runtime since the newCTFE 
version capable of running this, is not yet available as a 
preview release.


If you want a laugh you can compile the code with ldc and -Oz 
flag set.
LLVM will detect that the function is pure and will try to 
constant-fold it.
I do not know how long this takes though since my patience is 
limited.


Cheers,
Stefan


You planning to do the same thing with other languages?


Re: ASCII-ART mandelbrot running under newCTFE

2017-08-04 Thread Stefan Koch via Digitalmars-d

On Saturday, 5 August 2017 at 00:59:01 UTC, Johnson Jones wrote:

On Friday, 4 August 2017 at 22:50:03 UTC, Stefan Koch wrote:

[...]



Any screenshots? I don't wanna have to install something I 
won't use but once or twice but would be interested in seeing 
what is going on since I used to be a fractal freak ;)


all you need is dmd.
almost any version will do.

dmd mandelb.d
./mandelb


Re: ASCII-ART mandelbrot running under newCTFE

2017-08-04 Thread Johnson Jones via Digitalmars-d

On Friday, 4 August 2017 at 22:50:03 UTC, Stefan Koch wrote:

Hey Guys,
I just trans-compiled a brainfuck mandelbrot into ctfeable D.
newCTFE is able to execute it correctly (although it takes 3.5 
minutes to do so).


The code is here
https://gist.github.com/UplinkCoder/d4e4426e6adf9434e34529e8e1f8cb47

The gist it evaluates the function at runtime since the newCTFE 
version capable of running this, is not yet available as a 
preview release.


If you want a laugh you can compile the code with ldc and -Oz 
flag set.
LLVM will detect that the function is pure and will try to 
constant-fold it.
I do not know how long this takes though since my patience is 
limited.


Cheers,
Stefan



Any screenshots? I don't wanna have to install something I won't 
use but once or twice but would be interested in seeing what is 
going on since I used to be a fractal freak ;)





ASCII-ART mandelbrot running under newCTFE

2017-08-04 Thread Stefan Koch via Digitalmars-d

Hey Guys,
I just trans-compiled a brainfuck mandelbrot into ctfeable D.
newCTFE is able to execute it correctly (although it takes 3.5 
minutes to do so).


The code is here
https://gist.github.com/UplinkCoder/d4e4426e6adf9434e34529e8e1f8cb47

The gist it evaluates the function at runtime since the newCTFE 
version capable of running this, is not yet available as a 
preview release.


If you want a laugh you can compile the code with ldc and -Oz 
flag set.
LLVM will detect that the function is pure and will try to 
constant-fold it.
I do not know how long this takes though since my patience is 
limited.


Cheers,
Stefan