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/201
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 Z
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!
>
> >>>
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 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,
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
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, is(typeof(co
On 10/29/2012 03:14 PM, Regan Heath wrote:
On Mon, 29 Oct 2012 13:47:46 -, Sumit Raja wrote:
On Monday, 29 October 2012 at 12:31:56 UTC, Regan Heath wrote:
On Mon, 29 Oct 2012 11:31:33 -, Sumit Raja
wrote:
Thanks both this works great for structs. Anything similar I can do
for enums?
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
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 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;
v
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 = cast(i
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[])
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 probl
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 irrespe
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. std.file.FileExce
On Monday, 29 October 2012 at 15:22:39 UTC, Adam D. Ruppe wrote:
UTF-8 isn't affected by endianness.
Ok, thanks!
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
UTF-8 isn't affected by endianness.
Hi!
How to convert D's string to big endian?
How to convert to D's string from big endian?
On Mon, 29 Oct 2012 13:47:46 -, Sumit Raja wrote:
On Monday, 29 October 2012 at 12:31:56 UTC, Regan Heath wrote:
On Mon, 29 Oct 2012 11:31:33 -, Sumit Raja
wrote:
Thanks both this works great for structs. Anything similar I can do
for enums?
Example? (The C/C++ code you're trying
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 Monday, 29 October 2012 at 12:31:56 UTC, Regan Heath wrote:
On Mon, 29 Oct 2012 11:31:33 -, Sumit Raja
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 help... One example here
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 Mon, 29 Oct 2012 11:31:33 -, Sumit Raja 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 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 be
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 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(failur
On Monday, 22 October 2012 at 12:44:35 UTC, Regan Heath wrote:
On Mon, 22 Oct 2012 12:39:48 +0100, bearophile
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 simple enum + static if is e
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
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 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 Car
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 h
33 matches
Mail list logo