Re: swtch off GC?

2009-02-03 Thread Jarrett Billingsley
On Tue, Feb 3, 2009 at 9:31 PM, Weed wrote: > It is possible to disable GC? > > That it has not been included in result binary for an increasing > performance of pointers operation and reduction of the sizes of the binary > > I have not found the answer in google. > You can disable the GC by usin

Re: switch off GC?

2009-02-03 Thread Jesse Phillips
On Wed, 04 Feb 2009 09:38:45 +0700, Weed wrote: > It is possible to disable GC? > > That it has not been included in result binary for an increasing > performance of ref operations and reduction of the size of the binary > > I have not found the answer in google. You can find some more answers,

Re: Learning by Doing: dimensioning units or geometric algebra?

2009-02-03 Thread BCS
Hello Joel, Hello all, I'm a C programmer with some C++ experience ("C with Classes"+STL anyway; never did implement anything but the most trivial templates) and I'm looking to get stated with D. I figured a good way to do that would be to implement a template library, and it may as well be som

Re: Learning by Doing: dimensioning units or geometric algebra?

2009-02-03 Thread BCS
Hello Bill, On Wed, Feb 4, 2009 at 6:45 AM, Joel C. Salomon • a library for dimensional analysis, like boost::units, and/or I always found this kind of thing boring, also I see it as kind of useless overhead that I don't want in my calculations. But it could be a nice way to get your feet w

Re: Some performance questions

2009-02-03 Thread Chris Nicholson-Sauls
Jarrett Billingsley wrote: On Tue, Feb 3, 2009 at 3:44 PM, Chris Nicholson-Sauls wrote: The second reason, is that before every allocation the garbage collector will perform a collection run. This can actually be disabled (at least in theory) if you plan on doing several allocations in a short

Re: switch off GC?

2009-02-03 Thread Daniel Keep
Weed wrote: > It is possible to disable GC? Yes. See std.gc or tango.core.Memory. > That it has not been included in result binary for an increasing > performance of ref operations and reduction of the size of the binary I don't know what "ref operations" are, but odds are disabling the GC wil

switch off GC?

2009-02-03 Thread Weed
It is possible to disable GC? That it has not been included in result binary for an increasing performance of ref operations and reduction of the size of the binary I have not found the answer in google.

swtch off GC?

2009-02-03 Thread Weed
It is possible to disable GC? That it has not been included in result binary for an increasing performance of pointers operation and reduction of the sizes of the binary I have not found the answer in google.

Re: Time some code using Tango

2009-02-03 Thread Jarrett Billingsley
On Tue, Feb 3, 2009 at 7:40 PM, Jarrett Billingsley wrote: > On Tue, Feb 3, 2009 at 7:15 PM, grauzone wrote: >> If he had to use OS specific APIs (which would be another sad thing about >> Tango), I'd suggest to use clock_gettime() with CLOCK_THREAD_CPUTIME_ID >> under Unix. >> >> What is timex?

Re: Time some code using Tango

2009-02-03 Thread Jarrett Billingsley
On Tue, Feb 3, 2009 at 7:15 PM, grauzone wrote: > If he had to use OS specific APIs (which would be another sad thing about > Tango), I'd suggest to use clock_gettime() with CLOCK_THREAD_CPUTIME_ID > under Unix. > > What is timex? http://en.wikipedia.org/wiki/Timex_(Unix)

Re: Time some code using Tango

2009-02-03 Thread grauzone
Jarrett Billingsley wrote: On Tue, Feb 3, 2009 at 5:54 PM, Matthias Walter wrote: Hi there, I'd like to time some functions using Tango, but only including the really used CPU-time. StopWatch and the other time functions I've found don't mind on the CPU usage, which means if I time multiple

Re: Time some code using Tango

2009-02-03 Thread Jarrett Billingsley
On Tue, Feb 3, 2009 at 5:54 PM, Matthias Walter wrote: > Hi there, > > I'd like to time some functions using Tango, but only including the really > used CPU-time. StopWatch and the other time functions I've found don't mind > on the CPU usage, which means if I time multiple processes at once whi

Time some code using Tango

2009-02-03 Thread Matthias Walter
Hi there, I'd like to time some functions using Tango, but only including the really used CPU-time. StopWatch and the other time functions I've found don't mind on the CPU usage, which means if I time multiple processes at once which share a single CPU, their times increase... Best regards Mat

Re: Some performance questions

2009-02-03 Thread Jarrett Billingsley
On Tue, Feb 3, 2009 at 3:44 PM, Chris Nicholson-Sauls wrote: > The > second reason, is that before every allocation the garbage collector will > perform a collection run. This can actually be disabled (at least in > theory) if you plan on doing several allocations in a short period of time, > and

Re: Anybody ever tried to work with ffmpeg?

2009-02-03 Thread Mike
On Tue, 03 Feb 2009 23:25:29 +0100, Mike wrote: Never mind - as it usually is, 5 minutes after sending a question to a NG (after 2 hours of wasted time) you have the correct idea. In this case, I called "avcodec_register_all" instead of "av_register_all" before "avformat_open_input_file".

Anybody ever tried to work with ffmpeg?

2009-02-03 Thread Mike
Hi! I'm trying to get ffmpeg to work with D; I've got some stuff running, but ... well. av_open_input_file gives me -2 as an error and I can't figure out what this means (the #defines for the error codes are impossible to understand, much less translate to D). Anybody ever done that and c

Re: Learning by Doing: dimensioning units or geometric algebra?

2009-02-03 Thread Bill Baxter
On Wed, Feb 4, 2009 at 6:45 AM, Joel C. Salomon wrote: > Hello all, > > I'm a C programmer with some C++ experience ("C with Classes"+STL > anyway; never did implement anything but the most trivial templates) and > I'm looking to get stated with D. I figured a good way to do that would > be to imp

Re: Some performance questions

2009-02-03 Thread Lars Kyllingstad
Chris Nicholson-Sauls wrote: Lars Kyllingstad wrote: Daniel Keep wrote: Lars Kyllingstad wrote: [snip] From a performance perspective, however, it carries with it the overhead of an extra function call, which I'm not sure I want. -Lars You're worried about a second function call which coul

Learning by Doing: dimensioning units or geometric algebra?

2009-02-03 Thread Joel C. Salomon
Hello all, I’m a C programmer with some C++ experience (“C with Classes”+STL anyway; never did implement anything but the most trivial templates) and I’m looking to get stated with D. I figured a good way to do that would be to implement a template library, and it may as well be something I’ll act

Re: Some performance questions

2009-02-03 Thread Chris Nicholson-Sauls
Lars Kyllingstad wrote: Daniel Keep wrote: Lars Kyllingstad wrote: [snip] From a performance perspective, however, it carries with it the overhead of an extra function call, which I'm not sure I want. -Lars You're worried about a second function call which could potentially be inlined, yet

Re: state of win32 headers?

2009-02-03 Thread Stewart Gordon
akcom wrote: What is the state of the win32 headers? Looking for people like you to help complete the work. But usable. Stewart.

Re: Deleting an element from an array

2009-02-03 Thread nobody
"Jarrett Billingsley" wrote in message news:mailman.637.1233680615.22690.digitalmars-d-le...@puremagic.com... > On Tue, Feb 3, 2009 at 11:51 AM, nobody wrote: >> Would you also happen to know why the following gives an error? >> >> arr[1] = arr[$-1];// main.d(11): Error: cannot assign to s

Re: Deleting an element from an array

2009-02-03 Thread Jarrett Billingsley
On Tue, Feb 3, 2009 at 11:51 AM, nobody wrote: > Would you also happen to know why the following gives an error? > > arr[1] = arr[$-1];// main.d(11): Error: cannot assign to static array arr[1][] = arr[$-1][]; You cannot reassign what fixed-size array references point to, but you can copy t

Re: Deleting an element from an array

2009-02-03 Thread nobody
"Jarrett Billingsley" wrote in message news:mailman.636.1233678501.22690.digitalmars-d-le...@puremagic.com... > On Tue, Feb 3, 2009 at 10:54 AM, nobody wrote: >> Let's see if I understand memmove.. >> The way it's used here, it copies the tail of an array onto that same >> array, >> only start

Re: Deleting an element from an array

2009-02-03 Thread Jarrett Billingsley
On Tue, Feb 3, 2009 at 10:54 AM, nobody wrote: > Let's see if I understand memmove.. > The way it's used here, it copies the tail of an array onto that same array, > only starting one index earlier, thus removing the undesired element? > Neat. Right. > However I just realized that order does not

Re: Deleting an element from an array

2009-02-03 Thread nobody
"Jarrett Billingsley" wrote in message news:mailman.635.1233675301.22690.digitalmars-d-le...@puremagic.com... > On Tue, Feb 3, 2009 at 10:14 AM, Frank Benoit > wrote: >> >> arr = arr[ 0 .. lowerBound ] ~ arr[ upperBound .. $ ]; >> > > That's simple enough, but inefficient. > > Something like th

Re: Deleting an element from an array

2009-02-03 Thread Steven Schveighoffer
"Frank Benoit" wrote > nobody schrieb: >> "Denis Koroskin" <2kor...@gmail.com> wrote in message >> news:op.uor1gzqho7c...@korden-pc... >>> On Tue, 03 Feb 2009 15:46:52 +0300, nobody >>> wrote: >>> What is the best way to completely remove an element from an array? For example you h

Re: Deleting an element from an array

2009-02-03 Thread nobody
"Frank Benoit" wrote in message news:gm9n0e$314...@digitalmars.com... > nobody schrieb: >> "Denis Koroskin" <2kor...@gmail.com> wrote in message >> news:op.uor1gzqho7c...@korden-pc... >>> On Tue, 03 Feb 2009 15:46:52 +0300, nobody >>> wrote: >>> What is the best way to completely remove a

Re: Deleting an element from an array

2009-02-03 Thread Jarrett Billingsley
On Tue, Feb 3, 2009 at 10:14 AM, Frank Benoit wrote: > > arr = arr[ 0 .. lowerBound ] ~ arr[ upperBound .. $ ]; > That's simple enough, but inefficient. Something like this: import std.c.string; // or import tango.stdc.string; T[] erase(T)(ref T[] arr, size_t idx) { if(arr.length == 0)

Re: Deleting an element from an array

2009-02-03 Thread Frank Benoit
nobody schrieb: > "Denis Koroskin" <2kor...@gmail.com> wrote in message > news:op.uor1gzqho7c...@korden-pc... >> On Tue, 03 Feb 2009 15:46:52 +0300, nobody wrote: >> >>> What is the best way to completely remove an element from an array? >>> >>> For example you have an array: >>> [1,2,3,4,5,6] >>

Re: Deleting an element from an array

2009-02-03 Thread nobody
"Denis Koroskin" <2kor...@gmail.com> wrote in message news:op.uor1gzqho7c...@korden-pc... > On Tue, 03 Feb 2009 15:46:52 +0300, nobody wrote: > >> What is the best way to completely remove an element from an array? >> >> For example you have an array: >> [1,2,3,4,5,6] >> and want to remove eleme

Re: Deleting an element from an array

2009-02-03 Thread Denis Koroskin
On Tue, 03 Feb 2009 15:46:52 +0300, nobody wrote: What is the best way to completely remove an element from an array? For example you have an array: [1,2,3,4,5,6] and want to remove element "3" in such a way that the resulting array is: [1,2,4,5,6] Thanks. import std.array; auto arr = [0

Deleting an element from an array

2009-02-03 Thread nobody
What is the best way to completely remove an element from an array? For example you have an array: [1,2,3,4,5,6] and want to remove element "3" in such a way that the resulting array is: [1,2,4,5,6] Thanks.

Re: state of win32 headers?

2009-02-03 Thread Daniel Keep
akcom wrote: > What is the state of the win32 headers? Is there any place where I can get > win32 headers including winsock2? http://www.dsource.org/projects/bindings/wiki/WindowsApi Haven't checked on them in a while, but they should be usable. -- Daniel