I've never been asked certain questions, but I can tell you without looking that the printf specificiers are on page 151 of K&R C in the first edition, and on page 155 in the second. I used to forget all the various format specifiers and rules. I haven't used them in so long, that I don't care any more. However, I still remember the page number.
I used to know exactly the page that function pointer syntax was described in the Harrison and Steele C book (Not sure if Harrison is the right guy, but Steel was the other author). I've since forgotten it and now remember, http://function-pointer.org.
When I was still boning up on C++ I could tell you the chapter headings of most of the chapters in Strousops book. I haven't read the book in so long it's ridicilous. I can still tell you which books introduced me to which topics, and other better references I've found on that topic since then.
The sad part is I've used function pointers regularly enough now, that I can tell you how to do everything but a function pointer to a member function off hand. I can generally figure out a pointer to a member function in fairly short order given a compiler.
Yeah, I irritated several people, and made a lot of people in the registrars office laugh when they asked for my name, I just gave them my SSN to save time. Everyone understood it was an implication that I was just a number at the University.
It actually saved time. It was the next thing they were going to ask for anyways, and they wouldn't do anything to my records until I told it to them. They didn't need to know my name, and if they did, it'd be on the first screen they pulled up if they felt the need to use my first name to make me feel like a person.
Yes, it was incredibly inefficient relative today, and you had to be fairly wealthy to actually back. They expected you to show up with collateral, or know someone who had collateral. There's a reason that Columbus had to visit several monarchs before he could get funding to buy supplies to go on a little trip in 1492.
Back in the day, banking was an "old boys club". That is to say, you had to know somebody somehow some way personally to do banking (or convince them you have some crazy idea that might work). Heck in the dark ages, I'm fairly sure they never loaned money to serfs, only to the lords and aristocrasty. Now, I never know the banker I'm dealing with. Heck I bought a home, and never met anyone associated with the people loaned me mony. Having people on staff to get to know everyone you want to loan money to is incredibly expensive. It's much cheaper to just have the computers generate a number for you.
However, there is part of me that harkens back to that day and age. I really hate certain things banks do. In the US at least, they loan nearly anybody money, and then force everyone who pays, to cover the debts of the people who default (see PMI insurance when getting a mortgage for instance). In aggregate it's a good system, but I am fairly responsible with money and wish I could have gotten out of PMI sooner (in the end, I did, but it wasn't until I started investigating what could be done that I figured it out).
Not true. If I found a buffer overrun in pine, mutt, elm, and/or whatever anyone else uses as a non-windows client, you could use that buffer overflow to propgate an e-mail virus.
It just so happens, that it takes an incredibly silly mistake. Text email clients have security flaws and fixes that must be applied. I'm sure one of them could be triggered by a specifically constructed e-mail.
That might all be true, however, your blanket statement that copyright infringement isn't a crime was blantantly inaccurate (it irritates me that people say it isn't a crime it's merely a civil offense, just like it irritates others that it's called theft, when it is in fact copyright infringement). If you had said, this doesn't qualify as criminal copyright infringement you'd have an argument to make. You are obviously knowledgable enough to konw the difference.
I'd find it fairly hard to believe they don't fit the legal definitions of "knowing infringement". For starters, at least 90% of the content was obviously in copyright violation once I went to look at it (assuming it is what it appears to be). That'd be like a bar owner saying, "I had no idea that gambling was happening in my backroom, I never go back there. All this despite the fact that I see people carry in poker books, cards, and gambling chips.". That a violation of the law is happening is obvious to even the most casual of observers in the case described above, and in the case of LokiTorrent.
This is a relatively new area, heck if nothing else, they could probably get charged with conspiracy (that's the fairly standard charge they get people who aren't involved in a crime but essentially facilitate or organize a crime in Organized Crime all the time). After taking a look, I think the MPAA has a legal right to tell these people: "You are infringing on my rights, stop it. If you won't, I'll get a court order that tells you to stop it". I think the court would be well within it's rights to explain that these people have an obligation not to continue letting this happen. How, and what parameters are set upon it, I'm not sure.
All that said, I'd have no problem with Congress enacting a law saying that this is criminal. That the technical minutia about where the bits are and went didn't exist when the original law was written.
That's not accurate. Copyright infringement has both criminal and civil aspects to it. I believe if you are committing copyright infringement for profit, you can in fact go to jail for it. People don't go to jail for civil offenses.
Here's a link to a DOJ document that specifically lays out the conditions for being considered a felony criminal offense in the second paragraph.
I'm not sure how precisely the technical aspects of "Torrents" (or Grokster) work, but it's not like a judge couldn't re-examine the situation and come up with a different ruling from what the ruling in Grokster came up with. Last I heard, 2600 lost their case for providing links to source code that could help you facilitate copyright infringement. If only because Grokster might have had some other legitimate uses, where as, Loki might not have such mitigating circumstances. At some point, I believe Loki will (and should) have to prove that it does provide a useful service that isn't blatant copyright infringement. If they can show that I think they have a right to exist. However, if they can't, I sure think that's tantamount to letting a landlord knowningly let a crime family use his facilities as a hang out. No crimes might be committed there, but it sure seems in the interest of the public to stop such places from existing.
Disclaimer: I've never used LokiTorrent, or any sort of BitTorrent software. So my premise that BitTorrent has uses other then distributing movies might be flawed. However, I know several smaller Linux distributions use bittorent as a method of distribution.
It's worth standing up and fighting it, if you have legitimate purposes behind your software. Identified copyrighted material should obviously be taken down. What would you say if they showed up to taken down all of the PoP's for your local ISP's. Obviously, they are facilitating copyright infringement. They are willfully participating in it. What would you say if they started taking computers away? What would you say if they started taking away copy machines? They are targetting a particular type of software that has highly legitmate uses. I think someone should stand up and get a court case to establish what the boundaries are for what a copyright holder can accomplish against someone whom they feel is infringing. It'd be wonderful to establish boundaries. The MPAA as far as I personally know, hasn't done the willfully stupid things that the RIAA has (recently at least, Jack Valentti was an idiot about technology as nearly as I can tell).
It is appearent that some of these sites need to have fairly stringent policies about posting copyrighted material. LokiTorrent might be one that has nothing to do but distribute copyright material. However, I'd guess that there are Torrent sites out there that act as seeds/mirrors/whatever they are called in the lingo, for legitimate purposes. If Loki feels it is one of those, they should stand up and fight for themselves. Bully for them. If they aren't, I hope they get smacked around legally before any really stupid legal precedence get set. A quick perusal of their site leads me to believe, they are an obvious copyright infringer and the MPAA has a legitimate beef. At least the MPAA appears to be targetting the proper people, unlike the RIAA.
Huh? Unless I'm misunderstanding my UNIX permission semantics (which is likely the case), if I can write to the file, I can destroy all of it's contents. However, the file still exists.
If I have write permission to the directory, then I can actually call "unlink" (UNIX system call which will delete a file).
Lacking write permission to the directory, I can't delete a file (or create a file). If I have permission to write to the file, I can destroy it's contents, but I can't stop the file from existing.
However, I believe in most modern UNIX filesystems you can set the "APPEND ONLY" attribute, which is handy for some things (log files), I want you to be able to write a the end of the file, but the prior contents must always exist.
You are correct mostly. Your usage of the word "extorting" is over the top, other then that, I'll mostly concede. No one extorted the money from the people. They willing showed up to participate because they felt it was a good value to them. There we no threats on behalf of the paper to publish a persons secrets if they failed to buy enough classified add space. That would be something that starts to close in on extortion by the paper.
However, the newspaper is looking at it correctly from their perspective also. I believe this some what analogous to "opportunity cost" in economics. "Opportunity Cost" in economics is roughly, "I did this instead of that". Think of it this way: In 1965 I invested $2K in a Ford Mustang, instead of investing it in Berkshire Hathaway stock. The Ford Mustang probably has a street value of $50K as a collectible (you should discuss the maintience and storage costs at which point a Mustang is probably a big loss, especially once inflation is accounted for). My guess is that Berkshire Hathaway stock would be worth $~10M. So purchasing the Ford Mustang cost you $(~10M - $50K). If you feel that owning the Ford Mustang over the years had more value to you then having the ~10M dollars in assests today, then purchasing the '65 Mustang was smart. If not, then purchasing the Mustang was a bad investment relative to the Berkshire stock. One important not is their is an opportunity cost either way: one is "I didn't own a really cool car for the last 39 years", the other is "I don't have a 10M assest", the trick is figuring out which one is more valueable to you. Normally, your opportunity cost will involve some type of risk.
You use opportunity cost, and marginal cost (marginal cost is essentially: what is the difference between making Y widgets and Y + 1 widgets) analysis when attempting to come up with the optimal allocation of capital to earn the largest profit. Somewhere along the way, you should include risk in there, but I'm already explaining way too much basic economics in this post. (You use marginal cost to at some point decide when you'd just take $2K to buy the Mustang even if it costs you $10M in assests in 40 years, if I had $200K to invest in 1965, I wouldn't be too upset if I made billions and had a cool car instead of having slightly more billions and walking).
So in that context Craigslist has an opportunity cost on the order of ~65M to various newspapers (it would have been profitable for them to do something that costs less then ~65M to get the business they lost to Craigslist). However, in this case, I'm guessing that the opportunity cost, the marginal cost and the risk probably dictate that the economically smart thing to do was take the ~65M "loss". It would have cost too much money, and tied up too much capital to earn the ~65M in revenue.
This is similar in concept to the advertising agency I read about once. They cut in half their customer base, and doubled their profits (they used to have $30M in revenue, and made $1.5M in profit, they "fired" half of their customers and brought in $12M in revenue, and made $2.5M in profit). Essentially, some revenue "costs" more then others to earn (in this case the marginal benefit of bringing on the additional $18M in revenue, cost the $1M in profit. Ouch!). This is an example of the type of thinking you have to do from an economic perspective to maximize profitability.
I'm not saying the newspaper should make it show up on their P and L, but I am saying, it is the proper frame of reference when discussing what to do about it. If they have a plan that costs ~1M and would get them back ~5M of that, they should consider it (however, if they have an alternative plan for ~1M that would earn them ~7M, they should do that, as not doing it has an opportunity cost of ~2M). If it would cost them ~50M to get ~30M of that revenue back, they shouldn't do it. It's all about revenue, and how much capital it took to generate that revenue (more commonly known as the profit margin). It was probably wrong to call it a loss, but you can't expect the average 8th grader to understand the headline a more accurate headline.
I have a set of Aiwa Noise Cancelling HP-CN6 head phones. My story is roughly like yours. The one thing I've been told about mine, is people try and talk to me and I can't hear them at all. Generally to get my attention from behind, you had to knock on my desk. It took me a while to convince people that shaking my chair wasn't such a good idea (it's like having your own personal earthquake), just tap me on the shoulder, or knock on my desk (I can feel that if I can't see it).
For about $60, they work really well. I've had the music cranked up pretty load and been told, they can't tell I'm playing music, so along with blocking out others noise, it also doesn't contribute to the problem. About my only beef with them, is they take batteries, and I have to keep my office phone, cell phone, and pager were I can see them flash to let me know when I have a phone call. Fortunately, I don't get many calls that need to be timely. However, that might be a more important consideration for other people.
Technically speaking, the FSF can feel that way, in the same sense that I feel like the Federal Gov't shouldn't take any taxes from me. It's nice I'm allowed to think that, but it's disconnected from reality.
To the best of my understanding, that's not the case. They can feel like you can't use copies of readline, but they shouldn't have a legal leg to stand on. I can't find that in their FAQ, so I'm curious what leads you to believe they feel that way (I'm not disblieving you, only so I can read their interpretation of the situation).
I'm not sure how precisely they are saying that's license violation. I'd just do it. What could they threaten you with? Not even a GPL violation says you can't run the readline software any more. It merely says you can't modify, copy, sublicense, or re-distribute the readline software. You weren't doing that anyways.
About the worst thing that could be said about you is if it is deemed that the linking by the user is a violation (which it might be), you could be distributing something that would facilitate a copyright violation. I'm not sure precisely what the punishment for that is.
This is the same as the plugin debate about GPL'ed software (Specifically if you can have an GPL incompatibile license plugin and a GPL licensed software at the same time).
From a legal perspective, they might get bit by the "spirit" of the license, instead of the letter of the license if the judge is feeling frisky that day.
As to the Windows EULA, they have to have some sort of restriction on your use of the libraries, or else it isn't a license violation. It has nothing to do with derived works. Having a license to use and run the software, I'm fairly sure, linking to the.DLL's is completely legal by a third party piece of software because it's not specifically taken away from you in the license. Otherwise, Microsofts lawyers should have made sure the right was specifically granted to you in the license.
A Derived Work is a two-way street - it requires both sides' permission to distribute
If I am linking to the Microsoft libraries it isn't a derived work of the Microsoft DLL. If you honestly believe it is, could you please describe the legal princepals you feel are involved. Me giving my software to other people who have a license to use it (I'm not distributing the.DLL itself, I'm distributing software that uses it to other people with a license to use the DLL). This is exactly the way the old BSD UNIX worked, and was found completely legal in a court of law.
The FSF's position creates a contradiction where it is OK to do something with Microsoft's DLLs when it's not OK to do it with their own DLLs.
That's not correct. It is completely legal for you to link GPL'ed software to absolutely anything you wanted. Microsoft could take the Linux source and link it with the Win32 kernel if they felt like it. It is completely legal. Microsoft would be in violation of the GPL the moment they distributed binaries of the Linux source linked with the Win32 kernel to anyone else. Just as I would be inviolation of the Microsoft copyrights if I gave any.DLL's from Windows 98 to anyone else. As I recall, Sun shipped a driver kit that would take Linux driver source and do link it into the Solaris kernel. That was legal.
The FSF lets you do far more with their software them Microsoft has ever let you do. Go read the Microsoft EULA, then go read the GPL or LGPL.
The GPL covers nothing but if you are allowed to redistribute, copying and modification of source code you don't own the copyright to. That's it. You are allowed to link it with non-GPL'ed software all you want (again, go read the license). You just aren't allowed to distribute it to someone else unless you make your source modifications available under terms compliant with the GPL.
Nope. The Windows licence does not. This means one of two things
All right, you'll have to cite where in the license it doesn't allow you to do that. I don't believe that is an accurate fact. Finally, your "two choices", aren't the only two choices. That wouldn't render third party software illegal. It would render people who are using it without a license in violation of the license and subject to the damages spelled out in the license. I can sell you a widget all I want. If you use my widget in a way that is violating a contract with someone else, I won't get in trouble. That is the same as third party software.
It's not attempting to grant rights held my Microsoft, Apple or Sun. The GPL doesn't attempt to give you the right to distribute the.DLL's that MS, Apple, or Sun gave you. That would be them attempting to violate the rights given to the copyright holders over the DLL. Furthermore I'm fairly sure that Microsoft, Apply, and Sun give you the right to link to the.DLL's in the EULA (otherwise, the OS would be mighty useless). I suppose they could put restrictions about if the.DLL's are able to be linked to the GPL'ed software in their EULA. However, to the best of my knowledge that doesn't happen. Microsoft could put those terms into the EULA and it would then be a violation of the EULA to link to them. It wouldn't be a GPL violation until you started distributing a binary of it (it would be in compliance of the GPL to ship the source however).
Linking doesn't constitute copyright infringement in anyway shape or form in any legal sense in and of itself. Making non-fair use duplicates, or creating derived works represent copyright infringement. What the GPL and LGPL are saying is: My software is free to redistribute if you follow these terms. If you fail to follow my terms, I'll consider you re-distributing my copyrighted material copyright infringement. It just so happens that some of their terms involve the licensing terms of other things the software is linked to.
I could give the local school district the right to copy my software and put it on any and all school owned machines. That doesn't affect Microsoft, Sun, or Apple's.DLL's if my software links to them. Before you reply and say this isn't like the GPL at all, yes it is exactly the same. I'm setting a handful of terms that allow a specific set of people a set of rights they don't have under copyright law. My terms involve which computers some software is allowed to be put on. The GPL and LGPL terms involve the licenses of the software that is linked to them.
The GPL is saying: As long as you continue to re-distribute this work, and works derived from it under the GPL that's fine. Oh, and everything you link to except for standard OS/runtime pieces have to be GPL'ed too. If that's not the case, I feel you are violating my copyright by making duplicates.
The LGPL is saying: As long as you continue to re-distribute this work and works derived from it under the LGPL that's fine. Oh, and you can link this into nearly anything you want. If that isn't the case, I feel what you are doing is copyright infringement.
The GPL and LGPL are giving you the rights normally reserved soley for the copyright holder if you follow some specific conditions. That's why they are called copyleft (most license take rights away from you, this one gives you rights). They reserve only the rights given to a copyright holder (essentially the right to choose who is allowed to make duplicates, and the right to pick the license). The GPL essentially tells you the conditions under which you are allowed to commit what would otherwise be copyright infringement.
Kirby
Re:The GPL/LGPL worries me....
on
Revising the GPL
·
· Score: 3, Insightful
For example, Emacs for Windows dynamaically links to Windows DLLs.
I'd have to refer you to LGPL section 6:
For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a
special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
Bold emphasis is mine. There's nothing wrong with linking to the facilities given to you by the OS or complier, if they are part of the standard distribution of the OS/runtime environment.
You are just not reading all the details of a legal document. That's always a mistake. Always read the fine print on those.... *grin*.
Uhhh, I'm fairly sure this is a reference towards "egcs", which the problem was (according to the egcs guys at least). GNU GCC folks wouldn't get off their ass and apply patches that fixed real life bugs (or give feedback on what had to be done to the patches to get them applied). In the end, everybody was applying a huge set of patches to gcc that the maintainers wouldn't take. Some people got tired of it, and formed egcs (I believe that's the cygwin guys who are now RedHat guys, but don't quote me on that one).
GCC at the time was pretty well know for being overly conservative for accepting patches. It appears that this is long since past. Essentially, because GCC lost and EGCS won. EGCS proved it was stable and produced better code then the GCC tree. So egcs 1.X.YY became gcc 2.91 I believe.
(By the way, what the heck is ssp? I've heard of SSA, but not ssp in reference to GCC).
Yes and No. Technically speaking, I believe the way the license reads, you can have 1 developer working on one database instance. That's it.
Go to "technet.oracle.com". Look around for the free downloads. Oracle will absolutely laugh at you if you tell them that you actually followed these requirements (I'm serious, the Oracle Rep laughed at us).
As a general rule, Oracle doesn't get too bent out of shape until they are on a push to generate revenue. As far as I can tell, no one at Oracle can tell you how their licensing works. No one! I've talked with several long time DBA's, and with lots of Oracle reps. You get a lot of contradictory answers about how their licensing works. Even with named users (at times I've had that explained as "concurrent connections" or "how many different users might use it"). The first one means that each session is counted. One of them means a single person can have ten sessions open and that's fine.
In the end, if Oracle feels like coming in getting more money from you they'll come tell you you are violating the license and ask for money for compliance.
You are a real bastard... I was scrolling down the page, and stopped on your post. Before reading it, I started cleaning off my screen, knowing that I didn't have that big pixel problem. It wasn't until I scrolled and the defects moved that I realized that I'd been had.
I'm guessing it's called Phonebook Encryption, because it is layered (like the pages of a phone book), and if I showed you a phone book, it's just a big pile of data that all looks the same at every "layer". Just like an ideal "Phonebook" filesystem does.
Huh? I must have missed that. I can't find anything I'd deem a reliable reference to Beverly Hills Cop 4 or 5 being made. (Is this a reference towards Leathal Weapon? That did get 4 flicks made, I would have missed the direct to video 5). IMDB doesn't have any reference to anything past three of Beverly Hills Cop. The only thing I can find via google in reference to it, is circa 2002 a lot of people denying that 4 was going to happen (specifically Eddie Murphy).
Not necessarily. We had any number of students in my OS class who were completely incompetent. They couldn't write program that involved a dynamic memory implementation of a tree.
The professor assigned a few simple programs. One to simulate how a VM would perform with various page replacement algorithms. One to take a shell he had written almost all of, and add pipes and redirection. One to use threads to implement a producer consumer queue. That's it. 90% of the class couldn't complete it on the basis that they we're graduate students who we're in a gradutate transition program that dumbed down the C/C++ for them. Then gave them an accelerated class so they wrote half as many assignements that were easier then what any undergraduate would have to pass the prerequisite courses.
90% of the class should have in fact failed (in this case, the prof was notorious, he had three grades A's for everyone who turned everything in, B's for anyone who he had something turned in, F's for anyone who turned in nothing). In a number of the Grad only sections, literally all but one or two people in the class should have failed. They had no working knowledge coming into the course, and lacked the abilities that should have been the outcome of the course. (Most of them couldn't successfully describe a Semaphore or a thread, let alone use one, god forbid they be asked to implement one).
As far as I could tell, the assignments were too easy, the tests too easy, and the professor was incredibly gifted. He could teach really well. He was wonderful at teaching, I used to spend time in is office getting a full explaination of the finer points of things that would have made most of the classes head explode. After years of dealing with students he politically unable to fail the students who lacked the prior knowledge. The higher ups would cave to student pressure and administratively change the grades to avoid having a 5% graduation and/or retention rate. It's why he gave up teaching or caring about the quality of the students who passed his class. It was truely depressing to people who I know who took classes from him 15 or 20 years ago.
Nobody said the code was hard to read. Any time I'd use "i", I use "iii". It's easier to search. Nothing about that has the implication that it's hard to read. I use searching to ensure I got every last instance correct.
Well, aren't you clever not bothering to clarify so I could possibly understand what you mean. I've never said anything about naming anything besides an "increment" variable used in a for loop. You start discussing giving variables "meaningful names". In sections you can't refactor. What precisely did you mean? What am I misinterpretting? To me that sure looks like your saying you stop using "i" at points as the index variable in a for loop at some points, but not at others based on if you can refactor the for loop.
It's really hard to understand you've either changed contexts and I didn't notice. Giving variables meaningful names is a wonderful thing. However, how meaningful a name do you have for a variable you are using as an index? Maybe you could give me an example? I'm not trying to be a prick, but I read the words on the screen and took what seemed the most natural interpretation. Maybe there's some small chance you weren't being clear.
Well, just wait until you have an off by one error. Even with just 10 or 15 lines of code, it's still much easier to be able to search for them. I'm not searching for them because they are so far apart, or because they are hard to find. I'm searching for them, so I can ensure I double check each and every single one is correct.
It's much easier then just scanning for them by eye, and more accurate (computers are good at looking for a series of text, my eyes aren't nearly as fast). Plus I won't have the bad habit of saying "find again" in vim if I write a bad regular expression.
Finally, I'll point out, that if you are iterating over an array, giving it any value but "iii", "jjj" is less idiomatic, and thus in some schools of thought bad (I'm a subscriber, but not sure a full fledged zealot about that). There isn't a better or more meaning full name if what you are doing is iterating over an entire array. Now, if you are skipping around, that's a whole different deal. There you can have a better name.
Finally:
If I can't figure out a way to do that, I give the variable some meaningful name.
Wait, so what your telling me, is that in complex loop that has a long block of code that you can't figure out how to decompose, you change to use a longer variable name to make the code longer, and have more line breaks and use less idiomatic code? In complex long blocks code, you stop following coding conventions as old as the hills just doesn't sound like as nearly a good idea as making it easy to track down indexing errors. I'll give you the last word if you want it, and just agree to disagree with you.
Well, I'll point out that "static is evil", is a flat out wrong and a statement with no context. At the time I was well aware of the 2 types of things that static can be applied to, and the two different contexts in which you can it on variables. That's not even to discuss the meanings it has in C++.
In regular C, for a function, it's actually highly useful, and extremely desirable. Go look in any extremely large body of C code. You'll find out just how desireable C static functions are. They are used all the time inside of the Linux kernel. They guarantee that the linker won't make that symbol available externally. Which is great for avoiding two different functions with the same symbol.
In regular C, using static on a global variable also makes it have no external linkage. It also moves where the memory is actually set aside. Which changes when it gets initialized, and how large your executables are. I believe it's also a very good way to ensure your variables are safe to use in signal handler context. This is common go look at the Linux kernel. Happens all the time. Highly useful application of static.
In regular C, using static on a variable in function scope, can be useful, if it is also a constant. In that case, you can move the space off the stack and into the BSS section (at least under UNIX, I forget the equivilent under a Win32 platform). This again is used all the time in the Linux kernel. It shrinks the stack usage and saves space. As I recall, you want to declare all strings that are constants as:
static const char foo[] = "foobar";
It saves space in the kernel. I forget exactly why it does right off hand, but it has to do with the assembly that GCC outputs. I might have that wrong, you might want to do "*foo" instead of "foo[]", but you get the idea.
Now, in regular C using static on a variable in function scope to store state between function calls is an excellent way to introduce a race condition. So your blanket statement that "static is evil" is blantantly wrong. Whoever or where ever you learned it from was mimicing what they'd heard before without any understanding. Next you'll be telling me there's no good use of "goto's" either. Which isn't the case, they are few and far between, but they do exist. I've never come across one, but I am aware of when they would be useful. I could make use of them, but generally performance, cache coherency, and "the fast path" aren't things I generally have to worry about. Those are the types of problems we just throw more hardware at and keep the code highly maintainable.
I learned about a lot of thinks from my old boss, but the "iii" was one of the truely unique things, I've never seen anywhere else. Any good text on C programming will explain what I just did. The small useful things that you just deal with all the time because you never stop to think of a better solution. Paul didn't have too many of those. He recongized anytime something was difficult, and pondered the problem until it was easy. Just like, he knew when static was a good idea. Although I actually picked that up at school, during the explaination of Ada. You can do something named modules in Ada, that you can somewhat duplicate in C with static and separate translations units.
The truly most useful thing Paul ever taught me was just assume all of your code leaks memory. Assume your code will segfault because there is a bug in it. Assume you'll get crappy data that will lead to pathelogical cases. Design your code so that as much as possible that doesn't make any difference in terms of your ability to process data that doesn't cause a memory leak, a segfault, or isn't malformed. Never get stuck when there is more data to try. If some data elements blow up your code. Timestamp when you tried them and don't retry them for a while so you can work on other data. Any time you are doing batch processing, you should always have a parent that is deathly simple that will spawn children that do the real work.
Have you ever made a mistake in indexing? Ever go looking for an off by one error in a for loop? I'm not looking for the for loop, I'm attempting to find all the places the "i" was used as an index variable (because I'm nesting a new loop where I need to use "jjj" any place close, because I'm removing the loop that has "jjj", I think there is a bug in the indexing, or I think I transposed the use of iii and jjj someplace in some software).
for( iii = 0 ; iii < sizeof( foo ) / sizeof( foo[0] ) ; ++iii ) { ... 15 lines of code that uses iii twice on every line... }
It's sure a lot easier in vim to hit/iii, and see all of the "iii" highlighted.
I used to know exactly the page that function pointer syntax was described in the Harrison and Steele C book (Not sure if Harrison is the right guy, but Steel was the other author). I've since forgotten it and now remember, http://function-pointer.org.
When I was still boning up on C++ I could tell you the chapter headings of most of the chapters in Strousops book. I haven't read the book in so long it's ridicilous. I can still tell you which books introduced me to which topics, and other better references I've found on that topic since then.
The sad part is I've used function pointers regularly enough now, that I can tell you how to do everything but a function pointer to a member function off hand. I can generally figure out a pointer to a member function in fairly short order given a compiler.
Kirby
It actually saved time. It was the next thing they were going to ask for anyways, and they wouldn't do anything to my records until I told it to them. They didn't need to know my name, and if they did, it'd be on the first screen they pulled up if they felt the need to use my first name to make me feel like a person.
Kirby
Back in the day, banking was an "old boys club". That is to say, you had to know somebody somehow some way personally to do banking (or convince them you have some crazy idea that might work). Heck in the dark ages, I'm fairly sure they never loaned money to serfs, only to the lords and aristocrasty. Now, I never know the banker I'm dealing with. Heck I bought a home, and never met anyone associated with the people loaned me mony. Having people on staff to get to know everyone you want to loan money to is incredibly expensive. It's much cheaper to just have the computers generate a number for you.
However, there is part of me that harkens back to that day and age. I really hate certain things banks do. In the US at least, they loan nearly anybody money, and then force everyone who pays, to cover the debts of the people who default (see PMI insurance when getting a mortgage for instance). In aggregate it's a good system, but I am fairly responsible with money and wish I could have gotten out of PMI sooner (in the end, I did, but it wasn't until I started investigating what could be done that I figured it out).
Kirby
It just so happens, that it takes an incredibly silly mistake. Text email clients have security flaws and fixes that must be applied. I'm sure one of them could be triggered by a specifically constructed e-mail.
Kirby
I'd find it fairly hard to believe they don't fit the legal definitions of "knowing infringement". For starters, at least 90% of the content was obviously in copyright violation once I went to look at it (assuming it is what it appears to be). That'd be like a bar owner saying, "I had no idea that gambling was happening in my backroom, I never go back there. All this despite the fact that I see people carry in poker books, cards, and gambling chips.". That a violation of the law is happening is obvious to even the most casual of observers in the case described above, and in the case of LokiTorrent.
This is a relatively new area, heck if nothing else, they could probably get charged with conspiracy (that's the fairly standard charge they get people who aren't involved in a crime but essentially facilitate or organize a crime in Organized Crime all the time). After taking a look, I think the MPAA has a legal right to tell these people: "You are infringing on my rights, stop it. If you won't, I'll get a court order that tells you to stop it". I think the court would be well within it's rights to explain that these people have an obligation not to continue letting this happen. How, and what parameters are set upon it, I'm not sure.
All that said, I'd have no problem with Congress enacting a law saying that this is criminal. That the technical minutia about where the bits are and went didn't exist when the original law was written.
Kirby
Here's a link to a DOJ document that specifically lays out the conditions for being considered a felony criminal offense in the second paragraph.
I'm not sure how precisely the technical aspects of "Torrents" (or Grokster) work, but it's not like a judge couldn't re-examine the situation and come up with a different ruling from what the ruling in Grokster came up with. Last I heard, 2600 lost their case for providing links to source code that could help you facilitate copyright infringement. If only because Grokster might have had some other legitimate uses, where as, Loki might not have such mitigating circumstances. At some point, I believe Loki will (and should) have to prove that it does provide a useful service that isn't blatant copyright infringement. If they can show that I think they have a right to exist. However, if they can't, I sure think that's tantamount to letting a landlord knowningly let a crime family use his facilities as a hang out. No crimes might be committed there, but it sure seems in the interest of the public to stop such places from existing.
Kirby
It's worth standing up and fighting it, if you have legitimate purposes behind your software. Identified copyrighted material should obviously be taken down. What would you say if they showed up to taken down all of the PoP's for your local ISP's. Obviously, they are facilitating copyright infringement. They are willfully participating in it. What would you say if they started taking computers away? What would you say if they started taking away copy machines? They are targetting a particular type of software that has highly legitmate uses. I think someone should stand up and get a court case to establish what the boundaries are for what a copyright holder can accomplish against someone whom they feel is infringing. It'd be wonderful to establish boundaries. The MPAA as far as I personally know, hasn't done the willfully stupid things that the RIAA has (recently at least, Jack Valentti was an idiot about technology as nearly as I can tell).
It is appearent that some of these sites need to have fairly stringent policies about posting copyrighted material. LokiTorrent might be one that has nothing to do but distribute copyright material. However, I'd guess that there are Torrent sites out there that act as seeds/mirrors/whatever they are called in the lingo, for legitimate purposes. If Loki feels it is one of those, they should stand up and fight for themselves. Bully for them. If they aren't, I hope they get smacked around legally before any really stupid legal precedence get set. A quick perusal of their site leads me to believe, they are an obvious copyright infringer and the MPAA has a legitimate beef. At least the MPAA appears to be targetting the proper people, unlike the RIAA.
Kirby
If I have write permission to the directory, then I can actually call "unlink" (UNIX system call which will delete a file).
Lacking write permission to the directory, I can't delete a file (or create a file). If I have permission to write to the file, I can destroy it's contents, but I can't stop the file from existing.
However, I believe in most modern UNIX filesystems you can set the "APPEND ONLY" attribute, which is handy for some things (log files), I want you to be able to write a the end of the file, but the prior contents must always exist.
Kirby
You are correct mostly. Your usage of the word "extorting" is over the top, other then that, I'll mostly concede. No one extorted the money from the people. They willing showed up to participate because they felt it was a good value to them. There we no threats on behalf of the paper to publish a persons secrets if they failed to buy enough classified add space. That would be something that starts to close in on extortion by the paper.
However, the newspaper is looking at it correctly from their perspective also. I believe this some what analogous to "opportunity cost" in economics. "Opportunity Cost" in economics is roughly, "I did this instead of that". Think of it this way: In 1965 I invested $2K in a Ford Mustang, instead of investing it in Berkshire Hathaway stock. The Ford Mustang probably has a street value of $50K as a collectible (you should discuss the maintience and storage costs at which point a Mustang is probably a big loss, especially once inflation is accounted for). My guess is that Berkshire Hathaway stock would be worth $~10M. So purchasing the Ford Mustang cost you $(~10M - $50K). If you feel that owning the Ford Mustang over the years had more value to you then having the ~10M dollars in assests today, then purchasing the '65 Mustang was smart. If not, then purchasing the Mustang was a bad investment relative to the Berkshire stock. One important not is their is an opportunity cost either way: one is "I didn't own a really cool car for the last 39 years", the other is "I don't have a 10M assest", the trick is figuring out which one is more valueable to you. Normally, your opportunity cost will involve some type of risk.
You use opportunity cost, and marginal cost (marginal cost is essentially: what is the difference between making Y widgets and Y + 1 widgets) analysis when attempting to come up with the optimal allocation of capital to earn the largest profit. Somewhere along the way, you should include risk in there, but I'm already explaining way too much basic economics in this post. (You use marginal cost to at some point decide when you'd just take $2K to buy the Mustang even if it costs you $10M in assests in 40 years, if I had $200K to invest in 1965, I wouldn't be too upset if I made billions and had a cool car instead of having slightly more billions and walking).
So in that context Craigslist has an opportunity cost on the order of ~65M to various newspapers (it would have been profitable for them to do something that costs less then ~65M to get the business they lost to Craigslist). However, in this case, I'm guessing that the opportunity cost, the marginal cost and the risk probably dictate that the economically smart thing to do was take the ~65M "loss". It would have cost too much money, and tied up too much capital to earn the ~65M in revenue.
This is similar in concept to the advertising agency I read about once. They cut in half their customer base, and doubled their profits (they used to have $30M in revenue, and made $1.5M in profit, they "fired" half of their customers and brought in $12M in revenue, and made $2.5M in profit). Essentially, some revenue "costs" more then others to earn (in this case the marginal benefit of bringing on the additional $18M in revenue, cost the $1M in profit. Ouch!). This is an example of the type of thinking you have to do from an economic perspective to maximize profitability.
I'm not saying the newspaper should make it show up on their P and L, but I am saying, it is the proper frame of reference when discussing what to do about it. If they have a plan that costs ~1M and would get them back ~5M of that, they should consider it (however, if they have an alternative plan for ~1M that would earn them ~7M, they should do that, as not doing it has an opportunity cost of ~2M). If it would cost them ~50M to get ~30M of that revenue back, they shouldn't do it. It's all about revenue, and how much capital it took to generate that revenue (more commonly known as the profit margin). It was probably wrong to call it a loss, but you can't expect the average 8th grader to understand the headline a more accurate headline.
Kirby
For about $60, they work really well. I've had the music cranked up pretty load and been told, they can't tell I'm playing music, so along with blocking out others noise, it also doesn't contribute to the problem. About my only beef with them, is they take batteries, and I have to keep my office phone, cell phone, and pager were I can see them flash to let me know when I have a phone call. Fortunately, I don't get many calls that need to be timely. However, that might be a more important consideration for other people.
Kirby
To the best of my understanding, that's not the case. They can feel like you can't use copies of readline, but they shouldn't have a legal leg to stand on. I can't find that in their FAQ, so I'm curious what leads you to believe they feel that way (I'm not disblieving you, only so I can read their interpretation of the situation).
I'm not sure how precisely they are saying that's license violation. I'd just do it. What could they threaten you with? Not even a GPL violation says you can't run the readline software any more. It merely says you can't modify, copy, sublicense, or re-distribute the readline software. You weren't doing that anyways.
About the worst thing that could be said about you is if it is deemed that the linking by the user is a violation (which it might be), you could be distributing something that would facilitate a copyright violation. I'm not sure precisely what the punishment for that is.
This is the same as the plugin debate about GPL'ed software (Specifically if you can have an GPL incompatibile license plugin and a GPL licensed software at the same time).
From a legal perspective, they might get bit by the "spirit" of the license, instead of the letter of the license if the judge is feeling frisky that day.
As to the Windows EULA, they have to have some sort of restriction on your use of the libraries, or else it isn't a license violation. It has nothing to do with derived works. Having a license to use and run the software, I'm fairly sure, linking to the .DLL's is completely legal by a third party piece of software because it's not specifically taken away from you in the license. Otherwise, Microsofts lawyers should have made sure the right was specifically granted to you in the license.
Kirby
If I am linking to the Microsoft libraries it isn't a derived work of the Microsoft DLL. If you honestly believe it is, could you please describe the legal princepals you feel are involved. Me giving my software to other people who have a license to use it (I'm not distributing the .DLL itself, I'm distributing software that uses it to other people with a license to use the DLL). This is exactly the way the old BSD UNIX worked, and was found completely legal in a court of law.
That's not correct. It is completely legal for you to link GPL'ed software to absolutely anything you wanted. Microsoft could take the Linux source and link it with the Win32 kernel if they felt like it. It is completely legal. Microsoft would be in violation of the GPL the moment they distributed binaries of the Linux source linked with the Win32 kernel to anyone else. Just as I would be inviolation of the Microsoft copyrights if I gave any .DLL's from Windows 98 to anyone else. As I recall, Sun shipped a driver kit that would take Linux driver source and do link it into the Solaris kernel. That was legal.
The FSF lets you do far more with their software them Microsoft has ever let you do. Go read the Microsoft EULA, then go read the GPL or LGPL.
The GPL covers nothing but if you are allowed to redistribute, copying and modification of source code you don't own the copyright to. That's it. You are allowed to link it with non-GPL'ed software all you want (again, go read the license). You just aren't allowed to distribute it to someone else unless you make your source modifications available under terms compliant with the GPL.
All right, you'll have to cite where in the license it doesn't allow you to do that. I don't believe that is an accurate fact. Finally, your "two choices", aren't the only two choices. That wouldn't render third party software illegal. It would render people who are using it without a license in violation of the license and subject to the damages spelled out in the license. I can sell you a widget all I want. If you use my widget in a way that is violating a contract with someone else, I won't get in trouble. That is the same as third party software.Kirby
It's not attempting to grant rights held my Microsoft, Apple or Sun. The GPL doesn't attempt to give you the right to distribute the .DLL's that MS, Apple, or Sun gave you. That would be them attempting to violate the rights given to the copyright holders over the DLL. Furthermore I'm fairly sure that Microsoft, Apply, and Sun give you the right to link to the .DLL's in the EULA (otherwise, the OS would be mighty useless). I suppose they could put restrictions about if the .DLL's are able to be linked to the GPL'ed software in their EULA. However, to the best of my knowledge that doesn't happen. Microsoft could put those terms into the EULA and it would then be a violation of the EULA to link to them. It wouldn't be a GPL violation until you started distributing a binary of it (it would be in compliance of the GPL to ship the source however).
Linking doesn't constitute copyright infringement in anyway shape or form in any legal sense in and of itself. Making non-fair use duplicates, or creating derived works represent copyright infringement. What the GPL and LGPL are saying is: My software is free to redistribute if you follow these terms. If you fail to follow my terms, I'll consider you re-distributing my copyrighted material copyright infringement. It just so happens that some of their terms involve the licensing terms of other things the software is linked to.
I could give the local school district the right to copy my software and put it on any and all school owned machines. That doesn't affect Microsoft, Sun, or Apple's .DLL's if my software links to them. Before you reply and say this isn't like the GPL at all, yes it is exactly the same. I'm setting a handful of terms that allow a specific set of people a set of rights they don't have under copyright law. My terms involve which computers some software is allowed to be put on. The GPL and LGPL terms involve the licenses of the software that is linked to them.
The GPL is saying: As long as you continue to re-distribute this work, and works derived from it under the GPL that's fine. Oh, and everything you link to except for standard OS/runtime pieces have to be GPL'ed too. If that's not the case, I feel you are violating my copyright by making duplicates.
The LGPL is saying: As long as you continue to re-distribute this work and works derived from it under the LGPL that's fine. Oh, and you can link this into nearly anything you want. If that isn't the case, I feel what you are doing is copyright infringement.
The GPL and LGPL are giving you the rights normally reserved soley for the copyright holder if you follow some specific conditions. That's why they are called copyleft (most license take rights away from you, this one gives you rights). They reserve only the rights given to a copyright holder (essentially the right to choose who is allowed to make duplicates, and the right to pick the license). The GPL essentially tells you the conditions under which you are allowed to commit what would otherwise be copyright infringement.
Kirby
I'd have to refer you to LGPL section 6:
Bold emphasis is mine. There's nothing wrong with linking to the facilities given to you by the OS or complier, if they are part of the standard distribution of the OS/runtime environment.
You are just not reading all the details of a legal document. That's always a mistake. Always read the fine print on those.... *grin*.
Kirby
GCC at the time was pretty well know for being overly conservative for accepting patches. It appears that this is long since past. Essentially, because GCC lost and EGCS won. EGCS proved it was stable and produced better code then the GCC tree. So egcs 1.X.YY became gcc 2.91 I believe.
(By the way, what the heck is ssp? I've heard of SSA, but not ssp in reference to GCC).
Kirby
Go to "technet.oracle.com". Look around for the free downloads. Oracle will absolutely laugh at you if you tell them that you actually followed these requirements (I'm serious, the Oracle Rep laughed at us).
As a general rule, Oracle doesn't get too bent out of shape until they are on a push to generate revenue. As far as I can tell, no one at Oracle can tell you how their licensing works. No one! I've talked with several long time DBA's, and with lots of Oracle reps. You get a lot of contradictory answers about how their licensing works. Even with named users (at times I've had that explained as "concurrent connections" or "how many different users might use it"). The first one means that each session is counted. One of them means a single person can have ten sessions open and that's fine.
In the end, if Oracle feels like coming in getting more money from you they'll come tell you you are violating the license and ask for money for compliance.
Kirby
Kirby
Kirby
The professor assigned a few simple programs. One to simulate how a VM would perform with various page replacement algorithms. One to take a shell he had written almost all of, and add pipes and redirection. One to use threads to implement a producer consumer queue. That's it. 90% of the class couldn't complete it on the basis that they we're graduate students who we're in a gradutate transition program that dumbed down the C/C++ for them. Then gave them an accelerated class so they wrote half as many assignements that were easier then what any undergraduate would have to pass the prerequisite courses.
90% of the class should have in fact failed (in this case, the prof was notorious, he had three grades A's for everyone who turned everything in, B's for anyone who he had something turned in, F's for anyone who turned in nothing). In a number of the Grad only sections, literally all but one or two people in the class should have failed. They had no working knowledge coming into the course, and lacked the abilities that should have been the outcome of the course. (Most of them couldn't successfully describe a Semaphore or a thread, let alone use one, god forbid they be asked to implement one).
As far as I could tell, the assignments were too easy, the tests too easy, and the professor was incredibly gifted. He could teach really well. He was wonderful at teaching, I used to spend time in is office getting a full explaination of the finer points of things that would have made most of the classes head explode. After years of dealing with students he politically unable to fail the students who lacked the prior knowledge. The higher ups would cave to student pressure and administratively change the grades to avoid having a 5% graduation and/or retention rate. It's why he gave up teaching or caring about the quality of the students who passed his class. It was truely depressing to people who I know who took classes from him 15 or 20 years ago.
Thanks, Kirby
Well, aren't you clever not bothering to clarify so I could possibly understand what you mean. I've never said anything about naming anything besides an "increment" variable used in a for loop. You start discussing giving variables "meaningful names". In sections you can't refactor. What precisely did you mean? What am I misinterpretting? To me that sure looks like your saying you stop using "i" at points as the index variable in a for loop at some points, but not at others based on if you can refactor the for loop.
It's really hard to understand you've either changed contexts and I didn't notice. Giving variables meaningful names is a wonderful thing. However, how meaningful a name do you have for a variable you are using as an index? Maybe you could give me an example? I'm not trying to be a prick, but I read the words on the screen and took what seemed the most natural interpretation. Maybe there's some small chance you weren't being clear.
Kirby
It's much easier then just scanning for them by eye, and more accurate (computers are good at looking for a series of text, my eyes aren't nearly as fast). Plus I won't have the bad habit of saying "find again" in vim if I write a bad regular expression.
Finally, I'll point out, that if you are iterating over an array, giving it any value but "iii", "jjj" is less idiomatic, and thus in some schools of thought bad (I'm a subscriber, but not sure a full fledged zealot about that). There isn't a better or more meaning full name if what you are doing is iterating over an entire array. Now, if you are skipping around, that's a whole different deal. There you can have a better name.
Finally: If I can't figure out a way to do that, I give the variable some meaningful name.
Wait, so what your telling me, is that in complex loop that has a long block of code that you can't figure out how to decompose, you change to use a longer variable name to make the code longer, and have more line breaks and use less idiomatic code? In complex long blocks code, you stop following coding conventions as old as the hills just doesn't sound like as nearly a good idea as making it easy to track down indexing errors. I'll give you the last word if you want it, and just agree to disagree with you.
Kirby
In regular C, for a function, it's actually highly useful, and extremely desirable. Go look in any extremely large body of C code. You'll find out just how desireable C static functions are. They are used all the time inside of the Linux kernel. They guarantee that the linker won't make that symbol available externally. Which is great for avoiding two different functions with the same symbol.
In regular C, using static on a global variable also makes it have no external linkage. It also moves where the memory is actually set aside. Which changes when it gets initialized, and how large your executables are. I believe it's also a very good way to ensure your variables are safe to use in signal handler context. This is common go look at the Linux kernel. Happens all the time. Highly useful application of static.
In regular C, using static on a variable in function scope, can be useful, if it is also a constant. In that case, you can move the space off the stack and into the BSS section (at least under UNIX, I forget the equivilent under a Win32 platform). This again is used all the time in the Linux kernel. It shrinks the stack usage and saves space. As I recall, you want to declare all strings that are constants as:
static const char foo[] = "foobar";
It saves space in the kernel. I forget exactly why it does right off hand, but it has to do with the assembly that GCC outputs. I might have that wrong, you might want to do "*foo" instead of "foo[]", but you get the idea.
Now, in regular C using static on a variable in function scope to store state between function calls is an excellent way to introduce a race condition. So your blanket statement that "static is evil" is blantantly wrong. Whoever or where ever you learned it from was mimicing what they'd heard before without any understanding. Next you'll be telling me there's no good use of "goto's" either. Which isn't the case, they are few and far between, but they do exist. I've never come across one, but I am aware of when they would be useful. I could make use of them, but generally performance, cache coherency, and "the fast path" aren't things I generally have to worry about. Those are the types of problems we just throw more hardware at and keep the code highly maintainable.
I learned about a lot of thinks from my old boss, but the "iii" was one of the truely unique things, I've never seen anywhere else. Any good text on C programming will explain what I just did. The small useful things that you just deal with all the time because you never stop to think of a better solution. Paul didn't have too many of those. He recongized anytime something was difficult, and pondered the problem until it was easy. Just like, he knew when static was a good idea. Although I actually picked that up at school, during the explaination of Ada. You can do something named modules in Ada, that you can somewhat duplicate in C with static and separate translations units.
The truly most useful thing Paul ever taught me was just assume all of your code leaks memory. Assume your code will segfault because there is a bug in it. Assume you'll get crappy data that will lead to pathelogical cases. Design your code so that as much as possible that doesn't make any difference in terms of your ability to process data that doesn't cause a memory leak, a segfault, or isn't malformed. Never get stuck when there is more data to try. If some data elements blow up your code. Timestamp when you tried them and don't retry them for a while so you can work on other data. Any time you are doing batch processing, you should always have a parent that is deathly simple that will spawn children that do the real work.
Here's how I remember it:
"Only a Wop would bring a knife to a gun fight".
IMDB.com has a slightly different quote: http://www.imdb.com/title/tt0094226/quotes
"Isn't that just like a wop? Brings a knife to a gun fight. "
Kirby
Kirby