It’s a relatively trivial task, really easy to do with the command prompt and GNU wc:
I executed this within the desired directory (my BASeBlock source folder, if you must know) and the result was a file filled with numbers and files; I wrote a quick python script to parse that and add up the numbers that were at the start of each line, but then I figured, why not just write the whole think in python and forget about the rest of it, so I did.
It’s a rather basic script, and I don’t even comment it as much as I ought to. I just wanted a quick tool to be able to count the lines of code in a given directory for a given source file type. Ideally, I’d allow for multiple types, but I didn’t want to complicate the argument parsing code too much. The counting method is pretty barren, it just loops over every line and increments a counter. It seems to work relatively fast. It quickly gave me the result I wanted, which was that BASeBlock’s .cs files comprise about 53K lines of code, excluding the .designer.cs files (thus the third argument). And now I have a nice reusable script to figure this out in a jiffy without too much thinking about shell syntax or what I need to pipe to wc and what arguments I need to pass wc and whatnot. plonked in a location on my windows machine with pathext set to allow execution of .py files directly using the ActivePython interpreter and putting it on my Linux machine and adding a symlink in /usr/bin to it makes it available to me on both machines.
I don’t know how helpful this will be, but it sort of surprised me.
Basically, my brother has managed to go through three PS3 consoles. Each time, being the hardware expert he is – the type that would, when my 486 wasn’t booting up, open it up and make sure every connection was plugged into something – decided he could fix it himself. I think the issue was it wasn’t reading discs or something. Of course my advice was to send the bloody thing to Sony, but hey it was his warranty to void. What ended up happening of course was he ripped the entire thing apart, had absolutely no idea what he was doing and he ended up having to buy a new one since that one was no longer applicable for service. Anyway, I stumbled on the picked apart carcass of his old PS3- and I remembered that they have hard drives. So I opened up the HD access panel, took out the HD, and to my surprise I found it was just a 2.5″ SATA drive. To confirm this I plopped it into my laptop and installed Mint 12 on it. It’s mine now, heh. I’m not sure where his other picked part carcasses are, though. It’s a shame this laptop only allows for the installation of one Hard Drive, too.
Anyway, I didn’t know that they were so interchangable with PC parts in this manner, so maybe others might not be aware of it either. And I know quite a few people with dead consoles (PS3/XBox 360, etc) that they have basically shelved and forgotten about so if somebody needs an emergency Hard Drive this could be a useful nugget of info.
On a related Note, Mint 12 is extremely impressive… Although it primarily Reminded me just how heavily I customized the Mint 10 installation I was used to using on my laptop. The changes were mostly UI and I couldn’t figure out how to get my beloved Emerald working with a few quick googles so I swapped the drives back over. Now I could have messed about with Mint 12 by simply using the Live CD, but the Live CD is always somewhat slow and hardly really shows the OS at it’s true potential. And of course you can’t really add anything or make many changes to it, since it’s booting from a Read-Only medium.
Regarding Console Systems, though; is it just me, or are they basically just re-purposed PCs? The Xbox and Xbox360 are quite literally PC hardware specially built for handling gaming tasks, with specific software and also firmware “locks” to try to keep nosey people from finding out it’s really just a PC. This isn’t so bad, but it’s sort of stupid- I mean, really, the original XBox is essentially a Pentium 3 PC; The controller ports are just freakazoid USB connectors that they purposely changed just so they won’t be USB connections,and possibly to make them stay in better, USB ZIF slots aren’t what I would call the greatest for controllers. On the other hand, why change the entire pinout configuration- why couldn’t they have simply added some sort of additional mechanical connection that made them stay in better? And all the fancy crap about locking the Hard Drives from being changed by the user, and so forth is sort of silly. It doesn’t make a whole lot of sense to artificially limit what the device is capable of simply because you charge less for it than an equivalently configured PC.
And with all the add-ons for Console machines, such as keyboards, support for USB controllers, Hard Drives, Ethernet; the only real difference between consoles and PCs is that consoles always have the exact same hardware (things like GPU and CPU) that software developers can expect, whereas PCs have widely varying hardware; also, the Consoles are purposely locked down for reasons I can only guess.
This is all well and good, but as I noted, my Brother has gone through at least 3 Playstation 3 consoles. He wasn’t throwing them around the room or anything, I doubt he was abusive to them at all. And yet- they stopped working in one way or another. The failures of Xbox machines is no less of a problem. Meanwhile, my Super Nintendo is 20 years old and still works perfectly fine. A commonly cited “excuse” is that the machines are more complicated. Well, these people need to take a good hard look at the schematics for the various SNES ASIC chips and perhaps re-evaluate their definition of complicated. The only change is that newer consoles have more mechanical parts and they generate more heat and are squashed into as small a form-factor as possible. It has nothing to do with them being “more complicated” and everything to do with them being built out cheaper components than a PC (to justify the lower price point) and makes all hardware issues “non-user servicable”, unlike, say, a PC. This was a acceptable policy for things like the SNES or the Sega Genesis or earlier consoles of that nature; most of the issues that those consoles have are the result of loose connections that typically require Soldering knowledge to fix properly. But now, that sort of policy is sort of silly, since a lot of the problems with modern consoles are relatively simply in comparison, and many enthusiasts who know what the issue is could fix it themselves, if the machines themselves weren’t put together in a way that dissuades attempts to dissassemble- things like special screws (Torx); again, warranted when the device innards were generally something that wasn’t user-servicable to the typical enthusiast, but now it’s just a artificial barrier to make the machines seem less user-servicable than they are. And, more to the point, the fact is that they simply fail more often now, and it seems like it would be in the company’s best interest to make them more user-servicable since that would mean fewer warranty repairs. (Obviously they can keep their old “take it apart and void the Warranty” thing.
So, as mentioned in the previous post, I added a “sort” of scriptability to BASeBlock.
I made some tweaks, and refactored the code so it was a bit more abstracted; the original implementation was directly in the MultiTypeManager, but that didn’t really have anything to do with it, so I tweaked some of the parameters to a few methods there, added a new class with the static routines required for the needed functionality, etc. I also made it so that a “BASeBlock Script Group file” (.bbsg extension) could be used to both compile a set of files into an assembly, as well as include various other assemblies as required. Future additions will probably include the ability for each assembly to define a sort of “main” method, which can be called when the assembly is initialized.
However, once again, Serialization was the constant thorn in my side. I was able to mess about with a custom block written in a .cs script, and it even saved properly.
But the game encountered an exception when I tried to open that LevelSet; I forget the specifics, something to the tune of “failed to find assembly” type of error. What could I do?
What this basically meant was I was going to have to learn even more about the Serialization structure of .NET. Specifically, SerializationBinder’s. The concept was actually quite simple. You basically just derive a type from SerializationBinder, and use that as the .Binder property on a IFormatter class, overriding one method seems to be enough for the most part:
Simple! it gives you an assembly Name, a Type Name, and you simply return the appropriate type. The reason the default implementation wasn’t working was certainly as a result of the assembly being loaded dynamically, since it wasn’t [i] really [/i] being referenced by the BASeBlock assembly, so the default implementation didn’t find the “plugin” class assembly or the appropriate type, so threw an exception.
The trick here is not to enumerate the referenced assemblies, but rather to use all loaded assemblies in the current AppDomain. The general consensus with regards to using CodeDOM and compiling things like this is to compile them to their own AppDomain; however, since the assemblies were being kept “alive” for the duration of the application, that wasn’t necessary, and in this case would have complicated things. Well, it would have complicated things more than they already were.
The “AssemblyName” parameter, however, was more akin to the FullName property of the System.Reflection.Assembly; for example, BASeBlock’s assembly would (for the current version) be passed in as “BASeBlock, Version=1.4.0.0, Culture=neutral, PublicKeyToken=null”. Since we are only interested in the actual name of the assembly, we can simply grab everything up to the first comma.
Armed with the Assembly’s base name, we can start enumerating all the loaded Assemblies and looking for a match:
Then, we compare the Assembly.FullName.Split(‘,’) [0] (the text before the first comma) to the modified string, BaseAssemblyName that was changed in the same manner. I decided to go string insensitive for no reason; mostly because the assembly names for the scripts are formed from the filenames and I wouldn’t want filename capitalization to prevent a script from serializing/deserializing properly. If we find a matching assembly, we return the result of a GetType() call to that assembly with the same typename passed in as a parameter to the method. The Formatter will than attempt to deserialize the data it has to that type as needed.
There are a few issues with this- for one thing, it doesn’t work with Generic types. At least, I assume it doesn’t; I assume I would need some special code to get the appropriate Type for a generic type given type arguments. I’ll cross that bridge when I come to it.
Right now, I’ve not actually tested this extensively. My main concern would be to test that it can serialize in one session, and deserialize in another. This concern is based on the fact that the two assemblies would in that case be literally distinct- in that it would have been compiled on two occasions. Assuming the Binder is enough to convince the serializer it can deserialize something, there shouldn’t be any issues. Once I decide to figure out how to add Generics support to this Binder, I’ll definitely write about it here.
Oftentimes, when comparing software products in the same market, you’ll see comparisons made where one product has a “pro” over another based entirely on the fact that it doesn’t cost money.
I’ve never understood this. It doesn’t make any sense, when you think about it. Sure- if the two products are extremely similar in form and function, then the comparison is valid- because all other things are equal within a margin. But the problem is, when it comes to free software, they typically don’t stack up to commercial ‘evil’ proprietary Applications.
For me, I learned this by way of text editors. This is a very simple type of application, and one would assume that out of the bajillions of free offerings, one of them would also be easy to use, and meet my needs. This was the case, but I was stymied by what I found in a lot of them.
For example, I have often seen free, Open Source applications, such as emacs, vi, etc touted as “the de facto text editor” application, and held up as some kind of standard.
I have to be brutally honest here- if those are some sort of standard, then that is a pretty damned low bar.
How is this even something to consider for everyday text editing? It’s about on par with WordStar in terms of finger-contorting shortcuts, and it reminds me of edlin, except that it is powerful; That much I can see. But when I need to become a god-damned apprentice to a ancient VI master to learn how to use the software application in a way that fits my needs and need to “train” myself even longer in order to do so adeptly, I’ve lost. My time is not valueless . It doesn’t matter if the software was free, or if I can edit the source code. For one thing, I don’t try to judge software as if being Open Source automatically makes a piece of software sit on some sort of moral high-ground above others. I want my software to work and do what I need . That is it. software should be judged on it’s own merits, not on it’s license.
One thing I noticed with free text editors, was they all seemed to have too many features, poorly organized.
notepad++ is a fine application. But it’s menus are an absolute mess. Being Open Source doesn’t mean you can ignore basic UI Design guidelines. Same goes for the Graphical versions of Vi/Vim (gvim) and for emacs. I have no doubt these are powerful tools, leveraged by plenty of people worldwide. But I cannot personally justify the time investment it would take to learn these applications, when there are plenty of other applications that provide exactly the functionality I want in an easy to use package. Also, from what I’ve seen, becoming proficient in either emacs or vi turns you into a condescending douchebag. gedit is a fine application- it’s free. It has syntax highlighting, and it’s menus actually make some bloody sense, and yet time and time again I see Linux veterans saying it is only for “noobs”. I want to edit my text. That’s what it does. The problem they have is that they invested so much time in learning an overall badly designed (UI-wise) application, and now need to justify that time investment by putting down those people who avoided that time investment in the interest of getting things done.
The free software I found that met my needs at that time was Editpad Classic. This program was (and is) a closed source application. I didn’t, and still do not care. It did what I needed. Then, when my needs grew, I found the same vendor had a product called “Editpad Lite”, and I found that to be sufficient as well.
When I started this website, I needed a efficient way to upload and edit files to and from my webhost. Upon reading the descriptions of features for that same company’s paid offering of the same product (Editpad Pro) I found it seemed to fit my needs perfectly.
Ever thrifty, however, I decided to prowl the web for free software with similar features. Notepad++ had an FTP plugin, but it was unweildy, stubborn, and finicky. No other FTP capability seemed to match. So I purchased Editpad Pro, and I am still using Editpad Pro (still using version 6) to this day for this very capability. Being able to make quick changes to my news page, edit the PHP code of any file on my host, at the touch of a single GUI button is something that I value. Again, I value my time more then some self-inflated sense of pride. Sure, I could:
But I cannot see any reason to do that. I can do all of those. But why are they disparate tasks? All I want to do is edit a file on my webhost. Why is it that an editor cannot edit a file simply because it happens to reside on a remote server? Why do I have to go through an arcane ritual of download->Edit->Return to sender just to edit a single file? And why do people seem to think this is in any way superior to the time-saving method of simply using an application that does this properly ?
Returning to Open Source; It’s fine! I have no problem with it at all. I plan to release BASeBlock’s source code under the BSD/MIT license. But I don’t feel that an application being open source gives it value. The fact that an application is Open Source, in fact, means absolutely nothing to me. I only care about whether it does what I want. I don’t care if it has the potential to do what I want if I make changes and recompile the program, because that means it’s not free at all, costing me time I could spend not editing somebody elses program. People often tout the “Open Source” label, as if it matters. It truly does not. In the majority of circumstances, you don’t need, and you do not sanely want to view and edit the source code. How many people can look at the source code for perl, and make sense of it- only the maintainers. That is their job; even if they volunteer, thats what they like to do. But Why would your average user want to recompile the perl interpreter? I can’t think of a good reason. Same for nearly any other Open Source application. I’ve never downloaded and used a Open Source application and thought “hmm, it’s missing this feature- I know, I’ll waste the next two weeks staying up until 2AM and adding it”. No, what I think is “Hmm, this software application is missing this feature, I know, I’ll stop wasting my time using it and find something that does”.
I think the best summary I can come up with is this- Being Free or Open Source does not excuse sub-par design and implementation; and, at least in my opinion, I don’t see a reason to use any application based entirely on it’s license or distribution method. It’s almost as arbitrary as using an application over another because one of them is written by a catholic and the other is written by a jew. It’s a arbitrary and irrelevant to the meat of the matter which is whether that software does what you need it to.
I don’t have one. It’s impossible to form a opinion on a set of hardware and software that I’ve never used and have no intention on using.
EDIT:
(Thread in question is here : )
(I’m presuming the commenter here is the Mr.Bisquit from there, based on the second comment)
Yeah, You’re scared, especially when it comes that someone needs to search out an answer from you.
Scared of what? I didn’t post in that topic because it quickly devolved into you being a douche to anybody who posted:
7. A line is a set of points. (from the thread)
What is that? You know exactly what he meant, you were just being a giant douche, and the fact is by that point I realized that your question was probably just some sort of loaded trollbait in an attempt to allow yourself to express just how much of an elitist douche you were. Your additional responses that were designed to illicit a response from me “he’s afraid” afraid of what? what the hell is there to be afraid of!? That doesn’t even make any sense.
Actually- I think I know what that is reference to- the fact that I didn’t approve the first comment in the few days since the second was made. Actually, I only noticed the new pending comments today, when I went to write a new blog post. In that context, I do apologize for the delay, and can certainly understand the conclusion you came to (that I was maliciously censoring your comments) I wasn’t though, they are automatically moderated that way. I do have a question- if you ever return-
Why are you so fixated on me, anyways? I mean you posed a question specifically for me on CH and now you’re basically stalking me on my blog…. Why?
This is going to be much more difficult than it was to convince you to use a Linux distribution.
I was using GNU/Linux long before you were a known entity to me. You haven’t really convinced me of a whole lot, except that there is a hell of a lot of polarization and fanaticism on the xxxBSD side of the fence then I had original suspected. I mean, a good portion of Operating System/platform evangelists are self-righteous blowhards, but you have really raised the bar.
>>Makes me wonder about a programmer who mentions assembly
>>and C then clams up when it comes to “new” territory.
clams up? what the hell are you talking about? I didn’t respond to that particular thread because your question was clearly loaded, and second, because, as I noted here, I don’t have a “take” on it because I haven’t used it. I try to make a habit of not forming too strong of an opinion about something if I haven’t used it, but you aren’t making it very easy. I doubly wouldn’t know about running it on the specified hardware because I haven’t USED a PowerPC, nor a SPARC, and have barely even used FreeBSD on x86. I don’t have a powerPC. I don’t have a SPARC, and buying one or both kinds just because you’ve asked my opinion on running a specific OS on them would be pretty silly.
you use freeBSD. Good for you, really, I’m sure it’s a fine OS, clearly it suits your needs. I don’t use FreeBSD. Get over it. I already have it in a VM; I just haven’t done much after the initial install (like doing the appropriate googles to find out how to turn the basic # prompt with a relatively minimal set of commands into a usable desktop environment. But I will do it when I please. Some douchebag being- well, a insistent douchebag throwing not-so-subtle insults and insinuations my way is not going to help, because if that is what I’d be destined to become as a freeBSD user, I want no fucking part of it.
I suppose, as has been said frequently about many things, it’s not Free/OpenBSD I have a problem with, but some of it’s users. Same with Linux; hell, same with windows, or mac. It’s the evangelist assholes who seem to feel they have some sort of inner track to knowledge, that the OS they use is better, despite the fact that their measurement of what was better is using their own predefined yardstick that just happens to only cover the strong points of what they are evangelizing. They also all have a glaring weakness. You tell them a problem with their OS of choice, and they say it’s your fault. This isn’t specific to any OS at all of course. The fact is though, they all have problems. Evangelists of all kinds seem to think that pretending there aren’t any problems- or that those problems are minor- is a good thing. It’s not.
For example, as it stands now- you simply NEED to learn how to use BASH or whatever the included shell is with almost any Linux distro and with all the BSD’s I’ve tried; for the “simpler” Linux’s, like Ubuntu or Mint, people will often still need to use to the console to fix otherwise simple issues- like the package manager somehow getting into some weird inconsistent state and refusing to open; sure, it suggests what command needs to be issued, but in that case there are two problems:
For ages, running that command on my laptop would effectively hang that terminal until I forced it closed. Now this brings me to another point; I ended up just using the –help of the various package management tools (dpkg, apt-get) and found that apt-get had a “check” option, and was able to invoke that and discover that one of my python libraries was corrupt (or, “inconsistent” I guess), I then (using more inference) decided to simply remove, and then reinstall that package, which fixed my package manager issues. hurrah!
I’m not saying that was bad by any stretch, but implying that everybody is willing to go through that to get their computer working properly is utter nonsense. Some people think their computer is broken when the desktop background is wrong and they don’t know how to change it. Yes, they can learn how to change it, but the thing is, a lot of people don’t give a flying fuck about computers. This is something we more nerdy types, regardless of occupation, seem to forget. If Secretaries had the capability to learn about stuff like the command line, they wouldn’t be secretaries.
Basically, the adeptitude that many Linux and FreeBSD versions demand of their users is akin to demanding that everybody learn the specifics of architecture, wiring, roofing, insulation, beam installation, and so forth when they buy a house. Now, it’s true, that a fair number of people that purchase a home do in fact fix it themselves, and no doubt learn in the process; but there are others, who, again- are either too busy or simply don’t give a fuck and hire people to do it. They don’t want to learn about plumbing or wiring or roofing. They just want a house, just as some people don’t want to learn about files, streams, ports, hardware ports and Addresses, IRQs, DMAs, NMI’s, Compilers, command lines, or the details of memory. They just want a computer. Now, some on “the other side of the fence” from them, (including myself) may balk at such a concept “An easy to use computer, how absurd!” After all, in many ways the very “general purpose”-ness of a computer simply doesn’t lend itself to being “easy to use”; but it seems that should be what we are striving for. No Operating System ever created meets this lofty goal of being completely intuitive. My opinion in that context is that Mac Classic (Pre OSX, that is) was the closest to that. And, really, creating a completely intuitive interface is thought impossible; that doesn’t mean we should just give up on it. There are people in this world who aren’t interested in computers ; They don’t want to have to learn arcane commands to get their shit done. They just want to get their shit done. They don’t want to have to learn how to write a script to automate that task. This is not something that should be shrugged off as “well obviously they are an idiot” because get this, Computer’s aren’t the fucking world, even though the world seems to run on computers,and almost any occupation will involving interfacing with computers in some way or another. what we need is some fucking work on making those interfaces easy to use . not just flexible. In that sense, my “Take” on FreeBSD, which you’ve forced out of me through sheer willpower apparently, despite my misgivings that I haven’t even really tried it much, is that it makes absolutely no attempt to be easy to use and trades off at every point better flexibility and security for ease of use. The security concern is understandable, but if you are going to make something flexible, either make it flexible and easy to use, don’t attempt to call it a mainstream OS for everyday people, or don’t bother.
EDIT 2:
Welcome back
Why can’t the GUI application post the command?
1) All options are not available on the GUI but are available on the command line. The GUI is merely a front end to a command.
2) Every person that develops such an application is not aware of all of the options.
3.) Every command is not possible in every situation.
4) It may be assumed by the developer that the individual wants some control.
Specifically, I was speaking for the case of the Synaptic Package manager, which complains when started occasionally and suggests that the user run “dpkg –configure -a” Basically, why does it have to do this- could it not run that command itself? It basically acts as a front end for dpkg, from what I can tell. But, when it is suggesting to run that command- why can’t it do it? The only reason I’ve found for it is that it only fixes the problem 90% of the time, the other 10% of the time you have to figure it out yourself, all the while having the package manager suggest you run that same command each time it doesn’t work. The people developing it are clearly aware of the options they suggest, because they are- well, suggesting it. Response 3 makes sense in the more general case, but I was speaking (specifically) about the dpkg error from the package manager that basically told the user to run a given command to try to fix it- the thing is, the problem can be resolved entirely programmatically without user intervention- just by shelling out and performing two dpkg commands. #4 is a moot point, really- performing the tasks you are using the GUI to do manually defeats the purpose of said GUI. If a user wanted “more control”, they probably wouldn’t be using the GUI tool to begin with.
The choice of shell is up to the individual. In any Unix-like environment, one needs to know the command and its options.
But Why? Why do you need to know commands and their options to use the relevant GUI tool? Isn’t the point of the GUI tool to make it so you don’t have to use the command itself?
Shell programming is useless if you do not understand what you are doing.
Of course it is. I never say anything about shell programming though…
Nobody is fixated on you.
And yet, here you are, again .
A question was asked on one site and the answer was given on another.
The answer was given on another because by the time I saw the thread it had already turned into you saying it was “an open public challenge” or some other nonsense like that. A open challenge to… do what? At that point I felt it was some sort of flamebait or something so I didn’t bother to post there, also, because I didn’t really have an answer since I don’t have any non x86/x64 systems. The idea that asking somebodies opinion on something was a “challenge” still irked me though, so I posted this entry. (because by that time, the thread in question had been locked), if the thread was still open at the time I probably would have put this there instead. (in retrospect I probably could have created yet another thread).
It would have been easier and more direct to give the answer of “It doesn’t interest me at this time,” and have it end at that.
And what obligation am I under to answer any questions at all? None. And the I got from the thread that you seemed to feel I owed you something was another reason I abstained from posting at the time. I may very well have misread you in that instance.
Needless to say, Computers, and the internet, have become nearly ubiquitous today. And it’s no surprise that they have found a spot in our schools. However, the way I see it being taught in school feels somewhat backwards to me.
The common concept is that “children should be exposed to computers at an early age”.
my response is “why?” I mean, it seams reasonable at first glance- there is no doubt they will be a central pinnacle for both communication as well as data management of all forms- but people seem to think that only children can learn anything. You don’t need eidetic memory to learn how to use a computer. I didn’t even own a computer until I was 16, and that was in 2002 (or something) and it was a 20 year old computer at the time (286).
What did I use it for? I learned basic batch programming. Why? because that was pretty much all I was capable of doing with it.
That I feel is a failure of almost all Computer education courses; they teach what is current. They teach Microsoft word. They tell you key bindings, how to copy and paste.
None of them ever go into the history of such features, or of the computer as a whole. Computers are treated like an appliance- similar to the way nobody really cares about the history of the toaster.
“But computers are an appliance” you might say- that is true, to some extent- at the very least you wouldn’t be the only one to feel that way.
But you don’t find college university courses teaching Washing machine science or dryer science or toaster science, so it sort of presents the question of why the computer is different. Clearly it’s different from any other appliance- obviously then it will have to be treated differently.
This sort of argues against my previous point (that computers shouldn’t be taught it schools) which it does- but really what I mean is that computers shouldn’t be taught in schools as if they were appliances; when we learn about math, we start with the basics. When we learn about science (outside Texas, I believe it’s banned there) we learn about stuff like the scientific method, and sometimes it even get’s mixed in with some history.
Yet when now when children first learn about the computer, they learn how to format text in word. They are learning the utility and not the means of that utility.
It feels like the entire point is to emphasize and teach muscle memory and memorization of the functions of the appliance of the computer, rather then try to teach analytical thinking or critical analysis of problems; For example, I’ve heard of people saying that things are “impossible” merely because they aren’t implemented in their program of choice. This has two flaws; one is that sometimes the feature
This actually brings me to another point- It isn’t the computer itself that is the appliance- it is the applications the computer runs that are of appliance- in fact, the words themselves sort of give away the connection. What does this mean, exactly? Well, the way it is being taught and learned by many is as if the computer was the appliance, this isn’t bad per se but I feel it’s not quite the correct way to go about it for many people. The software is the appliance; people should learn how the software works, but they shouldn’t really need to have to know the details of it unless they want to. But, the very basics of the computer itself- the machine that is running these appliances- is something that should be required for somebody to own a computer. I don’t say this out of selfish elitism, but rather because confusion about the few terms that can easily be dispelled early on can cause those people myriads of issues later on down the road.
There are some people pushing for improvements in software so that people can “use the computer like an appliance; it should be intuitive, like a toaster or a microwave”; and one can see the logic in their reasoning. However, when we realize that the appliance is not the computer but the software itself, that changes the deal. The original “request” was basically to make it so people didn’t have to learn about software applications or hardware or memory or RAM or any of that stuff; however, when the appliance is the application, there is no excuse. When an instruction manual tells you to use a phillips screwdriver to remove the four largest screws on the back case, it makes several “assumptions” about what you already know; it assumes you know what a screwdriver is, what a philips head screwdriver is, how to judge size, how to know back from front, etc. This may sound silly, but really it’s not; after all, we weren’t born knowing what a screwdriver is or was for or how to use it, or what specific screwdriver types are, or how to accurately gauge distance and size, etc. These are all skills we developed over time. In the same vein, a software application manual shouldn’t have to describe to you the difference between memory and hard disk space when it quotes how much you need free any more then the aforementioned instruction manual should have to explain the difference between a flathead, Robertson, or Philip’s screwdriver. Neither should a software application be designed to hide these particulars from you any more then an appliance; aside from design considerations you can still see and access the screws holding a toaster together.
If anything, software is the appliance. Not the computer.
Whenever a new “discovery” is made of an ancient device like this one , it sparks debates about wether such a device is or is not a computer; in this case, by the commenters.
First, It’s important to note that the people discovering and working with these devices are Scientists they know damn well what they are talking about. There are far to many bloody armchair scientists who have this egocentricity that makes them feel like they are qualified to veto the findings and declarations made by the people working with this device hands-on for months and years based entirely on a short demonstration and explanation of how the device works. The people studying these types of discoveries are not homeless, educationless retards from the street; they are well-educated scientists who specialize in exactly that field, they know what they are doing.
The problems arise- well, at it’s core the reason is because so many people are egotistical morons – but also it’s because those ego-tistical morons don’t realize that “Computer” is a general-purpose term. Today, in common vernacular it generally means a desktop or laptop PC; based on this many people somehow feel that things like that described in the video are not really computers. In the comments there, there was even a debate about whether an abacus was a computer.
Of course it is. The person making that statement is clearly an uneducated troll. A Calculator is a computer; most people recognize that. But, a Computer does not need to actually perform any tasks on their own; a bunch of rocks are a computer just as much as our own fingers can be for counting or small objects. There is no requirement that a “computer” actually do the computing; in the case of us using our fingers we are using them more for “storage” then for actual calculation. But it still counts; a Computer explicitly means any device or devices designed to assist in the act of computation. So nearly anything can be called a computer. Of course whether something is technically a computer or not is a different story then that of whether people will understand what you mean when you say it; no doubt you would encounter any number of idiots who will argue your statements, much in the same way that there always seems to be a person in the room who has no idea what the difference between imply and infer are.
So I was bored and decided to update my Flash plugin, a chore that I recollect stopping in it’s tracks previously, for reasons I couldn’t recall. Main reason was that my flash plugin has been nearly constantly crashing on certain sites. Mostly due to the ubiquitous use of flash for advertisements, which seems to be one of the dominant uses of the technology.
So, I visit adobe.com and go to download the player. First, they try to shove a McAfee scan down my throat. You know the drill. They know we just want to get the hell away from them, so they decide to helpfully fill out the “default” options for us, which just so happen to correspond with the options one would need to choose to give them the most revenue.
So I finally manage to get past that brigade of crap, and then it asks to install software. fair enough- that is what I was doing.
Much to my chagrin, however, it isn’t installing flash, it wants to install Adobe DLM, DLM I assume stands for DownLoad manager, although it could very well stand for Dingo-Llama-Mammoth for all I care.
let’s analyze the sequence of events so far:
Every single fucking program I download wants to install a god damned download manager! how many bloody download managers do I need? Am I going to need a download manager manager to manage all the download managers that all manage only the specific downloads from that specific company? Is there something wrong with the concept of downloading a program, I don’t know, using the conventional browser method? You know, like any other sane person? No, Adobe has decided to decide for me. “We won’t install Flash like you wanted, but we will install a download manager that will consume resources indefinitely for this one-time installation of Flash. Then it will sit in the background and make sure your updated, because god forbid if your version get’s out of date!”
Which brings me to another rant, Versioning. I mean, I totally understand why you might want to have the latest version of an application- it fixes bugs, adds features, and so forth. and being notified, and even having the opportunity to update with a few clicks is very convenient. I have no beef with the concept.
What I disagree with is this whole “OMG if you aren’t updated to the latest version you will get haxored!” there are people who say this about every bloody program. It’s understandable for browsers, and for a number of browser-based/web-based technologies, as well as things like the .NET framework, and of course the core of windows itself. But, seriously, the main reason you update a program is to fix bugs and add features, and hope that the bugs and security concerns that a new version adds (And they always do, unless the change is extremely minor) don’t outweigh the benefit of having the known vulnerabilities and the existing bugs eliminated.
Additionally, this very mantra is proposed on applications that have little relevance to web technologies. I mean, Microsoft Word has been relatively unchanged since version 6, with of course downlevel changes (which I’m sure took a lot of effort, I’m not downplaying that) But the fact is the entire purpose of the program is to be a word processor. The fact that it now represents a bloody programming platform should be some indication that they might have sort of lost their focus on what the program is supposed to do. It’s supposed to make it easy to edit documents, not make it easy to program spam e-mail merge programs or even be a platform from which to launch your own applications.
I don’t mean to pick on Word or Microsoft by any means- this seems to be a problem with a global scale. It’s a complex with versioning. If somebody has a problem, and they don’t have the latest version, that is automatically the cause, and truly, this attitude, or more precisely, the logic behind me, continues to elude me. They don’t understand the various downlevel changes, and half the time the release notes and changelog for said program mention nothing even remotely relevant to the various issues the person might be having.
Going almost hand-in-hand with the “download manager” syndrome is the “background updater”. Each company seems to have it’s own. You’ve got the Adobe one, the one from, say, Google, Apple, and so forth. And every single one of them is sitting in the background making sure I’m “up to date”. The problem here is that they all have to same goal but they all have very different UIs and they all act entirely different and essentially have different paradigms. This is something where Linux has the right idea; the package manager can update any package you install through either the GUI package manager or through a apt-get command in the terminal. The thing is, the environment is different; Linux programmers have no problem submitting their updates and new packages to the essentially neutral repository folks. With Windows, the best solution, which is the integrate this all into Windows Update, is owned by MS, which many of the companies who would have their software in it are competing with, which seems a bit like a conflict of interest; who knows if MS will “accidentally” forget to update users of competing products?
Back to the various “update” managers, they don’t simply update the programs you already have from their company; they also inform you of “updates” to their other products. The Apple update software makes sure you know when a new version of Safari is available, even if you only have iTunes; Google’s updater makes sure that you’re fully aware of when a new version of Picasa is released. And so on.
In conclusion, suffice it to say that currently update and download managers are wholly unnecessary (especially with the latter) and a huge pain in the ass for everybody.
Microsoft.
It’s unheard of to find a person who hasn’t at least used a Microsoft product; it’s even less likely to find somebody who hasn’t been exposed to it. As it stands now, there are essentially three “camps”:
1. People who think MS is successful not by chance or by “copying” anything, but by coming up with good ideas as well as creating good implementations of other ideas;
2. Open Source zealots, who spend much of their time criticizing microsoft for copying Apple and then turn around and copy both MS and apple in creating their desktop environments; Additionally, the Open Source zealots who can’t write a line of code and push the “Open Source” concept because it basically means “free software”
3. Generation 2 Apple Users; the type who think the Mac Classic sucks and apparently don’t realize that OSX is pretty much just a desktop environment for BSD; I cannot think of a single reason to ever buy a mac today, personally. The Original Macintosh Versus the PC-DOS had clear advantages in that it posessed a GUI, wheras DOS was a Command line interface; this beckoned the higher price tag for the product. Today, OSX offers no features that cannot be found easily on either windows, or a free Linux desktop environment; the claim is that you are paying for “quality hardware” that “just works” But truly you’re simply paying a tax to become a member of an exclusive club; It’s not the machine or the functionality Mac users are after anymore, it’s the symbol of success that it essentially provides. “hey, I have lots of disposable income to spend on overpriced toys” is the message it sends.
The common argument is that Microsoft got to it’s dominant market position via “strong-arm” tactics, and by “copying” ideas. First, when you run a company, and an opportunity arises, you don’t think “golly gee, I sure hope this doesn’t hurt my competitors”. The word “competition” especially with regards to software has somehow lost all meaning; people like to think that there is no competition, and there certainly is less of it today. But it’s not Microsoft’s fault that nobody is coming out with products that can compete with theirs; Just as it wouldn’t have been Apple’s fault if MS had not been able to launch windows to compete with the macintosh on the PC; it’s called business.
“Copying” is an interesting word that people like to use to describe Microsoft’s business strategy; however, there are two flaws with this approach:
it implies that they “stole” something, when in fact they saw a good idea, and implemented it themselves. One could posit the question, “if they weren’t supposed to copy, merge, and combine features, what the hell are we working towards?” In fact, the bitter irony here is that this line is often uttered by Linux users, who seem to forget that their OS of choice has lagged behind both Apple and Microsoft and has “copied” features from both; in fact, one could say that the entire concept of building upon each others code is the very concept that Open Source Software pushes; so hearing Linux users say this is sort of ironic in that they are implying that their Open Source philosophy is somehow only a good one when applied to Open Source.
Did windows “copy” a lot of features of Apple’s Macintosh? of course they did. When you are building a car to compete with other cars, you use the same shape for wheels; you don’t redesign the wheel; additionally, when somebody says that Microsoft steals “ideas”, the term is really useless. despite the aura around intellectual property, just thinking about something doesn’t suddenly mean that somebody else creating an implementation of your idea is stealing; an idea takes an armchair and a few minutes, and absolutely no physical effort. Implementing an idea is the hurdle that any technologist, during any era of computing had to get across; an idea is useless without an implementation. If I was to think up some new type of program, but did fuck all to create any prototypes or anything to that degree, I can’t in all fairness say that somebody “copied my idea” when they come up with an implementation; there was nothing to copy. ideas are physical objects. Some may say “but the Apple was an implementation of an idea” And yes, of course it is. But consider this; Windows runs on the IBM PC; the Mac OS environment runs on the Macintosh; consider for a moment that if apple had won the litigation against Microsoft, the IBM PC’s potential for showing a graphical environment would never have been realized. One could breakdown into a number of alternate history theories about what could have happened that go in all sorts of directions, but the truth is, it’s impossible to truly say what would have happened, simply because it didn’t. And now, the concept of a GUI that uses the same metaphorical approach is essentially the common denominator; what Microsoft naysayers are implying is that this is a bad thing; they are implicitly supporting the older paradigm where every single machine was managed in some completely separate way; That doesn’t help anybody.
Another thing that MS is criticized for is lack of innovation. To be perfectly frank, this is absolute bull shit. First off, if this was the case I don’t see how other companies aren’t equally guilty; and the fact is that it’s not the case.
Take, for example, the Windows 95 start menu; no other GUI implemented anything of this sort; the taskbar was an innovation because it made it possible to manage all the various running tasks in a always visible location; this was done through observation of their customer base, who would complain that their programs would “go away” because you no longer had a visual indication of them running (another window covered them, and they are essentially gone). Take the Windows Vista Start menu; the search bar is not something I had seen established in any major competing Graphical User interface before that. It addresses the previous criticisms of the Start menu whereby the various folders and icons would often fill the screen as you install/uninstall applications. However, nobody saw it like that; instead they decided to focus on the negatives, such as the higher system requirements. Err, HELLO, each version of windows has higher system requirements then the last. This is hardly surprising, and the fact that Vista implemented a new Desktop composition system (“Stolen” from apple, despite the fact that this was sort of a natural extension to the desktop given the ubiquitous availability of 3-D hardware on even the most value-oriented computers), as well as the larger gap between the XP and Vista release pretty well explain that.
Another example: take the Office Ribbon. Despite it’s detractors, it has become hugely successful and people have in fact found themselves more productive with it; this is because rather then thinking about the problem for a few seconds and then dismissing the current solution as “we shouldn’t change it because I don’t like change”, they actually looked at what they had, and realized, “holy shit, we have too many menus/toolbars and crap here” And they came up with a solution. The thing is, the ribbon made users and developers alike rethink the sort of common user-interface paradigms that we have become accustomed to, such as menus, buttons, and so forth.The heirarchal Pull down menu system was an extension on the “basic” pull down menu, where each menu title only had a single set of options; there was no concept of submenus within those menus (known as heirarchal menus). However, at some point, that model stopped working; the menus hd way too many options. The natural method was of course to group those options heiarchally; here are the options for Inserting an object, here are the options for how to format cells, and so on. The ribbon is a testament to the fact that there is no magic bullet method that works well in all situations; a program with three options can work well with just three buttons in a window; however if you have 10 options, you better use a menu, and with 50 or so options, you’ll need to arrange that heirarchally.
It’s important to realize that Microsoft is not pulling the industry on it’s coat-tails by mistake; the fact is that even their competitors are playing catch-up with their technologies, and before they can release a product that even attempts to compete with them, MS has already released another version. It’s not a lack of innovation on Microsoft’s part that is causing this, it’s a lack of innovation on the competitions part.
Much of this is different when you look away from desktop applications and operating systems and instead look to the world-wide web. Instead, we find Google has essentially cornered almost every facet of the internet; however, they carefully crafted their approach so despite them essentially doing the exact same thing to the web as Microsoft did to the OS and desktop applications markets, they are still regarded as “good guys” which is a particularly intriguing revelation.
This brings me to another point: Internet Explorer.
Web Developers – including myself- hate trying to work with Internet Explorer- it doesn’t work like the other browsers. People like to blame MS for this. But it’s actually the W3C.
Take for example some of the early draft specs for HTML4 and CSS and the DOM. W3C said “alright, we might make it like this, but no promises.
And all the browsers ran out and implemented it. Then the w3c went to ratify the specification and decided “hey, you know what? All the stuff we have in that spec that only IE has implemented so far… let’s rip those out. And they did. So now IE suddenly had “non-standard” features that were in fact originally in the spec and simply not implemented by Netscape or whatever the other browsers were at the time, because only IE bothered to implement those particular portions according to the specification. Which brings me to another point- the specifications are about as vague as possible. If your specifications are open to any sort of interpretation, they aren’t specifications, they’re handwavey suggestions. IE was the first browser to implement the CSS Box Model according to the specification. Then W3C ripped out that entire page of the spec. Now, they pretty much said that, but what is most interesting was that almost every single thing they took out of the spec was only implemented by IE and every single thing they added to the spec that wasn’t before were non-spec stuff that was added by other browsers. Seems a bit unfair.
Now, it’s gotten better in recent years, but it’s also gotten worse. MS refuses to implement any feature that is non-standard or not in the spec- because they know the w3c is some sort of demon spawn that purposely messes around the spec as much as possible just to fuck with IE’s implementation. meanwhile, the w3c is all friendly with Firefox and Opera and all the other implementations. It’s like a god damned love circle.
And then you have that Anti-trust nonsense. I’ve never really understood that. I mean, ok… we’ve got Netscape (with err… Netscape) and Microsoft with Internet Explorer. When IE was being charged for it was all cool.
But then they started giving it away free with the operating system! HORRORS OF HORRORS! Obviously they are TRYING to suffocate Netscape! I mean, that might have been a secondary reason, but for fuck’s sake, why the hell was Netscape their only god damned product to begin with? I mean, how many years were they in business with a single product? And many people say “well, golly, why would they spend money to make IE and then release it for free?” I don’t know. why the hell did they spend money to redesign paint in Windows 7? The way I see it, Microsoft looked at the internet, saw- hmm, this is becoming as ubiquitous as simple text editing, word processing, basic bitmap editing and recording short sound clips, we should distribute a way to do this with the OS. And that’s what they did. But suddenly it’s a big no-no because the slow company that had a single product that did the same thing that they charged for were all “hey, no fair, we don’t know how to sell more then one product so that’s Anti-trust!” It would be like a company that sold a basic text editor claiming anti-trust when Microsoft *GASP* included a text editor with MS-DOS 5! the NERVE of the company! How dare they include basic tools that increase the usability of the Operating system! DAMN THEM!
I mean, Anti-trust stuff is supposed to protect the [i] public [/i] from a monopoly. Not slow to change companies that don’t know how to create more then one product from other companies that happen to be able to create that same relatively simple to create (browsers were hardly that complex) applet and include it with the OS.
And nowadays the hubbub is all “OMG! they should let you choose your browser when you install windows!”
What the FUCK is that? should they let you choose from a set of other free text editors you can use instead of notepad? No, because if you want another editor you download another editor. should they offer other free alternatives to Paint Or Wordpad or Sound recorder (which actually transformed into useless with the latest ver. in win Vista/7)? No. that would be stupid. But apparently they are supposed to quite literally present a choice amongst their competitors in the browser market. Why only browsers though?
No, Not the kissing disease, Infectious mononucleosis, the open-source .NET CLR interpreter and class library.
.NET; I might have ranted about this before, if not on my blog, elsewhere. most of my arguments were against it, being a VB6 using ignorant buffoon. In any case, I’ve found C# to be an awesome language. One of the obvious downsides is that for the most part programs written in C# using Windows forms cannot be run on other systems.
The concept of Mono is to change that; remember, C# isn’t a Microsoft standard, it’s an ECMA specification, and Microsoft holds no copyright over it or anything like that. Mono is a relatively huge undertaking; the creation of something on the scale of a Virtual machine as well as a class library is gargantuan, and of course there is very little hope for 100% success.
On the whole, Mono performs it’s primary goals admirably; there is a GTK# framework that can be used to develop windowed applications… of course then the installation on a windows PC would require the install of the Mono GTK# framework, but I digress. In any case, applications can be developed and the C# code interpreter (for on the fly syntax highlighting) as well as the compiler are top-notch and seem to work well.
My only beefs can of course be in the class library. Of course, re-implementing the class library provided by MS on non-windows systems is not something that can be done in a single afternoon; this stuff takes time. My attempts to create a Mono-compatible project have been stifled, however, by seemingly innocuous issues. AlLlow me to explain.
As many reader may be aware, I have been working on a “upgrade” of sorts to my now ancient “Poing” game, which can be found on my downloads page; the original game was written in Visual Basic 6, and, in it’s earlier incantations didn’t have a single Class; it was all based on User-Defined Types (structures for those privvy to C parlance) and functions; (short explanation: it was made before I understood classes). Later, after I had learned about classes, I refactored everything into classes. This is all rather redundant; in any case, I have since created a new project in C#, in an attempt to learn about GDI+ as well as what appeared to be a different (in some ways) painting model. As one can see by the youtube videos I have posted on it, development has gone well.
The idea occured to me, after Tux2 (of http://www.jrtechsupport.com/) managed to create a Mono-workable, if soundless, version of my earlier C# game, BCDodger that worked in Linux. Sound was unavailable as a result of my choice of sound library, the IRRKLANG library, while truly usable in Linux, doesn’t have a wrapper that works in Linux (or something, I don’t know… it uses DSound or something, I forget). In any case, I have since added the ability for various sound engines to be used, and have added working implementations for Open-Source and Linux-available Sound systems, such as NBass (as well as a broken fmod implementation, let’s ignore that though).
Much obliged, I had decided to try to get it working via Mono as well; this was facilitated by my recent reformatting of my laptop to run a dual boot Windows 7 and Mint 10 system. Installing MonoDevelop and all that, etc.
So, I of course open the project in Monodevelop, quite ready for errors relating to porting.
The version I am using is MonoDevelop (and I assume also Mono) version 2.4, for those following along.
My first hurdle was getting my Appdata files for the program in the right location; on windows systems they are placed in the application data folder; so too they would need to be on a Linux system. Thankfully, a quick C# program run on the Linux machine cured this issue:
using System;
namespace specialfolders
{
class MainClass
{
public static void Main(String [] args)
{
foreach(Environment.SpecialFolder sfolder in
Enum.GetValues(typeof(Environment.SpecialFolder)))
Console.WriteLine(sfolder.ToString() + "=" +
Environment.GetFolderPath(sfolder));
}
}
}
Which gave me, on a Windows system:
Desktop=C:\Users\BC_Programming\Desktop Programs=C:\Users\BC_Programming\AppData\Roaming\Microsoft\Windows\Start Menu\Programs Personal=C:\Users\BC_Programming\Documents Personal=C:\Users\BC_Programming\Documents Favorites=C:\Users\BC_Programming\Favorites Startup=C:\Users\BC_Programming\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup Recent=C:\Users\BC_Programming\AppData\Roaming\Microsoft\Windows\Recent SendTo=C:\Users\BC_Programming\AppData\Roaming\Microsoft\Windows\SendTo StartMenu=C:\Users\BC_Programming\AppData\Roaming\Microsoft\Windows\Start Menu MyMusic=C:\Users\BC_Programming\Music DesktopDirectory=C:\Users\BC_Programming\Desktop MyComputer= Templates=C:\Users\BC_Programming\AppData\Roaming\Microsoft\Windows\Templates ApplicationData=C:\Users\BC_Programming\AppData\Roaming LocalApplicationData=C:\Users\BC_Programming\AppData\Local InternetCache=C:\Users\BC_Programming\AppData\Local\Microsoft\Windows\Temporary Internet Files Cookies=C:\Users\BC_Programming\AppData\Roaming\Microsoft\Windows\Cookies History=C:\Users\BC_Programming\AppData\Local\Microsoft\Windows\History CommonApplicationData=C:\ProgramData System=C:\Windows\system32 ProgramFiles=C:\Program Files MyPictures=C:\Users\BC_Programming\Pictures CommonProgramFiles=C:\Program Files\Common Files
Nothing particularly out of the ordinary there. So, running the program on a Linux machine:
Programs= Personal=/home/bc_programming Personal=/home/bc_programming Favorites= Startup= Recent= SendTo= StartMenu= MyMusic=/home/bc_programming/Music DesktopDirectory=/home/bc_programming/Desktop MyComputer= Templates= ApplicationData=/home/bc_programming/.config LocalApplicationData=/home/bc_programming/.local/share InternetCache= Cookies= History= CommonApplicationData=/usr/share System= ProgramFiles= MyPictures=/home/bc_programming/Pictures CommonProgramFiles=
which gave me what I needed: the appdata folder “BASeBlocks” needed to be copied to /home/bc_programming/.config.
Doing so was easy enough; the file manager on Mint 10 (dolphin) is different from windows explorer but hardly paradigm-breaking.
That copied, I simply threw the source folder as it was on the Visual Studio 2008 projects folder into the MonoDevelop projects folder (well, not really, it was /home/bc_programming/projects/ which I suppose means that any program that uses a projects folder will use it, oh well.)
psyched as I was I ripped into it with MonoDevelop, ready for anything! well, nearly anything.
My first error occured on line 107 of “Block.cs”:
mPowerupChanceSum = Powerupchance.Sum();
Java programmers may be thinking “ew uppercase characters” to them I say be quiet you. Anyways, the problem here was that there was no “Sum()” Extension method defined. Which I found odd. Oh well, though, I simply created my own:
#if MONO
public static class monoextensions
{
public static float Sum(this float [] floats)
{
float accumulator=0;
foreach(float loopfloat in floats)
accumulator+=loopfloat;
return accumulator;
}
}
#endif
this solved the immediate issue of the “Sum()” extension method. (For more info on C# extension methods, see here )
My next hurdle was on line 540 of cBall.cs:
if (wholeref.Blocks.Count((q)=>q.MustDestroy()) == 0)
The error was something to the effect of not being able to pass a delegate or method group to a lambda expression.
oddly enough, the fix was the change the “q” to an x… and after it successfully built I was able to comment out the “new” line (with the x rather then a q) and uncomment the original. very odd.
In either case, now I was confronted with what I knew to be the biggest issue; the fact that I had to now discover how to set it up so that I was able to use the same nBASS library, but so that the nBASS library was “silently” made to use the BASS.so linux library, rather then bass.dll which wouldn’t load either way.
The first step in this process was in finding bass.so. Hoping for the best, I pulled up good ol’ synaptic package manager.
No luck there
so, I went into the depths of the internet….
the BASS for Linux (note the lack of the n prefix; it’s the core BASS library that the nBASS dll is wrapping) can be found here
this topic; or, the original post, to be precise, gives the download location for the Linux source files for BASS 2.4, which can be found at http://www.un4seen.com/stuff/bass24-linux.zip
So, I downloaded the zip file, extracted it to a folder, and am about to attempt to compile it. (there is a libbass.so that I could probably try, but I think I’ll compile it myself instead).
Before I continue, however, I would like to mention something that has most impressed me about Mint 10; the multiple desktops. Now, this is hardly a new feature; programs can be downloaded that do this on windows, and windows itself has built in API support for multiple desktops; however, what impresses me most is that when you activate a window on another screen, it switches to it; what I mean is, for example, in this instance my FF download window was on another desktop (no idea why) and when I went to open the downloads window via Tools->Downloads, it did the fancy compiz box animation (as I have selected in preferences) and switched to it. very cool. But enough if my gushing over the unexpected presense of sanity in the UI design of a Linux desktop environment! back to my attempts to get BaseBlock working on Linux.
my attempts to make the bass project, however, failed:
bc_programming@Satellite ~/Projects/bass $ sudo make make -C 3dtest make [1] : Entering directory `/home/bc_programming/Projects/bass/3dtest' cc -Os -I/home/bc_programming/Projects/bass -L/home/bc_programming/Projects/bass -lbass -Wl,-rpath,/home/bc_programming/Projects/bass `pkg-config gtk+-2.0 --cflags --libs` `pkg-config libglade-2.0 --cflags --libs` -export-dynamic -D'GLADE_PATH="/home/bc_programming/Projects/bass/3dtest/"' 3dtest.c -o 3dtest Package libglade-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `libglade-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'libglade-2.0' found 3dtest.c:7: fatal error: glade/glade.h: No such file or directory compilation terminated. make [1] : *** [3dtest] Error 1 make [1] : Leaving directory `/home/bc_programming/Projects/bass/3dtest' make: *** [3dtest] Error 2 bc_programming@Satellite ~/Projects/bass $
Oh the humanity! now I had to learn about this package nonsense. I first suspected perhaps, as evidence by the fact that it wasn’t found, said package wasn’t installed; so I did a quick sudo apt-get install libglade-2.0 … it reported it was installed already.
after a bit of effort, and installing a few dev packages, I gave up. I was able to resolve the missing dependencies but then it complained about a missing .h file (which was indeed missing and clearly should have been present) so I gave up on that, and am at the time currently trying to simply use the .so file included. An additionally problem that arises here is the obvious fact that I am using a x64 Linux system, working with C# code written on a x64 windows system but targeted towards a x86 system, problem being that to my understanding Linux is not as lenient when it comes to architecture differences; but I suppose I’ll figure that out for myself if it’s the case.
In any case, I am now attempting to get the nBASS library to wrapp around libbass.so rather then bass.dll; from my research if the imports are the same I should have no problem creating a dllmap entry in the appropriate config file. From the documentation it would seem that discovering where that config file goes is left as an exercise for the reader.
Actions:
pasted libbass.so in the “Debug” folder (alongside the dll).
Copied the BASeBlock.config file from the project root to the debug folder; renamed to Bass.Net.config.
opened preceding file in gedit; it now looks like this:
< ?xml version="1.0" encoding="utf-8" ?>
And now, I attempt to run BASeBlock… recall that it now compiles on Linux, so it’s just a matter of making it work. I could, in a worst case scenario, construct a “nullsound” driver that simply stubs out the sound playing interfaces. But that seems like a bit of a cop-out. IN any case, attempts to run it resulted in the same error; clearly either the documentation I was reading was incorrect or I was not interpreting it properly.
I did a few more googles and came upon this page, which, despite being about something completely different addressed the same problem; that is, translating the dllimport(whatever.dll) into imports of functions from Linux .so libraries. namely, it told me where the Mono parameter file was- /etc/mono/config. I quickly opened the feller using gedit:
I tossed in the line:
and crossed my fingers…
It still didn’t work. I guessed maybe mono only loaded that stuff up when it was started? So I restarted monodevelop.
excellent! a little progress. Now I was still getting the error, but it was complaining about libbass.so missing. At least we’re getting somewhere.
It still should have found the file; however, I decided that instead of just throwing it in the app directory (because god knows where Mono is truly looking for it; even putting ./libbass.so in the dllmap failed, so Mono clearly thinks something else is the “current” directory. Instead, I decided to simply cp it somewhere globally accessible;
It still didn’t work.
Anyway, I messed around with the config file and the dllmap attribute and no matter what I put it it refused to find the file; clearly I’m missing something obvious (maybe capitalization? a missing slash? who knows). In either case I decided to defer that work to later on; I’m sure there was more to be fixed afterwards.
So, I created the aforementioned “Null Sound” driver; it worked fine. compiled alright. Encountered a bunch of issues during startup relating to my use of the \ as a path separator, whereas Linux uses /, fixed this with a simple Replace to change all slashes to the slashes of the OS (Environment.PathSeparatorChar).
It still refuses to start; Some gdi plus error. I have no idea how to workaround this, since it seems to be related to the windows forms, and has nothing to do with my own code, but rather with some configuration option. I recall Tux2 working around a similar error in BCDodger but I wasn’t paying very close attention and forget what the fix was, or even if he mentioned it. Either way, at least now BASeBlock compiles on a linux system, and most of the code-related oversights have been resolved.
EDIT:
I’ve managed to solve both issues; not at once of course.
First, the loading issue was fixed; pretty troublesome. In my attempts to resolve the problem I created a number of projects that used the same Image.FromFile() method to load pictures, and they worked fine.
Clearly, the problem then was not in what was not visible; the difference between the two. I realized that the difference was pretty clear: in my test projects, I was loading the images from within the form’s Load event; in BASeBlock, they were being loaded in a static constructor. So I decided to try to load the images elsewhere; I converted the static constructor to a static function, and called that function in the form load; there were a few other changes that I needed to make, mostly in the form of initializers attempting to use values that wouldn’t have been initialized.
The game started and ran fine with the NullSound driver.
Now, to fix the Sound; I opted to try to get nBASS working.
the solution was actually quite simple; merely a dllmap for bass.dll to libbass.so, and placing the x64 libbass.so in usr/lib was enough, and sound worked fine.
Unfortunately, it’s still slow as hell but at least I think that’s Mono’s fault.

Categories
Tag Cloud
Blog RSS
Comments RSS
Last 50 Posts
Back
Back
Void « Default
Life
Earth
Wind
Water
Fire
Light 