Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: what language to write program in

  1. #1
    Constant Bitrate samael's Avatar
    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.

  2. #2
    Constant Bitrate samael's Avatar
    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.

  3. #3
    Raw Wave hijinks21's Avatar
    Join Date
    May 2002
    Location
    Albany, NY
    Posts
    1,803
    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

  4. #4
    Constant Bitrate samael's Avatar
    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.

  5. #5
    Raw Wave hijinks21's Avatar
    Join Date
    May 2002
    Location
    Albany, NY
    Posts
    1,803
    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

  6. #6
    Constant Bitrate parawing742's Avatar
    Join Date
    Jun 2003
    Location
    Tennessee
    Posts
    137
    I have an idea! Why don't you start by learning the English language? Specifically begin by learning to spell.
    Phillip Hullquist

    I entertain people through adventure movies.
    www.11visions.com

  7. #7
    Constant Bitrate samael's Avatar
    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.

  8. #8
    Constant Bitrate samael's Avatar
    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.

  9. #9
    Maximum Bitrate mobileh1's Avatar
    Join Date
    Apr 2004
    Location
    San Francisco
    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

  10. #10
    Constant Bitrate samael's Avatar
    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.

Page 1 of 3 123 LastLast

Similar Threads

  1. Looking for a program.
    By Mikesz in forum Software & Software Development
    Replies: 1
    Last Post: 11-23-2002, 06:09 AM
  2. Running a program inside a program
    By CaffeineAddict in forum Software & Software Development
    Replies: 10
    Last Post: 10-16-2002, 03:26 AM
  3. Cassiopeia E-125 -- who can write me a program for it?
    By percyt2k in forum Software & Software Development
    Replies: 2
    Last Post: 08-29-2001, 06:39 PM
  4. charchter lcd program?
    By Jaymz in forum Software & Software Development
    Replies: 1
    Last Post: 02-15-2001, 07:32 PM
  5. Can someone write me a PIC program 4 a awesome s/down controller please?
    By gizmos in forum General Hardware Discussion
    Replies: 3
    Last Post: 07-17-2000, 12:43 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •