Re: MD5 hash on a file and rawRead

2011-02-09 Thread Andrej Mitrovic
On 2/10/11, Andrej Mitrovic wrote: > Also disregard that the error shows "_libFileName", I was in the > middle of refactoring so the name stayed. > *I mean disregard that it's called _libFileName, when it's really "filename".

Re: MD5 hash on a file and rawRead

2011-02-09 Thread Andrej Mitrovic
Also disregard that the error shows "_libFileName", I was in the middle of refactoring so the name stayed.

MD5 hash on a file and rawRead

2011-02-09 Thread Andrej Mitrovic
I'm trying to use the std.md5.sum method. It takes as an argument a digest to output the hash to, and the second argument is plain data. So I'm trying to read an entire file at once. I thought about using rawRead, but I get a runtime exception: auto filename = r"C:\file.dat"; Fil

Re: Invoke garbage collector? (Scoped Instances)

2011-02-09 Thread Jonathan M Davis
On Wednesday 09 February 2011 17:52:47 Sean Eskapp wrote: > == Quote from Trass3r (u...@known.com)'s article > > > > However, I need the resources to be freed more quickly than the GC is > > > apparently doing > > > > You could use scoped instances if you need to clean them up soon after > > crea

Re: Invoke garbage collector?

2011-02-09 Thread Sean Eskapp
== Quote from Steven Schveighoffer (schvei...@yahoo.com)'s article > On Wed, 09 Feb 2011 15:58:13 -0500, bearophile > wrote: > > Sean Eskapp: > > > >> so is there a way to invoke a GC cleanup in some way? > > > > http://www.digitalmars.com/d/2.0/phobos/core_memory.html#minimize > This attempts to

Re: Invoke garbage collector? (Scoped Instances)

2011-02-09 Thread Sean Eskapp
== Quote from Trass3r (u...@known.com)'s article > > However, I need the resources to be freed more quickly than the GC is > > apparently doing > You could use scoped instances if you need to clean them up soon after > creation. To my knowledge, these are being removed from the language, and so, c

Re: core languga

2011-02-09 Thread Jonathan M Davis
On Wednesday, February 09, 2011 13:43:14 %u wrote: > Hi > excuse my ignorance > > what does that term mean? > and what the different b/w learning D & pobos ??? I think that you needed to read over that message again before sending it. It's not exactly clear. If you're asking about the term "cor

Re: Template for function or delegate (nothing else)

2011-02-09 Thread useo
== Auszug aus Steven Schveighoffer (schvei...@yahoo.com)'s Artikel > On Wed, 09 Feb 2011 16:41:25 -0500, useo wrote: > > == Auszug aus bearophile (bearophileh...@lycos.com)'s Artikel > >> useo: > >> > I just have a problem with my variables. > >> > > >> > For example... my class/template just look

Re: Template for function or delegate (nothing else)

2011-02-09 Thread Steven Schveighoffer
On Wed, 09 Feb 2011 16:41:25 -0500, useo wrote: == Auszug aus bearophile (bearophileh...@lycos.com)'s Artikel useo: > I just have a problem with my variables. > > For example... my class/template just looks like: > > class Example(T) if (is(T == delegate) || is(T == function)) > { >T callb

Re: Invoke garbage collector?

2011-02-09 Thread Trass3r
However, I need the resources to be freed more quickly than the GC is apparently doing You could use scoped instances if you need to clean them up soon after creation.

core languga

2011-02-09 Thread %u
Hi excuse my ignorance what does that term mean? and what the different b/w learning D & pobos

Re: Template for function or delegate (nothing else)

2011-02-09 Thread useo
== Auszug aus bearophile (bearophileh...@lycos.com)'s Artikel > useo: > > I just have a problem with my variables. > > > > For example... my class/template just looks like: > > > > class Example(T) if (is(T == delegate) || is(T == function)) > > { > >T callback; > > > >void setCallback(T cb

Re: Template for function or delegate (nothing else)

2011-02-09 Thread useo
== Auszug aus Steven Schveighoffer (schvei...@yahoo.com)'s Artikel > On Wed, 09 Feb 2011 16:14:04 -0500, useo wrote: > > I just have a problem with my variables. > > > > For example... my class/template just looks like: > > > > class Example(T) if (is(T == delegate) || is(T == function)) > > { > >

Re: Template for function or delegate (nothing else)

2011-02-09 Thread Steven Schveighoffer
On Wed, 09 Feb 2011 16:14:04 -0500, useo wrote: I just have a problem with my variables. For example... my class/template just looks like: class Example(T) if (is(T == delegate) || is(T == function)) { T callback; void setCallback(T cb) { callback = cb; } } This means that I

Re: Template for function or delegate (nothing else)

2011-02-09 Thread bearophile
useo: > I just have a problem with my variables. > > For example... my class/template just looks like: > > class Example(T) if (is(T == delegate) || is(T == function)) > { >T callback; > >void setCallback(T cb) { > callback = cb; >} > > } > > This means that I need variables

Re: Invoke garbage collector?

2011-02-09 Thread Steven Schveighoffer
On Wed, 09 Feb 2011 15:58:13 -0500, bearophile wrote: Sean Eskapp: so is there a way to invoke a GC cleanup in some way? http://www.digitalmars.com/d/2.0/phobos/core_memory.html#minimize This attempts to minimize memory, it does not run a collection cycle (I don't think anyways). To

Re: Template for function or delegate (nothing else)

2011-02-09 Thread useo
I just have a problem with my variables. For example... my class/template just looks like: class Example(T) if (is(T == delegate) || is(T == function)) { T callback; void setCallback(T cb) { callback = cb; } } This means that I need variables like Example!(void function()) myVar

Re: Invoke garbage collector?

2011-02-09 Thread bearophile
Sean Eskapp: > so is there a way to invoke a GC cleanup in some way? http://www.digitalmars.com/d/2.0/phobos/core_memory.html#minimize Bye, bearophile

Invoke garbage collector?

2011-02-09 Thread Sean Eskapp
I'm having an unfortunate DSFML issue, where failing to free objects like Images or Sprites causes exceptions to eventually be thrown. Calling the built-in member dispose() causes access violations, so I assume it's not for programmer use. However, I need the resources to be freed more quickly tha

Re: Template for function or delegate (nothing else)

2011-02-09 Thread useo
== Auszug aus Steven Schveighoffer (schvei...@yahoo.com)'s Artikel > On Wed, 09 Feb 2011 14:59:33 -0500, useo wrote: > > == Auszug aus Steven Schveighoffer (schvei...@yahoo.com)'s Artikel > >> On Wed, 09 Feb 2011 14:35:42 -0500, useo wrote: > >> > Is it possible to create a template which only ac

Re: Template for function or delegate (nothing else)

2011-02-09 Thread bearophile
useo: > ... something like: > > void bindEvent(T)(if (is(T == delegate) || is(T == function)))()... void foo(T)(T x) if (is(T == delegate) || is(T == function)) { ... } Bye, bearophile

Re: Template for function or delegate (nothing else)

2011-02-09 Thread Steven Schveighoffer
On Wed, 09 Feb 2011 14:59:33 -0500, useo wrote: == Auszug aus Steven Schveighoffer (schvei...@yahoo.com)'s Artikel On Wed, 09 Feb 2011 14:35:42 -0500, useo wrote: > Is it possible to create a template which only accepts functions or > delegates like this example: > > class Example(T : void

Re: Template for function or delegate (nothing else)

2011-02-09 Thread useo
== Auszug aus Steven Schveighoffer (schvei...@yahoo.com)'s Artikel > On Wed, 09 Feb 2011 14:35:42 -0500, useo wrote: > > Is it possible to create a template which only accepts functions or > > delegates like this example: > > > > class Example(T : void function()) { // or ..(T : void delegate ()).

Re: Template for function or delegate (nothing else)

2011-02-09 Thread useo
== Auszug aus Steven Schveighoffer (schvei...@yahoo.com)'s Artikel > On Wed, 09 Feb 2011 14:35:42 -0500, useo wrote: > > Is it possible to create a template which only accepts functions or > > delegates like this example: > > > > class Example(T : void function()) { // or ..(T : void delegate ()).

Re: Template for function or delegate (nothing else)

2011-02-09 Thread Steven Schveighoffer
On Wed, 09 Feb 2011 14:35:42 -0500, useo wrote: Is it possible to create a template which only accepts functions or delegates like this example: class Example(T : void function()) { // or ..(T : void delegate()).. T callback; } Where T is a function or a delegate... Thanks for ever

Template for function or delegate (nothing else)

2011-02-09 Thread useo
Is it possible to create a template which only accepts functions or delegates like this example: class Example(T : void function()) { // or ..(T : void delegate()).. T callback; } Where T is a function or a delegate... Thanks for every suggestion!

Re: allocating an array in an associative array

2011-02-09 Thread Steven Schveighoffer
On Wed, 09 Feb 2011 07:58:12 -0500, Dominic Jones wrote: Hello, I want to allocate the "int[]" array for a particular key in int[][string] list; by doing list[key].length = list[key].length + 1; but it does not work. I get an array bounds error. I am using gdc 4.3.5. Any suggestion

allocating an array in an associative array

2011-02-09 Thread Dominic Jones
Hello, I want to allocate the "int[]" array for a particular key in int[][string] list; by doing list[key].length = list[key].length + 1; but it does not work. I get an array bounds error. I am using gdc 4.3.5. Any suggestions? Thank you, Dominic Jones