RE: [Newbies] Should all methods return a value?
From: Charles D Hixson Sent: Tuesday, May 09, 2006 1:16 AM I know that in some languages this matters, and in others it doesn't. If a method doesn't explicitly have a return value it will return self, but you should never count on that, small changes to the method will have a tendency to break your code. Especially when someone decides that the method should return something like true or false. If in your code you really want self back from a method you can protect yourself from this problem by adding ; to the end of your method call. For example: aFireman putOutFire may return nothing in which case the following would work since it returns self. aFireman putOutFire cleanUpMess. But if someone decides that putOutFire should return #smokeDamage then you would be in trouble. So it's better to write the code aFireman putOutFire; cleanUpMess. This says send the next message to the receiver object of the previous message and it translates as aFireman putOutFire. aFireman cleanUpMess. And if you haven't guessed aFireman putOutFire; cleanUpMess; driveBackToStation. Works too. Also sometimes what is returned can get in the way and if you really need to return self you should add the following. aFireman putOutFire; yourself. This way you could guarantee that the right object self ends up where it should. For example aFireStation medalCandidates add: (aFireman putOutFire; yourself). This makes sure that self is returned and changes to the implementation of putOutFire will not hurt your code. This is especially useful in collections, since add returns the object that was added and not the collection. aCollection := aCollection add: aFireman would set aCollection to aFireman, not what was intended. But aCollection := aCollection add: aFireman; yourself. Returns aCollection with an additional fireman in it. Hope that helps! Happy Coding!! Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists [EMAIL PROTECTED] ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Postgress Database connection
Hello again cdrick, I believe you should be using the driver from http://map.squeak.org/package/a8d3ca99-f5f4-45e0-9aa7-100a77b64f45/autoversion/3 You should also load the cryptography package. You can either load the old one from squeakmap or the newer one from Monticello. If you are loading the newer one use the HTTP repository MCHttpRepository location: 'http://www.squeaksource.com/Cryptography' user: ' password: '' You will need a username and password on squeakSource. Then load the Cryptography-Core, then the Cryptography-MD5 latest versions. The repository address for the PostgreSQL V2 driver is: MCHttpRepository location: 'http://www.squeaksource.com/PostgresV2' user: '' password: '' I have not tried it myself but I know that Giovanni was going to http://lists.squeakfoundation.org/pipermail/squeak-dev/2005-January/087098.html so maybe he can help with some pointers? Also I noticed a package on Google (http://www.google.com/search?hl=enq=postgres+squeak) http://www.io.com/~jimm/projects/squeak_postgresql/ but I dont know anything about it. Hope that helps, Ron Teitelbaum President / Principal Software Engineer Really Geeky Guy US Medical Record Specialists [EMAIL PROTECTED] From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of cdrick Sent: Tuesday, May 09, 2006 11:08 AM To: A friendly place to get answers to even the most basic questions aboutSqueak. Subject: [Newbies] Postgress Database connection Hi again... I'm triing to connect to a remote postgres db without success... I've use several framework ***Jim-PostgresSql *** | client | client := PSQLClient new database: 'sup_prev'; user: 'web'. client establishConnection. client closeConnection. wich give an unknown message type $# (- a square - maybe an encoding problem ?? ) aBiteArray(14) in PSQLBackendMessage classreadFrom: with: ... class := FactoryClassDict at: id ifAbsent: [self error: 'unknown message type ', id printString, ' (', id asInteger printString, ')' ***After, I've tryed PostgresV2*** something like... ( with configuration done on the class side: buildDefaultConnectionArgs ) |conn| conn := PGConnection new. conn . conn startup. conn execute: 'select * from experiences'. conn terminate. ^ resultStream contents. I get an error saying connection not valid - isConnected returning false :s I probably missed something... ***After I tryied to use ODBC but without success too... :s I don't know the dns for postgres...*** Can anyone tell me wich tool(package) to use preferably with postgres ? because I'm a bit lost at the moment :). Also, if you see what are the problems in my connections attempts Thanks for all Cédrick ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] crossSum, an alternative implementation
Markus, That is beautiful! I started to do something similar but was trying to increase the size of the mod and it was dependent on the number of digits so I had to do a string conversion anyway. You did a very nice job! Ron -Original Message- From: [EMAIL PROTECTED] [mailto:beginners- [EMAIL PROTECTED] On Behalf Of Markus Gaelli Sent: Tuesday, May 09, 2006 6:44 PM To: beginners@lists.squeakfoundation.org Subject: [Newbies] crossSum, an alternative implementation Hi all, I just subscribed to the list and found that crossSum debate in the archives. I did an implementation a while ago for musinum, a fractal music generator, that can be found on squeakmap. (for a professional implementation see also http://reglos.de/musinum ) I did it this way: Integer crossSumBase: aBase self aBase ifTrue: [^ self]. ^ self \\ aBase + (self // aBase crossSumBase: aBase) Cheers, Markus ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
[Newbies] FW: how to set the cursor position in TextMorph
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Celal Ziftci Sent: Wednesday, May 10, 2006 10:50 AM To: [EMAIL PROTECTED] Subject: Re: how to set the cursor position in TextMorph Hi Frank, I think I'm getting the meaning of cursor wrong. So basicly what I want to do is the following. I want to set the caret position in the textmorph using some smalltalk code instead of using the mouse. As an example, assume I have the following text in a textmorph and | is the place my caret is currently at: smallt|alk Now I want to move the caret to another place like: sm|alltalk but not by clicking there, using some code instead. Is this possible at all? Do I need to imitate firing an event (something like mouse down event)? Thanks for any help. - Celal Ziftci - - - Hi Celal, Better to know is what do you want to do. The accessor cursorWrapped: work very well and brings the curosor of the TextMorph to the right position. The little example below is how I try to get the answer on your question. initialize the TextMorph karl := TextMorph new openInWorld. karl contents: 'here comes the mouse'. Show where the cursor is Transcript show: karl cursor;cr. result ==1 change the position of the cursor karl cursorWrapped: 6. Show where the cursor is Transcript show: karl cursor. result == 6 Cheers, Frank Original Message Subject: how to set the cursor position in TextMorph (09-Mai-2006 19:47) From:Celal Ziftci [EMAIL PROTECTED] To: [EMAIL PROTECTED] Hi, I am having problem in setting the cursor to a certain position in TextMorph. I am trying the cursorWrapped: message, but it seems to be not working (or I am misunderstanding its meaning). Any help or pointers would be appreciated. Thanks, - Celal Ziftci ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Is there something new coming after Morph?
Ok so I can't count! You know I started with three and kept adding on! :^) Ron -Original Message- From: [EMAIL PROTECTED] [mailto:beginners- [EMAIL PROTECTED] On Behalf Of Ron Teitelbaum Sent: Thursday, May 18, 2006 4:15 PM To: 'A friendly place to get answers to even the most basic questionsaboutSqueak.' Subject: RE: [Newbies] Is there something new coming after Morph? Hey Marcus, There are currently three things available for doing GUI, there is Morph, Tweak, MVC and wxWidgets. For the web there is seaside. I can't tell you much about morph, I've played with it some and although it's fun I dont consider myself expert enough to help. Take a look on the list archives about morph tutorials for more info: http://lists.squeakfoundation.org/pipermail/beginners/2006-May/thread.html Tweak is a major rewrite of Morph http://tweak.impara.de/ but it's not ready yet but it's worth looking at esp if it ends up being a major part of croquet http://www.opencroquet.org/index.html . Here's a nice piece about MVC http://www- static.cc.gatech.edu/classes/cs2390_98_fall/slides/ui/outline.htm l http://en.wikipedia.org/wiki/Model-view-controller is a nice explanation of MVC. I'm sure others could help with MVC demos. For wxSqueak see: http://www.wxsqueak.org/ And I suggest using http://wxglade.sourceforge.net/ for building the UI. For seaside which is a web continuations framework and UI builder see: http://www.seaside.st/ . Seaside is really cool! That's a lot of info so if you have questions feel free to ask. It's difficult to address the question what you should use. I believe that most Squeakers prefer Morph to MVC. There doesn't seem to be a consensus about if Tweak will replace Morph, Seaside is great for the web, and I like wxWidgets for native look and feel. Don't forget there are commercial products IBM's visualAge product, and Cincom's VisualWorks. The UI builder for VW is very nice I was very happy with how flexible it is, the UI for visualAge is a bit funky with some strange connectors but once you get it its very cool too. Some people swear by IBM's UI builder and the integration with Eclipse is a nice plus. But that's not Squeak so it's beyond your question. I hope that helps! Happy Coding, Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:beginners- [EMAIL PROTECTED] On Behalf Of Marcus Pedersén Sent: Thursday, May 18, 2006 2:48 PM To: Beginners@lists.squeakfoundation.org Subject: [Newbies] Is there something new coming after Morph? Hi! There is something I don't get the grip on after reading on the maillist. Is there a new GUI on it's way to replace Morph and originaly be inclused in the std image? In that case what is it called? Are there more intressting things to tell about it? Where to get more input? Many thanks! Marcus ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] playfield limit
Hi Sandy, I was hoping someone else that has more experience with eToys would answer your question. Since nobody spoke up I decided to try it for myself. I have to tell you it was a lot of fun! I did a few things that sort of worked so I thought I'd share with you what I did. The first thing I thought of was to limit the height of the ship by creating a script that said if you go above the top of the play field then set the Y coordinate to the top of the play field. This didn't work very well as I'm sure you found out. It was kinda fun in that when you get to the limit it does slow down, but right after it sets the ship to the top boundary, it increases the position by the ySpeed variable, so off the top it shoots. My next thought was to have some kind of escape velocity which would make it harder and harder to move past the top. This would have the effect of slowing down the ship before it reached the top. This was worked ok too, but allowed the ship to fall much too quickly once the acceleration was 0. I then thought maybe if we set the top to reset to the top minus the ySpeed then it would bounce off the top with bigger bounces the higher the acceleration is. This was ok but kinda annoying. I tried setting the ySpeed to 1 when the ship reached the top and this gave it a much more pleasing bounce. But it still has the same problem of loosing too much acceleration at the top and falling like a rock when you ease up. Try your own variations and feel free to let us know what you came up with. I'm interested. Maybe someone else can make some suggestions. For the bottom I recommend you create a blown up ship that displays if you hit the ground! Anyway I had fun!! I hope this helped some, Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists [EMAIL PROTECTED] From: Sandy Saline Sent: Tuesday, May 23, 2006 5:17 PM I built the Lunar Lander project from the squeakland.org website. Now I am trying to add some more functionality on my own. How do I force the rocket to stay within the playfield? I am guessing the solution involves obtrudes or bounce but so far my attempts have failed. Also, how do I put a background graphic inside the playfield? Thanks Sandy ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Smacc
Hi Math, I believe you are correct not all dependencies have been loaded. Try loading the Refactoring Browser and then try again. Ron -Original Message- From: [EMAIL PROTECTED] [mailto:beginners- [EMAIL PROTECTED] On Behalf Of mathieu Sent: Tuesday, May 30, 2006 9:58 AM To: A friendly place to get answers to even the most basic questions aboutSqueak. Subject: [Newbies] Smacc Hello, I'm playing :-) with SmaCC and I get an error. I think I have not perform all dependency. What should I do with this error: RBNamespace new- MessageNotUnderstood #new Thx Math __ _ Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire. http://fr.mail.yahoo.com ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Login procedure
The problem with not testing my code: Enginestart start the engine [self fuel notEmpty] whileTrue: [ movement := self fuel burnFuelWith: self spark ]. self transmission addMovement: movement Doesn't move until the gas runs out! :) So how about: Enginestart start the engine self spark turnOnElectricity. self engageStarter. self car isKeyInOnPosition whileTrue: [ self runEngine ]. EnginerunEngine run engine and pass movement to car self fuel notEmpty ifTrue: [ movement := self fuel burnFuelWith: self spark self transmission addMovement: movement ] ifFalse: [ self flashAnnoyingGasGuageLight. ]. Ok I realize I'm probably only amusing myself but just incase it helps someone I thought I'd point out my mistake! Happy coding! Ron From: Ron Teitelbaum Sent: Tuesday, June 06, 2006 9:43 AM Hi Marko, How are things in Finland? I hear it is nice there and there seems to be a bit of a marketing campaign to get Americans to visit. Anyway let's get to your question. There are a number of ways to pass variables around. The least effective way is to call methods with a lot of parameters. Usually when I see methods with lots of parameters there is a problem and the problem most likely is that the methods is implemented in the wrong class. Consider for a moment an example (since you asked for code examples) Object subclass: Car Object subclass: Engine Object subclass: Fuel Object subclass: Spark Now we all know that for engine it run it needs Fuel and Spark so we could model the car so that it has each Car instanceVariables: 'engine fuel spark' Then we have Carstart Start the car self engine startWithFuel: self fuel andSpark: self spark onCar: self EnginestartWithFuel: someFuel andSpark: someElectricity onCar: aCar run the engine [someFuel notEmpty] whileTrue: [ movement := someFuel burnFuelWith: someElectricity ]. aCar addMovement: movement CaraddMovement: someMovement handle the movement of the engine through a transmission self transmission handleMovement: someMovement Ok so now I'm just amusing myself and thinking of the car being in idle so not using the fuel to move at all, wasting gas and promoting global warming. Getting back to your question what would happen instead if we have the parameters modeled where they are needed. Ask yourself does the car need gas and fuel or does the engine need it instead? So Car instanceVariables: 'engine' Engine instanceVariables: 'fuel spark transmission car' Now when we build the objects we get much less parameter passing. Carstart start the car self engine start Enginestart start the engine [self fuel notEmpty] whileTrue: [ movement := self fuel burnFuelWith: self spark ]. self transmission addMovement: movement Now this was a long answer to your question and you may be sitting there saying; What does this have to do with databases and buttons! Well if you model your parameters in objects they don't need passing. TestDatabase instanceVariables: 'dataSource user password myDBConnection' Then your button's method #executeTest TestDatabaseexecuteTest self myDBConnection on: self dataSource logon: self user password: self password. Where dataSource can have host and port and dbname ... I hope this helps for specific examples you could try http://www.google.com/search?hl=enq=mysql+squeak If this doesn't make sense, feel free to ask questions. Let me know how it goes! Happy coding! Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists [EMAIL PROTECTED] From: Marko Koivuniemi Sent: Monday, June 05, 2006 4:14 PM Greetings from Finland. I am very excited about Squeak and SmallTalk - I have find myself trying and exploring new programming things and that hasn't happen since days of Commodore 64. Now I am trying to build (with one partner) a program which uses MySQL. I wonder what would be best way to do login screen and actual program. Now we have morphs in windows which has login and password fields and button. At this time idea is that this startup screen test login information and then sends user (or user id) to another screen. I tested various styles and this kind of test works with button. test := DatabaseTest new. loginbutton := MyButtonMorph new send: #executeTest to: test; openInHand. But what would be the best way to send many variables or values with button click. (I have couple TextFieldMorphs storing values) I have googled a lot - and most examples deals scriptable buttons. (And that is something I am not familiar
RE: [Newbies] Chess Object problem
Hi Kevin, I'm really glad you asked this question. Because I didn't and here is the response I got! The fix which is referenced above is actually the worst one of all of them (sorry to say that Ron ;-) since it not only uses the non-primitive version (bad for speed) but also adds to the allocation overhead by converting the byte array to a string. And unless I'm mistaken this alone will slow down the chess game by a factor of two (because this code is s heavily used in the game). I have actually sped up the whole game by a factor of four (no kidding!) by carefully avoiding allocations in the move generator. http://bugs.impara.de/view.php?id=1879 See the bug for the patch or the chess game is working fine in 3.9b. Now to your questions: 1) If this is a known problem with a known fix, how could I have discovered that? Go to www.squeak.org and look at the right side bar at the bottom. You will notice a Bug Reporting link. Go ahead and sign up to Mantis, you should also consider signing up at squeakPeople, and squeakSource. Once there you can query for bugs to see if the issues have been solved. If you are really looking for a solved issue then remember to clear the filter that filters out closed bugs. By querying for Chess on closed bugs you will find the one I reported. As you also found out asking on the squeak-dev or even here is a good way to know. For most of the current development you will find someone that knows. 2) Is there a way to save/update code from the debugger? (I made the change in the class browser.) Yes and you have to pause for a second to think about what a wonderful thing it is that changes can be made to a running system. **Pausing to reflect** Ok to change a method in the debugger right click and accept just like anywhere else. Amazing !! 3) If this is not a known problem, where/how do I make my fix available for everyone? The best thing to do is attach a change set or Monticello file, fileout or even just paste the code to the bug report and let who ever is the package maintainer look at your fix and decide if it's a good one. Ken will usually come along and assign the bug to someone. The package maintainer will work with someone to harvest the fix into the dev release. That all works in theory unless you mention this on Squeak-Dev. Then what you get is argument about who maintains what, is it an efficient system, why is there only one group responsible for harvesting, and we need more help doing the harvesting. Still that's my recommendation. Hope that helps and Great question, Happy coding, Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:beginners- [EMAIL PROTECTED] On Behalf Of Kevin Kingdon Sent: Wednesday, June 07, 2006 3:14 PM To: beginners@lists.squeakfoundation.org Subject: [Newbies] Chess Object problem I just downloaded the latest stable (3.8) version of squeak for Linux and for Windows. After a little exploration, I found the chess object. I dragged it to the desktop, but the first time I touched a piece, it threw an exception (smallIntegerasciiValue not understood). A couple of days later, after (re-)learning some Smalltalk, I found where a byte array was being passed to a String method that expected a String parameter. A small fix later (sending asString to the byte array) and the chess program seemed to be working. A few of questions: 1) If this is a known problem with a known fix, how could I have discovered that? 2) Is there a way to save/update code from the debugger? (I made the change in the class browser.) 3) If this is not a known problem, where/how do I make my fix available for everyone? Thanks, Kevin W. Kingdon ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] What was first: the chicken or the egg?
http://gagne.homedns.org/~tgagne/contrib/EarlyHistoryST.html hth, Ron Teitelbaum From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of ?? Sent: Tuesday, June 20, 2006 7:29 PM To: Beginners@lists.squeakfoundation.org Subject: [Newbies] What was first: the chicken or the egg? In Squeak, what was first: VM or image? It is said the Squeak VM is created by itself, but how to run the first image file? And how to creat the first image file? I wondered whether the VM C source code should be first created? Thanks. ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Newbieology
John, Wow, it sounds like what you are doing is very creative and a whole lot of fun. And it sounds like you are having a lot of success modeling the world the way you see it. This to me is the biggest step in learning object oriented programming. You are still writing scripts, but there is a whole world of objects behind what you are doing that if you keep trying to find out more, I can guarantee you will be very pleased with. There are a number of programmers that I've worked with that have really had a hard time understanding objects. They think in terms of processes and functions when what they really need to do is think of objects. Things like fish tank, water quality, food, air, fish waste ... With object oriented programming you can model each of these real life things as separate components that can really interact with each other. I'm impressed with what you understand intuitively. You are very lucky to have found a platform that can support what it is you are trying to accomplish, you will find that your ideas will not exceed the platforms capability. To your question: Are there any pre-built conditional loops I could use on my scripts? The if-then-else structure is fine, but a bit limiting. It's important that you understand that you are working with tile programming. The structures available to you as tiles are more limited then what you can do with a browser. There is a menu button on your script which will show you the code that the tile is generating, and learning how to navigate the regular squeak environment and figure out what the messages are doing would be your first step. I'm not sure you are interested in going that route so if you are, please let me know and I will tell you more. If you are comfortable with writing code in the script instead of using tiles then there are a number of more advanced control structures available, and I can help you with those if you like, please let me know. Also maybe someone that is more advanced in tile programming will help point you to other tile structures that I'm not aware of. Keep at it! Happy coding! Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists [EMAIL PROTECTED] From: John Kershaw Sent: Sunday, July 02, 2006 4:46 AM On 02/07/06, Ron Teitelbaum [EMAIL PROTECTED] wrote: How far did you get writing your own Etoy Tamagotchi's? For my own 'stay ahead of the kids' learning I modelled my own fish tank, based on my experiences of keeping fish for all of two months. What I've found (in real life) is that over-feeding has been the cause of most of my fishly 'deletions', so I tried to make 'water quality' the most important factor. In my 'simulation' uneaten food pollutes the water, and over-fed fish (heavier than 28g) pollute the water too. The fish's health is directly affected by the water quality. So... I was about to upload a copy of my file so you could see where I'm at... and found I didn't know where Squeak was storing its files. After some searching I found my squarium here: ~/Library/Preferences/Squeak/Internet/My Squeak/Squeaklets/aquarium16.001.pr Preferences should really only hold preferences - I don't know if anyone here can pass this on to the right people, but might I suggest that a better place for Squeak to store its user files would be something like: ~/Documents/My Squeak/aquarium16.001.pr Anyhow, I've uploaded my aquarium file to the school website: http://bradfordchristianschool.com/Squeakland - see 'Mr Kershaw's aquarium' near the bottom I also found some useful documentation links there - how ironic is that, since I created that page myself several weeks ago? Also I can't seem to get the mime-type correct in my .htaccess file. I've tried numerous variations on this theme, but to no avail: AddType application/x-squeak-object .pr so for now you'll have to download my fish and run them locally. Regards how far we've got with the kids' Tamagotchi's/pet shop animals, lesson one (last Friday) consisted of: 1. Draw your rabbit / guinea pig / snake / lizard 2. Create a 'thirst' variable. Drag its tile to below your pet. Set it to 0 3. Drag out a script, call it 'live' 4. Drag a 'thirst' assignment tile, set it to 'thirst, increase by, 1'. Start the ticker. Reduce to 1 execution per second 5. Add a test to the script: thirst 900. If yes, rotate pet by 90 I have this idea of getting a single pet 'maintainable' (if thirsty drink water if available, click water to replenish when empty) then creating siblings with slight random variations in drinking patterns, and having to keep a whole pet shop fed watered. Not sure how I'm going to get there, but that's half the fun of teaching, right - to stay ahead of the kids? ;) Are there any pre-built conditional loops I could use on my scripts? The if-then-else structure is fine, but a bit limiting. Any/all help appreciated, John
RE: [Newbies] API: Control Squaek by Excel
Hi Uwe, There are a number of ways that you can use to communicate with either Excel to Smalltalk or Smalltalk to Excel. The issue is really out of the huge number of options which one do you want to try? The best thing to do is to decide which things are important to you. Here are some things to consider: Will excel be talking to Smalltalk on the same machine? Will excel need to retrieve a response (is the communication two-way)? What are the performance requirements of your system? Does the conversation need to be sub-second or will minutes be ok? Will there be more then one client talking to Smalltalk at the same time? Is there a database involved between excel and Smalltalk (which could be the source of your communication also)? As an example of a really easy communication protocol you could simply define a text structure (say xml and then you could use SAX or DOM... :). Then on a Smalltalk instance you could have a separate process that polls for a text file to appear and then reads in the contents. Now all you have to do is get excel to write a file into a location that Smalltalk can read, which is easy to do. If you answer some of the questions maybe I can help more. Happy coding! Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists [EMAIL PROTECTED] From: Loew Uwe Sent: Monday, July 03, 2006 5:30 AM Hello community, Is it possible, to call a method of a Squeak class by another windows programm, e.g. Excel, via an API interface? Thank you very much. Best regards Uwe Loew Testsystems ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Q: Standard Lisps on the Squeak VM?
Hello Stéphane, Can you help to answer David's questions? Thanks for your help! Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:beginners- [EMAIL PROTECTED] On Behalf Of David Corking Sent: Monday, July 10, 2006 8:17 AM To: Beginners@lists.squeakfoundation.org Subject: [Newbies] Q: Standard Lisps on the Squeak VM? For a variety of reasons, I have a hunch that a Lisp would be a useful language for building Croquet worlds. So, I browsed the Squeak Map and saw several Lisp implementations for Squeak. While I appreciate that most of them are proof-of-concept experiments, one of them may prove useful for practical programming. If you have already looked at any of these Lisps, you may be able to help me choose which to investigate more deeply: Which of the Squeak Lisps came closest to implementing a standard Lisp (either R5RS Scheme or ANSI Common Lisp)? I have some extra questions as a postscript. -- David Corking p.s. 1. Are any of them Lisp compilers rather than straight interpreters? 2. Did any of them target the Squeak VM bytecode, rather than translate to full Smalltalk-80? 3. Are there any proprietary Lisps that run inside Smalltalk? ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Changing error message
! Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists [EMAIL PROTECTED] From: Serdar Sahin Sent: Thursday, August 03, 2006 5:38 AM Hi, Is it possible to change some error messages ? For example, if i get Error: At least one digit expected here error, i want to show my own error message. Is that possible ? Thanks, ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] error trap
Hi Davide, I just wrote up something like this for Sedar: http://lists.squeakfoundation.org/pipermail/beginners/2006-August/000701.htm l To answer your question directly the answer is yes and no. The easiest way to do what you want is to write your own handler for each line. Without doing that you would be counting on an implementation of the exception. Not all exceptions are resumable, and it would be difficult to know what value to resume with that would not cause the error. For example: [10/0. -5 raisedTo: 1.5. 2 raisedToInteger: 1/2. ] on: Exception do: [:ex | Transcript show: ex; cr. ex resume: 1]. Look at the exception ZeroDivide and notice that it is written to be resumable whereas the others are not. So resume: 1 works for ZeroDivide and not for the others. You could use ifError: on BlockContext for each line to do what you want. [10/0] ifError: [:ex | Transcript cr; show: ex.]. [ -5 raisedTo: 1.5] ifError: [:ex | Transcript cr; show: ex.]. [ 2 raisedToInteger: 1/2] ifError: [:ex | Transcript cr; show: ex.] If you don't like the amount of extra text on each line you could implement your behavior on BlockContext (don't tell anyone I said to do this). BlockContext protect evaluate the block and print the exception in the transcript if there is an error self ifError: [:ex | Transcript cr; show: ex.]. then you could use: [10/0] protect. [ -5 raisedTo: 1.5] protect. [ 2 raisedToInteger: 1/2] protect. Notice that this: [10/0. -5 raisedTo: 1.5. 2 raisedToInteger: 1/2] protect. Still doesn't work since the block exits on the first error. The proper way to do this would be to write your own class to extend BlockContext instead of changing BlockContext itself. ProtectBlock class evaluate: aBlock evaluate the block and print the exception in the transcript if there is an error aBlock ifError: [:ex | Transcript cr; show: ex.]. But then you have more writing and clutter, but it is more proper since you are not cluttering up BlockContext with your transcript print code. ProtectBlock evaluate: [10/0]. ProtectBlock evaluate: [-5 raisedTo: 1.5]. ProtectBlock evaluate: [ 2 raisedToInteger: 1/2]. Hope that helps some, Happy coding! Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:beginners- [EMAIL PROTECTED] On Behalf Of Davide Arrigo Sent: Wednesday, August 09, 2006 9:54 AM To: beginners@lists.squeakfoundation.org Subject: [Newbies] error trap hi guys, I want to implement an error trap in Squeak, something like on error goto: in other languages. When a method encounter an error during execution of a block of code (an error like: square root or logarithm of a negative numbers, division by zero and so on..) I want only a message, send to Transcript, without any dialog box ask to me if I want to proceed, stop or debug. I wouldn't halt the program but always proceed automatically with the next block of code evaluation. Is it possible? Thanks in advance. -- --- Davide Arrigo ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Re: Re: error trap
From: Klaus D. Witzel On Wed, 09 Aug 2006 21:11:40 +0200, Ron Teitelbaum wrote: Brian, Yes I agree it's a great suggestion, although a few changes: Literal blocks to not parse into collections automatically. Ron, please: a literal Array is a subclass of Collection and so the blocks in { [nil]. [true]. [false] } Learn something every day! parse into collections automatically. You didn't inspectIt for verifying your (false) claim, didn't you. No I didn't! The { } just looked so wrong and like C! I'm used to #() which of course doesn't work. Also, have a look at the implementors of #caseOf: and #caseOf:otherwise:, they are heavy users of literal blocks in Collections ... I will! ... Each in this case is already a block. Yes. And, into the other direction, even in good core methods one often finds things like ^ dict at: aKey ifAbsent: [nil] I started to write this too but thought about some of the errors that people receive about wrong form of block and didn't want to scare people. There seems to be a natural confusion between object value and block value. Not a big surprise since Java and other procedural-oriented friends do not offer block values. So any demo of using blocks as if they where any other object, as Brian has shown, is a sign for the ability to master the subject 8-) Only each is needed. Absolutely. So here is a version that works. (OrderedCollection new add: [10/0]; add: [2 raisedToInteger: 1/2]; add: [-5 raisedTo: 1.5]; yourself ) do: [:each | each on: Exception do: [:ex | Transcript show: ex; cr; endEntry]]. endEntry is for Klaus! Hhm, endEntry is too expensive within any and every loop. Just put Transcript endEntry after the loop. I mentioned endEntry because Transcript almost always does not display the last lines (they are buffered) and people get confused and believe that either their code or Squeak is wrong (but both is not the case). It is a very good suggestion Brian! Indeed, and Briant's use of literal blocks in a literal Array is perfect (in the sense of: cannot be made better). Thanks for your correction Klaus! With programming always keep an open mind, there is lots more to learn! Ron ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Re: license
Hi Esteban, Check out wxSqueak which uses wxWidgets. http://www.wxsqueak.org/ You should consider using Glade to build your interface: http://wxglade.sourceforge.net/ You already know about seaside. Hope that helps! Ron Teitelbaum -Original Message- From: [EMAIL PROTECTED] [mailto:beginners- [EMAIL PROTECTED] On Behalf Of Esteban Robles Luna Sent: Tuesday, August 15, 2006 8:42 PM To: A friendly place to get answers to even the most basic questions aboutSqueak. Subject: Re: [Newbies] Re: license Thanks for the reply. The only problem I found with squeak is that morphic system is far away from what a user expect a UI to be. Is there any chance of implement a MVC with look and feel? I have seen that you can create a MVC project, but widgets are not like OS widgets. Another question I have is which is the class that setup the environment. The one who creates the main window. Esteban On 8/15/06, Chiara [EMAIL PROTECTED] wrote: Basically the point is that if you improve the system you should normally give it to the community but nobody will check your harddisk. However if you fix something and help improving squeak then the next time it will be fixed and better :) Ok, don't worry if I do any usefull tool it will apear in any repository :). thakns. -- Saludos Chiara Peace cannot be kept by force; it can only be achieved by understanding. Albert Einstein ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners -- Saludos Esteban ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] HTTPSocket class - getting to the instance
Hi Andy, Take a look at the method: HTTPSocket class httpGetDocument: url args: args accept: mimeType request: requestString Go about half way down after it has parsed the URL. Start at: HTTPSocket new. You too can get an instance of HTTPSocket but issuing new. Hope that helps! Happy coding. Ron Teitelbaum From: [EMAIL PROTECTED] Sent: Thursday, August 24, 2006 11:59 AM First, Smalltalk is just amazing! I am so impressed with what it is possible to do - with practically no knowledge! Second. Due to my lack of knowledge I am now stuck ;-) I am still working on the problem of building a Smalltalk version of Wget. I have used the HTTPClient as my basic object and that is doing most of what I want. However, I can't get to the HTTP Headers. I noticed that HTTPSocket does seem to offer the headers but this is where I get stuck. The creation methods of HTTPSocket (i.e. telling it which url to go to) seem to only exist on the class side. But the methods for getting to headers etc only exist in the instance. I can't work out how to create an instance of the socket and tell it which url to go to. All the construction methods just seem to return the class. Obviously I am missing something pretty basic. Could someone please enlighten me? TVM AB ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] How to know where a BlockClosure finish
Ok how about: aBlock := [completed := true. Some code Some condition ifTrue: [completed := false. ^completed-someValue]. completed-someValue]. Now result := aBlock value. blockCompleted := result key. blockResult := result value. Ron -Original Message- From: [EMAIL PROTECTED] [mailto:beginners- [EMAIL PROTECTED] On Behalf Of Mathieu Sent: Friday, August 25, 2006 8:06 PM To: A friendly place to get answers to even the most basic questions aboutSqueak. Subject: Re: [Newbies] How to know where a BlockClosure finish Ron Teitelbaum a écrit : Hi Math, How about just adding a parameter? Blocks are really cool in that they can import context if needed. This is a really amazing feature of blocks for me since the imported context is the context when the block was created! So to solve your problem you could just do the following. continue := true. block1 := [someCode. someCondition ifTrue: [continue := false. ^someValue]]. block2 := [someCode]. Then: block1 value. continue ifTrue: [ block2 value ]. Hope that helps! Happy coding. Thanks Ron but in fact it's in a context that we don't know where are the return and we also don't know how many block we have. :) Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists [EMAIL PROTECTED] From: Mathieu Sent: Friday, August 25, 2006 1:10 PM Marcus Denker a écrit : On 25.08.2006, at 17:14, Mathieu wrote: Hi, I want to execute several block: block1 value block2 value block3 value but if one block return from a retrun statement I want to quit. [^3] - want to quit here [3 + 4] So is there a way to know when a block evaluation finish by a return? There is #hasMethodReturn in BlockContext: [^3] hasMethodReturn -- true [3] hasMethodReturn -- false. But this does a static analysis of the code... even if the ^is not executed (e.g.) [nil ifNotNil: [^3]] hasMethodReturn -- true so... it would be harder to analyze that dynamically... e.g. (without me thinking to much) you could add code (e.g. using ByteSurgeon) in front of the return inside a block to set a flag... but I have to admit that this woud be quite strange stuff... I need this to interprete a file containing smalltalk and I want to control the execution beceause I need to add some condition befor evaluate a block. Why do you need that? I am sure we can find a simple solution if we understand the problem better. Marcus Yes you are right In the script I have 2 kind of things: [ some Smalltalk ] And: Class selector [ some smalltalk ] So my idea was to call Compiler#evaluate:in:to:notifying:ifFail:logged: on the string inside the [] for the first things. And for the second I don't know yet but I don't think it's a probleme. So I evaluate the block one by one. I don't think I can put them all together beceause we can declare new method and use it in the next block. But may be I shouln't evaluate right now juste store them in a CompiledMethod... Math ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] yourself
Hi Bakki, yourself is used quite often for chaining messages. Long chains are definitely bad form but in some cases you are stuck without having yourself. Take for example aCollection add: 'hello' When you first encounter this message many people make the mistake of believing that add: returns a collection. You will see bugs created in this way. For example someone might write THIS CODE DOES NOT WORK aCollection := aCollection add: 'hello'. Since after running this code what you get is aCollection = 'hello'. (Forget that the assignment isn't even necessary for the moment since aCollection is changed with add, you will still see this). The result is not what you would expect. To fix this you do: THIS CODE DOES WORK aCollection := aCollection add: 'hello'; yourself. This basically returns the self of the previous message instead of the value that is returned from the previous message. Also consider this MyClass class createFrom: anOtherObject return to the sender an instance of the receiver setting anOtherObject to someOtherObject ^(MyClass new) someOtherObject: anOtherObject if the mutator returns self you are ok if not this will not work. It usually does, but other methods may not for example: MyClass class createFrom: anOtherObject return to the sender a processed instance of the receiver setting anOtherObject to someOtherObject ^(MyClass new) someOtherObject: anOtherObject; processResult if processResult sets a value on the object and returns the result then you are stuck. Fix it with yourself. MyClass class createFrom: anOtherObject return to the sender a processed instance of the receiver setting anOtherObject to someOtherObject ^(MyClass new) someOtherObject: anOtherObject; processResult; yourself. Hope that helps! Happy Coding Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:beginners- [EMAIL PROTECTED] On Behalf Of Bakki Kudva Sent: Thursday, August 31, 2006 11:36 AM To: A friendly place to get answers to even the most basic questions aboutSqueak. Subject: [Newbies] yourself Hi, I'm a bit confused about y ourself. I understand that the definition of yourself is ^self But when I browse Object and look at yourself: all I find is the description string.. Answer self. What happened to ^self? Where is the actual code implementing this? Thanks, bakki ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
[Newbies] RE: [QUIZ] Happy Numbers (#93)
Hey Markus, I can't resist a good puzzle. Please not too many, I won't get any work done! So here is my entry. What is most interesting about this problem was not the programming. I did that pretty fast it was the optimization that is really interesting. What I noticed was that digit order and zeros have no effect. I figured I could hold onto the sortedDigits results and significantly reduce the amount of data that I needed to hold. It worked fine but it turned out to be much slower! It's amazing to me that holding onto hundreds of thousands of associations turned out to be faster then 296. I didn't spend much time to figure out why, but I guess it's adding the sorting that took so long, and the speed of the dictionary lookup was just fine with hundreds of thousands of objects! Who knew! The class can process 1 million numbers for happiness in 5 mins. Ron Teitelbaum From: Markus Gaelli Sent: Friday, September 01, 2006 9:35 AM -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- =-=-=-=-=-=-= by Shane Emmons Write a program that tells whether a given integer is happy. A happy number is found using the following process: Take the sum of the squares of its digits, and continue iterating this process until it yields 1, or produces an infinite loop. For example the number 7: 7^2 = 49 4^2 + 9^2 = 97 9^2 + 7^2 = 130 1^2 + 3^2 + 0^2 = 10 1^2 + 0^2 = 1 If a number is not happy than it is obviously unhappy. Now that you have this program, what is the largest happy number you can find? What is the happiest number between 1 and 1,000,000. I define the happiest number as the smallest number that finds the most other happy numbers with it, i.e. 7 found four other numbers (49, 97, 130, and 10) making it a rank 4 in happiness. If you find all these examples trivial, write you program so that it will find happy numbers in other bases such as base 2 or 16. From there you can extend the program so that it finds happy bases (other than 2 and 4). A happy bases is a base where all numbers are happy. Good luck. from http://www.rubyquiz.com/ Nice. Any takers for this one? I really like the idea of quizzes. I think we should have sth. similar for Squeak and Squeakland also. Or just collect our answers ... Cheers, Markus HappyNumber.st Description: Binary data ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Andy Burnett is out of the office.
Ih, Cixelsyd eb yam ydna sseug i. Thgir eb thgim ti os emas eht era syad eht hguohtla. Nor From: Mike Pence Sent: Saturday, September 02, 2006 1:59 PM My kind of vacation! On 9/2/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I will be out of the office starting 01/09/2006 and will not return until 10/09/2006. ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Andy Burnett is out of the office.
That's funny. I missed that. Ron From: Keith McKay Sent: Saturday, September 02, 2006 7:03 PM For our cousins across the pond... The date format in the UK is DD/MM/. The email address of Andy Burnet is for a UK company. Keith Hamilton, Scotland ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Monticello -- where is it?
Hello Aleksej, I think it is a very good question. I would encourage all newbies to start with Monticello and learn about how to organize their work before starting of to change the world. There are a few things to understand about Monticello first. The most important thing about Monticello is that it is a code version manager. It's job is to store versions, retrieve the latest version, find conflicts (when two programmers change the same source), and to show history and code branches. What it does not do is organize your code, solve conflicts (thought it does provide tools for you to do it), save your code for you (don't laugh ENVY does!), or replace proper workflow. There are different types of repositories. For this discussion let's just talk about package-cache and http. Package-cache is created for you and is updated when you load new packages, (like from squeakmap), or automatically when you save Monticello packages. It is file based and you can find it in your squeak directory on your computer. Http repositories are like www.squeaksource.com . It is a shared area where you can define projects, store your code, share it with others if you want and post to squeakmap. How-to! On the world menu select open.. Monticello browser. This opens up the Monticello browser. What you will see is packages that are already added to your browser. There are many packages added by default. For each package on the left you will see repositories on the right. Packages can be in multiple repositories. If you think of code branches this makes sense. To add a package from an Http repository you should unclick the package on the left, then press the +Repository button. Now select the Http type repository. This brings up a string that looks like this: MCHttpRepository location: 'http://foo.com/bar' user: 'squeak' password: 'squeak' you should replace the foo.com/bar with the repository you are interested in. For example MCHttpRepository location: 'http://www.squeaksource.com/Cryptography' user: '' password: '' if you have a user name and password on squeaksource then you can add them to the string. After accepting your new repository definition you can hit the open button. This will show you packages that live inside the repository. In the repository browser you will see packages on the left and version on the right. You can select one of the package versions and browse it, or view a history, or see changes, or load it, and other things too but that's a good starting point. When you are make a change to a package, back on the regular Monticello browser you will see an asterisk (*) before the package name. If you want to update the repository with your new version, you need to save it. Select the package and the repository you want to save too and press save. You should always type in some notes as to what change you made then accept it. There is more, like working in a clean image, upgrading images, using Monticello configurations, running your own squeaksource image, version numbering, or how to handle conflicts. There is good documentation about these things available on-line but we could talk about those if anyone is interested. Hope that helps, Happy coding Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:beginners- [EMAIL PROTECTED] On Behalf Of Aleksej Sent: Tuesday, September 12, 2006 12:08 PM To: [EMAIL PROTECTED] Subject: [Newbies] Monticello -- where is it? Hello May be a silly question. The are about hundred classes in Monticello-xxx categories. But how to use it? What is Monticello browser and how to run it? Good luck. Aleksej ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Re: firewall question -- htaccess authentication @proxy-server/firewall
Hi Dave, Can you post a link to what you found? Maybe the link will help others! Ron From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Raymer Sent: Thursday, September 14, 2006 9:49 AM To: Beginners@lists.squeakfoundation.org Subject: [Newbies] Re: firewall question -- htaccess authentication @proxy-server/firewall please disregard -- I changed my search parameters and saw a post that referenced a fix provided by David Faught. I hacked my local image et voila ... apologies and thanks. On 9/14/06, Dave Raymer [EMAIL PROTECTED] wrote: Gentlebeings, Using Squeak3.8-6665full.image I've been tryting to get this to work for three days now without success [htaccess authentication] -- I've looked at all the posts I can find in various mail archives and I've looked at all the web pages. Basically, I need to get FTP and HTTP running through the corporate firewall/proxy that requires htaccess authentication. Is there a patch to make this work? thanks, - dave ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Re: firewall question -- htaccess [EMAIL PROTECTED]/firewall
Apologies for not posting this information the first time. Not at all thanks for posting it! Ron From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Raymer Sent: Thursday, September 14, 2006 11:22 AM To: [EMAIL PROTECTED]; A friendly place to get answers to even the most basic questions aboutSqueak. Subject: Re: [Newbies] Re: firewall question -- htaccess [EMAIL PROTECTED]/firewall http://lists.squeakfoundation.org/pipermail/squeak-dev/2005-April/091022.html For those who aren't comfortable hacking smalltalk -- doing the fix is quite easy. Open a browser Select the Network-Protocols package Select HTTPSocket from Network-Protocols Select class goto httpGetDocument:args:accept:request: find the line of code that reads -- HTTPBlabEmail, may be empty immediately above the line of code mentioned in 6, add -- HTTProxyCredentials, (that comma required) [and a comment is always good practice] Everything should work from there. Apologies for not posting this information the first time. -- dave On 9/14/06, Ron Teitelbaum [EMAIL PROTECTED] wrote: Hi Dave, Can you post a link to what you found? Maybe the link will help others! Ron From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Dave Raymer Sent: Thursday, September 14, 2006 9:49 AM To: Beginners@lists.squeakfoundation.org Subject: [Newbies] Re: firewall question -- htaccess authentication @proxy-server/firewall please disregard -- I changed my search parameters and saw a post that referenced a fix provided by David Faught. I hacked my local image et voila ... apologies and thanks. On 9/14/06, Dave Raymer [EMAIL PROTECTED] wrote: Gentlebeings, Using Squeak3.8-6665full.image I've been tryting to get this to work for three days now without success [htaccess authentication] -- I've looked at all the posts I can find in various mail archives and I've looked at all the web pages. Basically, I need to get FTP and HTTP running through the corporate firewall/proxy that requires htaccess authentication. Is there a patch to make this work? thanks, - dave ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] How do I embed GIFs in a change-set?
Hi Ken, The thing to remember is that files are just collections of bits. You can take the bits and convert them to a compact string, then expand that string when you need it to create a new file. The compact string can be placed in a method and saved as part of a change set. The main issue with GIF is that you need to change the stream to binary. Here is an example from seaside: seasideBanner This is a copy of http://www.netstyle.ch/include/seaside/pics/top.jpg; ((( | mimeDoc | mimeDoc _ 'http://www.netstyle.ch/include/seaside/pics/top.jpg' asUrl retrieveContents. Clipboard clipboardText: (Base64MimeConverter mimeEncode: mimeDoc content readStream) contents ))) ^self base64Decode: '/9j/4AAQSkZJRgABAQAAAQABAAD/2wB [...snip...] BPpS0UAABRRRQAAABRRRQAAF FFFABRRRQB//2Q==' base64Decode: aString ^ (Base64MimeConverter mimeDecodeToChars: aString readStream) contents You can see in the comments of the seasideBanner how then got the string to store. I had to change the code some and wrote a retrieveBinaryContents for 3.9. You just need to send the message binary to the stream to convert it to a binary stream. If you need a more detailed explanation please let me know. Hope that helps! Ron Teitelbaum From: Ken Dickey Sent: Tuesday, October 03, 2006 11:35 AM Greetings, I have updates a morphic based FreeCell card game I did a few years ago to 3.8. I would like to put in into SqueakMap (or wherever) but the changeset file-in requires a directory of GIFs (the card images) to be in the working directory for import into the image. What is the best way to do this? Thanks much, -KenD PS: please CC replies to [EMAIL PROTECTED] as I am not subscribed to this list. ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
[Newbies] [ANN] Squeak Cryptography Certification Validation Officer
All, We are very pleased to announce the addition of a new team member. Krishna Sankar is joining our team as the new Squeak Cryptography Certification Validation Officer. The goal of this position is to set a path for the cryptography team to ensure that the Squeak Cryptography code meets the FIPS common criteria http://niap.bahialab.com/cc-scheme/cc_docs/index.cfm which a first step on the path to FIPS certification. Krishna has a distinguished security background, has worked with a number of government standards, has lead a workshop for Cisco on NIST PKI http://middleware.internet2.edu/pki04/ , is a lead author for Cisco Press WLAN Security book - http://www.ciscopress.com/authors/bio.asp?a=9ed11cfa-9067-4205-8110-76358f31 7825rl=1 , and also contributes to OLPC. We are very excited to have Krishna join our efforts. We are still searching for volunteers. I would like to encourage anyone that is even remotely interested in cryptography to join our efforts. This is the perfect time for you to join the group http://lists.squeakfoundation.org/mailman/listinfo/cryptography . If you need cryptography in your applications, working on our common criteria validation effort will help you learn about cryptography and will teach you about the common criteria process so that you can apply what you learn to your own application. We are working to divide the tasks into manageable chunks so that individual developers can pick up a single piece and contribute. We are organizing the effort so that we can track, validate and get proper feedback as to our progress. We have no deadline, only a path to follow. Please help me welcome Krishna Sankar, Ron Teitelbaum Squeak Cryptography Team Leader President / Principal Software Engineer US Medical Record Specialists [EMAIL PROTECTED] ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Question about inheritance
Hi Dennis, I don't think I've seen you on this list so welcome! I think your question is a very good one. I read the other responses you received and they are very good. I thought I'd give you a practical example of what is called a factory pattern to explain why this is so important and how it works. A factory pattern is basically a pattern that decides what class to build and gives it back to you. In other words you send it off to the factory method and it builds an instance of the class that you need. Ok so now an example: Person classnewForAge: anAge Instantiate and return to the sender the class that is appropriate for anAge aClass := Person subclasses detect: [:aClass | aClass ageRange includes: anAge] ifNone: [self error: 'Age Range for: ', anAge asString, ' is not defined in subclasses of person]. ^aClass createWithAge: anAge Ok so that is the factory. It says go through my subclasses and find one that matches anAge then create an instance of that class with that age. To make this work we need classes and ageRanges so we create subclasses of Person Person subclass: SeniorPerson Person subclass: AdultPerson Person subclass: MinorPerson Now age ranges SeniorPerson class ageRange ^NumericRange from: 65 to: 999 AdultPerson class ageRange ^NumericRange from: 21 to: 65 MinorPerson class ageRange ^NumericRange from: 0 to 21 (Ok so there is no NumericRange, I looked but didn't find one but you can build it yourself. You just need to implement #includes: aNumber in it) Ok so now here comes the part that answers your question. Say there is code that you want run on all of these classes, do you implement the code on each subclass? Is there some way to write the code on the superclass so that it can be in just one place? The answer is yes! You can put the code on the superclass. Person createWithAge: anAge ^self new age: anAge; yourself This might look strange but look at what it is doing. It creates an instance and sets the age, which since you would define the value age on the superclass Person and not on each subclass this makes sense. Now how can we use this method to create a subclass? Like this: Senior class createWithAge: anAge Return to the sender an instance of Senior with anAge set ^super createWithAge: anAge Now look closely. What this says is run the method createWithImage: anAge of the superclass for me (Senior class). When the method executes self on person = Senior class. Try debugging the method and see. You could use this to further specialize the object. Senior class createWithAge: anAge return to the sender an instance of the receiver | aSenior | aSenior := super createWithAge: anAge. set Senior specific values aSenior seniorDiscount: (self seniorDiscountForAge: anAge). ^aSenior So you can see super really means run a superclass method on the class or instance that calls it. The self of the method that is called is the instance or class that called it. I hope that helped, if not please say so, Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists [EMAIL PROTECTED] From: dennis petrocelli Sent: Friday, October 13, 2006 9:57 AM Greetings smalltalkers, I'm a newbie trying to get my head around inheritance. I'm puzzled by the following example. It seems to do what I mean, but not what I type ;) This is a good thing, but I'd get further if I understood the semantics a bit better. from http://www.cosc.canterbury.ac.nz/wolfgang.kreutzer/cosc205/smalltalk1.html Class: Monster Superclass: Object Category: Sesame Street Instance variables: colour tummy initialization initialize self colour: #green. self tummy: Bag new There is only a single class method and no class variables. creation new ^ super new initialize What I don't understand is this: Monster new returns an instance of Monster, what you'd want it to. But Monster new executes ^ super new which to my mind should return an instance of Object, not Monster. Just to confuse myself further, I typed: Monster superclass new and got an Object. It seems to me that super new and superclass new should do the same thing. Any points to clarify my confusion would be greatly appreciated. Thanks, Dennis Petrocelli Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail. ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
[Newbies] KeyPress On World of Squeak Wonderland (was: Disappointed)
Hi Jeff, Welcome to the beginners list! I appreciate the fact that you are sticking with the problem. That in my opinion is the best way to learn. I didnt answer your question because I do not feel that I am an expert in Wonderland. If the question was something like how can I map a key to so some action that is pretty easy, IF that action is an isolated easily called method. Something like: Utilities garbageCollectAndReport. This is a class method and there is no instance that needs to be sent to. If a key stroke needs to be captured and affect a running instance it is a bit more difficult to do but still very possible. The issue here is that there is a complicated event loop that needs to be tapped into but this would be very difficult to explain to someone with limited experience. The fact that you are using wonderland means that there is probably already a hook to do what you want so a complicated explanation of what I know will probably only confuse the matter and make things more difficult for you. There are people on this list that have much more experience with Wonderland, but nobody that will answer your question within hours. I would love to have Squeak be much more a pleasant experience for you. My suggestion is that you start slower and work on understanding basic concepts of Squeak. Do more tutorials; look into how some things work before trying to extend them. Also a comment, starting with the assumption that people are not going to help you is discouraging to people who might. People are more likely to help people that work hard themselves and will benefit from the help and will appreciate that help. I think you have the work hard part down. You need to be a bit more appreciative of the effort and time that goes into helping you. Now to your question: Matthias was right and he sent you to exactly the place you needed to go. I just loaded a 3.8 image and did the helicopter tutorial. I have to say it was great fun! Wonderland is a very nice piece of code and I can see that it would be fun to play with. The tutorial is fun but the concepts are not easy and how the authors did what they did is very clever but also difficult especially when you venture off the beaten path. You picked a hard place to start! That by itself can be very frustrating. Here is your answer but the answer is not perfect. What I noticed is that the keys only have focus when the actor is under the mouse. There may be a way to make this work in the context of a world but I couldnt get it to work that way. The world does not appear to have a reactions collection, but there does seem to be a little hook in Scene that might have been intended to work that way. Again this is an advanced concept. I also tried adding a reaction to the ground to make it easier for this to work. The ground accepted the reaction but did not act on it. I added a reaction of [:event | self halt] but that did nothing so maybe background items like ground and sky dont quite work or dont respond to certain reactions the way other actors do. It makes sense that Wonderland might be written this way. If you added a right key press to multiple objects how is it supposed to know which item the key press should control. There could be a number of ways to fix this like adding an actor that is a control stick or something, then placing the mouse over the control stick would work the helicopter. (just a suggestion of where you might go from here) Ok so here is the code: helicopter addResponse: [:event | event getMorphicEvent keyString = 'left' ifTrue: [helicopter move: #left]. event getMorphicEvent keyString = 'right' ifTrue: [helicopter move: #right]. ] to: #keyPress I hope that helps, welcome to the list and Happy coding, Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists [EMAIL PROTECTED] From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeff Sent: Wednesday, November 08, 2006 12:28 AM To: beginners@lists.squeakfoundation.org Subject: [Newbies] Disappointed I'm pretty disappointed with this list at the moment. My last post, beginners questions talked about how beginners often don't get their questions answered and pointed out that often when the experts see that an answer, ANY answer, was given they then assume the question was answered, so they don't offer anything more. Now I do appreciate Matthias's honest attempt to answer the question, so I don't want this to be misconstrued as an attack on him. But he obviously misread it. And, well, once people saw that the question of how to make a wonderland actor move in response to mouse clicks had been answered, I didn't get any more help. The question I asked was how to move a wonderland actor with the arrow keys, and I need to do that without the actor having the focus. Unfortunately, since it's been taking so many hours for the messages I've tried to send to get posted on here, (I
RE: [Newbies] squeak and the jvm
Hi Michael, There are some really talented people doing some of this now. See: http://lists.squeakfoundation.org/pipermail/squeak-dev/2006-September/108634 .html But what is even more exciting to me is the Strongtalk VM. The guys that wrote the Java VM first wrote Strongtalk. Sun shelved it but recently released the VM as Open Source. What I would like to see is a Strongtalk VM for Squeak! http://lists.squeakfoundation.org/pipermail/squeak-dev/2006-September/108247 .html Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists [EMAIL PROTECTED] -Original Message- From: Michael Kohout Sent: Wednesday, November 08, 2006 10:56 AM I suppose this is more of a pie in the sky type question, but with the changes coming to the Java virtual machine in version 7, where the jvm itself provides a more message oriented opcode, has any consideration gone into perhaps porting squeak to run on the jvm? I'm aware of talks2 but it seems as if development on that effort(based on the public releases/news) is at a standstill. thanks Mike Kohout ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] How to squeeze Multiple Inheritance into Squeak ?
There are some lightweight ways of handling this using roles. Person instanceVariables: roles aPerson roles add: Human new; add: Ninja new. There are a number of roles implementations. One based on doesNotUnderstand which runs through the roles collection and passes the called but not understandable message to each instance. Some implementations will return a collection of responses if multiple roles answer the same message, and this can get kinda tricky if you dont know how to watch for it. You can also define a specific interface to your methods by specifically implementing your methods on Person to look for a role before forwarding the method and handling the call if it does not. For Example: Person killSilently aPerson hasNinjaRole ifTrue: [^self ninjaRole killSilently]. aPerson hasHumanRole ifTrue: [^self humanRole killSilently]. aPerson handleKillingRequestWithMoreSleepAndExercise. Ninja killSilently walk on rice paper leaving no trace then you will be ready self doSilentKilling Human killSilently humanity wins self tryToKill. self goToPoliceStation. self confess. Im not saying I like roles. I just thought Id mention more options. Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists [EMAIL PROTECTED] From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Gorsuch Sent: Monday, November 13, 2006 3:56 PM To: A friendly place to get answers to even the most basic questions aboutSqueak. Subject: Re: [Newbies] How to squeeze Multiple Inheritance into Squeak ? Here's an idea: I have a Person class, but I need him to inherit traits that the Human class has and the Ninja class has. Is that sufficient? On 11/13/06, Michael Haupt [EMAIL PROTECTED] wrote: Hi Warakom, On 11/13/06, Warakorn Paphrawat [EMAIL PROTECTED] wrote: Sadly enough the possibility of Multiple Inheritance in Squeak would greatly benefit me in my current Squeak project ? what exactly is the characteristic in your project that imposes this requirement on it? Why do you need multiple inheritance? What would you use it for? I'd recomment looking at traits first, but without knowing what exactly you are trying to achieve, I cannot say much more. :-) Best, Michael ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] I've just introduced some 9th graders to Squeak
You might want to look at Scratch too. Scratch is written in Squeak. Although it is not intended to teach programming in Smalltalk or Squeak, it does teach general programming concepts very well. Plus it's really fun! http://weeklysqueak.wordpress.com/2007/01/23/scratching-the-surface/ Ron Teitelbaum -Original Message- From: [EMAIL PROTECTED] [mailto:beginners- [EMAIL PROTECTED] On Behalf Of Brad Fuller Sent: Thursday, January 25, 2007 11:34 AM To: A friendly place to get answers to even the most basic questions aboutSqueak. Subject: Re: [Newbies] I've just introduced some 9th graders to Squeak Russ wrote: Hello. This is my first post to the beginners list. I've been a perpetual beginner since I first found out about Squeak over ten years ago ( can it really be that long ? at least somewhere at the beginning of ver. 1.x ) . Anyway, I'm not a programmer, I'm a musician and an explorer, and currently, a substitute teacher - teaching 9th graders (gifted ones at that) computer skills. Today I introduced them to Squeak ! It went really well. First I talked about smalltalk, had them type in the Transcript show: 'Hello World'. program in a workspace, and I'm sure that bored them plenty. But I did not miss a beat. I next introduced them to the morphs - the bouncing atoms and the blobs , etc.. and they were HOOKED ! 80 Kids now know about Squeak. Now what ? What should I do with Squeak and my 9th graders that will thrill them further ? Ideas ? What do you want to teach them? That could provide us with more direction to help. Some ideas: * Have you looked at the projects on squeakland.org? * Although it's a bit young for 9th graders, have you looked at the book Powerful Ideas in the Classroom by B.J. Allen-Conn and Kim Rose? * Check out this video: future_software_development_series.kay-alan.lecture.2003-04- 24.102656947.wmv at this location: http://ftp.squeak.org/Media/AlanKay/ Go to near the end and see Alan's demo of what other kids have done in squeak. It's a bit more advanced than the book, so it might fit in better for their age. -- brad fuller www.bradfuller.com ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] virtual chemistry
Hi Chuck, Boy did you come to the right place. The short answer to your questions is yes. The long answer is how difficult it will be depends on what exactly you want to do. It is possible to add in a lot of information about molecules and atoms. You could put all the rules that are known about chemistry and physics and create a world that actually predicts chemical reactions. There is a lot of work in proteomics that model how proteins fold, based on what we know. Smalltalk can handle your project at many different levels it all depends on how much modeling you want to do. If on the other hand you are looking for the ability to mix chemicals and have them change color and foam up depending on some simple characteristics or combinations that you already know, that is very possible too. The project sounds fun. Can you share what you would like your chemistry set to do? Welcome to the list Chuck, Ron Teitelbaum From: Chuck Smith Sent: Tuesday, January 30, 2007 11:18 AM I would like to create a virtual chemistry set. Is this possible in squeak? ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Loading SSL
We decided to remove the Xtra config. Also remember that you need to load the patch for MonticelloConfigurations before using the config file. http://bugs.impara.de/view.php?id=5217 Let me know if you have any questions. Ron Teitelbaum Squeak Cryptography Team Leader -Original Message- From: [EMAIL PROTECTED] [mailto:beginners- [EMAIL PROTECTED] On Behalf Of Jens Pall Sent: Wednesday, February 07, 2007 4:06 AM To: Squeak Beginners Subject: [Newbies] Loading SSL Hi I've been trying to load the Cryptography group's SSL implementation into my image but can't seem to figure it out how. The posts I have found about this (from Ron) talk about loading Cryptography-Configuration.mcm and then Crypt-Xtra-Config.mcm from www.squeaksource.com/Cryptography (I think) but I don't see those files there. I connected Monticello to the repository but nothing there either. Am I missing something or do I have to do something else to get this loaded? How about instructions on how to configure the server? Thanks, JP ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Loading SSL
Cédrick, Yes that is the config file. What you need to do is browse the config file from the Monticello browser. That brings up the Monticello configuration browser. Then select update from repositories to get the latest code. Then load. This will update your image in the proper order for all of our cryptography code. If you have any questions about this please ask. Also remember you first need to load the patch in the bug: http://bugs.impara.de/view.php?id=5217 to get Monticello Configurations to work. If you can not get that to work you could load the packages manually. For it to work the packages should be loaded in the same order as the config file. http://www.squeaksource.com/Cryptography/Cryptography-Configuration.mcm Hope that helps, Ron Teitelbaum Squeak Cryptography Team Leader -Original Message- From: [EMAIL PROTECTED] [mailto:beginners- [EMAIL PROTECTED] On Behalf Of cdrick Sent: Saturday, February 10, 2007 8:24 AM To: A friendly place to get answers to even the most basic questions aboutSqueak. Subject: Re: [Newbies] Loading SSL Yes, I added the Cryptography repository and can see all the Cryptography categories but I'm not sure what I need to load and do in order to get SSL up and running. I don't see anything called Cryptography-Configuration.mcm, just .mcz files. Where do you see a configuration directory? In Monticello I just see Cryptography-algorithm/Tests/Protocol (18 of them), Fortuna and OpenPGP. 2nd one http://www.squeaksource.com/Cryptography/Cryptography-Configuration.mcm but I don't know if it's this one... Cédrick ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Spaghetti code
have to ask the user questions we can just send messages. (Like KILL! Ugh). So to summarize my suggestion: you use a tree construct to represent branching instead of using hard coded flows. (It is not really a linked list) You build objects that represent properties that have questions and answers. You can then build things that have these properties. Hope that helps and wasn't too complicated. Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists www.usmedrec.com From: Blake Sent: Saturday, February 17, 2007 7:11 PM I'm half thinking-out-loud here and soliciting thoughts on a programming lesson. If this sort of thing bugs you, feel free to ignore. --- My son is coding this flow-chart as a QA type application: http://media.www.gamespy.com/articles/633/633817/img_2913464.html So, it says, You found something! then asks Is it alive? and then branches out accordingly. I'm letting him muddle through with the idea of using his code as a platform to teaching him a better approach (or approaches). Looking at the chart, it looks like spaghetti code, and reminds me of some of the stuff I did in BASIC. And that's sort of what he's doing within Smalltalk. I'm actually tempted to show him how it would look in BASIC using GOTOs and line numbers. It would have the advantage of being easy to see all in one glance. But I want to, of course, show him a better approach and explain why it's better. My first thought was to make a state machine, but I don't think that'd be much better, in fact. Then I thought of what I would do, professionally, in a similar context: The problem with the spaghetti code and even a state machine is that it's static, and adding bits and pieces tends to require everything to be massaged around the new parts. In the real world, I know that the chart's not going to be static. I'd probably end up create a linked list of one-exit nodes and two-exit nodes. So, that's what I'll probably show him. The other thing I'd do, though, is put this all in an editable text file, like: 1,foundsomething,You found something,alive 2,alive,Is it alive?,friend,smash 2,friend,Is it a friend?,lately,scary 1,smash,Smash it with a stick!,shiny But I'm wondering if this last wouldn't be too much. Thoughts? ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] BlockClosurefork problem
George, Oh I'm really sorry. It's funny now that I go back and look I'm surprised that I missed that. That's a horse of a different color. Basically to answer your question Transcript is not thread safe. I'm not sure exactly where it goes wrong but I suspect that it is probably doing a copy somewhere and if one collection is used as a source and is copied at the same time with two new additions then one gets lost. To fix that you can set a semaphore which basically says don't try to access Transcript from two places at exactly the same time. semaphore := Monitor new. [10 timesRepeat: [semaphore critical: [Transcript show: '2']]] fork. [10 timesRepeat: [semaphore critical: [Transcript show: '1']]] fork. Transcript cr. This should make transcript thread safe. Hope that helps, Ron Teitelbaum -Original Message- From: [EMAIL PROTECTED] [mailto:beginners- [EMAIL PROTECTED] On Behalf Of George Herolyants Sent: Tuesday, February 20, 2007 3:28 PM To: A friendly place to get answers to even the most basic questions aboutSqueak. Subject: Re: [Newbies] BlockClosurefork problem Thanks for this answer, Ron. But actually I'm not confused with order in wich '1' and '2' presents in result line. I can't understand why in some cases this code results ten '1' and ten '2' and in some cases it results ten '2' and only nine '1'? ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Re: Alternative for static const...
Greg is right, so you need to either load the class into a new image that doesn't have it, since loading a class executes the class side #initialize method, or you need to execute the method yourself and save the image. Ron From: Greg Trasuk Sent: Tuesday, February 27, 2007 10:30 AM I suspect you are thinking in Java. Indeed, when you run a Java program, its class variables will be initialized when the class is loaded into the virtual machine, in other words the first time you reference the class. But Squeak is different; it's a live image system. When you are editing the class, you're actually making changes to the class in the running system. When you restart Squeak, the entire memory image of the virtual machine is reloaded from the last saved image, including the state of any class variables (and instance variables, and processes, etc). Cheers, Greg. On Tue, 2007-02-27 at 07:51, Mispunt wrote: I am sorry, I did mean execute. I hoped that it would execute initialize when the class (or variableNames) where called by the program.. After running/execute the initialize method it is working :) Thanks for you'r help, Mispunt On 2/27/07, Bert Freudenberg [EMAIL PROTECTED] wrote: What do you mean with isn't running? As I wrote, you have to execute it manually whenever you change the initialize method. - Bert - On Feb 27, 2007, at 13:33 , Mispunt wrote: After some better testing, It doesn't work :S It seems that the initialize of the constants class isn't running... (the normal classVariableNames are working...) I have to use the poolDictionary because there are some codes that return in a lot of classes.. Mispunt On 2/27/07, Mispunt [EMAIL PROTECTED] wrote: Thanks Bert, it works. When I am using the poolDictionary it isn't possible to use the constants in the Workspace right? or do I have to write methods for them when I want to use them? (well I don't want to, because it is just for testing purpose). Mispunt. On 2/27/07, Bert Freudenberg [EMAIL PROTECTED] wrote: On Feb 27, 2007, at 10:08 , Mispunt wrote: Hi all, For programming my Lego Mindstorms NXT I have to use codes like 16r1F. But I actually want to be able to use readable codes. In a language like Java I will do that with a static const, but as far as I know I have to do it with symbols in Smalltalk. No, there is a better way. If you are inside one class (or its subclasses), you would use class variables, one per constant. You add them in the class template: Object subclass: #Bla instanceVariableNames: '' classVariableNames: 'Const1 Const2' poolDictionaries: '' category: 'Bert-Bla' and the initialization code is in a class-side #initialize method: initialize self initialize Const1 := 16r1F. Const2 := 12345. You need to execute the self initialize in the browser to do the initialization. It will be executed automatically when loaded into another image. Class variables are capitalized because they are sort-of global, they can be used in the defining class, its metaclass, and all their subclasses. If you need to give access to these variables across the class hierarchies, then you would do the same, but as a subclass of SharedPool: SharedPool subclass: #BlaConstants instanceVariableNames: '' classVariableNames: 'Const1 Const2' poolDictionaries: '' category: 'Bert-Bla'. To use this pool of variables in another class, list it as a pool dictionary: Object subclass: #Bla instanceVariableNames: '' classVariableNames: '' poolDictionaries: 'BlaConstants' category: 'Bert-Bla' This makes all class variables of BlaConstants available to Bla as if they were class variables. There are quite a few other ways to allow global variables in Smalltalk, but this one is the clean way to do it which works nicely with tools like Monticello. - Bert - ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list
[Newbies] Squeak Foundation Elections 2007
Hello Everyone, This is a reminder that you only have a few days left to register at squeakPeople http://people.squeakfoundation.org/ . You need to have a certification of at least Apprentice to vote. There are some people that are reviewing Observer certified accounts. Please add enough information on your account so that people can determine your standing in the Squeak Community and possibly grant you Apprentice status. If you have not received Apprentice status but think you should please post a certification request to squeak-dev [EMAIL PROTECTED], the elections team [EMAIL PROTECTED] or you can ask me personally [EMAIL PROTECTED] . Voting starts this Saturday and will run for 3 days http://weeklysqueak.wordpress.com/2007/02/01/2007-squeak-board-elections-ann ounced/ . You can find a list of candidates at: http://wiki.squeak.org/squeak/5920 Please plan to vote! Thank you for your participation, Ron Teitelbaum Squeak Elections Team Member ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Re: Alternative for static const...
codeThatMeansSomething ^'16r1F' copy Is better! Ron From: David Mitchell Another alternative is to create a class with a bunch of methods that represent the constants. The methods are simple: codeThatMeansSomething ^'16r1F' The neat thing is that it is dynamic and all the rules of late binding and message lookup come into play, you can build object structures with proxies, decorators, composites, and so on. I actually did this on a large system (for money). It started out as a bunch of tables and we ended up with 3 instances that had rather insane interfaces (thousands of methods*). We thought it would be really slow, but it turned out to be measurably faster than dictionary lookups. Even better, we had revision history for our dictionaries because it was all methods. * Oh, wait, I forgot I was in Squeak. Thousands of methods is no big deal. Bert Freudenberg wrote: On Feb 27, 2007, at 10:08 , Mispunt wrote: Hi all, For programming my Lego Mindstorms NXT I have to use codes like 16r1F. But I actually want to be able to use readable codes. In a language like Java I will do that with a static const, but as far as I know I have to do it with symbols in Smalltalk. No, there is a better way. If you are inside one class (or its subclasses), you would use class variables, one per constant. You add them in the class template: Object subclass: #Bla instanceVariableNames: '' classVariableNames: 'Const1 Const2' poolDictionaries: '' category: 'Bert-Bla' and the initialization code is in a class-side #initialize method: initialize self initialize Const1 := 16r1F. Const2 := 12345. You need to execute the self initialize in the browser to do the initialization. It will be executed automatically when loaded into another image. Class variables are capitalized because they are sort-of global, they can be used in the defining class, its metaclass, and all their subclasses. If you need to give access to these variables across the class hierarchies, then you would do the same, but as a subclass of SharedPool: SharedPool subclass: #BlaConstants instanceVariableNames: '' classVariableNames: 'Const1 Const2' poolDictionaries: '' category: 'Bert-Bla'. To use this pool of variables in another class, list it as a pool dictionary: Object subclass: #Bla instanceVariableNames: '' classVariableNames: '' poolDictionaries: 'BlaConstants' category: 'Bert-Bla' This makes all class variables of BlaConstants available to Bla as if they were class variables. There are quite a few other ways to allow global variables in Smalltalk, but this one is the clean way to do it which works nicely with tools like Monticello. - Bert - ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
[Newbies] Squeak Foundation Board 2007 Election Update
All, We thank you for your patience. We are still experiencing a delay in our voting schedule. As soon as we can gather up the necessary data from our squeakPeople system we will be sending out instructions on how to vote. Voting will remain open for 3+ days which means we will be extending the voting period to ensure enough time for a fair election. If you have any questions please feel free to notify the elections team, or post a message to your respective lists. You can also contact me personally: [EMAIL PROTECTED] Once again we apologize for the delay in our election, but encourage you to participate once the voting starts. Thank you, Ron Teitelbaum Squeak Elections Team Member ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] array literal - a misunderstanding?
Hi Thomas, The #() syntax is for a regular array but for a literal array you want {} (curly braces) Try this: {1. 2. 1 + 3.} Hope that helps, Ron Teitelbaum From: Thomas Fischer Hello list, I'm starting for a couple of days with smalltalk/squeak - maybe it's not my last post :) I like to construct a flat array, but get a nested array: #(1 2 (1 + 3)) unexpected result: #(1 2 #(1 #+ 3)) Why squeak means, that (1 + 3) is an array and not 4? The syntax for an array literal is defined via#( - isn't it? salute Thomas -- View this message in context: http://www.nabble.com/array-literal---a- misunderstanding--tf3344098.html#a9300859 Sent from the Squeak - Beginners mailing list archive at Nabble.com. ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Where do I put it?
Hi Blake, Although I think I'm following your questions, I still may not be. For me it is ok to have a deck. The deck holds onto cards. Each instance of card is a card that has attributes. Symbols are good for setting the instance variables of the cards. You could have a method on deck #shuffle, that sets the order of the cards. And the cards themselves should be based on a factory in your game. The deck would define the available symbols and cards, (so you could have games like pinochle), and the game will select the appropriate deck to use. That factory on games could be reused and subclassed to make it easier to implement, esp. since the method shuffle will work for any deck. So Deck cards - orderedCollection of Card deckType - yourDeckTypeSymbol deckRules - instace of CardFactory based on yourDeckTypeSymbol suffleDeck get a new deck from the deckRules self cards: self deckRules shuffle. Game gameName - name of game deck - instance of deck classdeckType return the type of deck needed for this game CardFactoryAbstract - - class forDeckType: aDeckType return subclass of factory based on aDeckType ^self allSubclasses detect: [:aCardFactory | aCardFactory deckType = aDeckType ] shuffle return a collection of cards in random order randomGenerator := SecureRandom new. myCards := self cards copy. results := OrderedCollection new: myCards size. [myCards isEmpty] whileFalse: [results add: (myCards remove: (myCards at: ((randomGenerator next)\\myCards size) + 1)] ^results CardFactoryAbstract subclass: CardFactory52CardStandardDeck - cards - orderedCollection of 52 standard cards - class deckType - #standard52Card class deckContentSymbols return a group of symbols that represent the contents of the deck initializeDeck use class symbols to add all cards to deck I just wrote all this off the top of my head and didn't test any of it, and I didn't include all the code you need. I guess I'm just giving you a pattern that will work, but that leaves you plenty to learn on your own. I tried to make it simple, but I've been told that I don't do that very well. So if you need a more detailed explanation I can go over each step in my thinking, please don't be afraid to ask. If you like we can continue this conversation offline, either way works for me. Happy Coding, Ron Teitelbaum From: Blake Sent: Monday, March 05, 2007 3:38 AM Just some quick thoughts. In the real world a deck of cards is just that. There is no meaning in the cards themselves. Instead the meanings are in the rule book that comes with the game that you are playing. Also there is no value in a card, but in the hand, or best hand out of possible hands in the cards that you are dealt. Precisely. That's why nothing is in the deck or card to say that (e.g.) a Jack is worth 10 or that an ace is high. Does that help? Well, it's nice to know my overall thinking is right (for the value of right comprised of Ron agrees with mes). Maybe I can phrase the question more clearly now. The identity of an inidivual card is its symbol (or symbol set). In a standard deck, you have a rank and suit, like Ace and Spades. In a tarot deck, you'd have the same, and also the trumps, like The Fool and The Hanged Man. In a Magic deck, you'd have the name, the type, the mana cost, the strength, the defense, the special rules and the color text. So, we have these symbols--#Ace, #TheFool, #Plains--and my design has them defined as part of the deck class. The symbols have to be defined at the game level, for sure. The game needs to be able to evalulate hands, as you point out. I suppose they don't really need to be defined at the deck or card level, except in such a way that a particular card or group of cards can be identified. (So if, for example, I'm playing Go Fish, I have to be able to identify that a player has a Queen, and also to be able to lay down all my Queens when I have four.) At the same point, below the game and above the deck, there would seem to be some value in having the symbols available. A standard deck, or variants composed of just those cards, is used for thousands of games. Poker, solitaire, bridge, war, go fish, crazy eights, etc., all use the same deck. Some remove cards, like pinochle, some use multiple decks so that it's harder to cheat (like blackjack). Now, maybe I'm wrong on this and it should be regarded as a concidence that War, Poker and Bridge all use the same cards, since the cards don't have the same meanings. A particular user interface object could still treat the cards as the same. So, maybe that's the answer: They aren't really the same cards in the context of a program, so they should be made at the game level
[Newbies] Squeak Foundation Election 2007 polls are still open
All, This is just a reminder that the Squeak Foundation 2007 Election polls are still open. The election ends Wednesday March 7th 2007 at 10pm EST. If you have a SqueakPeople certification of at least Apprentice then you should have already received an email asking you to vote for the Squeak Foundation Board. If you did not get that email but believe you should have please feel free to contact me and let me know: [EMAIL PROTECTED] You can find more information about candidates at: http://wiki.squeak.org/squeak/5920 . Remember to press the vote button on the bottom of the ballot after ranking the candidates. Your participation is very important to the community. Please VOTE! If you have any questions please feel free to ask your list, the elections team or send me an email. Thank you, Ron Teitelbaum Squeak Elections Team Member ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Where do I put it?
Hi Blake, I agree that you questions have general value and I'm happy to help publicly. I only offered to help you offline because it is clear that you are getting something from our conversation so I wanted to remove the distractions of the public list if it was causing any difficulty. It does seem that there are games where the deck arrangement is so different that it needs its own coding. The benefit of the factory implementation that I showed you is that you now have a deckFactory superclass to write code that is common among all decks (like shuffle). Ultimately the greatest benefit of shared code comes from having more then one game that can use the same deck. In that case all you have to do is implement the deckType on your game and you are good to go. You are asking very good questions, please keep them coming! Ron -Original Message- From: Blake On Mon, 05 Mar 2007 08:20:39 -0800, Ron Teitelbaum [EMAIL PROTECTED] wrote: I just wrote all this off the top of my head and didn't test any of it, and I didn't include all the code you need. I guess I'm just giving you a pattern that will work, but that leaves you plenty to learn on your own. I tried to make it simple, but I've been told that I don't do that very well. So if you need a more detailed explanation I can go over each step in my thinking, please don't be afraid to ask. If you like we can continue this conversation offline, either way works for me. Well, I hope the questions I post have some general educational value. I'm building mini-Smalltalk lessons and decided to do a series on card games because when =I= was learning, each game defined its own deck of cards with its own set of code. (If suit wasn't important to a game, for example, the program simply wouldn't specify it.) Lotta duplicated read-only code. A deck of cards seemed like a good, beginning design question, but I began to think (overthink?) the relationships of physical cards, decks, the symbols used, etc. I hadn't thought of using a factory; I'll brood on that one. Thanks. ===Blake=== ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Squeak in commercial projects
Hi JP, This is not an easy question. There are a number of things that you need to consider. First you need to decide how secure the update needs to be. If you are not worried about security then you have a much easier job and many more options. In general Squeak is not secure, but it is also not less secure then many other tools that are sent to end users. So first answer some questions. Is your system likely to be used by people that are interested in cracking the system? Does your system have access to network facilities that attach to other installations of your system? Are you concerned that someone might try to build a patch and upload that code to your system installations? (i.e. spyware, worms, viruses) Are you trying to prevent users from using features of your system without authorization? (i.e. Try before you buy?) There are no easy answers but I do believe it is a very interesting discussion. Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists www.usmedrec.com Squeak Cryptography Team Leader -Original Message- From: [EMAIL PROTECTED] [mailto:beginners- [EMAIL PROTECTED] On Behalf Of Jens Pall Sent: Tuesday, March 06, 2007 2:09 AM To: Squeak Beginners Subject: [Newbies] Squeak in commercial projects Hi How can I use Squeak in a commercial closed source project (whole image)? How about upgrades? I want to be able to send an upgrade to the customer which only contains the changed code. Thanks, JP ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
[Newbies] Uploading Patches and Enabling Features in Commercial Systems
Hi JP, OK before answering let me say that these are only suggestions and you are responsible for taking suggestions as suggestions. In other words I can not be responsible for anything that goes wrong on your system, use my suggestions at your own risk. THE OPINION IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE OPINION OR THE USE OR OTHER DEALINGS IN SOFTWARE. I'm sure all that goes without saying but now it is said. The first question you asked was: how does a system update itself? Here are the issues as I see them. 1) A system must be able to ensure that it is updating itself from a trusted location. 2) A system must be able to ensure that only the trusted system can ask it to update itself. 3) A system must be able to ensure that it can securely store an update location. 4) A system must be able to securely change the update location. 5) All communications must be encrypted. 6) A System must be able to verify patches before applying them. 7) A System must be able to automatically load the patch. 8) A System should be able to update without restarting the application. 9) A System must be able to report back success or failure of patch installation. 10) A System must be able to recover from a failed patch. Ok so basic caveat, I just made these up and I'm sure I left something out. The second question is how you can limit functionally in your system unless and until payment is received. 1) A system must be able to enable features for a single instance and prevent those features from being shared to other systems. 2) A system could be able to detect features being used inappropriately 3) A system could be able to periodically check for permission (trial software) Ok so since I ran out of time I'll try to take each point one at a time starting tomorrow. Does this list help the conversation? Can you add to the list things that you think the system needs to do? Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists Squeak Cryptography Team Leader From: Jens Pall Sent: Tuesday, March 06, 2007 3:10 PM Ron Teitelbaum wrote: Hi JP, This is not an easy question. There are a number of things that you need to consider. First you need to decide how secure the update needs to be. If you are not worried about security then you have a much easier job and many more options. In general Squeak is not secure, but it is also not less secure then many other tools that are sent to end users. So first answer some questions. Is your system likely to be used by people that are interested in cracking the system? Some of the end-users might try this but most of them will not. They just want a system that works and does its job. We are working with partners who are distributing our software and I know that some of them will try to open up the software, modify it and, in some cases, try to sell it as their own if it is easy to get at the source. If the source is not available and it is a bit hard to get access to the developing interface then I believe this risk is greatly reduced. Does your system have access to network facilities that attach to other installations of your system? Yes. This is a distributed networked application. It lives and breathes on the network. Are you concerned that someone might try to build a patch and upload that code to your system installations? (i.e. spyware, worms, viruses) Well, not really. Our installations mainly run on private WAN networks owned by the customer but you never know what malicious internal users might do. We plan on being able to run this over the Internet where this is a major concern but will try to limit it by using secure network connections. Are you trying to prevent users from using features of your system without authorization? (i.e. Try before you buy?) Yes. We must be able to issue licenses for using features of the system. There are no easy answers but I do believe it is a very interesting discussion. It indeed is and one that needs to be addressed if Squeak is to be seriously considered as a commercial vehicle. It has huge potential in that area if the proper hooks are in place. As a side note I might mention that our current system is implemented in C++ and, if it turns out to be possible with respect to the topic of this thread, we are seriously considering porting it to Squeak. Croquet will also play a major role as the monitoring / management tool. Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists www.usmedrec.com Squeak Cryptography Team Leader
[Newbies] The Election Ends TODAY, you have about 12 hours left to vote
Hello everyone, First thank you everyone that has already voted. Your participation is very much appreciated. If you have not voted you still have time. Voting ends today at 10pm EST which is just over 12 hours from now. If you did not receive an email or if you lost it please let me know. We can resend it to you if you are on the list of squeakPeople with an account certification of at least Apprentice. Thank you again, Please Vote. Ron Teitelbaum [EMAIL PROTECTED] Squeak Elections Team Member ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Uploading Patches and Enabling Features in CommercialSystems
Hello all, Nobody updated my list! I guess this could mean two things either my list is perfect, or nobody cares. Please let me know if my comments are not helpful so that I don't spend too much time on it. Ok so one point at a time. 1) A system must be able to ensure that it is updating itself from a trusted location. Currently there is only one why that I know of to ensure that a site is real. The name, the ip address, the domain can all be lost, and some can be spoofed. The only way to ensure that the location is real is to provide a certificate that can be verified by a Certificate Authority. Of course this option is only as good as you are at protecting your server. If you loose your private key then all bets are off. Do your customers check this? No, it's my experience that people are mostly annoyed by security and are not willing to give anything up to get it. (They do yell loudly when systems are compromised). So you could go out and spend lots of money getting a SSL certificate. Or you could get the free one that I recommend. www.cacert.org (now it appears their web site is down, but they have been around a long time now and I'm sure that is temporary, check out the wikipedia entry http://en.wikipedia.org/wiki/CAcert.org ) Why would you want to use CACert? Because it is free and because supporting open source certificates is a really good idea, since anything that encourages more security and decreases the barriers to security are good things. Why wouldn't you want to use CACert? One good reason is that Internet Explorer does not automatically support CACert as a trusted Certificate Authority. This is very easy to fix, you just double click on the root certificate from CACert and it installs it on windows but it does give you a lot of warning messages. Many other browsers already include CACert in the default list of trusted CA's. Some users may see this as unprofessional so it is a good idea to either go with a paid CA, or write up a very good and professional rational for using CACert that you give to your users. So now that you have your certificate that verifies that your server is who it says it is you are all set. You can now have an SSL client connect to your server and after verifying the certificate it can download your patches. This can be done with our SSL client in squeak, which was developed by Rob Withers and me. Rob has been working on verification and I think that is working now. You can find our code in the www.squeaksource.com repository under cryptography. You could also use the libCurl plugin that is available for squeak and use openSSL. We can talk about how to do this as we put all of this together. I encourage everyone that is interested in cryptography to join the cryptography team! http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/cryptography Comments are encouraged; I really do not like talking to myself. Happy Coding! Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists www.usmedrec.com Squeak Cryptography Team Leader THIS OPINION IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE OPINION OR THE USE OR OTHER DEALINGS IN SOFTWARE. From: Ron Teitelbaum Hi JP, OK before answering let me say that these are only suggestions and you are responsible for taking suggestions as suggestions. In other words I can not be responsible for anything that goes wrong on your system, use my suggestions at your own risk. THE OPINION IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE OPINION OR THE USE OR OTHER DEALINGS IN SOFTWARE. I'm sure all that goes without saying but now it is said. The first question you asked was: how does a system update itself? Here are the issues as I see them. 1) A system must be able to ensure that it is updating itself from a trusted location. 2) A system must be able to ensure that only the trusted system can ask it to update itself. 3) A system must be able to ensure that it can securely store an update location. 4) A system must be able to securely change the update location. 5) All communications must be encrypted. 6) A System must be able to verify patches before applying them. 7) A System must be able to automatically load the patch. 8) A System should be able to update without restarting
RE: [Newbies] Uploading Patches and Enabling FeaturesinCommercialSystems
Thanks Emilio. Feel free to ask questions. Happy Coding! Ron From: Emilio Oca Hello all, Nobody updated my list! I guess this could mean two things either my list is perfect, or nobody cares. Please let me know if my comments are not helpful so that I don't spend too much time on it. Please continue. I am just reading but it is useful and interesting so far. Emilio ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Squeak in commercial projects
Hey Bert, This sounds pretty interesting, can you share more about how to mangle names. Does it require a change in the VM to de-mangle? Ron Teitelbaum From: Bert Freudenberg On Mar 7, 2007, at 8:57 , [EMAIL PROTECTED] wrote: Hi! Just a note - decompiling from bytecodes is very easy in Squeak. The only thing missing is the original indentation and any comments. But everything else is there. Just so you know. Well, if you're really concerned about decompiling, just mangle the selectors. As long as you are not constructing Symbols at runtime (#asSymbol, #intern:) this works perfectly well. Same for class names and instance variable names. Locking down the image is of course doable - so that you can't easily get to the tools etc - but there are of course ways to go around that too. For example, I guess you can use an image file analyzer (there is at least one I think) or hack a VM to do stuff when the image is loaded. Sure. But if the names are mangled this is about as much fun as reverse engineering machine code. No wait, the tool support is still better ;) But doesn't this imply that the source is downloaded, making it easy (easier) to hack the system? I could make the private Monticello connection secure, update the system and then delete the source... just thinking out loud. Yes - a Monticello package is just a zip file of source code. Sure, you can make the transfer secure using SSL or whatever - and you can apply it and throw it away Well, you certainly would want to encrypt and sign the patch. If you are *that* paranoid I'd not even use MC but just image segments. It's all a question of cost/value. I for one would be more concerned about preventing malicious code injection than the possibility of reverse engineering. But you have to weigh that yourself. - Bert - ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Uploading Patches and Enabling Features in Commercial Systems
Updated List 1) A system must be able to ensure that it is updating itself from a trusted location. *In Discussion* 2) A system must be able to ensure that only the trusted system can ask it to update itself. 3) A system must be able to ensure that it can securely store an update location. 4) A system must be able to securely change the update location. 5) All communications must be encrypted. 6) A System must be able to verify patches before applying them. 7) A System must be able to automatically load the patch. 8) A System should be able to update without restarting the application. 9) A System must be able to report back success or failure of patch installation. 10) A System must be able to recover from a failed patch. 11) Security measures have to be spread in many places of the system. 12) Security measures should be diverse. 13) You have to be very careful not to inconvenience your customers. The second question is how you can limit functionally in your system unless and until payment is received. 1) A system must be able to enable features for a single instance and prevent those features from being shared to other systems. 2) A system could be able to detect features being used inappropriately 3) A system could be able to periodically check for permission (trial software) Herbert, I agree with your assessment that the topics are applicable to hardware. Here are the major differences as I see them. Hardware encryption is more reliable because the encryption primitives are encased in a tamper resistant medium. Hardware encryption is more costly then software. Hardware performance can be either greater or lower depending on the implementation. Hardware to store keys can be very useful if it meets the two factor authentication: Something you have and something you know. As long as your hardware includes a password for authentication to the device, and it allows only limited password attempts (and the user doesn't write the password on the device), then a hardware key significantly reduces the vulnerabilities of authentication. Dongles have some issues, they are usually but not always only one factor (if you have the dongle the system works), they break or can be lost, and some are easily cracked (so it's important that the value of the software is less then the amount of work to make your own, or that the dongles be unique per installation so that the selling of a cracked dongle is not profitable). Also because the dongle links the computer to the software and not the user to the software unauthorized users can still access the software. A good example is when a user leaves the dongle attached to the computer and goes to lunch. I do think that having hardware authentication is a good idea and it does make things much easier to verify when the crypto code is in the hardware. I still wonder why it is that they are not more widely used. As for email, until the certificates are free and the software does all the work for you, (hardware or not), I doubt we will see much more acceptance. In the system that I'm building it is all automatic. If you use my software and then write an email to your doctor it automatically sends it encrypted from your regular email program. Or if you fill out a personalized template online to communicate with your doctor it is also sent encrypted with your certificate so that the doctor (and the insurance company) knows they are talking to the real patient. Very good comments! Thank you, Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists www.usmedrec.com Squeak Cryptography Team Leader From: Herbert König Sent: Wednesday, March 07, 2007 12:20 PM Hello Ron, RT Nobody updated my list! I guess this could mean two things either my list RT is perfect, or nobody cares. Please let me know if my comments are not RT helpful so that I don't spend too much time on it. thanks for going into details, I'm interested but not currently. But I read everything you write carefully! I'm of the hardware lock fraction mainly because the one I'm using offers interesting options in software payment. But this is a far in the future plan. The things that afaik software locking is bad at are: -floating licenses -move licenses (for laptop use) -stolen keys Once you have a hardware lock, you just encrypt every patch you send with it and only the owner of the right lock can install it. We have about 1000 customers using AutoCAD. They complained about the dongle (which was trivial to break) but they really started complaining when Adesk introduced soft locking and a software to transfer licenses with. We use a CA for email in another company. It's just a pain when something breaks (certificate expires, the IT person has a belly ache and accounting can not send encrypted emails.) To any one interested: www.codemeter.com . Anyway most of the discussion also is valid for dongle protected software so
[Newbies] Squeak Foundation Election 2007 Polls close in 6 hours
Hello Everyone, The Squeak Foundation Election 2007 Polls will close at 10PM EST. This is just a reminder that the polls will be closing in 6 hours. If you have not voted please do. If you did not receive or lost the email with instructions on how to vote but you were registered on SqueakPeople and had a certification of at least Apprentice you can still send me an email requesting a ballot. [EMAIL PROTECTED] Please vote so that your voice will be heard! Thank you, Ron Teitelbaum Squeak Elections Team Member ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
[Newbies] Last chance to vote!
Hello everyone, There is only about one hour left for you to vote for the 2007 Squeak Foundation Board. If you are an eligible SqueakPeople member (you have a certification of at least Apprentice) and you couldn't find your voting email, it is not too late. Let me know and you too can vote!! [EMAIL PROTECTED] Voting ends at 10PM EST when the results will be announced! The Squeak election team would like to thank everyone that has participated, all the voters and candidates and everyone that has worked to bring you this election. We wish the new board great success and thank all of those that ran for stepping up to help and we look forward to your continued participation in our very unique community. Ron Teitelbaum The Squeak Elections Team ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
[Newbies] Squeak Foundation Board 2007 Election Results
All, Thank you again for voting. Our percentage of votes was higher then last year. We had 182 votes from 392 ballots that were sent out. The winners are: (in alphabetical order) Andrew P. Black Cees de Groot Stéphane Ducasse Bert Freudenberg Craig Latta Yoshiki Ohshima Tim Rowledge You can see more details about the election here: http://tinyurl.com/ypm95q Thanks again and congratulations to the new Squeak Foundation Board 2007. Ron Teitelbaum The Squeak Elections Team ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Uploading Patches and Enabling Features in CommercialSystems
Hello All, Ok so next point: 2) A system must be able to ensure that only the trusted system can ask it to update itself. The way that I do this is pretty simple. If an external system can only say update, but can not say update from where, then the incentive to break this message is lessoned. You will notice that the next two points make this a circular argument so we need consider this carefully. A system could check a server periodically to see if there is an update available. If you have a trusted server as in 1) then asking that server for updates periodically is safe. A system could accept messages from the server. This is very useful for business production environments. We need to upgrade all of our clients at once. I've solved this problem with a combination of both pushing and pulling. First you upload the patch to the server and set the system patch level that the client checks when it starts up. This ensures that clients that are not connected will update when they finally do connect. Then I send a message to all running clients to update. This basically runs the same code that checks for a patch on start up (and possibly periodically) but since the message doesn't tell the client where to update from this message is mostly harmless. (Although it is important that the message only be accepted n number of times to prevent DOS attacks). It is easy to imagine variations on this process, update when you can, update now, update after next commit, ask user to update, shutdown if not updated by... Another variation of this message is a message that says, report home with your running patch level. Again it does not accept a location to report too. This is very useful for finding dead or disabled clients. Now I didn't really answer the question of how to determine that only a trusted system can ask the client to update. This really depends on your operating environment. If you have access to network facilities where the client is installed then the obvious answer is with a firewall rule. If you can not set the network environment then you can fix the problem by adjusting the message itself. The first way to do this is to encrypt the message. The server can encrypt the message with a random key. The key used to encrypt the message should be itself encrypted with the public key of the client. Then the client can decrypt the key run an HMAC on the message and then decrypt it. Now the public key in this case is not so public. The server knows the key of the client, so if the client receives a message that it can actually read, it can then process the message. Also the message is sent on an encrypted SSL connection so it is actually encrypted twice. This can be done in the opposite direction, you could have the server use it's private key to encrypt the random key, and then have the client decrypt the message with the servers public key. This reduces the number of keys needed, but it decreases the security since every message is readable by every system that knows the servers public key. It also increases the traffic on the server's private key which limits its lifetime. By the way the reason for encrypting a random key using a public key is that it limits the usefulness of the random key (since it changes with each message), it keeps the certificate from being used too often so it extends its life. We need to add another point, and that is how to update client and server certificates (see 14 below). In summary, Make the message safe incase it is received by an unfriendly user. Limit the communication in a networked environment if possible. Make the message content authenticate itself, by requiring decryption. Make the message content verifiable by adding HMAC. Again your comments are welcome; I received a lot of nice comments about the last post offline, thank you. This is a lot of detail so I really want to make sure you actually find it useful. Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists www.usmedrec.com Squeak Cryptography Team Leader From: Ron Teitelbaum Updated List 1) A system must be able to ensure that it is updating itself from a trusted location. *In Discussion* 2) A system must be able to ensure that only the trusted system can ask it to update itself. *In Discussion* 3) A system must be able to ensure that it can securely store an update location. 4) A system must be able to securely change the update location. 5) All communications must be encrypted. 6) A System must be able to verify patches before applying them. 7) A System must be able to automatically load the patch. 8) A System should be able to update without restarting the application. 9) A System must be able to report back success or failure of patch installation. 10) A System must be able to recover from a failed patch. 11) Security measures have to be spread in many places of the system. 12) Security measures should
RE: [Newbies] Re: Squeak - for a different Summer of Code!
http://code.google.com/soc/ Ron -Original Message- From: [EMAIL PROTECTED] [mailto:beginners- [EMAIL PROTECTED] On Behalf Of Serge Stinckwich Sent: Friday, March 16, 2007 4:12 AM To: beginners@lists.squeakfoundation.org Cc: [EMAIL PROTECTED]; squeak- [EMAIL PROTECTED] Subject: [Newbies] Re: Squeak - for a different Summer of Code! Giovanni Corriga a écrit : Hi all, as you may know, Squeak has been accepted as a mentoring organization for the Google Summer of Code 2007 program. Great work Giovanni !!! You did a better work than me. Last year, i had tried to contact Google, but I had no success. Squeak is an open source dialect of Smalltalk, a pure OO programming language that takes object orientation principles to their limits. Development in Squeak will be quite different from what you may experience in Java, C#, Ruby or Python, yet it will be very fulfilling. So, why not Squeak for the Summer of Code? Squeak will offer you: a productive environment to develop your ideas - a great community a first class mentoring program - appreciation and value for your work Possible project areas include: Virtual Machine - Compiler User Interface - OS Integration Development and End-user Tools The Seaside Web Framework and many more! Is the list of SOC projects close ? I would to propose to work on a better multilingual support for Squeak. At the moment, it's difficult to translate the Squeak interface, because there is several Squeak image (Squeakland, 3.9, OLPC, ...). I think we could improve Yoshiki's work in order to have a central repository for the translations (maybe something like Rosetta : https://launchpad.net/rosetta) and a more modular approach in order to attach messages catalog to packages and not to the whole image. -- Dr. Serge Stinckwich Université de CaenCNRS UMR 6072GREYCMAD OOESUGOO http://purl.org/net/SergeStinckwich oo Smalltalkers do: [:it | All with: Class, (And love: it)] \ / ## ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] ssl support
Hi Norbert, I just had a look at the package to make sure it was working properly. We had an error sneak in and it keeps popping its head up. I just released a new version of Cryptography-Core which should fix the problem. I am using our Squeak-SSL package as a client and a server and it is working very well. The package can also connect and retrieve contents from other SSL sites. Please let me know if you have any other problems or if you would like to give me more information about the problem you are experiencing. Thanks, Ron Teitelbaum Squeak Cryptography Team Leader From: Norbert Hartl Hi, is there a usable ssl support for squeak. I'm trying to use the Cryptography package to access a https monticello URL but I've no luck. Any ideas? Thanks in advance, Norbert ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
[Newbies] FW: [Squeakland] SqueakFest '07 - Save the Date!
Hello all, I thought I'd forward this to squeak-dev, beginners and seaside lists. There has been a bit of talk about teaching your kids to squeak, so if you are an Etoy developer or a fan, if you know some teachers, let them know, or if you are a parent of a squeaker, then this event is for you! Plus this would also be a good chance to learn more about OLPC. Spread the word and save the date: August 1, 2 3 for SqueakFest '07. Ron Teitelbaum Squeak News Team Member _ From: Kim Rose Greetings! Thanks to the continued interest and generosity of Columbia College Chicago, we are delighted to announce SqueakFest '07! The dates for this year's gathering are: August 1, 2 3 Hands-on Workshops Wednesday, August 1st Keynotes, presentations panels Thursday and Friday, August 2 3 SqueakFest is open to educators, parents (homeschoolers, other) developers, community technology center leaders, etc., etc. -- anyone interested in working with Squeak Etoys. This year we're planning a special track on the One Laptop Per Child Initiative ($100 laptop) and welcome participation by Etoy content developers for this particular platform in addition to those using or planning to use Squeak Etoys on other computing platforms. (For those who may be unaware, Squeak Etoys is currently one offering provided on the $100 laptop which is being distributed in great quantity this year.) Please save these dates and help spread the word to colleagues and friends you think would be interested in attending. We'll be sending a call for presentations in early April and also launching the official SqueakFest '07 website at that time. Please mark your calendar and plan to join us in Chicago for SqueakFest '07. Please stay tuned for more details! regards, Kim ___ Squeakland mailing list [EMAIL PROTECTED] http://squeakland.org/mailman/listinfo/squeakland ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] A Question of Style
I like the second one; it explains your intention much better. Ron From: Tim Johnson Hi, I know the rules for naming accessor and setter methods. But what do I do when the accessor method needs a parameter? I'll try to provide an example. A vendor sells an item called #apple. If I want to get the vendor's price for that #apple, I use a method such as the following: VendorpriceOf: aSymbol Now, to make the setter method, I have followed this pattern: VendorpriceOf: aSymbol is: newPrice Does this follow traditional patterns? I'll admit I have read the first half of Smalltalk with Style but not the second. Should I instead make the setter method look like this: VendorsetPriceOf: aSymbol to: newPrice ? Thanks, Tim [PS - Thanks to everyone who has been helping me on here lately, I have been lax in responding. You all bring up some good ideas and tips.] ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] regd databases and networking in squeak
Hi Navodit, The easiest thing you can do to attach a database is to use ODBC. If you have on your system an ODBC Driver say like Dbase or Access then you can just use a file. You set up an ODBC connection and then use SQL to access your data. The best part of doing this is that you don't need to have Access or Dbase on your system since ODBC does all the work for you. Review the ODBC packages on SqueakMap for details. For networking it really depends on what you are trying to do. If you are just looking for networking access to a database then you have that with the ODBC package. If you are looking for more advanced Database tools then consider using PostgreSQL and Glorp. This is a much more complicated so if you are new to this I'd stick with ODBC until you get your feet wet. Please feel free to ask questions! Happy coding, Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists www.usmedrec.com -Original Message- From: Navodit Kaushik Hi I am trying to learn more about using databases and using networking in Squeak. Can anyone please suggest some good starting points? For databases, I would be needing to set up a database for my project at squeaksource.com so I am looking for something which would enable that. For networking, I just want to start by learning some basics about how network access works in Squeak. Any pointers would be highly appreciated. Thanks Navodit ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] User interfaces | getting started
Hi Darren, Welcome to the list. I'm glad you have been reading about classes and methods that should help. There is no console type application for Squeak. The closest thing we have to a console app is the Transcript, but the Transcript does not accept input. We also have inspectors, browsers and a workspace with act much like the input side but they too are not really like the console you may be expecting. I agree with your path though, you want to get into the logic and flow of the program without having to worry about GUI itself. Here is how you might do that. You create classes that represent your domain. For a contact list you might create a contact and a contactBook. Something simple like Object subclass: #Contact instanceVariableNames: 'name email phoneNumber' Object subclass: #LittleBlackBook instanceVariableNames: 'contacts' You should create accessors and mutators for the instanceVariables on Contact and LittleBlackBook. LittleBlackBook initialize contacts := OrderedCollection new. Now what you need is a way to add contacts. LittleBlackBook addContactNamed: aName email: anEmail phoneNumber: aPhoneNumber create a contact and add it to the list of contacts self contacts add: (Contact name: aName email: anEmail phoneNumber: aPhoneNumber). Contact class name: aName email: anEmail phoneNumber: aPhoneNumber Return to the sender a new instance of contact with this information ^self new name: aName; email: anEmail; phoneNumber: aPhoneNumber; yourself. Ok so very simply you can create instances of your book by starting from the workspace and then using the inspectors for modifying your instance and getting feedback. This feedback is different from a console but it does give you a good feeling for objects. From a workspace you would do: LittleBlackBook new Now highlight that, right click - inspect it. What you get back is an inspector. This is an instance of your class LittleBlackBook. Notice that you can click on the ivars and see their contents. #contacts is currently empty. On the inspector of LittelBlackBook you can now type: self. #self refers to the instance itself. If you type self, highlight it and inspect it you get the same instance back again. It's not a copy it's the same instance, what ever you do to one will be reflected in the other since they are the same instance. The method we wrote can be called by using #self. Try this by typing this in the inspector window of your instance of LittleBlackBook. (you can close the second inspector). self addContactNamed: 'Darren White' email: '[EMAIL PROTECTED]' phoneNumber: nil. You can just highlight it and do it. Now check out the contacts ivar. It now has a contact in it. If you inspect the contact you will see that you have a collection and if you inspect the first item in the collection you will see that you have an instance of Contact, with your info in it. It's not a console but there is nothing that a console can do that you can not reproduce by adding new methods to your instance. Happy Coding! Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists From: Darren White Hello, This is my first post here. I have been exploring the squeak environment and smalltalk syntax for a few weeks now. Usually when learning a new programming language I create a small programs such as a contacts list. First I may do it with a console front end then play around with a GUI and widgets. I have got to the stage with squeak where I want to do that but I can't see how to proceed. For a console type program how do I proceed and for a GUI program what is the main form/frame/window to hold the components. So the main thing I'm stuck with is the user interface, I have read enough to know how to create classes and their method bodies (though my code may be bad at this stage :-) ). Any advice would be most welcome, I can't wait to get stuck in! Darren ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Some general questions
Hi Darren, Chances are you don't want an object called UserFred. What you want instead is an object with an ivar #name that has the value 'Fred'. Unless Fred is a unique type of object User that can do things that all other Users can not or if Fred is not allowed to do some things that all other users are, you shouldn't think of subclasses as instances of objects. Instances are identified mostly by their content. So Object subclass: #User instanceVariableNames: 'userName' User class newForUserNamed: aUserName create an instance of User and assign aUserName to the userName instance variable ^self new userName: aUserName; yourself now you can go to a workspace and do this. User newForUserNamed: 'Fred'. If you highlight it and inspect it you will get back a user named 'Fred'. (User class means that the method that you write goes on the class you create called User on the class side [press the class button]) Happy coding! Ron Teitelbaum From: Darren White Hello Is there a way to use a string as the name for a object? For example if I have the input string 'fred' from a user input field how do I create a object named userFred or even just fred? What is the difference between the source file and the image? Does the image use the code from the source file? If I create code dose it live in the image or source file? Is there a way to trigger a save prompt when clicking on the window close button? And a question about posting to this list: I notice that the replies to my last post didn't have 'Re' prefixed to them. How do I reply to a thread. For my lat post it seems that I accidentally relayed to the thread I had started by starting a new thread -oops. Darren ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Squeak Tutorial
Hi Raoul, Welcome to the list, I hope you have a terrific experience at Impara. SUnit requires that your class be a subclass of TestCase. If you look at your testing object make sure that it is: TestCase subclass: #MyTestClass And not Object subclass: #MyTestClass If this is not the problem please let us know, Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists www.USMedRec.com -Original Message- From: [EMAIL PROTECTED] [mailto:beginners- [EMAIL PROTECTED] On Behalf Of Raoul Zimmermann Sent: Tuesday, July 10, 2007 8:25 AM To: beginners@lists.squeakfoundation.org Subject: [Newbies] Squeak Tutorial Hello everyone, I'm new to Squeak and mailing lists in general. I will be going to Impara for a short internship and am trying to get an overview of Squeak. I'm using the Squeak-Tutorial at http://squeak.preeminent.org/tut2007/html/index.html. However, in Section I, part 9, I'm required to use the testCellOnState method I created. I'm to open the Test Runner and the category Laser- Game-Tests is supposed to appear. The problem is that it doesn't. I double-checked all previous steps and they're okay, but it still doesn't work. Can anyone help me please? :) Greetings, Raoul Zimmermann -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] delegation vs inheritance
Hello, I have to ask is Grunt your real name? Do you have a real name? Ok so your question is very vague. I'll try to answer, but I'm not sure my answer will be much help. Stack is a specialization of Object Stack has a linked list Stack normally implements linked list as a collection of StackLinks. StackLink is a specialization of Link Link has a nextLink that normally points to an instance of Link (or it's subclasses) to provide a linked list structure. Does that help? Ron -Original Message- From: gruntfuttuck First of all I must apologise if I get some terminology wrong in this post. I was rummaging around the collection classes earlier today and came across class Stack. I was interested to see that it makes use of class LinkedList through delegation with a instance variable rather than inheritance. I'm tyring to remember my Analysis and Design course here. I have a foggy memory about a is-a and has-a relationship. So a ford is-a type of Car, so that is a inheritance relationship and a Car has an engine so that is a delegation relationship. I also know that delegation is better for loose Coupling. As you can see I'm a bit vague on all this. With class Stack what would the be the likely thinking to delegate as apposed to inherit? I think this is a very impotent subject and I would like to be clearer on it. -- View this message in context: http://www.nabble.com/delegation-vs- inheritance-tf4216781.html#a11996570 Sent from the Squeak - Beginners mailing list archive at Nabble.com. ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] RE: delegation vs inheritance
From: Darren from: Ron Teitelbaum Does that help? Ron Thanks Ron, yes that does help but also what would be the thought process (I know you can't read minds) to choose this approach as apposed to specializing StackLink? -Regards Darren I don't understand your question. What are you trying to do or which thought process doesn't make sense? If you are trying to provide a linked list then you should use Link. If you need a stack use Stack. Have a look at the methods on each class and you can see how each class has been specialized. That should give you an idea of which class meets your needs. (If you don't find a method you need on Link, but it's on stack then use Stack) I think it would be easier if you said more about what you would like to do or what you do not understand. I'm sure someone can help explain it. I'm still not sure what piece you are having difficulty with. Welcome Darren! Ron ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] RE: RE: delegation vs inheritance
Hi Darren, Ok I get it now. Consider a stack and a linked list. The stack is a separate entity that understands how to add and remove from the list. If you only used the linked list there would be no single object to talk too. You could have code that says find the top object from any object you are holding but that would be pretty messy and quite difficult if the one item you are holding onto gets removed. In order to wrap your mind around objects you really need to understand the difference between instances and class definitions. Picture your objects as real things that are created from definitions. (Stack is a definition. aStack := Stack new. aStack is an instance of Stack.) For aStack we have an instance that holds onto a linked list. The Stack instance itself receives messages and operates on the linked lists. You could picture holding a linked list like holding a single monkey out of a barrel of monkeys. Which one would you hold, and it gets complicated when some start getting added or dropped. When you drop the last one back into the barrel you have nothing to hold onto. By creating a stack object we build something that is more natural and understandable then extending a linked list to accept stack messages. Say for example you decide that we will just talk to the first link. It seems odd to have to traverse the list to remove an item and it's not really what a linked list is supposed to do. The best advice I can give you is to see your objects as real things. Knowing when to create a new object or extend an existing object is indeed an important skill. There are some rules you can follow. 1) Methods should be short. You know you are doing things properly when your methods are only a few lines long. 2) Most methods take only a few parameters. If you find you are sending in a huge number of parameters then your class or your methods are too complex. You would probably benefit from creating a Method or Model class. You factor your complex method into a model, the instance variables are usually the parameters of your methods. You will find that having a model class greatly simplifies your program flow and significantly simplifies your code. Where you once were passing the world from one method to the next you can now just say: self myPieceOfTheWorld doSomething. 3) Most instance methods refer to #self. If you are passing in an object and working on that object and your method has an identity crisis (no sense of self) then you are writing your code on the wrong class. Look at your parameters and you will notice that the code really belongs on one of those instead. Writing the code on the right class is a skill worth developing. 4) If you created a door that doesn't open, or that pumps water from your well then you are not modeling the real world. Try to keep the behaviors of your objects to the things they should be doing. Don't add functionality to an object that is really the responsibility of a new, or some other existing object. Feel free to code behavior that belongs to the object but stay true to what that object is meant to do. You will find later that when you look for behavior it's much easier to find if the code is on the object that should be responsible for it. 5) Don't be afraid of creating new classes. Use as many objects as you need but no more! Hope that helps!! Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists www.USMedRec.com -Original Message- From: Darren Hi Ron Sorry for the confusion. I'm just using Stack as an example, I don't need to use it. I'm just curios of the design choose between delegating (or forwarding) vs inheritance. Couldn't Stack inherit from LinkedList and specialize it. I'm not questioning the design choose but just trying to learn how to make good design decisions. Regards, Darren Ron Teitelbaum wrote: From: Darren from: Ron Teitelbaum Does that help? Ron Thanks Ron, yes that does help but also what would be the thought process (I know you can't read minds) to choose this approach as apposed to specializing StackLink? -Regards Darren I don't understand your question. What are you trying to do or which thought process doesn't make sense? If you are trying to provide a linked list then you should use Link. If you need a stack use Stack. Have a look at the methods on each class and you can see how each class has been specialized. That should give you an idea of which class meets your needs. (If you don't find a method you need on Link, but it's on stack then use Stack) I think it would be easier if you said more about what you would like to do or what you do not understand. I'm sure someone can help explain it. I'm still not sure what piece you are having difficulty with. Welcome Darren! Ron ___ Beginners mailing list
RE: [Newbies] The #squeak IRC Channel is getting crowded
HEHEHE!! That was pretty funny! Ron -Original Message- From: Blake On Fri, 21 Sep 2007 13:56:44 -0700, Janko Mivšek [EMAIL PROTECTED] wrote: Blake wrote: [EMAIL PROTECTED] wrote: #squeak is getting crowded: Perhaps, but there doesn't seem to be much discussion, at least when I've checked in. (Not complaining, just observing.) Maybe we need more dedicated provocateurs on the channel (just kidding :) Namespaces suck! Perl roolz! Starving kids shouldn't have laptops!! Meh. My heart's not in it. ;-) ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Re: Semaphore problems
Hi Jason, Im not really sure what you are trying to do but this works too. semA := Semaphore forMutualExclusion. semB := Semaphore new. [semA critical: [Transcript show: 'b1'; cr. semB signal. semA wait.]. Transcript show: 'b2'; cr. semB signal. ] fork. [semB critical: [Transcript show: 'a1'; cr. semA signal. semB wait.]. Transcript show: 'a2'; cr. ] fork. Semaphore forMutualExclusion signals the semaphore so that you can get into the first critical block. The critical block is what does the code blocking. SemB signal allows the second thread in while semA wait keeps the block from exiting. Then semA signal allows the first block to continue, but semB wait keeps the second block from exiting. Then semB signal allows the second block to continue, and since both forked blocks complete they disappear. There are a lot of ways to make this easier, but I think its good to look at these constructs closely, if you are planning to work with threads. Check out SharedQueue for thread safe processing. Also have a look at Mutex for other Semaphore behavior. Good luck! Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists www.USMedRec.com From: Jason Shoemaker This is probably a safer version. It works for me. semA := Semaphore new. semB := Semaphore new. thread1 := [Transcript cr; nextPutAll: 'b1'. semB signal. semA wait. Transcript cr; nextPutAll: 'b2'. ] fork. thread2 := [Transcript cr; nextPutAll: 'a1'. semA signal. semB wait. Transcript cr; nextPutAll: 'a2'.] fork. [thread1 isTerminated and: [thread2 isTerminated]] whileFalse: [(Delay forMilliseconds: 100) wait]. Transcript flush Now to move on to another pattern. JTS ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] how do I get Seaside up on my Squeak?
Hi, It's nice that your first post is to help someone else! It's very nice to have you here, welcome!! Ron Teitelbaum From: Prashanth Hebbar Hope this helps. By the way, this was my first posting on this mailing list. Thank you. Cheers, Prashanth Hebbar ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Concrete classes... multiple users
Hi John, I read your question, but had some trouble trying to understand what you did or why you are having trouble now that you have to connect to multiple databases. You say that you have only one Item class. That's good because your domain classes shouldn't be affected by your backend database. You mention a factory to decide on and build your adapter. That's good too because based on some rule you would need to figure out what database to use. Then I get foggy, you say you have to change class variables. Ok so I'm guessing that your factory sets the class variables which hold your adaptors that are used to pull items. I think your question is: how can I keep from having to change database adapter class variables? If this is not your question please let me know. The answer to that question is to modify your model to provide the flexibility you need so that you can supply adaptors to your application. Don't use class variables, use some other object instead. Classes are cheap if you need more functionality. There is some rule that you are modeling that tells you when you need one database versus another database. You already have adapters that handle the different databases, so you only need to build a new object to hold those database sessions, built from your factory, and some session manager that knows when to attach and which adapter to use. So build a session manager, that holds multiple database sessions (adapters), and code the logic for picking a session on the manager. When global behavior stops being global move from class side (and class variables) to a new class instance and model there instead. Let me know if any of that wasn't clear, feel free to provide more specific information about what you are trying to do. Happy Coding!! Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists From: John Almberg One of the cool things, I think, about Smalltalk is that Classes are objects... i.e. concrete factories that can be modified at runtime to produce objects in different ways, depending on the runtime situation. I just find this so much more intuitive, compared to how classes are done in other languages... But I think I may have used it in a naive way... For example, I needed an Adapter class that could produce standard Item objects by connecting to a variety of legacy database tables, converting the non-standard item records into standard Item objects. This way, the consumer of those Item objects doesn't care where the items come from. Originally, I thought I would only have to make these connections, one at a time. I.e., I'd program the Item class 'factory' with the legacy database hostname, username, password, and then just start asking for Items. The Item class would then go out to the database, fetch the proper row, create an Item object, initialize the instance variables, and return it to the Item object consumer. This is intuitive, cool, and it works. Then the requirements changed and I needed to connect to multiple database *at the same time*. But there is only one Item class object! This really muddles things up, because I basically have to update the Item class variables every time I need an Item object. No longer cool! Did I just misuse this feature? Should I have built two Adapter Objects, instead? Am I missing something obvious? Is a little knowledge a dangerous thing? :-) TIA... John ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Concrete classes... multiple users
Hi John, Good luck with your project. By the way if you haven't already heard about it you might want to look at Glorp. Glorp is an object to RDBMS mapping system for Smalltalk (written in VW but ported to Squeak). It is possible that it is more complicated then you need but you may find that it is very useful. Reading the documentation may also give you some idea of the types of issues that you may encounter in your system. It does sound like you are having fun. There is nothing like solving real problems for learning. Happy coding!! Ron -Original Message- From: John Almberg Hi Ron, In a nutshell, I have an application that needs to read Items from a database. I recently discovered that in Smalltalk classes are real objects. This struck me as cool, so when I was deciding how to instantiate these Items, I thought, hey I'll use the class object as a factory (actually, I think it's more of an adapter pattern, but...) So I taught the Item class object how to talk to the database, including username/password, and then I was able to do something like: item = Item findById: 2 And items from the database were instantiated as Items, seemingly by magic. This seemed so intuitive and simple, and just 'right'. It encapsulated and hid the whole legacy database messiness and adapted the database fields into the Item attributes I really needed. Best of all, it could later be reprogrammed to talk to a slightly different database and adapt that database's fields into exactly the same Items, so the rest of the program didn't have to know it was talking to a different database. The problem arose when I needed to talk to more than one database *at the same time*, since the Item class was programmed to talk to a specific database. The only way to talk to another database was to update the class variables before asking for the new Item. This was ugly and, worse, the Item users had to know that there were different databases to deal with. Anyway, yesterday I realized I needed multiple objects to connect to multiple databases. I figured I had two choices: - subclass the Item class - refactor entirely and build something like an ItemAdapter class, who's instantiated objects would connect to the database, create Item objects, initialize them from the data records, and hand them to the Item consumers. The second choice seemed the better, so that's what I did. So, I think it was a case of falling in love with a cool feature, and then mis-applying it, just because it was dying to be used. Hope this explains it... I'm afraid I don't always get the jargon right, but that's why I'm a newbie, I guess! -- John On Oct 26, 2007, at 10:48 PM, Ron Teitelbaum wrote: Hi John, I read your question, but had some trouble trying to understand what you did or why you are having trouble now that you have to connect to multiple databases. You say that you have only one Item class. That's good because your domain classes shouldn't be affected by your backend database. You mention a factory to decide on and build your adapter. That's good too because based on some rule you would need to figure out what database to use. Then I get foggy, you say you have to change class variables. Ok so I'm guessing that your factory sets the class variables which hold your adaptors that are used to pull items. I think your question is: how can I keep from having to change database adapter class variables? If this is not your question please let me know. The answer to that question is to modify your model to provide the flexibility you need so that you can supply adaptors to your application. Don't use class variables, use some other object instead. Classes are cheap if you need more functionality. There is some rule that you are modeling that tells you when you need one database versus another database. You already have adapters that handle the different databases, so you only need to build a new object to hold those database sessions, built from your factory, and some session manager that knows when to attach and which adapter to use. So build a session manager, that holds multiple database sessions (adapters), and code the logic for picking a session on the manager. When global behavior stops being global move from class side (and class variables) to a new class instance and model there instead. Let me know if any of that wasn't clear, feel free to provide more specific information about what you are trying to do. Happy Coding!! Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists From: John Almberg One of the cool things, I think, about Smalltalk is that Classes are objects... i.e. concrete factories that can be modified at runtime to produce objects
RE: [Newbies] Smalltalk Javascript
Hi Ikem, I believe you are looking for Seaside. Seaside supports Ajax. Have a look at www.seaside.st . You get all the JavaScript you want plus more! Hmm, I was just reading your email more carefully. So to be clear this would give you the ability to use an external browser to access a Squeak Server running Seaside. That browser can then access squeak, render widgets, windows, google maps... You can embed an external browser into squeak by using a RFB window running in Squeak, but this only gives you VNC like capabilities (which means you need to have a browser running on a server for each connection). There is also Dan's work which allows you to run squeak in JavaScript: http://news.squeak.org/2007/10/05/dans-the-man-check-out-dan-ingalls-work-sq ueak-in-javascript/ but again this may be opposite of what you are asking. If indeed you need to control Google maps on a widget in Squeak you might have to write the conversation yourself. Oh and I found this, but I've never used it so your mileage may vary. http://www.squeaksource.com/ST2JS.html Happy Coding! Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists www.USMedRec.com -Original Message- From: [EMAIL PROTECTED] [mailto:beginners- [EMAIL PROTECTED] On Behalf Of Ikem Nzeribe Sent: Saturday, November 03, 2007 10:22 PM To: beginners@lists.squeakfoundation.org Subject: [Newbies] Smalltalk Javascript Hi all ;-) I'm pretty new to Squeak, and am just trying to assess what I can do. I know there's a web browser for Squeak, but I was wondering if there is any way to handle Javascript in this environment at all? It seems not... is there a reason for that? I would love to run GoogleMaps from within the Squeak environment. If it is not implemented, what would it take to get it done? Cheers, ikem.star ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Ordered Set?
Hi itsme, I see that you have been asked already but, could you please give us a name we can use besides itsme213? You can use SortedCollection. SortedCollection new sortBlock: [:a :b | a index b index]. This provides ordering but does not eliminate duplicates. That can be accomplished pretty simply by checking for uniqueness before adding to the collection. You could also use a Dictionary, if your data is not too large. aDict := Dictionary new. aDict at: anObject index ifAbsentPut: anObject. This provides both sorting and set like operations (again by checking for uniqueness before adding). Otherwise just use OrderedCollection and manage order and uniqueness manually. The class has all the methods you need to do so. Happy Coding! Ron Teitelbaum -Original Message- From: [EMAIL PROTECTED] [mailto:beginners- [EMAIL PROTECTED] On Behalf Of itsme213 Sent: Saturday, November 03, 2007 11:27 PM To: beginners@lists.squeakfoundation.org Subject: [Newbies] Ordered Set? I have ordered collections of things without duplicates and with an index 1...N for each, ideally with operations like move: anExistingElement to: anExistingPosition What should I use? I could not find an OderedSet? ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
[Newbies] Give One. Get One. Now!!
Hi All, This is just a reminder that you can now help the OLPC project by purchasing XO laptop's. You will give one to a child in the developing world and get one for yourself. The Give One. Get One. program is only available for a limited time so don't delay. http://news.squeak.org/2007/11/13/give-one-get-one-now/ Or go directly to: http://www.laptopgiving.org/en/index.php Check out a cool review: http://news.squeak.org/2007/10/05/pretty-cool-nytimes-olpc-review/ Thanks, Ron Teitelbaum ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
[Newbies] Reminder - Check your Squeak People Email or Sign up to vote
Hi all, I thought I'd send out a reminder about the Squeak Foundation Board Elections. If you would like to vote in the upcoming Squeak Foundation Elections, you should check your email address on Squeak People. http://people.squeakfoundation.org/ . Please make sure you have access to your squeak people account, check that you included your name and that the supplied email is correct. If you need help accessing your account please let me know. You will need access to the email supplied to receive a ballot. If you have not signed up for a squeak people account and you would like to vote in the election please sign up and then encourage people you know to certify you. Only Squeak People members that have a certification of Apprentice or higher have supplied a real name and a valid email will receive a ballot to vote in the election. This is only a reminder about Squeak People. We have not set the voting schedule. Please stay informed, get involved in the upcoming election and remember to please vote. Also I'd like to express our thanks to Ken Causey for helping us get the tools we needed to better run the election this year. Thanks Ken! Happy Squeaking, Ron Teitelbaum Squeak Elections Team Member ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Overriding methods
Hi Blake, There are a number of ways to initialize an object. Overridding #new is an acceptable practice but normally this is done because you do not want a new object created. For example if you wanted to have only one instance of an object you might override #new to lookup your instance and return that instead. Sometimes calling #new on class is a bad idea, either this class shouldn't have instances, or there are other instance creation methods that should be called instead. (We usually don't override new because of other instance creation methods but I can understand the argument if someone did) For example FishTank classnew new should not be called please use instance creations methods instead self error: 'Please use instance creation methods and not #new FishTank classnewForGallons: numberOfGallons Create a fishTank that holds numberOfGallons aTank := super new. call super to bypass error aTank numberOfGallons: numberOfGallons. aTank calculateGlassForGallons. aTank calculateTopSizeForGallons. aTank calculateNumberOfLightsForGallons. ^aTank Ok so this is kinda silly but I hope you get the idea. This is what happens when I make stuff up on the spot! Ok so in most cases you can set your object up in #initalize FishTankinitialize set up default values for aFishTank self glassSides: OrderedCollection new. self numberOfLights: 0 copy. self tankShape: #rectangle but you might want to change that setup during instance creation. Let's move our setup code to the instance side. FishTankcalculateTankProperties use the information provided to create a tank self calculateGlassForGallons. self calculateTopSizeForGallons. self calculateNumberOfLightsForGallons. Now change your original code to this: FishTank classnewForGallons: numberOfGallons Create a fishTank that holds numberOfGallons aTank := super new. call super to bypass error aTank numberOfGallons: numberOfGallons. aTank calculateTankProperties. ^aTank So that you can call FishTank classnewOctagonalTankForGallons: numberOfGallons Create an Octagonal tank that holds numberOfGallons aTank := super new. aTank shape: #octagon. aTank numberOfGallons: numberOfGallons. aTank calculateTankProperties. ^aTank. Ok so now your code that figures out the number of sides and amount of glass to use can reference shape and figure things out. Of course I would not use hardcoded shapes in my code instead on the class side I would create a protocol called Constants Then I'd create a method called in Constants FishTank classoctagonalShape return a symbol that represents an eight sided fishtank ^#octagon Then I'd call aTank shape: self octagonalShape. Instead. You could also extend your class hierarchy to support different tanks. FishTank subclass: RectangleFishTank and FishTank subclass: OctagonalFishTank Now you can use your instance creation method to find out what instance to create. This makes things much easier because now your code for calculating number of sides and amount of glass can just be written in each class and all your self shape = self class octagonalShape ifTrue ... code goes away. RectangleFishTank classshape return the shape of this subclass fishtank ^self rectangleShape OctagonalFishTank classshape return the shape of this subclass fishtank ^self octagonalShape FishTank classnewForShape: aShape numberOfGallons: aNumberOfGallons return a new instance of a subclass matching aShape that holds aNumberOfGallons aClass := self allSubclasses detect: [:aClass | aClass shape = aShape] ifNone: [NotAFishTankShapeThatWeSupportException signal]. ^aClass newForGallons: aNumberOfGallons. And you can simplify your initialize with FishTankinitialize set up default values for aFishTank self glassSides: OrderedCollection new. self numberOfLights: 0 copy. self tankShape: self class shape. Ok so back to someone else point. What are you trying to do? Hope this helps some. Try not to override #basicNew, and only override new if there is something about creating instances you want to change. If you are trying to affect how things are created there are lots of ways to make this happen without changing new. Happy Squeaking! Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists -Original Message- From: Blake Hey, all: I figure this is a beginner question. I get a big warning when I override certain methods. (Class methods?) For example, if I want to set up the contractless part of my object, I do so by overriding #basicNew, and then setting the values that allow the instance of the object to function. This seems perfectly
Squeak Board Member Responsibilities (was: [Newbies] Squeak Foundation Election 2008 coming up!)
Hi Richard, I'd be happy to summarize the responsibilities of the Squeak Foundation board members. The board members are elected by the community to help the community address issues. The issues depend on what the community wants done but more specifically what the elected board members are capable of accomplishing, given their abilities some but mostly because of limited time to devote to projects. There are no requirements for any activity or participation, nor are there currently any ways to remove board members, or even to replace board members that resign. We elect new members yearly. We are in the process of making a legal entity for the board. When that happens, the board will be bound by more formal rules relating to not-for-profit entities. But the ultimate responsibilities for that will be the Software Freedom Foundation Conservancy who will have the ultimate say, which protects board members. At that time I believe we do have a way to replace board members that resign. We are also in the process of re-licensing Squeak, with the help of Viewpoints Research Institute www.vpri.org . The board and the community are participating in that to help accomplish this task. If you received an agreement from VPRI and haven't sent it in please take a moment and do it!! We are also in the process of figuring out if a Technical Board should be formed that would have more responsibilities to lead the development of Squeak and be the final arbitrator of where we go technically, but this was only suggested by some current board members but hasn't happened yet. The current board meets on a monthly basis by IRC (so no travel required). They communicate also by a private email list. There was talk about allowing prior board members continued access to that list with no voting rights for advice (a board member emeritus status), but I'm not sure if that suggestion was ever followed up on. The previous board would post the notes of the meetings. This one did not or did not do it very often. There are some other responsibilities to keep the community running, servers, administrators, fund raising, groups responsible for code like network, VM, kernel ... and a number of volunteers that help keep things going. Those groups are semi-autonomous, because they are volunteers and because many of those groups existed before there was a board. I would think that they would consult with and heed the advice of the board if something warranted it. Mostly they keep going because they kept going in the past and because of some very talented, hard working and dedicated individuals. Now some disclaimers; I am not a lawyer, nor am I a board member, so take all this with a gain of salt. If I misstated anything I'm sure others will correct me, and if I left anything out please feel free to add to this summary of responsibilities. I just did this off the top of my head. Don't for get to register with squeak people http://people.squeakfoundation.org get certified and VOTE!! If you are planning to run for the board please announce your candidacy to squeak-dev by Feb 22, 2008. If you need to have your password changed on squeak people email: [EMAIL PROTECTED] . Happy Squeaking! Ron Teitelbaum Squeak Elections Team Member -Original Message- From: Richard Karpinski Maybe everybody knows, but could you summarize the duties and the activities of board members so that people could tell easily whether this would be an honor they would like to carry for a year? For example, does board membership require or encourage international travel or other activities involving serious time and financial commitments? And what effect do board decisions have, anyway? Dick Karpinski, a definite non-candidate On 2008, Feb 5, , at 4:00, beginners- [EMAIL PROTECTED] wrote: A year has passed (oh, so quickly) and it is time to reflect a bit and ramp up your democratic rights here in Squeak country! Every year we elect the Squeakfoundation Board (http://www.squeak.org/Foundation) consisting of seven members from our community. ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] How to empty a collection?
Hi Marcin, I'm not a fan of using #become. I will use it for very specific behavior when I need to retain pointers to an object. For example for implementing a proxy. In that case become is a very useful tool. I think that #become is overkill for this situation, but I won't argue that it doesn't work. In most cases you have a well encapsulated collection. That collection is not referenced outside the object so you can just reinitialize your collection without #become. If it is complicated enough to worry about pointers I wouldn't use #become. Someone will get lost and miss your #become hidden inside #removeAll: . I'm not saying this will cause problems but I think I would rather work with the collection directly instead of using the #become. Also if you are working on a collection that is large enough to worry about performance then you are probably missing a database that would significantly improve your performance. Ron Teitelbaum From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marcin Tustin Sent: Monday, February 18, 2008 8:43 PM To: A friendly place to get answers to even the most basic questions aboutSqueak. Subject: Re: [Newbies] How to empty a collection? My own testing suggests that references to the object remain in place. I would guess that that is the whole point of become. On Feb 19, 2008 1:38 AM, cdrick [EMAIL PROTECTED] wrote: Isn't Cedrick's aida solution going to be significantly faster? this is not mine :) butI'd interested to see if it's a good use of #become:... Does it keep references ? is it safe ? Thanks ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Re: [Webteam] Suggestion for Squeak Website
I responded to her but did it off list. (Didn't hear back) Ron -Original Message- From: [EMAIL PROTECTED] [mailto:beginners- [EMAIL PROTECTED] On Behalf Of Brad Fuller Sent: Thursday, February 28, 2008 9:20 PM To: Costello, Barbara A (Barbara); [EMAIL PROTECTED]; Beginners@lists.squeakfoundation.org Subject: [Newbies] Re: [Webteam] Suggestion for Squeak Website I really don't know, Barbara, I've never had too! However, there are many people that can help you. I've CC'd the Beginner's forum to this reply. If anyone has an answer for Barbara, please reply and include her personal email address. BTW, you can join the Beginner's forum here: http://lists.squeakfoundation.org/mailman/listinfo/beginners While you're waiting, you can also search our wiki located here: http://wiki.squeak.org/squeak brad more info: http://squeak.org/ On Thu, Feb 28, 2008 at 7:44 AM, Costello, Barbara A (Barbara) [EMAIL PROTECTED] wrote: do you know if there is anyway to print something from squeak long story, but my children made a great drawing in squeak for a school project - but neither the teacher or me can figure out how to print. we spent hours on the picture, there has to be a way...hopefully... Barbara Costello Avaya Government Solutions 703-310-3732 -- Brad Fuller www.bradfuller.com ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Re: [Webteam] Suggestion for Squeak Website
Wait I take that back I did hear back from her. This is what she wrote: THANK YOU THANK YOUTHANK YOU! YOUR A LIFE SAVER. -Original Message- From: [EMAIL PROTECTED] [mailto:beginners- [EMAIL PROTECTED] On Behalf Of Brad Fuller Sent: Thursday, February 28, 2008 9:20 PM To: Costello, Barbara A (Barbara); [EMAIL PROTECTED]; Beginners@lists.squeakfoundation.org Subject: [Newbies] Re: [Webteam] Suggestion for Squeak Website I really don't know, Barbara, I've never had too! However, there are many people that can help you. I've CC'd the Beginner's forum to this reply. If anyone has an answer for Barbara, please reply and include her personal email address. BTW, you can join the Beginner's forum here: http://lists.squeakfoundation.org/mailman/listinfo/beginners While you're waiting, you can also search our wiki located here: http://wiki.squeak.org/squeak brad more info: http://squeak.org/ On Thu, Feb 28, 2008 at 7:44 AM, Costello, Barbara A (Barbara) [EMAIL PROTECTED] wrote: do you know if there is anyway to print something from squeak long story, but my children made a great drawing in squeak for a school project - but neither the teacher or me can figure out how to print. we spent hours on the picture, there has to be a way...hopefully... Barbara Costello Avaya Government Solutions 703-310-3732 -- Brad Fuller www.bradfuller.com ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
[Newbies] FW: [Webteam] Suggestion for Squeak Website
Here's what I sent. Ron From: Ron Teitelbaum [mailto:[EMAIL PROTECTED] You are quite welcome! Have fun!! Ron From: (Barbara) THANK YOU THANK YOUTHANK YOU! YOUR A LIFE SAVER. From: Ron Teitelbaum [mailto:[EMAIL PROTECTED] It sounds like you had some fun. If you are running on a windows machine then you can just print the screen. To do that, do the following. On a laptop press these three buttons down. So that they are all down at one time. Ctrl Fn Print Scrn the Fn and Print Screen are usually in a different color like blue or green. On a regular keyboard just press Ctrl Print Scrn. The button is usually in a block in the top just right of the regular keys. Now you have your image in memory on your computer. To print it you need to put it into a printable document. If you have Word then you can open word and select Edit-Paste from the menu, or you could press Ctrl v. This will place the picture into the file and you can print it. If you do not have Word, then look for Programs Accessories WordPad. Open WordPad and then paste as above by using either Edit - Paste from the Menu, or pressing Ctrl and v together. I hope you had fun with squeak. Dont forget to check out Scratch. Scratch is the Squeak software written at M.I.T. that allows your kids to make their own games. They can even put their own pictures in. Its really fun, even for old fogies. Hope that helps, Ron Teitelbaum From:(Barbara) do you know if there is anyway to print something from squeak long story, but my children made a great drawing in squeak for a school project - but neither the teacher or me can figure out how to print. we spent hours on the picture, there has to be a way...hopefully... Barbara Costello Avaya Government Solutions ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] [ANN] Learn Morphic and have fun
Hi Edgar, I'm sure I'm not the only one that noticed that you did quite well in the election. A hand full more votes and you would have been in. Good luck with your project. Ron -Original Message- From: Edgar J. De Cleene Folks: As I said in my failed campaign for have a place in the Board, could dedicate a 3 hours a day as average to Squeak. I intend to be on #IRC from roughly 7:30 to 10:30 Argentina time (10:30 to 13:30 GMT) I pick as starting project to develop with all wishing to join this http://wiki.squeak.org/squeak/6047. To Jerome Peace in case you read this, I miss your mails and hope you don't mind I take some of you. The project is to be developed in Morphic (no Etoys as soon they go out of basic image) in a official http://ftp.squeak.org/3.10/ Squeak3.10-7159-basic.zip Sources is same as 3.9, VM of 3.9 should work. Collateral I test on FunSqueak and maybe in others versions of Squeak. I just do very rough project and save on swiki, so I hope questions and feedback of any wishing learn (or teach) and have fun. Read you on #irc ! Edgar ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] SSH server in Squeak
Hi Aditya, I believe that Rob did write an SSH server and/or client but I haven't had time to review it and use it yet. It's in the cryptograpy package available on SqueakSource. http://www.squeaksource.com/Cryptography.html Please feel free to sign up on the cryptography mailing list anyway, and let us know how it works for you. Thanks, Ron Teitelbaum Squeak Cryptography Team Leader _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Aditya Siram Sent: Thursday, May 08, 2008 12:24 PM To: beginners@lists.squeakfoundation.org Subject: [Newbies] SSH server in Squeak Hi all, I was wondering how to get an SSH server working in Squeak. I was told that this service has been implemented but I can't find any documentation. I originally posted to the Seaside mailing list but this is probably a better forum for it. Thanks ... Deech _ With Windows Live for mobile, your contacts travel with you. Connect on the go. http://www.windowslive.com/mobile/overview.html?ocid=TXT_TAGLM_WL_Refresh_m obile_052008 ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Best place to ask Smalltalk questions?
Hi Sean, ok i have another. lets take something that in a sql driven environment would be a lookup table. countries and states. what the the smalltalk way with this? There are a number of patterns for this. Not all of them are strictly object oriented. The easiest way to do this is to use a database to hold and coordinate the data. Then you would query for the data and instantiate objects as needed (and maybe cache some frequently used ones). Your suggestion of using a class variable or a class method that is responsible for creating all of your instances also makes sense. You can either build all the instances and save them in your image or build the instances during startup or lazily when needed. You need to have some root to hold those new instances to keep them from being garbage collected. This can also be done with a class variable. Just set a class variable to a collection of your instances, then use that variable to lookup your instances. Having an external file is also a good way to go. The same issues arise from the file as for putting the data in a method, but benefit of using the file is that your data is not saved in code and can be updated without changing your running image, although your image needs to know when the file changes so that it can refresh your instances. Hope that helps, Ron Teitelbaum ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
[Newbies] Obama -- The Judas Goat
Obama -- The Judas Goat 1/25/2009 By David Duke Judas Goat\ A goat that leads other goats or sheep to slaughter. Also, one who entices into danger and betrays others. The name is an allusion to Judas Iscariot, who betrayed Jesus for 30 pieces of slaughter. (From Merriam Websters Dictionary) Barack Hussein Obama is a Judas Goat. Extremist Jews guided Barack Hussein Obamas career from day one, even all the way back to Harvard Law School. Radical Zionist hitman, David Axelrod previously orchestrated the Jewish-financed and organized defeat of perceived anti-Zionist Sen. Charles Percy. He is the man who ran Obamas campaign for President and who is his chief handler. Obamas campaign was overwhelmingly financed by the most powerful Zionist bankers in the world. His campaigns largest contribution source was the Zionist international banking firm of Goldman Sachs. (FEC campaign records). In both Obamas Senate and Presidential campaign he prostrated himself before AIPAC (American Israel Public Affairs Committee) promising even more money and blood for Israels terrorism than even the supine John McCain, and even more money and blood than the previous Shabbez Goy in the White House, George Bush. Before the Israeli terrorism and mass murder in Gaza, he went to Israel and said that he supported Israels planned murderous terrorism against the men, women and children of Gaza. His first act as President-elect was to appoint a rabid Zionist, Israeli dual citizen who served in the Israeli Army as his Chief of Staff, Rahm Emmanuel. As thousands of women and children in Gaza were killed or maimed, Obama remained silent. Within a few days as President Obama supported indiscriminate American missile strikes in villages of our ally Pakistan, a clear continuation of Bushs policies. He completely supports the theft of trillions of American taxpayer dollars to the Zionist international bankers. Eighty percent of American Jews voted for Obama, and all the main leaders of the Jewish Supremacist state of Israel have proclaimed Obama as the perfect man for U.S. President. What better for the Zionists to have their own servant perceived as a clean break from the Jewish extremist-controlled Bush administration? What better than for the Zionists than to have their Shabbez Goy be treated by the worlds press and even by much of the anti-Zionist community as a man of real change? What better for the Zionists than for the world to think that Obama will be a change from the Zionist-controlled policies when he willing to do anything that Israel demands? What better for the Zionist murderers to have their craven puppet be looked at by the whole world as a man of honor and integrity and fairness. In the slaughterhouse, the Judas Goat is often painted with bright colors, adorned with strong, sweet scents to lure the sheep to their pens and to their death. Obama, the Judas Goat of our time, is looked upon by millions of Zionist-propagandized sheep as the man who will lead them to salvation. Instead, he leads America, Palestine and the world to the bloody altar of Jewish Supremacism. Any supposed anti-Zionist who praises Barack Obama is actually aiding this Judas Goat to lead us all to slaughter. Every person who truly opposes Jewish extremism must speak out and expose the Judas Goat named Barack Obama! -- Dr. David Duke Former Member of the House of Representatives State of Louisiana United States of America It is up to you the people of the United States who can still think freely, and up to all of the people of the world who are able to see through the deceptions of the Zionist-influenced Global media -- to get this simple, powerful message to everyone on earth. Email this message to your friends, post it on forums and websites and put links to it on every website, facebook or other media in the world. Go and seek out media and Internet sites not controlled by Zionist power. Make youtube videos of this message, (use the short audio and find good illustrative pictures) and post it untill your fingers are worn and tired, print it and mail it to newspapers or any media outlet that has still not fallen under the propaganda of the Zionists. Let the world know the truth. Person by person, in the USA, Canada, UK, France, Germany, Italy, japan, Russia, China, Africa, Palestine, South America and across the whole world this Judas Goat must be exposed for what he is, so that when begins to do his evil for Israel, the whole world will know exactly what is going on and resist! Source : http://www.davidduke.com/general/obama-the-judas-goat_7317.html Why is the President of Israel, the terrorist who just oversaw the Zionist mass murder and maiming of thousands of Palestinians so happy that Obama is President of the USA? by David Duke Read the excerpt from the Israeli News about how President Perez and Israel think that Obamas becoming U.S.
RE: [Newbies] Obama -- The Judas Goat
Thank you for sending it on. This email was not from my address but from someone that just used my address as the return to address. Please ignore ignorance whenever possible! You can verify that this is not from me by noticing that the header from this email does not match the one from the email you forwarded listed below (see id: 20090125165853.ilsr28583.cdptpa-omta05.mail.rr@ihkmn). Thanks, Ron Received: (qmail 20810 invoked from network); 25 Jan 2009 16:59:06 - Received: from unknown (HELO p3presmtp01-07.prod.phx3.secureserver.net) ([208.109.80.156]) (envelope-sender beginners-boun...@lists.squeakfoundation.org) by smtp23-01.prod.mesa1.secureserver.net (qmail-1.03) with SMTP for r...@usmedrec.com; 25 Jan 2009 16:59:06 - Received: (qmail 25142 invoked from network); 25 Jan 2009 16:59:06 - Received: from box2.squeakfoundation.org ([85.10.195.197]) (envelope-sender beginners-boun...@lists.squeakfoundation.org) by p3presmtp01-07.prod.phx3.secureserver.net (qmail-ldap-1.03) with SMTP for r...@usmedrec.com; 25 Jan 2009 16:59:05 - Received: (qmail 14525 invoked from network); 25 Jan 2009 16:58:59 + Received: from unknown (HELO box2.squeakfoundation.org) (127.0.0.1) by localhost with SMTP; 25 Jan 2009 16:58:59 + Return-Path: r...@usmedrec.com Delivered-To: list-beginn...@lists.squeakfoundation.org Received: (qmail 14507 invoked from network); 25 Jan 2009 16:58:56 + Received: from unknown (HELO cdptpa-omtalb.mail.rr.com) (75.180.132.121) by box2.squeakfoundation.org with SMTP; 25 Jan 2009 16:58:56 + Received: from ihkmn ([74.78.228.234]) by cdptpa-omta05.mail.rr.com with ESMTP id 20090125165853.ilsr28583.cdptpa-omta05.mail.rr@ihkmn for beginners@lists.squeakfoundation.org; Sun, 25 Jan 2009 16:58:53 + From: Ron Teitelbaum r...@usmedrec.com To: beginners@lists.squeakfoundation.org Content-Type: text/plain; charset=US-ASCII Date: Sun, 25 Jan 2009 17:58:53 +0100 X-Priority: 3 Message-Id: 20090125165853.ilsr28583.cdptpa-omta05.mail.rr@ihkmn Subject: [Newbies] Obama -- The Judas Goat X-BeenThere: beginners@lists.squeakfoundation.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: r...@usmedrec.com, A friendly place to get answers to even the most basic questions about Squeak. beginners@lists.squeakfoundation.org List-Id: A friendly place to get answers to even the most basic questions about Squeak. beginners.lists.squeakfoundation.org List-Unsubscribe: http://lists.squeakfoundation.org/mailman/listinfo/beginners, mailto:beginners-requ...@lists.squeakfoundation.org?subject=unsubscribe List-Archive: http://lists.squeakfoundation.org/pipermail/beginners List-Post: mailto:beginners@lists.squeakfoundation.org List-Help: mailto:beginners-requ...@lists.squeakfoundation.org?subject=help List-Subscribe: http://lists.squeakfoundation.org/mailman/listinfo/beginners, mailto:beginners-requ...@lists.squeakfoundation.org?subject=subscribe Sender: beginners-boun...@lists.squeakfoundation.org Errors-To: beginners-boun...@lists.squeakfoundation.org X-Nonspam: None -Original Message- From: William Barnett-Lewis [mailto:wlewis...@gmail.com] Sent: Sunday, January 25, 2009 12:03 PM To: r...@usmedrec.com Subject: Re: [Newbies] Obama -- The Judas Goat Go away baby. Forwarded to the FBI ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Returned values
Hi Gary, This is a good question. The code is probably lazily instantiating the variable so that it can be used somewhere else. If the class variable was private to the class and not intended to be used by another class and you were only planning on calling it from the class side then it kinda works. If not; you plan to have an instance call the class variable, or another class needs access to this Class variable, then you need some sort of accessor. Have a look at SmalltalkImage class variable StartUpList. There is no public accessor for it. There are values in it. Can you find a way to access that list and see what is in it? You can write code on the class side that references StartUpList (press the class variables button to see the methods that do that, or even highlight StartUpList in a class method of that object and select: Inspect.) but can you find another way? In many cases you need to access the class variable to get information that is relevant to all the class instances, or to get a single class instance (MyObject class myDefaultInstnace) from another class so class variable accessors are required. Ron Teitelbaum From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners-boun...@lists.squeakfoundation.org] On Behalf Of Gary Dunn Sent: Monday, February 28, 2011 3:07 PM To: Squeak Beginners Subject: [Newbies] Returned values While studying DBus code I came across a method that appears to set a class variable and return the value. In DBusConnection sessionBus ^SessionBus := self getBus: 0 from: SessionBus and SessionBus is a class variable. Why return the value? Why not have the sender examine the value of SessionBus? Is it only a matter of style or is this more efficient? Gary Dunn Open Slate Project http://openslate.org ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Re: You said you'd get back to me
HI all, It is clear from the message that there are issues. Squeak-dev, beginners, and vm-dev are not an appropriate place for a flame war. Could you please take us off your thread. I would also like to suggest to both of you that you find a way to solve the issues and work together. There is no solution between people without finding common ground. Find the common ground and work together or don't. The rest is a waste of your time and talent. Respectfully submitted, Ron Teitelbaum -Original Message- From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners- boun...@lists.squeakfoundation.org] On Behalf Of Casey Ransberger Sent: Wednesday, June 01, 2011 7:02 AM To: Stéphane Ducasse Cc: bo...@esug.org Board; Guillaume Ollivier; The general-purpose Squeak developers list; Marcus Denker; A friendly place to get answers to even the most basic questionsabout Squeak.; Squeak Virtual Machine Development Discussion Subject: [Newbies] Re: You said you'd get back to me Inline On Jun 1, 2011, at 2:35 AM, Stéphane Ducasse stephane.duca...@inria.fr wrote: Dear Casey So, are you done with whatever crap you had to do with the French military? This is not crap. Sorry but this is the security of our institute and its services. Non inria people cannot log on INRIA servers. This is the rule. I forgot to let you know. I paid respect to you and that at the time. You told me to wait, and I did, but I'm done waiting on you. You said you'd get back to me, but clearly I was not important enough to you for you to keep your word. Can I get started on CI for Squeak now? I do not think so because nobody from our team has the time for that. I kind of have to wonder if you didn't think you were posting on the Pharo list when you replied (I imagine, half awake) to my message to squeak-dev. I must have gotten confused and thought I should listen to you. Are you at liberty to explain why you chose to block my work over a local governmental issue that shouldn't concern the Squeak community or any of its efforts in the least? I think that your sentence above is a bit out of concern. I did not block anything. Now why do you think that the squeak community could pretend anything on us? You asked me to wait, and you're the president of ESUG or something, so I waited for you like a good dog. I'm not French and frankly I'm a bit livid that I've been waiting on you and the French government for this long: no government should ever stall open source work. This is not the point. What's the point then, sir? I'm dying to know what it is. I'm a bit confused by the month of silence I've gotten out of you. I have a life too and not doing pharo all the time. I have been promoted and I have a lot more duties. Oh, right you're busy. I think I mentioned quite a lot of respect for the work you're doing in my first messages to you: did you read them? Aren't you the president of ESUG or something? Don't you have an obligation to unblock people in the Smalltalk community or does that responsibility only extend to Pharo in your mind? I really do not like the contents and implication of the sentence above. I did probably more to squeak than you and from that I imagine that people should respect me. I did more to Smalltalk than people over the last 10 years so if you do not realize that, think about it. I am not implying anything. I asked you a few pretty direct questions, and you're avoiding answering them in a very passive-aggressive way, which is kind of difficult to get behind. As far as your illustrious work with Smalltalk, are you referencing the crap traits implementation or the actual act of dividing our community in half? Alan Kay doesn't seem to have a hell of a lot of problems with answering my questions in a timely manner, and he isn't running ESUG, so at this point, after slogging through the harder, more rigorous route to an MIT license, I kind of have to wonder what your real problem actually is. Seriously, man, what the hell? Seriously I strongly suggest you not to insult me because I do not like that. I'm not insulting you. I'm calling you out into the midway, sir. There's a difference. Come out and dance if you know how sir, elsewise get the hell off the stage. Stef ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] I don't get it
Hi Erlis, Class based language is very difficult for some people to grasp. I've trained a number of programmers. There is this AH moment when people get it. Before that the idea is just so foreign to them that they have a difficult time grasping what is going on. I would often get the question, but where do I put the code. The answer is everywhere. Thinking in terms of objects and programming their behavior makes sense. People get that. Make a Robot and teach it how to walk. If I tell the robot to walk she does. Ok great. Now I have all these objects that do stuff where do I put the code? This is where people stumble. In my opinion the leap to understanding is very short. The answer is simple. (Answer: It depends on how you want to interact with the user). I do not believe that anything is screwed up. It is just a conceptual model that requires AH! All the best, Ron Teitelbaum Immersive Collaboration Expert 3d Immersive Collaboration Consulting r...@3dicc.com Follow me on Twitter http://twitter.com/RonTeitelbaum twitter.com/RonTeitelbaum http://www.3dicc.com/ www.3dicc.com From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners-boun...@lists.squeakfoundation.org] On Behalf Of Erlis Vidal Sent: Tuesday, June 21, 2011 9:47 AM To: smalltalk Subject: [Newbies] I don't get it Hi guys, I was reading recently Jim Coplien ideas about DCI and I was surprised with the following statement: The Smalltalk people, when they put together Smalltalk originally the computational model was exactly right, in terms of thinking in terms of objects. And then they screwed it up with the language. The language is so class focused! Most languages that we're saddled with today had made this error. you can find it here: http://blog.redtexture.net/2010/06/01/coplien-on-dci-mvc/ Does someone knows what Jim is criticizing? In which sense the computational model was screwed by the language? I see smalltalk as a language that express very well the intended computational model behind. But that's just me, maybe some of you could help me to understand Jim's point. Thanks Erlis ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Anyone knows why Sophie was migrated from Squeak/Smalltalk to Java?
Hi David, Couldnt find johns comment. Any pointers? I like this comment: You'd probably have an easier time finding skilled Amiga users than skilled smalltalk developers. Thats pretty funny. Ron From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners-boun...@lists.squeakfoundation.org] On Behalf Of David Mitchell Sent: Wednesday, June 22, 2011 12:44 PM To: A friendly place to get answers to even the most basic questions about Squeak. Subject: Re: [Newbies] Anyone knows why Sophie was migrated from Squeak/Smalltalk to Java? The squeak-dev list archives are great for questions like this, google site:lists.squeakfoundation.org/pipermail/squeak-dev/ sophie java John McIntosh pointed in his reply to this thread on slashdot: http://ask.slashdot.org/story/08/10/03/1547256/How-To-Kill-an-Open-Source-Pr oject-With-New-Funding?art_pos=1 There are some great comments in that thread. On Wed, Jun 22, 2011 at 11:27 AM, Offray Vladimir Luna Cárdenas off...@riseup.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I'm searching for inspiration about my Pharo project (I want to make something like Prezi[1]). So I was revisiting the Sophie project pages and an old question came back: Why Sophie was migrated from Squeak/Smalltalk to Java? Anyone could help me with the answers? [1] http://prezi.com/ Cheers, Offray -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJOAhfmAAoJEGiex2828ICwausH/1BU6G4KBT9XDp4CjH46ONTA kMsWx8i+/sVVA1Q9mJhHLa+Gz5D6/LszfLTuaRZDTBBYNxEN/SQb3ELsdBui+CjV IDkLsLqP7aDK3gG9di+7wESrO54s8klDCAn1NCUhzJ7K1gaUqSDHd506yyzsq0Vx 5XzfIXDqB7UW6dU6cpESTcWaLmv0gSaOtDNOD4NnLWovqKKf0Ucup6Y5zqkt+X0I tHEQbYnAwF6O9bi4hv61sgXq8NdMqrlc47tDswydMiLG31WWlPKGAihdftLvCv3S wHD1tLCWTSf03u8uvvuauLt1cpV8P+CwE1sihhUn91u39ClXcYA3Ya+SQQ350/g= =6WQt -END PGP SIGNATURE- ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Testing = and == in workspace
Hi Ben, Have a look at the method for yourself. Check out the method = on the instance side of String. It should be pretty obvious when you get to the actual string comparison. All the best, Ron Teitelbaum -Original Message- From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners- boun...@lists.squeakfoundation.org] On Behalf Of Ben Coman Sent: Saturday, January 07, 2012 12:15 AM To: A friendly place to get answers to even the most basic questions about Squeak. Subject: [Newbies] Testing = and == in workspace I was trying to confirm the operation of = and == in the workspace by executing the following code.. x := 'xxx'. y := 'xxx'. z := x. (OrderedCollection new) add: (x = y) ; add: (x == y) ; add: (x=z); add: (x==z); yourself. I was confused that I was getting anOrderedCollection(true true true true) It was not until I changed to the following code... x := String newFrom: 'xxx'. y := String newFrom: 'xxx'. z := x. (OrderedCollection new) add: (x = y) ; add: (x == y) ; add: (x=z); add: (x==z); yourself. that I got the expected anOrderedCollection(true false true true) I was curious what was going on in the first case. cheers, Ben ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] classes and code snippets to download a web page
From: Joseph J Alotta Sent: Friday, May 24, 2013 1:08 PM Greetings, I am looking for classes and code snippets to download a statement from my mutual fund company. It would have to login, submit the password and then download from a link. Does anyone have code that does this? Hi Joe, Have a look at WebClient httpGet: 'http://yourAddress.com/yourLinkToDownload' It handles everything you need. All the best, Ron Teitelbaum Head Of Engineering 3d Immersive Collaboration Consulting r...@3dicc.com Follow Me On Twitter: @RonTeitelbaum https://twitter.com/RonTeitelbaum www.3dicc.com http://www.3dicc.com/ 3d ICC on G+ https://plus.google.com/u/0/b/108936249366287171125/108936249366287171125/p osts Sincerely, Joe. ___ Beginners mailing list mailto:Beginners@lists.squeakfoundation.org Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Pool Variables
Hi John, You might want to parse a configuration file but you are not sure where it is used. You could share these values using pool variables. It actually is useful but you can certainly accomplish this may other ways. All the best, Ron Teitelbaum -Original Message- From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners- boun...@lists.squeakfoundation.org] On Behalf Of Joseph J Alotta Sent: Monday, July 01, 2013 11:16 PM To: beginners@lists.squeakfoundation.org Subject: [Newbies] Pool Variables Just curious, can someone give me an real life example of when you would need to use pool variables and no other variable would work? On Jun 29, 2013, at 7:00 AM, beginners-requ...@lists.squeakfoundation.org wrote: Yes, class variables will be visible to subclasses of subclasses and so on. Also, I didn't mention pool variables, but 99.9% of the time you won't want to use those. ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Re: Read a filestream (named pipe) with a timeout
Hi David, Go back to sockets. The pain you are experiencing is not worth saving the user from answering a firewall warning that nobody pays attention to. FWIW, Ron From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners-boun...@lists.squeakfoundation.org] On Behalf Of dsl101 Sent: Monday, January 13, 2014 11:16 AM To: beginners@lists.squeakfoundation.org Subject: [Newbies] Re: Read a filestream (named pipe) with a timeout Levente, I gave it a try with the AsyncFile method you outlined, and I hit 2 problems: 1. The named pipe is created in Message mode, but repeated calls to writeBuffer:atFilePosition:onCompletionDo: seem to concatenate all the messages together - I couldn't see the equivalent of 'flush' for FileStream which separates out the messages at the pipe server end. 2. I couldn't find the equivalent of 'size' from FileStream to find out how much data was available in the next message when reading - readByteCount:fromFilePosition:onCompletionDo: seems to want me to pass this value in. Given that the messages vary in size, this is a little awkward (although I guess I could make it send a fixed 256-byte message each time, that is bound to bite me later (640kb is enough for anyone, etc.)). Anyway, if you have any other thoughts on using AsyncFile, or an alternative, I'd be most grateful. Many thanks, David. On Fri, Jan 10, 2014 at 3:37 PM, Levente Uzonyi-2 [via Smalltalk] [hidden email] wrote: On Fri, 10 Jan 2014, dsl101 wrote: Hi Ron, Thanks for that - but I can only see #dataAvailable for Sockets, not for FileStream (named pipes). I think the same kind of thing is available for pipes (you can do `pipe size` to see how much data is there), but it still doesn't wait. I'm trying to avoid a busy loop waiting for the data - like this: FileStreams don't have semaphores, so you can only use busy waiting with them. However there's AsyncFile, which can do what you want. But its interface is a bit cumbersome, and it's hardly tested/used at all. Here's how it could work: | syncSemaphore file message | syncSemaphore := Semaphore new. file := AsyncFile new. file open: 'your_pipe' forWrite: true. message := 'Here''s Johnny'. file writeBuffer: message atFilePosition: 0 onCompletionDo: [  syncSemaphore signal ]. (syncSemaphore waitTimeoutMSecs: 3000) ifTrue: [  handle timeout ]. file readByteCount: 32 fromFilePosition: 0 onCompletionDo: [ :response |  message := response.  syncSemaphore signal ]. (syncSemaphore waitTimeoutMSecs: 3000) ifTrue: [  handle timeout ]. Transcript show: 'Received: ', message; cr. file close. Using syncSemaphore is a must, because the callbacks are evaluated from another process. Levente P.S.: If you want to communicate with another program from Squeak, then you should use Sockets if possible, since those are versatile and well tested. start := DateAndTime millisecondClockValue. (pipe size 32) (DateAndTime millisecondClockValue - start 3000) ifTrue: [ (Delay forMilliseconds 50) wait. ] pipe size = 32 ifTrue: [ Get data ] ifFalse: [ Deal with timeout ] The shorter the 'wait', the more responsive the code is to data arriving on the pipe, but the more CPU it will use as it spins round the loop. The longer the 'wait', the more lag it has for data coming back. That's what I'm trying to avoid by blocking on the read, but with a way to escape after some timeout. I'm guessing the call to 'pipe next:' is a primitive, and blocks there, which is why valueWithin:onTimeout: doesn't return after the timeout, but does eventually return the correct answer. So, I'm guessing I'll have to do something like this:  *  Set up a semaphore  *  Fork the blocking read process, which will signal the semaphore if it ever returns its 32 bytes  *  In the main thread, wait for up to 3 seconds for the semaphore to be signalled  *  If the semaphore times out, kill the forked process Obviously there's a potential race at the end there, but the worst case is we throw away data which was returned at the last moment. Is there anything else you can see wrong with this approach? Thanks, Dave On Thu, Jan 9, 2014 at 9:16 PM, Ron Teitelbaum [via Smalltalk] [hidden email] wrote:    Hi Dave,    See #dataAvailable ??and #recieveAvailableData.    It's never good to call for data if you don't know you have any. ??Better to    setup a wait for data until call instead. ??    All the best,    Ron Teitelbaum    Head Of Engineering    3d Immersive Collaboration Consulting    [hidden email]    Follow Me On Twitter: @RonTeitelbaum    www.3dicc.com    https://www.google.com/+3dicc    -Original Message-    From: [hidden email] [mailto:[hidden email]    [hidden email]] On Behalf Of dsl101    Sent: Thursday
RE: [Newbies] List still active?
Yes the list is active. Ron Teitelbaum From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners-boun...@lists.squeakfoundation.org] On Behalf Of Ben Coman Sent: Saturday, April 05, 2014 12:52 PM To: A friendly place to get answers to even the most basic questions about Squeak. Cc: markdy...@gmail.com Subject: Re: [Newbies] List still active? Mark Dymek wrote: I tried to subscribe to this list but it appears I already am. Is the list no longer active? I have not been getting messages from it. _ ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners Hi Mark, The last post I received prior to yours was 22 March 2014. There is not always a lot of activity, but there are a lot of people observing and responses are pretty quick. cheers -ben ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] debugging over loops
Hi Joe, There are a few ways to get out of a loop. The best way is to just let the loop run. To do that select the space on your code you want to jump to right click and select: run to here That will take you to the place you clicked on in your code. There is another trick, loops usually have an index. This is Smalltalk after all. In the case above I just selected this code and selected Debug it 1 to: 100 do: [:i | Transcript show: i asString]. Transcript show: 'done'. While in the outer content evaluating the loop, select i change the value to 100 hit accept and bobs your uncle the loop is done. Ok so a bit of a hack but I've used it to skip over some processing and since you are debugging and know what you are doing it should be fine. Proceed is just continue and stop debugging. Restart will stop debugging at the selected method and restart that method from the beginning. Into goes into the execution of the next method and shows you what it does Over executes the next message and moves over it to the next message Through steps you through a block of code, so if you are about to execute a block, this steps you through that block Full Stack increases the number of levels you see in the upper panel. That normally shows you a subset of the execution stack. Full stack will show you the rest of the stack that called this method. Where is useful if you click around a method during debugging. It will highlight the code at its execution point. You can also just select the stack method again to do the same thing. Tally well is supposed to Tally selected code. Ignore Tally. If you want to tally something do it outside a debugger. Hope that helps! All the best, Ron Teitelbaum Head Of Engineering 3d Immersive Collaboration Consulting r...@3dicc.com Follow Me On Twitter: @RonTeitelbaum https://twitter.com/RonTeitelbaum www.3dicc.com http://www.3dicc.com/ https://www.google.com/+3dicc -Original Message- From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners- boun...@lists.squeakfoundation.org] On Behalf Of Joseph J Alotta Sent: Friday, May 30, 2014 11:55 AM To: beginners@lists.squeakfoundation.org Subject: [Newbies] debugging over loops Greetings, How do I debug over loops? I tried using the over step and the through step, but that just keeps me inside the loop. I don't know what the other buttons do, like tally. Is there somewhere that explains this? Sincerely, Joe. ___ Beginners mailing list mailto:Beginners@lists.squeakfoundation.org Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] status of the 'mvc' environment?
hirzel, thanks for the note. btw, what do you mean by _late_ andreas raab? has he passed away or something? hope that's not true. Very sad. Yes it is true he passed away early last year. http://en.wikipedia.org/wiki/Andreas_Raab Ron i will be going for an earlier version, thanks for reminding me about that approach. ~mayuresh On 2014-09-06 10:10, H. Hirzel wrote: Mayuresh, There is a thread in the mail archive Subject: All MVC image Date: Fri, Jul 6, 2012 at 5:02 PM It mentions an MVC image done by Sungjin Chun which the late Andreas Raab considered very fine. The MVC implementation in the current squeak still has problems. So if you are interested in MVC I suggest that you go for an earlier version. (Or you try Cuis which is Morphic only -- reworked by Juan Vuletich -- but is fast https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev -- only 600 classes in the image) --Hannes On 9/6/14, Casey Ransberger casey.obrie...@gmail.com wrote: Woot! I can't answer your question, but I do have a strong interest in being able to unload the Morphic environment. In something like a web server, Morphic just wastes a lot of CPU cycles, and MVC is much less expensive (as we've seen on lower end machines like the Raspberry Pi,) so it would be fantastic to elevate it to its former glory as a complete solution to the user interface of applications which do not require the flexibility of the Morphic environment, like the system browser. Unfortunately, while I have plenty of experience with the MVC pattern, I have only really just sat in awe of how fast Squeak runs inside an MVC project. Having someone around who's returning after 14 years of wandering might be just what I need to make myself useful in this regard. I know that David Lewis is also interested in seeing the MVC system a viable option for development again (IIRC he fixed some serious problems with the debugger,) and I imagine that at least some of the Seaside folks would love to drop the overhead of Morphic from their servers. I'm moving this conversation to squeak-dev, as it's more about remodelling and redecorating a part of the core of Squeak and less about using it in general. If you aren't subscribed there, you should be, or you'll end up in the moderator's queue, which can take a (relatively) longish time to turn around. If the community doesn't take the bait, feel free to contact me offline. Maybe there's a common point of interest and we can team up. --Casey Ransberger On Fri, Sep 5, 2014 at 8:39 PM, Mayuresh Kathe mayur...@kathe.in wrote: hello, i am returning to squeak after a gap of 14 years. back then, i used to work only within the 'mvc' environment as morphic hadn't taken off the way it has now. i still prefer the simplicity and lightness of the 'mvc' environment. at last use, the 'mvc' environment felt quite sluggish and crashed my squeak session multiple times. hope all is well! ~mayuresh ps: if boris gaertner is still around, could he please mail me off-list! ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] hi
Hi Hans, |x| x := 100. |x| defines a temp x. | x y | defines both x and y as temps. The assignment operator is := If you use = or == you are asking for a comparison of x and 100. All the best, Ron Teitelbaum -Original Message- From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners- boun...@lists.squeakfoundation.org] On Behalf Of Hans Schueren Sent: Thursday, October 30, 2014 1:52 PM To: beginners@lists.squeakfoundation.org Subject: [Newbies] hi hi fellows. Let x = 100 ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners