Re: Mir-algorithm tutorial?

2023-08-18 Thread Kyle Ingraham via Digitalmars-d-learn

On Friday, 18 August 2023 at 12:14:45 UTC, Ferhat Kurtulmuş wrote:
I think the main problem is the mir libraries won't get updates 
since Ilya recently said that he was not an open source 
developer anymore.


That’s unfortunate for D but hopefully beneficial for Ilya. Was 
it said somewhere publicly where I can read more on it?


Re: Mir-algorithm tutorial?

2023-08-18 Thread jmh530 via Digitalmars-d-learn

On Friday, 18 August 2023 at 12:14:45 UTC, Ferhat Kurtulmuş wrote:

On Friday, 18 August 2023 at 09:57:11 UTC, Ki Rill wrote:

[...]


Yes there isn't many guides around. Those are some of them.

https://tastyminerals.github.io/tasty-blog/dlang/2020/03/22/multidimensional_arrays_in_d.html

https://jackstouffer.com/blog/nd_slice.html

Also this piece of code was converted from python-numpy to 
d-mir.


https://github.com/libmir/dcv/blob/master/source/dcv/imgproc/threshold.d#L138

I converted many more from python for DCV.

I think the main problem is the mir libraries won't get updates 
since Ilya recently said that he was not an open source 
developer anymore.


He has said to me he will support them for some time, but won’t 
be adding new features, or something like that.




Re: Mir-algorithm tutorial?

2023-08-18 Thread jmh530 via Digitalmars-d-learn

On Friday, 18 August 2023 at 08:06:10 UTC, Ki Rill wrote:

On Friday, 18 August 2023 at 07:57:05 UTC, Ki Rill wrote:

On Friday, 18 August 2023 at 07:54:04 UTC, Ki Rill wrote:

Is there an up-to-date tutorial?

It's just painful that I cannot find anything helpful on this 
topic. The official mir-algorithm GitHub repo links to 
articles with old code that won't build if I copy-paste it. 
I'm left hunting down the changes and guessing how things 
should really work.


[API documentation](http://docs.algorithm.dlang.io) link about 
mir-algorithm from [dlang 
tour](https://tour.dlang.org/tour/mir/dub/mir-algorithm) does 
not work.


I opened the 
[issue](https://github.com/dlang-tour/core/issues/788).


I think the issue with dlang tour is unrelated to mir-algorithm.


Re: Adding to a global AliasSeq

2023-08-18 Thread Basile B. via Digitalmars-d-learn

On Tuesday, 15 August 2023 at 12:20:54 UTC, repr_man wrote:

On Tuesday, 15 August 2023 at 07:02:45 UTC, Basile B. wrote:
You can add a kind of tag with the mixin, that will allow to 
to test if the type supplied to `f` is well a Base implementor:
Firstly, thank you for your help.  This is probably the best 
solution.


Secondly, I feel very stupid for not having come up with this 
by myself.  Would you be willing to explain some of the thought 
process behind your solution?  Are there any key factors that I 
should look for in future template-related problems?  Or, if it 
just comes from experience and seeing this sort of thing 
repeatedly, that's fair, too.


Thanks, once again!


This is just classic D.

The way this works is tied to overload-sets resolution. You have 
two functions templates, same name, same count of parameters. The 
only way to make both exist in the set is "template constraint", 
one works given certain static conditions, the other not. Also, 
as it's time for the explanations, one thing about that system 
and that you should keep in mind is that it's costly, i.e "can 
cause major slowdown of compilation".


Re: Mir-algorithm tutorial?

2023-08-18 Thread Ferhat Kurtulmuş via Digitalmars-d-learn

On Friday, 18 August 2023 at 09:57:11 UTC, Ki Rill wrote:
On Friday, 18 August 2023 at 09:32:31 UTC, Ferhat Kurtulmuş 
wrote:
I believe the most recent docs for mir-algorithm is here 
http://mir-algorithm.libmir.org/


Thanks. Yes, that's the only thing.

However, it's not a good starting point for someone who just 
wants to get to know the library and play around...


Yes there isn't many guides around. Those are some of them.

https://tastyminerals.github.io/tasty-blog/dlang/2020/03/22/multidimensional_arrays_in_d.html

https://jackstouffer.com/blog/nd_slice.html

Also this piece of code was converted from python-numpy to d-mir.

https://github.com/libmir/dcv/blob/master/source/dcv/imgproc/threshold.d#L138

I converted many more from python for DCV.

I think the main problem is the mir libraries won't get updates 
since Ilya recently said that he was not an open source developer 
anymore.


Re: toLower

2023-08-18 Thread Nick Treleaven via Digitalmars-d-learn

On Thursday, 17 August 2023 at 09:28:05 UTC, Joel wrote:

.map!(std.uni.toLower)
.sort!"aonlineapp.d(8): Error: none of the overloads of template 
`std.algorithm.sorting.sort` are callable using argument types 
`!("a
/dlang/dmd/linux/bin64/../../src/phobos/std/algorithm/sorting.d(1925):Candidate is: `sort(alias less = "a < b", SwapStrategy ss = SwapStrategy.unstable, Range)(Range r)`

  with `less = "a

`map` generates a range `r` whose elements can be accessed by 
mutable reference only if the result of calling the map function 
(on a source element) is a mutable reference. But 
`std.uni.toLower` returns by value, and `sort` requires `r.front` 
to be a mutable reference.


I'll look at improving the docs.


Re: Mir-algorithm tutorial?

2023-08-18 Thread Ki Rill via Digitalmars-d-learn

On Friday, 18 August 2023 at 09:32:31 UTC, Ferhat Kurtulmuş wrote:
I believe the most recent docs for mir-algorithm is here 
http://mir-algorithm.libmir.org/


Thanks. Yes, that's the only thing.

However, it's not a good starting point for someone who just 
wants to get to know the library and play around...


Re: Mir-algorithm tutorial?

2023-08-18 Thread Ferhat Kurtulmuş via Digitalmars-d-learn

On Friday, 18 August 2023 at 07:54:04 UTC, Ki Rill wrote:

Is there an up-to-date tutorial?

It's just painful that I cannot find anything helpful on this 
topic. The official mir-algorithm GitHub repo links to articles 
with old code that won't build if I copy-paste it. I'm left 
hunting down the changes and guessing how things should really 
work.


I believe the most recent docs for mir-algorithm is here 
http://mir-algorithm.libmir.org/




Re: Mir-algorithm tutorial?

2023-08-18 Thread Ki Rill via Digitalmars-d-learn

On Friday, 18 August 2023 at 07:57:05 UTC, Ki Rill wrote:

On Friday, 18 August 2023 at 07:54:04 UTC, Ki Rill wrote:

Is there an up-to-date tutorial?

It's just painful that I cannot find anything helpful on this 
topic. The official mir-algorithm GitHub repo links to 
articles with old code that won't build if I copy-paste it. 
I'm left hunting down the changes and guessing how things 
should really work.


[API documentation](http://docs.algorithm.dlang.io) link about 
mir-algorithm from [dlang 
tour](https://tour.dlang.org/tour/mir/dub/mir-algorithm) does 
not work.


I opened the 
[issue](https://github.com/dlang-tour/core/issues/788).


Re: Mir-algorithm tutorial?

2023-08-18 Thread Ki Rill via Digitalmars-d-learn

On Friday, 18 August 2023 at 07:54:04 UTC, Ki Rill wrote:

Is there an up-to-date tutorial?

It's just painful that I cannot find anything helpful on this 
topic. The official mir-algorithm GitHub repo links to articles 
with old code that won't build if I copy-paste it. I'm left 
hunting down the changes and guessing how things should really 
work.


[API documentation](http://docs.algorithm.dlang.io) link about 
mir-algorithm from [dlang 
tour](https://tour.dlang.org/tour/mir/dub/mir-algorithm) does not 
work.


Mir-algorithm tutorial?

2023-08-18 Thread Ki Rill via Digitalmars-d-learn

Is there an up-to-date tutorial?

It's just painful that I cannot find anything helpful on this 
topic. The official mir-algorithm GitHub repo links to articles 
with old code that won't build if I copy-paste it. I'm left 
hunting down the changes and guessing how things should really 
work.