sgue...@rejectedsoftware.com

2015-12-12 Thread Sönke Ludwig via Digitalmars-d
import std.stdio; import std.range; import std.algorithm; void main(string[] args) { File input, output; if (args.length <= 1) input = stdin, output = stdout; else if (args.length == 3) input = File(args[1], "rt"), output = File(args[1], "wt"); else {

Voting Open For std.experimental.ndslice

2015-12-12 Thread Jack Stouffer via Digitalmars-d-announce
http://forum.dlang.org/post/yeebmehdqgqdfkzmz...@forum.dlang.org

Voting For std.experimental.ndslice

2015-12-12 Thread Jack Stouffer via Digitalmars-d
This is the voting thread to decide if the proposed addition to Phobos, std.experimental.ndslice, should be accepted. To vote, please respond to this post. You have three options: * Yes * Yes with a single condition * No If you vote "yes" you can still mention something you'd like improved,

Re: Voting For std.experimental.ndslice

2015-12-12 Thread Jack Stouffer via Digitalmars-d
On Sunday, 13 December 2015 at 05:10:17 UTC, Jack Stouffer wrote: This is the voting thread to decide if the proposed addition to Phobos, std.experimental.ndslice, should be accepted. To vote, please respond to this post. You have three options: * Yes * Yes with a single condition * No I

[Dgame] Is there Multiple Window support?

2015-12-12 Thread Jack via Digitalmars-d-learn
Hello, so I've been experimenting with the framework and I tried to implement a game that has more than two windows. The first window is the main game and the second window is a smaller one with the various commands you can select. So I tried to render sprites onto the first window and the

Re: Voting For std.experimental.ndslice

2015-12-12 Thread Ilya Yaroshenko via Digitalmars-d
On Sunday, 13 December 2015 at 05:10:17 UTC, Jack Stouffer wrote: This is the voting thread to decide if the proposed addition to Phobos, std.experimental.ndslice, should be accepted. [...] Docs fixed link:

Re: [OT] tablet programming

2015-12-12 Thread Walter Bright via Digitalmars-d-announce
On 12/12/2015 8:00 PM, Joakim wrote: This type of setup is probably the future for most people, replacing a desktop/laptop with the smartphone/tablet they already have. I've found that the hardware is more than capable, the software support is just not there yet, but all the major vendors-

Re: Voting For std.experimental.ndslice

2015-12-12 Thread Meta via Digitalmars-d
On Sunday, 13 December 2015 at 05:10:17 UTC, Jack Stouffer wrote: * The API is practically permanent once the module is accepted. Some minor changes can be made, but a full redesign is no longer an option. Is std.experimental also on the table, or directly to phobos?

[Issue 15438] New: -m64 not added to command line in DMD x64 build

2015-12-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15438 Issue ID: 15438 Summary: -m64 not added to command line in DMD x64 build Product: D Version: D2 Hardware: All OS: Windows Status: NEW Severity: normal

[OT] tablet programming

2015-12-12 Thread Joakim via Digitalmars-d-announce
On Saturday, 12 December 2015 at 08:25:21 UTC, Walter Bright wrote: On 12/11/2015 10:13 PM, Joakim wrote: Desktop Android's certainly not there yet for everybody, but it is for my admittedly low demands, and soon will be for everybody, as google has said they're working on built-in

Re: DConf 2016 news: 20% sold out, book signing

2015-12-12 Thread Walter Bright via Digitalmars-d-announce
On 12/11/2015 10:13 PM, Joakim wrote: Of course, it's all about trade-offs: I find myself surprisingly comfortable with this small 8.4" diagonal screen, others may not be. The bluetooth keyboard repeatedly loses a couple keystrokes when starting typing after a minute's break, which appears to

Re: How to check if result of request to DB is empty?

2015-12-12 Thread Suliman via Digitalmars-d-learn
it's seems that next block is execute even if is rs.next() is false: writeln("rs.next()-->", rs.next()); if(!rs.next()) //if user do not in DB { // is execute even if rs.next() is false writeln("Executed, but rs.nst was set to false"); } The output: rs.next()-->false Executed, but rs.nst was

Re: What is the utility of .stringof with expressions?

2015-12-12 Thread cym13 via Digitalmars-d
On Saturday, 12 December 2015 at 10:20:01 UTC, Shriramana Sharma wrote: D currently supports: writeln((1 + 2).stringof); to print: 1 + 2 What is the real-world use case of this "feature"? I mean, everyone knows what the code they write looks like, so why would they want to have a language

[Issue 15436] New: Compiler still refers to AliasSeq-s as "tuple"-s (and TypeTuple?)

2015-12-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15436 Issue ID: 15436 Summary: Compiler still refers to AliasSeq-s as "tuple"-s (and TypeTuple?) Product: D Version: D2 Hardware: x86_64 OS: Linux Status:

Re: How to check if result of request to DB is empty?

2015-12-12 Thread Suliman via Digitalmars-d-learn
On Saturday, 12 December 2015 at 12:36:10 UTC, Suliman wrote: On Saturday, 12 December 2015 at 12:14:30 UTC, Vadim Lopatin wrote: On Saturday, 12 December 2015 at 12:06:21 UTC, Suliman wrote: On Saturday, 12 December 2015 at 11:53:51 UTC, Suliman wrote: On Saturday, 12 December 2015 at

alias butAtLeast = max; 5.butAtLeast(6);

2015-12-12 Thread SimonN via Digitalmars-d-learn
DMD v2.069.2-b1 on Linux. import std.algorithm; int a = max(5, 6);// works, a == 6 int b = max!(int, int)(5, 6); // works, manual instantiation int c = 5.max(6); // works, UFCS call I would like to use the last syntax, but with an alias. alias

Re: D is on his way to Top 20 in Tiobe

2015-12-12 Thread Ola Fosheim Grøstad via Digitalmars-d
On Saturday, 12 December 2015 at 06:32:11 UTC, rsw0x wrote: Github heavily favors anything related to web programming and is skewed by this. e.g, do you really think Ruby is more popular than C++? Not really, but number of projects does not work as a measure of course. By looking at number

[Issue 15391] Problems loading libcurl.so and running datetime unittest on NixOS package build

2015-12-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15391 --- Comment #6 from Thomas Mader --- (In reply to Jonathan M Davis from comment #4) > What are you doing differently from normal that makes it so that the normal > path for the time zone files doesn't work? NixOS is using a

Re: D is on his way to Top 20 in Tiobe

2015-12-12 Thread Ola Fosheim Grøstad via Digitalmars-d
On Saturday, 12 December 2015 at 07:13:37 UTC, Ozan wrote: The sad reality is, there are thousands of p-languages with great ideas and people behind but with no chance to reach enough awareness. And true is that D reached the breakpoint to be listed, discussed and used. That's true. There

Re: D is on his way to Top 20 in Tiobe

2015-12-12 Thread Ola Fosheim Grøstad via Digitalmars-d
On Saturday, 12 December 2015 at 09:01:02 UTC, Ola Fosheim Grøstad wrote: Ruby gets a little higher than Go: Ruby/Homebrew 747 stars Ruby/jekyll 515 stars Ruby/fastlane 528 stars Actually that was wrong, according to this metric Ruby gets in between Rust and Go, which is a bit lower than I

Re: How to check if result of request to DB is empty?

2015-12-12 Thread Suliman via Digitalmars-d-learn
On Saturday, 12 December 2015 at 10:36:12 UTC, drug wrote: 12.12.2015 13:28, Suliman пишет: it's seems that next block is execute even if is rs.next() is false: writeln("rs.next()-->", rs.next()); if(!rs.next()) //if user do not in DB { // is execute even if rs.next() is false

Re: Better string representation for TypeSeq used as function arg type?

2015-12-12 Thread cym13 via Digitalmars-d
On Saturday, 12 December 2015 at 11:00:17 UTC, Shriramana Sharma wrote: [...] On an another note (please, pardon the double post) I see a lot of your questions lately. This is great, but please post them preferably in then Learn section of the forum where you will get more help, the General

Re: How to check if result of request to DB is empty?

2015-12-12 Thread Suliman via Digitalmars-d-learn
On Saturday, 12 December 2015 at 11:31:18 UTC, Suliman wrote: Oh sorry! I used wrong host! All ok! Yes, there was issue with host name, but it's do not solve problem. Second DB have same fields and I still getting false instead moving into while loop

Re: How to check if result of request to DB is empty?

2015-12-12 Thread Vadim Lopatin via Digitalmars-d-learn
On Saturday, 12 December 2015 at 12:06:21 UTC, Suliman wrote: On Saturday, 12 December 2015 at 11:53:51 UTC, Suliman wrote: On Saturday, 12 December 2015 at 11:31:18 UTC, Suliman wrote: Oh sorry! I used wrong host! All ok! Yes, there was issue with host name, but it's do not solve problem.

Re: How to check if result of request to DB is empty?

2015-12-12 Thread anonymous via Digitalmars-d-learn
On 12.12.2015 08:44, Suliman wrote: string query_string = (`SELECT user, password FROM otest.myusers where user LIKE ` ~ `'%` ~ request["username"].to!string ~ `%';`); Don't piece queries together without escaping the dynamic parts. Imagine what happens when the user enters an apostrophe in

Re: How to check if result of request to DB is empty?

2015-12-12 Thread Suliman via Digitalmars-d-learn
On Saturday, 12 December 2015 at 13:18:12 UTC, anonymous wrote: On 12.12.2015 08:44, Suliman wrote: string query_string = (`SELECT user, password FROM otest.myusers where user LIKE ` ~ `'%` ~ request["username"].to!string ~ `%';`); Don't piece queries together without escaping the dynamic

Re: How is `auto` and not `alias` appropriate for alias sequences?

2015-12-12 Thread Meta via Digitalmars-d
On Saturday, 12 December 2015 at 06:15:10 UTC, Shriramana Sharma wrote: Another twist to this is that the tuple created by .tupleof doesn't really seem to be a new object of type Tuple!() Correct. There's no relation between Tuple and what .tupleof produces. The notion of what constitutes a

Re: How to check if result of request to DB is empty?

2015-12-12 Thread drug via Digitalmars-d-learn
12.12.2015 13:28, Suliman пишет: it's seems that next block is execute even if is rs.next() is false: writeln("rs.next()-->", rs.next()); if(!rs.next()) //if user do not in DB { // is execute even if rs.next() is false writeln("Executed, but rs.nst was set to false"); } The output:

Re: isExpressions -> isValuesSeq

2015-12-12 Thread Mike Parker via Digitalmars-d
On Saturday, 12 December 2015 at 06:41:11 UTC, Shriramana Sharma wrote: This AliasSeq contains expressions: 3, false, This should be: 1 + 2, "foo" == "goo" Clearly, the AliasSeq is not able to store the expressions themselves since they are automatically evaluated at compile time. It

Better string representation for TypeSeq used as function arg type?

2015-12-12 Thread Shriramana Sharma via Digitalmars-d
Hello. By executing the following: alias AS = AliasSeq!(int, double); int foo(AS td) // same as int foo(int, double); { writeln(typeof(td).stringof); return td[0] + cast(int)td[1]; } I get: (int, double) But it is not very clear as to what exactly the type of `td` is! I understand

Re: D is on his way to Top 20 in Tiobe

2015-12-12 Thread Ola Fosheim Grøstad via Digitalmars-d
On Saturday, 12 December 2015 at 12:04:47 UTC, tchaloupka wrote: dmd stars: https://plot.ly/~chalucha/4/stars-vs-month Thanks, I love this one. So one might infer that the "engagement level" was steady until the middle of 2012, then a slight drop in last half of 2012 and then a rather steep

Re: How to check if result of request to DB is empty?

2015-12-12 Thread Suliman via Digitalmars-d-learn
On Saturday, 12 December 2015 at 12:14:30 UTC, Vadim Lopatin wrote: On Saturday, 12 December 2015 at 12:06:21 UTC, Suliman wrote: On Saturday, 12 December 2015 at 11:53:51 UTC, Suliman wrote: On Saturday, 12 December 2015 at 11:31:18 UTC, Suliman wrote: Oh sorry! I used wrong host! All ok!

Re: How to check if result of request to DB is empty?

2015-12-12 Thread Suliman via Digitalmars-d-learn
On Saturday, 12 December 2015 at 12:43:36 UTC, Suliman wrote: On Saturday, 12 December 2015 at 12:36:10 UTC, Suliman wrote: On Saturday, 12 December 2015 at 12:14:30 UTC, Vadim Lopatin wrote: On Saturday, 12 December 2015 at 12:06:21 UTC, Suliman wrote: On Saturday, 12 December 2015 at

Re: alias butAtLeast = max; 5.butAtLeast(6);

2015-12-12 Thread ZombineDev via Digitalmars-d-learn
On Saturday, 12 December 2015 at 12:43:36 UTC, SimonN wrote: DMD v2.069.2-b1 on Linux. import std.algorithm; int a = max(5, 6);// works, a == 6 int b = max!(int, int)(5, 6); // works, manual instantiation int c = 5.max(6); // works, UFCS call I would

Re: Better string representation for TypeSeq used as function arg type?

2015-12-12 Thread cym13 via Digitalmars-d
On Saturday, 12 December 2015 at 11:00:17 UTC, Shriramana Sharma wrote: Hello. By executing the following: alias AS = AliasSeq!(int, double); int foo(AS td) // same as int foo(int, double); { writeln(typeof(td).stringof); return td[0] + cast(int)td[1]; } I get: (int, double) But it

Re: alias butAtLeast = max; 5.butAtLeast(6);

2015-12-12 Thread JR via Digitalmars-d-learn
On Saturday, 12 December 2015 at 12:43:36 UTC, SimonN wrote: DMD v2.069.2-b1 on Linux. import std.algorithm; int a = max(5, 6);// works, a == 6 int b = max!(int, int)(5, 6); // works, manual instantiation int c = 5.max(6); // works, UFCS call I would

What is the utility of .stringof with expressions?

2015-12-12 Thread Shriramana Sharma via Digitalmars-d
D currently supports: writeln((1 + 2).stringof); to print: 1 + 2 What is the real-world use case of this "feature"? I mean, everyone knows what the code they write looks like, so why would they want to have a language feature to get a string representation of it that they can print out to

[Issue 15391] Problems loading libcurl.so and running datetime unittest on NixOS package build

2015-12-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15391 --- Comment #7 from Thomas Mader --- (In reply to Martin Nowak from comment #5) > (In reply to Thomas Mader from comment #3) > > I was able to hack around the issue by patching the curl.d sourcefile. > > > > #Ugly hack

Re: How to check if result of request to DB is empty?

2015-12-12 Thread Suliman via Digitalmars-d-learn
Oh sorry! I used wrong host! All ok!

Re: D is on his way to Top 20 in Tiobe

2015-12-12 Thread tchaloupka via Digitalmars-d
On Friday, 11 December 2015 at 15:29:52 UTC, Ola Fosheim Grøstad wrote: This months top 3: D/PowerNex 29 stars D/DMD 27 stars D/dlangui 13 stars Maybe some interesting stats from github: dmd stars: https://plot.ly/~chalucha/4/stars-vs-month dmd forks:

Testing Nightly Build Service

2015-12-12 Thread Martin Nowak via Digitalmars-d-announce
As you might already know from the last sprint review (http://forum.dlang.org/post/56592679.3010604@dawg.), we've setup a server to build nightlies. The service is still in a test phase but seems to work steadily. You can try it using the install script curl -fsSL

Re: How to check if result of request to DB is empty?

2015-12-12 Thread Suliman via Digitalmars-d-learn
On Saturday, 12 December 2015 at 11:53:51 UTC, Suliman wrote: On Saturday, 12 December 2015 at 11:31:18 UTC, Suliman wrote: Oh sorry! I used wrong host! All ok! Yes, there was issue with host name, but it's do not solve problem. Second DB have same fields and I still getting false instead

[Issue 15434] object.d imports from rt (breaking inline builds)

2015-12-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15434 ZombineDev changed: What|Removed |Added CC|

Re: Better string representation for TypeSeq used as function arg type?

2015-12-12 Thread Shriramana Sharma via Digitalmars-d
cym13 wrote: > This is great, but please post them > preferably in then Learn section of the forum where you will get > more help, the General section is more for discussing the > evolution of D itself. Yes I understand that, but earlier when I asked questions on D.learn about advanced topics

zapcc - time to start adding caching to D compilers aswell?

2015-12-12 Thread Per Nordlöw via Digitalmars-d
http://www.zapcc.com/

Re: How to check if result of request to DB is empty?

2015-12-12 Thread Chris Wright via Digitalmars-d-learn
On Sat, 12 Dec 2015 07:44:40 +, Suliman wrote: >>> string query_string = (`SELECT user, password FROM otest.myusers where >>> user LIKE ` ~ `'%` ~ request["username"].to!string ~ `%';`); >> >> Don't piece queries together without escaping the dynamic parts. >> Imagine what happens when the

Re: Testing Nightly Build Service

2015-12-12 Thread Johan Engelen via Digitalmars-d-announce
On Saturday, 12 December 2015 at 12:08:50 UTC, Martin Nowak wrote: As you might already know from the last sprint review (http://forum.dlang.org/post/56592679.3010604@dawg.), we've setup a server to build nightlies. The service is still in a test phase but seems to work steadily. Great! Are

Re: D is on his way to Top 20 in Tiobe

2015-12-12 Thread Chris Wright via Digitalmars-d
On Sat, 12 Dec 2015 07:13:37 +, Ozan wrote: > On Saturday, 12 December 2015 at 04:38:02 UTC, JohnCK wrote: >> On Friday, 11 December 2015 at 15:29:52 UTC, Ola Fosheim And there is >> this site: http://githut.info/ where D is in #39 place of 49 languages. >> >> John. > > ... Where they group

Re: isExpressions -> isValuesSeq

2015-12-12 Thread Mike Parker via Digitalmars-d
On Saturday, 12 December 2015 at 14:05:04 UTC, Shriramana Sharma wrote: Mike Parker wrote: All values, 3 and false included, *are* expressions. They are expressions with one operand and no operator, but they are still expressions. https://en.wikipedia.org/wiki/Value_(computer_science)

Re: What is the utility of .stringof with expressions?

2015-12-12 Thread ZombineDev via Digitalmars-d
On Saturday, 12 December 2015 at 14:06:57 UTC, Shriramana Sharma wrote: cym13 wrote: It could be useful combined with mixins to preprocess the code you write before compiling it. Huh? Can you give me a concrete example? I'm not being intentionally dense but I can't imagine such a use case

Re: D is on his way to Top 20 in Tiobe

2015-12-12 Thread JohnCK via Digitalmars-d
On Saturday, 12 December 2015 at 07:13:37 UTC, Ozan wrote: ... Where they group CSS, TeX, Matlab, XSlt and other similar together with C, Java and D. (!?) Yes, there is a lot of garbage, but you need to filter them too! :) Come on,... for a language with no big company behind, I would

Re: zapcc - time to start adding caching to D compilers aswell?

2015-12-12 Thread tcak via Digitalmars-d
On Saturday, 12 December 2015 at 16:12:55 UTC, Per Nordlöw wrote: http://www.zapcc.com/ I am even afraid to suggest adding a new trait to runtime library, I don't think the complexity of caching would ever be considered.

Re: What is the utility of .stringof with expressions?

2015-12-12 Thread Shriramana Sharma via Digitalmars-d
cym13 wrote: > It could be useful combined with mixins to preprocess the code > you write before compiling it. Huh? Can you give me a concrete example? I'm not being intentionally dense but I can't imagine such a use case where you can't just write the string literal yourself... --

Re: isExpressions -> isValuesSeq

2015-12-12 Thread Shriramana Sharma via Digitalmars-d
Mike Parker wrote: > All values, 3 and false included, *are* expressions. They are > expressions with one operand and no operator, but they are still > expressions. > > https://en.wikipedia.org/wiki/Value_(computer_science) That's true, but the fact remains that the AliasSeq stores only the

AliasSeq can contain template identifier too?

2015-12-12 Thread Shriramana Sharma via Digitalmars-d-learn
https://github.com/D-Programming-Language/phobos/blob/master/std/meta.d#L790 Looks like an AliasSeq can contain a template identifier too. So should I understand that AliasSeq in general can refer to any identifier and any value? Hitherto I thought it was any *type* and any value... --

isTemplate and isValue?

2015-12-12 Thread Shriramana Sharma via Digitalmars-d-learn
Hello. Re my posting just now re AliasSeq being able to contain a template identifier too, I wonder whether it is possible to have a std.traits template to identify whether something is a template or not? In connection with this, while is() is there to determine whether something is a type or

Re: alias butAtLeast = max; 5.butAtLeast(6);

2015-12-12 Thread SimonN via Digitalmars-d-learn
By putting it in the top level. I believe this is intentional but I don't remember the reasoning. On Saturday, 12 December 2015 at 13:34:09 UTC, ZombineDev wrote: This is due to limitation of function-local aliases. If you put the alias outside it will work:

Re: Testing Nightly Build Service

2015-12-12 Thread Jack Stouffer via Digitalmars-d-announce
On Saturday, 12 December 2015 at 12:08:50 UTC, Martin Nowak wrote: As you might already know from the last sprint review (http://forum.dlang.org/post/56592679.3010604@dawg.) Does anyone who doesn't work on DMD read those? we've setup a server to build nightlies. The service is still in a

Re: What is the utility of .stringof with expressions?

2015-12-12 Thread Chris Wright via Digitalmars-d
On Sat, 12 Dec 2015 15:50:01 +0530, Shriramana Sharma wrote: > D currently supports: > > writeln((1 + 2).stringof); > > to print: > > 1 + 2 > > What is the real-world use case of this "feature"? stringof is useful for certain types of metaprogramming. It's useful for providing error

[Issue 15434] [REG2.068] object.d imports from rt (breaking inline builds)

2015-12-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15434 ZombineDev changed: What|Removed |Added Summary|object.d imports from rt|[REG2.068] object.d

Re: Better string representation for TypeSeq used as function arg type?

2015-12-12 Thread Shriramana Sharma via Digitalmars-d
cym13 wrote: > So, no, it's not a Voldemort type, it's exactly what the compiler > tells you it is: the sequence of types (int, double). Hmmm it seems to me that if it's not a runtime-valid type, then typeof() shouldn't work at all... -- Shriramana Sharma, Penguin #395953

Re: isTemplate and isValue?

2015-12-12 Thread Basile B. via Digitalmars-d-learn
On Saturday, 12 December 2015 at 14:17:52 UTC, Shriramana Sharma wrote: Hello. Re my posting just now re AliasSeq being able to contain a template identifier too, I wonder whether it is possible to have a std.traits template to identify whether something is a template or not? In connection

Re: AliasSeq can contain template identifier too?

2015-12-12 Thread Mike Parker via Digitalmars-d-learn
On Saturday, 12 December 2015 at 14:15:37 UTC, Shriramana Sharma wrote: https://github.com/D-Programming-Language/phobos/blob/master/std/meta.d#L790 Looks like an AliasSeq can contain a template identifier too. So should I understand that AliasSeq in general can refer to any identifier and

Re: isExpressions -> isValuesSeq

2015-12-12 Thread Timon Gehr via Digitalmars-d
On 12/12/2015 03:51 PM, Mike Parker wrote: On Saturday, 12 December 2015 at 14:05:04 UTC, Shriramana Sharma wrote: Mike Parker wrote: All values, 3 and false included, *are* expressions. They are expressions with one operand and no operator, but they are still expressions.

Re: Wishlist for D

2015-12-12 Thread rsw0x via Digitalmars-d
On Tuesday, 1 December 2015 at 16:43:55 UTC, Ozan wrote: Hi We all have experience with several programming languages and the great ideas implemented there. It is close to Xmas and I think the right time for wishes about future functions in D. Where is right place to put these inspirations

Re: isExpressions -> isValuesSeq

2015-12-12 Thread Timon Gehr via Digitalmars-d
On 12/12/2015 09:01 PM, Timon Gehr wrote: On 12/12/2015 03:51 PM, Mike Parker wrote: On Saturday, 12 December 2015 at 14:05:04 UTC, Shriramana Sharma wrote: Mike Parker wrote: All values, 3 and false included, *are* expressions. They are expressions with one operand and no operator, but they

Re: isExpressions -> isValuesSeq

2015-12-12 Thread Timon Gehr via Digitalmars-d
On 12/12/2015 07:41 AM, Shriramana Sharma wrote: This is w.r.t. http://dlang.org/phobos/std_traits.html#isExpressions: I am trying the following code: import std.stdio, std.meta, std.traits; void main() { alias a = AliasSeq!(1 + 2, "foo" == "goo"); if (isExpressions!a) write("This

Re: MurmurHash3

2015-12-12 Thread Guillaume Chatelet via Digitalmars-d-announce
On Saturday, 12 December 2015 at 02:59:21 UTC, Ilya wrote: Current version is suitable for arrays but not ranges or types. Few examples: 1. Compute hash of ulong. 2. Compute hash of all elements in matrix column (element are in different arrays). I have created output range API draft

Re: D is on his way to Top 20 in Tiobe

2015-12-12 Thread Jack Stouffer via Digitalmars-d
On Saturday, 12 December 2015 at 12:17:55 UTC, Ola Fosheim Grøstad wrote: And what happend in the beginning of 2013? Walter wrote his popular article on porting DMD to win64 in December 2012 and that version was released shortly after, and in 2013 D promotion got more serious with things

Re: Wishlist for D

2015-12-12 Thread Charles Hixson via Digitalmars-d
A "batteries included" extension to phobos modeled after the Python modules. Esp. I'd like a standard linkage to Sqlite via D rather than C, but I'm sure that other have other most desired libraries. Additionally, I'd like fewer language changes. D is a great language now, and changes, while

Re: Wishlist for D

2015-12-12 Thread Charles Hixson via Digitalmars-d
On 12/12/2015 03:47 PM, Jack Stouffer via Digitalmars-d wrote: On Saturday, 12 December 2015 at 19:55:27 UTC, Charles Hixson wrote: Now I'll occasionally use it, but I so often need to iterate over multiple arrays that I use indexing much more often Why not use foreach(ref a, ref b, ref c;

Re: functional way doing array stuff/ lambda functions

2015-12-12 Thread Namal via Digitalmars-d-learn
On Saturday, 12 December 2015 at 23:50:55 UTC, Xinok wrote: On Saturday, 12 December 2015 at 23:36:43 UTC, cym13 wrote: ... So, in your example: int product(const ref int[] arr) { import std.array: array; import std.algorithm: reduce; arr = arr.reduce!((p, i) => p*i).array; }

Re: AliasSeq can contain template identifier too?

2015-12-12 Thread Ali Çehreli via Digitalmars-d-learn
On 12/12/2015 06:15 AM, Shriramana Sharma wrote: > https://github.com/D-Programming-Language/phobos/blob/master/std/meta.d#L790 > > Looks like an AliasSeq can contain a template identifier too. So should I > understand that AliasSeq in general can refer to any identifier and any > value?

Re: functional way doing array stuff/ lambda functions

2015-12-12 Thread Namal via Digitalmars-d-learn
On Sunday, 13 December 2015 at 00:02:11 UTC, cym13 wrote: Now that I think about it, it's true that it would make no sense whatsoever to return a range as reduce is typically used to return a single value... At least it makes perfect sense. Thanks alot, this helped alot. But I have another

Silicon Valley D Meetup December 17, 2015

2015-12-12 Thread Ali Çehreli via Digitalmars-d-announce
Our guest speaker is Steven Schveighoffer. He will present "Mutability wildcards in D": http://www.meetup.com/D-Lang-Silicon-Valley/events/226112281/ Ali

Re: functional way doing array stuff/ lambda functions

2015-12-12 Thread cym13 via Digitalmars-d-learn
On Sunday, 13 December 2015 at 00:36:29 UTC, Namal wrote: On Sunday, 13 December 2015 at 00:02:11 UTC, cym13 wrote: Now that I think about it, it's true that it would make no sense whatsoever to return a range as reduce is typically used to return a single value... At least it makes perfect

Re: zapcc - time to start adding caching to D compilers aswell?

2015-12-12 Thread Rikki Cattermole via Digitalmars-d
On 13/12/15 5:54 AM, tcak wrote: On Saturday, 12 December 2015 at 16:12:55 UTC, Per Nordlöw wrote: http://www.zapcc.com/ I am even afraid to suggest adding a new trait to runtime library, I don't think the complexity of caching would ever be considered. Also a little useless. DMD-FE is so

Re: Wishlist for D

2015-12-12 Thread Ola Fosheim Grøstad via Digitalmars-d
On Saturday, 12 December 2015 at 22:10:25 UTC, PuglyWUgly wrote: D canceled, new language G created for GPU, designed as an array processing language. Written in C++ meta templates, otherwise nobody will use it. Duh. Woah, that's drastic, but sounds cool. Well, if we are going drastic: 1.

functional way doing array stuff/ lambda functions

2015-12-12 Thread Namal via Digitalmars-d-learn
Hello guys, I am still uncertain how to do it right when it comes to lambda functions. For instance: how do I multiply all the elements in an array ? int product(const ref int[] arr){ int p = 1; foreach(i;arr) p*=i; return p; }

Re: functional way doing array stuff/ lambda functions

2015-12-12 Thread cym13 via Digitalmars-d-learn
On Saturday, 12 December 2015 at 23:10:21 UTC, Namal wrote: Hello guys, I am still uncertain how to do it right when it comes to lambda functions. If you are looking for the functionnal way I'd advise that you start by looking up three functions in a language-agnostic way: filter, map and

Re: Wishlist for D

2015-12-12 Thread Jack Stouffer via Digitalmars-d
On Saturday, 12 December 2015 at 19:55:27 UTC, Charles Hixson wrote: Now I'll occasionally use it, but I so often need to iterate over multiple arrays that I use indexing much more often Why not use foreach(ref a, ref b, ref c; lockstep(array1, array2, array3)) ?

Re: Wishlist for D

2015-12-12 Thread Brad Anderson via Digitalmars-d
On Friday, 11 December 2015 at 10:04:22 UTC, Andrea Fontana wrote: On Tuesday, 1 December 2015 at 16:48:00 UTC, Suliman wrote: Right place is write here My wishes: - Less flamewars. - A heavy template-based image manipulation library (like antigrain for c++) It's probably not as powerful

Re: Wishlist for D

2015-12-12 Thread PuglyWUgly via Digitalmars-d
D canceled, new language G created for GPU, designed as an array processing language. Written in C++ meta templates, otherwise nobody will use it. Duh.

Re: DLang users telegram group

2015-12-12 Thread Quentin Ladeveze via Digitalmars-d-announce
On Tuesday, 8 December 2015 at 17:51:01 UTC, Kingsley wrote: On Monday, 30 November 2015 at 10:58:34 UTC, Quentin Ladeveze wrote: Hi everybody, I just created a Telegram group for dlang users : https://telegram.me/joinchat/BeLaugMz35ZxQUq2fks4YQ Feel free to join ! says the link has

Re: log(n) amortized growth for containers

2015-12-12 Thread Marco Nembrini via Digitalmars-d
On Saturday, 12 December 2015 at 02:12:13 UTC, Andrei Alexandrescu wrote: On 12/11/15 9:02 PM, Timon Gehr wrote: On 12/11/2015 04:55 AM, Andrei Alexandrescu wrote: Here's a quick thought on growth schedule for arrays. The classic approach is to grow by a geometric schedule. For example: 1,

Re: functional way doing array stuff/ lambda functions

2015-12-12 Thread Xinok via Digitalmars-d-learn
On Saturday, 12 December 2015 at 23:36:43 UTC, cym13 wrote: ... So, in your example: int product(const ref int[] arr) { import std.array: array; import std.algorithm: reduce; arr = arr.reduce!((p, i) => p*i).array; } A good post overall but you got reduce wrong. In D, reduce

Re: functional way doing array stuff/ lambda functions

2015-12-12 Thread cym13 via Digitalmars-d-learn
On Saturday, 12 December 2015 at 23:50:55 UTC, Xinok wrote: On Saturday, 12 December 2015 at 23:36:43 UTC, cym13 wrote: ... So, in your example: int product(const ref int[] arr) { import std.array: array; import std.algorithm: reduce; arr = arr.reduce!((p, i) => p*i).array; }

[Issue 15437] New: documentation for typeof(someTemplate) == void

2015-12-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15437 Issue ID: 15437 Summary: documentation for typeof(someTemplate) == void Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement

Re: functional way doing array stuff/ lambda functions

2015-12-12 Thread cym13 via Digitalmars-d-learn
On Saturday, 12 December 2015 at 23:59:01 UTC, cym13 wrote: On Saturday, 12 December 2015 at 23:50:55 UTC, Xinok wrote: On Saturday, 12 December 2015 at 23:36:43 UTC, cym13 wrote: ... So, in your example: int product(const ref int[] arr) { import std.array: array; import