Announcement

Collapse
No announcement yet.

what language to write program in

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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.

    Comment


    • #3
      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

      Comment


      • #4
        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.

        Comment


        • #5
          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

          Comment


          • #6
            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

            Comment


            • #7
              you mistake

              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.

              Comment


              • #8
                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.

                Comment


                • #9
                  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

                  Comment


                  • #10
                    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.

                    Comment


                    • #11
                      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

                      Comment


                      • #12
                        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.

                        Comment


                        • #13
                          Object Cobol
                          [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!

                          Comment


                          • #14
                            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..
                            www.DurangoSUV.com

                            Comment


                            • #15
                              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.

                              Comment

                              Working...
                              X