Re: Newbie Question: SOAP Module

2013-11-22 Thread Rick Catano
On Tuesday, 19 November 2013 at 22:05:36 UTC, Jacek Furmankiewicz wrote: is there any particular reason you are forced to use SOAP? It is more or less an obsolete and generally frowned upon approach. if you were willing to adopt REST, vibe.d seems to have some nice functionality for creating

Re: Reuse C memory for D struct?

2013-11-22 Thread evilrat
On Saturday, 23 November 2013 at 01:39:00 UTC, Baz wrote: if your D struct is POD and alocated on the heap, it's the same, as long as data type are the same and not plateform-dependent.I'm mean that that you just cast from the initial pointer... and because of D UFCS it is possible to have

Re: Reuse C memory for D struct?

2013-11-22 Thread Baz
On Thursday, 21 November 2013 at 15:22:10 UTC, Lemonfiend wrote: Hi! I'm wondering if it's possible to have a struct in D which uses the same pointer and memory as returned by the extern C function. This would allow me to manipulate and use the C struct directly in D code. I'm not sure how

Concurrentcy with per thread housekeeping task idea

2013-11-22 Thread Charles Hixson
Is this a plausible approach? What I've sketched out so far is: /**cells2.d*/ importstd.concurrency; importstd.stdio; importcellsdb; Tidtids[8]; voidcellLoop (int i) {Cells[ulong]cells; boolrcv=true; intthisTin=i; for(;;)

Re: D scientific graphics

2013-11-22 Thread seany
I notice it is being written on top of gdk /gtk - in that case i can also write a code on top of rlab / labplot . On the other hand, is there any pixel level manpulation in D, such as Fortan would use a write method call to talk to a file pointing to a VGA device? (example here: http://sun.s

Re: Class References

2013-11-22 Thread Baz
On Monday, 28 October 2013 at 11:22:03 UTC, Jeroen Bollen wrote: Is it possible in D to create an enum of class references? Something around the lines of: enum ClassReferences : Interface { CLASS1 = &ClassOne, CLASS2 = &ClassTwo } at runtime make an array of *void and cast them accordi

Re: D scientific graphics

2013-11-22 Thread Philippe Sigaud
> is there a D pacakge for scientific graphing, a la pyvis > (http://pyvis.sourceforge.net/) for python? David Simcha coded Plot2Kill for his PhD: https://github.com/dsimcha/Plot2kill I don't know if he maintained it further.

Re: D scientific graphics

2013-11-22 Thread Jordi Sayol
El 22/11/13 16:55, seany ha escrit: > Hello, > > is there a D pacakge for scientific graphing, a la pyvis > (http://pyvis.sourceforge.net/) for python? > > I took a look at the wiki page: > http://wiki.dlang.org/Libraries_and_Frameworks This page is not answering my > question. > > thank you

Re: D game engine -- Any suggestions?

2013-11-22 Thread Mineko
I did a complete restructure of the engine, so it'd be a bit better for later use. If there's anything I missed or anything I should fix, please tell me. Ignore the opengl stuff though, right now it's more or less a placeholder so I can implement the base functions first and forthmost. http

D scientific graphics

2013-11-22 Thread seany
Hello, is there a D pacakge for scientific graphing, a la pyvis (http://pyvis.sourceforge.net/) for python? I took a look at the wiki page: http://wiki.dlang.org/Libraries_and_Frameworks This page is not answering my question. thank you

Re: return type and templates

2013-11-22 Thread Jonathan M Davis
On Friday, November 22, 2013 16:21:43 Timon Gehr wrote: > On 11/22/2013 04:14 PM, Jonathan M Davis wrote: > > On Friday, November 22, 2013 15:20:30 Timon Gehr wrote: > >> On 11/22/2013 02:50 PM, Dicebot wrote: > >>> On Friday, 22 November 2013 at 13:43:49 UTC, Andrea Fontana wrote: > I assumed

Re: return type and templates

2013-11-22 Thread Timon Gehr
On 11/22/2013 04:14 PM, Jonathan M Davis wrote: On Friday, November 22, 2013 15:20:30 Timon Gehr wrote: On 11/22/2013 02:50 PM, Dicebot wrote: On Friday, 22 November 2013 at 13:43:49 UTC, Andrea Fontana wrote: I assumed that it knows - when is trying to instatiate s.value template - that "s.va

Re: return type and templates

2013-11-22 Thread Jonathan M Davis
On Friday, November 22, 2013 15:20:30 Timon Gehr wrote: > On 11/22/2013 02:50 PM, Dicebot wrote: > > On Friday, 22 November 2013 at 13:43:49 UTC, Andrea Fontana wrote: > >> I assumed that it knows - when is trying to instatiate s.value > >> template - that "s.value" is part of an assignment and tha

Re: Optimization tips for alpha blending / rasterization loop

2013-11-22 Thread Mikko Ronkainen
Do you want to use a ubyte instead of a byte here? Yes, that was a silly mistake. It seems that fixing that removed the need for all the masking operations, which had the biggest speedup. Also, for your alpha channel: int alpha = (fg[3] & 0xff) + 1; int inverseAlpha = 257 - alpha; If fg[3

Re: return type and templates

2013-11-22 Thread Jonathan M Davis
On Friday, November 22, 2013 14:29:46 Timon Gehr wrote: > On 11/22/2013 01:29 PM, Jonathan M Davis wrote: > > On Friday, November 22, 2013 11:50:57 Andrea Fontana wrote: > >> I just mean: > >> > >> int t = s.value; // Means int t = s.value!int; > >> > >> If there's a problem with template insta

DStep

2013-11-22 Thread Craig Dillabaugh
I am trying to use DStep on OpenSuse 12.3. I downloaded one of the binaries (it was for Debian, so I guess that is my problem), and when I run DStep I get the following error: craigkris@linux-s9qf:~/code/DShape/D> dstep shapefil.h File(850DF8, "")/usr/include/stdio.h:33:11: fatal error: 'stddef.

Re: return type and templates

2013-11-22 Thread Timon Gehr
On 11/22/2013 02:50 PM, Dicebot wrote: On Friday, 22 November 2013 at 13:43:49 UTC, Andrea Fontana wrote: I assumed that it knows - when is trying to instatiate s.value template - that "s.value" is part of an assignment and that it will be assigned to an int. This is somewhat wrong part. "s.va

Re: return type and templates

2013-11-22 Thread Timon Gehr
On 11/22/2013 02:43 PM, Jonathan M Davis wrote: On Friday, November 22, 2013 14:29:46 Timon Gehr wrote: >The request would be reasonable if 'value' was declared as follows though: > >@property T value(T)() if (is(T == int)) { return _intValue; } > >i.e. the fact that the template argument equals

Re: return type and templates

2013-11-22 Thread Andrea Fontana
On Friday, 22 November 2013 at 13:43:59 UTC, Jonathan M Davis wrote: On Friday, November 22, 2013 14:29:46 Timon Gehr wrote: The request would be reasonable if 'value' was declared as follows though: @property T value(T)() if (is(T == int)) { return _intValue; } i.e. the fact that the templat

Re: return type and templates

2013-11-22 Thread Dicebot
On Friday, 22 November 2013 at 13:43:49 UTC, Andrea Fontana wrote: I assumed that it knows - when is trying to instatiate s.value template - that "s.value" is part of an assignment and that it will be assigned to an int. This is somewhat wrong part. "s.value" is distinct separate expression t

Re: return type and templates

2013-11-22 Thread Andrea Fontana
On Friday, 22 November 2013 at 12:29:25 UTC, Jonathan M Davis wrote: On Friday, November 22, 2013 11:50:57 Andrea Fontana wrote: I just mean: int t = s.value; // Means int t = s.value!int; If there's a problem with template instantiatio is the same we have now. Now I have to write: int t =

Re: return type and templates

2013-11-22 Thread Jonathan M Davis
On Friday, November 22, 2013 14:29:46 Timon Gehr wrote: > The request would be reasonable if 'value' was declared as follows though: > > @property T value(T)() if (is(T == int)) { return _intValue; } > > i.e. the fact that the template argument equals the type of the > resulting call can be read

Re: Optimization tips for alpha blending / rasterization loop

2013-11-22 Thread bearophile
Craig Dillabaugh: Yes it is pretty easy to mix that up. A lot of my work is with images with single byte pixels, so I am pretty used to using ubyte now. I can't remember if I ever used byte, and if I did I was likely a bug. Vote for the bug if you like it :-) Bye, bearophile

Re: return type and templates

2013-11-22 Thread Timon Gehr
On 11/22/2013 01:29 PM, Jonathan M Davis wrote: On Friday, November 22, 2013 11:50:57 Andrea Fontana wrote: I just mean: int t = s.value; // Means int t = s.value!int; If there's a problem with template instantiatio is the same we have now. Now I have to write: int t = s.value!int; so if t

Re: ElementEncodingType and immutable

2013-11-22 Thread Jonathan M Davis
On Friday, November 22, 2013 12:21:23 bioinfornatics wrote: > std.string.representation is great but return a numeric array > instead of numeric type. Ex ubyte[] > For ascii but me i try to get ubyte. Yes. My point is that you have to operate on sequence as immutable(ubyte)[] instead of immutab

Re: return type and templates

2013-11-22 Thread Jonathan M Davis
On Friday, November 22, 2013 11:50:57 Andrea Fontana wrote: > I just mean: > > int t = s.value; // Means int t = s.value!int; > > If there's a problem with template instantiatio is the same we > have now. > Now I have to write: > > int t = s.value!int; > > so if there's a problem with !int, i

Re: return type and templates

2013-11-22 Thread Andrea Fontana
On Friday, 22 November 2013 at 10:50:58 UTC, Andrea Fontana wrote: On Friday, 22 November 2013 at 10:34:12 UTC, Jonathan M Davis wrote: On Friday, November 22, 2013 11:24:30 bearophile wrote: Jonathan M Davis: > It's not going to work for the compiler to figure out what > types might work with

Re: Optimization tips for alpha blending / rasterization loop

2013-11-22 Thread Craig Dillabaugh
On Friday, 22 November 2013 at 10:27:12 UTC, bearophile wrote: Craig Dillabaugh: Do you want to use a ubyte instead of a byte here? See: http://d.puremagic.com/issues/show_bug.cgi?id=3850 Bye, bearophile Yes it is pretty easy to mix that up. A lot of my work is with images with single byt

Re: ElementEncodingType and immutable

2013-11-22 Thread bioinfornatics
On Friday, 22 November 2013 at 10:07:12 UTC, Jonathan M Davis wrote: On Friday, November 22, 2013 10:17:40 bioinfornatics wrote: On Friday, 22 November 2013 at 07:54:45 UTC, Jonathan M Davis wrote: > On Friday, November 22, 2013 01:01:52 bioinfornatics wrote: >> hi with this code: http://www.dp

Re: return type and templates

2013-11-22 Thread Andrea Fontana
On Friday, 22 November 2013 at 10:34:12 UTC, Jonathan M Davis wrote: On Friday, November 22, 2013 11:24:30 bearophile wrote: Jonathan M Davis: > It's not going to work for the compiler to figure out what > types might work with a given template constraint and then > have it pick one when you don

Re: alias this

2013-11-22 Thread Mf_Gh
thx

Re: alias this

2013-11-22 Thread Jonathan M Davis
On Friday, November 22, 2013 11:21:35 Mf_Gh wrote: > hi, i started to play a round with D and try to do something like: > > class A{ > string a = "alias A"; > alias a this; > } > > class B:A{ > string b = "alias B"; > alias b this; > } > > > void main() { > A b = n

Re: return type and templates

2013-11-22 Thread Jonathan M Davis
On Friday, November 22, 2013 11:24:30 bearophile wrote: > Jonathan M Davis: > > It's not going to work for the compiler to figure out what > > types might work with a given template constraint and then > > have it pick one when you don't tell the template what > > type to be instantiated with. > >

Re: Optimization tips for alpha blending / rasterization loop

2013-11-22 Thread bearophile
Craig Dillabaugh: Do you want to use a ubyte instead of a byte here? See: http://d.puremagic.com/issues/show_bug.cgi?id=3850 Bye, bearophile

alias this

2013-11-22 Thread Mf_Gh
hi, i started to play a round with D and try to do something like: class A{ string a = "alias A"; alias a this; } class B:A{ string b = "alias B"; alias b this; } void main() { A b = new B(); writeln(b); //outputs alias A } i thought the output

Re: return type and templates

2013-11-22 Thread bearophile
Jonathan M Davis: It's not going to work for the compiler to figure out what types might work with a given template constraint and then have it pick one when you don't tell the template what type to be instantiated with. It could work if the type system become more powerful, but what are the

Re: ElementEncodingType and immutable

2013-11-22 Thread Jonathan M Davis
On Friday, November 22, 2013 10:17:40 bioinfornatics wrote: > On Friday, 22 November 2013 at 07:54:45 UTC, Jonathan M Davis > > wrote: > > On Friday, November 22, 2013 01:01:52 bioinfornatics wrote: > >> hi with this code: http://www.dpaste.dzfl.pl/2f830da1 > >> I do not understand why alias Char

Re: return type and templates

2013-11-22 Thread Jonathan M Davis
On Friday, November 22, 2013 10:24:38 Andrea Fontana wrote: > I've seen many different topic about this, but they don't explain > what's wrong with this "proposed" feature. Who can explain me why > this can't be added to language? Does it broke something? > > // Trivial example: > > struct Test >

Re: ElementEncodingType and immutable

2013-11-22 Thread bioinfornatics
On Friday, 22 November 2013 at 07:54:45 UTC, Jonathan M Davis wrote: On Friday, November 22, 2013 01:01:52 bioinfornatics wrote: hi with this code: http://www.dpaste.dzfl.pl/2f830da1 I do not understand why alias Char is equal to immutable(char) How to fix these issues? I'm not quite sure whi

return type and templates

2013-11-22 Thread Andrea Fontana
I've seen many different topic about this, but they don't explain what's wrong with this "proposed" feature. Who can explain me why this can't be added to language? Does it broke something? // Trivial example: struct Test { @property auto value(T)() if (is(T == int)) { return _

Re: ElementEncodingType and immutable

2013-11-22 Thread bioinfornatics
On Friday, 22 November 2013 at 07:54:45 UTC, Jonathan M Davis wrote: On Friday, November 22, 2013 01:01:52 bioinfornatics wrote: hi with this code: http://www.dpaste.dzfl.pl/2f830da1 I do not understand why alias Char is equal to immutable(char) How to fix these issues? I'm not quite sure whi

Re: Optimization tips for alpha blending / rasterization loop

2013-11-22 Thread Andrea Fontana
On Friday, 22 November 2013 at 08:44:06 UTC, Andrea Fontana wrote: On Friday, 22 November 2013 at 03:36:38 UTC, Craig Dillabaugh wrote: On Friday, 22 November 2013 at 02:24:56 UTC, Mikko Ronkainen wrote: I'm trying to learn some software rasterization stuff. Here's what I'm doing: 32-bit DMD

Re: Can someone please explain -allinst?

2013-11-22 Thread Dmitry Olshansky
22-Nov-2013 03:25, Jesse Phillips пишет: On Thursday, 21 November 2013 at 21:20:59 UTC, Gary Willoughby wrote: Can someone explain the -allinst compiler flag for me please? I've absolutely no idea what this flag does or when to use it. I don't think I have have an understanding of it, but here