On Wednesday, 24 June 2015 at 07:52:10 UTC, Charles Hawkins wrote:
On Wednesday, 24 June 2015 at 06:54:57 UTC, weaselcat wrote:
On Tuesday, 23 June 2015 at 06:50:28 UTC, Charles Hawkins
wrote:
[...]
you can instruct dub to use other compilers with the
--compiler option
valid options include
On Tuesday, 23 June 2015 at 06:50:28 UTC, Charles Hawkins wrote:
On Tuesday, 23 June 2015 at 03:31:37 UTC, weaselcat wrote:
On Tuesday, 23 June 2015 at 03:29:14 UTC, Charles Hawkins
wrote:
[...]
Try to compile with either ldc or gdc and the -g flag, it
should give you a backtrace. dmd seems
On Tuesday, 23 June 2015 at 03:29:14 UTC, Charles Hawkins wrote:
Thanks, Adam. I'm coming from OCaml and haven't seen a seg
fault in years. Didn't recognize it. :D Hopefully I can
figure it out from here.
Try to compile with either ldc or gdc and the -g flag, it should
give you a backtrace
On Wednesday, 17 June 2015 at 07:53:16 UTC, Atila Neves wrote:
I thought it was because I was weird and I use gold as my
linker, but ld.bfd produced the same results. The most I could
find in bug reports was someone complaining it used to work but
the consensus was that it never did?
Atila
On Wednesday, 17 June 2015 at 11:07:29 UTC, weaselcat wrote:
On Wednesday, 17 June 2015 at 07:53:16 UTC, Atila Neves wrote:
I thought it was because I was weird and I use gold as my
linker, but ld.bfd produced the same results. The most I could
find in bug reports was someone complaining it use
On Friday, 12 June 2015 at 10:54:46 UTC, Chris wrote:
Has anyone run into problems with D on AMD processors? I'm
talking about Windows 7 on a HP625 laptop in particular.
Can you be any more specific? What kind of problems?
On Thursday, 11 June 2015 at 07:57:47 UTC, Per Nordlöw wrote:
On Wednesday, 10 June 2015 at 22:03:52 UTC, Ali Çehreli wrote:
Another option:
void main()
{
auto a2 = new ubyte[5];
But this causes an extra zero-initialization of a2.
just an fyi, gdc optimizes this away(looks like it overwr
On Monday, 8 June 2015 at 10:49:59 UTC, Ilya Yaroshenko wrote:
On Monday, 8 June 2015 at 10:42:00 UTC, Kadir Erdem Demir wrote:
I want to use my char array with awesome, cool std.algorithm
functions. Since many of this algorithms requires like slicing
etc.. I prefer to create my string with Utf
On Friday, 22 May 2015 at 00:23:30 UTC, Dennis Ritchie wrote:
Hi,
I've collected some of Python's features. It seems to me that
they are not in the D!
Surely all this is in the D? :)
http://rextester.com/CNQQR
After another review, I think some of these conversions to D
could be express
On Saturday, 23 May 2015 at 17:17:17 UTC, Andrei Alexandrescu
wrote:
On 5/21/15 2:35 PM, Ali Çehreli wrote:
On 05/21/2015 12:44 PM, Meta wrote:
All we need is user-defined opIs and then we're really
cooking with gas.
if (5 is between(4, 6))
{
//...
}
We're almost there. :)
bool is_be
On Saturday, 23 May 2015 at 07:03:35 UTC, Vladimir Panteleev
wrote:
int[] arr = [1, 2, 3];
auto r = iota(4, 10);
// ???
assert(equal(arr, iota(1, 10)));
import std.array : array;
arr ~ r.array;
On Saturday, 23 May 2015 at 08:35:45 UTC, weaselcat wrote:
On Saturday, 23 May 2015 at 07:03:35 UTC, Vladimir Panteleev
wrote:
int[] arr = [1, 2, 3];
auto r = iota(4, 10);
// ???
assert(equal(arr, iota(1, 10)));
import std.array : array;
arr ~ r.array;
woops, meant ~=
but this is probably f
On Friday, 22 May 2015 at 05:47:28 UTC, Mike Parker wrote:
I've always used opSlice to produce empty slices, but having
recently read the documentation at [1], I see this:
"To overload a[], simply define opIndex with no parameters:"
And no mention that opSlice can fill the same role. Am I righ
On Friday, 22 May 2015 at 01:52:30 UTC, Dennis Ritchie wrote:
On Friday, 22 May 2015 at 01:17:17 UTC, weaselcat wrote:
D doesn't have list comprehensions, so it's difficult to
directly port these.
I can not imagine how difficult it is to implement it in D, but
I'm pretty sure that nested for
On Friday, 22 May 2015 at 00:23:30 UTC, Dennis Ritchie wrote:
Hi,
I've collected some of Python's features. It seems to me that
they are not in the D!
Surely all this is in the D? :)
http://rextester.com/CNQQR
D doesn't have list comprehensions, so it's difficult to directly
port these.
On Thursday, 21 May 2015 at 17:36:00 UTC, Laeeth Isharc wrote:
https://www.quora.com/What-does-Bjarne-Stroustrup-think-about-different-programming-languages
The C++ standard committee already reviewed static_if
IIRC Andrei and Walter said they were being incredibly unfair.
http://forum.dlang.
On Thursday, 21 May 2015 at 23:14:47 UTC, Dennis Ritchie wrote:
On Thursday, 21 May 2015 at 21:35:22 UTC, Ali Çehreli wrote:
We're almost there. :)
bool is_between(T0, T1, T2)(T0 what, T1 min, T2 max)
{
return (what >= min) && (what <= max);
}
void main()
{
if (5.is_between(4, 6)) {
On Saturday, 16 May 2015 at 02:04:39 UTC, Vlad Levenfeld wrote:
I think this code should be allowed, but it isn't:
struct Functor (T)
{
T a;
auto ref fmap (alias f)()
{
return Functor (f(a));
On Saturday, 16 May 2015 at 02:06:45 UTC, weaselcat wrote:
very long standing compiler bug
https://issues.dlang.org/show_bug.cgi?id=3051
see also
https://issues.dlang.org/show_bug.cgi?id=5710
unsure if they're duplicate bugs, never really looked into it.
On Wednesday, 13 May 2015 at 09:01:05 UTC, Gerald Jansen wrote:
On Wednesday, 13 May 2015 at 03:19:17 UTC, thedeemon wrote:
In case of Python's parallel.Pool() separate processes do the
work without any synchronization issues. In case of D's
std.parallelism it's just threads inside one process
On Sunday, 10 May 2015 at 14:41:17 UTC, Ali Çehreli wrote:
On 05/10/2015 12:45 AM, Marko Grdinic wrote:
I works just fine on Windows, but I am having difficulty
figuring out
what the trouble is on my Bodhi 1.4 Virtual Box. I've followed
the
instruction on the Codeblocks Wiki and set the paramet
On Sunday, 10 May 2015 at 10:43:37 UTC, tcak wrote:
On Sunday, 10 May 2015 at 09:44:42 UTC, tcak wrote:
I am testing my web server right now. I started 5 separate
consoles and continuously sending request by using "curl" to
it.
It uses shared memory as well, thought from `ipcs -a`, I don't
s
On Wednesday, 6 May 2015 at 07:56:53 UTC, Daren Scot Wilson wrote:
Someone looks at a chunk of D code of murky origin. Possibly,
it is old, maybe D1 not D2. Inadequately commented, believe it
or not, and not other information.
What are some easy to spot details in the syntax by which the
on
On Thursday, 30 April 2015 at 20:07:11 UTC, bitwise wrote:
After reading GC page in the reference, it seems that class
destructors are called on a separate thread, in parallel to the
main thread. Is this correct?
There's no guarantee what thread will be used in the standard GC
implementation
On Tuesday, 28 April 2015 at 21:45:10 UTC, PhilipDaniels wrote:
Beginner question. Given
if (startsWith(input, "0x", "0X"))
How do I turn that into a case-insensitive startsWith?
startsWith says it takes a predicate but I can't figure out how
to pass it one. The examples all use "a == b" !?
On Sunday, 26 April 2015 at 17:14:22 UTC, extrawurst wrote:
On Saturday, 25 April 2015 at 18:30:33 UTC, Baz wrote:
On Saturday, 25 April 2015 at 09:56:25 UTC, tired_eyes wrote:
I think this is ugly and clunky approach, what is the
beautiful one?
What you clearly need is a serializer:
look at
On Wednesday, 22 April 2015 at 04:54:39 UTC, Martin Nowak wrote:
On Tuesday, 21 April 2015 at 15:36:28 UTC, Jadbox wrote:
What's the best equivalent to Rust's structural enum/pattern
(match)ing? Is it also possible to enforce exhaustive matches?
Basically, I'm curious on what the best way to do
On Tuesday, 21 April 2015 at 15:36:28 UTC, Jadbox wrote:
What's the best equivalent to Rust's structural enum/pattern
(match)ing? Is it also possible to enforce exhaustive matches?
Basically, I'm curious on what the best way to do ADTs in D.
D's ADTs are in std.variant, the equivalent of match
On Tuesday, 21 April 2015 at 01:31:58 UTC, TheGag96 wrote:
Hi guys! I had this homework assignment for data structures
that has a pretty easy solution in C++. Reading input like
this...
1 2 3 # $
4 3 * ! #
20 3 / # $ #
62 # $
2 3 8 * + #
4 48 4 2 + / #
SUM # $
1 2 3 4 5 #
R #
@
...where "@" d
On Tuesday, 31 March 2015 at 20:56:09 UTC, Laeeth Isharc wrote:
Trying on a different beefier machine with 2.066 and 2.067
release versions installed:
1mm allocations:
2.066: 0.844s
2.067: 0.19s
10mm allocations
2.066: 1m 17.2 s
2.067: 0m 1.15s
So numbers were ballpark right before, and all
On Tuesday, 31 March 2015 at 03:12:42 UTC, ketmar wrote:
On Tue, 31 Mar 2015 01:40:52 +, weaselcat wrote:
was this ever solved?
nope. there were some suggestions, but no decision was made.
sigh
do you know if there's an open enhancement request for this?
was this ever solved?
I did some research and saw static immutable ones suggested a few
times, but they can't be chained AFAIK.
On Monday, 30 March 2015 at 03:02:07 UTC, Paul O'Neil wrote:
On 03/29/2015 10:57 PM, weaselcat wrote:
On Monday, 30 March 2015 at 02:53:36 UTC, Paul O'Neil wrote:
As of dmd 2.067, doing "&this" is deprecated.
where is this documented? I don't see it in the release notes.
I don't see it in
On Monday, 30 March 2015 at 02:53:36 UTC, Paul O'Neil wrote:
As of dmd 2.067, doing "&this" is deprecated.
where is this documented? I don't see it in the release notes.
On Tuesday, 24 March 2015 at 15:51:00 UTC, matovitch wrote:
Hi,
It's been a long time since I coded some d code... sorry I take
the lazy way asking for advices. :D
Lets say I want to implement some generic algorithm. I would
like
to checks the types passed to my algorithm implements a specifi
On Monday, 23 March 2015 at 22:39:28 UTC, rumbu wrote:
I have only one template and I think it's impossible to define
specializations since it's supposed that a random member of
A... will be passed sometime by reference:
auto ref?
http://dlang.org/template.html#auto-ref-parameters
On Friday, 20 March 2015 at 14:25:22 UTC, ref2401 wrote:
Why aren't methods of class final by default?
history
use final class, it should devirtualize all methods.
see: https://github.com/D-Programming-Language/dmd/pull/4427
On Sunday, 15 March 2015 at 22:21:04 UTC, ketmar wrote:
On Sun, 15 Mar 2015 21:59:16 +, Charles Cooper wrote:
C++14 has:
template constexpr T&
get(tuple& t);
Which allows you to get a member of the tuple struct by type.
Is there
an idiomatic / library way to do this in D? Preferably by
i
On Saturday, 14 March 2015 at 23:46:28 UTC, Ellery Newcomer wrote:
And C# has LINQ, which when combined with the last point is
fricken awesome.
what does LINQ offer that UFCS-style functional programming does
not?
On Friday, 13 March 2015 at 12:49:48 UTC, Dennis Ritchie wrote:
On Friday, 13 March 2015 at 02:38:18 UTC, Rikki Cattermole
wrote:
You could assign it to e.g. an enum. Or force it over using
meta-programming.
And this code can be rewritten to D?
template
struct Factorial
{
enum { value =
On Friday, 13 March 2015 at 13:16:27 UTC, weaselcat wrote:
On Friday, 13 March 2015 at 12:49:48 UTC, Dennis Ritchie wrote:
On Friday, 13 March 2015 at 02:38:18 UTC, Rikki Cattermole
wrote:
You could assign it to e.g. an enum. Or force it over using
meta-programming.
And this code can be rewri
On Thursday, 12 March 2015 at 13:01:31 UTC, ayush wrote:
Is D a lot like c++ ? I am currently midway through learning
c++ and I also want to learn D . So should i focus on one or
learn both together? Will I find learning D easy if I already
know c++ ?
D is very much like C++, but the biggest
On Thursday, 12 March 2015 at 05:01:50 UTC, amber wrote:
On Thursday, 12 March 2015 at 04:51:42 UTC, amber wrote:
On Thursday, 12 March 2015 at 04:04:28 UTC, weaselcat wrote:
On Thursday, 12 March 2015 at 03:12:15 UTC, amber wrote:
...
http://dlang.org/function.html#function-attribute-inferenc
On Thursday, 12 March 2015 at 03:12:15 UTC, amber wrote:
...
http://dlang.org/function.html#function-attribute-inference might
be a good read if you haven't read it already.
On Sat, Mar 7, 2015 at 4:02 PM, weaselcat via
Digitalmars-d-learn <
digitalmars-d-learn@puremagic.com> wrote:
On Saturday, 7 March 2015 at 23:48:39 UTC, Timothee Cour wrote:
I'm a little confused about the following:
clear,delete,destroy.
My understanding is that clear is deprecate
On Saturday, 7 March 2015 at 23:48:39 UTC, Timothee Cour wrote:
I'm a little confused about the following:
clear,delete,destroy.
My understanding is that clear is deprecated and delete is
planned to be
deprecated, so we should only ever use destroy (which
deterministic calls
the destructor but
Seems barely maintained and there was a proposed replacement
claiming it was broken(http://wiki.dlang.org/Review/std.signal)
that never got approved.
Is std.signals worth using over a dub package?
On Friday, 27 February 2015 at 04:12:50 UTC, AJ wrote:
On Thursday, 26 February 2015 at 20:23:10 UTC, Rinzler wrote:
I a beginner with D, actually I have almost done nothing. I am
using a Mac, and Xamarin Studio seem to be the best choice,
but I am not even able to make it auto-complete the sta
On Saturday, 14 February 2015 at 06:38:19 UTC, ketmar wrote:
On Sat, 14 Feb 2015 00:57:33 +, weaselcat wrote:
On Friday, 13 February 2015 at 22:55:27 UTC, anonymous wrote:
On Thursday, 12 February 2015 at 23:52:41 UTC, Foo wrote:
This is something I've done recently.
Would be glad if my c
On Friday, 13 February 2015 at 22:55:27 UTC, anonymous wrote:
On Thursday, 12 February 2015 at 23:52:41 UTC, Foo wrote:
This is something I've done recently.
Would be glad if my code will help you:
https://github.com/Dgame/m3
Especially the m3.d module could be useful for you.
/* Class and Str
On Thursday, 12 February 2015 at 08:33:35 UTC, Kagamin wrote:
Truth be told, D has no guideline for deterministic destruction
of managed resources.
+1
don't complain about people wondering why class destructors don't
work when there's no _real_ way to do it in D beyond 'drop down
to C level
(Scope might have been a bad word choice...)
Is @nogc intended to only stop from calling functions that
allocate with the GC, or from interacting with the GC altogether?
Is there a technical reason that functions such as addrange, etc
cannot be @nogc if the former since AFAIK such functions do
On Tuesday, 10 February 2015 at 05:09:00 UTC, Jakob Ovrum wrote:
On Tuesday, 10 February 2015 at 04:44:55 UTC, weaselcat wrote:
Thread title.
interface Itest{
}
class testclass : Itest{
}
void main()
{
import std.typecons;
auto test = RefCounted!Itest(new testclass());
}
If you chang
Thread title.
interface Itest{
}
class testclass : Itest{
}
void main()
{
import std.typecons;
auto test = RefCounted!Itest(new testclass());
}
If you change the refcounted to type testclass it doesn't compile
because refcounted doesn't support classes.
Is this a bug, or intended?
On Sunday, 8 February 2015 at 05:57:31 UTC, Lave Zhang wrote:
Hi,
My first D program is like this:
---
import std.stdio;
void main(string[] args)
{
dstring s1 = "hello你好"d;
writeln(s1);
}
---
But the output is not corre
On Saturday, 7 February 2015 at 22:09:03 UTC, Gan wrote:
Is there a better D graphics library in the works?
I'm using SFML(which is very easy and has lots of features) but
it seems to use a lot of ram(if you leave it running for a
while on a graphic intensive scene) and trying to make it
incl
On Friday, 6 February 2015 at 05:18:45 UTC, Gan wrote:
Is there a simple way of conversion? Something like:
uint length = to!uint(buffer[0 .. 4]);
Right now I have:
uint length = *cast(uint*)buffer[0 .. 4].ptr;
Which I'm not entirely sure is the correct way to do that.
Hi,
check out std.bitm
On Sunday, 25 January 2015 at 03:55:18 UTC, Adam D. Ruppe wrote:
Use alias this if you want implicit conversions too.
Proxy keeps the types separate
void foo(Base b) { }
struct Modified {
Base b;
alias b this;
}
foo(Modified()); //works
That wouldn't work if it was proxied though, whi
I can't find much documentation/usage of typecons.proxy, but it
seems extremely similar to alias this.
The documentation page(
http://dlang.org/library/std/typecons/proxy.html ) doesn't really
seem to elaborate on this at all.
On Wednesday, 21 January 2015 at 17:14:29 UTC, Meta wrote:
On Wednesday, 21 January 2015 at 08:23:44 UTC, Per Nordlöw
wrote:
On Wednesday, 21 January 2015 at 08:22:44 UTC, Per Nordlöw
wrote:
int x;
auto ref xr;
Correction: I, of course mean,
int x = 42;
auto ref xr = x;
Walter is
On Sunday, 18 January 2015 at 19:51:02 UTC, WhatMeWorry wrote:
On Sunday, 18 January 2015 at 19:42:33 UTC, WhatMeWorry wrote:
I've got a OpenGL function returning a pointer
// const GLubyte *version = glGetString(GL_VERSION); // C++
and openLG code
// the following compiles with no errors
61 matches
Mail list logo