Re: formattedWrite writes nothing

2014-05-02 Thread Jared Miller via Digitalmars-d-learn
I logged this bug a while ago: https://issues.dlang.org/show_bug.cgi?id=10291 On Friday, 2 May 2014 at 10:06:43 UTC, ref2401 wrote: Is it a bug or is there a reason for such behaviour?

Re: Finally full multidimensional arrays support in D

2014-03-17 Thread Jared Miller
Good news and kudos to Kenji. And yes, I think that a matrix / linear algebra library, as well as NumPy-style ND-Arrays are great candidates for future Phobos modules. We've done a good bit of work with matrices at my workplace (EMSI), so I bet someone here could find time to contribute a

Re: Status of multidimensional slicing

2014-03-10 Thread Jared Miller
So are there any significant objections to Kenji's PR? I think it's got a lot of things going for it, particularly in finishing the job begun by DIP#7 and opDollar. I realize it's not likely be a top priority for most people, but it's got a lot of bang for your buck: a great benefit to an

Status of multidimensional slicing

2014-03-07 Thread Jared Miller
I would like to revisit the topic of operator overloads for multidimensional slicing. Bottom line: opSlice is currently limited to 1 dimension/axis only. The cleanest workaround right now is to pass your own slice structs to opIndex. It works but it's not too pretty. // Suppose we have

Re: Class References

2013-11-20 Thread Jared Miller
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 } Here's my solution using an enum as you originally

Re: Class References

2013-11-20 Thread Jared Miller
On Wednesday, 20 November 2013 at 23:06:37 UTC, Jared Miller wrote: Foo getObj(ClassNames name) { // without cast, it converts to the enum member name. return cast(Foo)Object.factory(cast(string)name); } Oops, never mind - you don't need the cast(string) there.

Re: about std.string.representation

2013-11-13 Thread Jared Miller
To expand on bearophile's answer, a dynamic array is basically a package of two things: a length and a pointer to the contents. Each of these is 8 bytes on a 64-bit system, thus the sizeof a dynamic array is 16 bytes. You are asking how char, wchar, and dchar correspond to integer types.

Re: Error: struct Foo(T = int) is used as a type

2013-10-09 Thread Jared Miller
I wondered the same thing a couple of weeks back. It seems to work this way to avoid certain ambiguities. Related bug report / discussion: http://d.puremagic.com/issues/show_bug.cgi?id=1012

Re: D language manipulation of dataframe type structures

2013-09-25 Thread Jared Miller
I agree with other posters that a D REPL and interactive/visualization data environment would be very cool, but unfortunately doesn't exist. Batch computing is more practical, but REPLs really hook new users. I see statistical computing as a huge opportunity for D adoption. (R is just super-ugly