On 04/23/2012 07:43 PM, Jonathan M Davis wrote:
On Monday, April 23, 2012 13:42:36 Jacob Carlborg wrote:
On 2012-04-23 10:26, Era Scarecrow wrote:
On Monday, 23 April 2012 at 06:19:12 UTC, Jacob Carlborg wrote:
"public" is the default access level.
So it is... That explains why the tests cam
One day I'll finish my OpenGL wrapper for D. It will give you
better abilities in creating OpenGL 3 contexts than most C++
frameworks (SDL, GLFW etc.) and, I hope, will get rid of passing
pointers to functions.
It will be done soon after I'll finish Scintilla wrapper for D.
And it will be don
Hm, doesn't anybody know anything about it?
On 04/23/2012 11:29 PM, Namespace wrote:
I have this code:
...
T _get() {
return this._value;
}
const(T) _get() const {
return this._value;
}
You missed the 'immutable' and 'inout cases.
Just use inout(T) _get() inout { return _value; } instead of the
On Mon, 23 Apr 2012 16:43:20 +0100, Steven Schveighoffer
wrote:
While dealing with unicode in my std.stream rewrite, I've found that
hand-decoding dchars is way faster than using library calls.
After watching Andrei's talk on generic and generative programming I have
to ask, which routin
"bearophile" , dans le message (digitalmars.D.learn:35108), a écrit :
> What about (untested):
>
> auto uniformRange(T1 lower, T2 upper) {
> return count().map!(_ => uniform(lower, upper))();
> }
That looks like a workarround, not meaningful code.
How about
return repeat(_ =>uniform(lower
With the dmd 2.059 I have started getting the error 'use of base class
protection is deprecated' when I try to implement an interface with
private visibility, ie:
interface Interface { }
class Class : private Interface { }
$ dmd test.d
test.d(4): use of base class protection is deprecat
On 24/04/12 14:22, David Bryant wrote:
With the dmd 2.059 I have started getting the error 'use of base class
protection is deprecated' when I try to implement an interface with
private visibility, ie:
interface Interface { }
class Class : private Interface { }
$ dmd test.d
test.d(4): use of b
Am Sat, 14 Apr 2012 19:31:40 -0700
schrieb Jonathan M Davis :
> On Sunday, April 15, 2012 04:21:09 Joseph Rushton Wakeling wrote:
> > On 14/04/12 23:03, q66 wrote:
> > > He also uses a class. And -noboundscheck should be automatically induced
> > > by
> > > -release.
> >
> > ... but the methods a
Because it doesn't make sense. All classes are derived from Object. That
_has_ to be public, otherwise things like == wouldn't work.
Does the same apply for interfaces? I'm specifically implementing an
interface with non-public visibility. This shouldn't affect the
visibility of the implicit
You missed the 'immutable' and 'inout cases.
Just use inout(T) _get() inout { return _value; } instead of
the two declarations you have.
Oh, thanks a lot, i'm forgetting this often.
...
And therefore i get the same error, as if i wrote "return
NotNull!(Foo)(this);" instead of "return
ass
On 24/04/12 15:29, David Bryant wrote:
Because it doesn't make sense. All classes are derived from Object. That
_has_ to be public, otherwise things like == wouldn't work.
Does the same apply for interfaces? I'm specifically implementing an
interface with non-public visibility. This shouldn't
trav...@phare.normalesup.org:
That looks like a workarround, not meaningful code.
It wasn't terrible code :-)
How about
return repeat(_ =>uniform(lower, upper)).map!(x => x())();
?
Why don't you write a little benchmark to compare the performance
of the two versions?
Using uniform(lo
Am Sat, 14 Apr 2012 21:05:36 +0200
schrieb "ReneSac" :
> I have this simple binary arithmetic coder in C++ by Mahoney and
> translated to D by Maffi. I added "notrow", "final" and "pure"
> and "GC.disable" where it was possible, but that didn't made much
> difference. Adding "const" to the Pre
On 04/24/2012 11:07 PM, Don Clugston wrote:
On 24/04/12 15:29, David Bryant wrote:
Because it doesn't make sense. All classes are derived from Object. That
_has_ to be public, otherwise things like == wouldn't work.
Does the same apply for interfaces? I'm specifically implementing an
interfa
On 04/24/2012 11:47 PM, David Bryant wrote:
On 04/24/2012 11:07 PM, Don Clugston wrote:
On 24/04/12 15:29, David Bryant wrote:
Because it doesn't make sense. All classes are derived from Object.
That
_has_ to be public, otherwise things like == wouldn't work.
Does the same apply for interfa
Is there anyway to force a static foreach to occur?
template TT(T...)
{
alias T TT;
}
void main()
{
// This works
foreach(s; TT!("a", "b", "c"))
{
mixin(`int ` ~ s ~ `;`);
}
enum foo = TT!("a", "b", "c");
// This fails
foreach(s; foo)
{
mix
On Tuesday, 24 April 2012 at 11:24:44 UTC, Regan Heath wrote:
On Mon, 23 Apr 2012 16:43:20 +0100, Steven Schveighoffer
wrote:
While dealing with unicode in my std.stream rewrite, I've
found that hand-decoding dchars is way faster than using
library calls.
After watching Andrei's talk on ge
On Tuesday, 24 April 2012 at 14:54:48 UTC, Steven Schveighoffer
wrote:
On Tuesday, 24 April 2012 at 11:24:44 UTC, Regan Heath wrote:
After watching Andrei's talk on generic and generative
programming I have to ask, which routines are you avoiding ..
it seems we need to make them as good as the
Am 24.04.2012 16:34, schrieb Robert Clipsham:
enum foo = TT!("a", "b", "c");
alias TT!("a", "b", "c") foo;
btw. there is std.typecons : TypeTuple with helpers (like staticMap)
== Auszug aus Dmitry Olshansky (dmitry.o...@gmail.com)'s Artikel
> On 21.04.2012 22:46, H. S. Teoh wrote:
> > On Sat, Apr 21, 2012 at 09:41:18PM +0400, Dmitry Olshansky wrote:
> >> On 21.04.2012 21:24, nrgyzer wrote:
> >>> Hi guys,
> >>>
> >>> I'm trying to use std.regex to parse a string like the
After i'm sure, that this is a bug: Great work again.
If this bug will be fixed soon or someone can help me to find a
workaround, then NotNull would be exactly what I always wanted.
Hello.
I'm probably not looking hard enough, but Do we have any
standard d-library for serializing an object/object tree into
-for example- an xml file?
thanks.
On Tuesday, 24 April 2012 at 16:42:19 UTC, dcoder wrote:
I'm probably not looking hard enough, but Do we have any
standard d-library for serializing an object/object tree into
-for example- an xml file?
There is no standard library support yet, but you might want to
look at Orange (full f
On Tuesday, 24 April 2012 at 12:22:14 UTC, David Bryant wrote:
This bothers me for two reasons: firstly it's not a base class,
and secondly, it's a standard OO pattern of mine.
What's up with this?
Generally (and slightly inaccurately) speaking, D follows the
Java model for inheritance rathe
...
And therefore i get the same error, as if i wrote "return
NotNull!(Foo)(this);" instead of "return
assumeNotNull(this);", in the
"_convert" method of NotNull. The Output is "Stack overflow".
I think
that comes from recursive calls which fills the stack? Is that
a bug?
Yes.
I found not
I'm trying to write a template function for doing member-wise
comparisons between two objects, with an optional list of members to
ignore. But I can't seem to figure out the syntax for passing a list of
strings (or an AA of strings) to the function?
I tried this:
bool compareByMemb(string
bool compareByMemb(string[] ignores, T)(T obj1, T obj2) {
foreach (name; __traits(getAllMembers, T)) {
...
}
In this particular case you could try
foo(T, U...)(T obj1, T obj2, U ignores)
On Tue, Apr 24, 2012 at 07:39:42PM +0200, Trass3r wrote:
> > bool compareByMemb(string[] ignores, T)(T obj1, T obj2) {
> > foreach (name; __traits(getAllMembers, T)) {
> > ...
> > }
>
> In this particular case you could try
>
> foo(T, U...)(T obj1,
On Tue, Apr 24, 2012 at 10:47:53AM -0700, H. S. Teoh wrote:
> On Tue, Apr 24, 2012 at 07:39:42PM +0200, Trass3r wrote:
> > > bool compareByMemb(string[] ignores, T)(T obj1, T obj2) {
> > > foreach (name; __traits(getAllMembers, T)) {
> > > ...
> > > }
> >
>
On 04/24/2012 07:37 PM, H. S. Teoh wrote:
I'm trying to write a template function for doing member-wise
comparisons between two objects, with an optional list of members to
ignore. But I can't seem to figure out the syntax for passing a list of
strings (or an AA of strings) to the function?
I tr
On Tue, Apr 24, 2012 at 08:03:07PM +0200, Timon Gehr wrote:
> On 04/24/2012 07:37 PM, H. S. Teoh wrote:
> >I'm trying to write a template function for doing member-wise
> >comparisons between two objects, with an optional list of members to
> >ignore. But I can't seem to figure out the syntax for p
What is the recommended way to access the equivalent of
numeric_limits epsilon() in D? I am searching especially for the
double version.
http://www.cplusplus.com/reference/std/limits/numeric_limits/
On Tue, Apr 24, 2012 at 08:36:34PM +0200,
digitalmars-d-learn-boun...@puremagic.com wrote:
> What is the recommended way to access the equivalent of
> numeric_limits epsilon() in D? I am searching especially for the
> double version.
>
> http://www.cplusplus.com/reference/std/limits/numeric_limit
On 2012-04-24 18:42, dcoder wrote:
Hello.
I'm probably not looking hard enough, but Do we have any standard
d-library for serializing an object/object tree into -for example- an
xml file?
thanks.
You can have a look at Orange:
https://github.com/jacob-carlborg/orange
Tutorials:
http://
On Tuesday, 24 April 2012 at 18:48:15 UTC, H. S. Teoh wrote:
On Tue, Apr 24, 2012 at 08:36:34PM +0200,
digitalmars-d-learn-boun...@puremagic.com wrote:
What is the recommended way to access the equivalent of
numeric_limits epsilon() in D? I am searching especially for
the
double version.
http
On 04/24/2012 07:09 PM, Namespace wrote:
...
And therefore i get the same error, as if i wrote "return
NotNull!(Foo)(this);" instead of "return assumeNotNull(this);", in the
"_convert" method of NotNull. The Output is "Stack overflow". I think
that comes from recursive calls which fills the stack
On Tuesday, 24 April 2012 at 19:34:26 UTC, Timon Gehr wrote:
On 04/24/2012 07:09 PM, Namespace wrote:
...
And therefore i get the same error, as if i wrote "return
NotNull!(Foo)(this);" instead of "return
assumeNotNull(this);", in the
"_convert" method of NotNull. The Output is "Stack
overflow
On Tuesday, April 24, 2012 12:24:44 Regan Heath wrote:
> On Mon, 23 Apr 2012 16:43:20 +0100, Steven Schveighoffer
>
> wrote:
> > While dealing with unicode in my std.stream rewrite, I've found that
> > hand-decoding dchars is way faster than using library calls.
>
> After watching Andrei's talk
On 04/24/2012 08:50 PM, Jacob Carlborg wrote:
On 2012-04-24 18:42, dcoder wrote:
Hello.
I'm probably not looking hard enough, but Do we have any standard
d-library for serializing an object/object tree into -for example- an
xml file?
thanks.
You can have a look at Orange:
https://github
What's the correct way of implementing formattedRead support for
user-defined types? I tried overloading the unformatValue() template,
but for some reason the compiler doesn't seem to be picking it up.
T
--
People walk. Computers run.
Marco Leise:
I ported fast paq8 (fp8) to D, and with some careful
D-ification and optimization it runs a bit faster than the
original C program when compiled with the GCC on Linux x86_64,
Core 2 Duo.
I guess you mean GDC.
With DMD, even if you are a good D programmer, it's not easy to
beat
On 24/04/12 13:50, Christophe wrote:
We could also use a template to make a range out of a delegate and avoid
this workarround...
What I'd _really_ like to see is something which would allow you to generate a
range of random numbers with an expression like,
auto rr = randomRange!distribu
On Tuesday, 24 April 2012 at 21:50:03 UTC, H. S. Teoh wrote:
What's the correct way of implementing formattedRead support for
user-defined types? I tried overloading the unformatValue()
template,
but for some reason the compiler doesn't seem to be picking it
up.
Unfortunately, there is not ye
On Wed, Apr 25, 2012 at 03:42:25AM +0200, Kenji Hara wrote:
> On Tuesday, 24 April 2012 at 21:50:03 UTC, H. S. Teoh wrote:
> >What's the correct way of implementing formattedRead support for
> >user-defined types? I tried overloading the unformatValue()
> >template,
> >but for some reason the compi
H. S. Teoh:
What's the correct way of implementing formattedRead support for
user-defined types? I tried overloading the unformatValue()
template,
but for some reason the compiler doesn't seem to be picking it
up.
Maybe do you want to open this discussion in the main D
newsgroup? I think thi
The compiler rejects this:
class Base {}
class Derived : Base {}
void main()
{
Base*basePtr;
Derived* derivedPtr;
basePtr = derivedPtr; // ERROR
}
Is that really correct that it shouldn't be allowed?
On Wednesday, April 25, 2012 01:50:51 Nick Sabalausky wrote:
> The compiler rejects this:
>
> class Base {}
> class Derived : Base {}
>
> void main()
> {
> Base*basePtr;
> Derived* derivedPtr;
>
> basePtr = derivedPtr; // ERROR
> }
>
> Is that rea
On 04/25/2012 07:50 AM, Nick Sabalausky wrote:
The compiler rejects this:
class Base {}
class Derived : Base {}
void main()
{
Base*basePtr;
Derived* derivedPtr;
basePtr = derivedPtr; // ERROR
}
Is that really correct that it shouldn't be
49 matches
Mail list logo