June 15, 2015
On Monday, 15 June 2015 at 08:12:17 UTC, anonymous wrote:
> I understand 'optimize default implementation to the speed of high quality BLAS for _any_/large matrix size'. Great if it is done but imo there is no real pressure to do it and probably needs lot of time of experts.

+1

June 15, 2015
On Sunday, 7 June 2015 at 18:27:16 UTC, Robert burner Schadek wrote:
> Phobos is awesome, the libs of go, python and rust only have better marketing.
> As discussed on dconf, phobos needs to become big and blow the rest out of the sky.
>
> http://wiki.dlang.org/DIP80
>
> lets get OT, please discuss

N-dimensional slices is ready for comments!
Announce  http://forum.dlang.org/thread/rilfmeaqkailgpxoziuo@forum.dlang.org

Ilya
June 15, 2015
On Monday, 15 June 2015 at 10:00:43 UTC, Ilya Yaroshenko wrote:
> N-dimensional slices is ready for comments!

It seems to me that the properties of the matrix require `row` and `col` like this:

import std.stdio, std.experimental.range.ndslice, std.range : iota;

void main() {

    auto matrix = 100.iota.sliced(3, 4, 5);
	
    writeln(matrix[0]);
    // [[0, 1, 2, 3, 4], [5, 6, 7, 8, 9], [10, 11, 12, 13, 14], [15, 16, 17, 18, 19]]

    // writeln(matrix[0].row); // 4
    // writeln(matrix[0].col); // 5
}

P.S. I'm not exactly sure that these properties should work exactly as in my code :)
June 15, 2015
On Monday, 15 June 2015 at 13:44:53 UTC, Dennis Ritchie wrote:
> On Monday, 15 June 2015 at 10:00:43 UTC, Ilya Yaroshenko wrote:
>> N-dimensional slices is ready for comments!
>
> It seems to me that the properties of the matrix require `row` and `col` like this:
>
> import std.stdio, std.experimental.range.ndslice, std.range : iota;
>
> void main() {
>
>     auto matrix = 100.iota.sliced(3, 4, 5);
> 	
>     writeln(matrix[0]);
>     // [[0, 1, 2, 3, 4], [5, 6, 7, 8, 9], [10, 11, 12, 13, 14], [15, 16, 17, 18, 19]]
>
>     // writeln(matrix[0].row); // 4
>     // writeln(matrix[0].col); // 5
> }
>
> P.S. I'm not exactly sure that these properties should work exactly as in my code :)

try .length!0 and .length!1 or .shape[0] and .shape[1]
June 15, 2015
On Monday, 15 June 2015 at 08:12:17 UTC, anonymous wrote:
> sorry, I should read more careful. I understand 'optimize default implementation to the speed of high quality BLAS for _any_/large matrix size'. Great if it is done but imo there is no real pressure to do it and probably needs lot of time of experts.
>
> To benchmark when existing BLAS is actually faster is than 'naive brute force' sounds very good and reasonable.

Yes. Well, I think there are some different expectations to what a standard library should include. In my view BLAS is primarily an API that matters because people have existing code bases, therefore it is common to have good implementations for it. I don't really see any reason for why new programs should target it.

I think it is a good idea to stay higher level. Provide simple implementations that the optimizer can deal with. Then have a benchmarking program that run on different configurations (os+hardware) to measure when the non-D libraries perform better and use those when they are faster.

So I don't think phobos should provide BLAS as such. That's what I would do, anyway.
June 15, 2015
On Monday, 15 June 2015 at 13:44:53 UTC, Dennis Ritchie wrote:
> On Monday, 15 June 2015 at 10:00:43 UTC, Ilya Yaroshenko wrote:
>> N-dimensional slices is ready for comments!
>
> It seems to me that the properties of the matrix require `row` and `col` like this:
>
> import std.stdio, std.experimental.range.ndslice, std.range : iota;
>
> void main() {
>
>     auto matrix = 100.iota.sliced(3, 4, 5);
> 	
>     writeln(matrix[0]);
>     // [[0, 1, 2, 3, 4], [5, 6, 7, 8, 9], [10, 11, 12, 13, 14], [15, 16, 17, 18, 19]]
>
>     // writeln(matrix[0].row); // 4
>     // writeln(matrix[0].col); // 5
> }
>
> P.S. I'm not exactly sure that these properties should work exactly as in my code :)

This works:

unittest {
    import std.stdio, std.experimental.range.ndslice;
    import std.range : iota;

    auto matrix = 100.iota.sliced(3, 4, 5);

    writeln(matrix[0]);
    writeln(matrix[0].length);   // 4
    writeln(matrix[0].length!0); // 4
    writeln(matrix[0].length!1); // 5
    writeln(matrix.length!2);    // 5
}

Prints:

//[[0, 1, 2, 3, 4], [5, 6, 7, 8, 9], [10, 11, 12, 13, 14], [15, 16, 17, 18, 19]]
//4
//4
//5

I am note sure that we need something like `height`/row and `width`/col for nd-slices. This kind of names can be used after casting to the future `std.container.matrix`.
June 15, 2015
On Monday, 15 June 2015 at 13:55:16 UTC, John Colvin wrote:
> On Monday, 15 June 2015 at 13:44:53 UTC, Dennis Ritchie wrote:
>> On Monday, 15 June 2015 at 10:00:43 UTC, Ilya Yaroshenko wrote:
>>> N-dimensional slices is ready for comments!
>>
>> It seems to me that the properties of the matrix require `row` and `col` like this:
>>
>> import std.stdio, std.experimental.range.ndslice, std.range : iota;
>>
>> void main() {
>>
>>     auto matrix = 100.iota.sliced(3, 4, 5);
>> 	
>>     writeln(matrix[0]);
>>     // [[0, 1, 2, 3, 4], [5, 6, 7, 8, 9], [10, 11, 12, 13, 14], [15, 16, 17, 18, 19]]
>>
>>     // writeln(matrix[0].row); // 4
>>     // writeln(matrix[0].col); // 5
>> }
>>
>> P.S. I'm not exactly sure that these properties should work exactly as in my code :)
>
> try .length!0 and .length!1 or .shape[0] and .shape[1]

Nitpick: shape contains lengths and strides: .shape.lengths[0] and .shape.lengths[1]
June 15, 2015
On Monday, 15 June 2015 at 14:32:20 UTC, Ilya Yaroshenko wrote:
> I am note sure that we need something like `height`/row and `width`/col for nd-slices. This kind of names can be used after casting to the future `std.container.matrix`.

Here something similar implemented:
https://github.com/k3kaimu/carbon/blob/master/source/carbon/linear.d#L52-L56

Want in the future something like `rows' and `cols`:
https://github.com/k3kaimu/carbon/blob/master/source/carbon/linear.d#L156-L157

Waiting for `static foreach`. This design really helps a lot to implement multidimensional slices.
June 17, 2015
On Friday, 12 June 2015 at 01:55:15 UTC, Wyatt wrote:
> From the outset, my thought was to strictly define the set of (eight or so?) symbols for this.  If memory serves, it was right around the time Walter's rejected wholesale user-defined operators because of exactly the problem you mention. (Compounded by Unicode-- what the hell is "2 🐵 8" supposed to be!?)  I strongly suspect you don't need many simultaneous extra operators on a type to cover most cases.
>
> -Wyatt

I actually thought about it more, and D does have a bunch of binary operators that no ones uses. You can make all sorts of weird operators like +*, *~, +++, ---, *--, /++, ~~, ~-, -~, >>>--, &++, ^^+, in++, |-, %~, ect...

void main(string[] args){
	test a;
	test b;
	a +* b;
}
struct test{
	private struct testAlpha{
		test payload;
	}
	testAlpha opUnary(string s : "*")(){
		return testAlpha(this);
	}
	void opBinary(string op : "+")(test rhs){
		writeln("+");
	}
	void opBinary(string op : "+")(testAlpha rhs){
		writeln("+*");
	}
}
June 20, 2015
On Sunday, 14 June 2015 at 01:57:37 UTC, Steven Schveighoffer wrote:
> On 6/13/15 11:46 AM, Nick Sabalausky wrote:
>> On 06/08/2015 03:55 AM, ezneh wrote:
>>>
>>> - Create / read QR codes, maybe ? It seems we see more and more QR Codes
>>> here and there, so it could potentially be worth it
>>
>> I see them everywhere, but does anyone ever actually use them? Usually
>> it's just an obvious link to some company's marketing/advertising. It's
>> basically just like the old CueCat, if anyone remembers it:
>> <https://en.wikipedia.org/wiki/CueCat>
>>
>> Only time I've ever seen *anyone* actually using a QR code is when *I*
>> use a "display QR link for this page" FF plugin to send the webpage I'm
>> looking at to my phone.
>>
>> Maybe I'm just not seeing it, but I suspect QR is more someone that
>> companies *want* people to care about, rather than something anyone
>> actually uses.
>>
>
> A rather cool usage of QR code I saw was a sticker on a device that was a link to the PDF of the manual.

Then there's always this:

http://www.theverge.com/2015/6/19/8811425/heinz-ketchup-qr-code-porn-site-fundorado

Not the fault of the QR code of course, just an expired domain name, but still funny. :)