He never really explains why this is a bad idea, other than to fall back on dogma. Well, and yelling. He simply dismisses the banking example out of hand....
jason marshall
jdmarshall@...
Apr 2, 2008 3:29 pm
904
... Said another way: FP is "good for you" but that doesn't mean it's going anywhere. Unless... Whenever life is tough in the real world, functional...
I don't think that applied STM is going to look like normal code with some 'atomic' blocks sprinkled in as this rant suggests. It won't work that way, just...
jason marshall
jdmarshall@...
Apr 3, 2008 4:32 am
907
The WingDings Study Group (http://tech.groups.yahoo.com/group/wingding) continues our exploration of "Beautiful Code" by Andy Oram, Greg Wilson. The next...
... At first glance, I think a solution in jCSP would look similar to the Haskell and Erlang solutions. There's a full discussion of a "correct" Ada solution...
After a tad more thought, I think you can code this problem in Java fairly straightforwardly using a few cyclic barriers and a priority queue: A cyclic barrier...
And here's the code in Java, for comparison. /* * SantaClausProblem.java */ import java.util.Random; import java.util.concurrent.BlockingQueue; import...
I'm wondering how much simplification can be made of this. I'll try to give it a whirl before the meeting. But if this really is the canonical example, then...
jason marshall
jdmarshall@...
Apr 8, 2008 4:28 pm
913
I think the Java version is pretty simple and straightforward. It's also complete -- starting and stopping the threads, handling exceptions, exiting normally,...
I'm going to have to disagree. The code has no obvious defects, but it is not obvious that the code has no defects. I think the general problem in Java...
jason marshall
jdmarshall@...
Apr 8, 2008 9:56 pm
916
FWIW I simplified the code quite a bit. There are now only three classes: 1. Santa 2. GroupActivity (for "delivering toys" and "meeting with elves") 3. Worker...
Joe, just a couple of points I noted in your code, neither of which may affect its correctness as a solution to the problem: Santa's run method may never end: ...
... Hey Stuart, Santa and Worker (Elves & Reindeer), which are the objects that implement Runnable, run in their own thread and they are programmed to quit...
Stuart, Your question caused me to take a second look at the interrupt & exception handling and I realized that it was overly verbose. Instead of catching and...
Joe, I would like to see the "even more beautiful code". Bob ... __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail...
I meant to say I can't recall, sorry. Piotr ... From: Piotr Wyrwinski <apwyrwa@...> To: wingding@yahoogroups.com Sent: Friday, April 11, 2008 5:23:04 PM ...
Next up is Chapter 26: Labor-Saving Architecture: An Object-Oriented Framework for Networked Software. William Otte and Douglas C. Schmidt apply a range of ...
That's my plan. Linus Robert Kuhar wrote: Next up is Chapter 26: Labor-Saving Architecture: An Object-Oriented Framework for Networked Software. William Otte...
The WingDings Study Group (http://tech.groups.yahoo.com/group/wingding) continues our exploration of "Beautiful Code" by Andy Oram, Greg Wilson. The next...
The WingDings Study Group (http://tech.groups.yahoo.com/group/wingding) continues our exploration of "Beautiful Code" by Andy Oram, Greg Wilson. The next...
Sorry for the late notice. But something came up that is taking me out of town next week. I won't be able to make the meeting. Stan also, who was going to...
The WingDings Study Group (http://tech.groups.yahoo.com/group/wingding) wraps up our exploration of "Beautiful Code" by Andy Oram, Greg Wilson. The next...
... This reminds me that I wanted to plug the new edition of Effective Java: http://java.sun.com/docs/books/effective/ I think it would be a good choice for...
+1 for Effective Java. I haven't attended since early in the Concurrency book (career craziness, but things have settled down now), but I'd certainly come back...