Some crazy ideas from a high level perspective

2016-03-22 Thread _d0s_ via Digitalmars-d
As i'm a student and i should be busy with writing some papers 
... i'm spending waaay to much time derping around having 
crazy ideas. since they are forgotten quickly most of the time, i 
thought i share them with you.


this time: what D is missing for me

i'm coming from the field of computer vision and computer 
graphics. algorithms used in that field often utilize some heavy 
maths. like solving some heavy least squares equation systems, or 
graph algorithms.
because of that Matlab is often our tool of choice for quickly 
testing algorithms. After everything is running we translate 
things to c++.


Idea1: a general interface to describe n-dimensional matrices
i think the D syntax has the power to manipulate matrixes in a 
very expressive way. a great addition to the standard library 
would be to define a basic interface to work with matrices.


mat2d = DenseMatrix!float(5,5); // create a 5x5 float matrix
mat2d.zeros(); // initialize with zeros
mat2d[0..$, 2:3] = 1; // slice the matrix and fill the slice with 
ones


Specialized matrix types would then define the underlying memory 
layout and capabilities of a matrix. Like a matrix could be dense 
or sparse ( stored in the yale format or whatever other format ). 
depending on the needed operations the programmer would choose a 
fitting matrix implementation.


This would not only be useful to solve math problems. But also to 
define for example adjacency matrices for graphs, or to store 
images.


Idea2: Matrix Solvers
Have some base algorithms to solve linear and quadtratic systems 
on top of those matrices. (LU, QR, ...)


Idea3: Visualization
Imho D is lacking a good UI toolkit. I again like here the 
simplicity of matlab that lets me just pop up a window, and show 
a simple diagram or picture. Often its not necessary to create a 
sophisticated UI, but having a visual representation of data 
often helps with debugging and understanding of algorithms.


Some modern applications like Avast, Steam or Spotify create 
their user interfaces based on web technologies. Recently i've 
seen that somebody threw together a demo with libcef, which lets 
you use the chrome embedded framework, to basically have chrome 
in a little window.

http://dblog.aldacron.net/2015/01/derelictcef-binding-to-chromium-embedded-framework/
http://imgur.com/pYlP3dE

maybe that would be suitable to throw together a simple image 
viewer / diagram viewer. Based on some opensource web chart 
library ( like d3.js or whatever )




until now i didnt have yet the time and/or skill to realize those 
still very rough ideas. i hope you can give me some suggestions 
...

... on what does already exist maybe in a similar form
... on what you would love to see to be realized of those ideas
... on why my ideas are garbage :'D destory pls

cheers :)


Re: Some crazy ideas from a high level perspective

2016-03-22 Thread _d0s_ via Digitalmars-d

thanks for all the opinions!


Perhaps this is what you're looking for?
https://dlang.org/phobos/std_experimental_ndslice.html


that would be a good starting point for a matrix library


You would be interested in
https://github.com/DlangScience


They have cblas for matrix multiplication and scid.linalg has 
an interface to LAPACK (the > most common way to do LU/QR/etc). 
I don't have experience with these, but I think they were 
created before std.experimental.ndslice, so I'm not sure how 
well they inter-operate. I > believe there is work being done 
on this, but I'm sure John Colvin et al would appreciate > any 
help you would be able to provide.


thx, havent found that before :)
i haven't used lapack/blas before, i will have a look at it. i'm 
using mostly Eigen for my projects.



If all you need are plotting tools, these would be useful
https://code.dlang.org/packages/ggplotd
https://code.dlang.org/packages/plotd

that would be somewhat close already to matlab like plotting

Sigh I do wish the author of gl3n had given permission for 
relicense for Phobos. Would do what you want.


i have used gl3n before, it's not really what i'm looking for. 
gl3n afaik only provides up to 4x4 dense matrices, with the focus 
on being a GLM (http://glm.g-truc.net/0.9.7/index.html) 
replacement for the use with Opengl. correct me if i'm wrong.



Cairo and Kheops look interesting. I have used Openvg before. 
Some time ago i've created a little Openvg D wrapper for shiva vg 
( https://code.dlang.org/packages/dopenvg ) . From a diagram or 
image viewer i'd also expect some level of interactivity. That's 
why i thought a web app with CEF would be suitable


do you have experience with creating web apps for desktop, or 
reasons why i'd definitively want to use a native framework for 
such a project? .. or for UI in general


Re: Is C++ trying to be like D?

2016-03-23 Thread _d0s_ via Digitalmars-d

On Saturday, 19 March 2016 at 13:46:14 UTC, Anonymouse wrote:

On Saturday, 19 March 2016 at 13:23:55 UTC, Bauss wrote:
Looking at C++14 and the proposed features for C++17 - 
https://en.wikipedia.org/wiki/C%2B%2B17


It looks a lot like C++ is trying to become similar to D.

I believe that shows D's design pattern has been superior to 
C++'s from the start and there's no way C++ will ever be able 
to implement the same features of D in the same smooth and 
"user-friendly" behavior.


What's your opinion?


A much more common take on it is "why use D at all now that C++ 
is getting similar features", ignoring convenience.


(I don't subscribe to it.)


Just that awesome new features are planned, doesn't mean they get 
implemented. On of mine, and i think also of many other cpp 
programmsters, highly anticipated features are C++ Modules. We 
are waiting years already to get to a usable solution ... yet 
nothing has integrated into the cpp standard :3


D on the other hand has all those awesome features, and D has 
them now. Sometimes it's a little rough on the edges, but in 
general it's really great *.* I hope D will start to grow faster. 
And seeing it currently at Tiobe index rank 20 makes me hope that 
it will be way more widespread in future.


<3 D ftw xD



Re: Some crazy ideas from a high level perspective

2016-03-24 Thread _d0s_ via Digitalmars-d

just found this ...
http://forum.dlang.org/thread/nilhvnqbsgqhxdshp...@forum.dlang.org
maybe that will be what i'm looking for :)

as for the web ui's ...
the performance is of course not perfect as in a native app. but 
i think apps like atom.io, visual studio code or discord show 
that it is perfectly possible to create apps with really good 
look, feel not too bad performance :)