Hi
Actually I just thought I'd send random noise, because I think it's a funny story. (I was the guy that came in after the mess to clean it up by writing a system that worked! So no I don't think it's a good idea.) There was no intended comment on the conversation one way or another. Sorry if you read it that way. Please excuse the interruption. :) Ron > From: Igor Stasenko > > So, you proposing surrender to Paul's ways and for the rest of your > life keep making things which is then turn into a pile of paper, and > didn't thrown away, just because it costs too much money to produce? > :) > > On 07/02/2008, Ron Teitelbaum <[hidden email]> wrote: > > Hi all, > > > > I can't resist a story. The company I worked for a long time ago, > before > > they hired me, hired a consulting company and spent over 1/4 million on > a > > system design. When I started working I asked what that big ball of > paper > > was on the shelf. They said it was a $250,000 basket ball. (It was > just > > about the size of a basket ball). It turned out that after months of > work > > the company delivered a huge stack of completely useless paper that very > > clearly showed they hadn't understood the requirements. I said so why > did > > you mash it up into a ball and put it on the shelf. They said well at > least > > that was fun, and it cost so much it was a shame to throw it away! > > > > Ron Teitelbaum > > > > > From: David T. Lewis > > > > > > On Thu, Feb 07, 2008 at 02:32:56AM +0200, Igor Stasenko wrote: > > > > It's okay , for me, for being paid $1000 for an application which > > > > putting 'Hello word' on screen, after half-year of study of new > > > > platform. But i don't think that there is many people in the world > who > > > > will pay me such sum for that :) > > > > > > Ha! Large companies routinely spend thousands of times that amount on > > > projects that never get as far as putting 'Hello word' on the screen. > > > I think that you would be offering them a great bargain ;) > > > > > > Dave > > > > > > > > > > > > > > -- > Best regards, > Igor Stasenko AKA sig. |
In reply to this post by timrowledge
tim Rowledge wrote:
>> So, it's not enough for you to succeed. Everyone else must fail? > Well of course! I was always taught that if you can't be the best by > being very good, be the best by being the only survivor. This isn't meant personally, but I can wonder if this study applies to the Squeak community as a whole: :-) "How Not to Talk to Your Kids" http://nymag.com/news/features/27840/ [multiple pages] "Dweck had suspected that praise could backfire, but even she was surprised by the magnitude of the effect. “Emphasizing effort gives a child a variable that they can control,” she explains. “They come to see themselves as in control of their success. Emphasizing natural intelligence takes it out of the child’s control, and it provides no good recipe for responding to a failure.” In follow-up interviews, Dweck discovered that those who think that innate intelligence is the key to success begin to discount the importance of effort. I am smart, the kids’ reasoning goes; I don’t need to put out effort. Expending effort becomes stigmatized -- it’s public proof that you can’t cut it on your natural gifts. Repeating her experiments, Dweck found this effect of praise on performance held true for students of every socioeconomic class. It hit both boys and girls -- the very brightest girls especially (they collapsed the most following failure). Even preschoolers weren’t immune to the inverse power of praise. ... Dweck’s research on overpraised kids strongly suggests that *image maintenance* becomes their primary concern — they are more competitive and more interested in tearing others down. ... Life Sciences is a health-science magnet school with high aspirations but 700 students whose main attributes are being predominantly minority and low achieving. Blackwell split her kids into two groups for an eight-session workshop. The control group was taught study skills, and the others got study skills and a special module on how intelligence is not innate. These students took turns reading aloud an essay on how the brain grows new neurons when challenged. They saw slides of the brain and acted out skits. “Even as I was teaching these ideas,” Blackwell noted, “I would hear the students joking, calling one another ‘dummy’ or ‘stupid.’ ” After the module was concluded, Blackwell tracked her students’ grades to see if it had any effect. It didn’t take long. The teachers—who hadn’t known which students had been assigned to which workshop—could pick out the students who had been taught that intelligence can be developed. They improved their study habits and grades. In a single semester, Blackwell reversed the students’ longtime trend of decreasing math grades. The only difference between the control group and the test group were two lessons, a total of 50 minutes spent teaching not math but a single idea: that the brain is a muscle. Giving it a harder workout makes you smarter. That alone improved their math scores." [my emphasis] If people talked about Squeak as "getting better all the time" and requiring continual investments of hard work to continue to improve then it might be easier to learn from what makes Java or Python as successful as they are (rather than just dismiss them), even if those languages do miss out on many of Smalltalk great-for-the-time ideas. But instead we have: http://www.squeak.org/ "Squeak is ... modern, open source full-featured .. easy ..." when underscore is used archaically, the license still isn't approved by OSI, and it is missing an easy to use GUI for beginners. I'm not saying this statement on the web site is a total lie, but it is a matter of *degree*. This is maybe fine to tell other people as hype, but when you start believing it yourself as an absolute, as the study above shows, it can lead to "image maintenance becomes their primary concern" [double entendre intended.] :-) Anyway, it's been an interesting bunch of replies from everyone, thanks, and helped me understated some of the Squeak community's current feelings about several things a bit better. --Paul Fernhout |
In reply to this post by Igor Stasenko
Igor-
Your sweeping generalization about my character and quarter-century of software development experience aside, (*) :-) where does that leave us? One the one hand, we have an example of a $250K spent on a paper design study where the consultants "hadn't understood the requirements". On the other hand, when I suggest there are *bugs* in *some* of the Squeak values and implicit requirements (personal emphasis vs. group emphasis, reaching out to the rest of the world like with a conventional ASCII assign statement), the Squeak community process (licensing, loss of good code, retention of problem code), and implementation (GUI, modularity) I get no less that three people making variations of ad-hominem and straw-man attacks (some nicer than others). http://www.nizkor.org/features/fallacies/ I'm being critical here of Squeak, so I can accept some criticism back (the point of bringing these issues up in the general list). And people are going to take some of this personally, so, OK, I can let the personal comments about me mostly slide as part of the cost of trying to bring up difficult issues in response to Stef saying stuff like : "frankly I do not have the energy anymore .. . I'm not part of this community for this kind of attitude." :-) But, again, what is the alternative? Just ignore IMHO crucial bugs in Squeak (the artifact, the community, and the underlying values)? And I do mean "bugs", as in, 90% to 99% of all that is Squeak works amazingly well, but somewhere between 1% and 10% of Squeak has somehow gone off the "rails". (Pun intended :-) "JRuby on Rails: The power of Java, the simplicity of Ruby on Rails" http://www.javaworld.com/javaworld/jw-02-2007/jw-02-jruby.html "Sun Acquires JRuby Project" http://www.javalobby.org/java/forums/t78292.html What Ron's example ("they hadn't understood the requirements") says to me is that people who go off on their own for a few months (or years) and then drop the result on the community's doorstep are much less likely to have success than people who bring up issues into the community and get some feedback during an ongoing process. Is seems to me what you are implicitly advocating, probably unintentionally, is, "go away and don't come back until you make your suggestion of Squeak on the JVM work". For me, that implies a lack of design. A lack of discussion. A lack of learning (on my part, from the community). And without design and discussion and learning, even just within one person, I don't think an implementation of anything is likely to be of any value. Now, I don't expect you really believe all those negatives; that's just how your words come across to me. If you follow the thread, I've pointed to person months of implementation. I included a Java code snippet at the start of a working proof-of-concept program (which was not trivial to design, even if it was short). I also pointed to other relevant resources I made (including a Smalltalk-ish parser that runs on the JVM). I'd suggest a better adage is "moderation in all things, including moderation". Some designing, some discussing, and some implementing -- all co-evolving. I've discussed some. I've designed some. I've implemented some. I've even critiqued some -- and I can be a lot more self-critical about my own work than about others' work: :-) http://patapata.sourceforge.net/critique.html I brought this issue up (improving on Squeak, like being on the JVM) to make a suggestions and to learn from feedback. If you don't want to read what I write or take part in the discussion (for whatever reasons, including lack of brevity, sorry) that is your choice, and my loss, :-( as I feel you have many good ideas, like your outline of a system which would support simultaneously loading incompatible versions of modules. So, what are the requirements theses days for a successor to Squeak? I've outlined some here and there in my replies and links to previous comments. Essentially, a focus on being part of a free software ecosystem where "the network is the computer" and "the programmer is the community", as well as a focus on taming internal complexity of the core and pushing contentious (but perhaps awesome) issues like "traits" to optional edges, and all ideally without losing the interactivity and introspectiveness and malleability and cross-platform support which Squeak provides so well already. Squeak can improve, especially as the software world changes around it or in reaction to it. Or as the world adopts Smalltalk ideals bit by bit, like Java's improvement over C++ by adopting Smalltalk ideas like adopting garbage collection, exposing objects instead of memory pointers, maintaining a cross-platform vm, supporting reflection, and using hotspot compiling. I'm quite willing to say Squeak is amazing, and Squeak gets a lot of things right which other languages don't even conceive of as possible (like coding in the debugger). But that does not means Squeak is perfect, either the code, the community process, or the values. What seems important to me is to figure out what, say, 1% or even 10% of those aspects is proving most problematical and improving on them, while preserving the rest. For just one example, the licensing of the Squeak core is problematical still (and probably always will be IMHO if Disney does not sign off on it). So if I replaced it with the core from GNU/Smalltalk, and ported the rest, and used the JVM for much of the VM and related services (so that VM code could be tossed too, at first), maybe that would make one legal "bug" go away, or at least, be pushed to the edges of the community instead of the core (e.g. having a browser module or a morphic module)? In this overall thread I've learned (or validated) several useful things: * There is some small interest in a Smalltalk on the JVM, including a couple projects still active, or about to be released. * The software world has changed so much since the 1960s for where innovative software only got written at big companies (Xerox) paying people directly to do it. Now, the creativity and actual code seems mostly to come from people writing it as a byproduct of other work or for its own sake. And even when creative code rarely does get written as part of a job description (still by some of the same people as in the 1960s! :-) now that creativity often can't get out the corporate door for silly (but still important) reasons (like naming) -- even ignoring the idea of "alienation" of the creator from the created when the creator is paid to do create, which you are correct to imply in your comments: "Creativity and intrinsic interest diminish if task is done for gain" http://www.gnu.org/philosophy/motivation.html "Five Reasons to Stop Saying "Good Job!"" http://www.alfiekohn.org/parenting/gj.htm * Aspects of the very discussion just shows that Squeak (as an entirety) still has some of the same vision and process "bugs" as it had many years ago (maybe even more as the world has continued to change faster than Squeak has, like with the maturing of the Java/JVM ecosystem). * Some other useful technical suggestions and links some people have made both on-list and off-list. So overall, for me, it's been a very educational discussion. Here is an essay related to the Chandler project's failings which I find instructive for all sorts of reasons, including thinking of how it applies to Squeak and "Design" (both good and bad, both supporting and undermining your suggestions): "Software Is Hard" http://gamearchitect.net/Articles/SoftwareIsHard.html """ Software is hard," reads the quote from Donald Knuth that opens Scott Rosenberg's Dreaming in Code. The 400 pages that follow examine why: Why is software in a never-ending state of crisis? Why do most projects end up horribly over-budget or cancelled or both? Why can't we ship code without bugs? Why, everyone asks, can't we build software the same way we build bridges? ... Scott Rosenberg coins this as Rosenberg's Law: Software is easy to make, except when you want it to do something new. The corollary is, The only software that's worth making is software that does something new. ... Or, as Fred Brooks writes in "No Silver Bullet": "The hardest single part of building a software system is deciding precisely what to build." ... Part of the problem, clearly, is that every time we build software we're creating something fundamentally new. There are, Wikipedia tells me, six main types of bridges. Once you know how to build a bridge of a particular type, you're just iterating on a theme. The principles behind a suspension bridge, for example, are well understood--if not by me, then at least by the people who build them! But like Rosenberg's Law says, once Epic's written Unreal, they never have to create a first-person shooter engine again. Instead, they just need to keep adding new features. Day 1 may need to write a first-person shooter engine, but only because we've never done that before. This is why programmers always want to rewrite everything. Most shipping software is the equivalent of a novelist's first draft. ... It's true, too, that construction is less predictable than many would like to believe. I've been a homeowner suffering from "buggy" construction (faulty window frame installation, rotten walls). I've watched the resolution of the bug stretch to twice the contractor's original estimate. Rosenberg cites the San Francisco/Oakland Bay Bridge as another construction project that's running well over scheduled time and budget. ... The difference is that the overruns on a physical construction project are bounded. You never get to the point where you have to hammer in a nail and discover that the nail will take an estimated six months of research and development, with a high level of uncertainty. But software is fractal in complexity. If you're doing top-down design, you produce a specification that stops at some level of granularity. And you always risk discovering, come implementation time, that the module or class that was the lowest level of your specification hides untold worlds of complexity that will take as much development effort as you'd budgeted for the rest of the project combined. The only way to avoid that is to have your design go all the way down to specifying individual lines of code, in which case you aren't designing at all, you're just programming. ... Fred Brooks said it twenty years ago in "No Silver Bullet" better than I can today: "The complexity of software is an essential property, not an accidental one. Hence, descriptions of a software entity that abstract away its complexity often abstract away its essence." """ Which is all another reason why that $25OK paper study of a software application Ron mentions got turned in a paper ball on the shelf. Of course, as this is the Squeak-dev list, I'll say (though only half-seriously) that we all know the biggest problem with Chandler is is they had just built a great cross-platform Personal Information Manager on Squeak with a few experienced Smalltalkers in a few person-years, then they all could have declared success and gone on to even more interesting things. :-) Python is a great languages, but it has trouble scaling for projects involving dozens of developers and changing requirements, in part because for a dynamic language it does not have the tools any decent Smalltalk like VisualWorks has (coding in the debugger, live inspectors, cross-platform widgets, extensive testing, etc., even if it has these in incomplete bits and pieces). So really big projects tend to be harder in Python than Smalltalk, especially a Smalltalk like, say, VisualWorks+ENVY (sigh). But I would still suggest that much of those person-years spent with Squeak would actually have gone into "image maintenance" of the kind which left Stef unhappy and which VisualWorks doesn't need (or at least, makes somebody else's problem). :-( So how can we get Squeak (or something like it) to the point where the *next* Chandler-like project picks it and is a *success* in part because of that good choice? And not by making it a free slow VisualWorks, but my making it something awesomely better than VW (Like by leveraging on the Java ecosystem)? I once thought I could build such a system on Python, http://www.mail-archive.com/edu-sig@.../msg02025.html but I now see that Python is the wrong level of abstraction, compared to a statically typed language like C/C++ or Java or Scala/JVM. Also, Java and the JVM was not "free" as in freedom when I started, but that has now changed (the OLPC project faces the same issue, and I predict it too might turn to Java at some point). So a Squeak that *relies* on the JVM is still "free" in a way it could not have been a couple years ago, which is important to me personally, see: "Free But Shackled - The Java Trap" -- a now outdated essay http://www.gnu.org/philosophy/java-trap.html Anyway, thanks for the feedback. from you and others. One other design adage I've picked up over the years is: "Listen to your users, but ignore what they say". This can be interpreted as, whatever issues people bring up are real issues to them, but their proposed solutions may be off-base. You (and others like Keith or Göran) have a valid point (the risk of all talk but no action), but managing that risk in a living breathing design process spanning years (and reflected in ongoing coding) is another issue. --Paul Fernhout (*) Personally, I prefer these comments on my (collaborative) work: :-) http://www.kurtz-fernhout.com/PlantStudio/userssay.htm especially this one: "The interface is good, you've obviously put a lot of time and thought into it (even the pop-up help screens are good), the program does what it claims very well, and the bottom line for me is that it's immediately fun to play in and gives me all kinds of new ideas and possibilities (it's that "oh, wow, this is neat-- hey, I could try this-- I wonder what happens when I do this-- you could do a bunch of these and combine them and then...." factor, and two hours later you're still messing around and getting ideas -- instead of "now what, so what, this is really awkward, this doesn't go anywhere"."" Compare that feedback with what many newbies say about Squeak :-( (even friendly ones who stick around because they see the potential, like Sean): "In fact, I've only started Squeak a few times, poked around, and closed it in disgust and/or utter-confusion after a time due to the overwhelming complexity (and, IMO, ugliness) of the UI that hits like a brick to the face when first starting an image. " I might point out that hundreds of person-hours of dicsussions, perhaps thousands if I include the predecessor to that projects, were involved for that project I was on, including sometimes putting ideas on paper first, beyond actual coding. And if you look back at the original creation and evolution of Smalltalk at Xerox PARC, I would expect that too involved thousands of person-hours of discussion, even if the original first mathematical description of Smalltalk (then implemented in BASIC) as a first cut fit on a sheet of paper. http://gagne.homedns.org/~tgagne/contrib/EarlyHistoryST.html I'll concede that email isn't the ideal way to have long design discussions, and what we really need is an easy-to-use collaborative Squeak-powered design tool (Perhaps something that builds on and expands on "OpenAugment": ?) http://www.openaugment.org/ which includes a way to have such discussions tightly linked to code examples and other documents (and is more compelling than email, which is hard because email is so important and ubiquitous and multi-platform and easy to use, so it's hard to get better than it). Of course, that perhaps brings us back to the first problem of a better Squeak beyond something which "hits like a brick to the face". :-) Igor Stasenko wrote: > So, you proposing surrender to Paul's ways and for the rest of your > life keep making things which is then turn into a pile of paper, and > didn't thrown away, just because it costs too much money to produce? > :) > > On 07/02/2008, Ron Teitelbaum <[hidden email]> wrote: >> I can't resist a story. The company I worked for a long time ago, before >> they hired me, hired a consulting company and spent over 1/4 million on a >> system design. When I started working I asked what that big ball of paper >> was on the shelf. They said it was a $250,000 basket ball. (It was just >> about the size of a basket ball). It turned out that after months of work >> the company delivered a huge stack of completely useless paper that very >> clearly showed they hadn't understood the requirements. I said so why did >> you mash it up into a ball and put it on the shelf. They said well at least >> that was fun, and it cost so much it was a shame to throw it away! |
Did you take a look at http://pypysqueak.blogspot.com/?
On Feb 8, 2008 12:37 PM, Paul D. Fernhout <[hidden email]> wrote: Igor- |
In reply to this post by Bergel, Alexandre
>>If Athena and Spoon and Dan's project and a few other projects and people
>>could get together somehow, then we might have something even greater, and >>not several people working mostly on their own. But coming up with a shared >>vision might be hard? > >In my opinion, the key of success for JRuby, Rhino, JScheme, Jython is to enable interaction with Java. When Dan will release its source, I might port Athena on his VM. But again, interaction with Java is crucial. FWIW, since Potato is in the release process here, I'd be happy to send a private copy to anyone until it's official. It should be easy to evaluate the convenience of inter-operating with Java (I think pretty simple). Just send me a message. - Dan |
In reply to this post by Ignacio Vivona-2
Ignacio Vivona wrote:
> Did you take a look at http://pypysqueak.blogspot.com/? I don't know if this prompted your reply, but I just noticed the "my" in "my making it something awesomely better" was a typo in the previous post; it was intended to be a more inclusive "by" as in "And not by making it a free slow VisualWorks, but *by* making it something awesomely better than VW (like by leveraging on the Java ecosystem)?" Freudian slip, perhaps? :-) I came across PyPySqueak while composing these replies, but I have trouble even figuring out what it is supposed to be. :-) My guess is it somehow compiles Smalltalk code to run on CPython's VM? While I think a Python-compiler-in-Python-sort-of-with-types is a great idea (to allow Jython and CPython to share the same codebase), I guess I'm not seeing the value of PyPy in that particular application for dealing with Smalltalk code over, say, ANTLR. http://www.antlr.org/ or Bistro (which uses ANTLR to pares a Smalltalk syntax (enriched or polluted with types, depending on your perspective :-) to interoperate with Java): http://www.educery.com/papers/bistro/intro/ or even my previously mentioned homebrew code in Jython, given Smalltalk is so easy to parse (one of the nice things about it). But maybe I am missing something? It sure looks like it has attracted significant interest and effort, judging from the blog pictures. Ah, here is something more (still a bit confusing to me): "First day, Discussions" http://pypysqueak.blogspot.com/2007/10/first-day-discussions.html "We identified the following options as possible main goals for this week's sprint * to implement a Squeak-bytecode interpreter in RPython * to define and implement an RSqueak as PyPy frontend * to write a Squeak backend for PyPy" I'll admit I still don't get everything they intended, other than as fun exercise for getting the PyPy and RSqueak people to share knowledge? No offense intended to either the PyPy people or the RSqueak people, but I still question the whole "language implemented in itself" ideal for the Squeak going onto the JVM, see: "Design Principles Behind Smalltalk, Revisited" http://lists.squeakfoundation.org/pipermail/squeak-dev/2006-December/112306.html Excerpt: "And, if it is so often the conceptual barrier that is the ultimate hurdle, then are technical barriers of different syntax and different tools really so big? Many humans become fluent in multiple human languages and their accompanying cultures, which is typically a harder thing than learning new computer languages. If one needs to switch mental gears conceptually to work on the VM, [given the need to think about native types with Smalltalk] then is it *really* so bad if the VM is written directly in C like GNU Smalltalk does? Now, I know a lot of positive arguments can be made for the utility and convenience of the Squeak VM written in Smalltalk (especially given C's quirks as a not-quite-cross-platform language), but in the end, my point is, keeping everything in one syntax may not really save that much time for the community, all things considered. Even when the syntax is the same, the underlying domain semantics may be very different, and those semantics, or meaning of all the objects, are what take the time to learn. To build a new VM, one still needs to spend a long time understanding what a VM is and how it could work, and no choice of familiar tools or use of one single syntax will make that extremely easier (a little easier, yes). A better choice of abstraction perhaps might make maintain a VM easier for those who get the abstraction, but not a choice of language by itself all other things being equal. Were the Squeak VM coded in some other portable language (like Java or Free Pascal or OCaml) then it might not take very much more trouble to maintain -- and such a VM might even be easier to develop, as one could use the complete tool set of that other system to debug the VM in the language it was maintained in, rather than facing a technical barrier :-) of seeing C code for the VM in the debugger instead of the original Smalltalk source which was translated from. Granted, if the Squeak VM was coded in, say, OCaml, one would have a barrier to an VM maintainer of learning that language and its paradigms, but I would argue that the barrier would remain more conceptual than technical, and the syntax problem would be the lesser issue." I think the advantage of the Squeak VM being in Smalltalk is also related to the disadvantage of trying to debug pointer-using C code for any purpose (having spent too many years of my youth doing that), especially given C compilers varying in the size of basic types across architectures. :-) If the Squeak VM was in, say, Java, I think it is going to be fairly straightforward to debug the Squeak VM natively, since Java code using JVM-ish tools is just easier to debug than C code using C-ish tools. Still, there is nothing that prevents one from writing and debugging any sort of VM in Smalltalk and translating it later to Java or whatever in the future, even if the first VM is handwritten Java. And it sounds like Dan and some others already have variations on that anyway. So it looks like several options could co-exist in the Squeak/JVM world. If I did a port of Smalltalk to the JVM just by myself, frankly, I would just write the VM directly in Java or possibly Scala (a typed JVM language which is functionally oriented). http://www.scala-lang.org/ "Scala is a general purpose programming language designed to express common programming patterns in a concise, elegant, and type-safe way. It smoothly integrates features of object-oriented and functional languages. It is also fully interoperable with Java." Or maybe even just put it on top of "Clojure/JVM" if I was really lazy. http://clojure.sourceforge.net/ "Clojure provides easy access to the Java frameworks, with optional type hints and type inference, to ensure that calls to Java can avoid reflection." Clojure already supports dynamic programming, so there might be a lot of leverage there (just put a Smalltalk->Lisp translator there, add some method dispatching and "doesNotUnderstand:" code for glue, and start worrying about semantic mismatches for objects or exceptions, or work around with Clojure bugs as it is a new system. :-) Or, if I felt industrious and hard-working, maybe I might even try it several ways (Java, Scala, Clojure, JVM bytecodes, maybe even others) and compare, since a VM is not really *that* hard to code. This seems especially likely if you build a Squeak VM on another VM like the JVM and take advantage of that VM's services and don't try to avoid peculiarities for cross-platform reasons (given the JVM is already cross-platform). For me, beyond learning Scala and Clojure, the biggest problem would be to modify the Smalltalk compiler to spit out either of Java, Scala, Clojure, or plain JVM bytecodes on demand (which might take some thinking about, for semantic mismatch issues). But Smalltalk is such an elegantly simple language that even that would likely not be too hard. It would be interesting to see the similarities and differences needed in compilers among Algol-inspired (Java), ML-inspired (Scala), Lisp-inspired (Clojure), and Assembler-inspired (JVM bytecode) targets for compiling Squeak code. Would one intermediate language be a lot more elegant? Would another be faster? Would one be more verbose? Another harder to debug? And so on? Might make a good PhD thesis for someone. If there isn't one like that already. :-) A Smalltalk/JVM using Java objects (and Java threading and other libraries,) would only really be managing the Smalltalk message dispatching event loop (perhaps via Scala Actors?). It would not even be a full VM, as it would just manage calling in and out of Smalltalk compiled to the intermediate language or JVM bytecodes. And, if using native JVM objects as Squeak objects, then just method dispatching support infrastructure code will be needed to be generated somehow and debugged (an expansion on the Java I first posted at the start of this thread), and I would think that could be done *much* easier to just write in first in plain old Java (or Scala or Clojure), given that we are not talking that much code. I'm guessing probably less than ten pages worth for the core dispatching algorithm (maybe even derived from Jython's Java implementation :-), but even if it was a lot more code I doubt it would be any easier to maintain in Smalltalk because it would be so specific to those language domains. So, I would expect that a native coding approach could both make the system easier to get running on the JVM. It would also get rid of even more original Squeak code which might remain under potentially problematical license constraints. Between a new (but small) native glue layer or Squeak VM, and using GNU Smalltalk code for core classes, then we are just left with licensing issues for Squeak tools and application, which would be around the edges of this system (so easier to replace or discard). And many of those applications, like Croquet already have straight forward licenses. And others, like the refactoring browser have other free versions from other Smalltalks. Back in 2000, when I was most interested in solving the Squeak license issue (as I saw it), the option of using a truly "Free as in freedom" JVM was not around (plus it was very buggy across platforms), and also there was not as much relicensing work done to give stuff at the edges of Squeak clearly OSI -approved "open source" licenses, and GNU Smalltalk was not as far along. So this approach to create a "Free and open source" Squeak-derivative on the JVM is really only feasible fairly recently (since 2007 at the earliest) compared to the state of everything back in 2000. I think a legitimate objection to what I have outlined is that I am just letting the supporting the JVM on various hardware be somebody else's problem (and I am also stuck with depending on these people). I think the JVM is also written in Java these days, as well, so it is a "language in a language" to a high degree now, and didn't I just say I didn't care about that? :-) Java is really more a systems programming language these days IMHO, so I'd argue it's verbose typed syntax maps onto low level VM coding better, and that's about the only thing Java is really good for as a language (not a VM) compared to alternatives (although Scala might be even better for making JVMs, maybe. :-) It is true, I'm relying on other people to support the JVM, but that's also part of the *benefit* of not trying to do everything else yourself. There are dozens of people (maybe hundreds) paid to worry about making the JVM work right, so I can worry instead about other things. Still, I would not advance that position if the JVM was not free, but since recently it *is* now free, there is nothing (in theory) to stop me from modifying the JVM however I wanted (even though in practice I would never do that :-). Sure the JVM is still a bit buggy. But likely so is the Squeak VM on some platforms and in some situations. Everything had bugs or limits relative to some purpose, if not technical limits, then conceptual limits. Nothing is a perfect choice (in part because we all have different priorities and so different definitions of perfection). It's more a question of "is it good enough and does it free me to focus on things I find more interesting or important?" Ironically, just as many people are jumping ship from Java and the JVM (to dotnet (or mono) languages or Ruby or Haskell or Python or the Common Lisp resurgence or whatever), I think the JVM is finally "good enough" (even if Java still isn't for most high-level purposes IMHO. :-) And, in practice, when using the Squeak VM, I'm just as dependent on Tim and other Squeak VM maintainers (past, present or future), and it's true they have done and still do a great job and are more responsive than Sun will likely be. I'm not saying there are not some bad aspects of such a switch over. But it is also not like the current Squeak VM in C will go away anytime soon or stop working if there is also a Squeak on the JVM. It would be true that you no longer could test and debug the Squeak VM development for the JVM in emulation under Squeak with such an approach (without slowly emulating the JVM in Smalltalk, which I think has already been done to some extent by Paolo Bonzini for GNU/Smalltalk, although maybe he just cross-compiles?). Still, I feel the tradeoff of having the new VM under analysis go 100X to 1000X faster (essentially, real time!) under the JVM might more than make up for having to use the JVM's debugging tools on the new Squeak VM (or perhaps it might also use a lightweight Spoon-inspired communications infrastructure above the JVM for most debugging and remote development). At some point, these JVM debugging tools presumably could be accessed or implemented through Squeak/JVM to make one's life even easier. And Spoon-like VM-to-VM communication facilities could ride above that, making for debugging at a higher level as long as they were operational. Another important issue here is there are tens of thousands of people who like free software and know Java debugging who might in theory be able to help with such a VM debugging process (including at most universities). There is also lots of related development documentation and tools at this point (like for Eclipse) now that the Java ecosystem has matured. Java is in this sense just the new "C" (with many strengths and, yes, a few weaknesses relative to C). For a point by point language comparison, see: http://www.cs.princeton.edu/introcs/faq/c2java.html or, as to performance: http://www.idiom.com/~zilla/Computer/javaCbenchmark.html "Five composite benchmarks listed below show that modern Java has acceptable performance, being nearly equal to (and in many cases faster than) C/C++ across a number of benchmarks." Or: http://www.stefankrause.net/wp/?p=4 "It’s hard to draw a conclusion because the results don’t speak just one language. But a few things can be said without regretting: ... * Saying that C is generally several times faster than java is - according to those benchmarks - simply wrong. If you’re allowed to choose the fastest JVM the worst case for java was 30%. In other benchmarks Sun and JRockit were even able to beat ICC. Not by much but I guess it’s nevertheless just very remarkable that it’s possible to beat ICC. Another interesting figure is that Bea was less than 14% slower than GCC in the worst case (nbody) and was in two cases faster than GCC. * Saying that Java is faster than C can also be pretty wrong, especially if you have to stick with one JVM. The worst case in these benchmarks were 30% slower for JRockit to 2.44 times slower for Sun’s JDK 6U2." For me, given most (not all) cross-platform issues go away, especially for turbo-boosted Smalltalk->Java code, I am willing to take even a worst case 50% performance hit in VM performance. Imagine knowing that on *any* platform where Squeak/JVM runs, you could just hit a button on your (carefully written) Smalltalk code in the Class browser and it would suddenly run 10X faster and still be debuggable by JVM-oriented tools written in Squeak. :-) For me, that would be one of the biggest wins with Squeak on the JVM, even with a 50% loss of GUI speed, since I am interested in numerical simulations (but with fancy GUIs). I'll grant that other people's needs may differ. RSqueak (which I take it is essentially Slang?) http://wiki.squeak.org/squeak/2267 or PyPy just can't hope for that kind of possible instant speed up on *all* supported platforms, at least not without a lot of hard-to-maintain work wrapping C compilers and C-oriented debuggers across many platforms, just trying to duplicate functionality that essentially comes for free with any JVM and has been heavily tested. Granted Python does have install tools which do some of that across all platforms for C extensions, so it's not impossible to imagine it being doable, but even then, just think about the testing permutations for the C solution if you wanted to ship an application relying on the performance boost. For free software with unpaid community support, as a designer I'd much rather sacrifice 30% or 50% of the potential speed by using Java vs. optimized C if that meant have less low-level weirdness support headaches for the community (now that a decade of suffering later most of the JVM bugs are out -- I would not have said this in 2000). I could also hope that a smoothly running Squeak/JVM might even potentially entice Stéphane into thinking about doing Squeak maintenance again someday. :-) And even if it doesn't, then it hopefully still would make it easier for everyone else. I know this sounds like a "sales pitch", but the biggest potential "customer" (or "sucker" :-) I am targeting is really just myself. :-) This documentation is all part of my own decision making process (but a bit in public this time, to invite agreement or disagreement on the substance of it). If I myself remain unpersuaded (it is to be seen what I do), it is purely weighing using an existing JVM solution (like Scala, Clojure, or Jython) instead of doing something in Smalltalk. --Paul Fernhout P.S. There was also an "is" that was supported to be an "if", as in "the biggest problem with Chandler is if they [had used Squeak that effort might have worked out a little better. :-) ]" P.P.S. Another Smalltalk->Java link: http://per.bothner.com/papers/smalltalk.html |
In reply to this post by Dan Ingalls
Tempting, but I myself won't ask to see the code, because until I know the
exact licensing conditions and availability of something (and deem them acceptable), I don't want to look at it or invest time in it (even if I stumble upon stuff). Too much other stuff out there with clear licenses I can be sure to draw from. And I already got stuck once with a person month of code I wrote I could not release because of a lack of clarity going into a collaboration as to the licensing of the original source materials and the output. Also, no disrespect intended, especially because I think what you did with Smalltalk and Squeak is really cool (both with this Squeak on the JVM and in the past), but in the long term somehow I'm personally still inclined for reasons related to licensing clarity, as well as having the image defined purely as source code, as well as to improve modularity, on putting Squeak-derived tools and applications around a GNU/Smalltalk-derived core running on a hand-coded VM (or more likely just some hand written glue code for using Java objects from Squeak). At least, that's the way I am leaning now, for various reasons most of which I've outlined in this thread. Maybe it won't work out in practice, I'll see. But someone like you will have to admit how much fun that might be, watching the system grow in functionality bit by bit and understanding every piece you add as you add it (even if the whole might start doing unexpected things eventually. :-) But, if you had the time, I'd sure be happy to learn more about any unusual aspects of the general architecture if you can describe it simply. As a simple answer to that, is it still organized as Michael outlined: "It's very nice code, and nicely modularised into just 8 classes and 1 interface: the Squeak interface defines constants. The Main and Starter classes are wrappers to get everything running. Then there are SqueakVM and SqueakPrimitiveHandler for execution, Screen and BitBlt for displaying, and SqueakImage and SqueakObject for representing living things." And how many pages or lines of Java code (roughly) did that turn out to be? And also, did you write a Smalltalk->Java translator to make the VM or did you code it by hand? I'd be curious about anything you could say about the license of the Java part (or Smalltalk->Java translator). X/MIT? Squeak? Other (Sun's Java or GPL+Exception)? (Even LGPL is fine with me, by the way, as I expect to be using that if I draw from GNU/Smalltalk for the core.) Though I know until its formally released maybe you can't make promises as to license, so feel free to not answer that. Still, I would expect that those classes would all be very useful in whatever implementation anyone worked on for the JVM. These questions would all take longer to answer, or might have proprietary or personal answers, so feel free to skip them. In general, it would be nice to learn what parts were hardest to do or where you had to write a lot more Java code than expected (or even, what parts were surprisingly easy). Although perhaps that would be too specific to you to know if it applies to any such effort? It would be nice to get a general impression of how many Squeak classes it has (if different form a standard image), how it performs relative to Squeak in C on the same hardware, or what parts of the Squeak VM the JVM struggles with (if you profiled it), or if it exposed any (publicly known) JVM problems or weaknesses any such effort might encounter. I'd like to learn if it involved refactoring or changing any of the Squeak core classes (or if you just used essentially a release image or something similar). It would be nice to know what version(s) of Squeak you drew from. It would be nice to know if newer JVMs (like six or seven) make it perform a lot better. Also, compared to the C, it would be nice to know if you though the Java code seemed as beautiful or elegant? Did you find the tools as reasonable as ones for C? I'd be curious what setup you used to develop and test it too, just out of curiosity (Eclipse, Sun's tools? Other?). Does the system feel stable to you (that is, relatively to Squeak on a VM in C)? Or anything else related to an overview to get everyone even more tempted. :-) Essentially, anything non-proprietary you might want to later put in a lengthy "readme" file or an informative pre-announcement is what I would love to know right now. Or a pointer to such if it already exists on the public web. :-) This is unrelated, but as long as I'm asking, :-) feel free to say no comment, I'd be curious if you were involved or in touch at all with Sun's effort to make the JVM have better support for dynamic languages (like JRuby or Jython, or, hopefully, a Squeak/JVM. :-) No Smalltalkers listed here, sadly, but it was years ago: "Sun warms to Dynamic Languages: Summit Held" (Dec. 2004) http://www.theserverside.com/news/thread.tss?thread_id=30462 That's just to get a sense of how much the JVM might (in theory) continue to improve in a Smalltalk-ish direction if there was an actively used Smalltalk on the JVM and someone there who cared about it. --Paul Fernhout Dan Ingalls wrote: >>> If Athena and Spoon and Dan's project and a few other projects and >>> people could get together somehow, then we might have something even >>> greater, and not several people working mostly on their own. But >>> coming up with a shared vision might be hard? >> In my opinion, the key of success for JRuby, Rhino, JScheme, Jython is >> to enable interaction with Java. When Dan will release its source, I >> might port Athena on his VM. But again, interaction with Java is >> crucial. > > FWIW, since Potato is in the release process here, I'd be happy to send a > private copy to anyone until it's official. It should be easy to > evaluate the convenience of inter-operating with Java (I think pretty > simple). Just send me a message. |
But, if you had the time, I'd sure be happy to learn more about any unusual SqueakImage and SqueakObject for representing living things." Yes, still so organized -- I haven't touched it since 2006.
And how many pages or lines of Java code (roughly) did that turn out to be? Evaluating:
| dir s | dir _ FileDirectory on:
'/Users/danielingalls/Desktop/SqueakOnJava/src'.
dir fileNames do: [:n | s _ (dir fileNamed: n) contents. prints... BitBlt.java 897
Main.java 31 Screen.java 380 Squeak.java 125 SqueakImage.java 360 SqueakObject.java 300 SqueakPrimitiveHandler.java 1680 SqueakVM.java 1704 Starter.java 55 ... so it's about 5000 lines of code counting comments (and there
are some ;-).
And also, did you write a Smalltalk->Java translator to make the VM or did you code it by hand? I wrote it by hand because (a) I was trying to learn Java, and
(b) I wanted to use
Java storage management.
I'd be curious about anything you could say about the license of the Java be very useful in whatever implementation anyone worked on for the JVM. It's an MIT license.
These questions would all take longer to answer, or might have proprietary A lot of the code just looks like the C that comes out of our C
translation.
I would have just made a Java translator, except for the
adaptation to
Java objects.
Although perhaps that would be too specific to you to know if it applies to known) JVM problems or weaknesses any such effort might encounter. I had as a goal to run the Mini2.1 image, period. You can fire it up and get all the stats. It's about 600k (320k gzipped), it
has 202 classes,
and 4592 methods that decompile to 856k of source (more than the
image
size itself -- I always used to kid that it was like source code
compression
with an integrated development environment thrown in for free
;-).
I'd like to learn if it involved refactoring or changing any of the Squeak core Mini2.1 period.
By the way, if the stars are lined up right, you can just click
on...
[It will run your cpu full throttle because I never bothered to
figure out
how to yield to the OS That would be a big help]
It would be nice to know if newer JVMs (like six or seven) make it perform a lot better. I can't tell you. I just run what's on my Mac. I
get
where the Squeak VM gets
or between 10 and 30 times slower than C.
But you can't take this as an indication of Java versus C because
the
whole object memory is simulated. If you look at bitBlt
performance
which is pretty comparable code, they're just about equal
(believe it or not).
Also, compared to the C, it would be nice to know if you though the Java code seemed as beautiful or elegant? Well, look at the size. It was very nice not to have to write a garbage collector, and enumeration and become together are only a page of code.
Did you find the tools as reasonable as ones for C? Huh? I've never used C. Ha ha. Got ya
there.
The only C tool I've ever used is the C translator
I'd be curious what setup you used to develop and I used Sun's NetBeans. It seemed PC, and a useful reality
check.
Does the anything else related to an overview to get everyone even more tempted. :-) Yes, it's stable, but very untested. I'd say it needs a
month or two to complete it
and maybe another month to work up a decent synergy with
Java.
Essentially, anything non-proprietary you might want to later put in a public web. :-) You wanted to know about the object format. Here it
is...
public class SqueakObject {//Later make variants for common
formats
short hash; //12-bit Squeak hash short format; // 4-bit Squeak format Object sqClass; //squeak class Object[] pointers; //pointer fields; fixed as well as indexable Object bits; //indexable binary data (bytes or ints) The only other tricks are that I use a weak object table to
support enumeration and become, and I use boxed integers
throughout, keeping the common ones in a table for quick
creation
and to avoid needing to reclaim them (they are shared).
This is unrelated, but as long as I'm asking, :-) feel free to say no on the JVM and someone there who cared about it. I've left this up to their own technical and marketing
decisions.
If they wanted to take this project farther I would certainly
help them
to get started.
|
Dan Ingalls wrote:
> Yes, still so organized -- I haven't touched it since 2006. > [snip] Thanks for the great overview and the technical hints; I'll muse on them for a while. And once the code gets formally released, I'm sure you'll announce it and I'll see what I can do with parts of it. If I release anything before or after in a similar direction, I'll probably put it here: http://sourceforge.net/projects/patapata >The only C tool I've ever used is the C translator Good for you. I wasted too much of my youth chasing pointer errors or resolving deallocation issues -- or teaching others to do the same. :-( Still, I can't say some of it wasn't fun, in a puzzle-solving kind of way -- except there are generally more important puzzles to solve than off by one pointer errors or duplicate "free" statements. :-) >> [Sun's effort to make the JVM have better support for dynamic languages] > I've left this up to their own technical and marketing decisions. I'd beg you to at least have lunch or a teleconference with the JRuby guys now at Sun if you get a chance, but that might seem too groveling to be persuasive. :-) Sun's technical leadership seems really serious about dynamic language support though (if for no other reason than dotnet is doing it?), which is one reason I think a Squeak-like system on the JVM make some sense, since the JVM will only get better and better for it (I hope). You probably know all this, but just in case, see: http://www.tbray.org/ongoing/When/200x/2006/09/07/JRuby-guys "[September 2006] Charles Nutter and Thomas Enebo, better known as “The JRuby Guys”, are joining Sun this month. Yes, I helped make this happen, and for once, you’re going to be getting the Sun PR party line, because I wrote most of it. [Update: It strikes me that thank-yous are in order. Given that Sun is in the process of (appropriately) slashing some of its engineering groups, new hires are a little tricky. A lot of people helped, but I think the biggest contributions were from our Software CTO Bob Brewin and especially Rich Green, who approved the reqs about fifteen seconds after Bob and I raised the issue.] ... What will Sun be doing with JRuby? Perhaps most important, we hope to learn from this experience. Dynamically-typed languages like Ruby are only beginning to be accepted in the software mainstream [My note: HAH! :-)], and many of the best practices and tools remain to be invented. [Also my note: Double HAH! (Not to say there isn't room for improvement with anything, of course. :-)] Second, we'd like to ensure that the Ruby programming language, in its JRuby form, is available to the community of Java developers. Finally, there is a possibility that the Java platform may prove to be an attractive deployment option for existing Ruby applications in certain scenarios." Or, Philippe Marschall supplied this link earlier in this thread to an item on John Roe's blog (at Sun): http://blogs.sun.com/jrose/entry/notes_on_an_architecture_for "In a previous post I enumerated the various parts that go into a call site in the JVM. In order to support the program structure of other languages, especially dynamic languages, the JVM must extend the present schemes of method definition, invocation, and linkage. We don’t want to create completely new mechanisms, since we want to reuse the highly developed infrastructure of mature JVM implementations. The JSR 292 Expert Group, which I chair, is working on a specification to address this problem in detail, via carefully chosen changes to the bytecode architecture. The first EDR (early draft review) will be available in a few weeks. Meanwhile, I would like to point out some design requirements for method calling in a multi-language world. The key new requirements are dynamic relinking, programmable linkage, programmable guards, descriptor polymorphism, and method handles. ... " As I see it, you could look at the ubiquitousness of the JVM one of two ways (or both at the same time :-). Either Smalltalk failed, because most people are not using a pure Smalltalk VM. Or, on the other hand, Smalltalk succeeded enormously because just about everyone now programs with most of the ideas you and Alan (and others) got going in a big way in the 1960s/1970s -- objects, garbage collection, a cross-platform virtual machine, fancy IDEs like Eclipse, and so on, even to the point where a major technology company changes its stock ticker symbol to be the name of an object-oriented virtual machine (JAVA). Maybe the the JVM and the world is still not Smalltalk-ish 100%, and maybe there has been a lot of needless suffering along the way, but as I've heard, "first they ignore you, then they laugh at you, then they fight you, and then you win." :-) The way the JVM is evolving to dynamic languages support, and with new functional/OO-hybrid languages like Scala/JVM or Clojure being written for it, or ports of almost-pure OO ones like Jython or JRuby, I'd say Smalltalk ideas were doing pretty good. :-) I've been a long time Java and JVM hater (compared to VisualWorks or Squeak), but at some point, with so many options, now that Java and the JVM are "Free as in freedom" I'm pretty much orienting the future of my work around the JVM (and related languages) as it being "good enough". I still want to avoid Java as much a possible though. :-) The only question for me (as a free software developer) at this point is, will I be using Smalltalk syntax (and related tools and semantics) more on the JVM or will I be using other languages more (Jython, Scala, JRuby, JavaScript, Clojure, whatever)? By the way, a place to send you announcement when you release: "Programming Languages for the Java Virtual Machine" http://www.robert-tolksdorf.de/vmlanguages.html I hesitate to post this link lest you take the title the wrong way :-) but here goes: "Unskilled and Unaware of It: How Difficulties in Recognizing One's Own Incompetence Lead to Inflated Self-Assessments" http://www.apa.org/journals/features/psp7761121.pdf In your case (despite the title :-) the important thing is that the paper also suggests *very competent* people tend to *underestimate* their own relative competence, because they typically overestimate the competence of their peers. :-) So, don't be *too* modest at Sun. :-) Maybe before we know it, the JVM could be 80% optimized for Smalltalk-style "doesNotUnderstand:" method dispatching and restartable exceptions with just a couple extra JVM bytecodes(?) while still supporting statically typed languages like Java or Scala/JVM in a cross-platform way -- for the best of both worlds. But in any case, no pressure. In the end, it doesn't matter a whole lot if Squeak goes, say, 3X faster on the JVM if it is too stressful bureaucratically to change the JVM to suit Smalltalk better; that much would only about a three year lag following Moore's law style exponential computing increases anyway. :-) And I could also hope that using Java objects directly within a Squeak/JVM might get another 3X-10X performance boost compared to the link you posted (assuming other desirable features could be maintained). And at that point, the 80/20 law takes over, where bottlenecks can probably be translated to cross-platform Java or Scala/JVM more easily than optimizing the JVM further or making Squeak faster somehow. In the end the value is more in how well overall a Squeak+JVM+JavaEcosystem system supports individual or group creativity, and speed is only one part of that (and probably not even the most important by far these days). I wish you continued fun with your new projects (like Lively -- amazing stuff). Thanks again for all the technical hints. All the best. --Paul Fernhout |
On Feb 9, 2008 3:38 PM, Paul D. Fernhout <[hidden email]> wrote:
... Indeed - the power of the Smalltalk meme! One other potentially huge benefit of Smalltalk-Java symbiosis is the increased opportunity to explore/exploit hardware support. While I remain very impressed with and interested in Plurion, diversity is good and there are many mulit-core and FPGA Java projects ongoing including Sun's OpenSPARC. Cheers, Laurence |
Laurence Rozier wrote:
> Indeed - the power of the Smalltalk meme <http://croquet.funkencode.com/2007/04/07/evolution-in-cyberspace-the-smalltalk-meme/>! Wow, that link just chewed up a couple hours for me strolling down Smalltalk memory lane, following more links from stuff on that blog. Yours? :-) http://squeak.funkencode.com/intro/ (No name?) http://croquet.funkencode.com/2006/04/18/about/ (Your name) Those comments on the history of Smalltalk around 1996 or so prompted to Google up this old thing I wrote to the Squeak list in 1998, and now have to say I was ultimately somewhat wrong about what I wrote back then: :-) http://lists.squeakfoundation.org/pipermail/squeak-dev/1998-April/021255.html "The major weaknesses I see with Squeak right now are speed (that of a Java applet in some browsers, 1/40C (1/20 with Jitter?)), the lack of standard GUI components (like comboboxes), lack of standard exception handling, and lack of local block variables (not shared in the method). People are working on all those issues, and I have more confidence those will be improved or that speed won't matter as computers get faster, than I do that Java will ever become an open standard with the features I want (which Smalltalk has right now, like first class objects everywhere)." And here I am, ten years later, advocating Squeak on the JVM, now that the JVM is free, more full featured, and more debugged. :-) It even has objects everywhere if you pick another JVM language like Scala or Clojure. (Though I still don't like Java very much, even as statically typed languages go. :-) I think most of those Squeak issues got fixed, too (except maybe speed). Though Squeak also acquired some new issues related to complexity currently being worked through. So, in some ways, we now have the best of both worlds. :-) And in reading various related entries to why Smalltalk failed to expand with the internet bubble: http://squeak.funkencode.com/category/community/ especially: http://squeak.funkencode.com/2008/01/29/smalltalk-reloaded-missing-bits-the-achilles-heel/ I think a Smalltalk which can easily interoperate with JVM libraries might solve some of those problems, just like Jython gets extra leverage by being able to use Java libraries for sockets and threads and graphics and network APIs such). Suddenly (in theory), as with Jython, Squeak could do everything Java could do -- write PDFs, manipulate SVG, talk via Jabber, simulate molecules, and so on. Most of the time woudl be an effort spent mostly reading the APIs and translating the concepts, which sometimes has proved not-quite-straightforward, even for syntactically similar Jython, at least at first. I know, Squeak can probably do all those things already, and more, but I'm sure if I looked hard I'd find things it could not. :-) Also, I know it loses some of the transparency Squeak has. :-( The Lively Kernel (Dan Ingall's latest project) is described in the latest blog entry there as a "Squeak on JavaScript". So that is in a sense another example of the Smalltalk meme spreading to another language (though with a little help from one of the original creators. :-) From: http://squeak.funkencode.com/2008/02/08/lessons-from-the-lively-kernel/ "Dan Ingalls did a Google Tech Talk last month which may be of interest to many of the current Squeak-dev list discussions(Morphic 3, JVM etc.) as well as Croquet or anyone interested in the web as distributed object space." I watched the video at: "The Lively Kernel" http://www.youtube.com/watch?v=gGw09RZjQf8 Some notes by me: Issues raised as important to add or expand by Googlers included: * Security (Programmer vs. User, development vs. deployment/use) * Complexity ("attenuate affordances", expert vs. beginner, HyperCard) * Versioning (Squeak has, Lively does not yet) * Annotations (Semantic markup of drag and drop actions would be nice) * Serialization options (a textual image vs. SVG?) * Transformation (export to HTML) * Factoring (GUI Libraries vs. Native vs. complexity of an extra layer) * Is "test driven" is becoming a dogma for everything, as valuable as it can be? :-) A lot of these issues apply to Squeak as well and have been discussed here at one time or another. :-) There were a lot of sharp people asking good questions, but still, it seems to me like some of these Googlers didn't come across as understanding "having fun" or "exploration" or "R&D", as in "What good is a new baby?" (Edison? Tesla? :-) You'd never get quite that same attitude in, say, a colloquium in a university department of mathematics after a seminar on a new and elegant approach, to, say, esoteric-seeming knot theory: http://en.wikipedia.org/wiki/Knot_theory "In the last several decades of the 20th century, scientists and mathematicians began finding applications of knot theory to problems in biology and chemistry." Also, just because a system with X doesn't have Y or Z yet (or ever), does not mean X is not awesome by itself. :-) So I agree with this comment: http://javascript.funkencode.com/2008/02/08/lively-kernel-google-tech-talks/ "So many people seem to miss the simple albeit very subtle value of a clean architecture." I was surprised (for Google) no one raised "scaling" issues about any obvious size/performance limits. Also, there is an issue of when is a web page live so it can receive input or serve output to other than the immediate viewer? It was implied the same code could run on a server. Lively Kernel does seem like Squeak done even more simply and clearly, including a clearly "open source" license (GPL v2). The success shows syntax does not matter as much as dynamic semantics. So the overall architecture could be a great starting point for anything in Smalltalk (respecting the GPL license if one borrows from it in a derivative way) for a "blue plane" future Squeak. http://www.fit.vutbr.cz/study/courses/OMP/public/software/sqcdrom2/Documents/WhereIsSqueakHeaded1998.html [although for me, the "blue plane" seems now to have to do more with leveraging the creative work of others entombed in static Java libraries, maybe even at the cost of losing a bit of what Squeak has now. :-( ] I did a little of the same idea (though not such a tour de force) with Python and Jython in the PataPata experiment (inspired by Squeak and Self). A video of it in use: http://showmedo.com/videos/video?name=patapata_tkinter1_fSchnell The place where Python and Jython fell over (compared to Smalltalk) was coding in the debugger. Python just was not designed that way -- even though you would think it would be a trivial thing for such an otherwise dynamic language (more dynamic in some ways than Smalltalk, since instance variable data is stored in dictionaries, not array slots), but it looks like it is not easy to patch that kind of comprehensive support for restartable exceptions in after-the-fact. But I'm wondering if JavaScript is up to coding in the debugger either? Dan said Lively was doing something with a shadow stack wrapping each function call, so maybe it can? Even if you can't, as with Python and Jython, you can still change code on the fly (Dan showed an example with the clock), which in practice sometimes works out OK for coding GUIs since you can often just abandon an exception and retry the GUI action with the changed code. But it doesn't work out so well if you've just run an hour long non-GUI simulation and a typo pops up an exception, and you need to rerun the whole thing to make one change. Lively was slow for me where I tried it (iBook G4, Safari 3.0). Runs with problems on latest Debian stable IceWeasel (FireFox) -- but that browser version is not a current target. Not obvious how to activate menus or get handles, which was my biggest difficulty with it. Bottom line issue for me and this thread: Lively Kernel is not quite as much a system-in-itself compared to Squeak (but that is not intended by me as a complaint. :-) It almost certainly uses non-JavaScript compiled libraries for SVG, XML parsing, JavaScript parsing, networking, and presumably others supplied by the browser. So that is why it is only 10K lines of code (guessing 300K?), compared to minimal Squeak on the JVM Dan put up a link for of about 900K (or three times the size). The Squeak version also does less in some ways because it is a MVC version (not Morphic). So, basically, this all might imply a good enough Smalltalk core on the JVM to be interesting, calling on the Java libraries for graphics and other functionality, should also be roughly about 10K lines, or about 120 pages of core code (maybe a little more to add a Smalltalk Compiler, but not much). But that is just an assessment without looking at the code; perhaps Lively does more of the low-level graphics manipulation (like matrix transformations) in JavaScript than I guess it does. In any case, Lively Kernel is, for me, a good proof-of-concept of what a Squeak core on the JVM might look and feel like in terms of code complexity. For my various plans, I still prefer to have a a Java application (webstarted perhaps, and maybe also an applet) for these reasons: http://mail.python.org/pipermail/edu-sig/2006-July/006683.html (See the section on "sovereign" versus "transient" appreciations.) But I don't really have a good feel yet for all the the potential uses of Lively Kernel; for example, I read somewhere the latest Java runtime integrate JavaScript, so presumably a version of Lively as is could run easily as a Java application (and be faster?), and so also potentially interoperate with Java code. I also just really haven't thought much about that whole Web URL space it occupies from a "transient" perspective. Java right now probably has a much bigger potential audience than Safari 3.0. Although maybe not if you consider how much trouble many people have (even me sometimes) just finding where they put downloaded software, let alone actually installing it. :-) Java in the future would seem to be a smaller audience than all JavaScript-enabled web browsers as people continue to upgrade over the next few years. I might expect all browsers to have JavaScript accessible, but only some to have Java enabled. I have a relative who is a school teacher who was forced to sign a document acknowledging that she could be fired for installing any software on her classroom computers. So Lively really does address a very important problem I know of -- although often Java is enabled on classroom computers too. :-) Either way, Sun wins -- Java or Lively. A nice way to hedge its bets. :-) And Dan and company have really pushed the envelope once again -- this time in installation convenience as well as elegant design. But of course I would want all the Lively ideas in a JVM version of Squeak (as well as ponder how or whether to address the list of extra requirements the Googlers came up with). I loved the Lively style browser modifying the style browser; PataPata inspectors could do that too (though not as sleekly. :-) And I really loved the rotating star on a rotating star. There must be a lot of great abstractions at work there under the hood for 10K lines of code (whether Morphic-derived or otherwise). By the way, I should have added that every one of the 200 or so JVM languages listed here: http://www.robert-tolksdorf.de/vmlanguages.html are in some sense a tribute to Dan Ingalls and others who developed the original Smalltalk VM. Each is a tribute to the notion that the idea of an OO VM with GC and meta-reflectivity makes it easier for people to be more creative. :-) Even JavaScript itself (used in Lively) is a tribute to the Smalltalk philosophy in many ways. --Paul Fernhout |
In reply to this post by Paul D. Fernhout
> I think I'd rather write Smalltalk->Scala and let the Scala team
> worry about > optimization. That's the kind of stuff they like to do. :-) Scala is statically typed. How would you map a dynamically typed language into a static one? This far from being automatic... I am probably missing something here. Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. |
Alexandre-
I don't think it would be trivial thing to do, true. But in general, when you go from Smalltalk to a static language you get a speed boost at the cost of reflection and dynamic debuggability. You shift from using full featured objects (with reflective introspective abilities) and using full featured stack frame entries (garbage collectible to support full blocks) to using only limited objects which just do exactly what you specify and using only a stack which is linear (not fractal, like Smalltalk) and so can be optimized to use the stack of the real machine (or virtual machine) more easily. But since Scala supports a higher level of abstraction than Java (or C/C++), while still having close to the same speed, I think perhaps less compromises might need to be made in some areas. This book includes some example Scala program code related to Smalltalk's forte, "Discrete Event Simulation", defining "A Language for Digital Circuits": "Scala By Example" http://www.scala-lang.org/docu/files/ScalaByExample.pdf It just seems once could imagine a system that does a fairly easy mapping from Smalltalk to produce something like this: """ class Wire { private var sigVal = false private var actions: List[Action] = List() def getSignal = sigVal def setSignal(s: Boolean) = if (s != sigVal) { sigVal = s actions.foreach(action => action()) } def addAction(a: Action) { actions = a :: actions; a() } } """" or: """" def andGate(a1: Wire, a2: Wire, output: Wire) { def andAction() { val a1Sig = a1.getSignal val a2Sig = a2.getSignal afterDelay(AndGateDelay) { output setSignal (a1Sig & a2Sig) } } a1 addAction andAction a2 addAction andAction } """ Or: """ abstract class Simulation { case class WorkItem(time: Int, action: Action) private type Agenda = List[WorkItem] private var agenda: Agenda = List() private var curtime = 0 private def insert(ag: Agenda, item: WorkItem): Agenda = if (ag.isEmpty || item.time < ag.head.time) item :: ag else ag.head :: insert(ag.tail, item) def afterDelay(delay: Int)(block: => Unit) { val item = WorkItem(currentTime + delay, () => block) agenda = insert(agenda, item) } """ Anyway, I'm not saying that completely answers your question. And it would not be automatic for all Smalltalk code and there would no doubt be various issues to resolve (including perhaps interoperation). But if you look at the kind of OO and functional code Scala can accept, then I think that *some* types of Smalltalk code (written with translation in mind) might translate very smoothly to it. And I might expect that the amount of such code might be quite a bit larger than what translated smoothly to C. Or even C++ (given GC in Scala). :-) I don't expect people would want to translate entire systems to Scala or Java, just the bottlenecks,and usually the bottlenecks are fairly straightforward things like arrays of numbers to be multiplied, or some recursive or iterative or choice-making algorithm which is mostly self-contained (like BitBlit, sound primitives, matrix manipulation, fractal generation, and so on) although might have callbacks into Smalltalk (a hard part). So overall, I'm guessing a translator that can do a enough of Smalltalk->Scala which might be useful in practice for bottleneck optimization might not be that hard to write, and one could expand from there. Obviously, as with the C translator, things might start to fall apart quickly for complex cases (using "perform:", or some fancy uses of blocks, or reliance on many features of Smalltalk base classes beyond ones that map easily to Scala libraries, or places where Scala's functional emphasis like with immutable objects by default mismatches Smalltalk's OO emphasis somehow). But for the kind of things I'm interested in -- typically having a bunch of straightforward classes that just do simple but repetivie mathematical manipulation (like to simulate water percolating through soil layers), I would think the translation might work well. And even developing new Virtual Machines might fall in that category. :-) Because Scala has removed some of the warts of Java, like by not requiring all exceptions be declared or caught for every function, or by not requiring all types be declared if the compiler can deduce them, I would think the translation process from Smalltalk might be easier than to Java and requiring less Smalltalk programmer effort to restrict oneself to only simple types or think about Java exceptions. So, if, say, you needed to supply type annotations in the Smalltalk code somehow to make this work smoothly (in comments?) then you might need to supply less of them. Another big advantage over translating to C or even C++ (or even Java) is that, given Scala's support of GC and classes and function references, the resulting code in Scala might simply look prettier and be able to understand. Because there is less clutter compared to C, it might also be easier to make small tweaks by hand, with the tweaks then eventually moving back to improving the translator or the Smalltalk source for the application. Anyway, that's my gut feeling. It might not prove out in practice. And I don't even know how to program in Scala yet. :-) --Paul Fernhout Bergel, Alexandre wrote: >> I think I'd rather write Smalltalk->Scala and let the Scala team worry >> about >> optimization. That's the kind of stuff they like to do. :-) > > Scala is statically typed. How would you map a dynamically typed > language into a static one? This far from being automatic... > > I am probably missing something here. |
On Feb 11, 2008 5:12 AM, Paul D. Fernhout <[hidden email]> wrote: But in general, when you go from Smalltalk to a static language you get a What is a fractal stack? Gulik. -- http://people.squeakfoundation.org/person/mikevdg http://gulik.pbwiki.com/ |
Hmm, are you saying about translating from one language to another, or
you speaking about translating VM code? The only things, which can improve performance is to translate code to bare metal (as Exupery does). Translation to another language (or to another VM) is much less effective. Don't forget, that any VM/compiler is designed to be optimal for a target language, so even if you try as hard as you can, you can't run smalltalk with high speeds if your VM is not specialized to run smalltalk. -- Best regards, Igor Stasenko AKA sig. |
In reply to this post by Paul D. Fernhout
Paul D. Fernhout wrote:
> """ > class Wire { > private var sigVal = false > private var actions: List[Action] = List() > def getSignal = sigVal > def setSignal(s: Boolean) = > if (s != sigVal) { > sigVal = s > actions.foreach(action => action()) > } > def addAction(a: Action) { > actions = a :: actions; a() > } > } > """" In rereading this, I see how this is probably a totally unclear example, without having spent at least fifteen minutes reading about Scala. :-) One important issue is that Scala infers types in the body of functions, but you have to specify the types for function arguments. A class overview from the book: "The Wire Class. A wire needs to support three basic actions. getSignal: Boolean returns the current signal on the wire. setSignal(sig: Boolean) sets the wire’s signal to sig. addAction(p: Action) attaches the specified procedure p to the actions of the wire. All attached action procedures will be executed every time the signal of a wire changes." So, imagine some hypothetical original source for this Wire class in Squeak: Object subclass: #Wire instanceVariableNames:'sigVal actions' classVariableNames:'' poolDictionaries:'' category:'Demos' init sigVal := false. "%Translator annotateListType: 'Action'" actions := OrderdCollection new. getSignal ^ sigVal. addAction: aAction actions addFirst: aAction. aAction value. setSignal: aBoolean (aBoolean ~= sigVal) ifTrue: [ sigVal = aBoolean actions do: [:action | action value]. ]. Line by line here is what is there (and what isn't there compared to C or Java) to see how Scala could be a useful output medium for translating Squeak code to an alternative statically typed language instead of C or Java. > class Wire { We're defining a class "Wire". > "private var sigVal = false" The compiler infers the Boolean type for the instance variable "sigVal" from the constant assignment. So no need to annotate the Smalltalk code yourself. Let's ignore the "private" flag. > private var actions: List[Action] = List() This would probably require an annotation saying the List is specialized to only hold "Action" instances somewhere in the Squeak code for the expected class of the items of the list. Notice the list never needs to be deallocated anywhere (unlike, say, a typical C++ object). > def getSignal = sigVal This is equivalent to a simple accessor method to return the instance var "sigVal" > def setSignal(s: Boolean) = > if (s != sigVal) { > sigVal = s > actions.foreach(action => action()) > } This defines a method "setSignal:" where the argument type would have to be annotated as a "Boolean". Or perhaps the compiler would take a type from the argument name if it was "aBoolean" or "s_Boolean" if underscores were allowed. :-) The code iterates over all the previously stored action objects (notice no types are declared for the temporary variable "action") and each action (block) is called as a function with no arguments. > def addAction(a: Action) { > actions = a :: actions; a() This is how the actions get added. The part after the semicolon is calling the action and could be on a separate line. Notice the actions don't need to be deallocated. Anyway, I haven't tried compiling that, but that's a rough Smalltalk equivalence. Hopefully one can see how easy that mapping might be (in theory). The system in this case would also have to know to map "do:" to "forEach:" and OrderedCollection to List, "addFirst:" to an assignment, and "value" to a function call. So still some magic going on, including resolving these from the Smalltalk classes used (perhaps by profiling and annotating the Smalltalk code as it runs? :-) But possibly there is a lot less than for C or even Java, to get a lot more. Also, I'll admit I'm a little fuzzy on how to specify that an "Action" is always a no argument BlockContext instance (Scala: "type Action = () => Unit"). Probably another type annotation somewhere, perhaps in a class comment? So, admittedly still quite a bit of handwaving here. :-) But remember, I am really on,y wanting to solve the easy cases -- the 1% or even 5% of the code which is a bottleneck to performance, and I hope that just a little magic with types and annotations and assumptions and perhaps profiling might be enough to do that. It's the 80/20 rule. With Scala, I think we could have 80% of the benefit of high performance with only 20% of the pain and clutter of types in the specific code. :-) Of course, I'd hope more for 90/10. :-) Anyway, I'm not suggesting this would not take some work. But I am suggesting the payoff for such an approach might be high for a small amount of work. :-) Essentially you would not be as restricted to just Slang operators: http://wiki.squeak.org/squeak/2267 (or your own functions built.on those) when running on the JVM and wanting to remove bottlenecks; you would have the full power of a general OO and functional programming language to boost Smalltalk performance when needed. Squeakers on the JVM could then make the same sales pitch Pythoneers do -- code it in one language, and add a little harder to maintain stuff in another. I know people can do that now with Squeak and C, but Java is simply *much* easier to maintain across platforms than C for the average programmer (one reason Jython is becoming a better value proposition than CPython in some parts of various enterprise systems). You would still have to code carefully and make some annotations, but you could (in theory) use a larger set of OO and functional abstractions and expect Scala to handle them. And the good news is, since Scala is statically typed, you'd know at once if you were missing an annotation since Scala would complain about not being able to infer a type. Maybe eventually one could even report that error back into the Squeak GUI and have the browser highlight the problematical part of the translation (though with statically typed systems its not always obvious where the problem is introduced, especially the fancier the generated Scala code. :-). The Scala team is small and the language is still evolving. Java is a large language and getting it changed to help with a Squeak on the JVM would be difficult. So, if there was some aspect of this translation process which could benefit from some minor addition to Scala which could generally supported any dynamically typed language work with Scala better, it might be conceivable the core language might change to accommodate Squeak's translation needs. I'm thinking mainly here the way in which Scala would get called from the JVM by Smalltalk (converting dynamic -> static) and the way Smalltalk woudl get called through the JVM by Scala (converting static -> dynamic). I'd also suggest that, like Smalltalk/X does for C/C++, one could even just drop Scala code into a browser method, but I'm worried that might seem too revolting to too many Squeakers. :-) But it would be fairly easy to do for Scala, Java, or any other JVM language as long as the languages could easily interoperate semantically (that is, the use Java objects and have some mutually agreeable way to coordinate their threading. :-) I would somehow expect Scala code might make more sense to embed at a module level than a method level though (since it is idiomatically oriented more towards lots of small interacting functions than, say, one big procedure's worth of Java or C). That suggests one way to get started, following perhaps in the footsteps of Smalltalk/X? Code a Smalltalk-ish class browser in, say, Java or Scala or Jython, and then just start adding Smalltalk stuff bit by bit, versioned in some repository somewhere (I have a Jython version of an RDF-like system (Pointrel) I wrote, but any flat file or database could do). A VM with objects will be running from the start, since the JVM defines it. Then over time, more and more of the system and tools will be in Smalltalk, as bit by bit pieces are copied from Squeak (or likely also GNU Smalltalk or any other free system, respecting the licenses). The big difference here from a conventional Smalltalk bootstrapping is that a useful system is running from day one, just not very well (i.e. the Smalltalk compiler is broken, the save image menu is broken, the Smalltalk class hierarchy isn't there, the threading model is broken, the debugger is broken, etc.). Then you add functionality by either mucking around writing some statically typed code or, alternatively use Jython (but lose execution speed), and you rebuild a Squeak-ish system one piece at a time from the JVM up. So, one day a Smalltalk compiler works (might not even be in Smalltalk at first, I have a Smalltalk-ish parser already in Jython). Then another day you can run that Smalltalk code you compiled. Then another day the debugger starts working. Then you have some nice easy to use GUI classes. Then you build some simulations to test it. Then you rewrite the Smalltalk compiler in Smalltalk. Then you reimplement HyperCard but with Smalltalk syntax. And so on. :-) --Paul Fernhout |
In reply to this post by Michael van der Gulik-2
Michael van der Gulik wrote:
> What is a fractal stack? What I mean by that is, since full blocks may contain a reference to their environment on the stack, as long as the block is around, that part of the stack is around (including an ability to unwind it). This is different from other languages like C or Java which do not allow blocks, so the stack is always linear (though you may have a few in parallel, one for each thread). Perhaps I should have used "tree like"? Consider that each block in turn might hold onto processes or other stack frames, and so on -- so in theory it might even become a random network of references, so "Tree like" and "Fractal" might both be wrong, since they imply hierarchy (though a hierarchy of stack frames is typical in practice). I've been wondering if I might just implement the Smalltalk threading stuff on the JVM by using Java objects but by having a more Actor-ish approach toward dispatching and interpreting Smalltalk code. Essentially, "MessageContext" would become a first class object in a system without any sense of a stack or stack frame (replacing "MethodContext", and doing essentially the same thing but I think the name change worth making). I'd actually prefer to just call it a "Message" but the parser uses that class and it's a common term in Smalltalk. I'm not sure the "Context" part is quite right either. Presumably, every stack frame really just goes with a message sent to some object with a selector and some arguments. So, why not just put any information in the message instance as well (like a dictionary of temporary variables)? Block evaluation would then also becomes constructing a MessageContext instance. BlockContexts might merge with Messages perhaps? Block evaluation might even imply just copying the message (assuming it was stored in an instance variable and could be resent in theory, even just by the debugger). Essentially, there would not be a stack or a stack frame, just a web of MessageContexts. Yes, performance is an issue, and I hear VW and other commercial Smalltalks win big on speed by using regular stacks whenever they can, but I like the elegance of a message-oriented implementation, and taking seriously Alan Kay's suggestion that OO is more about message passing than it is about objects (or somethings he said like that). http://gbracha.blogspot.com/2007/05/message-based-programming.html http://www.iam.unibe.ch/~denker/AlanKayOOP.html >From the second link: "The big idea is "messaging" -- that is what the kernal of Smalltalk/Squeak is all about (and it's something that was never quite completed in our Xerox PARC phase). The Japanese have a small word -- ma -- for "that which is in between" -- perhaps the nearest English equivalent is "interstitial". The key in making great and growable systems is much more to design how its modules communicate rather than what their internal properties and behaviors should be. Think of the internet -- to live, it (a) has to allow many different kinds of ideas and realizations that are beyond any single standard and (b) to allow varying degrees of safe interoperability between these ideas. If you focus on just messaging -- and realize that a good metasystem can late bind the various 2nd level architectures used in objects -- then much of the language-, UI-, and OS based discussions on this thread are really quite moot. This was why I complained at the last OOPSLA that -- whereas at PARC we changed Smalltalk constantly, treating it always as a work in progress -- when ST hit the larger world, it was pretty much taken as "something just to be learned", as though it were Pascal or Algol. Smalltalk-80 never really was mutated into the next better versions of OOP. Given the current low state of programming in general, I think this is a real mistake." And I can hope maybe the latest JVM's hotspot compiler might make up for some of the slow speed of this approach by doing optimization behind the scenes. And this approach might be more easily parallelized across multiple processors perhaps? :-) (Scala/JVM has an Actor library, by the way,but I am not sure it would help much to use it). http://lamp.epfl.ch/~phaller/doc/ActorsTutorial.html --Paul Fernhout |
In reply to this post by Igor Stasenko
True.
Still, there are a few ways to do the VM (I'll probably code the core by hand). What I more want to do is support easily optimizing bottlenecks in, say, 5% of a Squeak application's code in a cross-platform way. I'm willing to tolerate a slow Squeak on the JVM (but faster than Dan's :-) if the tools are otherwise compelling to amplify personal or group creativity, especially if I know I *could* make it go faster if I really needed it to (by sacrificing some of the dynamic nature, like translating large and larger parts of a performance critical application to Scala/JVM or Java). But *most* Squeak applications might never need that. --Paul Fernhout Igor Stasenko wrote: > Hmm, are you saying about translating from one language to another, or > you speaking about translating VM code? > The only things, which can improve performance is to translate code to > bare metal (as Exupery does). Translation to another language (or to > another VM) is much less effective. > Don't forget, that any VM/compiler is designed to be optimal for a > target language, so even if you try as hard as you can, you can't run > smalltalk with high speeds if your VM is not specialized to run > smalltalk. > |
In reply to this post by Paul D. Fernhout
On Feb 11, 2008 11:44 AM, Paul D. Fernhout <[hidden email]> wrote: Michael van der Gulik wrote: How does having blocks make the stack non-linear? If I pop open a debugger, the stack looks pretty linear to me. Gulik. -- http://people.squeakfoundation.org/person/mikevdg http://gulik.pbwiki.com/ |
On 10-Feb-08, at 2:36 PM, Michael van der Gulik wrote: > > > How does having blocks make the stack non-linear? If I pop open a > debugger, the stack looks pretty linear to me. A block's lifetime is not constrained by the stack. You can pass a block as an argument. tim -- tim Rowledge; [hidden email]; http://www.rowledge.org/tim Useful random insult:- "Body by Fisher -- brains by Mattel." |
Free forum by Nabble | Edit this page |