On Wednesday, 29 June 2016 at 10:41:21 UTC, TheDGuy wrote:
I tried to debug a little and what i don't understand is, that
i get two times 'blue' on the console, even though yellow and
blue lit up but yellow stayed at the flash color:
private void letButtonsFlash(){
foreach(Button b
On Thursday, 30 June 2016 at 03:03:16 UTC, MMJones wrote:
I need to get more info than just the memory usage. Like what
is using the memory.
That's what -profile-gc is for, it tracks allocations.
Give it a try, IIIRC it's missing explicit GC.malloc calls atm.,
but those should be rare anyhow a
On Thursday, 30 June 2016 at 01:26:47 UTC, Martin Nowak wrote:
On Wednesday, 29 June 2016 at 14:41:48 UTC, MMJones wrote:
On Wednesday, 29 June 2016 at 10:07:19 UTC, Martin Nowak wrote:
How will this affect the trackallocs module? Will it break it,
replace it? Essentially a merge of it? Should
I created a type that makes working with flags much easier.
Please review for issues and enhancements. It would be nice to
simplify the value size code.
struct EnumToFlags(alias E)
{
import std.traits, std.conv, std.string, std.algorithm,
std.array;
static if (E.max < 8)
On Wednesday, 29 June 2016 at 14:41:48 UTC, MMJones wrote:
On Wednesday, 29 June 2016 at 10:07:19 UTC, Martin Nowak wrote:
How will this affect the trackallocs module? Will it break it,
replace it? Essentially a merge of it? Should I hold off until
2.072 or go ahead and use the stub. I only nee
On Wednesday, 29 June 2016 at 19:10:18 UTC, chmike wrote:
Claiming the problems you encountered are due to bad design of
the language is unfair if you don't expose clearly the problem
and verify the problem is not your side. There is a deeply
thought rationale for every rule of the D languag
On 30/06/2016 12:25 PM, Jonathan Marler wrote:
I'd like to hear peoples thoughts on the various solutions for the
following problem. Say you have some hierarchy of classes like:
class GameObject {
// ...
}
class Entity : GameObject {
// ...
}
class Player : Entity {
// ...
}
class Enemy :
I'd like to hear peoples thoughts on the various solutions for
the following problem. Say you have some hierarchy of classes
like:
class GameObject {
// ...
}
class Entity : GameObject {
// ...
}
class Player : Entity {
// ...
}
class Enemy : Entity {
// ...
}
// ...
Assume you have a
On Wednesday, 29 June 2016 at 21:38:23 UTC, ag0aep6g wrote:
You're explicitly instantiating the outer bar there, not the
inner one.
Yes, you're correct. I mixed up the inner/outer. I just thought
it was something weird I had noticed.
On Wednesday, 29 June 2016 at 19:21:50 UTC, John wrote:
On Wednesday, 29 June 2016 at 14:51:10 UTC, Thalamus wrote:
[...]
A little research reveals that C# COM servers don't export
DllGetClassObject, or any of the COM server plumbing.
"Registering for COM interop" merely adds the registry en
On 06/29/2016 08:59 PM, jmh530 wrote:
For instance, in the bar function below, I have to
explicitly instantiate the inner function template.
[...]
template bar(T)
{
T bar(U)(T x, U y)
{
return x + cast(T)y;
}
}
void main()
{
int a = 1;
long b = 2;
auto
On Wednesday, 29 June 2016 at 18:59:19 UTC, jmh530 wrote:
I was playing around with some Eponymous Templates. I had been
under the impression that Implicit Function-Template
Instantiation (IFTI) meant that you don't have to explicitly
instantiate all functions. However, it seems like there are
On Wednesday, 29 June 2016 at 14:51:10 UTC, Thalamus wrote:
I was hoping there would be a code-only solution, and I'm glad
to see one is possible. It isn't quite working for me yet,
though. I can get the HINSTANCE in the CoLoadLibrary call, but
GetProcAddress for DllGetClassObject fails, with
On Wednesday, 29 June 2016 at 17:00:49 UTC, Guido wrote:
On Wednesday, 29 June 2016 at 15:40:57 UTC, Andrea Fontana
wrote:
On Wednesday, 29 June 2016 at 15:33:58 UTC, Guido wrote:
The problem is actually much more profound. The classes need
to be declared outside the main() scope. WTF?!?!?!
I
I was playing around with some Eponymous Templates. I had been
under the impression that Implicit Function-Template
Instantiation (IFTI) meant that you don't have to explicitly
instantiate all functions. However, it seems like there are cases
with eponymous templates with functions in them that
On 06/29/2016 10:00 AM, Guido wrote:
> doesn't work.
As others said, everything that you've mentioned do indeed work:
void main() {
class Grid {
public:
static uint xdim;
}
class Holder : Grid {
uint var;
}
Grid.xdim = 0;
auto grid = new Grid;
On Wednesday, 29 June 2016 at 17:55:27 UTC, John wrote:
On Wednesday, 29 June 2016 at 14:51:10 UTC, Thalamus wrote:
and the D code (mostly unchanged from your example):
interface ITestInterface
{
int Identifier();
}
ITestInterface needs to derive from IUnknown.
I realise that doesn't a
On Wednesday, 29 June 2016 at 14:51:10 UTC, Thalamus wrote:
and the D code (mostly unchanged from your example):
interface ITestInterface
{
int Identifier();
}
ITestInterface needs to derive from IUnknown.
On Monday, 27 June 2016 at 19:59:05 UTC, Mathias Lang wrote:
Delegate don't GC allocate when:
- You take a pointer to a member function
- The function accept a `scope` delegate and you pass a literal
- You use `scope myDG = (Params) { body... }`
I have a somewhat related question.
Why use a d
On Monday, 27 June 2016 at 19:59:05 UTC, Mathias Lang wrote:
- You use `scope myDG = (Params) { body... }`
It looks like i is still moved to the heap but marking `test`
with @nogc compiles successfully. Then when I run the code the
assertion is triggered. What exactly is going on here?
auto
On Wednesday, 29 June 2016 at 17:00:49 UTC, Guido wrote:
Tuple!(float, float, float) test;
Tuple!(float, float, float) [] array_data;
test[0] = 1.0; // works
array_data[i][0] = 1.0; // doesn't work. Compile-time error,
probably because the language itself doesn't have a dedicated
It works
On Wednesday, 29 June 2016 at 17:00:49 UTC, Guido wrote:
I have all this business generally working in C++. I just
wanted to try D for a production level quick project. So, the
language is not ready. I'm really sad about this. I had hoped
that I could get some useful work done. C++ is painfully
On 06/29/2016 07:00 PM, Guido wrote:
On another topic, tuples seem to have a major problem as well.
Tuple!(float, float, float) test;
Tuple!(float, float, float) [] array_data;
test[0] = 1.0; // works
array_data[i][0] = 1.0; // doesn't work.
Works just fine for me, if I add the missing piece
On Wednesday, 29 June 2016 at 15:40:57 UTC, Andrea Fontana wrote:
On Wednesday, 29 June 2016 at 15:33:58 UTC, Guido wrote:
The problem is actually much more profound. The classes need
to be declared outside the main() scope. WTF?!?!?!
I put them in main() so they would be in scope. This seems
On Wednesday, 29 June 2016 at 15:33:58 UTC, Guido wrote:
The problem is actually much more profound. The classes need to
be declared outside the main() scope. WTF?!?!?!
I put them in main() so they would be in scope. This seems like
a *MAJOR* design flaw with the language, not to mention the
On Wednesday, 29 June 2016 at 15:33:58 UTC, Guido wrote:
The problem is actually much more profound. The classes need to
be declared outside the main() scope. WTF?!?!?!
It's not going to work anywhere if you type 'Class' as opposed to
'class'. Types can be declared in any scope:
```
void ma
On Wednesday, 29 June 2016 at 15:33:58 UTC, Guido wrote:
The problem is actually much more profound. The classes need to
be declared outside the main() scope. WTF?!?!?!
Not true.
What are you actually trying to compile?
On Wednesday, 29 June 2016 at 15:18:53 UTC, Guido wrote:
I'm using a static class member in a parent class, but can't
get the compiler to see it.
Class Grid{
public:
uint xdim;
}
Class Holder : Grid {
uint var;
}
Any of the following should work, but none of them do:
Grid.xdim = 0;
gri
On Wednesday, 29 June 2016 at 15:18:53 UTC, Guido wrote:
I'm using a static class member in a parent class, but can't
get the compiler to see it.
Class Grid{
public:
uint xdim;
}
That's not static do `static uint xdim;` if you want it
static (in this context, static means it is share
I'm using a static class member in a parent class, but can't get
the compiler to see it.
Class Grid{
public:
uint xdim;
}
Class Holder : Grid {
uint var;
}
Any of the following should work, but none of them do:
Grid.xdim = 0;
grid = new Grid;
grid.xdim = 0;
holder = new Holder;
holder.
On Mon, Jun 27, 2016 at 08:13:21PM -0700, H. S. Teoh via Digitalmars-d-learn
wrote:
> On Tue, Jun 28, 2016 at 01:41:03AM +, Smoke Adams via Digitalmars-d-learn
> wrote:
> > I have a type
> >
> > public class SuperFunction(T)
> > {
> > T t;
> > return(T) Do() { return t(); }
> > }
> >
>
On Tuesday, 28 June 2016 at 02:30:56 UTC, thedeemon wrote:
To load load a COM object from a given file (DLL or AX) without
having it registered, just load the file with CoLoadLibrary()
and use its DllGetClassObject() function to get IClassFactory
which will give you any kind of object in this l
On Wednesday, 29 June 2016 at 10:07:19 UTC, Martin Nowak wrote:
On Wednesday, 29 June 2016 at 02:18:27 UTC, MMJones wrote:
I read somewhere that one can modify the D files from phobos
and runtime to supply a stub for the GC. I would like to add
some logging features to the GC.
Does this not r
On Sunday, 26 June 2016 at 21:06:58 UTC, TheDGuy wrote:
Thanks for your answer,
but as i said before, i want to flash each button on it's own
(the game is kinda like 'Simon Says').
I tried to debug a little and what i don't understand is, that i
get two times 'blue' on the console, even tho
On Wednesday, 29 June 2016 at 02:18:27 UTC, MMJones wrote:
I read somewhere that one can modify the D files from phobos
and runtime to supply a stub for the GC. I would like to add
some logging features to the GC.
Does this not require one to recompile phobos? I figured the
source code was ju
35 matches
Mail list logo