Domain: c2.com
Stories and comments across the archive that link to c2.com.
Comments · 1,108
-
Re:The nail in the coffin release
Qt doesn't use "non-standard" C++. You can write Qt code in regular C++ code --- moc simply writes a lot of boiler-plate for you. What you're complaining about is not that Qt uses non-standard C++ (since it doesn't), but that it doesn't use the STL style of programming. However, given that C++ is a multiparadigm language, that's perfectly valid.
GUIs are inherently object-oriented and amenable to dynamic programming techniques. That's why people like Objective-C (Cocoa), and Smalltalk so much for GUI programming. The STL style of C++ is very anti OOP and anti dynamic programming. Indeed, the creator of the STL, Alexander Stepanov, has said OOP is a hoax. While Stepanov is entitled to his opinion, and the STL is certainly useful for a wide range of tasks, it's silly to try to shoe-horn Qt into a programming style that doesn't fit it's problem domain. -
Re:anonymous inner classesJava's inner classes (anonymous or named) are not even first class! (Try coding an inner class that refers to a non-final attribute in its enclosing scope.)
This isn't quite right. First off, they are first class, and you can refer to a non-final attribute from a named or anonymous inner class. What you can't do is refer to a non-final local variable from an anonymous inner class.
The intended effect is similar to closures - variables referenced from the enclosing scope have the value when the closure was instantiated (see, e.g. Scheme) - except that unlike scheme, you can't modify the now-private copy. If you want a modifiable copy, you just make one, like so:
final finalFoo = foo; Object bar = new Object() { private myFoo = finalFoo;
// myFoo now acts as 'foo' would if this was // *really* a closure. }I'd agree that the construct sucks. I'd rather be in a language with closures myself.
-
Re:Celebration!
-
Re:free as in beer
It's come from a joke.
There are two types of people - those who want stuff for free and those who want to be free to use different stuff.
The first type want free beer. The second want the right to make the beer.
So Linux may be or may not Free as in Beer depending on where you get it but it's always Free in licensing due to the GPL.
Microsoft offer much that is Free as in Beer but little which allows you freedom in using it.
You may find a better description at http://www.gnu.org/philosophy/free-sw.html or http://c2.com/cgi/wiki?FreeAsInBeer
Hope that clears it up a little.
-
Re:free as in beer
Free as in beer.
HTH -
LOGO and Green Globs
Both are excellent learning programs.
Green Globs is a battleship game with MATH
LOGO or Turtle Graphics: is the first programming language a kid needs to learn.
In A.D. 2014.....
All our outsourcing are belong to Uganda -
Re:Umm.... that will be $250,000 in modifications
Then you're fired for making a serious application full of magic numbers. DRY.
-
Re:'scuse my ignorance but...
One problem is that as a language it lacks elegance and is awkward to build large queries in. More deeply smug relational weenies insist that it does not properly model the relational algebra model pioneered by Ted Codd.
I'm not sufficiently versed in database theory to understand the technical side, but SQL certainly does feel to me like a non-optimal solution. -
Re:'scuse my ignorance but...
One problem is that as a language it lacks elegance and is awkward to build large queries in. More deeply smug relational weenies insist that it does not properly model the relational algebra model pioneered by Ted Codd.
I'm not sufficiently versed in database theory to understand the technical side, but SQL certainly does feel to me like a non-optimal solution. -
Re:'scuse my ignorance but...
One problem is that as a language it lacks elegance and is awkward to build large queries in. More deeply smug relational weenies insist that it does not properly model the relational algebra model pioneered by Ted Codd.
I'm not sufficiently versed in database theory to understand the technical side, but SQL certainly does feel to me like a non-optimal solution. -
Re:Rubyx... and Ruby itself
Depends on if you mean the interpreter and standard libraries or the source code you produce.
For the source code, you can often get quite small while still being readable. Ruby's designer, Matz, takes things like aesthetics, intuitiveness and liveable design more seriously than most language designers. Whether it succeeds or not is a personal judgement call. It leads to some useful things being excluded from the standard base because they are deemed "not the Ruby Way", but also to a tool base that is (in the estimation of fans) very clean, useful and fun to use.
You can read about the ideas behind Ruby here in a presentation by Matz called "How Ruby Sucks". Also an extended Python/Ruby comparison here.
Basically if you want to see what Perl would look like if it was created by a crazy Japanese guy with a peculiar philosophy of programming instead of a crazy American guy with a peculiar philosophy of programming, take a look at Ruby. -
Must Have
Start with an Aeron Chair! Everything else is just fluff. Oh and get one of those cool paintings of Dogs Playing Poker.
-
Whoopsie!
I haven't seen it yet, but reading their message board it sounds like there's a booboo. In the chess game Kirk and Spock may both be moving WHITE peices.
Or maybe it's just Kirk pulling a Kobayashi Maru.
- -
Re:WikiAgreed.
But long TODO lists scare me away, I have to use NextList with them. NextList shows just a few top items from ToDo.
I even wrote MoinMoin plug-in to insert ToDo into any wiki page with macro [[NextList(N)]]
-
Re:Functional programming languages dying? F# XSLT
So, I guess the theory behind functional languages live on in one of the hottest technologies around today.
Also, the last version of Prolog was in -97. Pity, you can really do some magic in that language.
I think you will see vistages of functional languages implemented in a lot of derivative languages even if they are inherently declarative. For example, aspects of anonymous functions, curried functions, etc. can be utilized in languages generally thought to be non-functional. Case in point, Python.
Additionally, I wouldn't classify Prolog as really a functional programming language like Erlang, ML, etc. Although Erlang was developed utilizing Prolog, you cannot make bona fide function declarations in Prolog. Prolog really deserves its own classification: a logic programming language.
See The Wiki for more details. -
Re:Let's get this out of the way
-
How to improve patents.
There is a wiki page on How to improve patents here.
If your add to the page, remember to add a how not a just a what.
Knud -
Re:Needs more
-
Hardly new
Wikis have always been useful for self-promotion in less obscene ways. If you're knowledgeable in a field, and there's a wiki for it, then some tasteful posting and linkage is good for getting your name around. Ditto for Usenet and web-based discussion forums.
And wikis have always been abusable--by design, really--by people with agendas. Hate Java or Python or Emacs or Perl or Windows? Then go to a popular wiki, delete positive comments about them, add positive comments about your own pet topic, and there you go. There's even a term for this. -
Re:Yes
-
Re:Happy hacker? I have one Correction
-
Next thing you know Portland, OR will
Be painting Segways Yellow- and leaving them around town for just anybody to use who wants to look stupid, just like the Yellow Bike Project
-
Re:probably
Laziness, by the way, is one of the 3 great virtues of programmers, according to Larry Wall.
Don't knock laziness. It gets things done. -
Re:No....you will never get 100% of your energy from eco friendly sources, because nothing is 100% eco friendly
Clever use of words!
How about,
you will never get 100% of your energy from 100% eco friendly sources, because nothing is 100% eco friendly.
Why don't we just replace 100% eco friendly with eco friendlier.
You will never get 100% of your energy from eco friendlier sources, because nothing is eco friendlier.
Doesn't really work, does it.You seem to be offering a Package Deal.
-
Re:what MS funded "study" about Linux isn't FUD?
Usually arguments about "Linux" vs "GNU/Linux" are nearly pointless, but in this case they matter. Linus wrote most of Linux-the-kernel but not most of Linux-the-operating-system. Brown takes advantage of most people thinking of "Linux" as Linux-the-operating-system to make people think that Linux couldn't possibly have written "Linux" in six months. This is a prime example of equivocation .
-
Re:Oh my sweet Jesus...
There are some fundamentally defined tenants of good programming however and they include strong typing for one.
I think Lisp hackers might well disagree, along with people who program Python and Ruby and, if they're honest, C, C++, Java, and C#. See ManifestTyping on the C2 Wiki for a fuller discussion.
I have seen bad code in Perl, but I've seen it in many, many other languages. Perhaps a more interesting question is "Does Perl encourage sloppy programming or does it allow people who aren't concerned about so-called software-engineering to do productive things?"
-
Eighth Amendment
And I thought the eight amendment of their constitution outlawed cruel and unusual punishment. Every American is very keen on the constitutionally protected right to free speech, and most claim the constitution supports their position on gun ownership (whether pro- or anti-). I find it illuminating that the 'cruel and unusual' bit is considered a joke...
-
Compiler extension (was:Can't wait)
It would be great, if instead, I could hook into the compiler and tell it exactly how it should handle vectors.
Well of course that's what templates are. Yes, their syntax is horrendous but that's what comes of trying to wedge the concept into the existing crannies of C syntax (or when, as Stroustrup remarked to me once, "the ecological niche was already polluted").
If you hanker for a language in which metasyntactic extension is natural, you need Lisp macros (or here and here for a more complex example), Scheme "hygenic" macros or the CLOS MOP.
But if you really want to consider "hooking into the compiler" as you say then you should look at the reflective programming work, the ground work for which was laid down almost 25 years ago by Brian Cantwell Smith and was even implemented, by me and others, back then. Although a lot of work continued in this area that vein pretty much got mined: unless you can think up a completely new control structure there's not a huge amount more you can do with such a system than you could with a normal metasyntactic extension mechanism.
HTH
-d -
Compiler extension (was:Can't wait)
It would be great, if instead, I could hook into the compiler and tell it exactly how it should handle vectors.
Well of course that's what templates are. Yes, their syntax is horrendous but that's what comes of trying to wedge the concept into the existing crannies of C syntax (or when, as Stroustrup remarked to me once, "the ecological niche was already polluted").
If you hanker for a language in which metasyntactic extension is natural, you need Lisp macros (or here and here for a more complex example), Scheme "hygenic" macros or the CLOS MOP.
But if you really want to consider "hooking into the compiler" as you say then you should look at the reflective programming work, the ground work for which was laid down almost 25 years ago by Brian Cantwell Smith and was even implemented, by me and others, back then. Although a lot of work continued in this area that vein pretty much got mined: unless you can think up a completely new control structure there's not a huge amount more you can do with such a system than you could with a normal metasyntactic extension mechanism.
HTH
-d -
I'm annoyed.
-
Re:I like the last bit
Treating the micro v. monolithic debate as a solved problem ("microkernels win!") is as idiotic as suggesting that object orientation is the ideal solution to all programming problems.
Apparently, the really trendy kids have decided that microkernels themselves are obsolete, and moved on to something called exokernels. I can't pretend to understand the distinctions involved. -
Re:taking the high road(?); Careful what you wish
I'm surprised that people don't see the First Amendment concerns. Be careful what you wish for. What if L.L. Bean where "taking the high road" by preventing their customers from being "accosted" with information such as L.L. Bean's use of sweatshop labor...
This is not a First Amendment issue. If the situation were that surfers were voluntarily using a popup-generating program (remember www.thirdvoice.com? (thirdvoice wiki) then it would be, but this situation is different: Surfers who did not authorize the placement of the spyware software on their PCs are being presented with Nordstrom's advertising.
Nordstrom would have the right to bitch about LL Bean's operations in a voluntary medium, but Nordstrom has no First Amendment rights in a medium that entails the unauthorized installation of spyware any more than I have the right to come into your home with a bullhorn and lecture you about the evils of the bush administration. If the allegation of Nordstrom's paying money to a spyware popup-vendor is true, then a reasonable person could argue that Nordstrom has engaged in computer trespass or other illegal behaviour, and it would certainly have no First Amendment rights to do that. -
Re:Poland is not soviet any more
Rektrutacja--I think the "Soviet Poland" phrase was not meant seriously, but as a humorous echo of the "Soviet Russia" jokes popularized by Russian emigré Yakov Smirnoff. (The whole premise of Smirnoff's career as a comedian in the USA was more or less undermined when the USSR broke apart.)
-
Re:Or how about
-
It's about damned time.
WTL has been a bit of an embarrassment for Microsoft.
It started life as an MSDN sample app, but (to the surprise of everyone), people started actually using it. It fits nicely between the niches of MFC and ATL, supports a nice big chunk of what you need to do to get a desktop app running, and does it in a very clean, STL-friendly way. I read in an interview that some folks at MS thought it was a major mistake to release it; fortunately for them (at the time) it was pretty obscure.
There's some history of WTL at WikiWiki.
I remember way back then there were a couple of calls for Microsoft to "give it away" (in terms of control, not price--it's always been gratis), but I suppose the time hasn't been politically right within Microsoft until the recent popularity of their installer program release. -
Re:He's right...
-
Re:Remember Lady Ada
Sorry, this is wrong in so many ways.
Turing wasn't Church's student for the very good and simple reason that
- Church was in Princeton in the USA
- Turing was in Cambridge, England.
They both came up with separate, original proofs that the entscheidungsproblem was not soluable at pretty much the same time; neither was aware of the other's work. Nor did they meet until after both papers had been published.
Obviously the two proofs were logically equivalent but they could not have been more different and it was Turing, not Church who produced the blueprint for the first computer: the universal machine which can compute everything which can be computed. Even today we say of processors and languages that they either are or are not 'Turing equivalent' meaning that they either are or are not equivalent to the machine 'U'.
Furthermore, Turing did not show that you could run the Lambda Calculus on U (although it was implicit, because U could run anything which could be computed, and Lambda Calculus can be computed, therefore U could run Lambda Calculus). It was John McCarthy who did that.
-
The Bombe
Don't forget Turing's Bombes, which ran at Bletchley park deciphering intercepted German signals (see http://www.turing.org.uk/turing/scrapbook/ww2.htm
l ).
Of course, the real father of programmable computing was Tommy Flowers, who seems to have been largely forgotten.
Dunstan -
Re:Hmmm...
Well, there is Inferno, which was developed at Lucent. It's a cross-platform OS meant for highly-concurrent distributed applications. You can run it as a native operating system, or hosted under your existing OS. Like Java and
.NET, it uses platform indepenedent executables, meant for its Dis VM. It uses a language called Limbo, which is designed by the same people behind Unix & C, although it is very different from C. -
Re:You're ignoring the "gotcha"
A long time ago, an algorithms class I took did a series of tests to try sorting by different methods. For small list sizes (~100), bubble sort was always faster. Since illustrating this point was the purpose of the assignment, it was my general understanding that this was an accepted fact. I could be mistaken, but it doesn't really matter. Bubble Wikipedia Entry
My personal take on this kind of optimization is to mostly ignore it until you reach a point where it becomes important. Of course, I mostly write software that talks to databases, might be running distributed components, etc. Most of the large data set work gets done by the database engine. The vast majority of nontrivial optimizations are in reducing the number of network trips.
Of course, even in what I do, I have met code that somehow managed to be so dreadfully awful that network trips weren't necessarily the major culprit. However, in those cases, it's often some pretty scary code written by an even scarier programmer (think 10,000 line procedures with 25 parameters). -
Re:Must take forever.
He is unusual, sadly. It's apparent that you haven't learned this area yet either.
Big-O is a measure of complexity that tells you the worst-case efficiency of a piece of code -- and you don't need a slide rule or a calculator, becuause the answer isn't a number, it's a formula you can determine by looking at the structure of your program.
Knowing how different "types" of formulas compare to one another, it helps you choose and optimize your algorithms.
Being aware of complexity issues ("...is this algorithm O(1)? O(log n)? O(n^2)?") really is essential to writing clean, efficient code -- particularly code that scales well. This applies to almost all non-trivial programs.
(it's also important to know what Big O does not mean -- e.g. when is bubble sort consistently among the fastest sort algorithms? it is if you know your list is very short or mostly sorted beforehand!)
Even if you don't get a formal CS education, it behooves you to learn this stuff. Hit places like Wikipedia and the Portland Pattern Repository Wiki when you see terms like "Big O" mentioned. Trust me, it'll make you a drastically better programmer.
(The Wikipedia article is here: Big O Notation, though it does assume a certain level of math background. Google might be good for finding more "layman's" explanations to get you started.) -
Re:From an IT guy
"Have you ever thought about just turning off the TV, sitting down with your kids, and hitting them?"
According to http://c2.com/cgi/wiki?FunnyEmailSig, it is attributed to Bender, from Futurama.
I'm sure I've seen/heard that before (maybe from your sig in the past). Is it a quote from something?What would we all do without the superior searching power of The Google?
-
Re:Markup languages are still code.You're half right. It is a programming language, but it is a domain-specific language (DSL). DSL's are not always Turing-equivalant (which is what it takes for a language to bootstrap itself). Configuration files are an example of a limited kind of non-Turing-complete DSL's. Also called "little languages" by Brian Kernighan.
Crispin
----
Crispin Cowan, Ph.D.
CTO, Immunix Inc. -
Re:The tools are useful, but...
This is exactly what I would expect from the term refactoring as applied to a source code editor, or IDE. It is implementing a refactoring browser. What exactly did you expect it to do?
-
Re:Its that loser miguel again praising Windows.Can't he talk about anything other than Mono and Microsoft Technologies? I swear he must be an employee.
I don't like what he is saying either.
I know: Let's shoot the messenger!!
-
Re:The survey says...
3) It is Noah's ark, we will go on with our regular lives, and the scientists say "Umm... can we have a closer look at that book of yours?"
The Bible is already used as a historical tool. It's one of the few sources of stories from that era and contains many references to locations, people, etc. which existed back then. However, to say then that the whole Bible is true because some historical data have been shown to be true (as Evidence That Demands a Verdict does, for example) is going too far.
For example: "George W. Bush became Ruler of the Land and took up his abode in the Whitehouse. He cried out to heaven and God heard his cries and sent two massive jumbo jets crashing into the World Trade Center buildings, and leveled them."
If someone from the future reads this, they can verify that George W. Bush existed. They can verify that he was Ruler of the Land (aka President of the USA). They can verify that two jets crashed into the WTC buildings and they were leveled. All these are facts, but the story is complete bullshit. Same thing with the Bible. Take a bunch of facts which are passed down from generation to generation. Many books of the Bible weren't actually written down for several centuries after the fact. Ever play the telephone game for a few hundred years? The kernel of truth still survives, but now the stories are marred in legend and embellishments.
So someone just might even find the remains of a large boat. Wonderful. But they'd have to provide a lot more evidence to counter the existing evidence that no global flood ever occurred. -
Re:Submarine patents?
No, once the patent is issued, it's considered public, and it can't be hidden.
But if you delay the issuing of your patent... then you can do some very evil things...
-
Re:date, reburn, rinse, repeatOr copy them to the next medium. I'm copying my vinyl to CDs. Yet the vinyl will outlast the CDs. Problem? Not. The CDs don't have to last forever. They just have to last until I copy them to the next medium (DVDs or whatever).
I don't have to be faster than the bear, I just have to be faster than you.
-
Re:I invented the term!
It wasn't Wirth, it was someone who worked for him. The story is ripped off verbatim from here
-
Re:UL 2043?
UL 2043: "Fire Test for Heat and Visible Smoke Release for Discrete Products and Their Accessories Installed in Air-Handling Spaces"
....so my new AirPort base has a smoke detector inside it? Why don't they build that into the new Powerbooks? ;-)It means you can shove an airport base station into an air duct without violating safety codes.
SYSTEM ERROR #43: MOTHERBOARD ON FIRE.
From Ward's Wiki:The BeOS programmer's guide covers two functions IsComputerOn (returns 1.0 if computer is on, unspecified otherwise) and IsComputerOnFire (returns temperature if mainboard has flames coming from it, unspecified otherwise). It's right there in the printed version (though I quote from memory).