On 09/12/2015 12:52 PM, NX wrote:
> What if I told you, you should search the official reference before
> asking such things in the forum?
I did search the net for terms such as "d lang back quoted string" or "d
lang multi line string" or "d lang string interpolation" before asking here.
However
On Saturday, 12 September 2015 at 10:35:41 UTC, Bahman Movaqar
wrote:
On 09/12/2015 02:47 PM, "Nordlöw" wrote:
How do I most elegantly iterate all the adjacent pairs in an
`InputRange` using Phobos?
Something like
[1,2,3,4] => [(1,2), (2,3), (3,4)]
That's call `collate`ing IIRC.
A
On 09/12/2015 02:47 PM, "Nordlöw" wrote:
> How do I most elegantly iterate all the adjacent pairs in an
> `InputRange` using Phobos?
>
> Something like
>
> [1,2,3,4] => [(1,2), (2,3), (3,4)]
That's call `collate`ing IIRC.
A quick solution would be using `std.range.transposed`:
auto a =
On Fri, 2015-09-11 at 21:50 +0200, Jacob Carlborg via Digitalmars-d
-learn wrote:
> On 2015-09-10 20:01, Russel Winder via Digitalmars-d-learn wrote:
> > Is there an easy way of knowing when you do not have to initialize
> > the
> > D runtime system to call D code from, in this case, Python via a
On 2015-09-12 10:56, Russel Winder via Digitalmars-d-learn wrote:
I have a small D function (C linkage) compiled to a shared object that
I am calling from Python via CFFI that works fine with no D runtime
initialization. Thus I have experimental evidence "always" is not
entirely the case! I
On Friday, 11 September 2015 at 15:54:57 UTC, Jacob Carlborg
wrote:
On 2015-09-11 13:27, Atila Neves wrote:
Unit tests should run in a fraction of a second... no, there's
no such
functionality.
Why would I not use this for other kinds of tests?
I guess you're right. In any case, getting
On Tuesday, 1 September 2015 at 04:03:48 UTC, Brian Schott wrote:
Please report bugs on Github here:
https://github.com/economicmodeling/containers/issues
Move semantics anyone?
https://github.com/economicmodeling/containers/issues/25
On Saturday, 12 September 2015 at 03:32:51 UTC, Prudence wrote:
On Saturday, 12 September 2015 at 02:13:11 UTC, Pierre Krafft
wrote:
On Saturday, 12 September 2015 at 01:03:54 UTC, Prudence wrote:
On Thursday, 10 September 2015 at 18:02:36 UTC, Ali Çehreli
wrote:
On 09/10/2015 10:55 AM,
https://issues.dlang.org/show_bug.cgi?id=14058
--- Comment #2 from Dmitry Olshansky ---
(In reply to Joseph Rushton Wakeling from comment #1)
> PR submitted: https://github.com/D-Programming-Language/phobos/pull/2918
Unattended by now. Anyone is welcome to redo it.
--
Why is also b flipped here? This doesn't happen if I use static
arrays.
nvm. I need to .dup that.
On Sat, 2015-09-12 at 06:58 +, Mike McKee via Digitalmars-d-learn
wrote:
[…]
> I just tested and you are correct. Now, is there a way that I can
> edit /etc/dmd.conf and make it so that I don't need to do this
> pkg-config stuff all the time?
I think editing /etc/dmd.conf would be the wrong
https://issues.dlang.org/show_bug.cgi?id=15046
Issue ID: 15046
Summary: [REG2.068] isForwardRange documentation is documenting
issue 14544
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
https://issues.dlang.org/show_bug.cgi?id=15046
Kenji Hara changed:
What|Removed |Added
Keywords||pull
--- Comment #2 from
https://issues.dlang.org/show_bug.cgi?id=15046
--- Comment #1 from Kenji Hara ---
Introduced in: https://github.com/D-Programming-Language/phobos/pull/3276
--
Hi all,
I came across this example, and wondered what your thoughts on it
are:
```
void main(string[] args)
{
struct Foo(float f) {
alias VAL = f;
float getF() {
return f;
}
}
Foo!(float.nan) f;
Foo!(float.nan) f2;
// This will fail
On Saturday, 12 September 2015 at 15:13:27 UTC, Robert wrote:
Hi all,
I came across this example, and wondered what your thoughts on
it are:
```
void main(string[] args)
{
struct Foo(float f) {
alias VAL = f;
float getF() {
return f;
}
}
On Saturday, 12 September 2015 at 06:25:45 UTC, NX wrote:
Is there even a compiler switch to disable GC altogether so the
program doesn't have a GC thread? No, I can't see it...
D programs *never* have a GC thread.
The way the D garbage collector works is something like this:
void*
On Saturday, 12 September 2015 at 14:41:45 UTC, Spacen Jasset
wrote:
If I say this in one module:
version = current
version (Current) {
version = featurea;
version = featureb;
version = featurec;
}
It appears that I can't put this in a module and import it
elsewhere to test the
On Saturday, 12 September 2015 at 15:49:23 UTC, Atila Neves wrote:
On Saturday, 12 September 2015 at 15:13:27 UTC, Robert wrote:
Hi all,
I came across this example, and wondered what your thoughts on
it are:
```
void main(string[] args)
{
struct Foo(float f) {
alias VAL = f;
On Saturday, 12 September 2015 at 06:23:12 UTC, Jonathan M Davis
wrote:
On Friday, September 11, 2015 23:29:05 Laeeth Isharc via
Digitalmars-d-learn wrote:
On Friday, 11 September 2015 at 21:58:28 UTC, Adam D. Ruppe
wrote:
> [...]
Seems to be quite a lot of FUD wrt use of standard library and
On Wednesday, 9 September 2015 at 10:00:10 UTC, Ola Fosheim
Grøstad wrote:
On Wednesday, 9 September 2015 at 06:13:59 UTC, Dominikus
Dittes Scherkl wrote:
IMHO "friend" is a misconception, that is only there to
compensate for the lack of modules in C++.
It can be useful. Say you have a
On Saturday, 12 September 2015 at 13:48:14 UTC, ZombineDev wrote:
That's what the `package` access modifier is for.
Then you would have to be in the same package, and that is rather
broad?
The advantage of "friend" is that you can pinpoint what might be
a source for trouble when debugging,
On 2015-09-12 01:47, Andrei Alexandrescu wrote:
There's two canonical ways to do that.
1. Use lambdas, which seem to already do what you want:
db.get!Person.filter!(p => p.age > 21 && p.name == "Peter")
The way this'd go, the db.get!Person() call returns an input range of
Person. Presumably
On 2015-09-11 21:40, Martin Nowak wrote:
I find the reasons for turining down my ER a bit moot.
[Issue 14593 – operator overloading can't be used with expression
templates](https://issues.dlang.org/show_bug.cgi?id=14593)
AFAIK expression templates are the primary choice tom implement SIMD and
On Friday, 11 September 2015 at 19:41:41 UTC, Martin Nowak wrote:
Does anyone have a different idea how to make a nice query
language? db.get!Person.where!(p => p.age > 21 && p.name ==
"Peter")
Do it at runtime?
On 2015-09-12 01:06, Jonathan M Davis wrote:
Walter and Andrei publicly agreed at dconf that it should be removed. As
I understand it, it was removed from the documentation with 2.068 (but
not yet deprecated), and now it's been deprecated. Now, that being said,
I think 2.070 is too soon to
https://issues.dlang.org/show_bug.cgi?id=14433
github-bugzi...@puremagic.com changed:
What|Removed |Added
Status|NEW |RESOLVED
https://issues.dlang.org/show_bug.cgi?id=14433
--- Comment #2 from github-bugzi...@puremagic.com ---
Commit pushed to master at https://github.com/D-Programming-Language/phobos
https://github.com/D-Programming-Language/phobos/commit/b65b717dcba7d6b86cbedd7cf632e93d67ede392
Merge pull request
On 2015-09-12 03:23, Jonathan M Davis wrote:
Though, now that I think about it, we should probably also put it in
undead now.
I think it can be put in undead as soon as something is deprecated or
to-be-deprecated in the documentation.
--
/Jacob Carlborg
On 09/11/2015 01:59 PM, Bill Baxter via Digitalmars-d-announce wrote:
To be fair, wasn't the movie talking about dead baseball player ghosts
coming? For people to take that example and apply it to other endeavors in
life is a bit ridiculous.
That's pretty similar to how I felt about Doom3:
On 09/12/2015 06:37 AM, Prudence wrote:
Says the creating new SingleStore is not an expression
Reduced:
mixin template ObjectStore(TKey)
{
class SingleStore
{
static void New()// Removing 'static' compiles
{
new SingleStore();
}
}
}
class
https://issues.dlang.org/show_bug.cgi?id=12210
Vladimir Panteleev changed:
What|Removed |Added
Assignee|nazriel6...@gmail.com
If I say this in one module:
version = current
version (Current) {
version = featurea;
version = featureb;
version = featurec;
}
It appears that I can't put this in a module and import it
elsewhere to test the version specifications as they are all in
their own namespaces. Is this
On 2015-09-10 20:23, Jonathan M Davis wrote:
That's one of the main reasons that I hate the idea of named arguments.
In Ruby named arguments need to be explicitly requested when declaring a
method:
def bar(a)
a == { a: 3 } # A hash (associative array)
end
def foo(a:)
a == 3
end
On 2015-09-12 11:52, Atila Neves wrote:
I guess you're right. In any case, getting what's in there to get
accepted is work enough as it is.
Yes, absolutely. I wasn't arguing for the feature, just the reason not
to add it :)
--
/Jacob Carlborg
On 2015-09-10 23:03, Meta wrote:
You could, but then doesn't that defeat the point a bit?
No, I don't think it does. For example in Scala you can do like this:
foo(_ < _)
Which would be the same as:
foo((a, b) a < b)
But if you want to use the same parameter more than once then you cannot
On 2015-09-12 15:34, Dicebot wrote:
I also don't like mixing unittest and higher level functional tests
(with setup and cleanup phases) into the same buckets - this doesn't fit
nice with D module system. Latter should be placed in a separate
modules/package to avoid being picked up by rdmd & Co
On Saturday, 12 September 2015 at 14:50:32 UTC, Jacob Carlborg
wrote:
Not sure I understand the problem. Does this prevent one from
writing functional tests in a completely separate directory?
Nope but the fact that they are treated the same (no separate
category, no output separation, no
On Saturday, 12 September 2015 at 14:40:05 UTC, Jacob Carlborg
wrote:
Not supplying the name of the parameter in the call to "foo"
would result in an error.
Python has similar semantics. Very useful to force explicitness
when you have complex changing APIs that have many parameters of
the
On 09/12/2015 04:04 PM, Bahman Movaqar wrote:
> Oops! Here's one using only `InputRange` interface:
I believe I need to warn you that I'm just learning D; so take my
solution at your own risk :-)
--
Bahman Movaqar
On Saturday, 12 September 2015 at 04:05:44 UTC, Adam D. Ruppe
wrote:
On Saturday, 12 September 2015 at 03:52:11 UTC, skoppe wrote:
That is not the only way it behaves differently. jQuery's
html() will actually execute inline script, whereas innerHTML
won't.
I'm pretty sure it is the other
https://issues.dlang.org/show_bug.cgi?id=15047
Issue ID: 15047
Summary: "used before set" error with void initialization (only
with -O)
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status:
On Monday, 7 September 2015 at 10:28:20 UTC, deed wrote:
On Monday, 7 September 2015 at 10:25:09 UTC, deed wrote:
writeln(x);// or you can pass it to a function.
I meant `writeln(x + 5)`
If I have just red your post before I started using reverse on
dynamic arrays...
Anyway, there is
On Saturday, 12 September 2015 at 06:25:45 UTC, NX wrote:
On Friday, 11 September 2015 at 19:30:56 UTC, ponce wrote:
Some of us use and need @nogc all the time. The other parts of
an application can use the GC: best of both worlds.
Is there even a compiler switch to disable GC altogether so
On Saturday, 12 September 2015 at 10:44:05 UTC, Pierre Krafft
wrote:
myfunc({return "x:"~x~"y:"-y;});
is infered to mean myfunc((x,y){return "x:"~x~"y:"-y;});
while
myfunc({return "y:"~y~"x:"~x;});
is infered to mean myfunc((y,x){return "y:"~y~"x:"~x;});
which is not what I expect since the
On Wednesday, 9 September 2015 at 15:20:41 UTC, Robert burner
Schadek wrote:
This post marks the start of the two week review process of
std.experimental.testing.
PR: https://github.com/D-Programming-Language/phobos/pull/3207
Dub: http://code.dlang.org/packages/unit-threaded
Doc: See
The following code simply does not work, it might be buggy now
after fiddling with it but basically remove and the
SingleStore.New are not working(Says the creating new SingleStore
is not an expression, which makes no sense to me).
Essentially I'm creating a mixin template so I can have
On 09/12/2015 03:09 PM, "Nordlöw" wrote:
> InputRange please, not RandomAccessRanges ;)
Oops! Here's one using only `InputRange` interface:
T[][] collate(T)(T[] a)
{
alias CollateResult = Tuple!(T[][], "result", T, "tlHd");
CollateResult _collate(CollateResult collres)
On Saturday, 12 September 2015 at 11:34:03 UTC, Bahman Movaqar
wrote:
On 09/12/2015 03:09 PM, "Nordlöw" wrote:
InputRange please, not RandomAccessRanges ;)
Oops! Here's one using only `InputRange` interface:
I wrote my own as adjacentTuples and adjacentPairs:
On Saturday, 12 September 2015 at 11:46:55 UTC, Nordlöw wrote:
I wrote my own as adjacentTuples and adjacentPairs:
https://github.com/nordlow/justd/blob/master/range_ex.d#L702
Note: No yet extended to N > 2.
An alternative naming would be overlappingTuples/Pairs.
Should this go into Phobos?
https://issues.dlang.org/show_bug.cgi?id=15046
--- Comment #3 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/D-Programming-Language/phobos
https://github.com/D-Programming-Language/phobos/commit/6813eca0d20dbb1ced9c4bfc172f8ae0b5b9693a
fix Issue 15046 -
On Saturday, 12 September 2015 at 08:22:03 UTC, NX wrote:
What if I told you, you should search the official reference
before asking such things in the forum?
Searching is kinda hard, so I encourage people to ask if
something doesn't come up quickly. And then we need to be sure to
always
https://issues.dlang.org/show_bug.cgi?id=15048
Issue ID: 15048
Summary: "tuple" term used wrongly on
dlang.org/variadic-function-templates.html
Product: D
Version: D2
Hardware: All
OS: All
Status:
101 - 153 of 153 matches
Mail list logo