Slashdot Mirror


User: putko

putko's activity in the archive.

Stories
0
Comments
699
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 699

  1. How about a module system? on Stroustrup on the Future of C++ · · Score: 3, Insightful

    More powerful languages like ML, CAML and some Schemes have a module system. This allows the programmer to control the meaning of identifiers (e.g. what function they mean). E.g. what gets imported (and with what name), what gets exported.

    Often there is a separate notation for the modules -- it says what files contain the things, what's exported/imported etc.

    That's very useful for encapsulation.

    C++'s namespaces are a crappy attempt to get the benefits of a module system -- that's likely where he got the idea from.

    Hygienic macros would be a good step too.

  2. Re:Perspective of non-C Programmers on Zlib Security Flaw Could Cause Widespread Trouble · · Score: 1

    I looked at the CAML manual for how they describe the runtime checks (dynamic type system). I couldn't find "runtime operand check" nor "dynamic ...". I figure the SML has to be have a better spec, but that's not freely available.

    It seems you are in the mold of the type theory people who view type systems as primarily syntactic (like Benjamin Pierce). So I guess "dynamic type system" is a bit anathema to you. I just went by the prof's online book and the Java spec.

    In any case, my original point was that C is not type-safe, in the sense that you can apply nonsense operands to operators (perhaps obtained via your "pointer arithmetic error" or "array bounds error"). I meant type-safe in the sense of Milner:
    "Well-typed programs never go wrong."

    C programs go wrong -> C is not type-safe.

  3. Re:Perspective of non-C Programmers on Zlib Security Flaw Could Cause Widespread Trouble · · Score: 1

    By type system I mean: the set of formal rules that define the type of an expression (e.g. in a sequent calculus, for a fonctionnal language).

    Your definition is mistaken. CAML and SML have a static (what you call a type system) and dynamic type system. Java similarly has a dynamic type system (for downcasts, arrays, etc.). A dynamic type system ensures that the program is type-safe, because the static type system is not sufficient.

    Your remark, "So this error in zlib would not be caught if zlib was programmed in Java because of Java type system, but because of runtime checks that are independent from its type system." again displays your faulty understanding of the dynamic type system of Java.

    You claim that Java's dynamic type system is separate from the type system. That is consistent with your faulty definition of "type system", but is nevertheless incorrect. Here's something from the language spec (page 313):

    "A basic principle of the design of the Java programming language is that the runtime type system cannot be subverted by code written in the language...

    So what you call "runtime checks that are independent from its type system." is what the Java spec (and I) call a "dynamic type system". I would assume the same is true of CAML/SML, but those specs are not available online (and I don't have them handy).

    Here's more, from Computer Science professor. Please look here -- this Professor is suitably precise to mention:

    There is some dynamic typechecking that occurs in statically typed languages too. For instance, in Java, downcasts are verified at run-time and can raise exceptions. Out-of-bounds array accesses are also checked at run-time in Java and Caml, and are thus dynamically typed. Array accesses are not typed in C or C++, since no check is performed at all. Note that the type of an array (i.e. int, float) is statically checked, but the size is dynamically checked.

  4. Re:Perspective of non-C Programmers on Zlib Security Flaw Could Cause Widespread Trouble · · Score: 1

    the problem is that C is not a type-safe language

    Please. This is a very boring misconception about types. It's not a type error. It's a pointer arithmetic error. Nothing a type system à la ML, Java, CL, whatever would have corrected.


    No, you are wrong. The "pointer arithmetic error" that you mention is called (by experts) a "runtime type error".

    A language like C that allows you to make type errors is "not type safe", which is why I wrote what I wrote.

    Furthermore, not all programs that use arrays require dynamic type checking (as you call it "mandatory bound checking") -- if the program is simple enough. Such type systems don't need to be uwieldy. E.g. this compound statement is type safe, uses arrays, and doesn't need a complicated type system:

    {char x[2]; ... Foo(x[0],x[1]);}

    So I'm afraid you are the one with the "interesting" misconceptions about types.

  5. Perspective of non-C Programmers on Zlib Security Flaw Could Cause Widespread Trouble · · Score: 4, Informative

    It is really something that this flaw impacts so many applications.

    This situation is unnecessary; the problem is that C is not a type-safe language, like ML, CAML, Haskell, Common Lisp, Scheme, Java, etc.

    You could write that code in SML/CAML/Common Lisp and likely get it to run as fast or faster than the original (particularly if you did some space/time tradeoffs ala partial evaluation). Integration with the applications in the form of a library would be the tough part.

    Here's a provocative bit from Paul Graham (Lisp expert entrepreneur) on buffer overflows.

  6. Re:Property rights in the US of A? on Google Wins 'Typosquatting' Dispute · · Score: 1

    American conservatives are greatly troubled by the decisions you've mentioned, and look forward to the replacement of the liberal judges with ones in the mold of Scalia, Renquist and Thomas.

    It was the liberals that said that it is OK for big-mamma govt. to take away your property (the city knows best, right?). The conservatives are and were totally against this decision.

  7. Looks like a victimless crime to me on Man Arrested for Using Open Wireless Network · · Score: 1

    In this case, the "victim" doesn't know what the bad guy was doing. There's no sign that he did anything to harm anybody.

    Maybe he was just surfing something he didn't want his girlfriend seeing.

    It seems odd that in this case, they don't even need to show intent or harm, to hit him with a felony.

  8. Wood Ipod (guilt) on Real Wood iPod · · Score: 1, Insightful

    It looks great. But isn't it bad to do this? Is this stuff sustainably harvested?

    I don't mean to sound like an eco-idiot here. Just when I hear the word "hardwood", I think of deforestation, erosion, and general guilt. There's a reason why the redwood trees are almost entirely gone: we converted them into money.

    That's why I like plastic.

  9. Hard to Argue that They Owe Him Work on How P2P Can Taint a Career · · Score: 4, Insightful

    I'm sure Britain doesn't have the concept of "at will" employment, or the concept that if the guy was self-employed, "freedom of contract" -- but it seems clear, they don't owe him a job.

    The guy got fired because he's on record making hostile statements about intellectual property. A company that lives and dies by I.P. has a good reason to not want the potential troublemaker.

    E.g. suppose I work for a AIDS activist organization, doing some programming. But I'm on record as saying, "AIDS is God's way of punishing sodomites." If that got around, I figure I'd be out of some work.

    Put yourself in the shoes of management. Try to imagine having to keep on working with someone who says, "I hate you and all that you stand for." If you were a manager, you'd probably feel really frustrated if you couldn't fire him.

  10. Re:Designers/Administrators get paid on In SIlicon Valley: Profits up. Employment Down. · · Score: 1

    The Japanese approach of working very hard to make marginally better products (striving for perfection) always seemed like the right approach to me.

    Some Americans were actually taking this somewhat seriously when the Japanese were kicking ass with cars.

    After the Japanese bubble burst, people here seemed to be happy to ridicule the Japanese, and go back to being lazy without and guilt or apprehension. The fact that there had been a bubble in Japan implied that their perfectionist approach to things was totally wrong; our American methods, rooted in complacency, were obviously superior.

    I'm the opposite of the typical American; when I see laziness and sloth, I get worried, figuring that it can't last long. If I hear about people taking off early for a weekend, that makes me nervous.

    Now, a decade later, we're just in a deeper hole, and millions of Chinese are going to help bury us deeper.

    Take a look at trucks and SUVs, (even if you are not a truck guy): Japanese companies dominate the highest quality trucks and SUVs. They are made and designed in the USA, by Americans. They just happen to be working within a workaholic, perfectionist framework. Now that Honda and Toyota are making big vehicles, I will consider getting one; before, typical American unreliability put me off.

  11. Re:Designers/Administrators get paid on In SIlicon Valley: Profits up. Employment Down. · · Score: 1

    The decrease in transportation costs, and the ease of moving information around means that productive people, wherever they are, are going to get paid a lot more than unproductive people (even if they live next to each other).

    Although it is hard for Americans to accept this, it will be even harder for Swedes, Frenchmen and Germans, who work in economies that are even more sheltered from competition than ours.

    If you like meritocracy, it will be getting even more entertaining!

  12. Re:Designers/Administrators get paid on In SIlicon Valley: Profits up. Employment Down. · · Score: 1

    Your points 1-5 seem to miss the point; as long as you have anything like "trade", you'll be unhappy.

    A lot of what people label "outsourcing" is stuff that we used to make at the lowest cost, until the Chinese (or other Asians) showed up and make it better/cheaper, because they are willing to tolerate working conditions and wages that we feel are unfit.

    Nobody considers the purchase of fine Italian clothing to be outsourcing: the US never made fine clothing anyway -- that is, clothing so good that Italians and French were willing to pay good money for it. [Nike doesn't count!]

  13. Designers/Administrators get paid on In SIlicon Valley: Profits up. Employment Down. · · Score: 4, Insightful

    From reading this, and another article by Richtel about US mom and pop businesses outsourcing their manufacturing, it seems that people who run things or design things still have jobs. That's just not many people.

    The assembly has moved to China. You probably don't want those jobs anyway -- when they were here they were lousy jobs, but now they are unthinkable (unless you like breathing lead). Design and prototyping still gets done in Silicon Valley.

    Even so, actual engineering is moving to Taiwan. Imagine you want to make a board. The assembly guys (Chinese, in Shanghai) need to talk to the engineer and ask some questions about a substitution. Better if he is Chinese in Taiwan, right?

    Even more disturbing (as a non-Chinese-speaking American) is that actual innovation (the stuff we are supposed to be good at) is getting done in Taiwan. E.g. stuff that allows a cheapo processor to have 5 fast ethernet interfaces. Your routers were probably designed in Taiwan, and labled "Cisco" or "D-Link". But Cisco didn't design it -- it was probably someone like these guys: Zyxel (Taiwan)

    Americans need to lose the laziness and start working harder (if they want to be able to pay for enough gas to fill a SUV). This is inevitable. As long as there was no China, the Taiwanese could make decent money on the bottom. Now that Red China is here, they are getting pushed up; they have to do fancier work, or they will live like the Chicoms.

    If the Africans ever get their act together, their wages will be lower than the Chinese, and that will be it for the rag trade. North Carolina will not make any textiles/clothing at that point.

  14. Become one with the Borg (CPAP) on 2005 IDEA Awards · · Score: 1

    Before I got this, I felt human, mortal and weak. Now I'm part of a powerful collective that assimilates all resistance and destroys entire dimensions.

    OK, I've been totally unfair to this product; anything that helps people to breathe and sleep is a good thing, even if it makes you look monstrous. I just wish the designer was less inspired by the work of H. R. Giger

  15. The need for Robots on Japanese Robot Guards to Patrol Shops And Offices · · Score: 1

    Although this robot is not so impressive, I've heard the Japanese have decided it is a national priority to build a robot-based economy. The goal is to provide labor for an aging society (Europe and America have plans for this, but they don't involve robots). The expectation is that after they get the robots economical, they will export them.

    Interestingly, US agriculture has moved away from mechanization in the last few years (and more and more to "Mexicanization") -- human labor is cheaper and ties up less capital than a mechanized harvester. When it comes to things like cultivating a vineyard, there is no viable alternative to human hands.

  16. Some photos of fish caught in the same area on Grizzly-sized Catfish Caught in Thailand · · Score: 3, Informative
  17. Re:Ask commercial divers who work in the Mississip on Grizzly-sized Catfish Caught in Thailand · · Score: -1, Troll

    They have huge fish in Thailand. The guys says around 45 kilo, which is around double the one Mississipi record listed in this article.

    In summary, the Mississipi guy needs to provide some evidence that their fish are as big or bigger, or just STFU!

  18. Article on this amazing species on Grizzly-sized Catfish Caught in Thailand · · Score: 4, Informative

    Here is an article on these fish. Sadly they sound like they are on the way out -- humans have disrupted their environment to the point that the populations are isolated and can't move around freely enough.

    Here is a photo of a giant stingray from the same area.

  19. I'll offer a bounty of $1,000 on Possible RSS Abuse in Longhorn · · Score: 1

    For an RSS-exploit in Longhorn that:

    Uses a priviledge escalation to become administrator and then downloads a new and more secure operating system (e.g. OpenBSD) to replace Longhorn.

  20. Embedded Development on T-Engine Enables Ubiquitous Computing · · Score: 2, Insightful

    Standards Conformance usually gets cut when doing embedded development if conformance ruins the cost of components or power the device requires.

    I don't think they will be able to get everyone to hew to the party line; there will be too many economic reasons to deviate.

    Otherwise, sounds neat.

  21. Re:TFA discusses Open Source Implications on Google Launches Pay-Per-View Web Video · · Score: 1

    OK, so you get my point.

    Do you think Google is figuring that even if they don't touch porn, if they do it in an "open" way, it will just happen that others do, and then MS will feel some real heat in the IE/WMV department -- because users will want the special porn-enhanced firefox?

    Even if the system goes "open" and is commodified and others try to compete with Google, I figure Google will be the primary place for non-porn, and then there will be fragmented porn all over the place. And then a bunch of non-used google imitator/competitors.

    If this happens, MS is really stuck. Do they provide free video hosting, like Google? That's not really their bag: they are competing in an arena they are not set up for. They hate to do that. They suck at running services. It may go like their recent search fiasco: $100 million in PR to launch a service that fizzled.

    All this makes me think the bright people at Google came up with the idea, looked at the strategic implications, and then decided to make it happen. If so, that's really cool -- unlike Apple, they are going for Billy's jugular.

  22. TFA discusses Open Source Implications on Google Launches Pay-Per-View Web Video · · Score: 3, Interesting

    TFA mentions some really neat stuff: Google is giving away the code. That means that folks will be able to take open source browsers, and extend them to use the video streaming code. You could set up your own streaming service too.

    When I first heard about the Google's video hosting service, I thought, "SO WHAT."

    But if others set up compatible porn video streamers, and others make firefox work with the video service well, then suddenly the combination of the video streaming and the video features (built in to browser) suddenly make them "gotta have" features --- esp. if porn video sites pop up.

    Suddenly IE and WMV start looking totally behind the times. MicroSoft won't be able to integrate those features cheaply if they are done under a GPL: they are totally hosed, and have to play an expensive catchup game. Fine -- they do "embrace and extend", but it will cost them a lot of time and money.

    In the meanwhile, pornlovers will have switched over, and M$ will be looking pretty useless.

    If the people at Google are doing this on purpose, you have to give them credit for doing to Billy what he's done to so, so many others!

  23. Maybe Iranians have Different Values? on Iran Continues to Censor Internet Communications · · Score: 2, Interesting

    Maybe Iranians have different values than us, and they want the good stuff that technology provides, but not the bad.

    Sort of like the Saudis: they want the cars, lobster and Switss watches. They don't want the porn, feminism or modern art.

    A lot of the Iranians in the country are probably happy that the arrival of internet doesn't mean they'll be flooded with things they consider degenerate.

    Besides, they are smart folks. They'll find a way around it, if they really want the tubgirl, goatsex, etc.

  24. LUA is not a cure-all on Windows Users Ignoring LUA Security · · Score: 1

    One big problem with Windows is that there are too many local exploits that allow for priviledge escalation. These turn remote exploits into remote, rootable exploits

    This has its roots in Windows's history (e.g. Shatter attack). Microsoft has made some effort to patch up local exploits (e.g. the shatter attacks are fixed -- supposedly), but to the extent that they are there, if people do start using LUA, that's going to get banged on like crazy, and there will be a further slew of exploits.

    Given the problems of running LUA, this will really make people like they're morons: they'll be wearing the hair-shirt of a LUA experience, and then getting bukkake'd(*) with malware anyway.

    Billy's going to have to try it again, with feeling.

    * Bukkake: a Japanese word meaning, "to splash".

  25. Not a howstuffworks.com article? on Greatest Beams In Movie History · · Score: 1

    I was sure this was going to be an idiotic howstuffworks.com BS article.

    Instead it is refreshing film trivia.