Re: [Libphidget-devel] Documentation?
Status: Alpha
Brought to you by:
jstrohm
|
From: Vadim T. <vt...@fr...> - 2002-09-07 05:20:21
|
According to Jack Strohm: > On Fri, 2002-09-06 at 23:01, Vadim Tkachenko wrote: > > According to Jack Strohm: > > > > > So that's why it's just phidgets and not all USB devices. There are other > > > USB drivers for other devices. I wanted to abstract away the entire USB > > > API so the user wasn't exposed to it (cause it can get a little weird). > > > > I'm with you here... Almost ended up rewriting the USB subset for Java, and > > the only thing that prevented me from doing it was lack of time and the fact > > that I've finished scratching my itch. > > I wish USB was a bit simpler, that's what I'm trying to provide for the > user. I don't like the interfaces, different ways to read and write > data, I just want a stupid file handle or a socket, but that's not how > USB works, oh well. Agreed. > > Maybe it is so in C++ world. However, speaking for myself, I've spent last 7 > > years in Java and got eventually fed up with it for one simple reason: it's > > BIG. OK, you can put together something in a day that you'd spend a month > > doing in C++ (collections, threading, etc.), fine, but the weight of the > > resulting code is just overwhelming. > > when you say weight, what do you mean? In particular, memory footprint. Speed is not encouraging, either. Maybe it's just me with my tendency to write generic code and not optimize it, I don't know. > > And the real world applications of phidgets will most probably be MT. > > why do they need to be MT? 'cause it's simpler this way. > I always thought MT was very cool, but the large the system the harder > MT seems to be to deal with. (specially if your OS has thread bugs, > *solaris*, *windows*). OS bugs notwithstanding, but I've figured out a way to deal with threads. Another project of mine, Jukebox, was multithreaded on OS/2 (the implementation was C++ back then), then I've ported it to Java and I'm afraid I've lost the C++ sources, but I'm seriously thinking about implementing those patterns in C++ again, now that the collections are basically standard (STL, right?). > I'm actually having a threading issue in another project. A 3D graphics > engine I wrote that has 2 threads. One draws everything, the other does > all the heavy LOD What's LOD? > calculations. Runs very smooth in Linux. I ported it to windows and it > is CRAP. the background thread gets schedules about every few seconds for > about 100th of a second. If you increase the threads priority any it > nearly locks the machine up cause the kernel can't get any time to > process. Tried mutexes? Or event semaphores? Or the background calculations are *really* non-stop? Give me a little while, I might be able to help you with that... --vt |