@Adam D. Ruppe
Damn, I was afraid you where going to say to do something like
that. It doesn't really work for what I'm thinking about, but
thanks for confirming that my original code can't work.
I have an alternative in mind, but first, is there a possible way
for a Super class to ask about
I am writing some simple downloader App.
After it's compiles ok, but when I run it's I got error 55 in
zlib1.dll
I had put zlib1.dll into my apps folder, but without success
http://www.everfall.com/paste/id.php?68zzu6x37k6z
On 2012-12-17 07:45, Nekroze wrote:
So what i am getting here is that either A: having it in the destructor
will work solong as the GC cleanup is called before the end of main
because that is when sfml is unloaded OR B: I just have to have a manual
destroy method in my class too to release the s
On 2012-12-17 02:39, F i L wrote:
My goal is this, to have an XML file:
and a D file:
module person;
import std.stdio;
class Person
{
void greet() {
writeln("hello");
}
}
and then another D file:
modul
On Monday, 17 December 2012 at 04:42:49 UTC, Mike Parker wrote:
On Monday, 17 December 2012 at 04:40:39 UTC, Mike Parker wrote:
First, please take all Derelict trouble-shooting problems to
the Derelict forums[1]. I never check the sfml forums. I do
check the newsgroups regularly, but these news
On Monday, December 17, 2012 04:06:52 Dan wrote:
> > They'll use ref when it's required for
> > the semantics of what they're doing, but auto ref on function
> > parameters is
> > rare.
>
> When would ref be required for semantics? I am asking this to
> learn the D way - so any guidelines are help
On Monday, 17 December 2012 at 04:40:39 UTC, Mike Parker wrote:
First, please take all Derelict trouble-shooting problems to
the Derelict forums[1]. I never check the sfml forums. I do
check the newsgroups regularly, but these newsgroups are not
generally the place to look for help with Derelic
First, please take all Derelict trouble-shooting problems to the
Derelict forums[1]. I never check the sfml forums. I do check the
newsgroups regularly, but these newsgroups are not generally the
place to look for help with Derelict problems. Plus, by posting
in other places, you are making it
On Monday, 17 December 2012 at 03:23:13 UTC, bearophile wrote:
Then I suggest you to not study std.random because it currently
contains know flaws regarding what you are saying.
Fine, thanks. But which would be recommended to study?
Dan:
Usually the best place to learn the way of a language is
studying its standard libraries,
Then I suggest you to not study std.random because it currently
contains know flaws regarding what you are saying.
Bye,
bearophile
On Sunday, 16 December 2012 at 23:02:30 UTC, Jonathan M Davis
wrote:
You _don't_ take ranges by ref unless you want to alter the
original, which is
almost never the case. Functions like popFrontN are the
exception. And since
you _are_ going to mutate the parameter (since ranges iterate
via mu
The way I'd do it is to make an interface with a generic call
method. The classes themselves fill this out using __traits.
interface SceneObject {
void _callFunction(string name);
}
mixin template SceneObjectReflection() {
override void _callFunction(string name) {
forea
My goal is this, to have an XML file:
and a D file:
module person;
import std.stdio;
class Person
{
void greet() {
writeln("hello");
}
}
and then another D file:
module main;
import person;
import std.xml;
I see now why it was returning a bool as that is the type of the
template argument passed.
class A(bool x = true)
then your TemplateArgs returns `tuple(bool)`. What I'm looking
for is something that returns `(x)`. For class A(T1, T2, bool x =
true) I would like `(T1, T2, x)`.
To see why thi
On Saturday, 15 December 2012 at 21:49:51 UTC, Philippe Sigaud
wrote:
Oops ;/ How do I get the number of type arguments if I don't
know them
yet? I know this sort of seems wrong but somehow, to know how
to alias the
class I need to know it's number of arguments. (I don't think
it makes too
mu
On Sunday, 16 December 2012 at 15:21:17 UTC, Philippe Sigaud
wrote:
The real issue I'm having now is not having to mangle the
names and hide
the `_NestLevel` and `_Offset` dependencies.
alias works for the case of one template argument to _A.
Simply `alias
_A!(true) A`. But when I have more
On Sunday, 16 December 2012 at 20:29:19 UTC, r_m_r wrote:
On 12/16/2012 02:03 PM, js.mdnq wrote:
That looks like it might be pretty close. I was also thinking
that one
could just use mixin templates of trying to do it with structs
directly.
i dunno if this is what u want, but have a look:
ht
On Sunday, December 16, 2012 16:09:45 Dan wrote:
> Is there a general philosophy in D phobos on when to pass by
> value or
> reference? For instance, to find a slice using lowerBound many
> copies
> of the target item, as well as copies of items in the collection
> are
> made (see code example bel
On Sunday, 16 December 2012 at 15:34:34 UTC, Philippe Sigaud
wrote:
One could also think of it as an algebra of structs.
It would be nice to be able to do stuff like
A + B, A - B(possibly useless), A*B(possibly useless), etc...
A + B would just combine the members, A - B could remove the
memb
On 12/16/2012 02:03 PM, js.mdnq wrote:
That looks like it might be pretty close. I was also thinking that one
could just use mixin templates of trying to do it with structs directly.
i dunno if this is what u want, but have a look:
http://dpaste.dzfl.pl/f5616d77
cheers,
r_m_r
>
>
> When you instantiate MyStruct!5, it tries to define ret, so it
> instantiates MyStruct!4, MyStruct!3, ... and so on. You have to put a
> static if or something else to stop that.
>
Like this:
import std.stdio;
struct MyStruct(uint K) if (K > 0) // Only to disable direct creation for
K==0
{
On 2012-12-16 19:39, bioinfornatics wrote:
Dear,
I would like to understand if to have an empty main file ils need to use
unittest.
I explain i have a library with some unittest section
-- foo.d--
void doFoo(){ ... }
unittest{
scope(success) writeln( "ok" );
scope(failure) writeln( "no"
On Sunday, 16 December 2012 at 18:39:30 UTC, bioinfornatics wrote:
Dear,
I would like to understand if to have an empty main file ils
need to use
unittest.
I explain i have a library with some unittest section
-- foo.d--
void doFoo(){ ... }
unittest{
scope(success) writeln( "ok" );
scop
Dear,
I would like to understand if to have an empty main file ils need to use
unittest.
I explain i have a library with some unittest section
-- foo.d--
void doFoo(){ ... }
unittest{
scope(success) writeln( "ok" );
scope(failure) writeln( "no" );
doFoo();
}
--
to use unittest i nee
Oleg:
at compile time i have errors
./recursion.d(7): Error: index 4294967295 overflow for static
array
./recursion.d(7): Error: index 4294967294 overflow for static
array
etc
It prints a little too many of those...
call 'recursionAlgo()' where it should not be ( K == 1 )
The firs
Hello.
I want use recursion, but in my situation compiler doesn't
correct work.
import std.stdio;
struct MyStruct(uint K)
{
real[K] data;
auto getSmaller()
{
MyStruct!(K-1) ret;
foreach( no, ref d; ret.data )
d = data[no];
return ret;
}
On Sunday, 16 December 2012 at 17:14:55 UTC, Maxim Fomin wrote:
On Sunday, 16 December 2012 at 15:21:46 UTC, Nekroze wrote:
On Sunday, 16 December 2012 at 14:59:32 UTC, Maxim Fomin wrote:
On Sunday, 16 December 2012 at 14:42:57 UTC, Nekroze wrote:
I am trying to do some wrapping of the CSFML de
On Sunday, 16 December 2012 at 15:21:46 UTC, Nekroze wrote:
On Sunday, 16 December 2012 at 14:59:32 UTC, Maxim Fomin wrote:
On Sunday, 16 December 2012 at 14:42:57 UTC, Nekroze wrote:
I am trying to do some wrapping of the CSFML derelict
bindings to classes however when i use the CSFML methods
On Sunday, 16 December 2012 at 15:21:46 UTC, Nekroze wrote:
On Sunday, 16 December 2012 at 14:59:32 UTC, Maxim Fomin wrote:
On Sunday, 16 December 2012 at 14:42:57 UTC, Nekroze wrote:
I am trying to do some wrapping of the CSFML derelict
bindings to classes however when i use the CSFML methods
On 2012-09-16 17:12, bioinfornatics
wrote:
Dear,
I wrote a fasta format parser and fastq format parser. These parser used
MmFile and do not load all file these will save memory.
Fastq http://dpaste.dzfl.pl/9b23574d
Fasta http://dpaste.dzfl.pl/228dba11
The way to iterate over it is really cl
Dear,
I wrote a fasta format parser and fastq format parser. These parser used
MmFile and do not load all file these will save memory.
Fastq http://dpaste.dzfl.pl/9b23574d
Fasta http://dpaste.dzfl.pl/228dba11
The way to iterate over it is really close and i search a way to have
one struct bySecti
> it would be real nice if I there was a compile time construct for this.
> like "me" or something that would return type info inside the current
scope.
>
> class A(T) { this() { writeln(me.typeinfo.name); }
>
> would print "A(T)".
>
> (of course me is probably a bad name but just an example :)
>
On Sunday, 16 December 2012 at 14:59:32 UTC, Maxim Fomin wrote:
On Sunday, 16 December 2012 at 14:42:57 UTC, Nekroze wrote:
I am trying to do some wrapping of the CSFML derelict bindings
to classes however when i use the CSFML methods to destroy the
objects it causes a crash.
I have made a po
>
>
> The real issue I'm having now is not having to mangle the names and hide
> the `_NestLevel` and `_Offset` dependencies.
>
> alias works for the case of one template argument to _A. Simply `alias
> _A!(true) A`. But when I have more than one such as `class _A(T1, bool)` I
> can't do `alias _A!
Is there a general philosophy in D phobos on when to pass by
value or
reference? For instance, to find a slice using lowerBound many
copies
of the target item, as well as copies of items in the collection
are
made (see code example below). This seems unnecessary - why not
have
functions like:
On Sunday, 16 December 2012 at 14:42:57 UTC, Nekroze wrote:
I am trying to do some wrapping of the CSFML derelict bindings
to classes however when i use the CSFML methods to destroy the
objects it causes a crash.
I have made a post in the SFML>D forum because they have syntax
highlighting for
On Sunday, 16 December 2012 at 08:49:10 UTC, js.mdnq wrote:
On Sunday, 16 December 2012 at 06:38:13 UTC, anonymous wrote:
On Saturday, 15 December 2012 at 16:32:27 UTC, r_m_r wrote:
On 12/15/2012 08:57 PM, anonymous wrote:
Note that here s1alpha and s2alpha are distinct types.
what about thi
Am Sun, 16 Dec 2012 04:02:41 +0100
schrieb "Nekroze" :
>This would be fine i guess
> so long as i could get away with being able to compile without
> using the llvm-config tool that gives you the library and include
> paths based on command line input because i am assuming i cant do
> somethin
On Saturday, 15 December 2012 at 19:01:23 UTC, ref2401 wrote:
What does means 'maxRelDiff' parameter?
I looked at the source code of this method and I still didn't
get it.
return fabs((lhs - rhs) / rhs) <= maxRelDiff
|| maxAbsDiff != 0 && fabs(lhs - rhs) <= maxAbsDiff;
In what cases can I use
On Sunday, 16 December 2012 at 06:38:13 UTC, anonymous wrote:
On Saturday, 15 December 2012 at 16:32:27 UTC, r_m_r wrote:
On 12/15/2012 08:57 PM, anonymous wrote:
Note that here s1alpha and s2alpha are distinct types.
what about this: http://dpaste.dzfl.pl/95f7a74d
Consider
struct Foo {mix
On Sunday, 16 December 2012 at 01:32:44 UTC, r_m_r wrote:
On 12/16/2012 06:36 AM, r_m_r wrote:
this is the closest I can get: http://dpaste.dzfl.pl/9d11d060
Cleaned up a bit: http://dpaste.dzfl.pl/d9f001db
regards,
r_m_r
That looks like it might be pretty close. I was also thinking
that on
41 matches
Mail list logo