Re: [Newbies] [on] Looking for simple test coverage tool

2009-04-01 Thread Oscar Nierstrasz
Yes, I know -- I provoked Lukas to do this ;-) It is exactly what I want -- very cool. I recommend everyone to try it -- it adds a button to the SUnit Test Runner to check coverage for a given package. - on On Apr 1, 2009, at 8:53, Torsten Bergmann wrote: see

[Newbies] [on] Looking for simple test coverage tool

2009-03-30 Thread Oscar Nierstrasz
Hi. I just want to find out for a package which methods are being exercised by the test cases and which aren't. I seems like most of the infrastructure is already around (eg in TimeProfileBrowser) but I do not see where to start with coverage. Does anyone have any suggestions? (Of

Re: [Newbies] [on] Looking for simple test coverage tool

2009-03-30 Thread Oscar Nierstrasz
/@NBEe8yACPwMd9DvP/jwuFbWFl Cheers Markus Am 30.03.2009 um 11:09 schrieb Oscar Nierstrasz: Hi. I just want to find out for a package which methods are being exercised by the test cases and which aren't. I seems like most of the infrastructure is already around (eg in TimeProfileBrowser) but I do

Re: [Newbies] [on] Looking for simple test coverage tool

2009-03-30 Thread Oscar Nierstrasz
an explorer on all the names of the not executed methods of the selected category. - on On Mar 30, 2009, at 11:57, Markus Gaelli wrote: Hi Oscar you might want to have a look at http://www.squeaksource.com/@NBEe8yACPwMd9DvP/jwuFbWFl Cheers Markus Am 30.03.2009 um 11:09 schrieb Oscar Nierstrasz

[Newbies] [on] how to match partial regexes? how to match and delete string prefixes?

2009-03-28 Thread Oscar Nierstrasz
Hi Folks, Is there a way ask a regex if it matches any part of a string? matches: wants an exact match, and matchesPrefix: clearly only matches a prefix. The best I found was to abuse matchesIn: and check the size of the response, but this is not very clean. Does anybody know if there

Re: [Newbies] Float comparsion

2009-02-27 Thread Oscar Nierstrasz
Yes, we looked at that, but closeTo: uses a much larger epsilon than Float's class variable Epsilon. I suggested Camillo wrote an extension method similar to closeTo: but using the existing Epsilon (or an arbitrary one as an additional parameter). Is that the right thing to do? - on

Re: [Newbies] SBE and Squeak versions out-of-sync?

2008-03-29 Thread Oscar Nierstrasz
Hm. Nobody ever posted this problem on the SBE discussion list. That's why it has never been addressed. Ww will have a look at it and fix it as soon as feasible. - on On Mar 29, 2008, at 7:21, Randal L. Schwartz wrote: Its unfortunate that even on the second edition of SBE, this bug

Re: [Newbies] Traits Example

2008-03-17 Thread Oscar Nierstrasz
Hi Rob, What you say seems to make sense, but it is hard to tell without looking at some code. There are some simple examples of traits in Chapter 5 of Squeak by Example. http://SqueakByExample.org/SBE.pdf - on On Mar 17, 2008, at 2:37, Rob Rothwell wrote: Hello, Can anyone give me

Re: [Newbies] Overriding methods

2008-01-20 Thread Oscar Nierstrasz
Hi Blake, You should *never* *never* *never* override #basicNew! If fact, never override any #basic* methods. If you override them, then you can't get at them anymore. At some point you must actually create a new object, and the only way you can do this (well, the only reasonable way)

[Newbies] Morphic - How to animate without defining #step ?

2008-01-20 Thread Oscar Nierstrasz
Hi Folks, I have been struggling with Morphic animation. I would like to animate some different algorithms that compute solutions to various puzzles. (It is for an introduction to Squeak for high school students.) Normally animations in Morphic are done by defining the #step method.

Re: [Newbies] Morphic - How to animate without defining #step ?

2008-01-20 Thread Oscar Nierstrasz
Cool! That works. I added redraw doRedraw ifTrue: [self currentWorld doOneCycleNow] doRedraw doRedraw := true. dontRedraw doRedraw := false. so I can turn redrawing on and off. - on On Jan 20, 2008, at 13:07, Herbert König wrote: Hello Oscar, not sure if I

Re: [Newbies] Regular expressions in Squeak?

2007-11-06 Thread Oscar Nierstrasz
Hi Thor, You should use Vassili Bykov's regex package available from http://www.squeaksource.com/Regex.html Use the Monticello browser to load it. You can find documentation on the class side of the RxParser class of the VB-Regex class category. If you need step-by-step instructions to

Re: [Newbies] using collect on a ReadStream

2007-10-30 Thread Oscar Nierstrasz
Strange. I do not see these methods supported by ReadStream in my image. I only see 13 implementors of #collect: What does your implementation of ReadStreamcollect: say? Oscar On Oct 30, 2007, at 8:20, Norbert Hartl wrote: On Tue, 2007-10-30 at 08:03 +0100, Oscar Nierstrasz wrote: Hi

Re: [Newbies] Re: Beginners Digest, Vol 18, Issue 2

2007-10-04 Thread Oscar Nierstrasz
Cacheing Fibonacci is a nice standard example for memoizing that we use in our Smalltalk course. See: https://www.iam.unibe.ch/scg/svn_repos/Lectures/Smalltalk/ The relevant lecture is 07BestPractice.ppt We start with a naive solution: Fibsat: anIndex self assert: anIndex = 1.

Re: [Newbies] Re: Beginners Digest, Vol 18, Issue 2

2007-10-04 Thread Oscar Nierstrasz
Here's another solution that, like Bert's, does not require an instance variable or an additional class. the advantage, I think, is that the concerns of computing the result and managing the cache are separated, so it is easy to adapt to other situations: Integerfib self assert:

Re: [Newbies] Quinto game in SBE

2007-09-24 Thread Oscar Nierstrasz
Hi David, I made a note to underline this for the next edition. It *is* stated prominently at the beginning of the Quick Start chapter, but I guess the chapters should be more independent of each other for the Quicker Starters! Thanks for the feedback! Oscar On Sep 24, 2007, at

Re: [Newbies] reimplementing #= and #hash

2007-09-23 Thread Oscar Nierstrasz
Hi Ching, #hash should be reimplemented to make sure that objects considered to be equal will end up in the same hash bucket. The usual trick is to take a bitXor of the hashes of the instance variables: PoolQueuehash ^ member hash bitXor: processor hash Hope that helps. Oscar

Re: [Newbies] Quinto game in SBE

2007-09-19 Thread Oscar Nierstrasz
You can also grab all the example code in ascii from the book's web site (since copying and pasting from PDF does not work reliably). https://www.iam.unibe.ch/scg/svn_repos/SqueakByExample/examples.txt Just taking the already-working example from squeaksource is too much like cheating ...

Re: [Newbies] Quinto game in SBE

2007-09-19 Thread Oscar Nierstrasz
I just noticed that the example code extraction was buggy. It is fixed now, and all the code from the Quinto chapter is now in the ascii example file. Oscar On Sep 19, 2007, at 18:22, Oscar Nierstrasz wrote: You can also grab all the example code in ascii from the book's web site

Re: [Newbies] [SBE--Squeak Book

2007-09-14 Thread Oscar Nierstrasz
Hi Folks, The version of the book on the web and on Lulu is the final version of the First Edition. I just uploaded a revision yesterday since the University of Bern asked to be credited if they agree to host the domain name. But there should be no further changes for now. The might

Re: [Newbies] [SBE--Squeak Book

2007-09-14 Thread Oscar Nierstrasz
: On 14/09/2007, Oscar Nierstrasz [EMAIL PROTECTED] wrote: Hi Oscar, Thanks for the work that you and your co-authors put in on this book - it looks great! I've put the news on news.squeak.org at http://news.squeak.org/2007/09/14/squeak-by-example-now-published/ Michael

Re: [Newbies] [SBE--Squeak Book

2007-09-14 Thread Oscar Nierstrasz
Ha ha! Very good. My mistake. No one noticed till now. It is a shame to correct it ... but I guess I will have to! Thanks for pointing this out. (I really like the book Smalltalk by Example by Alec Sharp. I guess it is a Freudian slip ...) Oscar On Sep 14, 2007, at 23:02, Gregory

Re: [Newbies] Image vs. source code (was Re: Very Basic Squeak information)

2006-11-26 Thread Oscar Nierstrasz
Don't forget Self. http://research.sun.com/self/ http://en.wikipedia.org/wiki/Self_programming_language Oscar On Nov 22, 2006, at 1:10, David Douthitt wrote: Stephen Austin wrote: On 11/21/06, Bert Freudenberg [EMAIL PROTECTED] wrote: That's a thing you have to deeply understand. In all