Re: Just a reminder, I'll be at GOTO next week!

2012-10-02 Thread Paulo Pinto

On Friday, 28 September 2012 at 16:07:51 UTC, deadalnix wrote:

Le 28/09/2012 07:43, Walter Bright a écrit :

talking about Component Programming in D on Oct. 2.

http://gotocon.com/aarhus-2012/schedule/tuesday.jsp

See you there! (use promotion code brig1000 when registering 
and you'll

get a discount)


I couldn't come. But Aarhus is a really nice city. It has the 
most horrible city hall ever built, but otherwise this is 
beautiful.


Been there once, visiting some friends at the university, they 
used to complain that the city is quite boring to live on, at 
least as a student.


Re: Just a reminder, I'll be at GOTO next week!

2012-10-02 Thread Paulo Pinto

On Tuesday, 2 October 2012 at 09:22:12 UTC, Jonas Drewsen wrote:

On Tuesday, 2 October 2012 at 06:24:13 UTC, Paulo Pinto wrote:

On Friday, 28 September 2012 at 16:07:51 UTC, deadalnix wrote:

Le 28/09/2012 07:43, Walter Bright a écrit :

talking about Component Programming in D on Oct. 2.

http://gotocon.com/aarhus-2012/schedule/tuesday.jsp

See you there! (use promotion code brig1000 when registering 
and you'll

get a discount)


I couldn't come. But Aarhus is a really nice city. It has the 
most horrible city hall ever built, but otherwise this is 
beautiful.


Been there once, visiting some friends at the university, they 
used to complain that the city is quite boring to live on, at 
least as a student.


Go to Copenhagen instead - I'll buy you a beer and talk some D. 
That goes for Walter as well ;)


/Jonas


Thanks. Next time I'm in Denmark. After all I'm living in a 
neighbor country, in Düsseldorf. :)


Copenhagen is quite nice actually. I also did visit it during the 
same trip.


--
Paulo




Released vibe.d 0.7.8 and improved online API documentation

2012-10-02 Thread Sönke Ludwig
The new version adds support for UDP sockets and a lot of smaller
improvements and fixes, for example in the Diet parser and the REST
interface generator (see http://vibed.org/blog/posts/vibe-release-0.7.8
for details). Thanks for all contributions!

I've also done some improvements to the API documentation*, which is
generated from DMDs JSON output (with some additional processing). The
documentation has full cross-linking for types. I'm planning to break
this out into a separate project with support for offline documentation
generation.

It should be noted that the documentation processor contains a crude D
type parser, because the types in DMD's JSON always come out
stringified. This is necessary to get the type links and some other
things working - getting an additional detailed type AST in the original
JSON would be very helpful here (and much more robust).

Sönke

* http://vibed.org/api/


Re: Released vibe.d 0.7.8 and improved online API documentation

2012-10-02 Thread Lubos Pintes

Hi,
I am very new to this, but cannot compile/run this under Windows 7 
64-bit. I tried to run an http_example with this result:


c:\vibe\bin\..\source\vibe\vpm\dependency.d(117): Error: undefined 
identifier HEAD
c:\vibe\bin\..\source\vibe\vpm\dependency.d(117): Error: constructor 
vibe.vpm.dependency.Version.this (string vers) is not callable using 
argument types (_error_)
'C:\Users\pintes\AppData\Local\Temp\.rdmd\source\vibe.cmd' is not 
recognized as an internal or external command,

operable program or batch file.

Dňa 2. 10. 2012 18:31 Sönke Ludwig  wrote / napísal(a):

The new version adds support for UDP sockets and a lot of smaller
improvements and fixes, for example in the Diet parser and the REST
interface generator (see http://vibed.org/blog/posts/vibe-release-0.7.8
for details). Thanks for all contributions!

I've also done some improvements to the API documentation*, which is
generated from DMDs JSON output (with some additional processing). The
documentation has full cross-linking for types. I'm planning to break
this out into a separate project with support for offline documentation
generation.

It should be noted that the documentation processor contains a crude D
type parser, because the types in DMD's JSON always come out
stringified. This is necessary to get the type links and some other
things working - getting an additional detailed type AST in the original
JSON would be very helpful here (and much more robust).

Sönke

* http://vibed.org/api/





Re: Released vibe.d 0.7.8 and improved online API documentation

2012-10-02 Thread Sönke Ludwig
Am 10/2/2012 8:26 PM, schrieb Lubos Pintes:
 Hi,
 I am very new to this, but cannot compile/run this under Windows 7
 64-bit. I tried to run an http_example with this result:
 

Sorry, I think you checked out a bad commit on master. We just made some
changes to the VPM system. Should compile again now.


Re: Component Programming in D

2012-10-02 Thread Rene Zwanenburg

On Tuesday, 2 October 2012 at 21:51:45 UTC, Rene Zwanenburg wrote:
On Tuesday, 2 October 2012 at 21:27:42 UTC, Andrei Alexandrescu 
wrote:

http://www.reddit.com/r/programming/comments/10u6sk/component_programming_in_d/

Andrei


John D. Cook mentions Walter's talk in his blog post at
http://www.johndcook.com/blog/2012/10/02/pipelines-and-whirlpools/comment-page-1/#comment-249100

I've posted a link to this article in the comments, but it's 
awaiting moderation.


Oops, link should of course be
http://www.johndcook.com/blog/2012/10/02/pipelines-and-whirlpools/


Re: Component Programming in D

2012-10-02 Thread Paulo Pinto
On Tuesday, 2 October 2012 at 21:27:42 UTC, Andrei Alexandrescu 
wrote:

http://www.reddit.com/r/programming/comments/10u6sk/component_programming_in_d/

Andrei


Nice article!


Re: Component Programming in D

2012-10-02 Thread Andrej Mitrovic
On 10/2/12, Rene Zwanenburg renezwanenb...@gmail.com wrote:
 John D. Cook mentions Walter's talk in his blog post at
 http://www.johndcook.com/blog/2012/10/02/pipelines-and-whirlpools/comment-page-1/#comment-249100

He also mentions there might be a video coming up of the event. If
that's true, yay!

Nice article, too!


Re: Component Programming in D

2012-10-02 Thread Andrei Alexandrescu

On 10/2/12 6:14 PM, Paulo Pinto wrote:

On Tuesday, 2 October 2012 at 21:27:42 UTC, Andrei Alexandrescu wrote:

http://www.reddit.com/r/programming/comments/10u6sk/component_programming_in_d/


Andrei


Nice article!


I liked it the most of all I've read from Walter.

Andrei


Re: Component Programming in D

2012-10-02 Thread deadalnix

Le 03/10/2012 00:45, Andrei Alexandrescu a écrit :

On 10/2/12 6:14 PM, Paulo Pinto wrote:

On Tuesday, 2 October 2012 at 21:27:42 UTC, Andrei Alexandrescu wrote:

http://www.reddit.com/r/programming/comments/10u6sk/component_programming_in_d/



Andrei


Nice article!


I liked it the most of all I've read from Walter.

Andrei


Same here, this article is shared and loved as it must be !


Re: Just a reminder, I'll be at GOTO next week!

2012-10-02 Thread Nick Sabalausky
On Tue, 02 Oct 2012 08:24:27 +0200
Paulo Pinto pj...@progtools.org wrote:
 
 Been there once, visiting some friends at the university, they 
 used to complain that the city is quite boring to live on, at 
 least as a student.

Students will say that about any city. It's the standard college excuse
for getting drunk every day. Ask them what they'd like to have in the
city and it's always I dunno



Re: Component Programming in D

2012-10-02 Thread Nick Sabalausky
On Tue, 02 Oct 2012 17:27:55 -0400
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote:

 http://www.reddit.com/r/programming/comments/10u6sk/component_programming_in_d/
 

Excellent article!



Re: Component Programming in D

2012-10-02 Thread Jonathan M Davis
On Tuesday, October 02, 2012 17:27:55 Andrei Alexandrescu wrote:
 http://www.reddit.com/r/programming/comments/10u6sk/component_programming_in
 _d/

It's definitely the sort of article that we've needed to show what we're trying 
to do with ranges.

- Jonathan M Davis


Re: Component Programming in D

2012-10-02 Thread ixid
On Tuesday, 2 October 2012 at 21:27:42 UTC, Andrei Alexandrescu 
wrote:

http://www.reddit.com/r/programming/comments/10u6sk/component_programming_in_d/

Andrei


The article contains a bug due to the pernicious behaviour of 
seedless reduce.


This section:

Just to show how flexible algorithms can be, reduce can also 
compute multiple values with one pass through the data (which is 
pretty useful for streaming data and would be expensive to save 
for a second pass through it). Multiple lambdas produce a tuple 
result, here the sum and sum of squares is computed:


int[] arr = [1,2,3,4,5];
auto r = arr.reduce!((a,b) = a + b, (a,b) = a + b * b);
writefln(sum = %s, sum of squares = %s, r[0], r[1]);
Which prints: sum = 15, sum of squares = 55

That is the correct answer for the squares but only because 1*1 
is 1. The first element of a seedless reduce does not have any 
operation carried out on it.


If we change the array to [2,2,2,2,2] we would expect the squares 
sum to be 20. It's 18 because the seed element at arr[0] has no 
operation carried out on it.


Re: Component Programming in D

2012-10-02 Thread Nick Sabalausky
On Wed, 03 Oct 2012 03:05:08 +0200
Jonathan M Davis jmdavisp...@gmx.com wrote:

 On Tuesday, October 02, 2012 17:27:55 Andrei Alexandrescu wrote:
  http://www.reddit.com/r/programming/comments/10u6sk/component_programming_in
  _d/
 
 It's definitely the sort of article that we've needed to show what
 we're trying to do with ranges.
 

Yes, and also why a lot of D's features, esp its metaprogramming
features, are so significant. And why most other languages, including
dynamic languages, don't even come close.

I think I'm starting to get a sense of the next big step, though. There
are other misc improvements I'd like to see, but I think the biggest
weakness our range approach faces now (even as far ahead as we are) is
the effort and, arguably, boilerplate to actually create the ranges.

Especially input/forward ranges: It's pretty well known and accepted
(esp. to those who have created input/forward ranges) that the easiest
way to make a generator is with a straight imperative function. But
ranges turn the whole logic inside-out. Walking a tree can get
particularly convoluted.

So I think the next *big* step from here, in D3 or some other D-derived
language, would be easing the creation of ranges. For example, a
special low-boilerplate syntax for creating bidirectional and
random-access ranges. Or for input (or maybe even forward) ranges, a
C#-style compile-time transformation of a generator function into a
range (With input ranges, you can technically get around needing source
transformation right now in D2 using fibers, but that has too
much runtime overhead to be used as a general solution).



Re: Component Programming in D

2012-10-02 Thread ixid
On Tuesday, 2 October 2012 at 21:27:42 UTC, Andrei Alexandrescu 
wrote:

http://www.reddit.com/r/programming/comments/10u6sk/component_programming_in_d/

Andrei


The article contains a bug due to the pernicious behaviour of 
seedless reduce.


This section:

Just to show how flexible algorithms can be, reduce can also 
compute multiple values with one pass through the data (which is 
pretty useful for streaming data and would be expensive to save 
for a second pass through it). Multiple lambdas produce a tuple 
result, here the sum and sum of squares is computed:


int[] arr = [1,2,3,4,5];
auto r = arr.reduce!((a,b) = a + b, (a,b) = a + b * b);
writefln(sum = %s, sum of squares = %s, r[0], r[1]);

Which prints: sum = 15, sum of squares = 55

That is the correct answer for the squares sum but only because 
1*1 is 1, what it's really doing here is 1 + (2 * 2) + (3 * 3) + 
(4 * 4) + (5 * 5) which happens to work in this case and for a + 
b and a - b but is otherwise broken. The first element of a 
seedless reduce does not have any operation carried out on it.


If we change the array to [2,2,2,2,2] we would expect the squares 
sum to be 20. It's 18 because the seed element at arr[0] has no 
operation carried out on it other than the addition of the other 
elements to it.