Idea: Visual NXC

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
Post Reply
sidneys1
Posts: 141
Joined: 01 Oct 2010, 14:38
Location: Pennsylvania - The United States of America
Contact:

Idea: Visual NXC

Post by sidneys1 »

Hey all,

First off, I'm not even sure if I can do this. My skill at programming an IDE are as of yet untested. BUT, if I could manage to create a "Visual NXC" (aka, a program like NXT-G or Enchanted that outputs *.nxc code files), what kind of features would you want to see?

Right now the concept is for less of an IDE and more of a supplement to BricxCC, somewhat like the Class Designer in MSVS... It'd let you lay out the structure of your programs far more easily than in a textual IDE.

Again, no promises.. I'm just trying to see what the community would want, while I do some research into whether this is actually possible or not.

Have a nice day,
~Sidneys1
My Mindstorms website: http://sidneys1.com
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: Idea: Visual NXC

Post by mattallen37 »

I personally don't support the idea. NXT-G is for those who want graphics, and there are already 2 versions of that; retail and education. There is also (as you mentioned) Enchanted, but also robolab. That is 3-4 graphical computer programs that are specifically for programming the NXT. Do we really need another? I like the idea of outputting/compiling as NXC code, but is it really necessary?

This idea reminds me a bit of RCX Code. Despite the terrible inabilities of it, it would save the files as a C type file. You would build with blocks, and in the background, it would be building in C (or something like C, I haven't looked at it much). When you would go to download it, I guess that is when it would compile and download the "C" program.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
h-g-t
Posts: 552
Joined: 07 Jan 2011, 08:59
Location: Albania

Re: Idea: Visual NXC

Post by h-g-t »

I see so many questions on this and other forums on the same themes, time and time again.

I think you would get far more support if you avoided starting yet another language and instead set up a library of basic NXC codes or macros.

Segments such as accessing the various sensors, opening files, etc which could be incorporated into user's programs would be ideal and save more time than having to keep up with another programming environment.

This could be expanded all the time and would serve as a repository for reference to avoid the continual re-invention of the computing wheel.
Last edited by h-g-t on 27 Mar 2011, 23:49, edited 1 time in total.
A sophistical rhetorician, inebriated with the exuberance of his own verbosity, and gifted with an egotistical imagination that can at all times command an interminable and inconsistent series of arguments to malign an opponent and to glorify himself.
sidneys1
Posts: 141
Joined: 01 Oct 2010, 14:38
Location: Pennsylvania - The United States of America
Contact:

Re: Idea: Visual NXC

Post by sidneys1 »

mattallen37 wrote:I personally don't support the idea. NXT-G is for those who want graphics, and there are already 2 versions of that; retail and education. There is also (as you mentioned) Enchanted, but also robolab. That is 3-4 graphical computer programs that are specifically for programming the NXT. Do we really need another? I like the idea of outputting/compiling as NXC code, but is it really necessary?

This idea reminds me a bit of RCX Code. Despite the terrible inabilities of it, it would save the files as a C type file. You would build with blocks, and in the background, it would be building in C (or something like C, I haven't looked at it much). When you would go to download it, I guess that is when it would compile and download the "C" program.
Just to clarify, for all intents and purposes, NXT-G Retail and Edu are identical - the only difference that I am aware of is the built in "Robot Center" building instructions. RoboLab is ancient, and pretty pricey ($100USD+ for a single license, according to Lego Edu). Enchanted, while amazing, is only usable by those willing to switch over to LeJOS, preventing BricxCC and NXT-G use. This does not leave 2-4 graphical IDE's, but one: NXT-G. And even that isn't free. This would give graphical programmers an opportunity to have a free IDE for use with the standard Lego FW.
h-g-t wrote:I you see so many questions on this and other forums on the same themes, time and time again.

I think you would get far more support if you avoided starting yet another language and instead set up a library of basic NXC codes or macros.

Segments such as accessing the various sensors, opening files, etc which could be incorporated into user's programs would be ideal and save more time than having to keep up with another programming environment.

This could be expanded all the time and would serve as a repository for reference to avoid the continual re-invention of the computing wheel.
An excellent point, but it's not a language.. It's merely a re-representation of NXC. It would essentially be a 'library' of basic NXC codes and macros: a single 'block' could represent dozens of lines of code, and it would organize it neatly, then present the user with the *.NXC files for further manual code additions.

However, I am interested in what you say about an NXC library to wrap common NXC routines. Could you elaborate more on what you would want to see in a package like that?

Have a nice day,
~Sidneys1
My Mindstorms website: http://sidneys1.com
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: Idea: Visual NXC

Post by mattallen37 »

NXT-G may cost money, but it is included in every NXT retail set. That means that probably at least 99% of NXT owners have at least one NXT-G CD. The other 1% (or whatever) obviously got the set second hand, or only have an edu set. What about the many people (like most of us here) that don't even use NXT-G? I have probably 3 or 4 NXT-G CDs, and I only ever run NXT-G on one computer, and at most 1 time a month (to test things). I doubt there is a single NXT owner, that wishes to have NXT-G, and has no way of accessing it. If there is anyone, they should be able to learn another language for programming. If Lego only supplied a text based programming language, imagine how many more people would know how to program using something besides blocks. I like the concept of your idea, but I wouldn't invest much into something like that. If someone knows enough to see the advantage of a language like you suggest, they should know enough to program in NXC. If the idea of your suggestion isn't to allow modification of the NXC code with something like BCC, then what is wrong with NXT-G? I like you idea, I just think it's pointless.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
muntoo
Posts: 834
Joined: 01 Oct 2010, 02:54
Location: Your Worst Nightmare
Contact:

Re: Idea: Visual NXC

Post by muntoo »

Yeah, it's a nice idea, but I believe the "cost" of undertaking such a project heavily outweighs any benefits to the community. That said, it'll be a great "exercise" for you to develop your programming skillz even further.

It would be a nice transition from graphical programming with NXT-G to NXC for many, though. One I can think of that might like this is nxtreme, who wishes to learn NXC sometime in the near future, but still prefers NXT-G due to the "learning curve" NXC has. (Not much of a "learning curve" if you've programmed in C before, though.)

If I sound too formal, blame it on my reading of Book 3 of LOTR, once again.

-----

P.S. What would "Not Entirely Unlike NXC" be?
Image

Commit to LEGO Mindstorms Robotics Stack Exchange:
bit.ly/MindstormsSE


Commit to LEGO Stack Exchange: bit.ly/Area51LEGOcommit
nxtreme
Posts: 246
Joined: 29 Sep 2010, 03:53
Location: 192.168.1.2

Re: Idea: Visual NXC

Post by nxtreme »

muntoo wrote:Yeah, it's a nice idea, but I believe the "cost" of undertaking such a project heavily outweighs any benefits to the community. That said, it'll be a great "exercise" for you to develop your programming skillz even further.
I very heavily agree with muntoo here. While I think that it would be used somewhat, the "cost" might be too high. You probably won't have a huge user group, maybe 5-10% of NXT users max, and developing something like this would take months, if not years, if you wanted it to be rock solid. I'm not trying to say it's a bad idea, quite on the contrary in fact, but just that it's probably something that would never "catch" if you get my point.

However, I like the idea Matt has. I think it'd fit in to your plans of helping newer (or less experienced) users get started with something more advanced like NXC. Creating a basic library of NXC code macros (or "blocks") would help new users to jump in to NXC and start creating working programs faster, then find out what's going on behind the scenes later on (just like Arduino).
muntoo wrote:It would be a nice transition from graphical programming with NXT-G to NXC for many, though. One I can think of that might like this is nxtreme, who wishes to learn NXC sometime in the near future, but still prefers NXT-G due to the "learning curve" NXC has. (Not much of a "learning curve" if you've programmed in C before, though.)
Thanks for using me as an example :P. The main reason I haven't jumped into the NXC boat yet is not the learning curve, but the fact that I don't use my NXT enough to warrant the week or so it'd take to get the basics down pat. The one "problem" I have with NXC is that commands aren't quite as intuitive as something like Picaxe Basic.

I know that this is C (or Not eXactly C :)) so commands aren't 'sposed to be spelled out for you like with Basic, but it'd take me a couple days to learn what the basic commands are, whereas when I started learning Picaxe Basic, it was more of a "just jump in" experience. And I usually spend about an hour a week actually programming (for my NXT, about two or three times that for Picaxe) so for now, NXC isn't a high priority.
One King to rule them all, One King to find them,
One King to bring them all and in the darkness bind them
On Earth where Shadows lie.
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: Idea: Visual NXC

Post by mattallen37 »

nxtreme wrote:...Creating a basic library of NXC code macros (or "blocks") would help new users to jump in to NXC and start creating working programs faster, then find out what's going on behind the scenes later on (just like Arduino)...

The one "problem" I have with NXC is that commands aren't quite as intuitive as something like Picaxe Basic.

I know that this is C (or Not eXactly C :)) so commands aren't 'sposed to be spelled out for you like with Basic, but it'd take me a couple days to learn what the basic commands are, whereas when I started learning Picaxe Basic, it was more of a "just jump in" experience. And I usually spend about an hour a week actually programming (for my NXT, about two or three times that for Picaxe) so for now, NXC isn't a high priority.
Actually, NXC commands are very straight forward for the most part. Just as easy as Arduino. They are different of course, as you don't write the IO pins high and low or read them, directly (different set of commands). It is very much the same concepts though.

For me, I would only normally program with NXT-G a couple hours a week. Since I switched to NXC, the possibilities are so endless, and it is so headache/glitch-free, that I program more like 5-20 (sometimes over 40) hours a week (depending on what I'm working on of course).
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
muntoo
Posts: 834
Joined: 01 Oct 2010, 02:54
Location: Your Worst Nightmare
Contact:

Re: Idea: Visual NXC

Post by muntoo »

nxtreme wrote:You probably won't have a huge user group, maybe 5-10% of NXT users max
Err... no. In my opinion, 2K+ users would be "large".

Of course, I think it's more like 50% potential NXC users finding Visual NXC useful. Existing "experienced" NXC users, maybe around 1%.

Of course, those are just my guesses. But many a great tool's development has been hindered by idiots like me. :) (No! I did not go back in time and kill the inventors of the time machine, R4D2, or the Mindsensors wormhole generator!)
Image

Commit to LEGO Mindstorms Robotics Stack Exchange:
bit.ly/MindstormsSE


Commit to LEGO Stack Exchange: bit.ly/Area51LEGOcommit
sidneys1
Posts: 141
Joined: 01 Oct 2010, 14:38
Location: Pennsylvania - The United States of America
Contact:

Re: Idea: Visual NXC

Post by sidneys1 »

muntoo wrote:Yeah, it's a nice idea, but I believe the "cost" of undertaking such a project heavily outweighs any benefits to the community. That said, it'll be a great "exercise" for you to develop your programming skillz even further.

It would be a nice transition from graphical programming with NXT-G to NXC for many, though. One I can think of that might like this is nxtreme, who wishes to learn NXC sometime in the near future, but still prefers NXT-G due to the "learning curve" NXC has. (Not much of a "learning curve" if you've programmed in C before, though.)

If I sound too formal, blame it on my reading of Book 3 of LOTR, once again.

-----

P.S. What would "Not Entirely Unlike NXC" be?
Exactly my point - it would be an excellent transitional language. It would allow users to 'build' their program graphically, but to compile they still need to look at the 'code behind the blocks'. As for being formal, Muntoo, I just started re-reading Charles Dicken's "Our Mutual Friend", so pardon my Dickensian english ;)

I suppose "Not Entirely Unlike NXC" would be "NEU-NXC", (new NXC) or "Not Entirely NXC": "NotE NXC" (note as in shorthand) Those could be technical names... I still prefer "Visual NXC" as the face-name; more descriptive and asthetic.

Also, I'm a faster programmer than you may suppose - I already have most of the UI done for the proof-of-concept I'm making ;) I do not doubt that my skills are more than adequate; I spend most my time coding a free substitute for Adobe AfterEffects. It's merely my patience that's in question.

I'm also liking this NXC macro/wrapper library idea... I may look into it :) I wonder if NXC compiles code that isn't actually called.. If not, I could create a tool that automatically generates a wrapper library for you, using only the the features/macros you specifically request.

Have a nice day,
~Sidneys1

P.S. Pardon my spelling, the computer I'm using doesn't have IEspell :(
My Mindstorms website: http://sidneys1.com
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests