Page 1 of 1

Another potential language choice for tuning

Posted: Tue Jul 08, 2008 1:00 pm
by Fred
Ruby. I've been looking into this recently to up-skill myself for employment reasons as it is a popular web development tool right now and a pretty cool language by the sounds of it.

I just downloaded and setup this demo far more quickly than I had the mono app running in :

http://www.arachnoid.com/ruby/RubyGUIProject/

It uses QT like Marcos' tool does.

The code is quite unlike Java/C#/C/C++ etc, for example, this is all that is required in the source file to output something, get user input and reoutput it. Notice the lack of data types :

Code: Select all

puts "Hello World! What is your name?
name = gets
puts "Hello " + name
Fairly different indeed. Should be fun though. 6 months ago I had no idea about how to use C effectively, now I do. In 6 months if I keep up with this I should be able to use it effectively too.

Fred.

Re: Another potential language choice for tuning

Posted: Tue Jul 08, 2008 9:04 pm
by shameem

Re: Another potential language choice for tuning

Posted: Tue Jul 15, 2008 5:37 pm
by Fred
I've been doing a lot of reading and not a lot of ruby coding, but I thought I'd post my first little program here :

Code: Select all

def allwords(stringofwords)
        splitwords = stringofwords.split
        outputwords = []
        splitwords.each do |aword|
                outputwords << aword.capitalize + " "
        end
        outputwords = outputwords.join
        outputwords["Testing"]= "Production"
        outputwords.strip
end

somewords = "some words in a sentence that i like to use for testing!"

puts somewords

puts allwords somewords

puts somewords
Which produces the following output :

Code: Select all

fred@rwdlsd:~$ ruby allw.rb
some words in a sentence that i like to use for testing!
Some Words In A Sentence That I Like To Use For Production!
some words in a sentence that i like to use for testing!
Fred.

Re: Another potential language choice for tuning

Posted: Tue Jul 15, 2008 7:19 pm
by BenFenner
I learned Ruby pretty well for a Ruby on Rails senior project I did. Made a trading website combining the visual appeal of eBay and the no-nonsense content of craigslist. I promptly forgot Ruby immediately after.

It's a nice language, I enjoyed it enough. I'm the kind of guy who needs to be 100% comfortable with the compilation of a language before I feel comfortable using it. If I can't step through code and compile it in my head I get frustrated. I never got to that point with Ruby.

Re: Another potential language choice for tuning

Posted: Wed Jul 16, 2008 1:48 pm
by garwor
Hi guys,
i see you looking for right programming language, i would recomend java because of cross-platform portability, and also development environments are free. Requires some better programming skills than some Ruby or similar languages you mentioned here, but generaly causes better modularization and reusability.
I'm developer many years, don't drive tunned cars, but become interested in engine management tools because some friends are working in tunnings, and i wanted to make program for this issues. And i see that you have same goal, maybe i can contribute to your project.

Re: Another potential language choice for tuning

Posted: Wed Jul 16, 2008 2:35 pm
by Fred
Awesome :-) I'm a java guy at heart too, but it's been suggested to me that using Java is too heavy weight. Mono and C# is almost as good a choice as Java, but the library availability for Java is second to absolutely none, so the Java app *should* win out in every case really. Java performance is excellent too despite what some people believe.

I'm playing with Ruby to broaden my commercial appeal as an employee you see, and because it looks like it would be fun to play with too. I've never used any "functional" languages before, so it's about time I cut my teeth on one :-) might as well make it a commercially appealing up and coming one while I'm at it I think.

Check out ECUManager in the tools section. Another member wrote that for his private project and has released it under GPL, It might interest you.

Fred.

Re: Another potential language choice for tuning

Posted: Wed Jul 16, 2008 5:40 pm
by BenFenner
I feel most comfortable in Java, or anything Java-like (C# comes to mind). I wouldn't dare use it for an embedded system though.

Re: Another potential language choice for tuning

Posted: Wed Jul 16, 2008 8:27 pm
by Fred
Yeah, C# is just the evil cousin :-)

I don't mind any of C, C++, C#, Java, but I've never used any functional languages like python or perl or ruby, so nows the time. I've got an interview lined up for a Java position in the next few days, but I think I'll stick with ruby anyway as it's another notch in the belt regardless :-)

Fred.

Re: Another potential language choice for tuning

Posted: Wed Aug 20, 2008 9:36 am
by PhatBobq
Embedded Java ain't such a bad idea - garbage collection is a nice insurance for a system thats going out into mass production. I've done a few embedded Java contracts, and if they're written properly (sparse code, minimal threads, and a decent, structured JNI layer) they work well.

Sun are touting Real Time Java now: http://java.sun.com/javase/technologies/realtime/

The last exciting job I had (6 years ago) I was working with an invention by a company called Vulcan Machines who had a Java processor - it used the same byte code that the Java VM used, and had hardware based garbage collection. Like all .com era stuff it was cool but pointless!