Go to Post IT'S LIKE FIRSTmas CAME EARLY THIS YEAR!!! THANKS VEXPro! - akoscielski3 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 25-03-2012, 20:04
theNerd's Avatar
theNerd theNerd is offline
Registered User
FRC #3329 (Cam Bots)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2110
Location: St. Marys
Posts: 51
theNerd is an unknown quantity at this point
Re: A work around for Linux users

Quote:
Originally Posted by frasnow View Post
Sure it's possible, but why give up powerful tools like autocomplete, visible javadoc, Go to Source, tabs of code, quick access to the FIRST libraries, etc.? Some old time programmers consider those a crutch, but they're actually just wasting time doing things the slow way. Yes, I know some people think the command line makes you look cool, and it's probably a good learning exercise to make this happen. I still ask, why?
Well, for the "old timer" Linux community command line isn't just something that makes one look cool. GUI tends to a). take up loads of processing power that can be spent in better places. b). restrict the user command wise c). make things more complicated then it really is. Terminal (or command prompt for you Windowers) has proven to be extremely powerful. Granted it does take knowledge to use - that is it doesn't hold the users hand, but instead requires the user to have knowledge of his or her system, terminal allows the user to hold way more power over his/her computer than any GUI system. (There are tons of sites you could go to for this argument). For example in Linux when I install a program I can tell the computer EXACTLY how I want it to be set up, download it without going through a web-browser, where it install it, what to include and discard, how I want it to interact with other programs, and much much more. I can do all of this simply by typing in a line that is <20 characters long and wait less than 1 minute to install (including very large programs). On the other hand with Windows you have to download an installer, excute the installer, click a million times, wait forever and you still have very little control over the process.

As far as the IDE, its all preference. For most Netbeans and Eclipse are great, and along many lines it is. However, for Linux, we have what's called VIM. This is a SUPERPOWERFUL text editor that gives the programmer tons and tons of options and so forth. Personally I prefer to work with VIM more than Netbeans because my hands never have to leave the keyboard, and what would take simply a click and a drag now takes two keystrokes. VIM does have scripts for autocomplete and so forth which can put it along with Netbeans.

Now, I am sure that there are tons of valid points for both sides. However, that is not the point of this thread. Therefore, I must politely ask if we can stick to the question which is not why would we do it but can we?. Thanks.
  #2   Spotlight this post!  
Unread 24-03-2012, 19:53
StevenB StevenB is offline
is having FRC withdrawal symptoms.
AKA: Steven Bell
no team
Team Role: College Student
 
Join Date: May 2005
Rookie Year: 2005
Location: Stanford, CA
Posts: 412
StevenB has a reputation beyond reputeStevenB has a reputation beyond reputeStevenB has a reputation beyond reputeStevenB has a reputation beyond reputeStevenB has a reputation beyond reputeStevenB has a reputation beyond reputeStevenB has a reputation beyond reputeStevenB has a reputation beyond reputeStevenB has a reputation beyond reputeStevenB has a reputation beyond reputeStevenB has a reputation beyond repute
Re: A work around for Linux users

I have to agree with frasnow - Netbeans isn't a bug we have to "work around"! That said, you asked a fair question, and it deserves an answer.

Yes, it's absolutely possible. Start by downloading the Netbeans modules for FRC and extracting them. Everything you need to know is in there, you just have to find it.

To compile the code, you probably need to use Ant. This is what Netbeans uses under the hood, and all of the build processes are already written as Ant scripts. The goldmine is in FRCNetbeansUpdateV3077/edu-wpi-first-squawksdk/netbeans/modules/edu-wpi-first-squawksdk/ant.

As you said, Netbeans just FTPs the code to the cRIO. Basic details are on FIRSTForge. There's an Ant script that does the deploy, too, so that might be even easier than using FTP by itself. But we weren't asking about easy, were we? We're in this to learn... so hack on!
__________________
Need a physics refresher? Want to know if that motor is big enough for your arm? A FIRST Encounter with Physics

2005-2007: Student | Team #1519, Mechanical Mayhem | Milford, NH
2008-2011: Mentor | Team #2359, RoboLobos | Edmond, OK
2014-??: Mentor | Looking for a team...
  #3   Spotlight this post!  
Unread 24-03-2012, 22:38
carrillo694's Avatar
carrillo694 carrillo694 is offline
Alex Carrillo
FRC #0694 (Stuypulse)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2009
Location: New York, NY
Posts: 66
carrillo694 is a jewel in the roughcarrillo694 is a jewel in the roughcarrillo694 is a jewel in the roughcarrillo694 is a jewel in the rough
Re: A work around for Linux users

Quote:
Originally Posted by frasnow View Post
Sure it's possible, but why give up powerful tools like autocomplete, visible javadoc, Go to Source, tabs of code, quick access to the FIRST libraries, etc.? Some old time programmers consider those a crutch, but they're actually just wasting time doing things the slow way. Yes, I know some people think the command line makes you look cool, and it's probably a good learning exercise to make this happen. I still ask, why?
theNerd did say he was using Vim -- plenty of plugins exist for autocompletion, going to source, etc., and tabbing comes built in

Vim can be configured to do all the NetBeans magic, and in a fraction of the time it takes to load NetBeans. But that doesn't mean it is easy, or that it makes development easier than NetBeans.

As StevenB notes, for Java we are already supplied with the build scripts (.xml files) -- we just have to use `ant` to properly. Incidentally, the build scripts are rather complicated. A mentor on my team created a visualization to describe the control flow (explained further here.) But you can also get a clue as to the fields from the .xml build scripts that are being invoked, and the order of their usage, by looking at NetBeans output when you Build your code. Brief statements, such as "flashapp:," "deploy:," etc. are printed to stdout as `ant` runs the .xml build scripts.

Also, to clarify, it's not the source code itself that you would FTP to the robot -- it's a .jar file generated from the `ant` build scripts that resides in the `suite` folder of your NetBeans project.
  #4   Spotlight this post!  
Unread 24-03-2012, 22:54
carrillo694's Avatar
carrillo694 carrillo694 is offline
Alex Carrillo
FRC #0694 (Stuypulse)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2009
Location: New York, NY
Posts: 66
carrillo694 is a jewel in the roughcarrillo694 is a jewel in the roughcarrillo694 is a jewel in the roughcarrillo694 is a jewel in the rough
Re: A work around for Linux users

Well, it seems this was 100 times easier than I thought it was!

For Java:
  1. Go to the root folder of your NetBeans project, where you should see a "build.xml"
  2. in the console, simply type `ant deploy` without the quotes

It's that easy! At least I think so; I need to try it in the lab on Monday. But it appears to be giving me the EXACT same output that the stdout console of NetBeans does after I tell it to Build the project!
  #5   Spotlight this post!  
Unread 25-03-2012, 20:09
theNerd's Avatar
theNerd theNerd is offline
Registered User
FRC #3329 (Cam Bots)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2110
Location: St. Marys
Posts: 51
theNerd is an unknown quantity at this point
Re: A work around for Linux users

Quote:
Originally Posted by carrillo694 View Post


in the console, simply type `ant deploy` without the quotes
Are you referring to "the console" as the terminal/command prompt (I'm assuming the task is being completed on a Linux/Unix based system)?
  #6   Spotlight this post!  
Unread 25-03-2012, 20:22
carrillo694's Avatar
carrillo694 carrillo694 is offline
Alex Carrillo
FRC #0694 (Stuypulse)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2009
Location: New York, NY
Posts: 66
carrillo694 is a jewel in the roughcarrillo694 is a jewel in the roughcarrillo694 is a jewel in the roughcarrillo694 is a jewel in the rough
Re: A work around for Linux users

Quote:
Originally Posted by theNerd View Post
Are you referring to "the console" as the terminal/command prompt (I'm assuming the task is being completed on a Linux/Unix based system)?
Yes.
  #7   Spotlight this post!  
Unread 25-03-2012, 20:07
theNerd's Avatar
theNerd theNerd is offline
Registered User
FRC #3329 (Cam Bots)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2110
Location: St. Marys
Posts: 51
theNerd is an unknown quantity at this point
Re: A work around for Linux users

Quote:
Originally Posted by carrillo694 View Post
theNerd did say he was using Vim -- plenty of plugins exist for autocompletion, going to source, etc., and tabbing comes built in
Could you send me the know how on how to do this? I've been trying to get my hands on how to do auto completion for any code (mainly c++ c and java), going to source, and possibly an equivalent to that error checking thing that Netbeans does.
  #8   Spotlight this post!  
Unread 25-03-2012, 20:19
carrillo694's Avatar
carrillo694 carrillo694 is offline
Alex Carrillo
FRC #0694 (Stuypulse)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2009
Location: New York, NY
Posts: 66
carrillo694 is a jewel in the roughcarrillo694 is a jewel in the roughcarrillo694 is a jewel in the roughcarrillo694 is a jewel in the rough
Re: A work around for Linux users

Quote:
Originally Posted by theNerd View Post
Could you send me the know how on how to do this? I've been trying to get my hands on how to do auto completion for any code (mainly c++ c and java), going to source, and possibly an equivalent to that error checking thing that Netbeans does.
For good autocompletion:
http://www.vim.org/scripts/script.php?script_id=2540

For going to source:
http://www.vim.org/scripts/script.php?script_id=273

For more fancy IDE-style features for Vim (but I have not gotten this to work well for me):
http://eclim.org/

I have not yet found a good preprocessor to find errors before they happen in C++/Java, although I do have one for Python called python.vim.
  #9   Spotlight this post!  
Unread 14-04-2012, 10:55
linuxboy linuxboy is offline
Registered User
AKA: Oliver Graff
FRC #3780
Team Role: Alumni
 
Join Date: Nov 2010
Rookie Year: 2009
Location: MI, USA
Posts: 217
linuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud of
Quote:
Originally Posted by techhelpbb View Post
I know my team does most of it's development in Eclipse with Java on Linux and Mac OSX. They tried to port the driver's station with some success. However, even if you create that code I'm not convinced it's entirely legal for competition use without specific approval.
I can guarentee it isn't legal for competition use, I'm not sure where the rule is, but, on the inspection checklist they check whether or not the voltage shows up in the driver station. If you are using something other than the driverstation, they will definitely have a problem with it, not to mention if the FTA has to troubleshoot your connection on the field. That said, I'm trying to recreate a Driver Station from looking at packet captures, and might test it at an offseason.
- Oliver
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 06:45.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi