Welcome to the MP3Car.com forums.
You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. Registering will also remove advertisements. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!
If you have any problems with the registration process or your account login, please contact contact us.
|
05-19-2004, 04:22 AM
|
#1
|
|
Constant Bitrate
Join Date: May 2001
Location: new zealand
Posts: 130
|
what language to write program in
HI all
I would like your opinions on what language i should use to write some softare in to run under linux. Here are the basic requirements :
Be able to talk via sockets to mpd.
Be able to talk via sockets to lcdproc.
interperet key strokes.
mpd is a daemon (a service for those using winblows) that plays music. music playing daemon. You run it, then connect to it (you could probably even use telnet  ) then give it commands like "play /mp3/a band/an album/a song.,mp3" etc... I cant remember the exact syntax.
lcdproc is a daemon that controls an alphanumeric screen. you connect to it, and tell it what to display. You can do this with telnet also, but that ould suck....
By interperet keystrokes, i mean things like i will bind a key on my keyboard for "play" and "next" and "go to menu" etc.... When i it the "next" key, the program would tell mpd to go to the "next" track. It would recieve information from mpd on what the next track is, then tell lcdproc to diplay certain information. Periodicly mpd would tell my program something, like the current position in the track in seconds. I'll need to handle stuff like that also.
Now i could rip this up in java no sweat. For a super simple mp3 car system which will only play mp3's, having a jvm hanging around is undesireable. On the other hand I could compile the java to native code.
I could use c. Maybe, i would have to learn threading probably, maybe easy, maybe hard. Intuition tells me this would be best, though i am not sure why. I know java better than i know c, i only have a university knowledge of c.
I could use c++, make it an excercise in learing it.
I could probably do it in lisp or scheme, that would be interesting, and making a menu structure (for navigating file system and manuipulating the playlist lisp or scheme would be _perfect_)
Perl or some other interpereted language, i dunno. I dont know them, but they could be the fastest, easyest way.
Or i could just use win 98se lite and set the shell to be winamp and use one of the plugins that pretty much work exactly the way i want. but wheres the fun in that?? >8)
what do you guys rekon?
__________________
stupid quote # 1 : "i dont do drugs , i only ever smoke pot when i'm coming down" , Me , 6 september , 2001.
|
|
|
05-19-2004, 04:58 AM
|
#2
|
|
Constant Bitrate
Join Date: May 2001
Location: new zealand
Posts: 130
|
damn it
So i have been thinking about this for a wee while now, the moment i post a question on a forum BAM!!! i find some software that pretty much solves my problems.
audioBox just uses mpg123/ogg123/mpg321 instead of mpd, but its still cool. And i can waste my time extending his project to do what i want, instead of re-inventing the wheel.
Although it would be cool to roll my own....
__________________
stupid quote # 1 : "i dont do drugs , i only ever smoke pot when i'm coming down" , Me , 6 september , 2001.
|
|
|
05-19-2004, 06:37 AM
|
#3
|
|
Super Moderator
Join Date: May 2002
Location: Albany, NY
Vehicle: 98 Exporer Sport
Posts: 1,802
|
if you are looking to do this in windows and using the mpg123 dos version i'd just use winamp.. if you are looking to do it in linux then use mplayer
also if you are looking on doing it in linux check out Xcar project.. http://www.thexcar.com we are doing it in C++ using QT as a widget set.. Its coming along nicely
__________________
'98 Explorer Sport
http://mp3car.zcentric.com (down atm)
AMD 800mhz 192megs RAM 60gig hard drive 9 inch widescreen VGA
80% done
|
|
|
05-19-2004, 06:40 AM
|
#4
|
|
Constant Bitrate
Join Date: May 2001
Location: new zealand
Posts: 130
|
well thanks
Wel thanks .... i think....
You could go and re-read my first post and try your reply again if you like.
__________________
stupid quote # 1 : "i dont do drugs , i only ever smoke pot when i'm coming down" , Me , 6 september , 2001.
|
|
|
05-19-2004, 08:28 AM
|
#5
|
|
Super Moderator
Join Date: May 2002
Location: Albany, NY
Vehicle: 98 Exporer Sport
Posts: 1,802
|
opps.. i replied when i got up..
here is my two cents.. use a compiled language. I first tried to do an app in python and its just not as powerfull.. Same goes for perl.. look at speed benchmarrks for perl/python compared to C/C++
Java i can't comment on that since I hate Java.. I'd say use C or C++. Mainly since there are a ton of libaries you can include right away. bigb converting me to QT and I have to say it's a breeze when doing a pure C++ app. It makes things so much easier.
__________________
'98 Explorer Sport
http://mp3car.zcentric.com (down atm)
AMD 800mhz 192megs RAM 60gig hard drive 9 inch widescreen VGA
80% done
|
|
|
05-19-2004, 08:29 AM
|
#6
|
|
Constant Bitrate
Join Date: Jun 2003
Location: Tennessee
Vehicle: 1996 Ford Ranger
Posts: 137
|
I have an idea! Why don't you start by learning the English language? Specifically begin by learning to spell. 
__________________
Rudy Green[e]
guess Rudy's location and win fifty bucks!
new every week at www.RudyGreene.com
|
|
|
05-19-2004, 11:40 PM
|
#7
|
|
Constant Bitrate
Join Date: May 2001
Location: new zealand
Posts: 130
|
you mistake
Quote: Originally Posted by parawing742
I have an idea! Why don't you start by learning the English language? Specifically begin by learning to spell. 
You mistake an inability to type for an inability to spell. I need to learn to type better >8)
__________________
stupid quote # 1 : "i dont do drugs , i only ever smoke pot when i'm coming down" , Me , 6 september , 2001.
|
|
|
05-19-2004, 11:45 PM
|
#8
|
|
Constant Bitrate
Join Date: May 2001
Location: new zealand
Posts: 130
|
Quote: Originally Posted by hijinks21
opps.. i replied when i got up..
here is my two cents.. use a compiled language. I first tried to do an app in python and its just not as powerfull.. Same goes for perl.. look at speed benchmarrks for perl/python compared to C/C++
Java i can't comment on that since I hate Java.. I'd say use C or C++. Mainly since there are a ton of libaries you can include right away. bigb converting me to QT and I have to say it's a breeze when doing a pure C++ app. It makes things so much easier.
I dont want to discount an interpereted language (yes java is interpereted) just because of speed. The app i write is simple enough it wont make a difference to the speed of execution, just to the speed of implementation.
On a side note, you should look up some scheme vs c benchmarks, i think you'll find that even though scheme is properly interpereted and its interpreter is written and run in java, its still faster than c for a lot of stuff. Thats non-intuitive....
__________________
stupid quote # 1 : "i dont do drugs , i only ever smoke pot when i'm coming down" , Me , 6 september , 2001.
|
|
|
05-19-2004, 11:57 PM
|
#9
|
|
Maximum Bitrate
Join Date: Apr 2004
Location: San Francisco
Vehicle: Hummer H1
Posts: 454
|
parawing742, that's good coming from someone who can't decide how to spell their own name
Try being a little less rude to forum members please, you'll find people value your comments a lot more. In return we wont mention that there should have been a comma after 'specifically' too loudly...
Now to the actual question. This is a little like asking how long is a piece of string.
Compiled languages are faster at most tasks, but speed isn't really a big problem in these kinds of apps. Looking up ID3 tag data and enumerating large numbers of files will take the same time if you do it in c/c++ or java/python/perl etc. Its only cpu bound operations that are affected by the language.
The answer really depends on what you feel more comfortable writing in. Compiling java down to native op codes - using gcj for example is one way if you are happiest using java.
Any of the languages mentioned are going to work out fine, c/c++ is the most flexible, but then the question is which widget lib to use.
I would pick, as xcar suggested, c++/QT because that's a great combination.
Then again, I'd probably go geeky and use curses which would be very cool in a car 
__________________
.//Daren
(Epia M10000/C134) (C137/MII 10000) Liliput /Opus 150W/DVD/512MB/80GB/Hummer H1
MediaCar/CoPilot7/Routis
|
|
|
05-20-2004, 12:06 AM
|
#10
|
|
Constant Bitrate
Join Date: May 2001
Location: new zealand
Posts: 130
|
Quote: Originally Posted by mobileh1
I would pick, as xcar suggested, c++/QT because that's a great combination.
Then again, I'd probably go geeky and use curses which would be very cool in a car 
Thanks for the reply, i may look into jcg. Could be an interesting project in itself  I am using an alpha numeric screen, so this is a command line app, no gui toolkit needed. The computer wont be starting X at all, just booting, auto-logging in, and running my program.
Some good advice there though, thanks 
__________________
stupid quote # 1 : "i dont do drugs , i only ever smoke pot when i'm coming down" , Me , 6 september , 2001.
|
|
|
05-20-2004, 08:15 AM
|
#11
|
|
Super Moderator
Join Date: May 2002
Location: Albany, NY
Vehicle: 98 Exporer Sport
Posts: 1,802
|
you can run QT in without running X11 also.
__________________
'98 Explorer Sport
http://mp3car.zcentric.com (down atm)
AMD 800mhz 192megs RAM 60gig hard drive 9 inch widescreen VGA
80% done
|
|
|
05-20-2004, 12:38 PM
|
#12
|
|
Super Moderator
Join Date: Apr 2004
Location: USA
Vehicle: 1999/Volvo/S80
Posts: 4,575
|
Scheme??????
No Way.
__________________
AMD XP 2600+/512MB RAM/120GB hard drive
Opus 150W/DVD/GPS/7" Lilliput TS/802.11g/Bluetooth
Installed.
-GPSSecure- - GPS Tracking
-AltTabber2.2.2- - Handy touchscreen utility.
|
|
|
05-20-2004, 12:41 PM
|
#13
|
|
I'm sorry, and you are....?
Join Date: Jan 2003
Location: Ruston, LA
Vehicle: 1998 Ranger/1991 Sunbird
Posts: 9,857
|
Object Cobol
__________________
FrodoPlayer.com
TeaBaggins.com
[H]4 Life
My next generation Front End is right on schedule.
It will be done sometime in the next generation.
I'm a lesbian too.
I am for hire!
|
|
|
05-20-2004, 02:34 PM
|
#14
|
|
Variable Bitrate
Join Date: Sep 2003
Location: Wilkes Barre, Pa
Vehicle: 1999 Dodge Durango
Posts: 233
|
Just write it in .NET and wait for someone to emulate the .NET framework in Linux.
I also agree c++/QT would be one of the easest way to go but from your posts you don't seem to interested in the easy way.. Hehe Either way good luck..
|
|
|
05-20-2004, 04:52 PM
|
#15
|
|
Constant Bitrate
Join Date: May 2001
Location: new zealand
Posts: 130
|
Quote: Originally Posted by The Durango Kid
Just write it in .NET and wait for someone to emulate the .NET framework in Linux.
I also agree c++/QT would be one of the easest way to go but from your posts you don't seem to interested in the easy way.. Hehe Either way good luck..
We are talking QT as in the trolltech developed gui api? why would i need that, i dont understand.
Its not that i am not interested in the easy way, just the most interesting way  I think i'll go for c++, or just extend audioBox.
__________________
stupid quote # 1 : "i dont do drugs , i only ever smoke pot when i'm coming down" , Me , 6 september , 2001.
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 05:10 PM.
|
|