Slashdot Mirror


User: Gorobei

Gorobei's activity in the archive.

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

Comments · 908

  1. Re:Does C# have continuations? on C# 2.0 Spec Released · · Score: 1

    Semi-analogous. You can essentially jump back to some arbitrary point in your program and resume from there (multiple times if you wish.) This lets you write constructs like choose/fail in this pseudo-code example:

    int[2] choose2numbers()
    {
    return( [ choose( 0, 1, 2, 3, 4, 5 ), choose( 0, 1, 2, 3, 4, 5 ) ]);
    }

    void trick( int sum )
    {
    int nums[2] = choose2numbers();
    if( nums[0] + nums[1] == sum )
    printf( "%d is the sum of %d and %d\n", sum, nums[0], nums[1] );
    else
    fail();
    }

    Given a number from 0 to 10, trick() will find a pair of numbers that add up to sum.

    With constucts similar to the above, it is easy to write a general game player (for Chess, Go, TicTacToe etc.) A routine like choose2numbers() generates candidate moves, and the position evaluator just returns a goodness for any position , calling fail() for positions not worth investigating further. The game engine can just call these routines, supplying backtracking as needed, without any knowledge of what the move generator and position evaluator are actually doing.

  2. Re:Does C# have continuations? on C# 2.0 Spec Released · · Score: 1

    You are quite right. The approachs are either: define a set of macros that define continuation accepting forms of the core CL forms (lambda, apply, etc,) and require people to use them; or define those macros, and write a code-walker macro to convert user code into the continuation style form.

    When I was writing in Scheme (back in 1986,) I found myself using call/cc quite often. In CL, I rarely find myself missing continuations, perhaps because the hairy parts of my code don't use defun, but rather use macros to express the functional bits, and code-walkers package up the various definitions into compilable functions.


    On Lisp has several chapters on continuations in CL. I, at least, found it interesting reading.

  3. Re:Does C# have continuations? on C# 2.0 Spec Released · · Score: 3, Informative

    It's Scheme that has call/cc. Common Lisp didn't provide it (though it's not hard to write something similar if you really want it.)

  4. Re:What the hell! on SCO gets $50 Million Investment · · Score: 1

    Watch what they invest in over the next few months. If you see sweetheart deal in a promising startup or two, you probably have your answer.

  5. Re:IBM model M keyboard on What's the Oldest Hardware You are Still Using? · · Score: 1

    I'm sure PcKeyboard will provide adapters for their keywords if the PS/2 port is eliminated.

  6. Re:$16,000 iTune? on Slashback: Ascent, Patents, Transferability · · Score: 1

    Someone willing to donate $16,000 to the EFF and who sees that this is an interesting test of the DMCA: iTunes makes no licensing claims about the song, first sale means the copyright holder can't question the sale, now a buyer has a legally owned piece of music he can't play - can he circumvent the encryption for interoperability? Can people sell him a tool to let him play the song (the tool obviously has substantial non-infringing use?)

  7. Re:maybe 4x more efficient but on Embedded Systems Study Rebutted · · Score: 1

    200+ F? Wow, lucky it wasn't a mere 40 degrees or so hotter or his blood would have started boiling!

  8. Re:This is scarey on Former Intel Engineer Pleads Guilty To Taliban Aid · · Score: 1

    Actually, I am a naturalized US citizen. I thought long and hard before saying the oath.

  9. Re:This is scarey on Former Intel Engineer Pleads Guilty To Taliban Aid · · Score: 2, Insightful

    The interesting thing about this case is that he was a NATURALIZED CITIZEN. In exchange for citizenship, he had explicitly sworn an oath/affirmed that he had renounced allegiance to all foreign states.

    When he decided to aid the Taliban, did he bother to publically declare that he had changed his allegiance? No!

    If he had been born a US citizen, I'd cut him some slack and merely imprison him for the duration of hostilities. As a naturalized citizen, he deserves either deportation or more jail time for lying during the naturization process.

  10. Re:A little OT but on SETI@Home Publishes Skymap · · Score: 5, Interesting

    We assume aliens will do the same exponential technology advance that we are doing.

    If life is common, the vast bulk will be single-cell goop, lichen, etc. The ones that go multi-cellular have a shot at intelligent species. Get intelligent, and you have fire, the wheel, and radio in short order.

    The human race has had radio for 100 years or so: if we detect a signal from aliens, chances are that they have had radio for thousands or millions of years. We are almost certain to be the primitives in this case.

    Interestingly, the radio age is probably extremely short-lived: signal compression, etc, should make any advanced race's radio look like noise to observers.

  11. Re:Best Article Ever on Cringely Proposes a Music Sharing Alternative · · Score: 3, Insightful

    Property rights, communal rights, performance rights, and copyright do not map one to one. A corporation cannot buy one copy of a book and then send a photo-copy to all its stockholders. A corporation can't take a hit song, buy the CD, make it the corporate anthem, and play it at company events without charge.

    At best, it can behave like a library: offer the book up, and let one stockholder at a time read it. If the one-at-time method is implemented via electronic downloading of the data, the copyright holder probably has a good claim that the whole system is designed to facilitate infringment.

  12. Re:interesting, but not really a new concept on Intrusion Tolerance - Security's Next Big Thing? · · Score: 3, Insightful

    Huh? The military has had *thousands of years* of experience in information security! They created/funded/supported research in almost every major communications system/cypto system of the past two millennia.

    They know no system is totally secure - especially when your adversary has spies, troops, and bombs. You expect enemy signals intelligence, broken codes, code-books captured in combat, spies in your data centers, secure comm channels destroyed.

    There is no one line/security barrier: the only rational approach is a defense in depth, with montoring of problems, and the ability to route around compromized and destroyed systems.

  13. Re:Offload them to where? on Mailing Disks is Faster than Uploading Data · · Score: 2, Informative

    I read your link to stanford. Look at the volumetric density numbers towards the end: in 1999, 500Gb/Ci - that means 20 cubic inches of media holds the entire 10T of data per truck. Your 2m by 2m spool of 8 micron tape @ 500Gb/Ci lets us reduce our trucks to one every fifteen minutes or so. Easy enough to buy an array of tape readers without worrying about the speed of light.

  14. Re:hm... on Mailing Disks is Faster than Uploading Data · · Score: 1

    Aarg, missed the math error in the parent post, total cost = approx $20M/year.

  15. Re:hm... on Mailing Disks is Faster than Uploading Data · · Score: 1

    I figure closer to 300 drive-thru docks - 1000 tapes is approximately 1 ton, 1-2 fork-lift loads Each truck (well, more like vans) gets 100 seconds or so in its dock, crew of 3 per dock, total cost = $4 million per year.

  16. Re:LISP, the religion on Jackpot - James Gosling's Latest Project · · Score: 1

    Well static typing makes the parse tree richer in the same way that requiring you to list your religion on a driver's license application makes the DMV's database richer. I'm not convinced of the benefit.

    It (the former) tells you the set of messages (or methods, whatever you wanna call them) that it is legal to send to the value in question. It tells you what kind of thing the value is supposed to be. How can that not be useful in analysis?

    I'm sure it's useful in analysis - the question is what the analysis is intended to achieve. Proof of correctness? Proof of not-crashing? Proof of optimisibility? Something else? For any large system, proofs are impossible, and type checking sees diminishing returns after 300k lines of code or so.

    Access modifiers are either a declaration that you are more intelligent than your users, or a way to hide your bad code from other people.

    Their most important purpose is to absolve developers of the responsibility of keeping backward compatibility for those members. Sometimes you want to hide your implementation so you can actually change it without breaking third-party code. This is data hiding - undergraduate-level stuff. But maybe you've never worked on code that's likely going to be changed in future releases and which is used by third parties.

    Well, recently I've mainly worked on >10m LOC systems that are released on a sub-1month cycle. Perhaps I should re-read those papers I wrote 20 years ago - my undergrad insights should come in useful.

  17. Re:LISP, the religion on Jackpot - James Gosling's Latest Project · · Score: 2, Insightful


    While it's true that the program is the parse tree in Lisp, that's not a very strong statement.

    True.

    Lisp's elegance comes from the fact that there are so few constructs in the language, and basically everything is a list -- even your programs.

    Hmm, except for the arrays, hashtables, structures, objects, compiled functions, strings, rational integers, bignums, system pointers, etc that Common Lisp provides.

    But they're basically just lists, that's all. So you have this wonderful flexibility, but the parse tree doesn't actually tell you very much about the program; you have to "parse the parse tree" to recognize higher-level constructs.

    We always have to convert information into meaning somehow. Do I want to recognize a high-level construct such as:

    (dotimes (i 10) (format t "~A~%" i))

    or maybe I want it represented as a standard looping form:

    * (macroexpand-1 '(dotimes (i 10) (format t "~A~%" i)))

    (DO ((I 0 (1+ I))) ((>= I 10) NIL) (DECLARE (TYPE (INTEGER 0 10) I)) (FORMAT T "~A~%" I))

    Perhaps I want to see it as just variables and gotos, with type information that the system inferred:

    * (macroexpand '(dotimes (i 10) (format t "~A~%" i)))

    (BLOCK NIL
    (LET ((I 0))
    (DECLARE (TYPE (INTEGER 0 10) I))
    (TAGBODY
    (GO #:G1125)
    #:G1124
    (FORMAT T "~A~%" I)
    (PSETQ I (1+ I))
    #:G1125
    (UNLESS (>= I 10) (GO #:G1124))
    (RETURN-FROM NIL (PROGN NIL)))))

    Or maybe even as its assembly code:

    (defun f () (dotimes ....))
    (disassemble 'f)

    48262DC0: .ENTRY "LAMBDA NIL"() ; (FUNCTION NIL NULL)
    DD8: POP DWORD PTR [EBP-8]
    DDB: LEA ESP, [EBP-32]

    DDE: TEST ECX, ECX
    DE0: JNE L2
    DE2: XOR EBX, EBX ; No-arg-parsing entry point
    DE4: JMP L1
    DE6: L0: MOV [EBP-16], EBX
    DE9: MOV [EBP-12], ESP
    DEC: SUB ESP, 12
    DEF: MOV EDX, 671088679 ; T ....

    Reasoning about programs happens at many levels, Common Lisp seems to provide a lot of the tools.

    Now languages with lots of language-level constructs -- like strong static types, objects, access modifiers, etc. -- tell you a whole lot about high-level structure with their parse trees.

    Well static typing makes the parse tree richer in the same way that requiring you to list your religion on a driver's license application makes the DMV's database richer. I'm not convinced of the benefit.
    Objects are cool - Common Lisp has them (and they are more powerful than Java's or C++'s by far.)
    Access modifiers are either a declaration that you are more intelligent than your users, or a way to hide your bad code from other people. I know that's a bit cynical, but I've noticed that in good programming teams, almost everything winds up public (especially in environments that encourage shared code ownership, support interactive debugging/programming, etc.)

    (And, for those following along at home, Lisp is not such a language -- not that that's a bad thing, but it isn't. Lisp builds these high-level constructs out of a very few language-level atoms.) To my knowledge, applying the "language is the parse tree" principle to non-functional languages is still largely the domain of research projects like Jackpot, Eidola, and Intentional Programming, and visual languages.

    Perhaps. I think Lisp programmers tend to worry less about refactoring and the like because they have a very powerful macro system, strong compilers that infer a lot of stuff, and a representation that blurs the line between program and data. You write down the stuff you understand, play with it interactively, understand it better, write a few macros or functions to shift code to data and vice versa, repeat until done.

  18. Re:Best quote in the Streisand story on Barbra Streisand, Miss Vermont, And Your Website · · Score: 1

    Forbidding someone from writing about their own life, when what they're writing is the truth, is crazy.
    True.

    Wanting not to have detailed pictures of your house (and the land connected to it) posted on the internet seems pretty reasonable to me.
    True, but wants are not rights. If the public can see it, it's public by definition. People can walk by on the beach, sail by in a boat, or fly by in a helicopter. It's not like he used a big telephoto or thermal imager to expose things normally invisible (if the cops do that, they generally need a search warrant.)

    Is it freedom of speech if a corperation violates your privacy and sells your personal information (say, medical records, financial records, or data on your recreational habits)?
    Medical: we have laws covering this - privacy is implied, and few people are allowed to see this info.
    Financial: we have laws covering this too - the viewer of the records, in theory, needs a legitimate reason to ask for your credit history, etc. Some financial records are public tho - e.g. how much you paid for your house.
    Recreational - you have almost no rights here - you do it in public, people can sell that information.

    Is it freedom of speech for spammers to send out the millions of messages that they send? I don't think it's nearly as clear-cut as you'd make it sound.
    They are free to speak, the issue is nuisance: using our resources to delivery their message. Free speech has little to do with it.

  19. Re:Streissand has a point on Barbra Streisand, Miss Vermont, And Your Website · · Score: 1

    yelling fire in a movie theater
    the court said this was the equivalent of pulling the fire alarm - it's not speech, it's action. Legal if there is a fire, public hazard if done falsely.

    publishing addresses of abortion doctors
    usually legal (e.g. phone books, medical listings.) Bit of a grey area if you paint bullseyes on their faces and distribute the information to a group of people that has previously violently attacked abortion doctors.

    Both of these actions of speech cause a reasonable risk of bodily harm or death to a specific group of people. Writing an account of your relationship with a screwed-up, inexperienced girl does not.

  20. Re:Nitrous Oxide and Rubber? on Flight Testing Of Burt Rutan's X Prize Entry · · Score: 3, Informative

    um, what do you think solid rocket fuel (i.e. the stuff used in the space shuttle's booster) is? It's basically rubber with an oxider and some metal powders.

    The stuff that reacts with the oxygen in most of these rocket engines is a hydrocarbon: rubber, plastics, asphalt, kerosene, etc.

  21. Re:Linux : The Nest Great Surge on IT Growth: Exponential No More · · Score: 4, Insightful

    Sorry to burst your bubble, but Linux isn't the next great surge - it's the maturity part of the curve. It's an open, stable, commodity technology that can be used by anyone that wants a low-cost solution to some business problem.

    Think railroads - Linux isn't the high performance locomotive that lets you get a jump on your competition, it's the national transportation network that lets you ship stuff from A to B without paying exorbitant fees or risking your business on a monopolist's whim.

  22. Re:Read it again on Xbox Hacking Book Prepares to Fly Off Shelves · · Score: 1

    That's not quite what the section says. It only applies to using consumer electronics, telecom, and computers -- it says nothing about your rights of free speech or the press concerning publishing in a dead-tree format.

  23. Re:"Viruses," Not "Virii" on Slashback: Security, Telephony, Solicitude · · Score: 1

    It would only be hard to avoid if the original word was "virius." But it's not!

    And no, Virus is not the same declension as Annus!

    Don't even get me started about "octopi."

  24. Re:hmm. on Abandoned & Little Used Airfields · · Score: 1

    You mean like this:

    Gimli Glider

  25. Re:Others more important? on ACLU And Others Weigh In On CIPA Injunction · · Score: 1

    You might think that, but you'd be incorrect. All the freedom of speech clause says is that the government will make no law abridging your ability to express free speech. It is perfectly legal for the government not to help other people hear your speech.

    True, but this is not quite the issue in question. Once the government has created a conduit for information (e.g. a library,) it is actively helping the publication of some speech. If it then bans certain content from this channel, it is effectively restricting publication based on content. The engineering term (think transistors, etc) for this is 'bias,' which is unsurprisingly very similar to the real-world affect.

    In legal terms, this is the distinction between a positive law and a negative law: a positive law demands action (the law requiring that you protect your children, for example, from negligence), whereas a negative law prohibits action (laws prohibiting murder, for example). The 1st amendment clause is a negative law prohibiting the expression of speech, not its reception.

    I assume you mean "prohibiting the suppression of speech." Anyways, the courts have been pretty rational on this point: you have the right to publish, people have the right to ignore you, and third parties (e.g. the government, telephone companies, mall-owners, airports) are looked upon which deep suspicion if they try to restrict the exchange of information between the first two parties.