Unsure of exactly how to communicate this one, so posting here.
Compilation of https://github.com/dcarp/asynchronous.
Using 'dub --verbose build' produces:
dmd -lib
-of.dub/build/library-debug-linux.posix-x86_64-dmd_2071-7450FEAE5605F646044C35441C27D67E/libasynchronous.a
-debug -g -w
try:
auto names1 = names.map!( a = replace(a, _, ));
...not sure how to do it in-place though.
Joel wrote:
auto names =
Alef Bet Gimel Dalet He Vav Zayen Het Tet Yod Final_Kaf
Kaf Lamed Final_Mem Mem Final_Nun Nun Samekh Ayin Final_Pe
Pe Final_Tsadi Tsadi Qof Resh Shin Tav.split;
try replacing:
final void output(T)(string text, T params...) const {
with
final void output(T...)(string text, T params) const {
Andre Polykanine via Digitalmars-d-learn wrote:
Hi everyone,
It's me again.
Now I'm struggling with the `output` member function which should
I confess to being a bit confused overall - there is a bit of overlap and
confusion for someone who wishes to venture into this area. Please bear
with me:
From wiki.dlang.org - 'Get involved'. So far so good.
From here, I can go to 'Building DMD' and 'How to Fork and Build
dlang.org', which
cheers for that - that differentiation/distinction wasn't clear (to me).
anonymous wrote:
On Saturday 22 August 2015 11:05, ted wrote:
From here, I can go to 'Building DMD' and 'How to Fork and Build
dlang.org', which both seem to build DMD - I'm unsure of the overlap
aspects here.
The
Is this behaviour expected ?
(dmd2.068, linux 64bit)
dmd -oftest test.d
(string, uint, bool)
tuple(a, b, c)
(string, uint, bool)
tuple(, , )
(i.e. ParameterIdentifierTuple does not appear to work for interfaces? -
what am I doing incorrectly?)
test.d:
import std.traits;
interface IFoo {
thanks for the reply...
the method you described is suitable for appending to an array, but I'm
using the singly-linked-list container.
I've extended the test, and I'm pretty sure it's a bug...
--ted
Nicholas Wilson wrote:
On Thursday, 13 August 2015 at 08:40:13 UTC, ted wrote:
have
Hi,
(earlier posting on D.learn, but better test included here)...
dmd.2.067, dmd.2068 (64bit linux)
import std.container: SList;
void main()
{
SList!int tmp=( 4 );
SList!int tmp1;
// Ensure tmp is empty
tmp.removeAny();
assert( tmp.empty == true );
// Both tmp and
have upgraded from 2.066.1 to 2.068.0, and have a change in behaviour:
import std.container: SList;
void main()
{
SList!int tmp;
tmp.insertAfter( tmp[], 3 );
}
used to work happily with dmd2.066.1, causes assert
(core.exception.AssertError@std/container/slist.d(57): Assertion
Andrei Alexandrescu wrote:
We have a few candidates for solutions, but wanted to open with a good
discussion first. So, how do you envision a way to define and access
mutable metadata for objects (including immutable ones)?
Andrei
It seems to me that (in the particular case of _this_
Andrei Alexandrescu wrote:
On 2/27/15 1:09 AM, ted wrote:
Andrei Alexandrescu wrote:
http://wiki.dlang.org/DIP74 got to reviewable form. Please destroy and
discuss.
Thanks,
Andrei
Trivial typos:
struct, class, and closure types that have RCO members accommodate calls
to Release
Andrei Alexandrescu wrote:
http://wiki.dlang.org/DIP74 got to reviewable form. Please destroy and
discuss.
Thanks,
Andrei
Trivial typos:
struct, class, and closure types that have RCO members accommodate calls to
Release during their destruction.
s/Release/opRelease/
Explicit casting
Hi!
I get the following compile error (linux, dmd2.066.1):
test.d(13): Error: template test.testFunc cannot deduce function from
argument types !()(double[], double), candidates are:
test.d(3):test.testFunc(R)(R range, ElementType!R foo)
For the following test file:
import std.range:
Ali Çehreli wrote:
On 02/10/2015 12:31 AM, ted wrote:
ElementType!R testFunc(R)( R range, ElementType!R foo) //
compiles
with double foo
If think it is a little too much to ask from the template system of D. A
proper way of doing the same thing is to use a template constraint:
bearophile wrote:
ted:
Could someone enlighten me ?
This works:
import std.range: ElementType, isInputRange;
ElementType!R testFunc(R, T)(R range, T foo)
if (is(ElementType!R == T)) {
static assert(isInputRange!R);
typeof(return) retVal = foo ^^ 2; // More DRY.
bearophile wrote:
ted:
... where you say 'More DRY' above, are you referring to
I was referring to both, but mostly to the typeof. It's more DRY
(http://en.wikipedia.org/wiki/Don%27t_repeat_yourself ). You are
stating only once the type of the return variable. This is less
bug-prone.
Ali Çehreli wrote:
On 01/02/2015 10:10 PM, ted wrote:
I'm now taking the view that const is there for the compiler to
optimise code on the basis that nothing can alter it once set (and can
only be set on initialisation).
Of course, that is true for const values, not for const
Darrell wrote:
Seems when creating your own ranges they can't be a class.
Must be a struct or Segmentation fault (core dumped) will follow.
This works as long as Test is a struct.
struct Test
{
@property int front()
{
return 2;
}
void popFront()
{
}
ketmar via Digitalmars-d-learn wrote:
On Sat, 03 Jan 2015 14:45:24 +1030
ted via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote:
Well, I just cleared up some of my misunderstanding.
I did not realise the mA (within struct Test) would be a _copy_ of arg,
not a reference
via Digitalmars-d-learn wrote:
On Sat, 03 Jan 2015 13:25:31 +1030
ted via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote:
I get the following error from the code below: (dmd2.066.1, linux)
test.d(26): Error: cannot modify struct myTest1 Test with immutable
members
ketmar via Digitalmars-d-learn wrote:
On Sat, 03 Jan 2015 15:56:58 +1030
ted via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote:
Ironically, I'm trying to use const in an effort to understand it...but
there seems to be an unusual amount of pain until I grok it.
just remember
Well, I just cleared up some of my misunderstanding.
I did not realise the mA (within struct Test) would be a _copy_ of arg, not
a reference (pointer) to arg.
So the more correct code snippet would be:
struct A
{
int someInt;
}
struct Test
{
@property { const(A) getA() { return *mA;
I get the following error from the code below: (dmd2.066.1, linux)
test.d(26): Error: cannot modify struct myTest1 Test with immutable members
Is this expected?
If so, how can I achieve this result - being able to set (a new) initial value
of myTest1 from within an nested function ?
thanks !
Tom Browder via Digitalmars-d wrote:
Has anyone done a survey of the primary OS of D users?
I (a D newbie) use Debian Linux (64-bit), but I get the feeling that
many (if not most) users are on some version of Windows.
Thanks.
Best regards,
-Tom
Gentoo linux 64-bit
Hi,
I've made an attempt at porting Richard Lord's Ash component/entity system to
D.
It was mainly an exercise in learning about component/entity systems.
It tries to remain faithful to the API of ash, but there were some aspects of
ActionScript that did not map cleanly.
It passes all the
25 matches
Mail list logo