Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

Custom DSP Code 2 (comunity project)

For general discussion related FlowStone

Re: Custom DSP Code 2 (comunity project)

Postby Youlean » Fri Mar 20, 2015 3:56 pm

Thanks KG for huge effort to finish this project...
BTW, how it is going word editor for the code generator? Did you found solution for text coloring?
Youlean
 
Posts: 176
Joined: Mon Jun 09, 2014 2:49 pm

Re: Custom DSP Code 2 (comunity project)

Postby KG_is_back » Fri Mar 20, 2015 4:20 pm

Youlean wrote:Thanks KG for huge effort to finish this project...
BTW, how it is going word editor for the code generator? Did you found solution for text coloring?

unfortunately no progress with the code editor... If someone makes a text editor, that can display editable coloured text, I will happily add an output to the compiler to send expected data for the coloured text display. DSPcode2 will have to go without a code-editor until then.

I've almost finished adding functions to the compiler and I will post it here for beta testing, probably today.
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Custom DSP Code 2 (comunity project)

Postby Youlean » Fri Mar 20, 2015 5:36 pm

Well, I have made this Customizable Selector that I think that I can modify to draw each letter with different color. There is one limitation though, draw loop can not draw more than 1000 characters at the time, but I could chain multiple of them together... Only question mark would be the performance, but I think that it should be OK, because selector is quite fast. Actually, if you can break the code into a peaces like max(in,in1) to break to max be in first string line, than (in,in1) in second string line, this could be speed up the process even more, but if you can not do this, you could output float array with numbers that could determent characters colors.
Also, I am not sure if you would like to use green editor for the your project, because now is everything going towards Ruby and ASM...
Youlean
 
Posts: 176
Joined: Mon Jun 09, 2014 2:49 pm

Re: Custom DSP Code 2 (comunity project)

Postby KG_is_back » Fri Mar 20, 2015 11:43 pm

Here it is ;-) I need a lot of beta-testers!!!

Some features I've promised are still missing, but they may be added in future updates (namely reading/writing by pointer, inlineASM and declaring functions in the code itself)...

Hopefully there will not be too many bugs. BTW When compiler gives ruby errors, it's usually because you have a typo in the code.
Attachments
manual.zip
(61.05 KiB) Downloaded 905 times
DSPcode1.0.fsm
(35 KiB) Downloaded 910 times
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Custom DSP Code 2 (comunity project)

Postby RJHollins » Sat Mar 21, 2015 12:43 am

Might this start a mini course in DSP coding right here in FS forums ?? :o

Like a real beginner course :lol:

If I had, or knew ANY DSP coding ... I might be able to even test this DSP Code2 :cry:
RJHollins
 
Posts: 1571
Joined: Thu Mar 08, 2012 7:58 pm

Re: Custom DSP Code 2 (comunity project)

Postby tulamide » Sat Mar 21, 2015 8:58 am

That's your baby, I can tell from looking at the code. You've put so much effort in it! I like how you use regexp and how you got more and more experienced with Ruby during development - and that you finally tried to use indentation, which makes the code much more readable :mrgreen:

You're so right when it comes to debugging. When you say "the debugger", I ask "what debugger?" The watch method is just that. I can watch a value. I'm missing features like stopping execution at certain code lines, having a way to see a variable's content throughout execution and not just at a certain point in time via watch, step execution (for example during loops) and much more.
But to help you in debugging, here's a simple, yet effective tip:
'watch' uses the to_s method to show the object's content. This method is like any other method, so you can create your own and it will be used instead of the fallback from the underlying class. You could use this to get whatever you want to inspect when calling "watch compiler". Best of all is, that you can format the resulting string just as you prefer. Here's a simple example:
to_s.fsm
(481 Bytes) Downloaded 961 times


EDIT: You might also think about using a module instead of a class and then bind the module to the executing Ruby edit instance (the one that now calls compiler) using "extend modulename" (now all module methods are part only of that instance of the ruby edit class). But then you would also need to implement a reset-method that is called each time a new string is "inputted".
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Custom DSP Code 2 (comunity project)

Postby djbrynte » Sat Mar 21, 2015 3:54 pm

how about making some assembler modules?
djbrynte
 
Posts: 613
Joined: Mon Jun 22, 2009 10:51 am

Re: Custom DSP Code 2 (comunity project)

Postby KG_is_back » Sun Mar 22, 2015 12:45 am

tulamide wrote:That's your baby, I can tell from looking at the code. You've put so much effort in it! I like how you use regexp and how you got more and more experienced with Ruby during development - and that you finally tried to use indentation, which makes the code much more readable :mrgreen:

You're so right when it comes to debugging. When you say "the debugger", I ask "what debugger?" The watch method is just that. I can watch a value. I'm missing features like stopping execution at certain code lines, having a way to see a variable's content throughout execution and not just at a certain point in time via watch, step execution (for example during loops) and much more.
But to help you in debugging, here's a simple, yet effective tip:
'watch' uses the to_s method to show the object's content. This method is like any other method, so you can create your own and it will be used instead of the fallback from the underlying class. You could use this to get whatever you want to inspect when calling "watch compiler". Best of all is, that you can format the resulting string just as you prefer. Here's a simple example:
to_s.fsm


EDIT: You might also think about using a module instead of a class and then bind the module to the executing Ruby edit instance (the one that now calls compiler) using "extend modulename" (now all module methods are part only of that instance of the ruby edit class). But then you would also need to implement a reset-method that is called each time a new string is "inputted".



Yeah, I've learned a lot of things along the road (and discovered regexp, which basically saved me from making hideously large string comparison lines.). Most of the compiler uses (nested) arrays and strings, whuch should have a specific format, so most common error is the "no []method for nil" or "no + method for nil" when inputs are not in the correct form (like a value in array is missing or something). that also stops the execution, so the .to_s method would probably not execute. The only way I know about how to find those errors is to put a return with some default value at random places and localize the problem.
I'm not planning to do massive changes to the compiler anymore, except those updates mentioned above if I even get to those. I really want to take some time off, focus on music, school and my dog. This project took me literally days (day=24h of work time) - not just coding, but also inventing many of the concepts from a scratch (because it was usually easier than spending months on research of the topic). I've thought about it while eating breakfast, while driving car or while taking bath. Hell, I've even worked on it in my dreams (I mean I literally had dreams of me coding this thing... do you guys have that too or am I getin' nuts? ).
Now please guys, beta-test!! Meanwhile I'll be eating whipped cream with blackberries and recovering "code mana". I have another project in my mind :ugeek:
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Custom DSP Code 2 (comunity project)

Postby RJHollins » Sun Mar 22, 2015 12:57 am

(I mean I literally had dreams of me coding this thing... do you guys have that too or am I getin' nuts? ).


Maybe :roll: But I've experienced the same, and not just FS stuff.

There have been plenty of nights were 'sleeping' was more torturous than getting back up to go work or test an idea.
RJHollins
 
Posts: 1571
Joined: Thu Mar 08, 2012 7:58 pm

Re: Custom DSP Code 2 (comunity project)

Postby martinvicanek » Sun Mar 22, 2015 1:19 am

Me too! Maybe we're all nuts? :lol:
User avatar
martinvicanek
 
Posts: 1328
Joined: Sat Jun 22, 2013 8:28 pm

PreviousNext

Return to General

Who is online

Users browsing this forum: No registered users and 20 guests