On Fri, 2015-09-25 at 12:54 +, John Colvin via Digitalmars-d-learn
wrote:
>
[…]
> I vastly prefer the UFCS version, but unfortunately reduce has
> its arguments the wrong way around for that if you use the
> version that takes a seed...
In which case the reduce parameter list is wrong, this
Init:
programResultsQ = heapify!(compareResults,
Array!(Results!(O,I)))(Array!(Results!(O,I))([Results!(O,I)()]),
1);
Decl:
alias ProgramResultsQueue(O,I) =
BinaryHeap!(Array!(Results!(O,I)), compareResults);
Error:
assert error in std.container.array.d (line 381)
upon running. Compile
On 26/09/15 3:03 AM, John Colvin wrote:
On Thursday, 24 September 2015 at 13:33:51 UTC, Rikki Cattermole wrote:
On 25/09/15 1:30 AM, Edwin van Leeuwen wrote:
On Thursday, 24 September 2015 at 13:24:14 UTC, Rikki Cattermole wrote:
Dvorm is more or less feature complete :)
I am the author of it,
Pretty please? :)
On 09/25/2015 09:38 AM, Artur Skawina via Digitalmars-d-learn wrote:
On 09/25/15 17:47, Ali Çehreli via Digitalmars-d-learn wrote:
Perhaps we need an enhancement that either works in your original code [...]
His original code does work (`foreach` evaluates `args[N]` and
assigns the result to
On Friday, 25 September 2015 at 18:11:51 UTC, Meta wrote:
You can use
http://dlang.org/phobos/std_meta.html#.NoDuplicates. I imagine
this was an oversight in the implementation of Algebraic.
Thanks
Hello tired_eyes,
tevDdl> Once again, I'm absolutely sure tha D should have an official
tevDdl> blog! Forums can't replace blogs, forums are for discussions, not
tevDdl> for content presentation.
+1 on this.
--
With best regards from Ukraine,
Andre
On 09/25/2015 09:04 AM, Martino wrote:
As subject, I'm trying to read from stdin without waiting for enter to
be pressed.
How can I do?
One solution:
http://forum.dlang.org/post/mailman.2665.1300747084.4748.digitalmars-d-le...@puremagic.com
Ali
On Friday, 25 September 2015 at 12:51:17 UTC, Russel Winder wrote:
Aha, bingo, spot on. Thanks. Amended now to:
double reduce_string_loop() {
return reduce!"a + 1.0 / (b * b)"(iota(1, 100));
}
double reduce_function_loop() {
return reduce!((t, n) => t + 1.0 / (n * n))(io
On 9/25/15 12:04 PM, Martino wrote:
As subject, I'm trying to read from stdin without waiting for enter to
be pressed.
How can I do?
That is an issue with your terminal. You need to use a terminal
configuration library to set it up to not buffer keystrokes until enter
is pressed. I would no
On Friday, 25 September 2015 at 03:20:24 UTC, Nicholas Wilson
wrote:
find + EnumMembers should do the trick
if ( (EnumMembers!SomeType).canFind(value))
{
// ...
}
Should be
if (only(EnumMembers!SomeType).canFind(value))
{
//...
}
On Friday, 25 September 2015 at 16:08:41 UTC, Nordlöw wrote:
How can a template parameter list be deduplicated or sorted?
You can use http://dlang.org/phobos/std_meta.html#.NoDuplicates.
I imagine this was an oversight in the implementation of
Algebraic.
On 09/25/15 17:47, Ali Çehreli via Digitalmars-d-learn wrote:
> Perhaps we need an enhancement that either works in your original code [...]
His original code does work (`foreach` evaluates `args[N]` and
assigns the result to `arg`).
If he wanted to delay the evaluation, he would have written it
On Thursday, 24 September 2015 at 20:20:42 UTC, Nordlöw wrote:
I just noticed that Algebraic doesn't deduplicate its types
before construction because this compiles:
import std.variant : Algebraic;
auto x = Algebraic!(int, int)(5);
Is this really sane?
How can a template parameter li
As subject, I'm trying to read from stdin without waiting for
enter to be pressed.
How can I do?
On 09/25/2015 05:56 AM, Sean Campbell wrote:
Take the following code for example
module test;
import std.stdio;
void test(T...)(lazy T args)
I don't think that syntax is implemented. It looks valid to me though.
There are many qualifier combinations that the compiler is silent about.
I thin
On Friday, 25 September 2015 at 12:25:52 UTC, tired_eyes wrote:
I meant if there is already a place where I can upload my post
to. Something like blog.dlang.org
OT:
Once again, I'm absolutely sure tha D should have an official
blog! Forums can't replace blogs, forums are for discussions,
not
On Friday, 25 September 2015 at 15:08:00 UTC, bachmeier wrote:
On Friday, 25 September 2015 at 15:06:41 UTC, bachmeier wrote:
First issue would be getting approval from Walter and Andrei.
Second would be finding someone that knows how to do it.
Should I create a new thread to open discussion
Hey, I've got a few questions if anybody's got a minute.
I'm trying to wrap my head around the threading situation in D.
So far, things seem to be working as expected, but I want to
verify my solutions.
1) Are the following two snippets exactly equivalent(not just in
observable behaviour)?
On Friday, 25 September 2015 at 14:24:36 UTC, Adam D. Ruppe wrote:
FYI, if you guys want to set something up for multiple
contributors like a traditional blog, I'm willing to move TWID
do it.
I've been kinda wanting to do a blog thing but I just haven't
brought myself to set anything up.
T
On Friday, 25 September 2015 at 15:06:41 UTC, bachmeier wrote:
First issue would be getting approval from Walter and Andrei.
Second would be finding someone that knows how to do it.
Should I create a new thread to open discussion on the topic?
On Thursday, 24 September 2015 at 13:33:51 UTC, Rikki Cattermole
wrote:
On 25/09/15 1:30 AM, Edwin van Leeuwen wrote:
On Thursday, 24 September 2015 at 13:24:14 UTC, Rikki
Cattermole wrote:
Dvorm is more or less feature complete :)
I am the author of it, but unless issues come up I do not
inte
On Thursday, 24 September 2015 at 13:18:58 UTC, David Nadlinger
wrote:
Hi all,
I'm having a look at ORM libraries in D right now. So far, I've
come across hibernated and dvorm.
Are there any other libraries that I should have a look at,
particularly actively maintained ones? dvorm and hibern
On Friday, 25 September 2015 at 14:15:20 UTC, bachmeier wrote:
On Friday, 25 September 2015 at 12:25:52 UTC, tired_eyes wrote:
Once again, I'm absolutely sure tha D should have an official
blog! Forums can't replace blogs, forums are for discussions,
not for content presentation.
I've long ag
On Friday, 25 September 2015 at 12:25:52 UTC, tired_eyes wrote:
I meant if there is already a place where I can upload my post
to. Something like blog.dlang.org
OT:
Once again, I'm absolutely sure tha D should have an official
blog! Forums can't replace blogs, forums are for discussions,
not
On Friday, 25 September 2015 at 10:28:56 UTC, ref2401 wrote:
If I declare a class as `final` do I have to mark all methods
of the class as `final` too?
A final class can't be subclassed, so none of its methods can be
overridden anyway.
Take the following code for example
module test;
import std.stdio;
void test(T...)(lazy T args)
{
foreach(arg;args) //bar is invoked here
{
writeln("about to process arg");
writefln("processing arg %s",arg); //but it should be invoked
here, right?
}
}
On Friday, 25 September 2015 at 12:51:17 UTC, Russel Winder wrote:
On Fri, 2015-09-25 at 09:14 +, mzf via
Digitalmars-d-learn wrote:
[...]
Aha, bingo, spot on. Thanks. Amended now to:
double reduce_string_loop() {
return reduce!"a + 1.0 / (b * b)"(iota(1, 100));
}
d
On Fri, 2015-09-25 at 09:14 +, mzf via Digitalmars-d-learn
wrote:
> > If we worry about the string form and instead try:
> >
> > double reduce_string_loop() {
> > return reduce!"1.0 / (a * a)"(iota(1, 100));
> > }
> >
> > double reduce_function_loop() {
> > return reduce!((n) => 1.0 /
I meant if there is already a place where I can upload my post
to. Something like blog.dlang.org
OT:
Once again, I'm absolutely sure tha D should have an official
blog! Forums can't replace blogs, forums are for discussions, not
for content presentation.
Am Fri, 25 Sep 2015 10:28:54 +
schrieb ref2401 :
> If I declare a class as `final` do I have to mark all methods of
> the class as `final` too?
No.
--
Marco
If I declare a class as `final` do I have to mark all methods of
the class as `final` too?
On Thursday, 24 September 2015 at 18:19:49 UTC, Laeeth Isharc
wrote:
On Thursday, 24 September 2015 at 02:43:20 UTC, Sebastiaan
Koppe wrote:
I have just created bindings for libxlsxwriter, an c library
for creating excel files.
Used the htod tool to do most of the work, and only had to
adjust
If we worry about the string form and instead try:
double reduce_string_loop() {
return reduce!"1.0 / (a * a)"(iota(1, 100));
}
double reduce_function_loop() {
return reduce!((n) => 1.0 / (n * n))(iota(1, 100));
}
it should be write :
double reduce_loop() {
//return iota(1, 100).map!"
On Fri, 2015-09-25 at 06:02 +, Nicholas Wilson via Digitalmars-d
-learn wrote:
> On Friday, 25 September 2015 at 05:50:58 UTC, Charanjit Singh
> wrote:
> > import std.stdio;
> > import std.math;
> > void main()
> >
> > {
> > float sum,pi,t;
> > int n=1;
> > sum=0;
> > while (
On Friday, 25 September 2015 at 06:04:09 UTC, Laeeth Isharc wrote:
Blog platform - I guess nothing wrong with wordpress etc. I am
between platforms right now. I just don't want to deal with
wordpress any more, and haven't yet picked something I like
better. Something like Nikola and dicebot'
36 matches
Mail list logo