Page 3 of 12
Re: Custom DSP Code 2 (comunity project)
Posted: Fri Feb 27, 2015 7:04 am
by Perfect Human Interface
It would be frustrating to have a bug in a complex code and not be certain whether the bug was yours or the compiler's. Nonetheless, keep up the good work.
An editor doesn't seem like it would be the hardest thing about all of this. I'd think if you can interpret the code you could interpret what color each chunk of characters should be.
Re: Custom DSP Code 2 (comunity project)
Posted: Fri Feb 27, 2015 3:27 pm
by KG_is_back
Perfect Human Interface wrote:It would be frustrating to have a bug in a complex code and not be certain whether the bug was yours or the compiler's. Nonetheless, keep up the good work.An editor doesn't seem like it would be the hardest thing about all of this. I'd think if you can interpret the code you could interpret what color each chunk of characters should be.
Well, function pack makers will have to make sure their function pack is bugless, and give a warning if the function(s) in their pack may potentially crash under certain circumstances. It's a price of the modularity of this project.
Also, While loops may also crash the code if infinite loop occurs. It's inevitable - some features simply are natural "crashers" in any programing language.
As for the editor, marking parts of text to be colored is the easy part on the compiler code. What I find to be the issue is to display the colored code on screen and make it editable.
Re: Custom DSP Code 2 (comunity project)
Posted: Fri Feb 27, 2015 5:39 pm
by Youlean
Great work! Thanks for sharing that!
Re: Custom DSP Code 2 (comunity project)
Posted: Sat Feb 28, 2015 12:44 am
by Perfect Human Interface
KG_is_back wrote:As for the editor, marking parts of text to be colored is the easy part on the compiler code. What I find to be the issue is to display the colored code on screen and make it editable.
Well, easy I guess would be just using the edit box and then feeding the text into another display box that draws all the colored text. Obviously a bit disjointed and not exactly what we're looking for.

Is all this font drawing and editing stuff built-in to Windows or something? Seems a DLL component would be the way to go. I can't imagine people just write their own text editors for every piece of software made.
Re: Custom DSP Code 2 (comunity project)
Posted: Sat Feb 28, 2015 1:57 am
by KG_is_back
OK guys, here's a alpha version. It currently only supports limited features - standard mathematic/logic/comparison operators and a small basic function pack: abs(a),min(a,b),max(a,b),rndint(a) and conversion operators ItoF(a),FtoI(a)
if/else/loop/stage/hop/while/arrays/pointer stuff is not added yet, but the hardest stuff is done. I will keep working and add all features that I've promised.
Even now you can see, the DSPcode2 produces shorter and faster code than DSPcode
Perfect Human Interface wrote:Well, easy I guess would be just using the edit box and then feeding the text into another display box that draws all the colored text. Obviously a bit disjointed and not exactly what we're looking for. Is all this font drawing and editing stuff built-in to Windows or something? Seems a DLL component would be the way to go. I can't imagine people just write their own text editors for every piece of software made.
Yeah... hopefully someone will come up with a solution.
Re: Custom DSP Code 2 (comunity project)
Posted: Sat Feb 28, 2015 2:07 am
by martinvicanek
Incredible.

Re: Custom DSP Code 2 (comunity project)
Posted: Sat Feb 28, 2015 6:02 am
by tulamide
That's fantastic, KG! You've already done hard work, I hope people will appreciate it. I do.

KG_is_back wrote:Yeah... hopefully someone will come up with a solution.
This wasn't of help for your own editor?
Re: Custom DSP Code 2 (comunity project)
Posted: Sat Feb 28, 2015 6:20 am
by RJHollins
Dl'd it to check it out ... there must be code in this that can't run on FS 3.0.4
My interest was more curiosity.
Still ... I will follow this thread with interest .... maybe I can learn something

Re: Custom DSP Code 2 (comunity project)
Posted: Sat Feb 28, 2015 11:45 am
by Exo
Great KG

I will test this properly tomorrow and give any feedback then.
Re: Custom DSP Code 2 (comunity project)
Posted: Sun Mar 01, 2015 5:31 pm
by Exo
This is impressive stuff KG thanks.
I have been mostly looking at the function part so I can start writing extra functions, but I want to understand a few things.
Code: Select all
#round to int
func=ASMfunction.new("rndint")
code="ret=[]
ret[0]=blueprintVar('',@name,inputs)
ret[1]=''
ret[2]=blueprintCode(
'cvtps2dq xmm0,arg0;
cvtdq2ps xmm0,xmm0;',@name)
ret[3]=[5,1]
ret[4]=xmm(0)
return ret"
func.addFunction(["v","c","r"],code,[5,1])
@functions["rndint"]=func
Why is ret[1] set to any empty char/string? Can that be anything else? what does it relate to?
I am assuming the first input for "blueprintVar()" is meant for const variables only?
What is ret[3] relating to? I cannot make sense of why it is set to [5,1]? All the functions use it so it looks redundant.
What exactly is the purpose of ret[4]=xmm(0)? again looks redundant but I don't fully understand how it is being used.
Again thanks this is good work
