Re: introspection experiment

2011-06-15 Thread Lloyd Dupont
Thanks for that! It'll need some digesting... but it's already giving me some idea! :) "Adam D. Ruppe" wrote in message news:it7rlo$2ql3$1...@digitalmars.com... While my code is ugly as sin, it might be useful to look at the prepareReflection function in my web.d http://arsdnet.net/dcode/web

Re: Should I bother porting Win32 threading examples?

2011-06-15 Thread Kagamin
Andrej Mitrovic Wrote: > I don't want to encourage newbies > to use WinAPI threading functions You shouldn't encourage newbies to use any system calls, not just winapi.

Re: How do I truncate a file, delete bytes, or set the end of file from a stream?

2011-06-15 Thread XP1
On Sun, 12 Jun 2011 02:47:01 -0400, XP1 wrote: How do I truncate a file, delete bytes, or set the end of file from a stream? For example, what would be the easiest way to delete the last 4 bytes from a file? Anyone?

Re: How do I truncate a file, delete bytes, or set the end of file from a stream?

2011-06-15 Thread Steven Schveighoffer
On Wed, 15 Jun 2011 13:30:25 -0400, XP1 wrote: On Sun, 12 Jun 2011 02:47:01 -0400, XP1 wrote: How do I truncate a file, delete bytes, or set the end of file from a stream? For example, what would be the easiest way to delete the last 4 bytes from a file? Anyone? If you are on linu

Re: enum sstring problem

2011-06-15 Thread Jos van Uden
Using 2.053 on win32 (XP), compiles and runs.

Physics engine, eg Blaze

2011-06-15 Thread Joel Christensen
I've got a GUI (GtkD) and a game library (DAllegro5) going. But I'm thinking a physics library would be wanted. I had a go at making Blaze work with D2.0. I got it to compile and had things fall down the screen with it, but the original it hasn't been updated for 2 years, I think. Blaze is bas

Advice on threading/fibers/?

2011-06-15 Thread Justin Whear
Consider the following: You have 10 million data points and you need to apply a multipass algorithm to them. Each pass is like a cellular automata: it can read from the previous pass but it doesn't know the "current" values. This makes the actual processing of each value trivially parallelizable

Pure not acting pure.

2011-06-15 Thread Charles McAnany
Hi, all. I'm implementing a little linked list that selection-sorts itself. Basically, the sort code is: swap this element with the minimum element in the list. sort the rest of the list. Obviously, one part of this is swapping elements. It seemed easiest to swap the contents of two nodes, rathe

Re: Advice on threading/fibers/?

2011-06-15 Thread Jonathan M Davis
On 2011-06-15 16:57, Justin Whear wrote: > Consider the following: > > You have 10 million data points and you need to apply a multipass algorithm > to them. Each pass is like a cellular automata: it can read from the > previous pass but it doesn't know the "current" values. This makes the > actua

Re: Pure not acting pure.

2011-06-15 Thread Jonathan M Davis
On 2011-06-15 17:38, Charles McAnany wrote: > Hi, all. I'm implementing a little linked list that selection-sorts itself. > Basically, the sort code is: swap this element with the minimum element in > the list. > sort the rest of the list. > > Obviously, one part of this is swapping elements. It s

Re: enum sstring problem

2011-06-15 Thread Johann MacDonagh
On 6/15/2011 5:32 PM, Jos van Uden wrote: Using 2.053 on win32 (XP), compiles and runs. Ah! I found the problem. If you're using VisualD it compiles with the -g flag (add symbolic debug info), which fails: main.d(4): Error: Integer constant expression expected instead of "hello" main.d(5): E

Re: enum sstring problem

2011-06-15 Thread Johann MacDonagh
On 6/15/2011 10:11 PM, Johann MacDonagh wrote: On 6/15/2011 5:32 PM, Jos van Uden wrote: Using 2.053 on win32 (XP), compiles and runs. Ah! I found the problem. If you're using VisualD it compiles with the -g flag (add symbolic debug info), which fails: main.d(4): Error: Integer constant expre

Re: Pure not acting pure.

2011-06-15 Thread Charles McAnany
Ah, so does the compiler figure out which ones are strongly and weakly pure and then optimize as appropriate? Is there a way to indicate that a function is strongly pure? Because it would seem odd to call a function you thought was pure and wind up with a mutated argument. -Charles

Re: Pure not acting pure.

2011-06-15 Thread Jonathan M Davis
On 2011-06-15 20:29, Charles McAnany wrote: > Ah, so does the compiler figure out which ones are strongly and weakly pure > and then optimize as appropriate? Is there a way to indicate that a > function is strongly pure? Because it would seem odd to call a function > you thought was pure and wind u

Re: enum sstring problem

2011-06-15 Thread Lloyd Dupont
Yes indeed, I'm using Visual D Ho... good to know, thanks! :) mm.. well hopefully it'll be fixed in the next release... and I should pay a close look at the build script! "Johann MacDonagh" wrote in message news:itbp22$28l2$1...@digitalmars.com... On 6/15/2011 5:32 PM, Jos van Uden wrote: