On 2017-07-25 23:06, unDEFER wrote:
I have found the answer in the code.
Right code is:
Import imp = m.isImport();
if (imp !is null)
Thank you.
That's the correct solution. For Expression, there's a field called "op"
that indicates what kind of expression it is, which can used in
combinatio
On 2017-07-26 05:27, Matthew Remmel wrote:
So as mentioned above, the first problem is that using
ModuleInfo.unitTest returns an aggregated function of all 3 unit tests
for that module, instead of each one individually, so the UDA
information is lost. The second problem is that running
__trai
On Wednesday, 26 July 2017 at 03:27:30 UTC, Matthew Remmel wrote:
I'd like to print out the name given to a unit test via a UDA,
as the tests are being ran by the Runtime.moduleUnitTester. I'm
working on writing a custom unit test runner. It would seem
that the ModuleInfo.unitTest property is a
I'd like to print out the name given to a unit test via a UDA, as
the tests are being ran by the Runtime.moduleUnitTester. I'm
working on writing a custom unit test runner. It would seem that
the ModuleInfo.unitTest property is an aggregated function of all
the individual unit test blocks in a
On Wednesday, 26 July 2017 at 02:24:06 UTC, WhatMeForget wrote:
Static Arrays have property
.sizeof which returns the array length multiplied by the number
of bytes per array element.
Dynamic Arrays have property
.sizeof which returns the size of the dynamic array reference,
which is 8 in 32-
On Wednesday, 26 July 2017 at 02:24:06 UTC, WhatMeForget wrote:
Static Arrays have property
.sizeof which returns the array length multiplied by the number
of bytes per array element.
Dynamic Arrays have property
.sizeof which returns the size of the dynamic array reference,
which is 8 in 32-
Static Arrays have property
.sizeof which returns the array length multiplied by the number
of bytes per array element.
Dynamic Arrays have property
.sizeof which returns the size of the dynamic array reference,
which is 8 in 32-bit builds and 16 on 64-bit builds.
Why not have dynamic arrays
On Tuesday, 25 July 2017 at 21:06:25 UTC, unDEFER wrote:
I have found the answer in the code.
Right code is:
Import imp = m.isImport();
if (imp !is null)
Thank you.
grep for kluge in code, you'll find all the places it does its
own RTTI.
On Tuesday, 25 July 2017 at 12:11:08 UTC, MGW wrote:
Where can I find the ready made for usage or how to create
cryptro.lib and ssl.lib for Windows 32 that are necessary for
my project?
Do you have the crypto.dll and ssl.dll? If so, implib can make
the lib files. If you don't have implib, ema
I have found the answer in the code.
Right code is:
Import imp = m.isImport();
if (imp !is null)
Thank you.
On 7/25/17 4:36 PM, unDEFER wrote:
Hello!
I'm hacking dmd compiler and trying to look on members array just after
parse module.
for(uint i = 0; i < members.dim; i++)
{
Dsymbol m = (*members)[i];
// It is good, but further:
Import imp = cast(Import) m;
if (imp !is null)
{
Hello!
I'm hacking dmd compiler and trying to look on members array just
after parse module.
for(uint i = 0; i < members.dim; i++)
{
Dsymbol m = (*members)[i];
// It is good, but further:
Import imp = cast(Import) m;
if (imp !is null)
{
printf(" import %s.%s\n", i
On Wednesday, 5 July 2017 at 19:13:21 UTC, Jolly James wrote:
On Wednesday, 5 July 2017 at 19:01:06 UTC, Jonathan M Davis
wrote:
On Wednesday, July 05, 2017 18:50:32 Jolly James via
Digitalmars-d-learn wrote:
On Wednesday, 5 July 2017 at 18:46:38 UTC, Jolly James wrote:
> [...]
I have changed
On Saturday, 22 July 2017 at 18:59:44 UTC, FoxyBrown wrote:
With LDC's new ability to do android/arm, we are missing the
ability to do GUI's? Can any of the current D solutions work
such as GtkD or QtD? I'm looking for something somewhat
lightweight, easy to use(I find GtkD a bit funky but it d
On Tuesday, 25 July 2017 at 17:50:18 UTC, Dragonson wrote:
I need to call only the deconstructor of the derived class I
have an instance of, not every deconstructor in the inheritance
chain. Putting `override` before the destructor doesn't compile
so I'm not sure how to achieve this?
Call the
I need to call only the deconstructor of the derived class I have
an instance of, not every deconstructor in the inheritance chain.
Putting `override` before the destructor doesn't compile so I'm
not sure how to achieve this?
On Tuesday, 25 July 2017 at 15:56:45 UTC, Houdini wrote:
Yes, but it isn't the default way in C++ to do dynamic
instanciation.
https://github.com/isocpp/CppCoreGuidelines this? It's only 2
years old. The new operator predates it by decades.
On Tuesday, 25 July 2017 at 15:15:59 UTC, Kagamin wrote:
C++ is big, there's always something you don't know about it.
Java actually instantiates classes the C++ way:
http://en.cppreference.com/w/cpp/language/new
Yes, but it isn't the default way in C++ to do dynamic
instanciation. Usually,
There was need to change one line from:
auto header = result["heading"].to!string;
to:
auto header = result[0]["heading"].to!string;
On Monday, 24 July 2017 at 15:21:54 UTC, Houdini wrote:
D is very similar to C++ (and also grabs godd ideas from
Python), but I have a naive question : why does Walter Bright
chose to instanciate classes like in Java ?
C++ is big, there's always something you don't know about it.
Java actuall
On Tuesday, 25 July 2017 at 02:48:57 UTC, NoBigDeal256 wrote:
What is the standard way of testing class templates in the
context of a library where some of the classes may never
actually be used by the library itself?
Write a test and instantiate whatever templates you want to test.
class Tes
On 7/25/17 8:40 AM, John Burton wrote:
I can create a "slice" using non-gc allocated memory.
int* ptr = cast(int*)calloc(int.sizeof, 10);
int[] data = ptr[0..10];
If I don't want a memory leak I have to call free(ptr) somewhere as it
won't be GC collected when data or ptr go
On 7/24/17 11:13 PM, NoBigDeal256 wrote:
On Tuesday, 25 July 2017 at 02:18:41 UTC, Adam D. Ruppe wrote:
On Tuesday, 25 July 2017 at 02:11:20 UTC, NoBigDeal256 wrote:
it passes when it should fail because the unittest block is never
executed. Why is this?
Did you actually instantiate the class
On Tuesday, 25 July 2017 at 13:24:36 UTC, Mike Parker wrote:
On Tuesday, 25 July 2017 at 12:40:13 UTC, John Burton wrote:
[...]
This should give you the answer:
writefln("Before: ptr = %s capacity = %s", slice.ptr,
slice.capacity);
slice ~= 1;
writefln("After: ptr = %s capacity = %s", slice
On Tuesday, 25 July 2017 at 12:40:13 UTC, John Burton wrote:
I can create a "slice" using non-gc allocated memory.
int* ptr = cast(int*)calloc(int.sizeof, 10);
int[] data = ptr[0..10];
If I don't want a memory leak I have to call free(ptr)
somewhere as it won't be GC collected
On Tuesday, 25 July 2017 at 12:40:13 UTC, John Burton wrote:
What happens? It seems to successfully append an extra value to
the array. It appears to "work" when I try it in my compiler
but I don't understand how. Will this be trying to write beyond
the memory I calloc'ed?
The language makes
I can create a "slice" using non-gc allocated memory.
int* ptr = cast(int*)calloc(int.sizeof, 10);
int[] data = ptr[0..10];
If I don't want a memory leak I have to call free(ptr) somewhere
as it won't be GC collected when data or ptr go out of scope. I
presume there is nothing
I want to make an application with use http2.d from packet arsd.
Where can I find the ready made for usage or how to create
cryptro.lib and ssl.lib for Windows 32 that are necessary for my
project?
On Tuesday, 25 July 2017 at 11:34:23 UTC, Andre Pany wrote:
On Tuesday, 25 July 2017 at 08:30:43 UTC, ag0aep6g wrote:
Works for me. What compiler are you using?
I reduced the example too lot. The issue is occuring if there
is also a package.d is involved.
m1.d
---
modul
On Tuesday, 25 July 2017 at 08:30:43 UTC, ag0aep6g wrote:
Works for me. What compiler are you using?
I reduced the example too lot. The issue is occuring if there is
also a package.d is involved.
m1.d
---
module m1;
import sub; // Does not throw if replaced with: import
On Tuesday, 25 July 2017 at 10:42:40 UTC, Basile B. wrote:
I think that you underestimate the amount of work needed and
your solution which is to use the compiler with -o- looks bad.
What you really need is a compiler front-end which is basically
what libdparse + DSymbol are. DCD uses them.
On Tuesday, 25 July 2017 at 10:35:14 UTC, Andrea Fontana wrote:
If you want to add UFCS suggestions to DCD it would be useful
for your project and all other IDEs too!
Andrea
Thank you, I will think. But if it was easy, authors self would
do it :-)
On Tuesday, 25 July 2017 at 10:32:11 UTC, unDEFER wrote:
On Tuesday, 25 July 2017 at 10:24:13 UTC, Andrea Fontana wrote:
On Tuesday, 25 July 2017 at 10:23:33 UTC, Andrea Fontana wrote:
On Tuesday, 25 July 2017 at 10:06:47 UTC, unDEFER wrote:
Any ideas?
I think you should use/contribute to DC
On Tuesday, 25 July 2017 at 10:32:11 UTC, unDEFER wrote:
Yes this project where "Not working: UFCS suggestions and That
one feature that you REALLY needed".. I want to have all
features that I really need :-)
But If I will not find how do UFCS suggestions fast, I probably
will use DCD for all o
On Tuesday, 25 July 2017 at 10:24:13 UTC, Andrea Fontana wrote:
On Tuesday, 25 July 2017 at 10:23:33 UTC, Andrea Fontana wrote:
On Tuesday, 25 July 2017 at 10:06:47 UTC, unDEFER wrote:
Any ideas?
I think you should use/contribute to DCD project
https://github.com/dlang-community/DCC
Andrea
Hello
I wrote such code to test restAPI client:
///
//app.d
///
import vibe.d;
import sites.frontpage;
import msfrontpage;
shared static this()
{
// the router will match incoming HTTP requests to the proper
routes
auto router = new URLRouter;
// registers each meth
On Tuesday, 25 July 2017 at 10:23:33 UTC, Andrea Fontana wrote:
On Tuesday, 25 July 2017 at 10:06:47 UTC, unDEFER wrote:
Any ideas?
I think you should use/contribute to DCD project
https://github.com/dlang-community/DCC
Andrea
Sorry, this is the right link:
https://github.com/dlang-communit
On Tuesday, 25 July 2017 at 10:06:47 UTC, unDEFER wrote:
Any ideas?
I think you should use/contribute to DCD project
https://github.com/dlang-community/DCC
Andrea
Hello!
I have written my text editor with highlighting, and now I want
to add IDE features to it.
I want to make autocompletion, but not only complete members of
class/struct, but also all functions which maybe used with type,
if the first argument of the function is this type. I.e. in
"a".fro
On 07/24/2017 11:40 PM, Andre Pany wrote:
m1.d
-
module m1;
import m2;
class Foo
{
int foo;
}
void main()
{
static assert(__traits(compiles, m1.Foo.foo));
static assert(__traits(compiles, m2.Bar.bar));
}
m2.d
---
module m2;
class Bar
{
int bar;
On Monday, 24 July 2017 at 17:42:30 UTC, Steven Schveighoffer
wrote:
In D, I would use classes for any time I need polymorphism, and
use structs otherwise.
OK, I'll adhere to this method. :)
Thanks to all for your answers.
41 matches
Mail list logo