On Tuesday, 26 January 2016 at 03:06:40 UTC, maik klein wrote:
On Tuesday, 26 January 2016 at 03:03:40 UTC, Igor wrote:
Is there a GC-less array that we can use out of the box or do
I have to create my own?
https://dlang.org/phobos/std_container_array.html
How do we use std.algorithm with
On Tuesday, 26 January 2016 at 01:09:50 UTC, Igor wrote:
Is there any examples that shows how to properly allocate an
object of a class type with the new allocators and then release
it when desired?
Allocate a block of memory big enough to hold an instance of your
class using whichever
On 01/25/2016 09:47 PM, Igor wrote:
> it fails because the string representing the name inside App is null...
> Which doesn't happen when I use new.
There must be something else going on. Do you see it with a simpler type?
> Should it work as expected(which it isn't)
new allocates and
On Monday, 25 January 2016 at 09:33:15 UTC, Dsby wrote:
I want to know How can i track the GC when it's runing?
And Which algorithm is D's GC used,only Scan-Mark?
Something that isn't on Garry's link: if using dmd you can pass
the "-profile=gc" flag which will do the GC configuration so that
On Tuesday, 26 January 2016 at 04:38:13 UTC, Adam D. Ruppe wrote:
On Tuesday, 26 January 2016 at 04:31:07 UTC, Igor wrote:
then std.algorithm.find!("a.myInt == b")(classes, 3)
Try
std.algorithm.find!("a.myInt == b")(classes[], 3)
notice the [] after classes
I guess std.container.array
On Sun, Jan 24, 2016 at 06:07:41AM +, Jesse Phillips via
Digitalmars-d-learn wrote:
[...]
> My suggestion is to take the unittests used in std.csv and try to get
> your code working with them. As fastcsv limitations would prevent
> replacing the std.csv implementation the API may not need to
On Tuesday, 26 January 2016 at 04:31:07 UTC, Igor wrote:
On Tuesday, 26 January 2016 at 03:06:40 UTC, maik klein wrote:
On Tuesday, 26 January 2016 at 03:03:40 UTC, Igor wrote:
Is there a GC-less array that we can use out of the box or do
I have to create my own?
On Tuesday, January 26, 2016 03:03:40 Igor via Digitalmars-d-learn wrote:
> Is there a GC-less array that we can use out of the box or do I
> have to create my own?
If what you want is a dynamic array (as opposed std.container.Array), then
you can simply malloc the memory and then slice it to get
On Tuesday, 26 January 2016 at 04:31:07 UTC, Igor wrote:
then std.algorithm.find!("a.myInt == b")(classes, 3)
Try
std.algorithm.find!("a.myInt == b")(classes[], 3)
notice the [] after classes
I guess std.container.array isn't a range? Or am I using it
wrong?
Containers aren't really
On Tuesday, 26 January 2016 at 05:11:54 UTC, Mike Parker wrote:
On Tuesday, 26 January 2016 at 01:09:50 UTC, Igor wrote:
Is there any examples that shows how to properly allocate an
object of a class type with the new allocators and then
release it when desired?
Allocate a block of memory
On Monday, 25 January 2016 at 22:57:22 UTC, Igor wrote:
error LNK2019: unresolved external symbol GetStockObject
referenced in function _D2Application10createWindowMFPFZvZi
(int Application.createWindow(void function()*))
and the line of code is
wc.hbrBackground =
On Tuesday, 26 January 2016 at 05:05:43 UTC, Mike Parker wrote:
the linker looked for its copied form
*compiled* form
The std.container.RedBlackTree is close:
http://dlang.org/phobos/std_container_rbtree.html
Or you may prefer my work-in-progress unofficial docs:
http://dpldocs.info/experimental-docs/std.container.rbtree.RedBlackTree.html
You can see methods there like insert, removeKey, and
opBinaryRight,
Hello,
I am looking for data structure equivalent to std::set from C++.
Couldn't find it in the documentation.
I'm getting several of these since I'm trying to do the same
thing in a few places. Here's a complete error:
path\to\file.d(55): Error: variable
units.unitvalue.opmethod!("sum(in unitvalue value)",
"add(value)").methodtemplate cannot use template to add field to
aggregate 'unitvalue'
On Monday, 25 January 2016 at 08:31:14 UTC, abad wrote:
On Monday, 25 January 2016 at 02:27:57 UTC, Solomon E wrote:
On Saturday, 23 January 2016 at 07:57:55 UTC, Ali Çehreli
Ruby's Array class includes this sort method for flattening and
for me it was surprisingly useful, for instance when it
Can D Dll's be linked and used as if they were compiled directly
with the program? I was thinking of writing some library routines
and put them in a Dll but now I'm not thinking that would be very
useful because the Dll's won't export class like behavior.
in my DLL:
class MyClass { void
Thanks so much for the help! I'm still getting used to D's
compile-time code.
On 25.01.2016 15:51, pineapple wrote:
class unitvalue{
double coefficient;
int[unit] exponents;
unitvalue copy(){
unitvalue value = new unitvalue();
value.coefficient = this.coefficient;
value.exponents = this.exponents.dup;
return value;
On Mon, 25 Jan 2016 14:51:21 +, pineapple wrote:
> I'm getting several of these since I'm trying to do the same thing in a
> few places. Here's a complete error:
>
> path\to\file.d(55): Error: variable
> units.unitvalue.opmethod!("sum(in unitvalue value)",
> "add(value)").methodtemplate
On 01/24/2016 04:26 AM, Marc Schütz wrote:
>> (2) In the unittest code, I have a block that I want to rewrite using
>> assertThrown, but I can't figure out from either the book or the
>> website the correct usage. What's the right way to specify a
>> StringException with a particular message I
Um... A closed-source library is one thing, DLL is another thing,
DLL class library is a third thing, seamless linking of DLL class
library is a fourth thing. Well... see what you can get working.
On Monday, 25 January 2016 at 21:42:07 UTC, Kagamin wrote:
Um... A closed-source library is one thing, DLL is another
thing, DLL class library is a third thing, seamless linking of
DLL class library is a fourth thing. Well... see what you can
get working.
Thanks for the help! I really
error LNK2019: unresolved external symbol GetStockObject
referenced in function _D2Application10createWindowMFPFZvZi (int
Application.createWindow(void function()*))
and the line of code is
wc.hbrBackground = GetStockObject(WHITE_BRUSH);
I've tried to
import core.sys.windows.wingdi;
But
how can I have a static assignment
static bool isStarted = false;
public static Application Start(string Name, void
function(Application) entryPoint)
{
if (isStarted)
assert("Can only call Start once");
isStarted = true;
On 1/25/16 8:40 PM, Igor wrote:
how can I have a static assignment
static bool isStarted = false;
public static Application Start(string Name, void
function(Application) entryPoint)
{
if (isStarted)
assert("Can only call Start once");
Is there any examples that shows how to properly allocate an
object of a class type with the new allocators and then release
it when desired?
On Monday, 25 January 2016 at 02:27:57 UTC, Solomon E wrote:
On Saturday, 23 January 2016 at 07:57:55 UTC, Ali Çehreli wrote:
auto collapse(R)(R r)
if (isArray!R) {
return r.joiner.collapse.joiner;
}
auto collapse(R)(R r)
if (!isArray!R) {
return r;
}
Ali, that code
I want to know How can i track the GC when it's runing?
And Which algorithm is D's GC used,only Scan-Mark?
On Monday, 25 January 2016 at 09:33:15 UTC, Dsby wrote:
I want to know How can i track the GC when it's runing?
And Which algorithm is D's GC used,only Scan-Mark?
There is a good resource here:
https://dlang.org/spec/garbage.html
It details compiler flags to use to profile and log the GC
Is there a GC-less array that we can use out of the box or do I
have to create my own?
On Tuesday, 26 January 2016 at 03:03:40 UTC, Igor wrote:
Is there a GC-less array that we can use out of the box or do I
have to create my own?
https://dlang.org/phobos/std_container_array.html
On Tuesday, 26 January 2016 at 03:03:40 UTC, Igor wrote:
Is there a GC-less array that we can use out of the box or do I
have to create my own?
There's one in emsi containers.
33 matches
Mail list logo