These are chat archives for Devisualization/window

1st
Feb 2015
Stefan Koch
@UplinkCoder
Feb 01 2015 11:25
no worrys
could you tell me how to start using devisualistion ?
I am really not a GUI person :)
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 11:29
Keep in mind this is not a GUI library
Stefan Koch
@UplinkCoder
Feb 01 2015 11:29
what is it then ?
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 11:29
window + context creation
Stefan Koch
@UplinkCoder
Feb 01 2015 11:29
what's a context ?
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 11:30
OpenGL/DirectX
Stefan Koch
@UplinkCoder
Feb 01 2015 11:30
ahm could you elaborate ?
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 11:30
I'll summarise the parts
Stefan Koch
@UplinkCoder
Feb 01 2015 11:31
ok
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 11:31
there is nothing too special about window creation. Basically its divided into two parts, the actual window reference and the event loop
in WinAPI/GDI this is a raw window but you can utilise native GUI controls provided by GDI. Like a menu and a button
the event loop grabs events from the underlying system and makes them available to your code. Everything from on draw, to on key press
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 11:36
once an OpenGL context is created then you are free to basically render anything you want
Stefan Koch
@UplinkCoder
Feb 01 2015 11:38
so there is no convenience stuff, like check if the mouse if over the thing i just drew ?
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 11:38
you can get the mouse position in the underlying API. I've chosen to do mostly set and not get however
If you can't store it by the events, you are probably doing something that isn't 'common'
Stefan Koch
@UplinkCoder
Feb 01 2015 11:40
I want to visualize the process of compilation :)
but I have no GUI Foo whatsoever
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 11:41
just as an example. For Devisualization.gmaterial, in my wrapper over a Windowable. It auto adds an on resize event handler. Just so it can update and store the current window size. https://github.com/Devisualization/gmaterial/blob/master/source/opengl/devisualization/gmaterial/opengl/window.d#L190
Stefan Koch
@UplinkCoder
Feb 01 2015 11:43
the if {} else { bla } construct looks strage, do you have a reason to write it this way
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 11:43
which lines?
Stefan Koch
@UplinkCoder
Feb 01 2015 11:43
208
and 212
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 11:43
ohh checkSetup, it is a bit
but it does help my head a little bit
Stefan Koch
@UplinkCoder
Feb 01 2015 11:45
I'm not criticizing just wondering :D
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 11:45
thats ok, I think I ported that over from DOOGLE shrugs
Stefan Koch
@UplinkCoder
Feb 01 2015 11:46
well thanks for the Q&A
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 11:46
no problem
although, I think for your case. GUI might be a bit overkill. Perhaps web based instead?
Stefan Koch
@UplinkCoder
Feb 01 2015 11:48
The visualization will be pretty complex. I want kind of an interactive flow chart. So you can see branches an stuff
and where data is flowing
I have so much debug data in form of Control-and-Data-Fow-Graphs printed on paper ... I cannot open the door of my workroom anymore
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 11:51
interesting
Stefan Koch
@UplinkCoder
Feb 01 2015 11:53
I need something where I can zoom in and out. and where I can mark paths
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 11:54
have you seen graphiz?
Stefan Koch
@UplinkCoder
Feb 01 2015 11:54
yeah
it's not interactive
and it's too slow
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 11:54
oh
Stefan Koch
@UplinkCoder
Feb 01 2015 11:54
too hard to integrated with my stuff also
no D binding
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 11:56
I'm not too CSey so there is no chance for me to write something like it
or mathey for that matter
Stefan Koch
@UplinkCoder
Feb 01 2015 11:56
something like graphviz ?
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 11:56
but you will need at the very least some way to calculate curves
the curves are hard, because you want them away from other lines ext.
positioning the "blocks" or whatever they are called, are much easier
Stefan Koch
@UplinkCoder
Feb 01 2015 11:58
hmm that is good advice
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 11:59
writing a shader which draws some outline / highlight ext. is simple
Stefan Koch
@UplinkCoder
Feb 01 2015 11:59
I am a compiler guy, really. I have no clue of drawing and stuff
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 12:00
Capture.PNG
here's my current "shadows" for a papersheet
ignore the blue, thats just background color
Stefan Koch
@UplinkCoder
Feb 01 2015 12:02
the left shadow looks good to me
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 12:02
to me it looks awful, but better then nothing
Stefan Koch
@UplinkCoder
Feb 01 2015 12:03
can you make animations ?
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 12:03
they aren't hard
Stefan Koch
@UplinkCoder
Feb 01 2015 12:04
like a to boxes and a an arrow where the line of the arrow flows from one box to the other
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 12:04
just need some counter that resets at a set number, using onDraw as an iteration
one thing that might interest you is my LineGraph in Devisualization.Util https://github.com/Devisualization/util/blob/master/source/core/devisualization/util/core/linegraph.d
give it control points and it'll allow you to get the points based upon it using a step
so a control point might be a line destination or bezier curve points
Stefan Koch
@UplinkCoder
Feb 01 2015 12:07
and could I move a thrid box along that arrow ?
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 12:08
Devisualization.Scenegraph should allow that
I do recommend starting with just working out the curves, then moving to a rendering engine
most likely also some form of loader
Stefan Koch
@UplinkCoder
Feb 01 2015 12:10
oh boy.
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 12:10
thats before GUI's
Stefan Koch
@UplinkCoder
Feb 01 2015 12:11
I have enough on Hands with just debugging faulty codegen :worried:
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 12:11
once you know, what you want where it's simple GUI wise
I found something
Stefan Koch
@UplinkCoder
Feb 01 2015 12:15
I skimmed it
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 12:17
it looks like a reasonable port
Stefan Koch
@UplinkCoder
Feb 01 2015 12:20
thanks for the link
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 12:20
we really are digging things up from the grave Aren't we
one thing about that is, it is GPL
Stefan Koch
@UplinkCoder
Feb 01 2015 12:23
so what. it's only for debugging not to be included in any product
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 12:23
just restrictive
Stefan Koch
@UplinkCoder
Feb 01 2015 12:24
I think it is worth do pull this thing of the grave
I could do a reimplementation in D
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 12:25
I was thinking about cuves
curves*
you can calculate points upon a curve, if you have the start, middle and end
so atleast three
Stefan Koch
@UplinkCoder
Feb 01 2015 12:27
sure if the curve is monotonous
2 referenced in 1
Stefan Koch
@UplinkCoder
Feb 01 2015 12:33
thanks agian
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 12:33
I should really add that
Stefan Koch
@UplinkCoder
Feb 01 2015 12:34
the results look okay
suitable for an interactive graph-visualaisation
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 12:35
the control point calculation for bezier curves, or a previous library?
Stefan Koch
@UplinkCoder
Feb 01 2015 12:36
bezier curves
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 12:36
ahh
Stefan Koch
@UplinkCoder
Feb 01 2015 12:38
are you on the #d irc later ?
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 12:38
no I'm not
not to mention after midnight
Stefan Koch
@UplinkCoder
Feb 01 2015 12:39
?
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 12:39
I was referring to the later part
Stefan Koch
@UplinkCoder
Feb 01 2015 12:39
how late is it in your localtime ?
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 12:39
1:40am
Stefan Koch
@UplinkCoder
Feb 01 2015 12:40
it's 1PM here
so I am wide awake while your are propably half asleep :D
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 12:40
oh, I've been half a sleep all day
didn't get much sleep after a till 4am dev fun
Stefan Koch
@UplinkCoder
Feb 01 2015 12:41
your Duml was a nice thing, too.
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 12:41
it was yes, limited a bit too much
Stefan Koch
@UplinkCoder
Feb 01 2015 12:42
I am working on another D-parser
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 12:42
ah
Stefan Koch
@UplinkCoder
Feb 01 2015 12:42
it should be rather easy to build uml output from that
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 12:42
I would love to do compiler dev work, but assembly is just not my thing
Stefan Koch
@UplinkCoder
Feb 01 2015 12:43
it does not have to.
codegen ist just one last step
there is much more you can do completely without asm
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 12:43
you're correct. But it is the difference between me bothering and not
Stefan Koch
@UplinkCoder
Feb 01 2015 12:44
so if you can't built a complete compiler you aren't even gonna start ?
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 12:44
yup
Stefan Koch
@UplinkCoder
Feb 01 2015 12:45
well writing compiler is an incremental process
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 12:45
even a couple of years ago I couldn't write parsers in any form. Now I can
It's just not my time for that sort of thing
Stefan Koch
@UplinkCoder
Feb 01 2015 12:46
If need special compiler stuff, feel free to ask me :)
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 12:46
thanks
actually there is one thing
D-Programming-Language/dmd#3921
can you guess what needs another review?
Stefan Koch
@UplinkCoder
Feb 01 2015 12:51
hmm Interesting thing you did there
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 12:51
It's blocking the next version of Cmsed
since 2.066
Stefan Koch
@UplinkCoder
Feb 01 2015 12:52
I am not sure traits should work outside of the module
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 12:52
this is a known bug that I fixed
and yes it should work
Stefan Koch
@UplinkCoder
Feb 01 2015 12:52
the code looks okay to me
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 12:53
It's just annoying that its been this way for a while. Atleast I'm sick of web development
Stefan Koch
@UplinkCoder
Feb 01 2015 12:54
you could use an external parser
like libdparse and generate this list explicitly to work around compiler-limitations
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 12:54
maybe and not out of question since I've already got livereload
Stefan Koch
@UplinkCoder
Feb 01 2015 12:55
my AST strucutures are searchable
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 12:56
considering I
I've got a book nearly ready for publishing about CTFE it would be a bit ironical
Stefan Koch
@UplinkCoder
Feb 01 2015 12:57
you can just ask for allSymbols.filter!(symbol -> symbol.identifier.startWiths(""));
ast generation and ast querys work at ctfe, too.
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 12:57
I see
Stefan Koch
@UplinkCoder
Feb 01 2015 12:57
though it's very very slow
at CTFE it's nearly unusable
well I've got to get my PatternAnalyser finished :-/
cya
Richard Andrew Cattermole
@rikkimax
Feb 01 2015 13:00
And i'm adding in the bezier control points to Devisualization.Util's linegraph
cya