Go to Post It's a bird! It's a plane! It's SUPER-TUBE! - dlavery [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
  #46   Spotlight this post!  
Unread 04-04-2010, 22:42
Radical Pi Radical Pi is offline
Putting the Jumper in the Bumper
AKA: Ian Thompson
FRC #0639 (Code Red Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: New York
Posts: 655
Radical Pi has a spectacular aura aboutRadical Pi has a spectacular aura aboutRadical Pi has a spectacular aura about
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA

Quick question: is the LV RT a bytecode based system (like Java) or is it just a run-time linked library?
__________________

"To have no errors would be life without meaning. No strugle, no joy"
"A network is only as strong as it's weakest linksys"
  #47   Spotlight this post!  
Unread 04-04-2010, 22:46
Robototes2412's Avatar
Robototes2412 Robototes2412 is offline
1 * 4 != 14
FRC #2412 (Robototes)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2007
Location: Bellevue
Posts: 312
Robototes2412 is on a distinguished road
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA

From what I've heard, its a bytecode system, but its is just a hair slower than java, and only enough to make java faster for the camera. The Java camera code is actually written in C++, which i raw machine code, being the fastest.

Last edited by Robototes2412 : 04-04-2010 at 22:48. Reason: I cannot type today, i was fixing the 14 spelling/punctuation errors
  #48   Spotlight this post!  
Unread 04-04-2010, 22:51
wireties's Avatar
wireties wireties is offline
Principal Engineer
AKA: Keith Buchanan
FRC #1296 (Full Metal Jackets)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Rockwall, TX
Posts: 1,170
wireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond repute
Send a message via AIM to wireties
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA

Quote:
Originally Posted by Greg McKaskle View Post
I agree with your overall post...
1990 - that long ago - now I feel old! Anyways, LabView is a great product and NI a great company. How efficient are the resulting binaries compared to code generated by commercial and open source compilers? NI does many things well but can it be that their compiler tech is way ahead of companies and open source contributors whose sole focus is compilers? Maybe so...

Why would one language be better in a multi-tasking environment than another? The VxWorks kernel and its native API are in C. Some languages (like Ada) have multi-tasking elements built into the language. I can see how they are more convenient. But you can't hide or abstract things w/o it being slower and/or less capable. Even the compiled versions of LabView must access the VxWorks API and the system call interface to interact with the OS. In any language some simple calls setup the tasks. The kernel does the multi-tasking for you w/o any further work by the application code (given a good design).

I love to use LabView for many kinds of tasks. But I would NEVER hire a software engineer to do embedded work that cannot use C/C++ effectively. Many times it is all that is available.

Last edited by wireties : 04-04-2010 at 22:59.
  #49   Spotlight this post!  
Unread 05-04-2010, 11:07
FRC4ME FRC4ME is offline
Registered User
FRC #0339
 
Join Date: Feb 2008
Rookie Year: 2007
Location: Fredericksburg, VA
Posts: 324
FRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant future
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA

Quote:
Originally Posted by wireties View Post
Why would one language be better in a multi-tasking environment than another? The VxWorks kernel and its native API are in C. Some languages (like Ada) have multi-tasking elements built into the language. I can see how they are more convenient. But you can't hide or abstract things w/o it being slower and/or less capable. Even the compiled versions of LabView must access the VxWorks API and the system call interface to interact with the OS. In any language some simple calls setup the tasks. The kernel does the multi-tasking for you w/o any further work by the application code (given a good design).
One question I've always had is this: why does this argument end at C? Isn't the entire concept of a kernel a layer of abstraction in itself? Wouldn't it technically be faster to write the machine code directly rather than call POSIX API functions?

Everyone talks about C like it is the end-all-be-all of speed and efficiency, which confuses me because C is not the lowest level and seems like a rather arbitrary choice. Forgive me if I'm totally wrong; I'm no expert at the low-level stuff.
__________________
Go directly to queue. Do not pass pit.
  #50   Spotlight this post!  
Unread 05-04-2010, 11:20
virtuald's Avatar
virtuald virtuald is online now
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,086
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA

Quote:
Originally Posted by FRC4ME View Post
One question I've always had is this: why does this argument end at C? Isn't the entire concept of a kernel a layer of abstraction in itself? Wouldn't it technically be faster to write the machine code directly rather than call POSIX API functions?

Everyone talks about C like it is the end-all-be-all of speed and efficiency, which confuses me because C is not the lowest level and seems like a rather arbitrary choice. Forgive me if I'm totally wrong; I'm no expert at the low-level stuff.
You're right, C is a (mostly) arbitrary choice, but its also a language that is available on almost any reasonably popular platform. So, for some definition of 'portable', C is generally the lowest level you will get to on a computer where you're not writing entirely machine-dependent code (with some caveats, of course).

If done correctly, the general stuff you write for one platform in C will work with little to no modification on some completely different platform. With machine code, you can't do that. The other thing is that C was designed to write things that used to be written in assembly language, so to some degree that influences its design and usage.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
  #51   Spotlight this post!  
Unread 05-04-2010, 12:12
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,535
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA

Quote:
Originally Posted by apalrd View Post
We like LabVIEW because we can do real-time analysis of things without re-downlading. Like making graphs vs Time of data points, probing data, and changing cal points. However, the largest negative I have is the build and download times. I once timed a build at 2 mins 41 seconds. The downloads are more reasonable, at around 1 minute. Overall, I would prefer LabVIEW over C++.
Ding ding ding. This is exactly why we promoted labview to beta teams over C++ etc.

The absolute ease of creating detailed front panels that provide real time feedback of ALL your variables, sensors, inputs, etc is an incredibly powerful tool. You can do the same thing in the other languages, but not nearly as quickly or easily. The tools are already provided for you in Labview - just drop the components you want on the front panel. Not having printf's is a wonderful thing.

I agree with the builds and downloads taking a bit, 4 minutes is pushing what you can handle during eliminations.
  #52   Spotlight this post!  
Unread 05-04-2010, 12:52
virtuald's Avatar
virtuald virtuald is online now
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,086
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA

Quote:
Originally Posted by Tom Line View Post
The absolute ease of creating detailed front panels that provide real time feedback of ALL your variables, sensors, inputs, etc is an incredibly powerful tool. You can do the same thing in the other languages, but not nearly as quickly or easily. The tools are already provided for you in Labview - just drop the components you want on the front panel. Not having printf's is a wonderful thing.
I agree, having real time feedback on variables (and being able to provide that feedback as well) is an incredibly powerful tool. Thus why I created WebDMA, so you could have the same type of functionality in C++ -- incredibly simple to use. I haven't gotten around to adding graphs yet, but anyone reasonably competent in javascript could do it without too much effort.

http://code.google.com/p/webdma/
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
  #53   Spotlight this post!  
Unread 05-04-2010, 18:45
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,753
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA

Quote:
Originally Posted by Radical Pi View Post
Quick question: is the LV RT a bytecode based system (like Java) or is it just a run-time linked library?
LV RT, like desktop LV, generates native machine code -- PPC for the cRIO. It is not a VM.

Greg McKaskle
  #54   Spotlight this post!  
Unread 05-04-2010, 21:27
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,753
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA

Good questions. Quoted section marked with ***s.

*** How efficient are the resulting binaries compared to code generated by commercial and open source compilers?

The performance of compiled LV code varies depending on the data types and data access patterns in use. The LV compilers have traditionally been pretty simple, thus quick to target to new HW, but not as time or space efficient as more optimizing compilers. Over the last few years, this has improved quite a bit -- using LLVM internally in order to get better codegen.

*** Why would one language be better in a multi-tasking environment than another?

The C language knows nothing about threads or parallelism, those are added at the library layer. The C programmer needs to use explicit mutexes, semaphores, critical sections, and threads in order to ensure safe and correct execution in a multitasking environment. A C function foo(int a) doesn't declare how thread safe it is, it typically isn't analyzed for thread safety, and there are no keywords for marking it as reentrant, critical-section, etc.

By comparison, in LV, language features such as functions and wires are inherently multi-task-safe. By default, functions have a critical section around them, but a simple property change makes them reentrant. Each function call also allows for a priority change. Wires ensure the value read is delivered to each branch of the wire regardless of when it is executed, avoiding unwanted side effects.

So it isn't a matter of simply being better, but being more automatic and more safe. It is possible to write totally sequential LV code with no parallelism, but it is actually more natural to specify the code with dataflow parallelism exposed, which LV will then execute that way with the assistance of the OS. Similarly, it is possible to write C code that does lots of parallelism, but it is more natural to write the C code in a sequential form which will be executed with no parallelism. Compiler options for vectorizing C do exist, they have for decades, but the options are not used that commonly. Compilers for parallelizing C are more rare, are generally still a research topic, but seem to be on the near horizon.

*** The VxWorks kernel and its native API are in C. Some languages (like Ada) have multi-tasking elements built into the language. I can see how they are more convenient. But you can't hide or abstract things w/o it being slower and/or less capable. Even the compiled versions of LabView must access the VxWorks API and the system call interface to interact with the OS. In any language some simple calls setup the tasks. The kernel does the multi-tasking for you w/o any further work by the application code (given a good design).

The LV execution engine augments the OS scheduler to allow it to carry out execution according to the dataflow specification. It doesn't replace the OS threads package, but attempts to use it automatically and efficiently.

Greg McKaskle
  #55   Spotlight this post!  
Unread 05-04-2010, 23:14
Robototes2412's Avatar
Robototes2412 Robototes2412 is offline
1 * 4 != 14
FRC #2412 (Robototes)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2007
Location: Bellevue
Posts: 312
Robototes2412 is on a distinguished road
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA

Then here's the question of the hour: can i write labview code in a line-based language, like python?
  #56   Spotlight this post!  
Unread 06-04-2010, 08:13
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,753
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA

Answer of the hour ... anything is possible, but NI doesn't provide a textual form of the language, at least not yet.

Greg McKaskle
  #57   Spotlight this post!  
Unread 06-04-2010, 10:56
Radical Pi Radical Pi is offline
Putting the Jumper in the Bumper
AKA: Ian Thompson
FRC #0639 (Code Red Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: New York
Posts: 655
Radical Pi has a spectacular aura aboutRadical Pi has a spectacular aura aboutRadical Pi has a spectacular aura about
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA

Quote:
Originally Posted by Greg McKaskle View Post
Answer of the hour ... anything is possible, but NI doesn't provide a textual form of the language, at least not yet.
is this a hint or something?
__________________

"To have no errors would be life without meaning. No strugle, no joy"
"A network is only as strong as it's weakest linksys"
  #58   Spotlight this post!  
Unread 13-04-2010, 11:08
MikeReilly's Avatar
MikeReilly MikeReilly is offline
Registered User
FRC #4509 (Mechanical Bulls)
Team Role: Mentor
 
Join Date: Apr 2008
Rookie Year: 2005
Location: Sugar Hill, GA
Posts: 72
MikeReilly has much to be proud ofMikeReilly has much to be proud ofMikeReilly has much to be proud ofMikeReilly has much to be proud ofMikeReilly has much to be proud ofMikeReilly has much to be proud ofMikeReilly has much to be proud ofMikeReilly has much to be proud ofMikeReilly has much to be proud of
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA

Great stuff, and Greg I really appreciate your input. Sure you're from NI, but I feel you've been objective.

As a mentor, I'm bummed about the lack of growth in our programming team. We have 2 or 3 people usually doing some code, but one uber-coder who likes to pursue some ultracool stuff that most others can't keep up with.

Last year, that ubercoder had some personal issues and wasn't available for some chunks of time, so one mentor and his son learned to do just about everything in LV in a couple of weeks.

For teams that don't have an ubercoder who loves data, bits and bytes, go LV. If you have an AP Comp Sci class at your school, Java might be the way to go since you have a class of programmers at your school. For the code-jocks who like to have access to pointers and the core of code, they won't let go of C++.

But the bigger question is around the "I" in FIRST: is your goal to code, or inspire coders? For that, LV might be the biggest winner, and we're going to be making a bigger move into.
__________________
Mentor for Rookie Team 4509, Formerly with 1771
  #59   Spotlight this post!  
Unread 13-04-2010, 17:05
Kyler386's Avatar
Kyler386 Kyler386 is offline
I'm software, it's not my problem.
AKA: Ky
FRC #0386 (Team Voltage)
Team Role: Programmer
 
Join Date: Apr 2010
Rookie Year: 2009
Location: Melbourne, FL
Posts: 13
Kyler386 is an unknown quantity at this point
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA

I can't say much in comparison with Java or C++, but I have threatened our LabView code into working with wire cutters...
__________________
Funny, the part of our LV code that looks nice doesn't work, but the code that is so horrid, you can't tell what's going on, works perfectly...
  #60   Spotlight this post!  
Unread 13-04-2010, 17:44
BEEKMAN BEEKMAN is offline
Registered User
AKA: Brendan McLeod
FRC #0190 (Gompei and the Herd)
Team Role: Mentor
 
Join Date: Feb 2009
Rookie Year: 2008
Location: Londonderry, NH
Posts: 138
BEEKMAN is a splendid one to beholdBEEKMAN is a splendid one to beholdBEEKMAN is a splendid one to beholdBEEKMAN is a splendid one to beholdBEEKMAN is a splendid one to beholdBEEKMAN is a splendid one to behold
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA

Quote:
Originally Posted by davidthefat View Post
fstream it, write it into a txt file and read it after to debug... But still lots of numbers
correction, the write another C# program to make a graph of the data!!! now you have 2 languages!
__________________
WPI Robotics Engineering & Mechanical Engineering Class of 15

iRobot Mechanical Engineering Intern
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Wind River Cds Team1710 C/C++ 0 22-09-2009 10:57
Uninstall Wind River Lord_Jeremy C/C++ 0 15-01-2009 15:56
SVN wind river Mr.Macdonald C/C++ 3 13-01-2009 12:40
Wind River Help BenB Programming 3 02-01-2009 21:42
Open Wind River excel2474 Programming 12 31-12-2008 17:36


All times are GMT -5. The time now is 23:26.

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