Andres,
No kidding Color>>#hash is not good enough! I changed the cache's implementation from a Dictionary to a coupled SortedCollection pair and the execution time went down from 4m 15s to 1m 30s!!!
Looks like you should use a PluggableDictionary instead. They allow you to supply a custom hash (and equality) block for exactly this kind of operation where you basically have some good assumptions about the size and the distribution of objects. Give it a try.
By the way, if you get aForm and send edit to it in a morphic world, it hangs until you press ctrl-break, gives out a strange error and you can continue by aborting it. And when you get up to the parent (still MVC) project, all your aborted edits appear on the screen... ???.
Yup. #edit is a leftover from MVC where it opens a BitEditor on the form. This should be fixed to open up a SketchEditorMorph when running in Morphic.
Andreas
-- PLEASE NOTE NEW EMAIL ADRESS!
+===== Andreas Raab ========= (andreasr@wdi.disney.com) ==+ | Walt Disney Imagineering Phone: +1 818 544 5016 I I Glendale, CA Fax: +1 818 544 4544 I +======< http://isgwww.cs.uni-magdeburg.de/~raab >========+
I have just finished a preliminary version of a plugin linking Sqeueak to the most recent version of Philip Hazel's excellent PCRE regular expressions library. (The Python Regular Expression functionality was derived from an earlier version of this library.)
The following examples are illustrative:
'a.*c' reSearch: 'xxxxxxxxx'
evaluates to: nil
('a.*c' reSearch: 'xxxaxxxcxxx') match
evaluates to: 'axxxc'
('a(.*)c' reSearch: 'xxxxabbbbcxxx') matchAt: 1
evalutates to: 'bbbb'
('\w+' reGsearch: 'this is a test' ) collect: [:m | m match]
evaluates to: OrderedCollection ('this' 'is' 'a' 'test' )
'\w+' reGsearch: 'this is a test' sub: [:m | '<', (m match), '>']
evaluates to: '<this> <is> <a> <test>'
To install the plugin:
(1) download and unpack:
ftp://ftp.gate.net/pub/users/werdna/rePluginMacPPC2.3a.sit
(2) Copy the changeset, the plugin and the file entitled 'regular expressions' to your squeak directory.
(3) Start squeak and fileIn the changeset. There is some documentation in the comments for classes ReMatch and RePattern. A more complete discussion of the regular expressions used in the library can be found by executing the following:
(FileStream oldFileNamed: 'Regular Expressions') edit
The published plugin is setup for Mac PPC only at this time. I believe it should be fairly straightforward to port it to other platforms, and would be pleased to encourage and assist anyone who wishes to do so.
I look forward to any and all comments and complaints.
Best, Andy
Andrew C. Greenberg wrote:
I have just finished a preliminary version of a plugin
linking Sqeueak to the most recent version of Philip Hazel's excellent PCRE regular expressions library. (The Python Regular Expression functionality was derived from an earlier version of this library.)
The following examples are illustrative:
'a.*c' reSearch: 'xxxxxxxxx' evaluates to: nil ('a.*c' reSearch: 'xxxaxxxcxxx') match evaluates to: 'axxxc' ('a(.*)c' reSearch: 'xxxxabbbbcxxx') matchAt: 1 evalutates to: 'bbbb' ('\w+' reGsearch: 'this is a test' ) collect: [:m | m match] evaluates to: OrderedCollection ('this' 'is' 'a' 'test' ) '\w+' reGsearch: 'this is a test' sub: [:m | '<', (m match), '>'] evaluates to: '<this> <is> <a> <test>'
To install the plugin:
(1) download and unpack: ftp://ftp.gate.net/pub/users/werdna/rePluginMacPPC2.3a.sit (2) Copy the changeset, the plugin and the file entitled
'regular expressions' to your squeak directory.
(3) Start squeak and fileIn the changeset. There is some
documentation in the comments for classes ReMatch and RePattern. A more complete discussion of the regular expressions used in the library can be found by executing the following:
(FileStream oldFileNamed: 'Regular Expressions') edit
The published plugin is setup for Mac PPC only at this time. I believe it should be fairly straightforward to port it to other platforms, and would be pleased to encourage and assist anyone who wishes to do so.
I would give it a try if someone would provide a compressed tar package ....
Markus
The published plugin is setup for Mac PPC only at this time. I believe it should be fairly straightforward to port it to other platforms, and would be pleased to encourage and assist anyone who wishes to do so.
I would give it a try if someone would provide a compressed tar package
ftp://ftp.gate.net/pub/users/werdna/rePlugin2.3a.tar
squeak-dev@lists.squeakfoundation.org