muntoo wrote:Or Sidneys1 can run Ubuntu in VirtualBox, and test at his leisure, unless of course 2GB is too much for him.
Which I did, actually. Running two VMs, Ubuntu 10.10 and openSUSE (idk what version) Unfortunately, the Mono support on Ubuntu is inadequate to run Visual NXC
Ohhh-key-day.. I've barely done anything with V-NXC recently, quite frankly. Been far too busy with some other projects **cough*Portal-2*cough** (But don't worry, I'll be coming back to this project at some point, I'm merely taking a break atm)
Anyways, I've been contemplating how to have V-NXC handle blocks, and I think I'm going to go with a pretty straightforward XML syntax. This is pretty rough, and it's just an idea, no actual working code yet, but tell me what you think, what extra features/tags it should have, and etcetera:
<?xml version="1.0"?>
<codeElement title="Do-While">
<category>Loops</category>
<color>1BD8F5</color>
<isLoop>True</isLoop>
<code>
[comment]// Loops code 'do' until 'while' logic is false.
[comment]// 'Do' is run once initially without checking 'while'.
do
{
[loop]
}
while([logic])
</code>
<!--
The [comment], [loop], and [logic] 'tags' are so Visual NXC knows where
to put blocks within blocks ([loop]), logic code (ex: x == 1) ([logic]), and comments in the
output NXC code ([comment]) (those are there so that the user can disable
NXC comments in the output files)
-->
</codeElement>
Again, this is all rough ideas. I want to nail this down before I write the code to turn the XML into actual blocks, though.
<category>Loops</category>
you could have <category name="Loops">
<codeElement title="Do-While">
...
</codeElement>
<codeElement title="For">
...
</codeElement>
</category>
Ok so I wrote a quick mock-up app to see what the possibilities are for the XML... And it looks like the best we're going to get is a little less user-friendly than I expected:
But I can write a small applet inside Visual NXC that will handle making these files for us.. All we'd have to do is tell it what to make and it will handle it automatically.
I would have preferred that, but what I posted is what .NET will allow. I could use a string instead of a string array, but then it's harder for me to process.
muntoo wrote:I don't think this will help, but could you use the <pre> tag?
Actually, I'm just going to have it detect indentation automatically via the braces { }... Saves me trouble worring about people formatting their XML right.
Ugh, well, sorry there hasn't been much action here lately.. I haven't had much time to work on this. I've got a ton of other projects (specifically rolling out Batch Image Processor v2 and an entry into the ThinkingWithPortals Summer Mapping Initiative contest) and some distractions (SUMMER VACATION, Minecraft, Far Cry 2, Prince of Persia, CoD: WaW, Portal 2, and etc) that are leaving me with little time to work on this worthy project. I have to go to work for the summer pretty soon, and while I will have a little free time (a few hours a day) it's unlikely that I'll spend much of that time (if any) working on V-NXC. However, once I get the (vastly improved) second version of my Batch Image Processor out and stable, I'll be able to make V-NXC my primary programming focus. (other than the ever-present priority of FilmFree)
Have a nice day,
~Sidneys1
P.S. I thought I'd add, if anyone here is interested in being on the Visual NXC developer team (currently: me, myself, and I) feel free to PM me. Be ready to present some example XML (to help me write up the V-NXC block/code file format) or C# to prove your worth. (Or maybe even some VB if you're really good at it.. I hate VB but if you're as good in it as I am in C# then I'll welcome you in)
Sidney,
it's a big chunk of work as a thought still from the start, and not to critizise your approach, but I had 2 or 3 or 4 ideas about your project:
1.) visual Basic or Delphi or Borland C++ (which I actually know better) don't generate code that calculates or writes any useful routines - they generate just a user interface with windows, buttons, canvas, menus, edit boxes. What happens "internally" if a user pushs a button must still be written in "legal handwritten C or Pascal code" - each variable, each loop, each if, is +, *, / -, ^, % or what ever.
2.) What you try to do is much more than this: you try to put every keyword, variable, more-dim. array, expression, macro, modifier, device, into a graphic symbol.
3.) NXC has lots of keywords and symbols and devices and what else with lots of adjustments - you know that from NXT-G symbols with it's adjustment-, input-, and outbut-submenus.
4.) If you try to put all this (the programming language itself, not just the user panel and interface) into grafic symbols you will end up inevitably at a grafic language which more or less looks like or similar as NXT-G or Robolab or Labview, except the fantastic benefit that you will have an additional written code in NXC syntax.
I really don't want to discourage you or call your challenge into any question, but given the fact that it is an almost unmanageable chunck of keywords, definitions, predefined expressions and macros (look at NXCdefs.h) which have to be processed into a graphic symbol it's worth while a big team of specialists who care about it's implementation and redeployment and it's hard to see in how many years this project will ever be finished...
I personally almost would have resigned since quite from the start, but I honestly hope this could be a further incentive for all for all involved people to bring this actually magnificent project to a glorious final... :)