Re: [Newbies] Scope?

2013-07-29 Thread Randal L. Schwartz
Casey == Casey Ransberger casey.obrie...@gmail.com writes: Casey Yes, class variables will be visible to subclasses of subclasses Casey and so on. Also, I didn't mention pool variables, but 99.9% of Casey the time you won't want to use those. +1 -- Randal L. Schwartz - Stonehenge Consulting

Re: [Newbies] Float-Subclasses?

2011-06-30 Thread Randal L. Schwartz
/ If you want to learn GNU Smalltalk instead, I'm sure there's an appropriate mailing list for you to join. Please don't ask about GNU Smalltalk here. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn

Re: [Newbies] Re: ifTrue ifFalse help

2011-04-27 Thread Randal L. Schwartz
Tobias == Tobias Pape das.li...@gmx.de writes: Tobias Every character is just a string of the length 1 (just like you Tobias used it in the first place). Not really. That would imply $a is 'a'. And it's very much not, which is what the OP is discovering. -- Randal L. Schwartz - Stonehenge

Re: [Newbies] Exception question

2011-04-14 Thread Randal L. Schwartz
. The debugger proceed will come back to here, but the original message needs to be resent, probably poking at a new version of a method (or one of the methods it calls). -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com

Re: [Newbies] error handling

2011-04-12 Thread Randal L. Schwartz
-- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.posterous.com/ for Smalltalk discussion

Re: [Newbies] error handling

2011-04-12 Thread Randal L. Schwartz
Ken == Ken G Brown kbr...@mac.com writes: Ken And a draft chapter on Exceptions from Pharo by Example 2 at: Ken http://pharobyexample.org/ Yes, quite nice. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn

Re: [Newbies] Can't enter class comment?

2011-04-11 Thread Randal L. Schwartz
you get an error when you command (or option or control or alt) s to save? I took 4.2 trunk, and it worked for me. And for me, it doesn't say this class has no comment. It says: A Randal is . Instance Variables Are you sure you're using the system browser? -- Randal L. Schwartz

Re: [OT] Re: [Newbies] Smalltalk klass dokumentation ?

2010-05-11 Thread Randal L. Schwartz
want docs that are as alive as the code is. Kommentaren Sun knows what they are doing. Hardly. Sun doesn't even exist anymore. How knowing is that? -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn

Re: [OT] Re: [Newbies] Smalltalk klass dokumentation ?

2010-05-11 Thread Randal L. Schwartz
for Smalltalk? My reply is Javadoc sucks compared to Smalltalk's embedded tools. Don't confuse that with the issue that the current *image* is probably underdocumented. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com

Re: [OT] Re: [Newbies] Smalltalk klass dokumentation ?

2010-05-11 Thread Randal L. Schwartz
to this is Yes, *inside the image*, which makes it nicely searchable and maintainable, although the current image lacks adequate documentation. And thank goodness this is nothing like Javadoc. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com

Re: [Newbies] Adding method to Smallinteger class

2010-04-23 Thread Randal L. Schwartz
, bay-bee. And to see what defines max:, open a method finder, type max: in the proper window, and you can see the three classes that define max:. The one closest to yours is Magnitude, which is anything that has a linear comparability. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc

Re: [Newbies] Array questions

2010-04-23 Thread Randal L. Schwartz
problem is more general than Arrays. :) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com

Re: [Newbies] JSON parsing..

2010-03-23 Thread Randal L. Schwartz
sergio == sergio 101 sergiol...@village-buzz.com writes: sergio pulled in my data... saved it to a string.. sergio then did: sergio json stream: jData. I think you want a Stream there, not a String. easy enough: json stream: jData readStream. -- Randal L. Schwartz - Stonehenge Consulting

Re: [Newbies] Howto initialize class variables

2010-03-20 Thread Randal L. Schwartz
class was loaded, it was already initialize. You've just asked it to do that again. On the *instance* side, you *must* call super initialize, because you don't get another chance to do that. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com

Re: [Newbies] sorting elements in OrderedCollection

2010-03-07 Thread Randal L. Schwartz
sergio == sergio 101 sergiol...@village-buzz.com writes: sergio if i have people, which is a list of person(s), how would i spit out a sergio list sorted by last name? collection asSortedCollection: [:a :b | a lastName = b lastName ] -- Randal L. Schwartz - Stonehenge Consulting Services, Inc

Re: [Newbies] Can a block be a string?

2010-02-19 Thread Randal L. Schwartz
Andy == Andy Burnett andy.burn...@knowinnovation.com writes: Andy I just wanted to make sure I hadn't completely misunderstood blocks! No, not completely. :) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com

Re: [Newbies] Can a block be a string?

2010-02-18 Thread Randal L. Schwartz
, and, as you've discovered, BlockContext. Browse all implementors of #renderOn: for more illumination. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy

Re: [Newbies] Get rid of an object

2010-02-01 Thread Randal L. Schwartz
by a background process. You can force it, but there's generally no need. Your car bits will eventually be recycled bits. :) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting

Re: [Newbies] System Browser: instance vs. class

2010-01-31 Thread Randal L. Schwartz
a specific car, like its color or owner. Does that help? -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http

Re: [Newbies] Using same class names

2010-01-31 Thread Randal L. Schwartz
, and therefore your tests should use parameterized class names. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http

Re: [Newbies] A question about returning values from a block

2009-12-30 Thread Randal L. Schwartz
a block are all signs that you aren't yet thinking in terms of small, single-purpose methods. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc

Re: [Newbies] Check wheater an instance of a class is actually there or not

2009-12-22 Thread Randal L. Schwartz
methods class side, and all of your instance variables as class instance variables. Then treat MyFileLibrary as if it is the only instance that ever exists, and has a global name. If that's not what you want, explain more. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777

Re: [Newbies] can't find sources

2009-11-25 Thread Randal L. Schwartz
and .changes file are named the same, and in same directory (folder), and your VM and .sources file are in the same directory as each other, which may or may not be the same as the .image and .changes file. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer

Re: [Newbies] OrderedCollection if imageMorphs

2009-11-08 Thread Randal L. Schwartz
#initialize, so someone broke the chain between there and your classes of interest by overriding #new without respecting the existing protocol. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl

Re: [Newbies] OrderedCollection if imageMorphs

2009-11-08 Thread Randal L. Schwartz
variable. Yes, it's a bright shiny object to want to subclass that, but just like subclassing SmallInteger, it's both legal and dumb. :) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix

Re: [Newbies] OrderedCollection if imageMorphs

2009-11-08 Thread Randal L. Schwartz
: handler to perform the method on the contents variable, but that can mess up your debugging, so it's better if you don't. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting

Re: [Newbies] Closure support

2009-10-30 Thread Randal L. Schwartz
| [n * 10]]. b := a collect: [:each | each value] b is now #(10 20 30 40 50 60 70 80 90 100) in a closure world. In non-closure, it would have been 100, 100, 100... -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com

Re: [Newbies] How to introspect method instance variables

2009-08-25 Thread Randal L. Schwartz
are temps or instance and then plugs in the code for me. Not the browser, the compiler. And the compiler knows all the identifiers in scope, or it couldn't compile the code. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http

Re: [Newbies] Help me FileIn

2009-08-16 Thread Randal L. Schwartz
K == K K Subramaniam subb...@gmail.com writes: K Squeak fileOuts are binary files, not text; though they contain lot of K ASCII characters. Really? When did they change? In classic Squeak, fileouts were basically the classic ST80 format, which is clearly human-readable text. -- Randal L

Re: [Newbies] Help me FileIn

2009-08-16 Thread Randal L. Schwartz
.sources and .changes, not fileOuts. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk

Re: [Newbies] Help me FileIn

2009-08-16 Thread Randal L. Schwartz
K == K K Subramaniam subb...@gmail.com writes: K On Monday 17 Aug 2009 12:17:25 am Randal L. Schwartz wrote: That explanation is about .sources and .changes, not fileOuts. K The class fileout (from browser into *.st files) uses the same format K (sequence of data chunks) as *.sources

Re: [Newbies] Help me FileIn

2009-08-15 Thread Randal L. Schwartz
there. The starting point for a fileIn is a filename, from a file/directory browser. Hence, fileIn appears there. Does that help? -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting

Re: [Newbies] Where to ask questions - Squeak Beginners and Squeak Dev?

2009-06-17 Thread Randal L. Schwartz
. :) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion

Re: [Newbies] DB support newb questions

2009-05-29 Thread Randal L. Schwartz
Gian == Gian Holland gia...@gmail.com writes: Gian Is it very easy to query proprietary DB systems such as Sql server or Gian Oracle with squeak? SqueakDBX can do some of that. http://wiki.squeak.org/squeak/6108 -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095

Re: [Newbies] [Q] Best way of doing ...

2009-05-05 Thread Randal L. Schwartz
the block anyway, passing nil for the shorter list? Or not call the block at all? And depending on your choice, you should name the method clearly: withOverlappingElementsOf:do: with:ifAbsent:do: the latter, you could call as: a with: b ifAbsent: nil do: [ ... ] -- Randal L. Schwartz

Re: [Newbies] Block and Closure

2009-04-09 Thread Randal L. Schwartz
K == K K Subramaniam subb...@gmail.com writes: K In Squeak, i in the block will refer to the i in the do: block and the last K statement will print 25 because i would be 5 when do: terminates. Not necessarily. I could see an implementation where i would be 4. -- Randal L. Schwartz

Re: [Newbies] String construction and replacement

2009-02-02 Thread Randal L. Schwartz
at the implementation of StringexpandMacrosWithArguments: to see how to use a ReadStream on the source and WriteStream to hold the destination. Also, if the logic gets to be nested blocks, I try to refactor that rather quickly. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095

Re: [Newbies] String construction and replacement

2009-02-02 Thread Randal L. Schwartz
subsequence of one or more message sends that can be pulled out and named separately with an intention-revealing selector, providing both code reuse, and clarity. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com

Re: [Newbies] closed and open interval

2008-11-24 Thread Randal L. Schwartz
OpenedInterval from: aNumber to: aNumber left: aBoolean right: aBoolean You're exposing implementation there. I suggest: beOpenLeft beClosedLeft isOpenLeft isClosedLeft and the corresponding right methods, rather than an explicit boolean. More flexibility later. -- Randal L. Schwartz

Re: [Newbies] closed and open interval

2008-11-24 Thread Randal L. Schwartz
Bert == Bert Freudenberg [EMAIL PROTECTED] writes: Bert On 24.11.2008, at 17:46, Randal L. Schwartz wrote: Filip == Filip Malczak [EMAIL PROTECTED] writes: Filip You can always make subclass of Interval for example OpenedInterval , add Filip two variables: left and right.Make new methods

Re: [Newbies] body tag in seaside

2008-11-21 Thread Randal L. Schwartz
L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion

Re: [Newbies] Launch a service to start the image

2008-10-13 Thread Randal L. Schwartz
'. ma serveFiles. (HttpService startOn: 9090 named: 'httpd') plug: ma rootModule. MyClass class shutDown self stop. MyClass class stop HttpService allInstancesDo: [:each | each stop. each unregister]. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc

Re: [Newbies] How to create new exception

2008-10-13 Thread Randal L. Schwartz
in that first block throws a SpontaneousCombustionException, you get into your second block. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http

Re: [Newbies] What is the best way to generate HTML from an array of arrays

2008-10-13 Thread Randal L. Schwartz
, and that doesn't seem very Smalltalk at Andy all! So, what is the OO way to do this? Create a visitor pattern. Teach each of strings and arrays how to present themselves. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http

Re: [Newbies] How to create new exception

2008-10-13 Thread Randal L. Schwartz
. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion

Re: [Newbies] How to create new exception

2008-10-12 Thread Randal L. Schwartz
?content=2001-files-exceptions It's a bit dated but it might give you the information you need. Even uses #on:do: like the ANSI standard suggests. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix

Re: [Newbies] Callback

2008-10-09 Thread Randal L. Schwartz
. Then go off and do something else for 10 seconds. :) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com

Re: [Newbies] How to create new exception

2008-10-09 Thread Randal L. Schwartz
? Can you just use that? -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside

Re: [Newbies] appending Strings

2008-10-03 Thread Randal L. Schwartz
even have to name the stream, because it has that temporary name inside the block. Look for the many senders of #streamContents: as examples. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix

Re: [Newbies] Re: break out of do

2008-10-03 Thread Randal L. Schwartz
^ aBlock value: [ :finalValue | ^finalValue ] ... found := self valuedEscaper: [:escape | 1 to: 10 do: [ :x | x = 3 ifTrue: [escape value: true]. ] false]. Oh geez. I think I just reinvented continuations. :) -- Randal L. Schwartz - Stonehenge

Re: [Newbies] Re: break out of do

2008-10-03 Thread Randal L. Schwartz
Bert == Bert Freudenberg [EMAIL PROTECTED] writes: Bert That would be a perfect opportunity to employ #valueWithPossibleArgument:. And with this, the newbies heads have exploded. :) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http

Re: [Newbies] substring

2008-10-03 Thread Randal L. Schwartz
. That is, 'abcde' allButFirst: 2 would return 'cde'. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com

Re: [Newbies] 'locking' an object

2008-10-02 Thread Randal L. Schwartz
object that intercepts all messages and looks for the dangerous ones, but that's gonna be a bit hard to do, and won't be aware of any new code that might call the mutating primitives directly. (*Any* method can call a primitive.) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503

Re: [Newbies] 'locking' an object

2008-10-02 Thread Randal L. Schwartz
simulation as long as everyone cooperates. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk

Re: [Newbies] 'locking' an object

2008-10-02 Thread Randal L. Schwartz
, hand-compiling them if necessary. Unless you're now voting for an immutable method dictionary. :) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc

Re: [Newbies] 'locking' an object

2008-10-02 Thread Randal L. Schwartz
Bert == Bert Freudenberg [EMAIL PROTECTED] writes: Bert How would that outsider get at the class of the object? I believe #class is NoLookup, meaning that I can't define a method of my own to do something weird with that. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503

Re: [Newbies] 'locking' an object

2008-10-02 Thread Randal L. Schwartz
Randal == Randal L Schwartz [EMAIL PROTECTED] writes: Randal I believe #class is NoLookup, meaning that I can't define a method Randal of my own to do something weird with that. Feh. Ignore me. I have no idea what I'm talking about. :) -- Randal L. Schwartz - Stonehenge Consulting Services

Re: [Newbies] capturing output in memory

2008-10-01 Thread Randal L. Schwartz
. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion

Re: [Newbies] capturing output in memory

2008-10-01 Thread Randal L. Schwartz
Randal == Randal L Schwartz [EMAIL PROTECTED] writes: Randal myStream = WriteStream new. Sorry. (WriteStream on: '') Randal use myStream as if it were a FileStream Randal myString := myStream contents. Randal That's the nice part about the various protocol families. It mostly just Randal

Re: [Newbies] constants

2008-09-29 Thread Randal L. Schwartz
initialize, meaning that the initialize method is actually called very explicitly once the class is loaded. Modern code management systems simulate this in various ways. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com

Re: [Newbies] who signals?

2008-09-29 Thread Randal L. Schwartz
. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion

Re: [Newbies] who signals?

2008-09-29 Thread Randal L. Schwartz
Randal == Randal L Schwartz [EMAIL PROTECTED] writes: Randal Just browse all references to the class. That's a command-N (mac) Randal when hovering over the class name in the second pane of a standard Randal browser. And when I typed N, I meant shift n :). -- Randal L. Schwartz - Stonehenge

Re: [Newbies] Removing 'dead' instances

2008-09-28 Thread Randal L. Schwartz
there does nothing, since you aren't updating the object that was originally in each. You need to tell anyone still holding a reference to your objects to let go. Some advice can be found at http://wiki.squeak.org/squeak/2176 -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095

Re: [Newbies] pretty printing

2008-09-28 Thread Randal L. Schwartz
: aString collect: [:char | char xmlEscaped]. Internally, that uses a Stream, which extends itself nicely as new data appears. In your version, the early string data is getting repeatedly copied to make each new string. Ouch. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777

Re: [Newbies] dev image OB Package Browser

2008-09-28 Thread Randal L. Schwartz
used it, it would save you about 1-2 characters of typing per line. But I usually get those typed without noticing anyway. :) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting

Re: [Newbies] Re: Removing 'dead' instances

2008-09-28 Thread Randal L. Schwartz
would be your other object. :) The safe way to become: something innocent is often become: String new. Even so, it's (a) very slow on Squeak and (b) a bit shocking to the holder of the value, who still expects the old object at its referenced oop. -- Randal L. Schwartz - Stonehenge Consulting

Re: [Newbies] scripts

2008-09-26 Thread Randal L. Schwartz
? The longer answer is that we generally *don't* do that, so there's not a lot of discussion or support for it, but there it is. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting

Re: [Newbies] scripts

2008-09-26 Thread Randal L. Schwartz
Randal == Randal L Schwartz [EMAIL PROTECTED] writes: Bert == Bert Freudenberg [EMAIL PROTECTED] writes: Bert Am 26.09.2008 um 05:12 schrieb Mark Volkmann: Is it possible to run a Squeak program from a terminal window and have access to the stdin and stdout streams from the Smalltalk code

Re: [Newbies] squeak startup script

2008-09-26 Thread Randal L. Schwartz
, and it it will work as advertised for unix platforms. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk

Re: [Newbies] names for boolean keyword arguments

2008-09-26 Thread Randal L. Schwartz
argued that automatic creation of getters and setters is wrong. This is clearly an example of where automatic getters and setters lead you to bizarre code. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn

Re: [Newbies] enumerated values

2008-09-26 Thread Randal L. Schwartz
Mark == Mark Volkmann [EMAIL PROTECTED] writes: Mark Is there an equivalent of Java's enumerated values (enum) in Smalltalk? I hope not! -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix

Re: [Newbies] Collection in Smalltalk

2008-09-24 Thread Randal L. Schwartz
Alex == Alex Chi [EMAIL PROTECTED] writes: Alex So for example if the input is 'SmallTalk' the result is ('SmallTlk' Alex 'SmllTlk'). Presuming the input came from someone who didn't know that Smalltalk doesn't have a capital T. :) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc

Re: [Newbies] Most elegant way to delete instances

2008-09-14 Thread Randal L. Schwartz
allInstances for *real* code. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk

Re: [Newbies] Host OS shell call

2008-09-13 Thread Randal L. Schwartz
Steve == Steve Lloyd [EMAIL PROTECTED] writes: Steve Is there a Squeak class to allow calling a shell command in the host OS Steve and receiving the result? Yes, it's called OSProcess (I think), and is installable from SqueakMap or Universes. -- Randal L. Schwartz - Stonehenge Consulting

Re: [Newbies] Passing multiple parameters.

2008-09-12 Thread Randal L. Schwartz
have: result := theSolver solveQuadraticEquationForA: a andB: b andC: c. or something like that. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc

Re: [Newbies] Arrays within arrays

2008-09-04 Thread Randal L. Schwartz
)). And that works for me. What version are you using? -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk

Re: [Newbies] Smalltalk is a Mystery to Me

2008-08-23 Thread Randal L. Schwartz
: Set new. Eventually, the newbie can learn that the cut-n-paste-and-slightly-edit that I just did to make that can be replaced by a proper loop. But at least that cut/paste cycle won't be repeated everywhere else in the code. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503

Re: [Newbies] Smalltalk is a Mystery to Me

2008-08-22 Thread Randal L. Schwartz
variables that are acted upon in similar ways really ought to be part of a common data structure rather than unrelated variables. hands := IdentityDictionary newFrom: (#(north east south west trick) collect: [:each | each - Set new]). -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1

Re: [Newbies] The Weekly Squeak Summary No. 19: May 4 - Aug 16, 2008

2008-08-18 Thread Randal L. Schwartz
week where I read the week's Squeak news. It's usually near the end if you aren't interested in the rest of the podcast, but I suggest you listen to the entire podcast anyway, as it covers a wide variety of smalltalk topics. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777

Re: [Newbies] Why do Seaside's table tags e.g. td etc., live 'outside' of table?

2008-08-12 Thread Randal L. Schwartz
there are clearly some shortcuts that already do this, but to require this enmasse doesn't seem to gain much. The always ask the canvas for a tagbrush seems like a very workable rule. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http

Re: [Newbies] Re: Tim's Fix for LargeIntgerAtRandom

2008-08-07 Thread Randal L. Schwartz
Jerome == Jerome Peace [EMAIL PROTECTED] writes: Jerome So what do you suggest to solve the problem? Use the code from the Crypto team. If you want that included in the core, make sure it has an MIT license, and submit it as a bug/change-request. -- Randal L. Schwartz - Stonehenge

Re: [Newbies] Can Seaside applications support REST style calls?

2008-08-06 Thread Randal L. Schwartz
of those particular method names, you'll get a lot of examples of how to use them. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http

Re: [Newbies] Is it generally considered better practice for an object to access its own variables via its getter methods?

2008-08-06 Thread Randal L. Schwartz
is a subject to debate (read: religious war). I hope you haven't accidentally triggered that thread here. I tend to do the simplest thing that works, and leave it at that. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com

Re: [Newbies] true/false defined where?

2008-08-05 Thread Randal L. Schwartz
, and this is what allows them to communicate, so you can't just add new things here or change the ordering without building a corresponding new VM. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl

Re: [Newbies] Re: Tim's Fix for LargeIntgerAtRandom

2008-08-05 Thread Randal L. Schwartz
of entropy by calling a 56-bit PRNG twice. It's not progress if it breaks it. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http

Re: [Newbies] Re: What's wrong with this statement?

2008-08-03 Thread Randal L. Schwartz
at it this way. The cycle will repeat in 2**53 calls to the random number generator. By calling it 10 times for each result, you're using causing it to loop 10 times as fast. You can't get 10 pounds of entropy out of a 5 pound sack. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503

Re: [Newbies] Best place to ask Smalltalk questions?

2008-08-01 Thread Randal L. Schwartz
to learn, it might be best to start with an appropriate list for that vendor, simply because you might not know whether it's Squeak-specific or not. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix

Re: [Newbies] What's wrong with this statement?

2008-07-31 Thread Randal L. Schwartz
bits on this one. :) It's pretty likely you have a 16-bit random generator, so there just aren't enough bits to make the low-order bits random in any way shape or form. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com

Re: [Newbies] What's wrong with this statement?

2008-07-31 Thread Randal L. Schwartz
Randal == Randal L Schwartz [EMAIL PROTECTED] writes: Timothy == Timothy J Miller [EMAIL PROTECTED] writes: Timothy (2 raisedTo: 128) atRandom hex Timothy Gives me results like: Timothy B990880B73211001 Timothy BFD3A7B37FA75001 Timothy

Re: [Newbies] Re: What's wrong with this statement?

2008-07-31 Thread Randal L. Schwartz
Timothy == Timothy J Miller [EMAIL PROTECTED] writes: Timothy It certainly is inconsistent to have an Integer method that doesn't Timothy invisibly handle large ints. The Integer method is fine. The problem is the lack of bits from the PRNG from class Random. -- Randal L. Schwartz

Re: [Newbies] What's wrong with this statement?

2008-07-31 Thread Randal L. Schwartz
. There are only 56 bits in an IEEE Float. You can't get any more random bits from that. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http

Re: [Newbies] How to shorten a method (using inject: into: ?)

2008-07-22 Thread Randal L. Schwartz
]) sum. Well, the #detectSum: solution is even cleaner. :) mTotal := testSets detectSum: [:each | each maternalCount]. It's just a horribly named method, which is why I didn't find it at first. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED

Re: [Newbies] How to shorten a method (using inject: into: ?)

2008-07-22 Thread Randal L. Schwartz
K == K K Subramaniam [EMAIL PROTECTED] writes: K Entering sum in a new line in workspace or text object and then pressing K ALT+SHIFT+W would have revealed detectSum: (it is eleventh in my list). Yeah, I looked near the implementation of #sum instead. Ooops. -- Randal L. Schwartz

Re: [Newbies] Re: How to shorten a method (using inject: into: ?)

2008-07-22 Thread Randal L. Schwartz
and underutilized. :) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion

Re: [Newbies] Re: How to shorten a method (using inject: into: ?)

2008-07-21 Thread Randal L. Schwartz
-- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion

Re: [Newbies] Re: How to shorten a method (using inject: into: ?)

2008-07-21 Thread Randal L. Schwartz
Randal == Randal L Schwartz [EMAIL PROTECTED] writes: Randal Huh? Why the heck is that called #detectSum: instead of just #sum:? [...] Randal /me makes a note to look under #detectFoo: next time In fact, now that I look at it, it's really not like #detectMax:, which returns the *original

Re: [Newbies] What is a weak reference

2008-07-15 Thread Randal L. Schwartz
to the Process that others can stuff information, so that Process allInstances can get my process watcher what it needs instead. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting

Re: [Newbies] Re: What is a weak reference

2008-07-15 Thread Randal L. Schwartz
nicolas == nicolas cellier [EMAIL PROTECTED] writes: nicolas But maybe we have just quit the beginners rails... I think the moment you mention Weak, you're already outside beginner space. :) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED

Re: [Newbies] What is a weak reference

2008-07-14 Thread Randal L. Schwartz
at the moment. Absolutely. A clearly seminal book. My dog-eared copy is within reach, at least when I'm in my home office. Too bad Kent has gone off to the Java, and now C# realm, if I heard right. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED

Re: [Newbies] new Smalltalk videos

2008-07-14 Thread Randal L. Schwartz
a mac, and a good mike setup. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside

  1   2   >