On Sunday, 30 April 2017 at 19:05:18 UTC, bauss wrote:
On Sunday, 30 April 2017 at 16:15:41 UTC, Xinok wrote:
On Sunday, 30 April 2017 at 15:31:39 UTC, Jolly James wrote:
Is there a String Comparison Operator in D?
Yeah, just the usual comparison operators:
"abc" == "abc"
"abc" != "ABC"
~
On Sunday, 30 April 2017 at 15:31:39 UTC, Jolly James wrote:
Is there a String Comparison Operator in D?
Yeah, just the usual comparison operators:
"abc" == "abc"
"abc" != "ABC"
~ is for string concatenation, i.e.:
"abc" ~ "def" == "abcdef"
On Saturday, 15 April 2017 at 20:04:13 UTC, Jonas Drewsen wrote:
Hi all
I shared my thoughts on such a feature just a couple weeks ago:
https://forum.dlang.org/post/oedeijdewmhazaqaz...@forum.dlang.org
On Tuesday, 4 April 2017 at 02:43:26 UTC, evilrat wrote:
String interpolation would be nice too, it would really help
with readability!
This really isn't in the spirit of D and is better left to
library functions which give the user far more power and
flexibility. Incorporating such a
On Saturday, 19 November 2016 at 03:52:02 UTC, Ryan wrote:
Why do I see double `not` operators sometimes in D code? An
example it the last post of this thread.
http://forum.dlang.org/thread/ktlpnikvdwgbvfaam...@forum.dlang.org
import core.sys.windows.windows : GetConsoleCP;
bool hasConsole =
On Thursday, 1 September 2016 at 05:37:50 UTC, Manu wrote:
So, consider a set of overloads:
void f(T)(T t) if(isSomething!T) {}
void f(T)(T t) if(isSomethingElse!T) {}
void f(T)(T t) {}
I have a recurring problem where I need a fallback function
like the bottom one, which should be used
On Sunday, 14 August 2016 at 21:21:25 UTC, Nordlöw wrote:
I advice you all to read about IPFS at
https://ipfs.io/
...
It sounds interesting but what concerns me is the lack of
attention given to privacy and anonymity, two things that should
be core values and top priorities for any protocol
On Friday, 17 June 2016 at 22:15:47 UTC, ketmar wrote:
i put it under unlicense[1], as some other works of the same
author is using it, and it is basically the same PD.
[1] http://unlicense.org/
Unfortunately, using unlicense is just as problematic as using
public domain:
On Tuesday, 24 May 2016 at 18:51:32 UTC, Andrei Alexandrescu
wrote:
On 05/24/2016 02:48 PM, Xinok wrote:
BTW, Phobos already has a function called bringToFront which
can
rotate/roll ranges but the interface is a bit different
compared to
other languages.
On Monday, 23 May 2016 at 20:01:08 UTC, Andrei Alexandrescu wrote:
...
I wish to make a different point which is more general regarding
ideas like these. I see a lot of proposals to add this or that to
the standard library and a lot of debate pursues. One point I've
never seen mentioned
On Monday, 23 May 2016 at 20:01:08 UTC, Andrei Alexandrescu wrote:
So swap(a, b) swaps the contents of a and b. This could be
easily generalized to multiple arguments such that swap(a1, a2,
..., an) arranges things such that a1 gets an, a2 gets a1, a3
gets a2, etc. I do know applications for
On Wednesday, 18 May 2016 at 19:54:19 UTC, Andrei Alexandrescu
wrote:
...
No worries. Please take anything you need from there for your
code, make it better, and contribute it back to the stdlib! --
Andrei
As it turns out, easier said than done. I've been thinking about
it for a few days
On Tuesday, 17 May 2016 at 19:27:22 UTC, Xinok wrote:
On Tuesday, 17 May 2016 at 17:31:47 UTC, Andrei Alexandrescu
wrote:
We should take advantage of the improved partition code I
discussed at ACCU. Also there's a person on
On Tuesday, 17 May 2016 at 17:31:47 UTC, Andrei Alexandrescu
wrote:
We should take advantage of the improved partition code I
discussed at ACCU. Also there's a person on
https://www.reddit.com/r/programming/comments/4jlkhv/accu_2016_keynote_by_andrei_alexandrescu/ discussing a simpler algorithm
On Monday, 16 May 2016 at 18:25:23 UTC, Chris wrote:
I had a look at Loci, more specifically the language goals[1]:
...
I've been skimming through the docs and found one mention of D:
http://loci-lang.org/Exceptions.html#scope-exit-block
It seems to me that Loci is not a very "inspired"
On Monday, 9 May 2016 at 20:14:36 UTC, Walter Bright wrote:
On 5/9/2016 11:37 AM, Xinok wrote:
All of these scenarios are capable of producing "incorrect"
results, are a
source of discrete bugs (often corner cases that we failed to
consider and
test), and can be hard to detect. It's about time
On Monday, 9 May 2016 at 18:51:58 UTC, tsbockman wrote:
On Monday, 9 May 2016 at 18:37:10 UTC, Xinok wrote:
...
(3) Generalize it to all comparisons as well, including < and
...
(3) Makes no sense though; inequalities with mixed
floating-point types are perfectly safe. (Well, as safe as any
On Monday, 9 May 2016 at 09:10:19 UTC, Walter Bright wrote:
Don Clugston pointed out in his DConf 2016 talk that:
float f = 1.30;
assert(f == 1.30);
will always be false since 1.30 is not representable as a
float. However,
float f = 1.30;
assert(f == cast(float)1.30);
will
D has a few ways of writing lambda expressions / anonymous
functions:
x => doSomething()
{ doSomething(); }
(){ doSomething(); }
While the flexibility is great, there's a hidden issue for those
programmers who come from different languages and are used to
writing:
x => {
On Monday, 25 April 2016 at 15:35:14 UTC, Dominikus Dittes
Scherkl wrote:
On Monday, 25 April 2016 at 15:27:02 UTC, Xinok wrote:
Brute force.
http://dpaste.dzfl.pl/882d7cdc5f74
Yeah. And your test spares the failed case int.min (0x8000),
because in this case x & -x is negative, but of
On Monday, 25 April 2016 at 12:56:27 UTC, Andrei Alexandrescu
wrote:
On 4/25/16 6:42 AM, Solomon E wrote:
On Monday, 25 April 2016 at 05:35:12 UTC, Andrei Alexandrescu
wrote:
With gdc https://godbolt.org/g/jcU4np isPow2B is the winner
(shortest
code, simplest instructions). -- Andrei
I
On Sunday, 24 April 2016 at 23:17:53 UTC, David Nadlinger wrote:
On Sunday, 24 April 2016 at 23:00:56 UTC, Temtaime wrote:
Please no cmp.
Just
bool isPowerOf2(uint x) { return x && !(x & (x - 1)); }
You do realise that this will (typically) emit a branch?
— David
I compiled using dmd -O
On Monday, 25 April 2016 at 01:17:48 UTC, Xinok wrote:
...
Sorry, didn't mean to say David's solution. Too many edits. >_<
On Friday, 8 April 2016 at 10:15:10 UTC, Dicebot wrote:
On Friday, 8 April 2016 at 09:56:41 UTC, Nick Treleaven wrote:
Semantically, array literals are always allocated on the
heap. In this case, the optimizer can obviously place the
array on the stack or even make it static/global.
So @nogc
On Friday, 8 April 2016 at 01:36:18 UTC, rcorre wrote:
@nogc unittest {
int[2] a = [1, 2];
assert(a == [1, 2]); // OK
immutable(int)[2] b = [1, 2];
assert(b == [1, 2]); // fail: array literal may cause
allocation
}
Is there any logic behind allowing the comparison with `a`
On Friday, 25 March 2016 at 07:14:52 UTC, Seb wrote:
- dont add @nogc, @pure, @safe attributes yourself - let the
compiler infer it!
I'd argue this is only applicable to some functions, not all. In
particular, for non-templated functions,
- avoid to use `auto` as return type
I understand
On Tuesday, 22 March 2016 at 14:08:55 UTC, _d0s_ wrote:
Idea1: a general interface to describe n-dimensional matrices
Perhaps this is what you're looking for?
https://dlang.org/phobos/std_experimental_ndslice.html
On Monday, 21 March 2016 at 17:46:05 UTC, Dmitry Olshansky wrote:
...
The main use case in Go that needs it specifically as a
function level primitive is this:
files := []File{}
for i := paths {
files[i], err := os.Open(paths[i])
if err != nil {
return
I stumbled upon an example demonstrating defer in Go which I
thought was interesting. Defer is similar to scope in D except
they're called at end of function rather than end of scope; you
can queue multiple defer calls by writing them inside of a loop.
This implies that it internally builds a
On Thursday, 10 March 2016 at 21:07:09 UTC, FatalCatharsis wrote:
I am very new to D so I apologize if I'm very uninformed. I'm
learning D by porting a big (awful) c++ project to D so that I
may take advantage of all the lovely testing and QA features. I
am currently moving a class over that I
On Wednesday, 9 March 2016 at 15:39:55 UTC, rcorre wrote:
Still curious as to why it fails; maybe the range is getting
copied at some point? I guess I need to step through it.
That's my suspicion as well. It seems that OnlyResult is
pass-by-value so every time it gets passed to another
On Sunday, 6 March 2016 at 07:45:58 UTC, Ola Fosheim Grøstad
wrote:
I think it would be better idea to just add the ability to add
unicode operators, and to avoid precedence issues one could
just require them to use parentheses. That way you could define
opCustom"•" and use it as:
( point1 •
On Tuesday, 23 February 2016 at 19:43:43 UTC, rsw0x wrote:
...
How does this differ from the example I gave where the branch
is only taken if the pointer is non-null?
D doesn't prevent you from dereferencing a null pointer whereas
these scenarios should be impossible in Kotlin as well as
On Tuesday, 23 February 2016 at 07:18:09 UTC, rsw0x wrote:
On Tuesday, 23 February 2016 at 06:49:46 UTC, Tobias Müller
wrote:
OTOH in the examples in Kotlin/Rust the variable 'var' changes
its type
from 'int?' to plain 'int'.
In Kotlin this is done with static analysis, in Rust with
rebinding
On Saturday, 20 February 2016 at 09:40:40 UTC, Tobias Müller
wrote:
...
It's not much more verbose but more explicit.
Changing the type of a variable based on static analysis is
just advanced
obfuscation. It hurts readability and the gain is questionable.
At least it
only works for nullable
On Wednesday, 17 February 2016 at 22:57:20 UTC, Márcio Martins
wrote:
I was reading the other thread "Speed kills" and was wondering
if there is any practical reason why DMD is the official
compiler?
...
I pretty much asked this same question a little over a year ago.
Thread is here:
On Friday, 12 February 2016 at 20:43:24 UTC, Taylor Hillegeist
wrote:
So I have this code and I have to add the element
.each!(a => a.each!("a"));
to the end in order for it to evaluate the range completely and
act like I expect it too. Is there a better thing to put in
the place of
.each!(a
On Saturday, 13 February 2016 at 01:11:53 UTC, Nicholas Wilson
wrote:
...
If you just want the range evaluated use walkLength
It might work in this case, but in general this won't work for
any range which defines .length as a member. In that case,
walkLength will simply return .length of
On Saturday, 13 February 2016 at 03:16:09 UTC, cym13 wrote:
On Saturday, 13 February 2016 at 02:17:17 UTC, Xinok wrote:
On Friday, 12 February 2016 at 20:43:24 UTC, Taylor Hillegeist
wrote:
So I have this code and I have to add the element
.each!(a => a.each!("a"));
to the end in order for it
On Monday, 8 February 2016 at 23:25:00 UTC, Andrei Alexandrescu
wrote:
Consider defining a function that partitions a range around a
given index like this:
size_t pivotPartition(alias less = (a, b) => a < b, Range)
(Range r, size_t pivot);
Returns x, one of the the indexes that r[pivot] would
On Sunday, 7 February 2016 at 18:46:48 UTC, Nick Sabalausky wrote:
I was just updating a project's .travis.yml file and noticed:
It doesn't seem we have any one-stop-shop location to check all
the versions of DMD/LDC/GDC currently available on travis-ci.
It's be really nice if we had some
On Friday, 5 February 2016 at 17:33:55 UTC, Era Scarecrow wrote:
On Friday, 5 February 2016 at 15:41:11 UTC, Fool wrote:
One swap usually decomposes into three moves.
Recently from reading some interesting hacks and super code, a
good swap can also be done via 3 xor operations (and avoiding
On Friday, 5 February 2016 at 15:13:56 UTC, tn wrote:
On Thursday, 4 February 2016 at 20:30:57 UTC, Timon Gehr wrote:
At most 6 comparisons, <=3 swaps, idempotent (optimal number
of swaps):
...
Inspired by this, I made four other versions of the function
that are shorter but make more
On Thursday, 4 February 2016 at 20:30:57 UTC, Timon Gehr wrote:
At most 6 comparisons, <=3 swaps, idempotent (optimal number of
swaps):
void partition5(ref int[5] a){
if(a[0]
On Thursday, 4 February 2016 at 01:33:54 UTC, Era Scarecrow wrote:
On Thursday, 4 February 2016 at 01:24:15 UTC, Andrei
Alexandrescu wrote:
This appears a simple problem: given numbers a, b, c, d, e,
swap them around so as to place the median in c and partition
the others around it. I.e. the
I'm not sure what the convention is for resurrecting old threads
but I felt it would be best to start fresh. For reference, the
older thread is here:
http://forum.dlang.org/thread/pyduqwmskkkoicsxi...@forum.dlang.org
tl;dr - I studied a paper with the goal of implementing a stable
3-way
On Sunday, 31 January 2016 at 16:30:47 UTC, Ola Fosheim Grøstad
wrote:
On Sunday, 31 January 2016 at 16:18:21 UTC, bearophile wrote:
Regarding the code reliability, D is better than C++11
That's a bold claim. What do you mean by "code reliability"?
You get as strong typing as you want with
On Saturday, 30 January 2016 at 12:11:37 UTC, Ola Fosheim Grøstad
wrote:
Currying is pointless, I believe Swift is removing it. ...
It might be fairly useless in D but it's definitely not useless
in general. It' a different design pattern and functional
languages make great use of it. OTOH,
On Friday, 22 January 2016 at 12:07:11 UTC, abad wrote:
Let's say I have an array like this:
int[][][] array;
And I want to generate a linear int[] based on its data. Is
there a standard library method for achieving this, or must I
iterate over the array manually?
What I'm thinking of is
On Monday, 18 January 2016 at 09:56:17 UTC, Adrian Matoga wrote:
...
Your idea seems interesting, but IMHO a compacting GC should be
the preferred solution for heap fragmentation.
Implementing a compacting GC in D would be exceedingly difficult,
if not impossible, because of raw pointers,
On Monday, 18 January 2016 at 11:46:36 UTC, Nemanja Boric wrote:
On Monday, 18 January 2016 at 09:28:59 UTC, tcak wrote:
On Monday, 18 January 2016 at 08:12:03 UTC, Nemanja Boric
wrote:
Check https://dlang.org/phobos/std_experimental_allocator.html
Which part of this module provide the
On Tuesday, 19 January 2016 at 00:11:40 UTC, Andrei Alexandrescu
wrote:
Of course not. I think this back-and-forth takes away from the
gist of things. So let me summarize what has happened:
1. topN was reportedly slow. It was using a random pivot. I
made it use getPivot (deterministic)
On Tuesday, 15 December 2015 at 01:29:39 UTC, Jakob Ovrum wrote:
Thanks, that makes sense.
String manipulation in D without regex is pretty nice anyway,
so it's not a big loss.
There is a library named Pegged which can match against balanced
parens:
On Sunday, 13 December 2015 at 20:29:47 UTC, Pederator wrote:
Hi. Does anybody who is familair with D consider to make a
comprehensive D programming video tutorial / training / course?
This could be encouraging and helpful for people to start with
D. It could also help in promoting D
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 Monday, 7 December 2015 at 11:26:27 UTC, Bruno Medeiros wrote:
With these developments, one asks again, is it wise to spend
any more time working and using the Digital Mars backend for
D?...
I asked this very question about a year ago. The thread is here:
On Friday, 4 December 2015 at 01:55:15 UTC, Timon Gehr wrote:
Regarding nomenclature, it would be awesome if we could call
this "running time" instead of "complexity". Algorithms have
running times and memory usages. Problems have (time and space)
complexities. I know that calling running time
On Saturday, 14 November 2015 at 14:56:57 UTC, maik klein wrote:
http://dlang.org/phobos/std_experimental_allocator.html
I am not sure what the plan is but it seems to me that the
standard library could make use of the "theAllocator" for
allocation and also allow you to swap in different
The following code compiles and runs:
import std.stdio, std.random;
void main()
{
writeln(rndGen);
}
Since rndGen is an infinite range, this code runs forever. It
seems to be that we need to add a check for isInfinite on writeln
and other related functions.
Does anybody have a use case
On Friday, 13 November 2015 at 01:19:22 UTC, Andrei Alexandrescu
wrote:
On 11/12/2015 08:18 PM, Xinok wrote:
The following code compiles and runs:
import std.stdio, std.random;
void main()
{
writeln(rndGen);
}
Since rndGen is an infinite range, this code runs forever. It
seems to
be
On Saturday, 26 September 2015 at 17:08:00 UTC, Nordlöw wrote:
Why is the following code not pure:
float x = 3.14;
import std.conv : to;
auto y = x.to!string;
???
Is there a reason for it not being pure? If not, this is a
serious problem as this is such a fundamental function.
On Saturday, 12 September 2015 at 16:08:31 UTC, Robert wrote:
On Saturday, 12 September 2015 at 15:49:23 UTC, Atila Neves
wrote:
What do think is unusual?
Atila
It's unusual, because `float.nan != float.nan`, so one might
expect that `typeof(Foo!(float.nan) != Foo!(float.nan))`,
whereas
On Thursday, 3 September 2015 at 23:56:53 UTC, Prudence wrote:
After being away from D and deciding to test the idea of
writing a commercial app in it, There were 2 big things that
have jumped out at me:
1. The setup is a much compared to most modern day compilers
and software. While VS is
On Wednesday, 2 September 2015 at 19:34:53 UTC, Jack Stouffer
wrote:
On Wednesday, 2 September 2015 at 19:15:08 UTC, jmh530 wrote:
I wasn't familiar with version(release). Would you need to
compile with -version=release then?
No, it seems to work with just the -release flag.
The Python
On Monday, 31 August 2015 at 07:38:18 UTC, Enamex wrote:
Some posters on reddit remarked that D's sales pitch on the
website is unnecessarily long and unindicative...
I used to suffer from long compile times, poor move semantics,
and undefined behavior. Then my doctor told me about D...
On Monday, 24 August 2015 at 21:55:40 UTC, Guillaume Chatelet
wrote:
On linux x86_64 : real.sizeof == 16 but it looks like only the
first the first 10 bytes are used (ie. 80bits)
Is there a way to know the real size of a real ?
The best I can think of is to use the mant_dig property which
On Tuesday, 18 August 2015 at 15:51:55 UTC, ixid wrote:
Though sugar seems to be somewhat looked down upon I thought
I'd suggest this- having seen the cartesianProduct function
from std.algorithm in another thread I thought it would be an
excellent piece of sugar in the language. It's not an
On Friday, 14 August 2015 at 18:12:42 UTC, anonymous wrote:
Other insert* functions call the private function
SList.initialize() which does the null-check for _root. I am
working on a PR adding the missing call in insertAfter - that's
a 1 line change. I am not a phobos dev.
I would do the
On Friday, 14 August 2015 at 06:44:53 UTC, ted wrote:
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
On Wednesday, 12 August 2015 at 15:47:37 UTC, Adam D. Ruppe wrote:
Example with them:
...
That's the idea I had except I would use a struct instead because
using a class requires a second allocation.
On Sunday, 2 August 2015 at 14:50:35 UTC, Jacob Carlborg wrote:
I'm trying to read the D grammar [1] to enhance the D TextMate
bundle. If we take the add expression as an example. It's
defined like this in the grammar:
AddExpression:
MulExpression
AddExpression + MulExpression
On Sunday, 2 August 2015 at 17:33:35 UTC, Jacob Carlborg wrote:
On 02/08/15 18:37, MakersF wrote:
Of course it's recursive! Do you want the grammar to be able
to only
define a finite number of programs?
I don't know how this work, that's why I'm asking. But I read
something about left
is there a trait in D or Phobos which will tell you if a type can
be used as a key for an associative array? For example, where T
is some type:
static assert(isKeyType!T)
int[T] hashTable = ...
On Saturday, 11 July 2015 at 02:56:55 UTC, Timon Gehr wrote:
...
The algorithm runs in O(n*log*(n)). It's not n log(n).
...
I understand now. I had never heard of an iterated logarithm
before. I took the asterisk to mean some constant, like a wild
card if you will. Sorry for the confusion.
On Wednesday, 22 July 2015 at 11:42:24 UTC, Shriramana Sharma
wrote:
Once the front end of DMD becomes fully D, I read that the
backend will also become D, but then what will happen to GDC
and LDC whose backends are C++ IIUC?
The Rust compiler is written in Rust but uses LLVM as a backend,
On Friday, 10 July 2015 at 21:26:50 UTC, Timon Gehr wrote:
I think this method is likely to be less practically relevant
than the one they improve upon. (log* n really is constant for
all practical purposes, it is the number of times one needs to
iteratively take the logarithm until a number
On Saturday, 11 July 2015 at 00:00:47 UTC, Andrei Alexandrescu
wrote:
On 7/9/15 5:57 PM, Xinok wrote:
...
Any thoughts?
I'd say both would be nice (not to mention the one in the
paper) so how about both are present selectable with a policy
ala Yes.tightMemory or something. -- Andrei
I'm
On Thursday, 9 July 2015 at 21:57:39 UTC, Xinok wrote:
I found this paper which describes an in-place algorithm with
O(n) time complexity but it's over my head at the moment.
http://link.springer.com/article/10.1007%2FBF01994842
I apologize, I didn't realize this link was behind a paywall.
I wanted to get some feedback on a stable partition3
implementation for Phobos before I work on a pull request. I
wrote this implementation which is in-place (zero memory
allocations) but runs in O(n lg n) time.
http://dpaste.dzfl.pl/e12f50ad947d
I found this paper which describes an
On Sunday, 28 June 2015 at 15:55:51 UTC, jmh530 wrote:
My understanding of pure is that a function labeled pure can
only include pure functions. I've been confused by the fact
that a function calling map (like below) can be labeled pure
without any problems. The only way I can rationalize it
On Friday, 12 June 2015 at 15:51:02 UTC, Per Nordlöw wrote:
On Friday, 12 June 2015 at 15:35:55 UTC, Xinok wrote:
However, template constraints in D are much more powerful and
flexible than C++ concepts. As such, there are bound to be
several cases in which the compiler can't provide any
On Friday, 12 June 2015 at 12:20:58 UTC, Per Nordlöw wrote:
...
Destroy.
Improving compiler diagnostics for failed template instantiations
would be a great start. However, template constraints in D are
much more powerful and flexible than C++ concepts. As such, there
are bound to be
On Tuesday, 19 May 2015 at 00:31:50 UTC, Freddy wrote:
Sorry mis-phrased my question,
Who do you allocate a pointer to an associative
array(int[string]*).
Ignoring the why for a moment, one trick is to place it in an
array literal so it's heap allocated. This requires writing an
I've been avoiding purity in D for a while but I decided to take
a stab at it today. I encountered two issues which make inferring
purity difficult.
(1) While the compiler infers purity for instantiated functions,
it's unable to infer purity for functions within templates.
Consider the
On Saturday, 25 April 2015 at 20:12:55 UTC, Walter Bright wrote:
Hard disks are dead today for anyone who cares about
performance.
I still use them, but only for secondary storage.
For anybody who wants to buy 4TB of storage for $100, hard drives
are still very much alive. Not to mention
On Saturday, 14 March 2015 at 20:15:30 UTC, Walter Bright wrote:
I've often thought, as do many others here, that immutability
should be the default for variables.
[This is a long term issue. Just thought maybe it's time for a
conversation about it.]
Because immutable is transitive,
The following code fails to compile because unpredictableSeed is
impure:
void main()
{
foreach(i; 0..10) writeln(pureRandom);
}
pure uint pureRandom()
{
auto r = Random(unpredictableSeed);
return r.front;
}
However, make unpredictableSeed a
On Tuesday, 10 March 2015 at 22:00:29 UTC, safety0ff wrote:
On Tuesday, 10 March 2015 at 21:56:39 UTC, Xinok wrote:
I'm inclined to believe this is a bug.
https://issues.dlang.org/show_bug.cgi?id=11048
Thanks for the link, and I didn't mean to post this in D.learn.
.
On Tuesday, 3 March 2015 at 22:55:05 UTC, Josh wrote:
How can I make my parallel code more efficient. Currently, I am
getting destroyed by the serial merge sort.
http://pastebin.com/M0GKfTTX
Thank you.
I've implemented a concurrent merge sort if you want to take a
look at my code. It's
On Thursday, 26 February 2015 at 01:40:32 UTC, Andrei
Alexandrescu wrote:
Since you're here, do you plan to fix stable sort as recently
discussed? -- Andrei
While the fix seems straightforward, I haven't taken the time to
study the problem. I plan to do so and if I feel confident that I
can
On Thursday, 26 February 2015 at 02:05:25 UTC, Sativa wrote:
On Thursday, 26 February 2015 at 00:56:02 UTC, Xinok wrote:
I like the idea but feel that it's application is too narrow.
I prefer features which are more general and offer greater
flexibility. I believe I've read somewhere that some
On Wednesday, 25 February 2015 at 21:25:49 UTC, Daniel N wrote:
Just throwing an idea out there... How about using annotations
to teach the compiler which functions are inverses of
each-other, in order to facilitate optimizing away certain
redundant operations even if they are located inside a
On Sunday, 15 February 2015 at 17:18:08 UTC, Steve D wrote:
Python (built-in)
dict1 = {a:1,b:2}
tup1 = (0,1,2,3)
arr1 = [0,1,2,3] # list type
str1 = abcd
print b in dict1# True
print 3 in tup1 # True
print 3 in arr1 # True
print c in str1 # True
print tup1.index(2) #
On Sunday, 15 February 2015 at 18:15:13 UTC, Meta wrote:
On Sunday, 15 February 2015 at 17:18:08 UTC, Steve D wrote:
Python (built-in)
dict1 = {a:1,b:2}
tup1 = (0,1,2,3)
arr1 = [0,1,2,3] # list type
str1 = abcd
print b in dict1# True
O(1) lookup
A small nitpick, but I'm sure that
On Saturday, 14 February 2015 at 17:00:33 UTC, Andrei
Alexandrescu wrote:
There's been recurring discussion about failing constraints not
generating nice error messages.
void fun(T)(T x) if (complicated_condition) { ... }
struct Type(T)(T x) if (complicated_condition) { ... }
If
On Sunday, 8 February 2015 at 15:20:17 UTC, karl wrote:
Hi, it's a bit unwieldy to write/read this:
result = src[base .. base+size];
instead of:
result = src[base, size];
Maybe such syntax would be a welcome addition to D? I don't see
it conflicting with the existing grammar, and only the 2
On Thursday, 22 January 2015 at 21:40:57 UTC, Andrei Alexandrescu
wrote:
There's this classic patter on Unix: |sort|uniq, i.e. sort some
data and only display the unique elements.
What would be a better integrated version - one that does
sorting and uniq in one shot? I suspect the combination
On Wednesday, 21 January 2015 at 14:46:22 UTC, Sebastiaan Koppe
wrote:
Just for fun and proof-of-concept I went ahead and forked the
dlang.org site. I basically took the
`do-what-everybody-else-is-doing` approach:
http://dlang.skoppe.eu
This gets a big thumbs up from me. The layout is
On Wednesday, 14 January 2015 at 22:37:22 UTC, ketmar via
Digitalmars-d wrote:
On Wed, 14 Jan 2015 22:29:08 +
bearophile via Digitalmars-d digitalmars-d@puremagic.com
wrote:
According to Wikipedia:
http://en.wikipedia.org/wiki/C%2B%2B14#Function_return_type_deduction
C++14 is able to
On Thursday, 1 January 2015 at 16:56:24 UTC, Manu via
Digitalmars-d wrote:
Does anyone know how to fix this? Can we please do so? It's
been a
problem for like 5 years it seems.
It's a bit insane that we can't resolve any non-linear
functions at
compile time.
I was looking for a relevant
1 - 100 of 146 matches
Mail list logo