What part of Python's regexps did you not like? The main difference I was was that instead of:
if ($var =~/some?pattern*/) { foo }
you'd write something like
if re.search('some?pattern*', var): foo
or if you're doing the same match many times:
pattern = re.compile('some?pattern*') if pattern.search(var): foo
(kind of like Perl's "/o" once-only modifier).
So, the calling convention is slightly different - one is procedural, and one is OO - but Python uses Perl's regexp engine so the patterns themselves should be identical.
"And, unlike Perl, it's very easy to do complicated things in simple, legible code."
Perhaps it is time for you to get a perl book or take CS-101 course or something.
I've got both. So, tell me: what's the syntax for returning multiple complex objects from a function in such a way that they don't have to be dereferenced by the calling code (that is, they can be used directly, just like you were returning a single scalar)?
Return a nice string representation of the object. If the argument is a string, the return value is the same object.
I'm not overly stupid, but doing something so relatively easy in Perl put me at my limits. I like Perl, and I've written many large programs in it, but I always had to fight against the syntax. Python got out of the way and let me concentrate on logic instead.
if you have to modify it, even a little, every time you port it to a new operating system, you can hardly call it "platform independent".
Out of curiosity, what other language qualifies as platform independent by your definition? Answer: there isn't one. In the context of what we currently have, today, in 2006, Python is just about as platform independent as anything else.
What I am looking for, is some easy language to either script or program. Would python provide a good starting environment?
Absolutely! I think it's one of (if not the) best languages for new programmers. My main reasons are:
It has a very simple syntax.
The core language is relatively tiny - there aren't many keywords that you have to learn just to get started.
It is strongly, dynamically typed, which means that you can spend more effort on telling your program what to do rather than the nitpicky details of how to do it.
Opinions will vary, of course, but I think that Python is an excellent choice to start with.
Have any of you been at my level, then learned python?
Nope. When I was at your level, I had to learn a lot of really awful languages because the average person didn't have access to the nice ones. I would have loved having something so easy to learn and powerfully expressive at the same time.
For a quicker introduction to the language, you might look at the article I wrote for Free Software Magazine. It's not an in-depth analysis by any means, but should get you acquainted with the basics in under 10 minutes.
It's licensed under the Creative Commons "Attribution-Share-alike" License, so feel free to pass it around if you want to.
It does not make sense to ask someone that I really don't know to use my server for chatting.
He was probably referring to a Jabber server. Those servers pass messages between each other almost the same way that mailservers do. The other person wouldn't need an account on your Jabber server, just a Jabber server that was configured to talk to others (Google's isn't right now, but it probably will be in the future).
Umm... why would non-bloggers and people over 16 rejoice that blogging sites were censored?
If I had to guess, probably because no one else finds them interesting in the slightest.
The problem I think is parents dont dismiss those ones as inferior because they hold the attention of kids more and the kids sit there agog at the pretty lights and the pictures and the animations and it distracts them and acts just like the television as a babysitter.
And another way of looking at it:
Parents have been told for years, nearly decades, that computers make their kids smarter. Open the newspaper and see the local school district asking to raise taxes to buy new computers. Read about teachers unions demanding budget increases because there aren't enough computers in the classroom. Find out about Negroponte's push to send cheap computers to poor countries so their kids can learn. The issues may be more complex than that, but the overwhelming message is that kids have to have computers if they want to keep up.
So, Joe Sixpack goes out and buys Writer Raccoon for little Johnny because, hey, he needs to learn with the computer, right? Fortunately, he knows he made the right choice, because Johnny can click-and-drool for hours at a time. What exactly did Joe do wrong? He did what the school boards, the teachers unions, and MIT Media Labs told him he needed to do, and he found educational software that his kid is really into.
I'm not saying it's OK to park your kids in front of the family Dell for days on end, but I can certainly see why a lot of people think that's what they're supposed to be doing.
then in the prolog of my program, I have a comment that describes changeflag 01, who made the change, the date of the change, and the location of the document describing the need for the change (bugzilla number, etc). This not only keeps the documentation up to date, but provides a paper trail.
An alternative approach is to pick a revision control system and teach people how to use it. For example, we use Subversion and can do stuff like:
Made RetrieveRemote.py trap XML errors (to catch another class of exceptions thrown by the server). PR#5436.
to see exactly who wrote each line of each file in the system, and why they wrote it. Even if we never wrote a single line of comments, we still have a way of explaining every bit of code.
I have installed XP on literally thousands of machines
Translation: "I am not aware of system cloning utilities, such as Norton Ghost, even though I do this for a living. Therefore, I am not qualified to discuss IT management issues."
How about doing a review from the perspective of someone who has never used a computer before - then lets see which one is easier to use (hint: the answer will be Windows XP by a massive margin).
I built a Kubuntu machine for my in-laws. When they want to read their email, they click on the envelope icon. When they want to browse the web, they click on the spider web icon. When they want to copy photos from their digital camera, they click on the camera icon.
Which part of saving $200 and giving them an easy-to-use system is bad or difficult in your opinion?
Being a long-term survivor of pedestrianism is one of the best ways to become a cynic of the human condition.
Being a long-term driver around a bunch of idiot pedestrians is another one of the best ways. When I was commuting to my college campus every day, I'd lose track of the number of toolsheds who'd blithely step out in front of cars without bothering to turn their heads. Similarly, there were certain crosswalks where you could absolutely count on a gaggle of walkers jumping out the instant the stoplight above it turned red. While that's legally acceptable, it's still pretty stupid to bet your life that no one's going to run the red light - especially in poor weather conditions. Right, wrong... who cares. Dead is dead.
Now, not all pedestrians are this clueless. But it was constantly amazing how many supposedly intelligent people fail to recognize the fact that multi-ton steel boxes can't outmaneuver a person on foot, and that the price of miscalculation is painful death.
Anyway, believe whatever source you want. All I know is that while IT departments across the country raced through their holiday "vacations" to roll out unofficial patches to fix the WMF vulnerability, I sat at home drinking egg nog and watching South Park.
By the way, we need a better lexicon. "Vulnerability" sounds too bad and too good at the same time. A DoS that crashes gtk-gnutella is one thing, and needs a much softer word to describe it - perhaps "imperfection". A design flaw that gives remote root to anyone who shows you an image through any program needs something harsher. How about "sucking death wound"?
I'll take 2500 imperfections over 800 sucking death wounds any time.
Apparently you're missing the part where America has five times the population of England, and plays its media for worldwide audiences on a much larger scale.
Then again, by those criteria, India would have a reasonable claim on having the standard English accent.
That presumes people are willing to run their business-critical apps on someone else's remote server. That looks good on paper every time someone proposes it, but Gmail is about the closest I've seen to it actually succeeding.
I think it may be a while before someone edits CorpFinancialsAndCustomerList.doc at a rented terminal.
Thus, the hard drive stores data, the processor calculates, and the Master Boot Record is in charge of saying what to boot.
Um, no. The MBR is in charge of figuring out where the second stage of the loader is on the hard drive, loading it, and passing control to it. The main difference between GRUB and LILO in that respect is that LILO looks for a particular sector, while GRUB looks for a certain filename.
If what he's got is i386 233MHz, then that means command line (or possibly Red Hat 6.x with KDE 1.x, which was slow, but did work).
Or thin client. That's more than enough horsepower to display applications that are running an a beefier server elsewhere. Remember: doubling the number of users on a system doesn't mean doubling the amount of resources.
You musn't have traveled very far, even within your own country, if you believe that.
I'll put money on having been on more continents than you.;-)
Anyway, returns make up about 95% of the after-sale service I need from a retailer. Wal-Mart excels at this. You're right, in the sense that they offer little pre-sale assistance. If you're the type who goes into a store already knowing exactly what you want to buy, though, then they're wonderful.
In short, you've demonstrated KDE's architecture quite well. All its applications are made of bits and pieces of system libraries and other applications. That means it takes a relatively large amount of resources to load the first program you specifically want to use, because it brings along tens or hundreds of other components.
However, the next program you load might only require a handful of components that over what the first program loaded. As you load more programs, the odds of each applications dependencies already being loaded by something previous asymptotically approach 100%.
I think that really explains the difference between loving and hating KDE. If you're a one-app-at-a-time user, then it will seem tremendously bloated, since each app is overwhelmed in size by its dependencies. If you use many apps at a time, though, you'll probably love it since the marginal additional resources required to launch a new program are nearly zero.
Initially, Sony wanted to charge me nearly 100 bucks for the privelege of them diagnosing the problem. (even though the machine was underwarantee).
Out of curiosity, why did you even get Sony involved in the exchange process? The correct procedure is:
Store: How can we help you?
You: This game that I bought here is defective.
Store: Yeah? Go get another one off the shelf and we'll swap 'em out.
You: Thank you, Mr. Retailer!
I actually like the way XP handles driver installation, pulling the new drivers from the internet and not forcing you to dig through piles of CDs or dead links on driver sites.
I'll give them that: they're finally adopting the distribution model that Free Unix users had for years. Credit where credit is due and all that.
You honestly think Office was better than Lotus (or, more commonly, that Word was better than WordPerfect)? That Exchange was better than, well, anything?
If it weren't for the MS monopoly, no one would ever have heard of either of those products, which were clearly inferior to the competition at the time.
So, the calling convention is slightly different - one is procedural, and one is OO - but Python uses Perl's regexp engine so the patterns themselves should be identical.
Perhaps it is time for you to get a perl book or take CS-101 course or something.
I've got both. So, tell me: what's the syntax for returning multiple complex objects from a function in such a way that they don't have to be dereferenced by the calling code (that is, they can be used directly, just like you were returning a single scalar)?
Python example from the interactive shell:
I'm not overly stupid, but doing something so relatively easy in Perl put me at my limits. I like Perl, and I've written many large programs in it, but I always had to fight against the syntax. Python got out of the way and let me concentrate on logic instead.
Out of curiosity, what other language qualifies as platform independent by your definition? Answer: there isn't one. In the context of what we currently have, today, in 2006, Python is just about as platform independent as anything else.
Absolutely! I think it's one of (if not the) best languages for new programmers. My main reasons are:
Opinions will vary, of course, but I think that Python is an excellent choice to start with.
Have any of you been at my level, then learned python?
Nope. When I was at your level, I had to learn a lot of really awful languages because the average person didn't have access to the nice ones. I would have loved having something so easy to learn and powerfully expressive at the same time.
It's licensed under the Creative Commons "Attribution-Share-alike" License, so feel free to pass it around if you want to.
That question was asked and answered before. You might take a look at that thread, since it looks like all the answers still apply.
Sorry, had to say it...
He was probably referring to a Jabber server. Those servers pass messages between each other almost the same way that mailservers do. The other person wouldn't need an account on your Jabber server, just a Jabber server that was configured to talk to others (Google's isn't right now, but it probably will be in the future).
Umm... why would non-bloggers and people over 16 rejoice that blogging sites were censored?
If I had to guess, probably because no one else finds them interesting in the slightest.
And another way of looking at it:
Parents have been told for years, nearly decades, that computers make their kids smarter. Open the newspaper and see the local school district asking to raise taxes to buy new computers. Read about teachers unions demanding budget increases because there aren't enough computers in the classroom. Find out about Negroponte's push to send cheap computers to poor countries so their kids can learn. The issues may be more complex than that, but the overwhelming message is that kids have to have computers if they want to keep up.
So, Joe Sixpack goes out and buys Writer Raccoon for little Johnny because, hey, he needs to learn with the computer, right? Fortunately, he knows he made the right choice, because Johnny can click-and-drool for hours at a time. What exactly did Joe do wrong? He did what the school boards, the teachers unions, and MIT Media Labs told him he needed to do, and he found educational software that his kid is really into.
I'm not saying it's OK to park your kids in front of the family Dell for days on end, but I can certainly see why a lot of people think that's what they're supposed to be doing.
An alternative approach is to pick a revision control system and teach people how to use it. For example, we use Subversion and can do stuff like:
to see exactly who wrote each line of each file in the system, and why they wrote it. Even if we never wrote a single line of comments, we still have a way of explaining every bit of code.Translation: "I am not aware of system cloning utilities, such as Norton Ghost, even though I do this for a living. Therefore, I am not qualified to discuss IT management issues."
I built a Kubuntu machine for my in-laws. When they want to read their email, they click on the envelope icon. When they want to browse the web, they click on the spider web icon. When they want to copy photos from their digital camera, they click on the camera icon.
Which part of saving $200 and giving them an easy-to-use system is bad or difficult in your opinion?
Being a long-term driver around a bunch of idiot pedestrians is another one of the best ways. When I was commuting to my college campus every day, I'd lose track of the number of toolsheds who'd blithely step out in front of cars without bothering to turn their heads. Similarly, there were certain crosswalks where you could absolutely count on a gaggle of walkers jumping out the instant the stoplight above it turned red. While that's legally acceptable, it's still pretty stupid to bet your life that no one's going to run the red light - especially in poor weather conditions. Right, wrong... who cares. Dead is dead.
Now, not all pedestrians are this clueless. But it was constantly amazing how many supposedly intelligent people fail to recognize the fact that multi-ton steel boxes can't outmaneuver a person on foot, and that the price of miscalculation is painful death.
Anyway, believe whatever source you want. All I know is that while IT departments across the country raced through their holiday "vacations" to roll out unofficial patches to fix the WMF vulnerability, I sat at home drinking egg nog and watching South Park.
By the way, we need a better lexicon. "Vulnerability" sounds too bad and too good at the same time. A DoS that crashes gtk-gnutella is one thing, and needs a much softer word to describe it - perhaps "imperfection". A design flaw that gives remote root to anyone who shows you an image through any program needs something harsher. How about "sucking death wound"?
I'll take 2500 imperfections over 800 sucking death wounds any time.
Apparently you're missing the part where America has five times the population of England, and plays its media for worldwide audiences on a much larger scale.
Then again, by those criteria, India would have a reasonable claim on having the standard English accent.
I think it may be a while before someone edits CorpFinancialsAndCustomerList.doc at a rented terminal.
How'd they get OpenOffice.org 2.1 (dropping the leading zero) when the rest of us only have 2.0.1?
Remember, folks, those periods are separators and not decimals.
</pedant>
Um, no. The MBR is in charge of figuring out where the second stage of the loader is on the hard drive, loading it, and passing control to it. The main difference between GRUB and LILO in that respect is that LILO looks for a particular sector, while GRUB looks for a certain filename.
Or thin client. That's more than enough horsepower to display applications that are running an a beefier server elsewhere. Remember: doubling the number of users on a system doesn't mean doubling the amount of resources.
I'll put money on having been on more continents than you. ;-)
Anyway, returns make up about 95% of the after-sale service I need from a retailer. Wal-Mart excels at this. You're right, in the sense that they offer little pre-sale assistance. If you're the type who goes into a store already knowing exactly what you want to buy, though, then they're wonderful.
However, the next program you load might only require a handful of components that over what the first program loaded. As you load more programs, the odds of each applications dependencies already being loaded by something previous asymptotically approach 100%.
I think that really explains the difference between loving and hating KDE. If you're a one-app-at-a-time user, then it will seem tremendously bloated, since each app is overwhelmed in size by its dependencies. If you use many apps at a time, though, you'll probably love it since the marginal additional resources required to launch a new program are nearly zero.
Out of curiosity, why did you even get Sony involved in the exchange process? The correct procedure is:
Store: How can we help you?
You: This game that I bought here is defective.
Store: Yeah? Go get another one off the shelf and we'll swap 'em out.
You: Thank you, Mr. Retailer!
I'll give them that: they're finally adopting the distribution model that Free Unix users had for years. Credit where credit is due and all that.
Perhaps you need to buy wrappers more appropriately sized to your disc.
You honestly think Office was better than Lotus (or, more commonly, that Word was better than WordPerfect)? That Exchange was better than, well, anything?
If it weren't for the MS monopoly, no one would ever have heard of either of those products, which were clearly inferior to the competition at the time.