On Wednesday, March 14, 2012 06:44:19 Chris Pons wrote:
> I'm new, and trying to incorporate assert and enforce into my
> program properly.
>
> My question revolves around, the fact that assert is only
> evaluated when using the debug switch.
assert has nothing to do with the debug switch. All th
On 03/14/2012 01:20 AM, Nick Sabalausky wrote:
"Timon Gehr" wrote in message
>> << >>> // 8 shift operators
== !=> < >=<= \ // 9 relational operators
!> !< !>= !<=<>\
!<> <>= !<>= in \
!in is !is
& // 10 bitwise AND (ambiguous with 9)
^ // 11 bitwi
On 14.03.2012 9:44, Chris Pons wrote:
I'm new, and trying to incorporate assert and enforce into my program
properly.
My question revolves around, the fact that assert is only evaluated when
using the debug switch. I read that assert throws a more serious
exception than enforce does, is this cor
"Timon Gehr" wrote in message
news:jjpmov$305u$1...@digitalmars.com...
> On 03/14/2012 01:20 AM, Nick Sabalausky wrote:
>> "Timon Gehr" wrote in message
>
>>> >> << >>> // 8 shift operators
>>> == !=> < >=<= \ // 9 relational operators
>>> !> !< !>= !<=<>\
>>> !<> <>= !<>= in \
>>>
Am 13.03.2012 21:34, schrieb Kiith-Sa:
SciD is a scientific math library providing vectors/matrices of arbitrary
sizes, but not useful at all for game development.
See gl3n for a game-oriented vector/matrix library:
https://bitbucket.org/dav1d/gl3n
Also, AFAIK, Manu is working on what should en
On 14-3-2012 0:14, Timon Gehr wrote:
I don't think there is, but I think I can create one:
! // 1 template instantiation
=> // 2 goesto, binds weaker to the right
. ++ -- ( [ // 3 postfix operators
^^ // 4 power (right-associative)
& ++ -- * - + ! ~ // 5 prefix operators
* / % // 6 multiplicativ
On Tue, 13 Mar 2012 16:26:08 -0400, Alex Rønne Petersen
wrote:
What the title says. It seems that core.sync.mutex does, but not sure
about the synchronized statement.
Yes. A simple test would have shown you that ;) But it would be good to
put this in the docs.
-Steve
On Tuesday, 14 February 2012 at 21:09:09 UTC, Ali Çehreli wrote:
On 02/14/2012 12:59 PM, RenatoL wrote:
mmmhhh this is interesting nevertheless i don't understand
the
solution of my problem, and i cannot even understand it's
origin:
void main()
{
string s1 = "abcd";
s1 = s1[stride
On 14-03-2012 13:24, Steven Schveighoffer wrote:
On Tue, 13 Mar 2012 16:26:08 -0400, Alex Rønne Petersen
wrote:
What the title says. It seems that core.sync.mutex does, but not sure
about the synchronized statement.
Yes. A simple test would have shown you that ;) But it would be good to
put
On 03/14/2012 01:23 PM, Jos van Uden wrote:
On 14-3-2012 0:14, Timon Gehr wrote:
I don't think there is, but I think I can create one:
! // 1 template instantiation
=> // 2 goesto, binds weaker to the right
. ++ -- ( [ // 3 postfix operators
^^ // 4 power (right-associative)
& ++ -- * - + ! ~ /
On 14.03.2012 18:57, Boscop wrote:
Hi everyone,
I wrote a blog post for people who know a bit of D and want to dig
deeper, it shows different approaches to get vector swizzling syntax in D:
http://boscop.tk/blog/?p=1
There is nothing revolutionary involved but it might still be useful to
someo
On 14.03.2012 19:03, Dmitry Olshansky wrote:
On 14.03.2012 18:57, Boscop wrote:
Hi everyone,
I wrote a blog post for people who know a bit of D and want to dig
deeper, it shows different approaches to get vector swizzling syntax
in D:
http://boscop.tk/blog/?p=1
There is nothing revolutionary
Am Tue, 13 Mar 2012 19:31:45 +0100
schrieb Alex Rønne Petersen :
> On 13-03-2012 19:28, Johannes Pfau wrote:
> > My std.uuid module doesn't compile with the latest dmd. I guess it's
> > because of a wrong opEquals signature, this is what I have now:
> >
> > --
> > @safe pure nothrow bool o
On Wed, Mar 14, 2012 at 03:57:02PM +0100, Boscop wrote:
> Hi everyone,
>
> I wrote a blog post for people who know a bit of D and want to dig
> deeper, it shows different approaches to get vector swizzling syntax
> in D:
>
> http://boscop.tk/blog/?p=1
>
> There is nothing revolutionary involved
How do I check if a given type T can be implicitly converted to some
type S at compile-time? I'm trying to write a signature constraint for a
template function that should only be instantiated if the parameter type
can be implicitly assigned to some given type S.
struct S(T) {
On 14-03-2012 18:07, H. S. Teoh wrote:
How do I check if a given type T can be implicitly converted to some
type S at compile-time? I'm trying to write a signature constraint for a
template function that should only be instantiated if the parameter type
can be implicitly assigned to some given ty
On Wed, Mar 14, 2012 at 06:08:24PM +0100, Adam D. Ruppe wrote:
> if(is(T : S))
>
> http://dlang.org/expression.html#IsExpression
>
> this is form #2.
Ahh, thanks. I keep forgetting what the various forms of is() do... sigh.
Another question: is wstring assignable to dstring, or string to wstrin
On 14/03/12 15:57, Boscop wrote:
Hi everyone,
I wrote a blog post for people who know a bit of D and want to dig
deeper, it shows different approaches to get vector swizzling syntax in D:
http://boscop.tk/blog/?p=1
There is nothing revolutionary involved but it might still be useful to
someone
On Wednesday, 14 March 2012 at 17:35:06 UTC, Don Clugston wrote:
In the last bit of code, why not use CTFE for valid(string s)
instead of templates?
bool valid(string s)
{
foreach(c; s)
{
if (c < 'w' || c > 'z') return false;
}
return true;
}
In fact you can use CTFE for the o
"H. S. Teoh" wrote in message
news:mailman.662.1331746435.4860.digitalmars-d-le...@puremagic.com...
> On Wed, Mar 14, 2012 at 06:08:24PM +0100, Adam D. Ruppe wrote:
>> if(is(T : S))
>>
>> http://dlang.org/expression.html#IsExpression
>>
>> this is form #2.
>
> Ahh, thanks. I keep forgetting what
"Nick Sabalausky" wrote in message
news:jjqp0n$1pga$1...@digitalmars.com...
>
> What might make that a little confusing, though, is that string *literals*
> which are not suffixed with c/w/d are *not* necessarily string, but rather
> can acually *be* (ie, not "implicitly convertable to", but th
On 13/03/2012 23:14, Timon Gehr wrote:
(Also, for
associativity: Assign and OpAssign are right-associative and everything else
is left-associative, correct?)
Power is right-associative too.
You forgot the conditional operator.
And the relational operators are non-associative (a == b == c
On 14/03/2012 09:59, Dmitry Olshansky wrote:
...
To make it real simple:
- assert on stuff you know has to be true regardless of circumstances
and not dependent on any possible external factors.
- enforce on stuff that must be true, but in general can fail like "file
not found", etc. and/or depe
On Wednesday, March 14, 2012 20:15:16 Spacen Jasset wrote:
> Is enforce then a way of generating exceptions in an easier way rather
> than using some sort of "if (failure) throw" syntax? In other words, I
> assume it's a mechanism to help you use exceptions, and not some new
> semantic.
It is pure
I've been reading the tutorial on templates and found this example:
template rank(T) {
static if (is(T t == U[], U)) // is T an array of U, for some type U?
enum rank = 1 + rank!(U); // then let’s recurse down.
else
enum rank = 0; // Base case, ending the recursion.
}
T
Thank you for the valuable information! The difference between
assert and enforce is now clearer in my mind.
Also, that's a great trick with enforce.
On Thursday, 15 March 2012 at 01:08:02 UTC, Jonathan M Davis
wrote:
On Wednesday, March 14, 2012 20:15:16 Spacen Jasset wrote:
Is enforce then
On Thursday, 15 March 2012 at 02:34:45 UTC, Jos van Uden wrote:
I've been reading the tutorial on templates and found this
example:
template rank(T) {
static if (is(T t == U[], U)) // is T an array of U, for
some type U?
enum rank = 1 + rank!(U); // then let’s recurse down.
e
I haven't used DLL's much, especially one I've built on my own,
so guidance would be appreciated.
I'm trying to figure out how to build a DLL which was written in
D but i'm not sure i'm doing this right.
I'm using VS2010 and Visual D. Visual D has a template for Dll's
in D, so I used that to
On 3/15/2012 12:26 PM, Chris Pons wrote:
I haven't used DLL's much, especially one I've built on my own, so
guidance would be appreciated.
I'm trying to figure out how to build a DLL which was written in D but
i'm not sure i'm doing this right.
I'm using VS2010 and Visual D. Visual D has a temp
29 matches
Mail list logo