I have a function that will *massively* benefit from having a
persistent internal buffer it can re-use (and grow) from call to
call, instead of re-allocating on every call.
What I don't want is either of:
1. To set a fixed limitation of size, if the user ends up making
repeated calls to someth
On Wednesday, 11 September 2013 at 08:06:37 UTC, monarch_dodra
wrote:
I have a function that will *massively* benefit from having a
persistent internal buffer it can re-use (and grow) from call
to call, instead of re-allocating on every call.
What I don't want is either of:
1. To set a fixed l
On Wednesday, 11 September 2013 at 10:28:37 UTC, Gary Willoughby
wrote:
You can then let the GC handle it or free it yourself with
GC.free(*buffer).
But if the buffer is stored in a static variable, the GC will
never collect it. I *could* also free it myself, but why/when
would I do that?
D
On 11/09/13 12:34, monarch_dodra wrote:
But if the buffer is stored in a static variable, the GC will never collect it.
I *could* also free it myself, but why/when would I do that?
Did you just just let your buffer grow, and never let it get collected?
Is there a way to do something like "I'm u
On 11/09/13 13:14, Joseph Rushton Wakeling wrote:
On 11/09/13 12:34, monarch_dodra wrote:
But if the buffer is stored in a static variable, the GC will never collect it.
I *could* also free it myself, but why/when would I do that?
Did you just just let your buffer grow, and never let it get col
On Wednesday, 11 September 2013 at 08:06:37 UTC, monarch_dodra
wrote:
I have a function that will *massively* benefit from having a
persistent internal buffer it can re-use (and grow) from call
to call, instead of re-allocating on every call.
What I don't want is either of:
1. To set a fixed l
11-Sep-2013 14:34, monarch_dodra пишет:
On Wednesday, 11 September 2013 at 10:28:37 UTC, Gary Willoughby wrote:
You can then let the GC handle it or free it yourself with
GC.free(*buffer).
But if the buffer is stored in a static variable, the GC will never
collect it. I *could* also free it my
On Wednesday, 11 September 2013 at 11:19:27 UTC, Joseph Rushton
Wakeling wrote:
On 11/09/13 13:14, Joseph Rushton Wakeling wrote:
On 11/09/13 12:34, monarch_dodra wrote:
But if the buffer is stored in a static variable, the GC will
never collect it.
I *could* also free it myself, but why/when
On 11/09/13 15:13, monarch_dodra wrote:
That's somewhat better, as it would allow the GC to collect my buffer, if it
wants to, but I wouldn't actually know about it afterwards which leaves me
screwed.
Just to clarify, is this buffer meant only for internal use in your function or
is it meant
11-Sep-2013 17:33, Joseph Rushton Wakeling пишет:
On 11/09/13 15:13, monarch_dodra wrote:
That's somewhat better, as it would allow the GC to collect my buffer,
if it
wants to, but I wouldn't actually know about it afterwards which
leaves me screwed.
Just to clarify, is this buffer meant only
On 11/09/13 15:45, Dmitry Olshansky wrote:
Problem is - said GC-freed memory could be then reused in some way. I can't
imagine how you'd test that the block that is allocated is *still your old*
block.
Ahh, nasty. I'd assumed that the buffer would have been reset to null in the
event that th
On Wednesday, 11 September 2013 at 13:33:23 UTC, Joseph Rushton
Wakeling wrote:
On 11/09/13 15:13, monarch_dodra wrote:
That's somewhat better, as it would allow the GC to collect my
buffer, if it
wants to, but I wouldn't actually know about it afterwards
which leaves me screwed.
Just to clar
Now that VisualD has been officially accepted onto the
d-programming-language github, I decided to give it a try.
And failed.
Say I want to import derelict, how would I go about it?
Thanks.
Oops, I forgot to say what I actually did.
I added derelict to Compiler->General->Additional Imports.
The code is just this:
module main;
import std.stdio;
import derelict.opengl3.gl3;
void main()
{
writeln("Hello D-World!");
}
And the build output is a symbol undefined linker issue
On 9/11/13 9:59 AM, Joseph Cassman wrote:
On Monday, 9 September 2013 at 20:37:47 UTC, Joseph Cassman wrote:
So I'm out of ideas on where the error is coming from. Anyone got any ideas on
what's going on here?
Still not sure what is going on but I found a work-around that somebody else
might
On Monday, 9 September 2013 at 20:37:47 UTC, Joseph Cassman wrote:
So I'm out of ideas on where the error is coming from. Anyone
got any ideas on what's going on here?
Still not sure what is going on but I found a work-around that
somebody else might find useful.
The mov instruction is able
On Mon, Sep 09, 2013 at 10:16:42PM +0200, Gary Willoughby wrote:
> Just wondered if i could pick you brains for a nice solution to
> dynamically add methods to a class, paying particular attention to
> overloads. I'm currently writing a mocking framework and
> everything's coming along nicely and i
On 11.09.2013 18:13, Lemonfiend wrote:
Oops, I forgot to say what I actually did.
I added derelict to Compiler->General->Additional Imports.
The code is just this:
module main;
import std.stdio;
import derelict.opengl3.gl3;
void main()
{
writeln("Hello D-World!");
}
And the build ou
On Tuesday, 10 September 2013 at 11:06:04 UTC, Jacob Carlborg
wrote:
On 2013-09-10 11:04, Anton Alexeev wrote:
Can be but not libphobos2
Link statically with it, which is does by default. Just compile
with:
dmd -L-lcurl test.d
The point is:
http://pastebin.com/0VkYgFix
actually that doesn't work:
assert(!isNumeric(`j`)); //ok
assert(!isNumeric(`i`)); //fails ; i is treated as a complex number but
that's not good behavior as we can't write auto a=i;
assert(isNumeric(`1e2`)); // fails even though we can write auto a=1e2;
In contrast, what I had worked (passes tho
On Wednesday, 11 September 2013 at 20:36:39 UTC, Rainer Schuetze
wrote:
On 11.09.2013 18:13, Lemonfiend wrote:
Oops, I forgot to say what I actually did.
I added derelict to Compiler->General->Additional Imports.
The code is just this:
module main;
import std.stdio;
import derelict.opengl3
On 11.09.2013 23:42, Lemonfiend wrote:
On Wednesday, 11 September 2013 at 20:36:39 UTC, Rainer Schuetze wrote:
On 11.09.2013 18:13, Lemonfiend wrote:
Oops, I forgot to say what I actually did.
I added derelict to Compiler->General->Additional Imports.
The code is just this:
module main;
On Wed, Sep 11, 2013 at 02:10:32PM -0700, Timothee Cour wrote:
> actually that doesn't work:
>
> assert(!isNumeric(`j`)); //ok
> assert(!isNumeric(`i`)); //fails ; i is treated as a complex number but
> that's not good behavior as we can't write auto a=i;
Yikes!
This makes me *extremely* glad bu
On 9/12/2013 6:20 AM, Anton Alexeev wrote:
On Tuesday, 10 September 2013 at 11:06:04 UTC, Jacob Carlborg wrote:
On 2013-09-10 11:04, Anton Alexeev wrote:
Can be but not libphobos2
Link statically with it, which is does by default. Just compile with:
dmd -L-lcurl test.d
The point is:
http:
anyways, isNumeric sounds buggy, isn't it?
On Wed, Sep 11, 2013 at 4:03 PM, H. S. Teoh wrote:
> On Wed, Sep 11, 2013 at 02:10:32PM -0700, Timothee Cour wrote:
> > actually that doesn't work:
> >
> > assert(!isNumeric(`j`)); //ok
> > assert(!isNumeric(`i`)); //fails ; i is treated as a complex n
On Wednesday, 11 September 2013 at 17:09:12 UTC, Brad Roberts
wrote:
Please file a bug for this. http://d.puremagic.com/issues/
You got it.
Joseph
On Wed, Sep 11, 2013 at 08:15:26PM -0700, Timothee Cour wrote:
> anyways, isNumeric sounds buggy, isn't it?
Yeah, I'd file a bug. I can't see how "i" can possibly be numeric. I
thought the compiler rejected that anyway?
> On Wed, Sep 11, 2013 at 4:03 PM, H. S. Teoh wrote:
>
> > On Wed, Sep 11,
Some C function malloc-ed memory. This memory should be freeed much
later. I don't want to manually call C function to free this memory in
some point later, so may I in some way ask gc to free this memory using
something like addRoot(for instance) or else or the true way is to copy
malloc-ed me
On Thursday, 12 September 2013 at 05:36:31 UTC, Alexandr
Druzhinin wrote:
Some C function malloc-ed memory. This memory should be freeed
much later. I don't want to manually call C function to free
this memory in some point later, so may I in some way ask gc to
free this memory using something
On 2013-09-11 10:06, monarch_dodra wrote:
I have a function that will *massively* benefit from having a persistent
internal buffer it can re-use (and grow) from call to call, instead of
re-allocating on every call.
What I don't want is either of:
1. To set a fixed limitation of size, if the user
30 matches
Mail list logo