[beginner] Why nothing is printed to stdout ?

2011-10-30 Thread Frédéric Galusik
Hi, Can someone give me a clue on why nothing is printed to stdout ? I wish a list of files with their size. code: // import std.stdio; import std.file; void main(string[] args) { foreach (DirEntry e; dirEntries(., SpanMode.shallow)) { writeln(e.name, \t, e.size); } } //

std.container ranges

2011-10-30 Thread Max Wolter
Hello there. I seem to be having problems wrapping my head around how to use the ranges in the context of containers in phobos. Specifically, I can't seem to figure out how to remove an element from a linked list. foreach(cell; organism) { if(cell.x == x cell.y

Re: [beginner] Why nothing is printed to stdout ?

2011-10-30 Thread simendsjo
On 30.10.2011 11:00, Frédéric Galusik wrote: Hi, Can someone give me a clue on why nothing is printed to stdout ? I wish a list of files with their size. code: // import std.stdio; import std.file; void main(string[] args) { foreach (DirEntry e; dirEntries(., SpanMode.shallow)) {

Re: [beginner] Why nothing is printed to stdout ?

2011-10-30 Thread Frédéric Galusik
Le Sun, 30 Oct 2011 12:17:24 +0100, simendsjo a écrit : Works for me on 2.055 and 2.056 on windows. What compiler and OS are you using? c:\tempdmd -w test.d c:\temptest|more .\.a.d.un~ 5326 .\.asciidoc_user-guide.txt.un~ 942 (...) Tested with dmd 2.055 and now 2.056 on Linux ++

Re: [beginner] Why nothing is printed to stdout ?

2011-10-30 Thread Jesse Phillips
On Sun, 30 Oct 2011 10:00:21 +, Frédéric Galusik wrote: Hi, Can someone give me a clue on why nothing is printed to stdout ? I wish a list of files with their size. code: // import std.stdio; import std.file; void main(string[] args) { foreach (DirEntry e; dirEntries(.,

Re: std.container ranges

2011-10-30 Thread Jonathan M Davis
On Sunday, October 30, 2011 11:38:30 Max Wolter wrote: Hello there. I seem to be having problems wrapping my head around how to use the ranges in the context of containers in phobos. Specifically, I can't seem to figure out how to remove an element from a linked list.

Re: template expressions in C++ to an equivalent in D

2011-10-30 Thread Trass3r
I was thinking about porting http://eigen.tuxfamily.org/index.php in D. Don't we have a LinAlg library now thx to that GSoC project? I'm currently on SFML2 but it goes quite fast (thanks to Trass3r for porting SFML to D2 so a big part of the job is done). You're welcome.

Re: std.container ranges

2011-10-30 Thread Max Wolter
On 10/30/2011 6:45 PM, Jonathan M Davis wrote: On Sunday, October 30, 2011 11:38:30 Max Wolter wrote: Hello there. I seem to be having problems wrapping my head around how to use the ranges in the context of containers in phobos. Specifically, I can't seem to figure out how to remove an

Re: std.container ranges

2011-10-30 Thread Jonathan M Davis
On Sunday, October 30, 2011 20:53:02 Max Wolter wrote: Hello there. Thank you very much for the explanation. However, while I really liked the concept of ranges in Andrei's book and a lot of it seems intuitive and faster than using iterators, I can't shake the feeling that in this case,

Re: [beginner] Why nothing is printed to stdout ?

2011-10-30 Thread Nick Sabalausky
Frédéric Galusik fr...@salixosnospam.org wrote in message news:j8j77l$pfv$1...@digitalmars.com... Hi, Can someone give me a clue on why nothing is printed to stdout ? I wish a list of files with their size. code: // import std.stdio; import std.file; void main(string[] args) {

Re: [beginner] Why nothing is printed to stdout ?

2011-10-30 Thread Mike James
Nick Sabalausky a@a.a wrote in message news:j8kd11$25v1$1...@digitalmars.com... Frédéric Galusik fr...@salixosnospam.org wrote in message news:j8j77l$pfv$1...@digitalmars.com... Hi, Can someone give me a clue on why nothing is printed to stdout ? I wish a list of files with their size.

Re: [beginner] Why nothing is printed to stdout ?

2011-10-30 Thread Dmitry Olshansky
On 30.10.2011 14:00, Frédéric Galusik wrote: Hi, Can someone give me a clue on why nothing is printed to stdout ? I wish a list of files with their size. code: // import std.stdio; import std.file; void main(string[] args) { foreach (DirEntry e; dirEntries(., SpanMode.shallow)) {

Re: std.container ranges

2011-10-30 Thread Jonathan M Davis
On Monday, October 31, 2011 12:11:45 Mike Parker wrote: On 10/31/2011 5:28 AM, Jonathan M Davis wrote: So, in comparison to C++, there's no significant difference. Now, Java does have a remove function which will take an element and remove the first occurence of that element from a list,