Hi All!


zxxgp

Member
Joined
Aug 28, 2008
Messages
134
Location
USA
Website
Visit site
I just wanted to say hi to the Pandora community. I just found out about the Pandora not to long ago. I have had a GP2X for the past 2 years. (f-100) I am a computer science major. I spend most of my time in Java and C# since those are the two languages that are mainly used in school and the only two I have had formal instruction in. I do know a bit of C++ that I have learned on my own. I would like to get better at C++ since it is still what most things are written in. I hope I can be of some help to the Pandora team since the devs seem very willing to accept input from the community. I do not know if I am going to get a Pandora yet. I want one but there are other things that need money first, such as college books. If I end up with enough money I will get one. :pandora1:
 
Only thing I will tell you is that real C++ is nothing like C# or Java. C++ won't manage your memory for you. C++ won't be as picky, but it won't be what you want. When you do get errors thrown, they won't be as intuitive. Welcome to the Un-managed world.
 
but still the kind of memory management you do in c++ allows for faster and more optimized programs so once you get used to it you get somewhat faster programs
i went from python to c++ and with all the babying that python did for you it still didn't take that long to get used to it so coming for c# you'll be fine in awhile
 
Java is my language of choice since I started with it and it works on just about any platform without having to recompile code. The only reason I learned C# was because I had to take one programming class that used it. I should not have had to take it but that is a rant for another day. C++ I have been learning on and off for the past 3 or so years. I pick it up when I have time. (which is not to often) Thank you for the C++ tips. I will keep them in mind.
 
Much of the syntax is the same in c#, Java and c++... it really is getting used to the things which are different, rather than learning an entirely new language.
Saying that... I don't Java... or c# :lol:
 
What gives you the idea that most software is written in C++?
I see a pretty big migration in the industry toward higher level languages, ever since Java came out. Maybe this is due to corporate types liking to recommend Java just for the buzzwordiness. Nevertheless, I still see much value in higher level languages.
If you don't see the advantages to developing in Java vs. C++, I recommend you take a look at Python. The extremely clean/elegant syntax, and the awesome standard library, really help to make great code.
This is coming from a Computer Science senior, who's had 10 classes that used C++ exclusively, and who works 20 hrs a week at a C# shop. And the ONLY thing I use in my spare time in Python, because for the things I do, that is the best option I am aware of.
The speed issue is hardly a concern, because modern languages (C#, Java, Python, Ruby, Perl, etc.) all have ways of interacting with native compiled code, so you can always get more efficiency by rewriting [edit] inefficient parts of [/edit] your code in C++. But the point is, you don't HAVE to, unless it's necessary.
And your increased productivity from not having to type all your variables, having built-in powerful data structures (dictionaries, lists, etc.), the extensive standard library, and various other advantages of Python will far outweigh the minor inconvenience of having to write native C++ code separately to optimize things.
 
rabidpoobear said:
What gives you the idea that most software is written in C++?
I see a pretty big migration in the industry toward higher level languages, ever since Java came out. Maybe this is due to corporate types liking to recommend Java just for the buzzwordiness. Nevertheless, I still see much value in higher level languages.
If you don't see the advantages to developing in Java vs. C++, I recommend you take a look at Python. The extremely clean/elegant syntax, and the awesome standard library, really help to make great code.
This is coming from a Computer Science senior, who's had 10 classes that used C++ exclusively, and who works 20 hrs a week at a C# shop. And the ONLY thing I use in my spare time in Python, because for the things I do, that is the best option I am aware of.
The speed issue is hardly a concern, because modern languages (C#, Java, Python, Ruby, Perl, etc.) all have ways of interacting with native compiled code, so you can always get more efficiency by rewriting [edit] inefficient parts of [/edit] your code in C++. But the point is, you don't HAVE to, unless it's necessary.
And your increased productivity from not having to type all your variables, having built-in powerful data structures (dictionaries, lists, etc.), the extensive standard library, and various other advantages of Python will far outweigh the minor inconvenience of having to write native C++ code separately to optimize things.
Ok let me clarify. Most software that I deal with in my every day life is written in C++. I do understand the advantages in developing in Java (or C#) vs C++. Languages are tools. You have to pick the right tool for the job.
 
Last edited by a moderator:
C#? YUCK!!! I'll never touch .NET again after the development nightmare we went through when I was working for public schools. I do not care to elaborate beyond saying Microsoft's has a twisted view of reality. That, and zero portability = no real advantage over Java or simply coding your program in a "real" language. I do not see one single advantage for using .NET over a plethora of other languages that do the job better.

As for the High(er) level languages versus C/C++, I want speed, I'll take C. I want a quick app, I'll use Python or Ruby. I want both, I'll write the interface in Python / Ruby and the app as a daemon in C. It is that simple.
 
AireTamStorm said:
C#? YUCK!!! I'll never touch .NET again after the development nightmare we went through when I was working for public schools. I do not care to elaborate beyond saying Microsoft's has a twisted view of reality. That, and zero portability = no real advantage over Java or simply coding your program in a "real" language. I do not see one single advantage for using .NET over a plethora of other languages that do the job better.
Actually, Microsoft's WPF is a pretty frickin' awesome way to dev GUIs. I was pretty anti-.NET, but after using it for half a year, I'm starting to appreciate some of the stuff that they make easier.
I sort of dislike the verbosity of Microsoft's library layout (System.Text.RegularExpressions.Match vs Python's re.match object, f.e.) but that's not too big of a deal.

I definitely won't just blindly defend .NET, but there are certain cases where it's pretty decent. I haven't seen the GUI animation and code-binding capabilities that WPF offer reflected in another language. But if you have an example where they are, I'd love to hear about it. I've only used WXGlade for WxPython GUI dev, (and maybe Boa Constructor) but they are not nearly as intuitive and versatile as Microsoft's Expressions Blend GUI designer.

Oh, and the MONO project by Novell is writing an implementation of .NET on Linux.
AireTamStorm said:
As for the High(er) level languages versus C/C++, I want speed, I'll take C. I want a quick app, I'll use Python or Ruby. I want both, I'll write the interface in Python / Ruby and the app as a daemon in C. It is that simple.
I agree. This is a good way to think about it.
 
Last edited by a moderator:
So what would be the best language choice for writing realtime audio software, such as a MIDI controled sound fx sampler? C++ backend with a python front?
 
kaimerra said:
So what would be the best language choice for writing realtime audio software, such as a MIDI controled sound fx sampler? C++ backend with a python front?
Depends what system you're talkin' about. If you're referring to the Pandora, well then it depends if JACK works or not. If JACK works, it will handle all the audio stuff for you, and you could probably get away with just using a Python interface to JACK to get the MIDI events.
You can just use some Python library (such as Pygame) to play back your sounds, but it would be even better if you did that through Jack too, because when doing realtime audio, you need very low latency.
Just sprinkle some C in there if anything is too slow, and slap some ctypes on there to interface with it, and you're all set :)
 
Last edited by a moderator:
rabidpoobear said:
I haven't seen the GUI animation and code-binding capabilities that WPF offer reflected in another language. But if you have an example where they are, I'd love to hear about it. I've only used WXGlade for WxPython GUI dev, (and maybe Boa Constructor) but they are not nearly as intuitive and versatile as Microsoft's Expressions Blend GUI designer.
I've probably said this before, try Qt. It has bindings for all languages you'd care about and has a cool designer that integrates with most IDEs you'd care about.
 
Last edited by a moderator:
sindbad said:
rabidpoobear said:
I haven't seen the GUI animation and code-binding capabilities that WPF offer reflected in another language. But if you have an example where they are, I'd love to hear about it. I've only used WXGlade for WxPython GUI dev, (and maybe Boa Constructor) but they are not nearly as intuitive and versatile as Microsoft's Expressions Blend GUI designer.
I've probably said this before, try Qt. It has bindings for all languages you'd care about and has a cool designer that integrates with most IDEs you'd care about.
I think for the most part I think he was referring to the ease of development rather than the capabilities. Some people will definitely appreciate not having to "develop" the GUI, rather, "draw" it.

Problem with MONO is, Microsoft didn't develop it, and it is far from complete. Python pretty much ran on everything from even early on in its lifespan, because the Interpreter ran on everything. I still see it as more practical to just go with Python with Qt or GTK bindings, maybe SDL or OpenGL bindings if I want to get fancy.
 
Last edited by a moderator:
The Qt Designer lets people draw GUIs, much more powerful and easy than glade for example.
 
AireTamStorm said:
sindbad said:
I've probably said this before, try Qt. It has bindings for all languages you'd care about and has a cool designer that integrates with most IDEs you'd care about.

I think for the most part I think he was referring to the ease of development rather than the capabilities. Some people will definitely appreciate not having to "develop" the GUI, rather, "draw" it.

Yep, that's mostly what I meant. However, WPF has some really nice data binding features, so you can literally design a functional app without writing a single line of code. Take a look at this video if you have time : http://channel9.msdn.com/posts/Nichop/Real...to-Blend-Part1/ .
But you don't have to data bind to XML streams and such, you can also data bind to objects in your code. Basically it's like you tell a GUI element to watch a specific object and keep the data reflected in the GUI element at all times, and you don't have to write any code for it. Whenever the object changes, the GUI will automatically update itself.
AireTamStorm said:
Problem with MONO is, Microsoft didn't develop it, and it is far from complete. Python pretty much ran on everything from even early on in its lifespan, because the Interpreter ran on everything.
Yes, that's unfortunate. I honestly don't like C# that much as a language, either. It's just that it has some really cool stuff that I'd love to see in Python.
It's just a huge conflict of interest, because Microsoft is an OS developer. If Google had written .NET, I bet it'd be much more portable. And that's an issue they need to focus on, because, realistically, maybe a small percentage of the market is Linux or Mac, but the key point is that almost all of that small market segment that is Linux is developers. And asking developers to work with a toolset that will not work at all on their operating system will make them a bit hesitant. So I think it'd behoove Microsoft to speed up the Linux port, because then non-MS coders would be quicker to at least be somewhat accepting to MS's technology.

AireTamStorm said:
I still see it as more practical to just go with Python with Qt or GTK bindings, maybe SDL or OpenGL bindings if I want to get fancy.
Sure, Python is awesome, no doubt. I was just lamenting on some of the cool features Microsoft can come out with because they have a crapton of money to throw at everything.
Case in point - multithreading. Guido says "just do multiprocess and do interprocess communication!" Because of the GIL (Global Interpreter Lock) in Python, you cannot actually have two threads running at the same time! They just task themselves out. This is cool, because then you don't have to lock objects and such when you're multithreading, but it has a huge downside - it's not really multithreaded, it's just timeslicing quickly.

Microsoft is developing this cool technology called Parallels.
Say I have a dual-CPU system with two quad core processors. Now I can write a program to spawn 8 different proceses, set their affinities to each core, and try to keep the communication between them going, and then rejoin them after I'm done processing. Sure, I can do that, but why should I have to? And what if what I really want to do is just run a single thread for most of the program, and then every once in a while I want to shotgun off a loop or something onto all 8 cores? I'll have the overhead of starting 8 interpreters every time I want to do this! or I'll have the overhead of having 8 interpreters running at all times!

With Parallels, if I have a foreach loop that is, for example, processing images,
all I have to do is change one line from foreach to Parallels.foreach, and .NET will automatically check how many processors I have available and their loads, and distribute the task across all of them.
And it has a bunch of other neat multithreading and scheduling features. Heck, one function we optimized at work that did I/O and image processing from media cards got a 40% speedup by changing just one line!
And that's on a dual-core system. A quad core may get ~60% or so.
And that's a ridiculous increase in speed, because the function has been optimized very much already.

Anyway, I've not looked into QT but I've heard good things. I'll take a look next time I have a free minute (once I finish rebuilding my projector :) )


sindbad said:
The Qt Designer lets people draw GUIs, much more powerful and easy than glade for example.
Cool! This definitely sounds like something I should check out.
 
Last edited by a moderator:
rabidpoobear said:
Microsoft is developing this cool technology called Parallels.
Say I have a dual-CPU system with two quad core processors. Now I can write a program to spawn 8 different proceses, set their affinities to each core, and try to keep the communication between them going, and then rejoin them after I'm done processing. Sure, I can do that, but why should I have to? And what if what I really want to do is just run a single thread for most of the program, and then every once in a while I want to shotgun off a loop or something onto all 8 cores? I'll have the overhead of starting 8 interpreters every time I want to do this! or I'll have the overhead of having 8 interpreters running at all times!

With Parallels, if I have a foreach loop that is, for example, processing images,
all I have to do is change one line from foreach to Parallels.foreach, and .NET will automatically check how many processors I have available and their loads, and distribute the task across all of them.
And it has a bunch of other neat multithreading and scheduling features. Heck, one function we optimized at work that did I/O and image processing from media cards got a 40% speedup by changing just one line!
And that's on a dual-core system. A quad core may get ~60% or so.
And that's a ridiculous increase in speed, because the function has been optimized very much already.
I'm starting to sound like a fanboy, but Qt has a feature similar in results called QtConcurrent (inspired by MapReduce). There's also the less heavy duty Threadweaver from KDE, also based on Qt.
 
Last edited by a moderator:
Back
Top