View unanswered posts | View active topics It is currently Mon Nov 19, 2018 6:42 am



Reply to topic  [ 9 posts ] 
Another potential language choice for tuning 
Author Message
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15194
Location: Home sweet home!
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:
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.

_________________
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!


Tue Jul 08, 2008 1:00 pm
Profile WWW
LQFP112 - Up with the play

Joined: Thu May 01, 2008 6:30 pm
Posts: 135
Location: Ann Arbor, MI
Sounds cool -
http://en.wikipedia.org/wiki/Ruby_programming_language


Tue Jul 08, 2008 9:04 pm
Profile WWW
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15194
Location: Home sweet home!
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:
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:
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.

_________________
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!


Tue Jul 15, 2008 5:37 pm
Profile WWW
LQFP144 - On Top Of The Game
User avatar

Joined: Wed Jul 09, 2008 3:15 pm
Posts: 360
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.

_________________
BenFenner's 1994 Black SE-R
BenFenner's 2000 Black M-Coupe


Tue Jul 15, 2008 7:19 pm
Profile
TO92 - Vaguely active

Joined: Wed Jul 16, 2008 1:21 pm
Posts: 1
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.


Wed Jul 16, 2008 1:48 pm
Profile
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15194
Location: Home sweet home!
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.

_________________
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!


Wed Jul 16, 2008 2:35 pm
Profile WWW
LQFP144 - On Top Of The Game
User avatar

Joined: Wed Jul 09, 2008 3:15 pm
Posts: 360
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.

_________________
BenFenner's 1994 Black SE-R
BenFenner's 2000 Black M-Coupe


Wed Jul 16, 2008 5:40 pm
Profile
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15194
Location: Home sweet home!
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.

_________________
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!


Wed Jul 16, 2008 8:27 pm
Profile WWW
TO92 - Vaguely active

Joined: Sat Aug 09, 2008 8:53 pm
Posts: 1
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!


Wed Aug 20, 2008 9:36 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 9 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software for PTF. ColorizeIt.