Jonathan M Davis Wrote:
On Saturday, September 24, 2011 01:05:52 Jerry Quinn wrote:
Jonathan M Davis Wrote:
On Friday, September 23, 2011 23:01:17 Jerry Quinn wrote:
A direct rewrite would involve using shared and synchronized (either on
the class or a synchronized block around
Lutger Blijdestijn Wrote:
If you didn't know, the concurrency chapter of tdpl is a free chapter:
http://www.informit.com/articles/article.aspx?p=1609144
It has an example of file copying with message passing:
http://www.informit.com/articles/article.aspx?p=1609144seqNum=7
What I really
On Sunday, September 25, 2011 02:26:18 Jerry Quinn wrote:
Jonathan M Davis Wrote:
On Saturday, September 24, 2011 01:05:52 Jerry Quinn wrote:
Jonathan M Davis Wrote:
On Friday, September 23, 2011 23:01:17 Jerry Quinn wrote:
A direct rewrite would involve using shared and
Property functions are still functions. A member function must be const
for it to be callable on a const object.
Since we have transitive const, why can't the compiler deduce which
methods can be called on const instances?
On 2011-09-25 00:56, dsmith wrote:
Has anyone here succeeded with a dmd2.055 one-click install to Linux amd64?
Unlike the prior dmd2.0xx, I have no luck with dmd2.055 for amd64 installs.
I've
tried Debian, Fedora, and Suse.
After some command line work (based on
Jerry Quinn wrote:
Jonathan M Davis Wrote:
On Saturday, September 24, 2011 01:05:52 Jerry Quinn wrote:
Jonathan M Davis Wrote:
On Friday, September 23, 2011 23:01:17 Jerry Quinn wrote:
A direct rewrite would involve using shared and synchronized (either
on the class or a
Andrej Mitrovic wrote:
import std.typetuple;
import std.typecons;
struct Foo
{
void test(int x, double y) { }
void opOpAssign(string op, T...)(T t)
if (op == ~)
{
test(t);
}
}
void main()
{
Foo foo;
foo.opOpAssign!~(4, 5.0); // ok
Hi, D.learn!
I encountered a problem, while i was designing a fast, performance-critical
image storage mechanism.
Here's what i want to do:
Have a FragmentTraits struct, which contains fields, like number of
components, size in bytes of the components, padding of the components in
bytes, etc.
I have installed dmd 2.055 on my 64 bit openSuse box. It first asked for
affirmation of the adobe reader Eula and then silently failed to install
the new dmd version. I tried three times with all the same outcome. Then
i removed the old dmd installation and the next install try succeeded.
Am
On Sun, Sep 25, 2011 at 16:49, Gor F. Gyolchanyan
gor.f.gyolchan...@gmail.com wrote:
Have a FragmentTraits struct, which contains fields, like number of
components, size in bytes of the components, padding of the components in
bytes, etc.
Have a Fragment struct, which takes a FragmentTraits
I have this small program, which does some data handling with structs:
struct App {
private int[] fData;
this(size_t initialSize) {
fData = new int[initialSize];
}
void put(int i) {
fData[0] = i;
}
int[] get() {
return fData;
}
}
struct Builder {
int i;
App app =
This should make things clearer for you:
unittest
{
auto h1 = get(1);
auto h2 = get(2);
assert(h1 is h2); // both reference the same array
}
Field initialization is only done once (once per thread, or if a field
is shared once on app start) and not each time you call the
On Sunday, September 25, 2011 23:40:36 Christian Köstlin wrote:
I have this small program, which does some data handling with structs:
struct App {
private int[] fData;
this(size_t initialSize) {
fData = new int[initialSize];
}
void put(int i) {
fData[0] = i;
}
On Monday, September 26, 2011 00:04:48 Andrej Mitrovic wrote:
This should make things clearer for you:
unittest
{
auto h1 = get(1);
auto h2 = get(2);
assert(h1 is h2); // both reference the same array
}
Field initialization is only done once (once per thread, or if a
Is there a way to return the current object in any part of the code,
even from void main? (which is still a type void). I have tried the this
thing but it doesn't work
--
Alex Herrmann
PC load letter
On Sun, 25 Sep 2011 20:20:59 -0600, alex wrote:
Is there a way to return the current object in any part of the code,
I presume you mean returning self from a member function:
class C
{
C foo()
{
return this;
}
C bar()
{
return this;
}
}
void main()
{
I cannot find a good example on std.zlib, more importantly, the whole
void[] and then const void[] stuff really throws me, and I get strange
things like out of memory errors upon execution.
--
Alex Herrmann
PC load letter
On Mon, 26 Sep 2011 06:04:20 +0300, alex a...@nospam.com wrote:
I get strange things like out of memory errors upon execution.
That's most likely due to std.zlib allocating in its destructor[1]. I'd
think such cases should be quite rare - IIRC it should only happen when a
Zlib stream is
I'm only asking because I can't use it inside of a pragma(msg) call
since CTFE can't do C-style variadic functions yet. Is `format`
defined this way for performance reasons? (to avoid template bloat?)
On Monday, September 26, 2011 05:39:16 Andrej Mitrovic wrote:
I'm only asking because I can't use it inside of a pragma(msg) call
since CTFE can't do C-style variadic functions yet. Is `format`
defined this way for performance reasons? (to avoid template bloat?)
Use std.metastrings.Format.
As
20 matches
Mail list logo