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 {
http://forum.dlang.org/post/yeebmehdqgqdfkzmz...@forum.dlang.org
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,
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
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
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:
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-
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?
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
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
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
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
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
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:
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
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
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
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
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
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
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
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
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
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.
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
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
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
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:
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
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
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
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!
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
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
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
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
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
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
Oh sorry! I used wrong host! All ok!
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:
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
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
https://issues.dlang.org/show_bug.cgi?id=15434
ZombineDev changed:
What|Removed |Added
CC|
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
http://www.zapcc.com/
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
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
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
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)
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
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
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.
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...
--
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
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...
--
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
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:
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
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
https://issues.dlang.org/show_bug.cgi?id=15434
ZombineDev changed:
What|Removed |Added
Summary|object.d imports from rt|[REG2.068] object.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
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
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
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.
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
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
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
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
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
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
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;
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;
}
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?
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
Our guest speaker is Steven Schveighoffer. He will present "Mutability
wildcards in D":
http://www.meetup.com/D-Lang-Silicon-Valley/events/226112281/
Ali
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
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
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.
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;
}
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
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)) ?
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
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.
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
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,
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
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;
}
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
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
89 matches
Mail list logo