On Monday, 19 March 2012 at 22:39:18 UTC, Iain Buclaw wrote:
On Monday, 19 March 2012 at 00:45:44 UTC, Iain Buclaw wrote:
On Monday, 19 March 2012 at 00:22:48 UTC, Walter Bright wrote:
On 3/18/2012 5:39 AM, Iain Buclaw wrote:
I've been told to cue Walter asking to rename the
organisation to
Juan Manuel Cabo wrote:
like the unix 'time' command
`version linux' is missing.
-manfred
On 3/21/12 7:32 PM, Juan Manuel Cabo wrote:
avgtime -r 10 -q ls -lR /etc
Total time (ms): 933.742
Repetitions : 10
Median time : 90.505
Avg time : 93.3742
Std dev. : 4.66808
Minimum : 88.732
Maximum : 101.225
Sweet! You may want to also print the mode of the
On Sun, 11 Mar 2012 00:28:42 +0100, Philippe Sigaud
philippe.sig...@gmail.com wrote:
Hello,
I created a new Github project, Pegged, a Parsing Expression Grammar
(PEG) generator in D.
https://github.com/PhilippeSigaud/Pegged
docs: https://github.com/PhilippeSigaud/Pegged/wiki
PEG:
On Thursday, 22 March 2012 at 22:22:31 UTC, Andrei Alexandrescu
wrote:
Sweet! You may want to also print the mode of the distribution,
which is the time of the maximum sample density.
http://en.wikipedia.org/wiki/Mode_(statistics) (Warning:
nontrivial but informative.)
Andrei
Thanks for
On 3/22/12 11:53 PM, Juan Manuel Cabo wrote:
On Thursday, 22 March 2012 at 22:22:31 UTC, Andrei Alexandrescu wrote:
Sweet! You may want to also print the mode of the distribution, which
is the time of the maximum sample density.
http://en.wikipedia.org/wiki/Mode_(statistics) (Warning:
Juan Manuel Cabo juanmanuel.c...@gmail.com wrote in message
news:mytcmgglyntqsoybj...@forum.dlang.org...
On Thursday, 22 March 2012 at 22:22:31 UTC, Andrei Alexandrescu wrote:
Sweet! You may want to also print the mode of the distribution, which is
the time of the maximum sample density.
On 21 March 2012 20:32, Andrei Alexandrescu
seewebsiteforem...@erdani.orgwrote:
Well if the argument boils down to nice vs. ugly, as opposed to possible
vs. impossible - it's quite a bit less compelling.
By this logic, I might as well stick with C++. It's 'possible' to do
everything I need,
Making such interface public would even allow to integrate D communication
mechanisms
between processes/machines, similar to what Akka allows.
Nathan M. Swan wrote in message
news:ladihiaieksszjodf...@forum.dlang.org...
On Wednesday, 21 March 2012 at 03:37:35 UTC, Nathan M. Swan wrote:
On 3/21/12, H. S. Teoh hst...@quickfur.ath.cx wrote:
Sorry, I was thinking in terms of my AA implementation which is done
using a struct with operator overloading. I should've checked what the
behaviour of the current built-in AAs are before posting. :-P
Well in that case isn't it a necessity
On 21/03/12 21:53, Jacob Carlborg wrote:
On 2012-03-21 17:44, H. S. Teoh wrote:
The D way is to use strings for DSELs which get evaluated at
compile-time, or a custom set of methods that you can build expressions
out of. Operator overloading really should be limited to arithmetic
types (for
On 3/21/12, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote:
I think the liability here is that b needs to appear in two places.
Andrei, how about this:
import std.stdio;
import std.conv;
struct NonSerialized(T)
{
enum isNonSerialized = true;
T payload;
alias payload this;
On Thursday, 22 March 2012 at 10:18:24 UTC, Andrej Mitrovic wrote:
On 3/21/12, Andrei Alexandrescu seewebsiteforem...@erdani.org
wrote:
I think the liability here is that b needs to appear in two
places.
Andrei, how about this:
Note that I've had to make a constructor because I can't
On Thursday, 22 March 2012 at 10:18:24 UTC, Andrej Mitrovic wrote:
On 3/21/12, Andrei Alexandrescu seewebsiteforem...@erdani.org
wrote:
I think the liability here is that b needs to appear in two
places.
Andrei, how about this:
Note that I've had to make a constructor because I can't
On 21/03/12 21:41, Alvaro wrote:
El 21/03/2012 19:39, Jonathan M Davis escribió:
On Wednesday, March 21, 2012 11:29:14 H. S. Teoh wrote:
A question was asked on the d-learn forum about why this throws a
RangeError:
int[string][int] map;
map[abc][20]++;
This is understandable, since the
On Wed, 21 Mar 2012 20:53:42 -0400, Jonathan M Davis jmdavisp...@gmx.com
wrote:
On Wednesday, March 21, 2012 20:46:05 Jonathan M Davis wrote:
On Wednesday, March 21, 2012 20:17:06 Steven Schveighoffer wrote:
On Wed, 21 Mar 2012 19:56:41 -0400, Jonathan M Davis
jmdavisp...@gmx.com
On 20/03/12 22:29, Jacob Carlborg wrote:
On 2012-03-20 17:13, Andrei Alexandrescu wrote:
On 3/20/12 10:52 AM, Jacob Carlborg wrote:
On 2012-03-20 16:17, Andrei Alexandrescu wrote:
On 3/20/12 12:50 AM, Kapps wrote:
Perhaps we should add a field of type Variant[string].
No, not
On 3/22/12, Kapps opantm2+s...@gmail.com wrote:
1) It wrecks things that use template arguments, possibly special
casing for certain types.
Yeah I've noticed things tend to break with alias this. Anyway if
templates could be improved for these edge-cases then it's a benefit
for everyone,
On 3/22/12 2:32 AM, Andrei Alexandrescu wrote:
On 3/21/12 12:06 PM, Jacob Carlborg wrote:
On 2012-03-21 16:11, Andrei Alexandrescu wrote:
I think the liability here is that b needs to appear in two places, once
in the declaration proper and then in the NonSerialized part. (A
possible advantage
On Wednesday, 21 March 2012 at 20:41:17 UTC, Alvaro wrote:
I partially disagree. I think items should be added if we try
to *write* to them, but not when we *read* them (lvalue vs
rvalue). The problem is that it's hard to distinguish those
cases in C++ without an intermediate class that makes
On 3/22/12, Jesse Phillips jessekphillip...@gmail.com wrote:
double[int] a;
What is the result of your code on 'a' now? double.init is NAN.
Hmm this is interesting. With 2.058:
double[int] a;
a[0]++;
writeln(a[0]); // prints 1
double b;
b++;
writeln(b); // prints nan
On Thu, Mar 22, 2012 at 11:01:35AM +0100, Andrej Mitrovic wrote:
On 3/21/12, H. S. Teoh hst...@quickfur.ath.cx wrote:
Sorry, I was thinking in terms of my AA implementation which is done
using a struct with operator overloading. I should've checked what the
behaviour of the current built-in
On 03/21/12 14:36, Adam D. Ruppe wrote:
On Wednesday, 21 March 2012 at 08:29:23 UTC, Tove wrote:
With the mixin improvement proposal any arbitrarily complex feature can be
implemented in the library, appearing to enjoy first class syntax with just
1 extra character penalty vs the compiler.
On Thu, Mar 22, 2012 at 03:26:00PM +0100, Andrej Mitrovic wrote:
On 3/22/12, Jesse Phillips jessekphillip...@gmail.com wrote:
double[int] a;
What is the result of your code on 'a' now? double.init is NAN.
Hmm this is interesting. With 2.058:
double[int] a;
a[0]++;
writeln(a[0]); //
On Thursday, 22 March 2012 at 04:49:24 UTC, Nick Sabalausky wrote:
And then later on someone made sort of a mini file-system where
you could add data to a ROM
image and then query/access it from your code
Now, this reminds me, what if you want to access the
compile time files from runtime?
On 3/22/12, H. S. Teoh hst...@quickfur.ath.cx wrote:
This is because in aaA.d _aaGetX creates a new entry if one isn't found,
but because it has no direct access to value types (only has typeinfo),
it doesn't know what value .init has. It sets the value to binary zero
by default.
Damn, hashes
Le 21/03/2012 04:37, Nathan M. Swan a écrit :
After playing around with making a library with uses threads, I realized
it would be nice if there could be multiple inter-thread mailboxes than
just one per thread. That way, client code and third-party library code
don't interfere with each other.
On 3/22/12 9:32 AM, H. S. Teoh wrote:
On Thu, Mar 22, 2012 at 11:01:35AM +0100, Andrej Mitrovic wrote:
On 3/21/12, H. S. Teohhst...@quickfur.ath.cx wrote:
Sorry, I was thinking in terms of my AA implementation which is done
using a struct with operator overloading. I should've checked what
Andrei Alexandrescu:
This is a bug in the language that requires fixing.
I agree. Is someone willing to write a good enhancement request
about it?
Bye,
bearophile
On Thursday, 22 March 2012 at 00:30:51 UTC, Nathan M. Swan wrote:
As I posted a while back, the concept of a variant message
queue is wonderful and powerful, and the implementation is
great. But the fact that you can't declare auto mq = new
MessageQueue() is a gaping whole in an otherwise A+
On Mar 21, 2012, at 9:12 PM, Nathan M. Swan nathanms...@gmail.com wrote:
On Wednesday, 21 March 2012 at 03:37:35 UTC, Nathan M. Swan wrote:
After playing around with making a library with uses threads, I realized it
would be nice if there could be multiple inter-thread mailboxes than just
On Thursday, 22 March 2012 at 15:14:31 UTC, deadalnix wrote:
They will, even with different boxes.
Similarly succinct: How so?
Le 22/03/2012 16:50, David Nadlinger a écrit :
On Thursday, 22 March 2012 at 15:14:31 UTC, deadalnix wrote:
They will, even with different boxes.
Similarly succinct: How so?
They will because of synchronization. This cost will not be transparent.
Not that it is a bad idea, but it depends
So the discussions about Attributes and Aspect Oriented
Programming (AOP) got me thinking... Basically AOP requires
injecting code fragments together in a comprehensible way.
Similarly, Attributes that go beyond @note (such as @GC.NoScan)
need similar ability.
D already has the ability to
On Thu, Mar 22, 2012 at 03:48:24PM +0100, Andrej Mitrovic wrote:
On 3/22/12, H. S. Teoh hst...@quickfur.ath.cx wrote:
This is because in aaA.d _aaGetX creates a new entry if one isn't found,
but because it has no direct access to value types (only has typeinfo),
it doesn't know what value
On 3/22/12, H. S. Teoh hst...@quickfur.ath.cx wrote:
You can check out the current code here:
https://github.com/quickfur/New-AA-implementation
I need Git Head (2.059) for this, right? Otherwise I get:
newAA.d(426): Error: inout on parameter means inout must be on return type
as well (if
ps. Mono-C#'s NRefactory, and Microsoft .Net's forthcoming Roslyn
Project are the only comparable infrastructures I can think of
with this level of reflection, and they're the foundation to some
pretty innovative new development tools.
NRefactory: http://wiki.sharpdevelop.net/NRefactory.ashx
On Thu, Mar 22, 2012 at 05:52:54PM +0100, Andrej Mitrovic wrote:
On 3/22/12, H. S. Teoh hst...@quickfur.ath.cx wrote:
You can check out the current code here:
https://github.com/quickfur/New-AA-implementation
I need Git Head (2.059) for this, right? Otherwise I get:
newAA.d(426):
On Thu, 22 Mar 2012 15:35:06 +0100, H. S. Teoh hst...@quickfur.ath.cx
wrote:
On Thu, Mar 22, 2012 at 03:26:00PM +0100, Andrej Mitrovic wrote:
On 3/22/12, Jesse Phillips jessekphillip...@gmail.com wrote:
double[int] a;
What is the result of your code on 'a' now? double.init is NAN.
Hmm
On Thursday, 22 March 2012 at 16:55:34 UTC, F i L wrote:
ps. Mono-C#'s NRefactory, and Microsoft .Net's forthcoming
Roslyn Project are the only comparable infrastructures I can
think of with this level of reflection, and they're the
foundation to some pretty innovative new development tools.
On 3/22/12, H. S. Teoh hst...@quickfur.ath.cx wrote:
Probably. I've been developing on 2.059 so I didn't realize there are
incompatibilities with earlier versions.
Your test files work ok. I'll test it on my own projects as soon as I
get rid of a few compilation errors (all of a sudden I get
On Thursday, 22 March 2012 at 10:06:46 UTC, Don Clugston wrote:
Indeed, it may be possible to use a new-style delegate literal
instead of a string, for defining your DSL.
My point was that we don't need to be able to return arbitrary
types from operators. Instead, we might need some syntax
On Mar 22, 2012, at 8:49 AM, David Nadlinger wrote:
On Thursday, 22 March 2012 at 00:30:51 UTC, Nathan M. Swan wrote:
As I posted a while back, the concept of a variant message queue is
wonderful and powerful, and the implementation is great. But the fact that
you can't declare auto mq =
On Thu, Mar 22, 2012 at 06:43:29PM +0100, Andrej Mitrovic wrote:
On 3/22/12, H. S. Teoh hst...@quickfur.ath.cx wrote:
Probably. I've been developing on 2.059 so I didn't realize there
are incompatibilities with earlier versions.
Your test files work ok. I'll test it on my own projects as
On 3/22/12, Andrej Mitrovic andrej.mitrov...@gmail.com wrote:
Your test files work ok.
Well unfortunately isAssociativeArray from std.traits fails on your
hashes (reasonable, since it calls __traits internally and has no way
of knowing about external hashes).
I also can't use your hashes with
On 3/22/12, H. S. Teoh hst...@quickfur.ath.cx wrote:
Yeah that's probably caused by a recent dmd change to soldier on after a
template instantiation error. :-)
Hopefully that gets fixed by the next release. Otherwise we can expect
an angry dev creating a D FQA site, heheh. :P
in addition to .codeof, let's think about .astof returning an abstract
syntax tree.
On Thursday, 22 March 2012 at 18:06:24 UTC, Felix Hufnagel wrote:
in addition to .codeof, let's think about .astof returning an
abstract syntax tree.
I agree, as stated on the IRC, .astof (and therefor
.astof.toString()) is a much better concept.
On Thursday, 22 March 2012 at 18:06:24 UTC, Felix Hufnagel wrote:
in addition to .codeof, let's think about .astof returning an
abstract syntax tree.
I haven't really looked at DMD's AST structure, but I assume we
could just duplicate that minus any CTFE stuff or codegen stuff.
On Wed, Mar 21, 2012 at 04:35:11PM +1100, Daniel Murphy wrote:
H. S. Teoh hst...@quickfur.ath.cx wrote in message
news:mailman.951.1332306541.4860.digitalmar...@puremagic.com...
Here's the current hashing code for char[] and string:
foreach (char c; s)
hash = hash *
On Thu, Mar 22, 2012 at 07:04:09PM +0100, Andrej Mitrovic wrote:
On 3/22/12, Andrej Mitrovic andrej.mitrov...@gmail.com wrote:
Your test files work ok.
Well unfortunately isAssociativeArray from std.traits fails on your
hashes (reasonable, since it calls __traits internally and has no way
On Thu, Mar 22, 2012 at 11:21:43AM -0700, H. S. Teoh wrote:
[...]
Hmm. Perhaps some aliases are in order?
struct AssociativeArray(K,V) {
...
alias Key keytype;
alias Value valuetype;
...
}
[...]
OK, I've added these
On 3/22/12, H. S. Teoh hst...@quickfur.ath.cx wrote:
OK, I've added these aliases and pushed to github. I think they're a
useful thing to have. If not, it's easy to remove before we integrate
with druntime. But at least in the meantime it will make these AA's
easier to work with.
Could you
On Thursday, March 22, 2012 07:12:22 Steven Schveighoffer wrote:
Note that the default std::list has O(1) length (as does dcollections'
LinkedList). It's not as inevitable as you think.
It depends on bothe container its implementation as to how efficient
length/size
is (and in the case of
Am 22.03.2012 19:06, schrieb Felix Hufnagel:
in addition to .codeof, let's think about .astof returning an abstract
syntax tree.
Would this not require something similar to the expression trees in .NET?
http://msdn.microsoft.com/en-us/library/bb397951.aspx
--
Paulo
On Mar 20, 2012, at 10:10 PM, H. S. Teoh wrote:
On Wed, Mar 21, 2012 at 03:55:49PM +1100, Daniel Murphy wrote:
H. S. Teoh hst...@quickfur.ath.cx wrote in message
news:mailman.917.1332250604.4860.digitalmar...@puremagic.com...
[...]
Then the question is, what should be the fix?
Currently,
Am 22.03.2012 18:34, schrieb CTFE-4-the-win:
On Thursday, 22 March 2012 at 16:55:34 UTC, F i L wrote:
ps. Mono-C#'s NRefactory, and Microsoft .Net's forthcoming Roslyn
Project are the only comparable infrastructures I can think of with
this level of reflection, and they're the foundation to
On 3/22/12 1:18 PM, H. S. Teoh wrote:
Alright, so after some benchmarking, I found that the above custom hash
function works best for *short* (3 to 10 character) randomized
alphabetic strings (I assumed alphabetic to be the typical use case of
strings). It's faster than SuperFastHash, and even
On 3/22/12, H. S. Teoh hst...@quickfur.ath.cx wrote:
snip
Hmm, what about (temporary) compatibility with hash literals? You
could add the following to the newAA module:
static import std.traits;
template KeyType(V : V[K], K)
{
alias K KeyType;
}
template ValueType(V : V[K], K)
{
alias
On Mar 22, 2012, at 11:18 AM, H. S. Teoh wrote:
On Wed, Mar 21, 2012 at 04:35:11PM +1100, Daniel Murphy wrote:
H. S. Teoh hst...@quickfur.ath.cx wrote in message
news:mailman.951.1332306541.4860.digitalmar...@puremagic.com...
Here's the current hashing code for char[] and string:
On Thursday, 22 March 2012 at 15:53:56 UTC, Sean Kelly wrote:
I can see adapting the API so that each thread has a default
message queue (keep in mind that we'll be adding interprocess
messaging at some point via the same routines). I'm not yet
clear how the existence of alternate message
On 03/22/2012 07:08 PM, F i L wrote:
On Thursday, 22 March 2012 at 18:06:24 UTC, Felix Hufnagel wrote:
in addition to .codeof, let's think about .astof returning an abstract
syntax tree.
I agree, as stated on the IRC, .astof (and therefor .astof.toString())
is a much better concept.
I think
Timon Gehr wrote:
I think that would necessitate the addition of AST macros.
You mean passing DMD's actual AST tree object? Only a stripped
down version?
On 22/03/12 18:43, Andrej Mitrovic wrote:
On 3/22/12, H. S. Teohhst...@quickfur.ath.cx wrote:
Probably. I've been developing on 2.059 so I didn't realize there are
incompatibilities with earlier versions.
Your test files work ok. I'll test it on my own projects as soon as I
get rid of a few
Adam D. Ruppe destructiona...@gmail.com wrote in message
news:oyqxvngsgjfmrlrwh...@forum.dlang.org...
On Thursday, 22 March 2012 at 04:49:24 UTC, Nick Sabalausky wrote:
And then later on someone made sort of a mini file-system where you could
add data to a ROM
image and then query/access it
Hey all,
i'm not sure who would be the right person on this, but a good
Google Summer of Code project would be to get D programs running
on Arduino.
There's already been work done with MonoDevelop to get .NET MF
code to deploy via MonoDevelop on Netduino. And there's a D
Language plugin
It appears I'm running into issue 6906, meaning it's impossible
to store structs in an AA if they have opAssign defined. For
example:
struct S {
}
i found the GSOC page for D and added it as a possible project.
On Thursday, 22 March 2012 at 20:08:02 UTC, Rene Zwanenburg wrote:
It appears I'm running into issue 6906, meaning it's impossible
to store structs in an AA if they have opAssign defined. For
example:
struct S {
}
Apologies, sent before I finished. Tab + enter in the web
interface.
struct
On Thu, Mar 22, 2012 at 07:55:09PM +0100, Andrej Mitrovic wrote:
[...]
Hmm, what about (temporary) compatibility with hash literals? You
could add the following to the newAA module:
static import std.traits;
template KeyType(V : V[K], K)
{
alias K KeyType;
}
template ValueType(V :
Hi, I'm trying to write a game sever/client architecture in D,
but I keep running into problems with the timeouts for windows
sockets.
On the std.socket documentation page it states that you can't set
a timeout smaller than 500ms, and I've been experiencing this
problem first hand. The
On Wednesday, 21 March 2012 at 19:11:08 UTC, Nick Sabalausky
wrote:
Although, while it wasn't a major selling point in and of
itself, the
ability to put underscores in numeric literals *really* helped
tell me, Now
*this* is a language that's very well thought out and values
pragmatism.
And
On 3/22/12, H. S. Teoh hst...@quickfur.ath.cx wrote:
Maybe this needs a ctor?
Yeah probably. I really don't know when opAssign or the ctor are
called (especially with more complex types with alias this). Maybe
someone knows this or it's in the spec but I haven't read about it.
On Mar 22, 2012, at 12:06 PM, Nathan M. Swan nathanms...@gmail.com wrote:
On Thursday, 22 March 2012 at 15:53:56 UTC, Sean Kelly wrote:
I can see adapting the API so that each thread has a default message queue
(keep in mind that we'll be adding interprocess messaging at some point via
the
On 03/22/2012 08:12 PM, F i L wrote:
Timon Gehr wrote:
I think that would necessitate the addition of AST macros.
You mean passing DMD's actual AST tree object? Only a stripped down
version?
We have the macro keyword. I envision something like:
macro replaceAggregate(macro newAggregate,
On Thursday, 22 March 2012 at 21:27:40 UTC, Sean Kelly wrote:
On Mar 22, 2012, at 12:06 PM, Nathan M. Swan
nathanms...@gmail.com wrote:
On Thursday, 22 March 2012 at 15:53:56 UTC, Sean Kelly wrote:
I can see adapting the API so that each thread has a default
message queue (keep in mind that
Timon Gehr wrote:
We have the macro keyword. I envision something like:
macro replaceAggregate(macro newAggregate, macro loop :
foreach(x; aggr){statements}, macro x, macro aggr, macro
statements) {
foreach(x; newAggregate){statements}
}
void main(){
int[] a = [1,2,3];
int[] b =
Am 22.03.2012 22:09, schrieb Evan Davis:
Hi, I'm trying to write a game sever/client architecture in D, but I
keep running into problems with the timeouts for windows sockets.
On the std.socket documentation page it states that you can't set a
timeout smaller than 500ms, and I've been
Le 22/03/2012 03:05, Andrei Alexandrescu a écrit :
On 3/21/12 6:02 PM, deadalnix wrote:
Le 21/03/2012 17:22, Andrei Alexandrescu a écrit :
On 3/21/12 11:17 AM, Timon Gehr wrote:
On 03/20/2012 10:36 PM, deadalnix wrote:
Even the propagation of pure, @safe, nothrow and const that has been
On Thursday, 22 March 2012 at 23:36:03 UTC, Paulo Pinto wrote:
If you really want performant sockets on Windows, you need to
make use
of the Windows specific APIs, and use IO completion ports not
select.
Depending on what you are trying to achieve, you could always
consider using enet or
On Mar 22, 2012, at 4:01 PM, Nathan M. Swan wrote:
On Thursday, 22 March 2012 at 21:27:40 UTC, Sean Kelly wrote:
On Mar 22, 2012, at 12:06 PM, Nathan M. Swan nathanms...@gmail.com wrote:
On Thursday, 22 March 2012 at 15:53:56 UTC, Sean Kelly wrote:
I can see adapting the API so that each
Nick Sabalausky a@a.a wrote in message
news:jkdho8$1p3a$1...@digitalmars.com...
F i L witte2...@gmail.com wrote in message
news:sofbqiiyvragxjaxq...@forum.dlang.org...
Kapps wrote:
or even automatically creating bindings for a C header file.
I've thought about that before. It would be great
On Friday, 23 March 2012 at 00:14:00 UTC, Sean Kelly wrote:
While sending messages like a bare string might be good for
example code, any real application is going to use structured
messages whose type is specific to what the message is for,
contains fields like sender Tid, etc. It seems like
On 3/23/12, Nick Sabalausky a@a.a wrote:
A library could include any custom build steps it needed (or at least
pre-build steps) *in* the library itself without the library's user needing
to deal with buildscripts/buildtools.
Ahh, yes, I can already envision it. It's 2014, and a newbie just
On 23 March 2012 12:52, David Nadlinger s...@klickverbot.at wrote:
On Thursday, 22 March 2012 at 23:36:03 UTC, Paulo Pinto wrote:
If you really want performant sockets on Windows, you need to make use
of the Windows specific APIs, and use IO completion ports not select.
Depending on what
On Tuesday, 20 March 2012 at 19:02:16 UTC, Andrei Alexandrescu
wrote:
I plan to give a talk at Lang.NEXT
(http://channel9.msdn.com/Events/Lang-NEXT/Lang-NEXT-2012) with
the subject above. There are a few features of D that turned
out to be successful, in spite of them being seemingly
Matt Peterson:
It isn't mainline yet, but UFCS from git has made working with
std.algorithm much nicer. Instead of something like
array(filter!a 0(map!((a){return somefunc(a);})(data)))
where you can quickly drown in parenthesis and the order seems
somewhat backwards, you can use
On Thu, Mar 22, 2012 at 04:31:00PM +0100, bearophile wrote:
Andrei Alexandrescu:
This is a bug in the language that requires fixing.
I agree. Is someone willing to write a good enhancement request
about it?
[...]
Done:
http://d.puremagic.com/issues/show_bug.cgi?id=7753
Please
On Thu, Mar 22, 2012 at 10:25:04PM +0100, Andrej Mitrovic wrote:
On 3/22/12, H. S. Teoh hst...@quickfur.ath.cx wrote:
Maybe this needs a ctor?
Yeah probably. I really don't know when opAssign or the ctor are
called (especially with more complex types with alias this). Maybe
someone knows
On Thu, Mar 22, 2012 at 09:29:36PM -0700, H. S. Teoh wrote:
On Thu, Mar 22, 2012 at 10:25:04PM +0100, Andrej Mitrovic wrote:
On 3/22/12, H. S. Teoh hst...@quickfur.ath.cx wrote:
Maybe this needs a ctor?
Yeah probably. I really don't know when opAssign or the ctor are
called
David Nadlinger s...@klickverbot.at wrote in message
news:ajuozpunkzfawcapc...@forum.dlang.org...
And how exactly do you plan to implement _library_ support for that in the
case of expressions containing comparison or equality operators?
David
With a D parser in phobos.
On 3/23/12, H. S. Teoh hst...@quickfur.ath.cx wrote:
I'm guessing the compiler thinks the literal is an array literal, or
maybe something went awry with the internal AA hacks that it currently
has.
struct Foo
{
string[int] aa;
alias aa this;
}
void main()
{
Foo x = [1 : 4];
}
Nick Sabalausky a@a.a wrote in message
news:jk2ro7$6dl$1...@digitalmars.com...
Here's a little templates primer, I hope it helps:
[...]
I've cleaned this up, added an intro and outro, and posted it on my website
here:
https://www.semitwist.com/articles/article/view/template-primer-in-d
On Fri, Mar 23, 2012 at 06:11:05AM +0100, Andrej Mitrovic wrote:
[...]
Btw, want to see a magic trick? Put this into your hash:
this(AA)(AA aa)
if (std.traits.isAssociativeArray!AA
is(KeyType!AA == keytype)
is(ValueType!AA == valuetype))
{
foreach (key, val; aa)
On Fri, Mar 23, 2012 at 01:16:13AM -0400, Nick Sabalausky wrote:
Nick Sabalausky a@a.a wrote in message
news:jk2ro7$6dl$1...@digitalmars.com...
Here's a little templates primer, I hope it helps:
[...]
I've cleaned this up, added an intro and outro, and posted it on my
website here:
H. S. Teoh hst...@quickfur.ath.cx wrote in message
news:mailman.1037.1332480633.4860.digitalmar...@puremagic.com...
On Fri, Mar 23, 2012 at 01:16:13AM -0400, Nick Sabalausky wrote:
Nick Sabalausky a@a.a wrote in message
news:jk2ro7$6dl$1...@digitalmars.com...
Here's a little templates
I'd like to try d in computational physics. One of the most
appealing features of the d is implementation of arrays, but to
be really usable this has to work FAST.
So here http://dlang.org/arrays.html it is stated, that:
Implementation note: many of the more common vector
operations
On Wednesday, 21 March 2012 at 01:26:23 UTC, bearophile wrote:
import std.stdio;
void main() {
auto mat = [[1, 2, 3],
[4, 5, 6],
[7, 8, 9]];
writefln(%(%(%d %)\n%), mat);
writeln();
writefln([%(%(%d %)\n%)], mat);
writeln();
What is the status at the moment? What compiler and with which compiler
flags I should use to achieve maximum performance?
In general gdc or ldc. Not sure how good vectorization is though, esp.
auto-vectorization.
On the other hand the so called vector operations like a[] = b[] + c[];
are
In my work we have to access a big zip file with a lot of little
xml files in it to look up various target specific attributes for
a wide variety of targets.
Basically the zip file it is a zipped up directory hierarchy of
zip files, and in processing it the hierarchy has meaning.
I see in
1 - 100 of 123 matches
Mail list logo