Agreed. I knew him when he was an undergrad, and even then he seemed more focused on the flashy and shallow than actual CS. My musician friends did say he played quite well, however.
Because corporations are genderless, it should be "plaintiff loses its ability." This is a bit ugly, so the best solution would be to avoid the issue entirely:
Yep, the ruling was really clearly written. In addition to demolishing the lower court's argument, it even added a few bitch-slaps -- 3 "[sic]"s on a single page. I love it when judges spice their legal correction with grammatical correction.
Consider IO, e.g. write a, then b, then c. In our super-duper functional language, we can't change anything, so we pass an "IO State" block around: io1 = write a io0 io2 = write b io1 io3 = write c io2
Wow, these io things look kinda stupid and error prone, so let's make them implicit with higher order functions and call the resultant construct a "monad."
Chapter 2 - What if users copied and reused our io things?
That would really suck. Let's make that impossible.
Chapter 3 - Our language is now perfect.
Homework: have your grad students write a million line program using monads.
Interesting. I think Linux's documentation is actually better than Microsoft's. If an app is giving me a problem, I can usually just cut and paste the text/log message into Google and either get a solution or find out what I'm missing. I know that's a loose definition of documentation, but it's documentation none the less. When XP's wizards fail to troubleshoot a problem I'm having (which is 95% of the time,) I'm SOL with no idea what to do next. The only success I've had using Google to debug a Microsoft product was when Mech Commander 3 wouldn't start due to a bad copy protection scheme - someone in Europe had been kind enough to post a fix for that.
I completely agree. Marriage is a specific christian tradition that is bound by God and the love of a man and a woman for each other. That is what marriage is.
So, um, people didn't get married before Christianity existed?
Thank God the founder of Protestantism (Henry VIII) was such a role model: of the seven people he married, all were women.
They mostly aren't looking for compensation. It's a prize, not an R&D funding exercise.
Looking at the teams:
Rutan - wants to build cool flying vehicles (e.g. round the world on one tank of gas.) Ignoring his photoshopped SpaceShipOne images, actually has a chance at the X-Prize within two years.
Carmack - wants to make cool rocket toys. Working on hovering, not space shots. 5% chance of X-Prize within 5 years.
Steve Bennett - publicity seeking loon. 0% chance of any rocketry of interest, ever.
All the rest - 20% chance of success with 5 years. Seriously, if you aren't test firing a R motor (think model rocketry A, B, C, etc) every week at this point, you don't have a hope of meeting the X-Prize goals in the next couple of years.
What legitimate need does a single person have when downloading 40 gigs of data over a short period of time?
Well, I have a perl script that polls certain newsgroups and downloads posts that may be of interest to me. It consumes about 40G/month of bandwidth (mostly while I sleep.)
The V1 was not remotely guided. It had on-board gyros (powered by compressed air) for direction and altitude maintainance. In the front of the missile was a little propellor for distance estimation - once it had spun a set number of times, the bomb's elevator was locked in place and the bomb dove. Some V1s were equiped with radio transmitters - triangulating where these ones fell allowed the engineers to adjust the direction/distance controls on the next set of V1s launched.
The V1s were hardly planes - they were a 25 foot long, 2300lb bomb with wings and rear control surfaces, catapult launched and powered by a 10 foot or so pulsed jet engine.
The first one I checked (Common Lisp,) was just wrong:
(defun dohanoi(n to from u)
(if (> n 0)
(eval
(dohanoi (- n 1) u from to)
(format t "move ~D --> ~D~&" from to)
(dohanoi (- n 1) to u from)
)
) )
(defun hanoi(n)
(eval
(dohanoi n 3 1 2)
) )
eval is not what we want here (it evaluates a single form in the current dynamic environment.) Also, we can use 1- and indent trailing parens correctly. For extra credit, we could make dohanoi local to hanoi.
(defun dohanoi(n to from u)
(when (> n 0)
(dohanoi (1- n) u from to)
(format t "move ~D --> ~D~&" from to)
(dohanoi (1- n) to u from)))
You should prepare for that risk the day you open your brokerage account, buy a seat on the exchange, etc. You have no more reason to expect a trade to be immediately good than you have a right to mow down slow pedestrians if you have a green light: a big set of (fairly common-sense) rules apply.
Wall Street rewards non-diversifiable risk taking, and one of those risks is that trades will be disputed. Your average investor has many ways to mitigate that risk (dollar cost averaging, investing in mutual funds, using a broker.) Don't cry for them that took some damage in this case: it's a risk they knew (or should have known) they were running. You don't see them volunteering to return previous profits on arbitrage trades that went off well, do you?
How the hell can Archipelago be to blame? People wanted to buy and sell at specific prices - Archipelago enabled them to do it. If traders ignored the risk of exchange actions, that's their problem.
Exchange/clearing interventions of various types have occured many times in the past (for example, the redefinition of futures contracts during the Hunt brother's Silver corner, the post-WWI coffee futures reset, the post-9/11 T+5 swap settlement change.)
NASDAQ was the party making the exceptional change, not Archipelago.
I might be the saleswoman you are referring to. Sure, 2" of penis doesn't sound like much, but reply to 5 of those e-mails and you have a pretty good date for the evening.
We may hear of an SCO offer to settle in the very near future.
If they do, it will show the same lack of understanding the German high command exhibited at the end of WWII:
With the Russians surrounding Hitler's bunker, the Germans actually sent an officer out to negotiate peace terms. After five minutes, the Russian general basically said "we have troops and you don't. No settlement other than unconditional surrender is possible."
SCO has spent six months pissing on IBM. Short of "Darl consents to be publically sodomized by the IBM executive of your choice," SCO may not have any negotiating points left.
Going after the analysts is a great idea. If they are forced to respond to the subpoenas, they can say:
a) I just used public information and personal judgement to predict the stock will double in price. This would imply extreme naivety on the part of the analyst, and, given the current lawsuits against analysts pumping stocks, probably gets a Spitzer-style lawsuit against him and his firm.
b) SCO told me X, Y, and Z, and that is the basis for my estimate. If public info, see above. Else: Woohoo, material information given to analysts yet not publically disclosed.
c) SCO hinted privately at Microsoft (or other firms) involvement. Great evidence of dirty hands in the case, and maybe a bit of case b).
In short, I'd hate to be an analyst forced to defend my "strong buy" rating on a stock while also claiming to be an expert in its market sector.
Note also that the Forbes' article also used the phrase "pump and dump." It's never a good sign when the major media starts propagating such theories!
The Scientology cases *should* have settled many of the IP issues years ago: you get to pick *one* of copyright, trade secret, or trademark.
If you pick copyright, you file the work and then people get to quote it in fair use situations (e.g. say it sucks and explain why.)
If you pick trade secret, you lose your rights once everybody knows about it (because several of your victims got pissed and released the information.)
If you pick trademark, people can talk about your stuff as long as they make it clear they are not you.
None of Scientology's stuff is really compelling public interest: they're a wacko space alien cult and many people know it. Yes, they abuse the legal system, drown the odd judge's dog, infiltrate the IRS, steal federal documents, blackmail/frame their opponents, perjure themselves, etc, but most people who deal with them choose to enter into that relationship.
Diebold proposes to arbitrate the voting process with zero oversight - this seems a bit more compelling public interst-wise.
Highly doubtful. Have you seen pictures of damaged WW2 bombers that returned from missions? Many had car-sized holes in them and still flew.
Fire a gun in a plane = decompression = oxygen masks drop, pilot descends to a lower altitude, terrorists look pretty silly trying to do crowd control with little yellow masks over their faces while passengers are trying to put a cap in them.
One would hope so - that's what makes it a good scam. Note there are only two kinds of scam:
1) I'm smart. You're smart, the rest of the world is dumb. Let's take their money. 2) I'm dumb. You're smart. Take my money.
Case 2 is a much easier sell, especially if I provide objective proof like bad spelling and poor command of the English language.
Once I convince the mark I am stupid, I change his calculus from "I risk $100K to get $4M. I might lose $100K." to "this sap will deposit $20M in my bank account. I can probably sucker him out of it. Worst case is I only gain my 20%, which is $4m.?"
I just downloaded MIT's Scheme and I must say it takes a little getting used to (like starting vi for the first time I guess, it really needs a better editor, for newbies anyway).
Excellent choice. You might want to read SICP, it really shows what you can do with Scheme. An editor that supports parenthesis balancing and automatic indentation of Scheme is almost a requirement. As proficiency increases, you'll immediately see from the indentation that something is wrong.
Hell yeah, I just finished a recursive multiply function (I know it's simple, but this editor really sucks).
Have you tried emacs? It supports Scheme well, and is basically the ultimate programmer's editor.
How much do you know about interpreter design and such? I have this project I've been working on and it's coming along, but I know jack about interpreter design, and everything that's there is what came out of my head, no real research into what has already been done, etc. I'll tell you more if you want to know. Any how thanks for the mini-lesson. Time to play with scheme.
Humbly, quite a bit (though I'm currently mostly working on a compiler.) Yeah, I'd like to know more: my email is mmn@bellatlantic.net.
This says: choose is a macro (so all this code is nicely optimized at compile time) that takes an arbitrary number (&rest) of bits of code (choices.) If no choices, just fail, otherwise: Convert all (mapcar) but the first (cdr choices) choice into a function of 0 args (lambda (), c) and put them on a stack named *paths*. Finally, call the first choice. The creation of the 0-argument functions is our version of the setjmp().
fail just tries the next path, if one exists, or returns a special value (failsym) if no paths are left. Note that the call (funcall) to the next path is tail-recursive (i.e. a jump,) so this is effectively the longjmp().
This is still somewhat of a toy example, but it demonstrates the meat of the idea: we are essentially creating our own stack frames (the closures we push onto *paths*,) and jump between them using our tail-recursive funcalls. The GC handles the freeing of unreachable stack frames (unlike C where the longjmp() does the callstack 'freeing.')
I must say, for being so fluent with Procedural and OO design I'm having some trouble grasping the whole continuation design. I'm probably going to download a Lisp compiler and screw around with it for a while to make sure I'm understanding all this. C's setjmp() and longjmp() make perfect sense to me, but that's like putting a freshwater fish in a saltwater tank, I can't get the full understanding until I write native code for it.
Good idea. Now you just need to choose between Scheme and Common Lisp. joto has an excellent summary of the two languages. My personal preference is CL, mainly because my code is practical rather than experimental/theoretical.
Be warned, it takes 3 years or more to become an adept CLer. The language is big, the compilers' error messages tend to be cryptic at first, the macro system and CLOS are both so powerful it's hard to use them well initially. On the good side, it's a lot easier to post a 5 line program to comp.lang.lisp and ask why it throws you into the debugger than to post the equivalent 3 page program in C++ and ask why it segfaults.
So then I guess that continuations cannot really be an after thought to a language design, but rather require some sort of language cooperation.
Correct. Either 1) the language was designed to support them (Scheme,) or 2) the language is introspective enough to allow a user to implement them (CL, many modern scripting languages,) or 3) some clever person kludges up a machine specific implementation in a C-like language (e.g using setjmp/longjmp and various stack-saving tricks.)
I assume that the compiler handles all the stack unwinding and memory deallocation should you choose to jump out of a deeply nested block.
Yep. Most languages that support continuations also provide a garbage collector. If you think as continuations as "stack frames as first class objects," you can't go far wrong. In that case, the program stack just becomes a linked list or whatever, and the GC can handle freeing of dead stack frames.
And I am also assuming that Fail is your call/cc function correct?
I hope so. fail() is equivalent to Choose() [with no args], I.e. there is no possible value/path that can return success in this trial computation.
One more assumption: the function choose(), am I going too far by assuming that it is more than just a representation for a for loop?
Well, at some level it, is just a for loop. It does, however, let us abstract away a lot of backtracking and bookkeeping. E.g. I could write a maze solver as follows:
(=defun solve (maze my-state)
(if (at-exit maze my-state)
(return t);; true - we solved it
(choose ((rotate-left my-state);; turn 90 degrees.
(rotate-right my-state)
(if (is-wall-ahead maze my-state)
(choose ());; i.e. fail - no choice will succeed.
(walk-1-step my-state)));; walk 1 in direction currently facing.
(solve maze my-state)))
Agreed. I knew him when he was an undergrad, and even then he seemed more focused on the flashy and shallow than actual CS. My musician friends did say he played quite well, however.
Because corporations are genderless, it should be "plaintiff loses its ability." This is a bit ugly, so the best solution would be to avoid the issue entirely:
Plaintiff loses the ability to enjoy...
the Plaintiff loses their ability
'Plaintiff' is singular, 'their' implies plural.
Yep, the ruling was really clearly written. In addition to demolishing the lower court's argument, it even added a few bitch-slaps -- 3 "[sic]"s on a single page. I love it when judges spice their legal correction with grammatical correction.
Haskell & Monads
Chapter 1 - Sometimes you need to do real stuff.
Consider IO, e.g. write a, then b, then c.
In our super-duper functional language, we can't change anything, so we pass an "IO State" block around:
io1 = write a io0
io2 = write b io1
io3 = write c io2
Wow, these io things look kinda stupid and error prone, so let's make them implicit with higher order functions and call the resultant construct a "monad."
Chapter 2 - What if users copied and reused our io things?
That would really suck. Let's make that impossible.
Chapter 3 - Our language is now perfect.
Homework: have your grad students write a million line program using monads.
Interesting. I think Linux's documentation is actually better than Microsoft's. If an app is giving me a problem, I can usually just cut and paste the text/log message into Google and either get a solution or find out what I'm missing. I know that's a loose definition of documentation, but it's documentation none the less. When XP's wizards fail to troubleshoot a problem I'm having (which is 95% of the time,) I'm SOL with no idea what to do next. The only success I've had using Google to debug a Microsoft product was when Mech Commander 3 wouldn't start due to a bad copy protection scheme - someone in Europe had been kind enough to post a fix for that.
damnit, six wives - I double-counted an Anne.
So, um, people didn't get married before Christianity existed?
Thank God the founder of Protestantism (Henry VIII) was such a role model: of the seven people he married, all were women.
They mostly aren't looking for compensation. It's a prize, not an R&D funding exercise.
Looking at the teams:
Rutan - wants to build cool flying vehicles (e.g. round the world on one tank of gas.) Ignoring his photoshopped SpaceShipOne images, actually has a chance at the X-Prize within two years.
Carmack - wants to make cool rocket toys. Working on hovering, not space shots. 5% chance of X-Prize within 5 years.
Steve Bennett - publicity seeking loon. 0% chance of any rocketry of interest, ever.
All the rest - 20% chance of success with 5 years. Seriously, if you aren't test firing a R motor (think model rocketry A, B, C, etc) every week at this point, you don't have a hope of meeting the X-Prize goals in the next couple of years.
What legitimate need does a single person have when downloading 40 gigs of data over a short period of time?
Well, I have a perl script that polls certain newsgroups and downloads posts that may be of interest to me. It consumes about 40G/month of bandwidth (mostly while I sleep.)
At least someone noticed that. Pretty funny naming an operation for a paranoid Commie movie fantasy from the 1980s.
The V1s were hardly planes - they were a 25 foot long, 2300lb bomb with wings and rear control surfaces, catapult launched and powered by a 10 foot or so pulsed jet engine.
The first one I checked (Common Lisp,) was just wrong:
(defun dohanoi(n to from u)
(if (> n 0)
(eval
(dohanoi (- n 1) u from to)
(format t "move ~D --> ~D~&" from to)
(dohanoi (- n 1) to u from)
)
)
)
(defun hanoi(n)
(eval
(dohanoi n 3 1 2)
)
)
eval is not what we want here (it evaluates a single form in the current dynamic environment.) Also, we can use 1- and indent trailing parens correctly. For extra credit, we could make dohanoi local to hanoi.
(defun dohanoi(n to from u)
(when (> n 0)
(dohanoi (1- n) u from to)
(format t "move ~D --> ~D~&" from to)
(dohanoi (1- n) to u from)))
Wall Street rewards non-diversifiable risk taking, and one of those risks is that trades will be disputed. Your average investor has many ways to mitigate that risk (dollar cost averaging, investing in mutual funds, using a broker.) Don't cry for them that took some damage in this case: it's a risk they knew (or should have known) they were running. You don't see them volunteering to return previous profits on arbitrage trades that went off well, do you?
Exchange/clearing interventions of various types have occured many times in the past (for example, the redefinition of futures contracts during the Hunt brother's Silver corner, the post-WWI coffee futures reset, the post-9/11 T+5 swap settlement change.)
NASDAQ was the party making the exceptional change, not Archipelago.
Nice try, but -pus is genitive, so the correct plural is octoPODES, rather than octopia.
I might be the saleswoman you are referring to. Sure, 2" of penis doesn't sound like much, but reply to 5 of those e-mails and you have a pretty good date for the evening.
We may hear of an SCO offer to settle in the very near future.
If they do, it will show the same lack of understanding the German high command exhibited at the end of WWII:
With the Russians surrounding Hitler's bunker, the Germans actually sent an officer out to negotiate peace terms. After five minutes, the Russian general basically said "we have troops and you don't. No settlement other than unconditional surrender is possible."
SCO has spent six months pissing on IBM. Short of "Darl consents to be publically sodomized by the IBM executive of your choice," SCO may not have any negotiating points left.
Going after the analysts is a great idea. If they are forced to respond to the subpoenas, they can say:
a) I just used public information and personal judgement to predict the stock will double in price. This would imply extreme naivety on the part of the analyst, and, given the current lawsuits against analysts pumping stocks, probably gets a Spitzer-style lawsuit against him and his firm.
b) SCO told me X, Y, and Z, and that is the basis for my estimate. If public info, see above. Else: Woohoo, material information given to analysts yet not publically disclosed.
c) SCO hinted privately at Microsoft (or other firms) involvement. Great evidence of dirty hands in the case, and maybe a bit of case b).
In short, I'd hate to be an analyst forced to defend my "strong buy" rating on a stock while also claiming to be an expert in its market sector.
Note also that the Forbes' article also used the phrase "pump and dump." It's never a good sign when the major media starts propagating such theories!
The Scientology cases *should* have settled many of the IP issues years ago: you get to pick *one* of copyright, trade secret, or trademark.
If you pick copyright, you file the work and then people get to quote it in fair use situations (e.g. say it sucks and explain why.)
If you pick trade secret, you lose your rights once everybody knows about it (because several of your victims got pissed and released the information.)
If you pick trademark, people can talk about your stuff as long as they make it clear they are not you.
None of Scientology's stuff is really compelling public interest: they're a wacko space alien cult and many people know it. Yes, they abuse the legal system, drown the odd judge's dog, infiltrate the IRS, steal federal documents, blackmail/frame their opponents, perjure themselves, etc, but most people who deal with them choose to enter into that relationship.
Diebold proposes to arbitrate the voting process with zero oversight - this seems a bit more compelling public interst-wise.
Highly doubtful. Have you seen pictures of damaged WW2 bombers that returned from missions? Many had car-sized holes in them and still flew.
Fire a gun in a plane = decompression = oxygen masks drop, pilot descends to a lower altitude, terrorists look pretty silly trying to do crowd control with little yellow masks over their faces while passengers are trying to put a cap in them.
One would hope so - that's what makes it a good scam. Note there are only two kinds of scam:
1) I'm smart. You're smart, the rest of the world is dumb. Let's take their money.
2) I'm dumb. You're smart. Take my money.
Case 2 is a much easier sell, especially if I provide objective proof like bad spelling and poor command of the English language.
Once I convince the mark I am stupid, I change his calculus from "I risk $100K to get $4M. I might lose $100K." to "this sap will deposit $20M in my bank account. I can probably sucker him out of it. Worst case is I only gain my 20%, which is $4m.?"
I just downloaded MIT's Scheme and I must say it takes a little getting used to (like starting vi for the first time I guess, it really needs a better editor, for newbies anyway).
Excellent choice. You might want to read SICP, it really shows what you can do with Scheme.
An editor that supports parenthesis balancing and automatic indentation of Scheme is almost a requirement. As proficiency increases, you'll immediately see from the indentation that something is wrong.
Hell yeah, I just finished a recursive multiply function (I know it's simple, but this editor really sucks).
Have you tried emacs? It supports Scheme well, and is basically the ultimate programmer's editor.
How much do you know about interpreter design and such? I have this project I've been working on and it's coming along, but I know jack about interpreter design, and everything that's there is what came out of my head, no real research into what has already been done, etc. I'll tell you more if you want to know. Any how thanks for the mini-lesson. Time to play with scheme.
Humbly, quite a bit (though I'm currently mostly working on a compiler.) Yeah, I'd like to know more: my email is mmn@bellatlantic.net.
Shamelessly taken from Paul Graham's On Lisp again, here's what it looks like under the covers:
,@(mapcar #'(lambda (c) ,c) *paths*)) ,(car choices))
(defmacro choose (&rest choices)
(if choices
`(progn
`(push #'(lambda ()
(reverse (cdr choices)))
'(fail)))
This says:
choose is a macro (so all this code is nicely optimized at compile time) that takes an arbitrary number (&rest) of bits of code (choices.)
If no choices, just fail, otherwise:
Convert all (mapcar) but the first (cdr choices) choice into a function of 0 args (lambda (), c) and put them on a stack named *paths*.
Finally, call the first choice.
The creation of the 0-argument functions is our version of the setjmp().
(defun fail ()
(if *paths*
(funcall (pop *paths*))
failsym))
fail just tries the next path, if one exists, or returns a special value (failsym) if no paths are left. Note that the call (funcall) to the next path is tail-recursive (i.e. a jump,) so this is effectively the longjmp().
This is still somewhat of a toy example, but it demonstrates the meat of the idea: we are essentially creating our own stack frames (the closures we push onto *paths*,) and jump between them using our tail-recursive funcalls. The GC handles the freeing of unreachable stack frames (unlike C where the longjmp() does the callstack 'freeing.')
I must say, for being so fluent with Procedural and OO design I'm having some trouble grasping the whole continuation design. I'm probably going to download a Lisp compiler and screw around with it for a while to make sure I'm understanding all this. C's setjmp() and longjmp() make perfect sense to me, but that's like putting a freshwater fish in a saltwater tank, I can't get the full understanding until I write native code for it.
Good idea. Now you just need to choose between Scheme and Common Lisp. joto has an excellent summary of the two languages. My personal preference is CL, mainly because my code is practical rather than experimental/theoretical.
Be warned, it takes 3 years or more to become an adept CLer. The language is big, the compilers' error messages tend to be cryptic at first, the macro system and CLOS are both so powerful it's hard to use them well initially. On the good side, it's a lot easier to post a 5 line program to comp.lang.lisp and ask why it throws you into the debugger than to post the equivalent 3 page program in C++ and ask why it segfaults.
So then I guess that continuations cannot really be an after thought to a language design, but rather require some sort of language cooperation.
;; true - we solved it ;; turn 90 degrees. ;; i.e. fail - no choice will succeed. ;; walk 1 in direction currently facing.
Correct. Either 1) the language was designed to support them (Scheme,) or 2) the language is introspective enough to allow a user to implement them (CL, many modern scripting languages,) or 3) some clever person kludges up a machine specific implementation in a C-like language (e.g using setjmp/longjmp and various stack-saving tricks.)
I assume that the compiler handles all the stack unwinding and memory deallocation should you choose to jump out of a deeply nested block.
Yep. Most languages that support continuations also provide a garbage collector. If you think as continuations as "stack frames as first class objects," you can't go far wrong. In that case, the program stack just becomes a linked list or whatever, and the GC can handle freeing of dead stack frames.
And I am also assuming that Fail is your call/cc function correct?
I hope so. fail() is equivalent to Choose() [with no args], I.e. there is no possible value/path that can return success in this trial computation.
One more assumption: the function choose(), am I going too far by assuming that it is more than just a representation for a for loop?
Well, at some level it, is just a for loop. It does, however, let us abstract away a lot of backtracking and bookkeeping. E.g. I could write a maze solver as follows:
(=defun solve (maze my-state)
(if (at-exit maze my-state)
(return t)
(choose ((rotate-left my-state)
(rotate-right my-state)
(if (is-wall-ahead maze my-state)
(choose ())
(walk-1-step my-state)))
(solve maze my-state)))