On 10/28/2012 02:46 AM, Peter Sommerfeld wrote:
But I wonder why I
have do declare the variables shared if the data are declared
to be shared. Is that a shortcoming of the current compiler ?
I had to look this one up. According to the spec, a shared struct does
not mean that the variables of
On 10/28/2012 02:37 AM, Tobias Pankrath wrote:
the struct
SwA from above does neither correspond to SA nor to SB, it's imo more
like SC:
struct SC {
immutable(int)* i;
}
Just to confirm, the above indeed works:
struct SC {
immutable(int)* i;
}
void main()
{
immutable(SC)[] arr1;
On Monday, 29 October 2012 at 06:19:36 UTC, Ali Çehreli wrote:
Just to confirm, the above indeed works:
struct SC {
immutable(int)* i;
}
void main()
{
immutable(SC)[] arr1;
SC[] arr2 = arr1.dup;// compiles
}
Oh, I thought I've tried it.
[snip] [Really detailed description
On 2012-10-28 13:20, Jonathan M Davis wrote:
So, you save one set of braces? I don't see how that really buys you much.
Yes, and the try keyword. It would basically be the same as allowing
to get the exception in scope(failure) but the catch-statement already
supports this.
--
/Jacob
Hi!
Tell me please,in this code first and second static if,are these
equivalent?
with arg = 1, __traits(compiles,check(arg);) = true,
is(typeof(check(arg))) = false.
template ArgType(alias arg)
{
void check(T)(ref T t) {};
// static if(__traits(compiles,check(arg);))
On Monday, 29 October 2012 at 10:58:51 UTC, Philippe Sigaud wrote:
Tell me please,in this code first and second static if,are
these equivalent?
with arg = 1, __traits(compiles,check(arg);) = true,
is(typeof(check(arg))) = false.
__traits(compiles, ...) takes an expression, not a string. From
On Monday, 22 October 2012 at 12:44:35 UTC, Regan Heath wrote:
On Mon, 22 Oct 2012 12:39:48 +0100, bearophile
bearophileh...@lycos.com wrote:
Sumit Raja:
Am I using version correctly? How is this done usually?
I think version is usually meant to be given as compiler
switch. Maybe a
On Monday, October 29, 2012 10:30:35 Jacob Carlborg wrote:
On 2012-10-28 13:20, Jonathan M Davis wrote:
So, you save one set of braces? I don't see how that really buys you much.
Yes, and the try keyword. It would basically be the same as allowing
to get the exception in scope(failure) but
On Monday, 29 October 2012 at 05:47:21 UTC, Ali Çehreli wrote:
First, in order to build the code with dmd 2.060, I had to make
opEquals() and getRate() non-const.
Thanks for the answers.
I am using v2.060 as well so I assume this is not necessary,
maybe just a change you made along the way
On 2012-10-29 11:58, Jonathan M Davis wrote:
Except that the place that scope statements go in the code is completely
different from where catch statements go. catch statements go at the end
whereas scope statements go in the middle or even the beginning so that what
you're doing in there can
On Mon, 29 Oct 2012 11:31:33 -, Sumit Raja sumitr...@gmail.com wrote:
Thanks both this works great for structs. Anything similar I can do for
enums?
Example? (The C/C++ code you're trying to convert..)
R
--
Using Opera's revolutionary email client: http://www.opera.com/mail/
On Monday, October 29, 2012 11:42:59 Zhenya wrote:
Hi!
Tell me please,in this code first and second static if,are these
equivalent?
with arg = 1, __traits(compiles,check(arg);) = true,
is(typeof(check(arg))) = false.
In principle, is(typeof(code)) checks whether the code in there is
On Monday, 29 October 2012 at 12:31:56 UTC, Regan Heath wrote:
On Mon, 29 Oct 2012 11:31:33 -, Sumit Raja
sumitr...@gmail.com wrote:
Thanks both this works great for structs. Anything similar I
can do for enums?
Example? (The C/C++ code you're trying to convert..)
Yeah that might
Could you please tell me if Phobos contains any Exception class
descendants? If so, does the documentation contain a full list of
these or even the hierarchy scheme?
On Mon, 29 Oct 2012 13:47:46 -, Sumit Raja sumitr...@gmail.com wrote:
On Monday, 29 October 2012 at 12:31:56 UTC, Regan Heath wrote:
On Mon, 29 Oct 2012 11:31:33 -, Sumit Raja sumitr...@gmail.com
wrote:
Thanks both this works great for structs. Anything similar I can do
for enums?
Hi!
How to convert D's string to big endian?
How to convert to D's string from big endian?
UTF-8 isn't affected by endianness.
Al 29/10/12 16:17, En/na denizzzka ha escrit:
Hi!
How to convert D's string to big endian?
How to convert to D's string from big endian?
UTF-8 is always big emdian.
--
Jordi Sayol
On Monday, 29 October 2012 at 15:22:39 UTC, Adam D. Ruppe wrote:
UTF-8 isn't affected by endianness.
Ok, thanks!
On Monday, October 29, 2012 14:55:41 ref2401 wrote:
Could you please tell me if Phobos contains any Exception class
descendants? If so, does the documentation contain a full list of
these or even the hierarchy scheme?
Some modules declare exception types that they use (e.g.
On Monday, 29 October 2012 at 15:46:43 UTC, Jordi Sayol wrote:
Al 29/10/12 16:17, En/na denizzzka ha escrit:
Hi!
How to convert D's string to big endian?
How to convert to D's string from big endian?
UTF-8 is always big emdian.
Yes.
(I thought that the problem in this place but the
On Monday, 29 October 2012 at 15:46:43 UTC, Jordi Sayol wrote:
Al 29/10/12 16:17, En/na denizzzka ha escrit:
Hi!
How to convert D's string to big endian?
How to convert to D's string from big endian?
UTF-8 is always big emdian.
oops, what?
Q: Is the UTF-8 encoding scheme the same
immutable ubyte[] valueBin = cast(immutable(ubyte[]))
toStringz(s); // s is string type
Error: e2ir: cannot cast toStringz(s) of type immutable(char)* to
type immutable(ubyte[])
denizzzka:
immutable ubyte[] valueBin = cast(immutable(ubyte[]))
toStringz(s); // s is string type
Error: e2ir: cannot cast toStringz(s) of type immutable(char)*
to type immutable(ubyte[])
One way to do it:
import std.stdio;
void main() {
string s = hello;
auto valueBin =
On Monday, 29 October 2012 at 17:51:56 UTC, bearophile wrote:
denizzzka:
immutable ubyte[] valueBin = cast(immutable(ubyte[]))
toStringz(s); // s is string type
Error: e2ir: cannot cast toStringz(s) of type immutable(char)*
to type immutable(ubyte[])
One way to do it:
import std.stdio;
denizzzka:
I am trying to send to remote host utf8 text with zero byte at
end (required by protocol)
What if your UTF8 string coming from D already contains several
zeros?
toStringz(s) returns a pointer, so you can't cast a pointer (that
doesn't know the length the buffer it points to) to
On Monday, 29 October 2012 at 18:50:58 UTC, bearophile wrote:
denizzzka:
I am trying to send to remote host utf8 text with zero byte at
end (required by protocol)
What if your UTF8 string coming from D already contains several
zeros?
Incredible situation because it is text-based protocol
On 10/29/2012 03:14 PM, Regan Heath wrote:
On Mon, 29 Oct 2012 13:47:46 -, Sumit Raja sumitr...@gmail.com wrote:
On Monday, 29 October 2012 at 12:31:56 UTC, Regan Heath wrote:
On Mon, 29 Oct 2012 11:31:33 -, Sumit Raja sumitr...@gmail.com
wrote:
Thanks both this works great for
On 10/29/2012 12:03 PM, Jonathan M Davis wrote:
On Monday, October 29, 2012 11:42:59 Zhenya wrote:
Hi!
Tell me please,in this code first and second static if,are these
equivalent?
with arg = 1, __traits(compiles,check(arg);) = true,
is(typeof(check(arg))) = false.
In principle,
On 10/29/2012 05:04 AM, Dan wrote:
I have
installed vibe and it requires libraries like ssl, event_pthreads, etc.
I have those included in my command line. When I simply add the -m32 as
suggested it can no longer find those lib files. Do I then need to track
down 32 bit versions of each and
On Monday, October 29, 2012 23:38:34 Timon Gehr wrote:
On 10/29/2012 12:03 PM, Jonathan M Davis wrote:
On Monday, October 29, 2012 11:42:59 Zhenya wrote:
Hi!
Tell me please,in this code first and second static if,are these
equivalent?
with arg = 1, __traits(compiles,check(arg);) =
On 10/30/2012 12:17 AM, Jonathan M Davis wrote:
On Monday, October 29, 2012 23:38:34 Timon Gehr wrote:
On 10/29/2012 12:03 PM, Jonathan M Davis wrote:
On Monday, October 29, 2012 11:42:59 Zhenya wrote:
Hi!
Tell me please,in this code first and second static if,are these
equivalent?
with arg
On Tuesday, October 30, 2012 00:29:22 Timon Gehr wrote:
On 10/30/2012 12:17 AM, Jonathan M Davis wrote:
On Monday, October 29, 2012 23:38:34 Timon Gehr wrote:
On 10/29/2012 12:03 PM, Jonathan M Davis wrote:
On Monday, October 29, 2012 11:42:59 Zhenya wrote:
Hi!
Tell me please,in this
On 10/30/2012 01:43 AM, Jonathan M Davis wrote:
On Tuesday, October 30, 2012 00:29:22 Timon Gehr wrote:
On 10/30/2012 12:17 AM, Jonathan M Davis wrote:
On Monday, October 29, 2012 23:38:34 Timon Gehr wrote:
On 10/29/2012 12:03 PM, Jonathan M Davis wrote:
On Monday, October 29, 2012 11:42:59
On Tuesday, October 30, 2012 02:22:42 Timon Gehr wrote:
On 10/30/2012 01:43 AM, Jonathan M Davis wrote:
On Tuesday, October 30, 2012 00:29:22 Timon Gehr wrote:
On 10/30/2012 12:17 AM, Jonathan M Davis wrote:
On Monday, October 29, 2012 23:38:34 Timon Gehr wrote:
On 10/29/2012 12:03 PM,
35 matches
Mail list logo