Some crazy ideas from a high level perspective
_d0s_ via Digitalmars-d
digitalmars-d at puremagic.com
Tue Mar 22 07:08:55 PDT 2016
As i'm a student and i should be busy with writing some papers
... i'm spending waaaaaaay 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 :)
More information about the Digitalmars-d
mailing list