Jump to page: 1 2 3
Thread overview
Article: Functional image processing in D
Mar 21, 2014
Vladimir Panteleev
Mar 21, 2014
Andrea Fontana
Mar 24, 2014
finalpatch
Mar 24, 2014
ponce
Mar 21, 2014
Rikki Cattermole
Mar 21, 2014
Vladimir Panteleev
Mar 22, 2014
Rikki Cattermole
Mar 21, 2014
Atila Neves
Mar 21, 2014
bearophile
Mar 21, 2014
ponce
Mar 21, 2014
Meta
Mar 21, 2014
bearophile
Mar 21, 2014
Jakob Ovrum
Mar 21, 2014
Vladimir Panteleev
Mar 21, 2014
Jakob Ovrum
Mar 21, 2014
Vladimir Panteleev
Mar 21, 2014
Justin Whear
Mar 21, 2014
ponce
Mar 21, 2014
ponce
Mar 22, 2014
Vladimir Panteleev
Mar 22, 2014
Phil
Mar 23, 2014
Vladimir Panteleev
Mar 23, 2014
ponce
Mar 21, 2014
Walter Bright
Mar 22, 2014
Philippe Sigaud
Mar 22, 2014
Graham Fawcett
Mar 22, 2014
Philippe Sigaud
Mar 23, 2014
Vladimir Panteleev
May 24, 2014
ponce
March 21, 2014
http://blog.thecybershadow.net/2014/03/21/functional-image-processing-in-d/

Some highlights from a recent overhaul of the graphics package from my D library. It makes use of a number of D-specific language features, so I've tried to make the article accessible to people new to D as well.
March 21, 2014
Very interesting! Do you know http://www.antigrain.com/ ?

It is (was?) a very efficent c++ 2d library, heavily based on templates. Something like this in D with templates and lazy ranges should be impressive.


On Friday, 21 March 2014 at 11:04:58 UTC, Vladimir Panteleev wrote:
> http://blog.thecybershadow.net/2014/03/21/functional-image-processing-in-d/
>
> Some highlights from a recent overhaul of the graphics package from my D library. It makes use of a number of D-specific language features, so I've tried to make the article accessible to people new to D as well.

March 21, 2014
On Friday, 21 March 2014 at 11:04:58 UTC, Vladimir Panteleev wrote:
> http://blog.thecybershadow.net/2014/03/21/functional-image-processing-in-d/
>
> Some highlights from a recent overhaul of the graphics package from my D library. It makes use of a number of D-specific language features, so I've tried to make the article accessible to people new to D as well.

Are you planning on adding a font rasterizer and can it work at CTFE?
If it does both I have some neat ideas for exporting of UML diagrams.
March 21, 2014
Wow, great stuff here. If anybody else asks me "What is D good
for?" again I'll point them to this.

Atila

On Friday, 21 March 2014 at 11:04:58 UTC, Vladimir Panteleev
wrote:
> http://blog.thecybershadow.net/2014/03/21/functional-image-processing-in-d/
>
> Some highlights from a recent overhaul of the graphics package from my D library. It makes use of a number of D-specific language features, so I've tried to make the article accessible to people new to D as well.
March 21, 2014
On Friday, 21 March 2014 at 12:27:57 UTC, Rikki Cattermole wrote:
> On Friday, 21 March 2014 at 11:04:58 UTC, Vladimir Panteleev wrote:
>> http://blog.thecybershadow.net/2014/03/21/functional-image-processing-in-d/
>>
>> Some highlights from a recent overhaul of the graphics package from my D library. It makes use of a number of D-specific language features, so I've tried to make the article accessible to people new to D as well.
>
> Are you planning on adding a font rasterizer

Parsing vector font files is a big undertaking. I'd likely use a text rendering library, such as FreeType. Hardcoding a small bitmap font for ASCII only is also a possibility.

> and can it work at CTFE?

This program almost works:

string drawSmiley()
{
	import std.range;
	import std.math;

	import ae.utils.graphics.draw;
	import ae.utils.graphics.image;

	auto smiley = Image!char(20, 20);
	smiley.fill(' ');
	smiley.fillCircle(10, 10, 10, '#');
	smiley.fillCircle( 6, 6, 2, ' ');
	smiley.fillCircle(14, 6, 2, ' ');
	smiley.fillSector(10, 10, 6, 8, 0, PI, ' ');

	return smiley.h.iota.map!(y => smiley.scanline(y)).join("\n").idup;
}

pragma(msg, drawSmiley);

"almost" because fillSector calls atan2, which doesn't work in CTFE. :(

(And yeah, I totally did just declare an image with a colorspace of "char".)
March 21, 2014
Vladimir Panteleev:

> http://blog.thecybershadow.net/2014/03/21/functional-image-processing-in-d/

It looks nice. I suggest to not pack too much the code of the examples, so I suggest to put spaces around operators, etc.

It can be useful to add some benchmarks to compare its performance to equivalent regular foreach-based processing code in C/D.

Bye,
bearophile
March 21, 2014
On Friday, 21 March 2014 at 11:04:58 UTC, Vladimir Panteleev wrote:
> http://blog.thecybershadow.net/2014/03/21/functional-image-processing-in-d/
>
> Some highlights from a recent overhaul of the graphics package from my D library. It makes use of a number of D-specific language features, so I've tried to make the article accessible to people new to D as well.

This is great work and much needed.
March 21, 2014
On Friday, 21 March 2014 at 11:04:58 UTC, Vladimir Panteleev wrote:
> http://blog.thecybershadow.net/2014/03/21/functional-image-processing-in-d/
>
> Some highlights from a recent overhaul of the graphics package from my D library. It makes use of a number of D-specific language features, so I've tried to make the article accessible to people new to D as well.

That's awesome. When I see examples of some of the amazing stuff you can do with D, I wonder if D is the new Lisp. Hugely under-appreciated and immensely powerful. Now if we can just correct the former...
March 21, 2014
On 3/21/14, 4:04 AM, Vladimir Panteleev wrote:
> http://blog.thecybershadow.net/2014/03/21/functional-image-processing-in-d/
>
> Some highlights from a recent overhaul of the graphics package from my D
> library. It makes use of a number of D-specific language features, so
> I've tried to make the article accessible to people new to D as well.

Great piece. Vote up!!

http://www.reddit.com/r/programming/comments/2101ti/functional_image_processing_in_d/

https://news.ycombinator.com/newest (find the article on the page then vote)

https://www.facebook.com/dlang.org/posts/10202167415040354?stream_ref=10

https://twitter.com/D_Programming/status/447030249914519552


Andrei

March 21, 2014
Andrei Alexandrescu:

> http://www.reddit.com/r/programming/comments/2101ti/functional_image_processing_in_d/

But I have suggested some improvements of the article :-(

Bye,
bearophile
« First   ‹ Prev
1 2 3