On Wednesday, 25 September 2013 at 06:51:44 UTC, Jacob Carlborg
wrote:
On 2013-09-24 18:25, Brad Roberts wrote:
https://github.com/braddr/d-tester
Could you add a link to this on the test results page? I always
forget where this code is located.
http://d.puremagic.com/test-results/
On Wednesday, 25 September 2013 at 11:29:16 UTC, Jacob Carlborg
wrote:
On 2013-09-25 09:30, simendsjo wrote:
http://d.puremagic.com/test-results/
I know where the test results are. But, what I'm forgetting is
where the code is which implements these test results. I want
this page:
http
I just came across a problem where I either has a cyclic
dependency, pass around three delegates, implement an interface
or somehow hack some communication between two modules.
A simple way would be to add an interface, but interfaces require
implementations to be public. The methods should
On Tuesday, 24 September 2013 at 07:08:24 UTC, Jonathan M Davis
wrote:
On Tuesday, September 24, 2013 08:54:42 simendsjo wrote:
I just came across a problem where I either has a cyclic
dependency, pass around three delegates, implement an interface
or somehow hack some communication between two
On Monday, 23 September 2013 at 09:42:59 UTC, bearophile wrote:
John Carter:
is there a similar mechanism in D? Or should I do...
string foo =
long
string
without
linefeeds
;
Genrally you should do:
string foo = long ~
string ~
without ~
linefeeds;
On Monday, 23 September 2013 at 07:47:32 UTC, Jacob Carlborg
wrote:
On 2013-09-20 16:12, simendsjo wrote:
You could of course fix this in a library too.
enum AttributeUsage {
struct_ = 1 0,
class_ = 1 1,
//etc
}
struct attribute { AttributeUsage usage; }
Then the library could give
God, I hate these errors. Tried updating dmd head, and these
started popping up.
Now I have to move all templates out...
On Sunday, 22 September 2013 at 12:26:03 UTC, bearophile wrote:
simendsjo:
God, I hate these errors. Tried updating dmd head, and these
started popping up.
Now I have to move all templates out...
Can you show a small example of code that gives that error?
Bye,
bearophile
Nope. I cannot
On Sunday, 22 September 2013 at 12:26:03 UTC, bearophile wrote:
simendsjo:
God, I hate these errors. Tried updating dmd head, and these
started popping up.
Now I have to move all templates out...
Can you show a small example of code that gives that error?
Bye,
bearophile
dustmite
In 2.063.2, (T!int).stringof == T!(int). In current head, it's
T!int.
Even (T!(int)).stringof == T!int.
So is this a regression bug or a bugfix?
On Sunday, 22 September 2013 at 13:36:48 UTC, simendsjo wrote:
On Sunday, 22 September 2013 at 12:26:03 UTC, bearophile wrote:
simendsjo:
God, I hate these errors. Tried updating dmd head, and these
started popping up.
Now I have to move all templates out...
Can you show a small example
On Sunday, 22 September 2013 at 13:50:00 UTC, simendsjo wrote:
In 2.063.2, (T!int).stringof == T!(int). In current head,
it's T!int.
Even (T!(int)).stringof == T!int.
So is this a regression bug or a bugfix?
Added a ticket so it doesn't get lost:
http://d.puremagic.com/issues/show_bug.cgi
This is incorrect, but what is the correct syntax? The arrays
page only says it's an advanced feature, but doesn't show the
syntax.
int[] a = new int[1](void);
On Saturday, 21 September 2013 at 10:40:07 UTC, bearophile wrote:
simendsjo:
This is incorrect, but what is the correct syntax? The arrays
page only says it's an advanced feature, but doesn't show
the syntax.
int[] a = new int[1](void);
The simplest way to allocate a void-initialized GC
I want to know if a variable has changed .init, but I don't know
if it's possible if the .init value is the same. Does anyone have
a solution for this?
int a;
int b = 0;
pragma(msg, a.init); // 0
pragma(msg, b.init); // 0
// how can I see that b has = 0?
On Saturday, 21 September 2013 at 11:36:32 UTC, bearophile wrote:
simendsjo:
Thanks. uninitializedArray works well for my need.
uninitializedArray is the wrong function to use in 99.9% of the
times. std.array docs probably have not explained you well
enough the risks of its usage.
Bye
On Saturday, 21 September 2013 at 13:55:00 UTC, Dicebot wrote:
On Saturday, 21 September 2013 at 13:48:00 UTC, simendsjo wrote:
On Saturday, 21 September 2013 at 13:38:44 UTC, Dicebot wrote:
On Saturday, 21 September 2013 at 13:30:19 UTC, simendsjo
wrote:
I'm though of using if for aggregates
On Saturday, 21 September 2013 at 15:43:11 UTC, Maxim Fomin wrote:
On Saturday, 21 September 2013 at 11:13:57 UTC, simendsjo wrote:
I want to know if a variable has changed .init, but I don't
know if it's possible if the .init value is the same. Does
anyone have a solution for this?
int
On Friday, 20 September 2013 at 07:57:43 UTC, Jacob Carlborg
wrote:
On 2013-09-20 08:59, ilya-stromberg wrote:
Can I explicitly specify when I can use attribute? Something
like
this:
@attribute(field)
struct matches(string mustMatch)
{
}
string wrongAttribute
{
}
class Foo
{
On Monday, 16 September 2013 at 06:47:40 UTC, ilya-stromberg
wrote:
On Sunday, 15 September 2013 at 18:31:40 UTC, simendsjo wrote:
On Sunday, 15 September 2013 at 17:34:06 UTC, matovitch wrote:
Hi everyone,
I read the documentation about user defined attributes, but I
don't see their uses
On Monday, 16 September 2013 at 10:29:12 UTC, matovitch wrote:
All your examples are great, thank you ! Is there a way to omit
validate such that the compiler would call it implicitly ?
For example :
class C {
...
}
void fun(@nonNull C c) {
...
};
C c;
fun(c); //compilation error since
On Sunday, 15 September 2013 at 17:34:06 UTC, matovitch wrote:
Hi everyone,
I read the documentation about user defined attributes, but I
don't see their uses. Ok, it'a a template expression you can
link to a declaration, but what are they useful for ? (not sure
about the syntax ;-))
Can
Ref: http://d.puremagic.com/issues/show_bug.cgi?id=11022
I'm trying to dustmite a compiler crash (with assertion), but on
windows, *every* time the compiler crashes, I get a dialog
stating abnormal program termination.
This means I have to sit at my computer pressing space every time
On Saturday, 14 September 2013 at 09:32:09 UTC, simendsjo wrote:
Ref: http://d.puremagic.com/issues/show_bug.cgi?id=11022
I'm trying to dustmite a compiler crash (with assertion), but
on windows, *every* time the compiler crashes, I get a dialog
stating abnormal program termination
On Saturday, 14 September 2013 at 11:00:26 UTC, Jacob Carlborg
wrote:
On 2013-09-14 00:10, simendsjo wrote:
But I doubt many people here agree D2 is in beta and will
allow breaking
existing code in ways that changing the aforementioned
features would do.
DMD breaks code in every single
On Saturday, 14 September 2013 at 10:50:17 UTC, Jacob Carlborg
wrote:
On 2013-09-13 16:17, Orvid King wrote:
Well, I usually do it as:
int[string] someCache;
int getValue(string key)
{
if (auto val = key in someCache)
return *val;
return someCache[key] = -3;
}
That doesn't
Compiling with --build=unittest and debug works, but not
--build=release:
$ dub build --build=debug
Checking dependencies in 'C:\code\d\myapp'
Building configuration application, build type debug
Copying files...
Running dmd (compile)...
Compiling diet template 'about.dt' (compat)...
Linking...
On Saturday, 14 September 2013 at 11:45:38 UTC, Namespace wrote:
On Saturday, 14 September 2013 at 11:29:33 UTC, simendsjo wrote:
On Saturday, 14 September 2013 at 11:00:26 UTC, Jacob Carlborg
wrote:
On 2013-09-14 00:10, simendsjo wrote:
But I doubt many people here agree D2 is in beta
On Thursday, 12 September 2013 at 21:33:48 UTC, Andrej Mitrovic
wrote:
On 9/12/13, simendsjo simend...@gmail.com wrote:
Thanks. I just ended up using both is(__parameters and
is(function to fetch the parameter names. Sometimes it seems
things are added to D without a very thorough design phase
allMembers returns this, but trying to get this or __ctor
using getMember fails. Is there any way to get this method?
On Friday, 13 September 2013 at 07:42:48 UTC, Jacob Carlborg
wrote:
On 2013-09-13 08:33, simendsjo wrote:
Didn't know you could call __traits(identifier for the
__parameter
values. __parameters is practically undocumented, and doesn't
even have
an example.
It's documented here:
http
What should I do when DMD keeps crashing and doesn't give me any
output?
I'm using dmd 2.063.2 on win8.
This is all that -v gives me before crashing..
binaryC:\dmd\windows\bin\dmd.exe
version v2.063.2
configC:\dmd\windows\bin\sc.ini
parse app
I've tried compiling just object
On Friday, 13 September 2013 at 12:45:06 UTC, nazriel wrote:
On Friday, 13 September 2013 at 12:41:44 UTC, simendsjo wrote:
What should I do when DMD keeps crashing and doesn't give me
any output?
I'm using dmd 2.063.2 on win8.
This is all that -v gives me before crashing..
binaryC:\dmd
On Friday, 13 September 2013 at 12:53:17 UTC, bearophile wrote:
simendsjo:
What should I do when DMD keeps crashing and doesn't give me
any output?
I suggest to look for stack overflows in the program (and/or
increase the stack space). Since some time it has stopped
giving a stack overflow
On Friday, 13 September 2013 at 13:16:12 UTC, Gary Willoughby
wrote:
On Friday, 13 September 2013 at 09:12:53 UTC, simendsjo wrote:
allMembers returns this, but trying to get this or
__ctor using getMember fails. Is there any way to get this
method?
foreach (func; __traits(getOverloads, T
On Friday, 13 September 2013 at 12:45:06 UTC, nazriel wrote:
On Friday, 13 September 2013 at 12:41:44 UTC, simendsjo wrote:
(...)
Is there any way to get more verbose info from dmd?
Run it via GDB, OllyDBG, [putyourfavouritedebugerhere]
The error is Access Violation when reading 0004
Added a bug report:
http://d.puremagic.com/issues/show_bug.cgi?id=11023
On Friday, 13 September 2013 at 14:02:15 UTC, Gary Willoughby
wrote:
On Friday, 13 September 2013 at 13:31:34 UTC, simendsjo wrote:
On Friday, 13 September 2013 at 13:16:12 UTC, Gary Willoughby
wrote:
On Friday, 13 September 2013 at 09:12:53 UTC, simendsjo wrote:
allMembers returns
On Friday, 13 September 2013 at 15:27:42 UTC, Namespace wrote:
On Friday, 13 September 2013 at 15:16:36 UTC, H. S. Teoh wrote:
On Fri, Sep 13, 2013 at 04:16:30PM +0200, simendsjo wrote:
On Friday, 13 September 2013 at 14:02:15 UTC, Gary Willoughby
wrote:
[...]
(...)
The syntax
The documentation says the parameter tuple of a function,
delegate, or function pointer. This includes the parameter types,
names, and default values.
.. but what type is it?
Error: argument (int i, char c, string s, bool b = false) to
typeof is not an expression
How am I supposed to get
I haven't done any D coding since May, but picked up my little
toy code again now.
Last time I had a lot of hassle with not being able to
store/access symbols through templates, and I got the same thing
now.
Am I the only one hitting these all the time?
I'm basically playing around with
On Thursday, 12 September 2013 at 19:41:26 UTC, H. S. Teoh wrote:
On Thu, Sep 12, 2013 at 08:44:29PM +0200, simendsjo wrote:
(...)
.. but what type is it?
Error: argument (int i, char c, string s, bool b = false) to
typeof
is not an expression
How am I supposed to get the parameter names
Very newbie question coming up :)
How does D mark null values for classes?
`c is null` returns true, but `c` isn't 0.
So how does D know `c is null`?
class C {}
C c;
assert(c is null);
assert(cast(size_t)c == 0); // fails.
On Tuesday, 14 May 2013 at 12:20:00 UTC, Andrej Mitrovic wrote:
On Tuesday, 14 May 2013 at 12:18:20 UTC, simendsjo wrote:
Very newbie question coming up :)
How does D mark null values for classes?
`c is null` returns true, but `c` isn't 0.
So how does D know `c is null`?
class C {}
C c
On Tuesday, 16 April 2013 at 21:09:42 UTC, gedaiu wrote:
On Monday, 15 April 2013 at 19:25:19 UTC, simendsjo wrote:
On Monday, 15 April 2013 at 17:34:07 UTC, gedaiu wrote:
Hi,
Can anyone help me to connect to mysql from D?
Thanks!
You can use Steve Teales native library. The most up
On Monday, 15 April 2013 at 17:34:07 UTC, gedaiu wrote:
Hi,
Can anyone help me to connect to mysql from D?
Thanks!
You can use Steve Teales native library. The most up-to-date
version is here: https://github.com/rejectedsoftware/mysql-native
It relies on vibes async sockets though. You'll
This is probably not a minimal test-case, and I haven't tested
with more types, but it shows the problem.
// This works
struct S {
this(int i) {
a = i;
}
union {
int a = void;
int b = void;
}
}
unittest
{
auto s = S(1);
assert(s.a == s.b);
Filed a bug. http://d.puremagic.com/issues/show_bug.cgi?id=9932
On Saturday, 13 April 2013 at 19:11:42 UTC, bearophile wrote:
simendsjo:
void f() nothrow { // Error: _arrayExpSliceAddass_i is not
nothrow
int[3] d;
d[] += 3;
}
Currently those ops are not nothrow. I think they will
eventually become nothrow...
Bye,
bearophile
void f() nothrow { // Error: _arrayExpSliceAddass_i is not
nothrow
int[3] d;
d[] += 3;
}
On Tuesday, 19 March 2013 at 08:25:45 UTC, timotheecour wrote:
we need a std.algorithm.equalRecurse(T1,T2)(T1 a, T2 b) that
compares recursively a and b;
its behavior should be:
if opEqual is defined, call it
else, if its a range, call std.algorithm.equal (ie compare nb
elements, then each
When a struct contains methods, __traits(allMembers reports a
member called this. What is this?
void main() {
struct S { int i; }
struct A { int i; void f() {} }
pragma(msg, __traits(allMembers, S)); // i
pragma(msg, __traits(allMembers, A)); // i, f, this
}
I get a lot of these errors, and they can be quite tricky to get
around and hurts my API.. Is this a temporary restriction in DMD,
or is it another reason why this doesn't work?
Error: template instance template!local cannot use local 'local'
as parameter to non-global template
On Sunday, 17 March 2013 at 13:30:29 UTC, Maxim Fomin wrote:
On Sunday, 17 March 2013 at 12:16:08 UTC, simendsjo wrote:
When a struct contains methods, __traits(allMembers reports a
member called this. What is this?
void main() {
struct S { int i; }
struct A { int i; void f
On Sunday, 17 March 2013 at 14:46:59 UTC, Jacob Carlborg wrote:
On 2013-03-11 21:41, simendsjo wrote:
Some update.. Using a custom Tuple(T...) makes things a bit
smoother.
Here's my first working test with two templates: hasAttr to
see if an
attribute exists, and attrOfType to get all
On Sunday, 17 March 2013 at 15:45:54 UTC, Timon Gehr wrote:
On 03/17/2013 01:54 PM, simendsjo wrote:
I get a lot of these errors, and they can be quite tricky to
get around
and hurts my API.. Is this a temporary restriction in DMD, or
is it
another reason why this doesn't work?
Error
On Sunday, 17 March 2013 at 16:21:25 UTC, Timon Gehr wrote:
On 03/17/2013 05:15 PM, simendsjo wrote:
On Sunday, 17 March 2013 at 15:45:54 UTC, Timon Gehr wrote:
On 03/17/2013 01:54 PM, simendsjo wrote:
I get a lot of these errors, and they can be quite tricky to
get around
and hurts my API
Anyone have any idea what this means?
Error: template instance TupleWrapper!(i, i) TupleWrapper!(i, i)
is nested in both S and D
I don't have a minimal testcase, but I can try to create one if
it's difficult to see otherwise.
Why is the function called in the template at the line of
.stringof?
template t(alias fn) {
static if(fn.stringof) // f(int i) isn't callable using ()
enum t = true;
else
enum t = false;
}
void main() {
void f(int i) {}
t!f;
}
On Saturday, 16 March 2013 at 13:01:44 UTC, simendsjo wrote:
Why is the function called in the template at the line of
.stringof?
template t(alias fn) {
static if(fn.stringof) // f(int i) isn't callable using ()
enum t = true;
else
enum t = false;
}
void main
Code coverage doesn't work with templates. Is this by design?
t.d:
module t;
template t(T) {
static if(is(T == int))
alias int t;
else static if(is(T == short))
alias short t;
}
unittest {
t!int a = 10;
assert(a == 10);
}
On Thursday, 14 March 2013 at 16:09:01 UTC, bearophile wrote:
simendsjo:
Code coverage doesn't work with templates. Is this by design?
A code coverage tells how many time a line of code is run at
run-time. But your template contains no code that is run at
run-time. So you are looking
On Thursday, 14 March 2013 at 16:26:21 UTC, bearophile wrote:
simendsjo:
Would be nice to easily see that the templates are being
tested more properly though.
Then add an enhancement request in bugzilla. Maybe there is a
way to implement it.
I remember someone asking for a compiler switch
On Wednesday, 13 March 2013 at 11:21:53 UTC, simendsjo wrote:
On Wednesday, 13 March 2013 at 11:13:55 UTC, monarch_dodra
wrote:
On Wednesday, 13 March 2013 at 10:34:14 UTC, simendsjo wrote:
Say you have a tuple type:
struct Tuple(T...) {
alias T Tuple;
}
and a template
template t
On Wednesday, 13 March 2013 at 09:35:18 UTC, Andrea Fontana wrote:
I've tried to build documentation using ddoc format and dmd.
dmd -c -D -o- ...
Generated documentation looks ugly and without stylesheet. Am I
wrong? I expected a phobos-like documentation.
So, what do you use to generate
Say you have a tuple type:
struct Tuple(T...) {
alias T Tuple;
}
and a template
template t(alias A, alias B) {
// something something
}
Given
alias Tuple!(int, 1) A;
alias Tuple!(int, 1) B;
Is it possible to send this to template t as follows
t!(A,
On Wednesday, 13 March 2013 at 15:49:06 UTC, jerro wrote:
and a template
template t(alias A, alias B) {
// something something
}
Given
alias Tuple!(int, 1) A;
alias Tuple!(int, 1) B;
Is it possible to send this to template t as follows
t!(A, B)
without it expanding to
t!(int, 1, int, 1)
?
On Tuesday, 12 March 2013 at 14:21:06 UTC, bearophile wrote:
Benjamin Thaut:
Thats not correct. Rainer Schuetze has finished it and is
using it for VisualD. You can get a version of druntime which
the percise GC from his github branch
https://github.com/rainers/dmd
I am glad to be wrong
I've been trying UDAs today, but I'm hitting roadblocks all the
time..
For instance:
@(10) struct A;
pragma(msg, __traits(getAttributes, A)); // Empty
@(10) struct B {}
pragma(msg, __traits(getAttributes, B)); // tuple(10)
I've encountered several other things that has been
On Monday, 11 March 2013 at 19:03:49 UTC, simendsjo wrote:
I've been trying UDAs today, but I'm hitting roadblocks all the
time..
For instance:
@(10) struct A;
pragma(msg, __traits(getAttributes, A)); // Empty
@(10) struct B {}
pragma(msg, __traits(getAttributes, B)); // tuple
I haven't used valgrind/cachegrind on C/C++ programs before, but
I'm pretty sure it doesn't behave as expected on D code. I found
this page to fix the mangling issue:
http://wiki.dlang.org/Other_Dev_Tools, but all callgraphs is
empty.
On Sunday, 10 March 2013 at 11:06:41 UTC, simendsjo wrote:
I haven't used valgrind/cachegrind on C/C++ programs before,
but I'm pretty sure it doesn't behave as expected on D code. I
found this page to fix the mangling issue:
http://wiki.dlang.org/Other_Dev_Tools, but all callgraphs is
empty
On Sunday, 10 March 2013 at 11:58:39 UTC, Druzhinin Alexandr
wrote:
On 10.03.2013 18:11, simendsjo wrote:
On Sunday, 10 March 2013 at 11:06:41 UTC, simendsjo wrote:
I haven't used valgrind/cachegrind on C/C++ programs before,
but I'm
pretty sure it doesn't behave as expected on D code. I found
On Wednesday, 6 March 2013 at 21:06:43 UTC, ixid wrote:
The underscores in values such as 1_000_000 aid readability but
DMD doesn't see anything wrong with any placement of
underscores as long as they follow a number. Is there any
reason to allow uses like 1_00_000, which are typos or
On Thursday, 7 March 2013 at 07:20:16 UTC, Jeremy DeHaan wrote:
That's what toStringz is for, and it'll avoid appending the
'\0' if it can
(e.g. if the code unit one past the end of the string is '\0'
as it is with
string literals).
I actually have a different question related to this
On Tuesday, 5 March 2013 at 08:09:37 UTC, cal wrote:
On Tuesday, 5 March 2013 at 08:04:12 UTC, Andrej Mitrovic wrote:
You can't test declarations inside of __traits(compiles), only
expressions. It's in the docs:
http://dlang.org/traits.html#compiles
So why does this work:
import std.conv;
On Tuesday, 5 March 2013 at 08:04:12 UTC, Andrej Mitrovic wrote:
On Tuesday, 5 March 2013 at 07:53:15 UTC, cal wrote:
I'm confused about this:
import std.conv;
void main()
{
enum s = `1`.to!int;;
enum c = __traits(compiles, mixin({auto a = new
~s~;})); // line 1
mixin(auto a =
I seem to remember phobos has an interval type so you can specify:
Interval!((], 0, 10) myvalue;
Interval!((0,10]) myvalue; // or perhaps like this..
and get
enforce(value 0 value = 10);
added automatically.
I'm unable to find it though.. Is my memory playing tricks on me?
Everyone says Don't use std.xml, and there are several other
libraries.
Which can you recommend? (I haven't looked closely at any of
them, just some links found by googling)
https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff/blob/master/dom.d
invariant is called when a method enters. This creates problems
if the constructor calls a setter:
import std.exception;
struct S {
private int _i;
public:
this(int i) {
this.i = i;
}
@property void i(int v) {
enforce(v 1);
_i = v;
}
invariant() {
assert(_i 1);
On Thursday, 28 February 2013 at 09:35:03 UTC, rho wrote:
hi,
what keeps me from using d, is that there is no compilable gui
lib available. does dfl compile with the latest dmd?
http://wiki.dlang.org/Libraries_and_Frameworks#GUI_Libraries
I haven't used any of them in a while, but I think at
Does anyone have any experience using PostgreSQL with D?
I've found several libraries, but I'm uncertain which is usable
(if any..)
https://github.com/zhaopuming/pqd
https://github.com/denizzzka/dpq2
On Friday, 8 February 2013 at 17:16:15 UTC, Nrgyzer wrote:
Hi guys,
I'm updated from DMD 2.060 to 2.061 and I just run into some
trouble by using associative arrays. Let's say I've the
following few lines:
string[string] myValues;
ref string getValue(string v) {
return myValues[v];
}
On Monday, 4 February 2013 at 09:02:31 UTC, o3o wrote:
I'm a C# programmer, when I apply IoC pattern I use readonly
keyword
(http://msdn.microsoft.com/en-us/library/acdd6hb7%28v=vs.71%29.aspx)
in this manner:
:// C# code
:interface IFoo {
: void Fun();
:}
:
:class Foo: IFoo {
: void Fun()
On Monday, 4 February 2013 at 10:26:55 UTC, simendsjo wrote:
On Monday, 4 February 2013 at 09:02:31 UTC, o3o wrote:
I'm a C# programmer, when I apply IoC pattern I use
readonly keyword
(http://msdn.microsoft.com/en-us/library/acdd6hb7%28v=vs.71%29.aspx)
in this manner:
:// C# code
On Wednesday, 30 January 2013 at 03:38:39 UTC, Chad Joan wrote:
I've read more than once now that 'protected' is considered
useless in D. Why is this?
I'm not sure what articles you are referring to, but a couple of
points it might think of:
* Anything protected can be made public by derived
On Wednesday, 23 January 2013 at 10:30:08 UTC, Namespace wrote:
But AFAIK scope isn't fully implemented as storage class, or am
I wrong?
I think you are right. And I think it's the reason using 'in'
parameters are discouraged.
On Wednesday, 23 January 2013 at 13:43:58 UTC, mist wrote:
On Wednesday, 23 January 2013 at 10:43:24 UTC, simendsjo wrote:
On Wednesday, 23 January 2013 at 10:30:08 UTC, Namespace wrote:
But AFAIK scope isn't fully implemented as storage class, or
am I wrong?
I think you are right. And I
On Wednesday, 9 January 2013 at 13:42:52 UTC, MrOrdinaire wrote:
Hi,
In Go, I can just install the documentation and later consult
it using the godoc command, e.g. `godoc fmt Println` would give
the documentation for the Println Function inside the fmt
package.
Is there anything like that
On Friday, 14 December 2012 at 09:30:50 UTC, Jeremy DeHaan wrote:
I was playing with some code in the Derelict project(mainly the
SFML portion) and was wondering what would happen if I made
some changes.
Here's an example of what I mean.
In the C code, the struct sfVector2f is defined as
On Monday, 12 November 2012 at 21:03:51 UTC, cal wrote:
Is the following a bug?
import std.c.string, core.memory;
void* makeNew(T)()
{
T t = T.init;
void* ptr = GC.malloc(T.sizeof);
memcpy(ptr, t, T.sizeof);
return ptr;
}
void main()
{
alias string T;
T* iptr =
On Friday, 26 October 2012 at 16:32:29 UTC, Jonathan M Davis
wrote:
On Friday, October 26, 2012 15:55:34 simendsjo wrote:
So.. What do I need to implement for a struct to be a valid
built-in type?
All valid properties (min, max etc) and operators for that
type?
So, you want stuff like
On Saturday, 27 October 2012 at 10:07:20 UTC, Jonathan M Davis
wrote:
On Saturday, October 27, 2012 11:58:57 simendsjo wrote:
The thing is that I often doesn't really care about the type,
only that it exposes certain properties.
Then create a template constraint (or eponymous template to use
Not sure if this is a bug or intended behavior:
import std.traits;
struct S {
int i;
T opCast(T)() if(isFloatingPoint!T) {
return cast(T)i;
}
}
template myIsFloatingPoint(T) {
enum myIsFloatingPoint = isFloatingPoint!T
|| __traits(compiles, {
On Thursday, 18 October 2012 at 11:31:47 UTC, tn wrote:
Hi.
I want to extend math library functions to work with my own
type. However, the definition for my own type seems to prevent
automated access to the original function. How can I fix this
unexpected behavior?
Simplified example:
On Thursday, 18 October 2012 at 12:10:17 UTC, tn wrote:
On Thursday, 18 October 2012 at 11:43:40 UTC, simendsjo wrote:
On Thursday, 18 October 2012 at 11:31:47 UTC, tn wrote:
(...)
You need to manually add std.math.exp2 to the overload set so
importing external methods doesn't hijack your
On Friday, 5 October 2012 at 15:16:10 UTC, Don Clugston wrote:
On 05/10/12 16:33, simendsjo wrote:
Are there any known workarounds for forward reference bugs?
I see 80 bugs is filed, but I don't want to read all of them
to find any
workarounds. I cannot find anything on the wiki regarding
On Saturday, 6 October 2012 at 10:17:34 UTC, simendsjo wrote:
On Friday, 5 October 2012 at 15:16:10 UTC, Don Clugston wrote:
On 05/10/12 16:33, simendsjo wrote:
Are there any known workarounds for forward reference bugs?
I see 80 bugs is filed, but I don't want to read all of them
to find any
Are there any known workarounds for forward reference bugs?
I see 80 bugs is filed, but I don't want to read all of them to
find any workarounds. I cannot find anything on the wiki
regarding this.
So.. Any good ideas how to get around this?
What does the message in the subject mean?
Here's a testcase (tested on dmd 2.060 on win7 32-bit):
import core.exception;
import core.runtime; // comment out this, and no stacktrace is
printed
void myAssertHandler(string file, size_t line, string msg = null)
{ }
static this() {
101 - 200 of 582 matches
Mail list logo