Re: [Pharo-project] How i can retrieve the global by its name?
On Thu, May 2, 2013 at 9:29 AM, Esteban Lorenzano esteba...@gmail.comwrote: #bindedClass #bindedClassOn: anEnvironment looks clearer to me. Esteban maybe: #boundClass #boundClassOn: anEnvironment
Re: [Pharo-project] subStrings: suggestion
On Tue, Feb 19, 2013 at 3:28 PM, Frank Shearar frank.shea...@gmail.comwrote: snip It is indeed strange behavior, but I think we inherited that from squeak. No, Squeak has (since 2005) had still another behaviour: '' subStrings: ';' '1;2;3' subStrings: ';' #('1' '2' '3') (Note the ';' rather than $;, because Squeak's version takes a String of separators.) frank Yes, but it still has the odd behavior: '' subStrings: ';' = $( ) '1;2;;3' subStrings: ';' = #('1' '2' '3') And the separators don't have to be strings - they can be any collection of characters. Chris
Re: [Pharo-project] I hate 'as yet unclassified'
On Wed, Jan 30, 2013 at 12:53 PM, Chris Muller asquea...@gmail.com wrote: On Wed, Jan 30, 2013 at 2:40 PM, Camillo Bruni camillobr...@gmail.com wrote: I just wrote a simple classifier which is going to be used in Nautilus. Basically it is an extensions of the existing code. [snip] 3. know protocols of super implementors I admit that is a good one. I think this is execllent. I'd appreciate is a lot. 4. gather all implementors in the system and choose the most used protocol. Not so much this one. If you limited the scope (say to siblings - subclasses of it's superclass of the same level, ignoring Object as a superclass), I think this would also be excellent. Usually when I'm creating a set of related classes, I'll wind up making the categories (or protocols) similar - any help here is indeed help. -Chris
Re: [Pharo-project] Must OSPlatform classosVersion be deprecated?
On Tue, Jan 22, 2013 at 12:13 PM, David T. Lewis le...@mail.msen.comwrote: On Tue, Jan 22, 2013 at 08:05:02PM +0100, Marcus Denker wrote: On Jan 22, 2013, at 5:27 PM, H. Hirzel hannes.hir...@gmail.com wrote: Dave This works in Pharo 2.0? Yes, Smalltalk os version is right for Pharo 2.0. I'm looking for a way to modify the following method so that it adds support for Pharo 2.0, so that it continues to work in the other images, and so that it does not raise deprecation warnings or DNUs in any of the images. Could you capture for deprecation of OSPlatform osVersion, and resend the other method (Smalltalk osVersion current osVersion)? Or, trap for Deprecation and resume it (ignore deprecation - once it is removed, you'll automatically fail-over to the new code).
Re: [Pharo-project] Spreadsheet widget
One that I've used recently (last year) was the result of a GSOC project: http://www.squeaksource.com/GSoCSqueakland.html specifically the GSoC-Spreadsheet part. Of course, there is a lot of stuff about etoys there that may cause issues. -Chris On Mon, Jan 14, 2013 at 5:39 AM, Torsten Bergmann asta...@gmx.de wrote: For Morphic look at Hans Martin Mosners work (Spreadsheet.zip) here: http://lists.squeakfoundation.org/pipermail/squeak-dev/2008-September/131244.html For seaside/web there are many jquery plugins for that available on the web itself. For example: http://www.jquery4u.com/plugins/7-jquery-microsoft-excel-type-plugins/ Bye T.
Re: [Pharo-project] Pharo 2.0 BETA, Configs and Seaside
On Thu, Dec 6, 2012 at 1:16 PM, Torsten Bergmann asta...@gmx.de wrote: 1. Since NativeBoost is now integrated I removed the config from the ConfigurationBrowser - because it makes no sense to install when it is already in the image :) ... Do people only use the ConfigurationBrowser for initial installing of the packages, or does it get used for when the package is updated? If the former, this makes a lot of sense; if the later, you might want to rethink removing it. -Chris
Re: [Pharo-project] Pharo 2.0 BETA, Configs and Seaside
On Thu, Dec 6, 2012 at 2:32 PM, Torsten Bergmann asta...@gmx.de wrote: 1. Since NativeBoost is now integrated I removed the config from the ConfigurationBrowser - because it makes no sense to install when it is already in the image :) ... Do people only use the ConfigurationBrowser for initial installing of the packages, or does it get used for when the package is updated? If the former, this makes a lot of sense; if the later, you might want to rethink removing it. When there is a newer NB version we will either integrate it into the base image or put the config (with a higher version declared as stable) in again so this newer version can be loaded easily from the tool. So, removing it from the browser is basically removing it from the repository? Then if a new one shows up (and is appropriate for Pharo 2.0) you'd add it to the repository again? That makes sense. And should have been obvious if I had read and thought about your first email a bit longer. -Chris
Re: [Pharo-project] Open Source and Constraints | Documentation is King
On Tue, Dec 4, 2012 at 6:30 AM, Henrik Sperre Johansen henrik.s.johan...@veloxit.no wrote: On 04.12.2012 12:49, Stéphane Ducasse wrote: Comments are ***REEEAAY*** important because they help a guy reading the code to say yes you are smart and you got it right I will explain you why. Even writing comment in test is cool. Stef I would go so far as to say comments in tests are *especially* important. It's sometimes hard to tell whether a failure is due to a faulty test, or an actual bug, when you have no idea (even when looking at the code) what case the test was actually written to cover. With a comment of what the test was intended to do, you have a better feel for how to handle it. True, to a point. As long as later coders that alter the method/class/package either adhear to the original comments, or update the comments when they change the behaviour/intent of the code, or at the very least, delete the comment when they make significant changes that would invalidate the comment, this is true. If, on the other hand, the comments are left as is while potentially drastic changes are made, then the comments become seriously misleading. Not to say comments are bad - but we must all work to make sure the comments that exist stay relevant. -Chris
Re: [Pharo-project] Vim Keys?
There is a package (for an ancester of Pharo) that added VIM keys (and Emacs, apparently) to the editors at: http://www.squeaksource.com/SVI.html You may be able to load this in and it will work, or the code may have drifted quite a bit to the point where it just doesn't work anymore. I have not tried using it for years, myself. -Chris On Thu, Nov 29, 2012 at 11:52 AM, ☈king rkingd...@sharpsaw.org wrote: Hi all. I'm extremely new to Smalltalk, but I was wondering if there was a way to make Pharo have vi-keys (or even better, vim-keys)? Thanks! —☈
Re: [Pharo-project] Bug. Incredible date parsing by StringasDate
you are aware that both of those dates are correct, just in different parts of the world? Of course, the first could be 1 March, 2012 just a easily as 3 January, 2012. If you make it consistent, which way are you leaning towards? Maybe more specific asXXXDate keywords to indicate which one you want? -Chris On Sun, Oct 28, 2012 at 10:22 AM, Denis Kudriashov dionisi...@gmail.com wrote: Hello. I found very crappy behaviour: '01.03.2012' asDate = 3 January 2012 '30.03.2012' asDate = 30 March 2012 As you can see for first line #asDate use first number as month. But for last line It use second number as month. We should fix or remove such inconsistent behaviour. We all like to test something inside debugger or browser. Such way I was learn how I can parse date from String. And I saved it immediatelly at my code. But when current date become greater then day 12 my code become broken. And when I see this there was many nice russian words :)) I open ticket http://code.google.com/p/pharo/issues/detail?id=6884
Re: [Pharo-project] vm download site
On Wed, Sep 26, 2012 at 11:42 AM, Camillo Bruni camillobr...@gmail.com wrote: http://pharo.gforge.inria.fr/ci/vm/mac http://pharo.gforge.inria.fr/ci/vm/linux and once we fixed the win builds http://pharo.gforge.inria.fr/ci/vm/mac/win Is that win location right? a subset of mac? best igor + cami
Re: [Pharo-project] [ANN] Zinc WebSockets
On Wed, Sep 12, 2012 at 2:45 PM, Sven Van Caekenberghe s...@stfx.eu wrote: Thanks for trying and for giving feedback, Pavel. A live, connected socket cannot survive an image save, I think. ... Sven I could have sworn there was code in the guts of the save/start code that could tell if the image was resuming from a cold start, or from a 'save but don't quite' start. If this still exists, then you could just leave the connection open during save, and if just doing a save, let it stay open (thus surviving the save), but from a cold start close/remove the socket, since it is definitely no longer around. Sorry for the vagueness. -Chris
Re: [Pharo-project] Rounding float question again
On Fri, Sep 7, 2012 at 7:41 AM, Denis Kudriashov dionisi...@gmail.com wrote: Thank's for your answer. Only one of your solutions works: (146.015 asMinimalDecimalFraction roundTo: 1/100) asFloat = 146.02 Others not works: (146.015 * 100.0) rounded / 100.0 = 146.01 (146.015 asFraction roundTo: 1/100) asFloat = 146.01 Another option it to load FixedDecimal, and use it for you fixed place work: ('146.015' asFixedDecimal: 3) roundTo: ('0.01' asFixedDecimal: 2) == 146.02 (Yes, Nicolas, I still haven't come up with a short way of specifying FixedDecimals, but it will still load into Pharo without an issue.) http://www.squeaksource.com/FixedDecimal.html -Chris
Re: [Pharo-project] Rounding float question again
On Fri, Sep 7, 2012 at 10:34 AM, Nicolas Cellier nicolas.cellier.aka.n...@gmail.com wrote: 2012/9/7 Denis Kudriashov dionisi...@gmail.com: Thank's for your answer. Only one of your solutions works: (146.015 asMinimalDecimalFraction roundTo: 1/100) asFloat = 146.02 Others not works: (146.015 * 100.0) rounded / 100.0 = 146.01 (146.015 asFraction roundTo: 1/100) asFloat = 146.01 That's expected, '146.015' asFloat is already smaller than (146015/1000) so if you convert the float value asFraction or asScaledDecimal, it's too late, rounding error is already there. You have to use Fraction, ScaledDecimal or FixedDecimal of Chris right from the beginning, and don't use Float at all. If you used ScaledDecimal, you will need to make sure that all parts of it are ScaledDecimal, too - no mixing of Floats anywhere: This doesn't work: 146.015s3 roundTo: 0.01 = 146.01 but this does 146.015s3 roundTo: 0.01s2 = 146.02s2 -Chris
Re: [Pharo-project] Fwd: Working with Pharo 1.4/2.0 …
On Thu, Sep 6, 2012 at 8:30 AM, Sean P. DeNigris s...@clipperadams.com wrote: Below is a blog post and my reply... If anyone has anything to add, here's the link... https://schrievkrom.wordpress.com/2012/09/06/working-with-pharo-1-42-0/ ... * creating accessor methods for instance attributes is not speedy and takes too much clicks * then I looked for a setting framework and I was really surprised to see, how difficult it was – or at least the documentation I read about it. After working with the setting framework of VASmalltalk I would prefer the simple approach than a perhaps even more powerful approach. ... * accessor creation – will you describe what steps you took (e.g. manual creation, context menu (there are two possiblities here), etc)? If you illustrate your ideal behavior, I will create an issue and push to include it in Nautilus… I haven't worked with the framework in VA, and personally, don't like frameworks to create accessor methods. However, just yesterday, I really wished that the debugger had a button when enountering an unknown method called 'create accessor' or something similar - if the method looks like an accessor method for a variable that doesn't have one, offer up the option of letting the runner (coder) just create the simplest flavor right there in the debugger. It would show up right next to the Create button at the same time. My favorite method of coding, in any case... -Chris
Re: [Pharo-project] FFI Python
On Wed, Sep 5, 2012 at 3:58 PM, Santiago Bragagnolo santiagobragagn...@gmail.com wrote: Hi all! I'm currently working in a project related with ROS (robot operative system), which already have a library to develop in C++ and other to do the same at Python. So, there a lot of variables to contrast to make a choice (performance, code-easy-to-prototype, flexibility, and a lot more), but the main variable is the accessibility from Pharo, then the question is, is there any project that use python from pharo? Or, if i select python i should write a library in C that bootstrap python and give access to pharo via FFI? I looked in the list's mails and in google without any success. Thanks in advance! Santiago. Not in Pharo (that I know of), but in OpenQwaq (a derivative of Squeak - from Pharo's past, I believe) it does include Python scripting: * Python Scripting of 2d applications and 3d objects (taken from the wikipedia on OpenQwaq). I'm not sure how they did it - not being a Python guy myself. -Chris
Re: [Pharo-project] [ANN] NativeBoost v 1.3
On Tue, Aug 28, 2012 at 2:20 PM, Igor Stasenko siguc...@gmail.com wrote: On 28 August 2012 16:31, S Krish krishnamachari.sudha...@gmail.com wrote: Cannot parse. You want to integrate it till it fails? :) Yes.. keep it in from now on in the main base till it shows up as unusable. I do not mind occasional instability.. or something I can workaround... :). i think you meant 'i will use it till i find a better alternative'. That's fine. I do not pretend to have best of the best, which will answer all of your needs :) Hmm. I read S Krish as saying that he wants to use it until it proves itself so broken, he can't use it. I suspect as long as you are interested in it, he won't find that to actually happen...
Re: [Pharo-project] How to correctly remove a package for everywhere?
In Monitcello days (and browser), there is Delete working package, and Unload package. I suspect deletePackageNamed: is all about removing the idea of the package, but not the code (as you found) - just making the code part of the image and not a package. You want something like unloadPackage: or #unloadPackage to remove the code (and package) from the system. Assuming that is still there, that is (I don't have a version 2.0 yet). Wouldn't your drive to package everything make you want to guard against the deletePackageNamed: behaviour? Only delete it if there is no code associated to the package, otherwise complain somehow. -Chris
Re: [Pharo-project] FileReference should throw error when deleting unexisting files?
On Mon, Jun 11, 2012 at 2:32 PM, petton.nico...@gmail.com wrote: Maybe #ensureDeleted would be better? Nico I like #ensureDeleted (make sure it doesn't exist)
Re: [Pharo-project] String printOn: / storeOn:
On Tue, Jun 5, 2012 at 12:53 PM, Camillo Bruni camillobr...@gmail.com wrote: I think that printing on streams could be improved by changing String #printOn: to printOn: aStream aStream nextPutAll: self Ah, but if you change it to this, then String streamContents: [ :s| s print: 'an Object'] equals: String streamContents: [ :s| s print: Object new ] That is, from the printed version, you can't tell which one is actually a string. Which could get weird in Inpsectors. -Chris
Re: [Pharo-project] What i would like to have instead of progress bar
On Thu, May 31, 2012 at 4:58 PM, Igor Stasenko siguc...@gmail.com wrote: If you would ask me (yeah nobody asking me, by i will tell anyways ;) ) how the indication of a progress of some process should look like, here's my potential answer: snip - no stupid nesting.. i don't care what happens inside of something else happens.. if it is really necessary, i would just replace the title of a task with it's subtask title while it performing. this is just about first rule: it has to be a single line, not a bunch of lines stocking one over another.. i think this is abuse. most of the times, i just need a notion of progress of a whole thing, not progress of it's subthings I have cases where I have multiple background processes going on that occassionally wake up, and in that case, I really, really appreciate the stacking progress bars - I can tell that one (or more) background processes have kicked off. This isn't quite 'nesting', although I think it uses some of the same features. As long as some result out of this discussion doesn't remove that capability, I agree with what you are saying. -Chris
Re: [Pharo-project] NB FileSystem Primitives Speedup
On Fri, Jun 1, 2012 at 12:17 PM, Camillo Bruni camillobr...@gmail.com wrote: For those complaining lately about the new FS being a bit slow ;) Igor and I hacked together a test version for accessing files using NativeBoost. From our stupid example (listing /usr/bin with ~1k Files) we were incredible 40 times! faster than the file primitives in the current image (5ms instead of 200ms). With the current FS infrastructure such a migration can be done absolutely painless by simply replacing one back-end a time. best cami Can you share this work? I've been interested in this particular use for NB for a while now, but haven't gotten around to trying it (or, unfortunately, NB itself) yet. This would probably push me into a user role - and is definitely something I'd like to see. -Chris
Re: [Pharo-project] SciSmalltalk first commit
On Mon, Apr 2, 2012 at 10:36 AM, Serge Stinckwich serge.stinckw...@gmail.com wrote: In order to have something coherent, every sub-librairies of Sci-Smalltalk should be packaged as 'Math-XXX'. Right now, i have Math-Random and Math-Random-Tests. Just curious, why Sci in the name, but Math as the package? I could see that growing over time, but to start with the discrepancy seems odd. Not a problem, just odd. -Chris
Re: [Pharo-project] ClassBuilder depending -in some way- on text
On Fri, Mar 9, 2012 at 2:09 AM, Igor Stasenko siguc...@gmail.com wrote: On 9 March 2012 04:28, Chris Cunningham cunningham...@gmail.com wrote: Guille, this likely pre-dates Exceptions (or at least wide-spread use of them). A much better direction is to use exceptions (or Announcements?) here, and have a process capture them and display appropriately for what they can display. The mechanism should probably include Class name and exception text, which could be rich-formatted as above, or plain formatted for command-line UI, or interrogated for other observers. if you replace it with exception, it doesn't means that exception should use text and bold.. so... Right, if with exception, just the raw data needed, no fancy formatting (that's for the UI or presentation to handle, if it wants too).
Re: [Pharo-project] ClassBuilder depending -in some way- on text
On Thu, Mar 8, 2012 at 5:17 PM, Igor Stasenko siguc...@gmail.com wrote: On 9 March 2012 01:22, Guillermo Polito guillermopol...@gmail.com wrote: ClassBuildervalidateClassName: aString ... self notify: aString asText allBold, ' already exists!\Proceed will store over it.' Is it right to do that asText allBold there? :S Shouldn't an exception be raised instead? Do I open a ticket? Yes. We should kill dependency by removing asText asBold. Notifications should not accept rich-formatted text anyways, because not all ui managers can handle it (now we having command-line ui manager which prints message on console). Maybe have the command-line ui manager dumb down the representation - I'm sure this isn't the only place. Guille, this likely pre-dates Exceptions (or at least wide-spread use of them). A much better direction is to use exceptions (or Announcements?) here, and have a process capture them and display appropriately for what they can display. The mechanism should probably include Class name and exception text, which could be rich-formatted as above, or plain formatted for command-line UI, or interrogated for other observers. Just suggestions. -Chris
Re: [Pharo-project] Monticello Version Info
On Fri, Mar 2, 2012 at 5:30 AM, Camillo Bruni camillobr...@gmail.com wrote: But I am not completely sure how the internals work with MC, but from my research so far I am almost convinced that versions are found merely by their name. Since the VersionInfo does not track the repository it relates to. It does appear to find versions by name, but there is an internal id number that it uses to validate the file is the right one. I've been 'bitten' by this a few times - it is a really good idea to NOT rename MCZ files.
Re: [Pharo-project] Monticello Version Info
The issue is that Monticello is setup for distributed processing, and allowing for multiple repositories, some of which may not be available to all of the users for a project. For instance, a project might be developed internally (or on the developers hard-drive) until they feel comfortable distributing the code later. So, publicly, you get version 12, 17, 34, and 37. There is no access to the intermediate ones (unless you happen to be the one that created them and didn't release them). The 'whole ancestry' let's you do diffs off of a version derived from 37 against one derived from 34 - the ancestry can determine that version 34 if 'common', and work from there. [Note that just numbers aren't enough - the original developer, say, cbc could have version cbc.34, while you could have, say, CamilloBruni.34, but yours is based off of 17 (since you picked up that verison and started working there). So, merging cbc.37 with CamilloBruni.34 would need to pull down cbc.17 for a good merge to work.] At least, that's my understanding from long ago discussions. -Chris On Thu, Mar 1, 2012 at 2:15 PM, Camillo Bruni camillobr...@gmail.com wrote: well, you usually cache the mcz in your local directory cache (at least that's the default). and extracting the meta-data out of a local mcz is rather cheap since zip allows you to directly extract certain files. maybe we could add another entry to the mcz with just the stripped down version info in it. this way older monticello versions would still be able to load it the slow way, whereas an updated version could benefit from incremental loading? On 2012-03-01, at 23:11, Nicolas Cellier wrote: I think the main reason is that you cannot load just the metadata, but the whole mcz when you need to dig into the history... That ain't cheap, and that happens when you merge more or less distant branches. Also, it's not unusual to upload directly version N+5 without the whole N+1 to: N+4 ancestry... In this case MC can still find a common ancestor.
Re: [Pharo-project] Putting source code in method trailer [WAS] Re: Speeding up Finder string search
On Tue, Jan 17, 2012 at 1:40 PM, Mariano Martinez Peck marianop...@gmail.com wrote: 2) I can understand to put source code in files would make sense 20 years ago. But I don't think so anymore... a normal notebook has 8gb of RAM these days. I believe the Windows VM still limits us to around 1/2 gig of image size, at least when starting up the image. If so, it would be nice to not increase the space too much by default (that is, windows users don't really have 8 gig...)
Re: [Pharo-project] Crashes: Pharo 1.3 + Cog VM 13307
On Wed, Dec 21, 2011 at 2:44 PM, Esteban Lorenzano esteba...@gmail.com wrote: Hi, and yes, I know what you feel about version numbers... we (guys working with vm) should find an unique versioning number. But is hard, right now we have this different numbering: 1) Eliot has his own version number (I think based on svn commit version) 2) Each platform (Linux, Windows and Mac) has his own versioning too. 3) There are also 4.x versions alive (for mac, at least) I also don't know what does each version means (3.8 for unix, etc.). I named cocoa versions 6.x because older versions based on carbon where 5.x, so I thought: changing from carbon to cocoa is important enough to have a new major version... but I dunno. The old numbering system came from pre-Pharo days, when the VM was just for Squeak. In those days, the VM number was meant to sync with the current Squeak image release - so vm 3.8 for Unix was the VM that accompanied the Squeak 3.8 release, compiled for the Unix platform. Each platform (and, indeed, each variant - such as Cocoa/Carbon) would use the same main version number, but with some other distinction built on (and these did change by platform). Eliot's VM now supports a wide range of roughly compatible Smalltalks (or near smalltalks), such as Pharo, Squeak, Croquet, Cuis, Newspeak, and probably others. In that environment, with each near-smalltalk having their own numbering schemes, the old numbering convention just doesn't make sense. So, his using the apparent SVN commit number makes as much sense as anything - probably a lot more than some. As for what you should call the Pharo branded and tweaked versions, that is obviously up to you. I would suggest finding something that makes it easy for us users to figure out which version of the PharoVM works with which Pharo image, if possible. -Chris
Re: [Pharo-project] BUG on converting to Fraction
Yes, the interaction between fractions and strings is not good. For instance: Fraction readFromString: ((1/2) printString) raises an error, because printing fractions puts parenthesis around the fraction, and that just isn't a valid number. -Chris On Fri, Oct 14, 2011 at 8:30 AM, Norberto Manzanos nmanza...@gmail.com wrote: I'm afraid the fix cause more problems than solutions. I don't know what is happening, and I couldn't go deep, but many things are working bad. So I have to implement temporarily String #asFraction to fullfill my requirements. On Thu, Oct 13, 2011 at 10:43 AM, Stéphane Ducasse stephane.duca...@inria.fr wrote: thanks you http://code.google.com/p/pharo/issues/detail?id=4909 Stef On Oct 13, 2011, at 2:39 PM, Norberto Manzanos wrote: On both Squeak 3.9 (I supose others too) and Pharo: Fraction readFromString: '1/2' --- 1 '1/2' asNumber --- 1 fix Number #readFrom: stringOrStream Answer a number as described on aStream. The number may include a leading radix specification, as in 16rFADE | value base aStream sign | aStream _ (stringOrStream isString) ifTrue: [ReadStream on: stringOrStream] ifFalse: [stringOrStream]. (aStream nextMatchAll: 'NaN') ifTrue: [^ Float nan]. sign _ (aStream peekFor: $-) ifTrue: [-1] ifFalse: [1]. (aStream nextMatchAll: 'Infinity') ifTrue: [^ Float infinity * sign]. base _ 10. value _ Integer readFrom: aStream base: base. this line (aStream peekFor: $/) ifTrue:[^Fraction numerator: value denominator: (aStream upTo: $\) asInteger]. added (aStream peekFor: $r) ifTrue: [baserinteger (base _ value) 2 ifTrue: [^self error: 'Invalid radix']. (aStream peekFor: $-) ifTrue: [sign _ sign negated]. value _ Integer readFrom: aStream base: base]. ^ self readRemainderOf: value from: aStream base: base withSign: sign. -- Norberto Manzanos Instituto de Investigaciones en Humanidades y Ciencias Sociales (IdIHCS) FaHCE/UNLP - CONICET Calle 48 e/ 6 y 7 s/Nº - 8º piso - oficina 803 Tel: +54-221-4230125 interno 262 -- Norberto Manzanos Instituto de Investigaciones en Humanidades y Ciencias Sociales (IdIHCS) FaHCE/UNLP - CONICET Calle 48 e/ 6 y 7 s/Nº - 8º piso - oficina 803 Tel: +54-221-4230125 interno 262
[Pharo-project] Odd TimeStamp from string issue
Hi. This behavior tricked me and I'm curious if this is inteded or not. If you take a timestamp from a string, and the hour is 24:00:00, then it will assume that the time is at the beginning of the day, that is, 23+ hours before the timestamp that starts at 23:59:59. TimeStamp fromString: '2011-09-27 24:00:00' - '27 September 2011 12:00 am' I would have hoped that would either be the end of the day, or the begining of the next one. So, is this expected behaviour? Thanks, Chris
Re: [Pharo-project] Odd TimeStamp from string issue
On Tue, Sep 27, 2011 at 2:04 PM, Pat Maddox patmad...@me.com wrote: Might be sloppy writing because that last sentence seems to contradict the first one. At any rate, I wouldn't expect that to be valid. What is 24:00:01 ? TimeStamp fromString: '2011-09-27 24:00:01' - '27 September 2011 12:00:01 am' As for contradictions (if it was from my message), this behavior is not expected by me, but it may be expected by the rest of the community (which is what I was asking about). It sounds like it isn't, though. I think the method is too permissive - it probably should have rejected my input as bad. The code path delegates the time portion off to Time, which delegates it off to Duration (with no bounds checks), then asks for the seconds and nanos back from Duration via #ticks, which hides the fact that a date boundary has been exceeded: days := self days. ^ Array with: days with: seconds - (days * SecondsInDay) with: nanos (the seconds - (days * SecondsInDay) part). -Chris
Re: [Pharo-project] How to deprecate a Class?
On Mon, Aug 1, 2011 at 12:21 PM, Stéphane Ducasse stephane.duca...@inria.fr wrote: The most important aspects is that there is not reference to it. and that if we replace it by something else, it works. After we can write in the comments in big that the class is deprecated. Could you (we) also deprecate all the methods in the class? Ideally in some automated way, of course.
Re: [Pharo-project] About HTTP proxies, settings and MacOS
On Wed, Jun 29, 2011 at 5:17 AM, Mariano Martinez Peck marianop...@gmail.com wrote: So...now if I save the image in a place where I have a proxy (my work) and then I try to open it in another place that has no proxy (my home), it doesn't work. To solve that I did: startUp OSPlatform isMacOS ifTrue: [ self useHTTPProxy ifTrue: [ (self getHTTPProxyHost findTokens: ':') ifNotEmpty: [:p | NetworkSystemSettings useHTTPProxy: true. HTTPSocket useProxyServerNamed: p first port: p second asInteger]] ifFalse: [HTTPSocket stopUsingProxyServer. NetworkSystemSettings useHTTPProxy: false]] Am I reading this right? If I was on, say, Windows behind a proxy, this would disable proxy use on startup? So, every time I started an image, I would have to manually re-enable proxy use? Would there be a way to detect if the proxy still exists on startUp, and if it doesn't, then temporarily disable the proxy instead? -Chris
Re: [Pharo-project] About HTTP proxies, settings and MacOS
On Wed, Jun 29, 2011 at 12:17 PM, Sven Van Caekenberghe s...@beta9.be wrote: On 29 Jun 2011, at 20:25, Chris Cunningham wrote: Am I reading this right? If I was on, say, Windows behind a proxy, this would disable proxy use on startup? So, every time I started an image, I would have to manually re-enable proxy use? Uhh, no, on Windows nothing at all would happen, this is Mariano's code, as I formatted it: Good. I did read it wrong.
Re: [Pharo-project] Proposal to refactor MethodFinder with pragmas
On Fri, Jun 24, 2011 at 9:47 AM, Damien Cassou damien.cas...@gmail.com wrote: - one method per class returning a list of selectors. I guess we could use the Announcer to be notified when this particular method is loaded or updated. Of equal/more importance, when a method referenced by this method is removed, it needs to update this referencing method. Even more interesting, when a method is added to the class that is side-effect free and MethodFinder friendly, it should be added to the list (although that would be fun to figure out programmatically). Also, if a method is updated to have side-effects, it should be removed from this list as well, although this doesn't happen very often. -Chris
Re: [Pharo-project] SIXX problem for ScaledDecimal
On Fri, May 20, 2011 at 7:57 AM, Ralph Boland rpbol...@gmail.com wrote: Dealing with ScaledDecimal is a complicated matter and I have probably failed to appreciate many of the complications but whoever is implementing ScaledDecimal (and Smalltalk needs ScaledDecimal) needs to appreciate those complications. Anybody here a financial expert? I am not a financial expert, but this is how ScaledDecimal works, in both Squeak/Pharo and I believe other implementations, too. I did run into this previously and it bugged me enough that I created FixedDecimal (at http://www.squeaksource.com/FixedDecimal.html ). It does not keep an internal more precise number - it keeps exactly what it shows you. (Although the implementation is somewhat odd - it does do what it is supposed to do.) -Chris
Re: [Pharo-project] SIXX problem for ScaledDecimal
For ScaledDecimal, SIXX should definite store it as the underlying fraction. Storing it in the printed fashion does change the value of the ScaledDecimal. (1/3) asScaledDecimal: 2 gives 0.33s2 and (33/100) asScaledDecimal: 2 gives 0.33s2 yet 0.33s2 ~= ( (1/3) asScaledDecimal: 2 ) and ( (1/3) asScaledDecimal: 2 ) ~= ( (33/100) asScaledDecimal: 2 ) In other words, the ScaledDecimal is about the precise internal number and the scale to display it - which is NOT the scale that it is stored as. -Chris
Re: [Pharo-project] Smalltalk and LibreOffice or OpenOffice
There's also the old OpenOffice Importer for Squeak 3.8 (dated 2005) at http://map.squeak.org/package/cf85bb75-1ff8-4da1-a82e-2e53aba05818/autoversion/5 -Chris
Re: [Pharo-project] new Cog VMs uploaded
You should be able to extract the code and use it in Pharo/Squeak without issue, even if it is GPL. What you can't do is include it in the distribution, since it isn't MIT. You also shouldn't study the code and write your own version of it - I believe that would be a derivative work, which would likely make it a GPL derivative. However, if it was extracted, and you brought it in to do profiling, and then removed it afterwards, that shouldn't be an issue at all. Just remember to remove it after you no longer need it - that way the GPL code won't accidentally creep into the Pharo/Squeak code-base. Basically, this would be a great example of a project that should be an external project and not part of core (or dev). -Chris
Re: [Pharo-project] [COTDC] 58 - TextPrinter
On Wed, May 4, 2011 at 12:18 PM, laurent laffont laurent.laff...@gmail.com wrote: On Tue, May 3, 2011 at 9:21 PM, laurent laffont laurent.laff...@gmail.com wrote: Today: TextPrinter I've seen it has been deprecated on recent PharoCore. Laurent. Hmm, ok. Of course, the only reason I used it was to call it to get various paper sizes and to refresh my memory on how to use the printer interface. I've never used it for its intended purpose, though. -Chris
Re: [Pharo-project] [COTDC] 57 - ColorMap
Is this the class that is responsible for white becoming not-white, and black not-black, when moving from a lower 16 to 32 bits? -Chris
Re: [Pharo-project] [Pharo-users] [COTDC] 56 - HostFont
Uses host fonts from a Win32 system for display. On a Windows system, if you have FontPlugin.dll with your executable, execute HostFont initWin32 Then, you should be able to use fonts from a variety of native Windows fonts of various sized and emphasis. Except, of course, for the bugs. I can't actually choose one due to some issue with IdentityGlyphMap. And, Pharo isn't shipped with the dll (I don't think) - so I picked on up from Squeak 3.8, the last time I used HostFonts (for a month or so). There are currently a lot of additional candidates for what this does. -Chris
Re: [Pharo-project] Net::Telnet equivalent
There is the old telnet client from Ian P ( http://map.squeak.org/package/14bcecc6-dbb8-4866-bb0c-25278ca882ba ). If you are interested, I could send you a copy of the change set. I have used this (which some modifications) for automated telnet interaction in the past. I would undoubtedly need some modifications to work in Pharo (or even modern Squeak). -Chris
Re: [Pharo-project] Pharo and Astronomy?
There also appears to be http://www.squeaksource.com/AdAstra Mathematical Astronomy
Re: [Pharo-project] Printing???
If you look at TextPrinter, there is already support for cross platform printing built in. Not necessarily as fully featured as I'd like, but it does work. At it's core, it allows for seding a form to a printer, so you should be able to send anything that you can compose in Pharo directly to the printer. That call is: FormprimPrintHScale:vScale:landscape: I've used it fairly successfully in the past, although I find that you definitely need the form to be in the deepest display depth (32) to get the coloring right (or even black and white, for that matter). -Chris ___ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Re: [Pharo-project] Completion works inside comments -- bug or feature?
It is nice at times that this happens. If you have a comment in the method showing what it does (examples), the autocomplete is kind of nice while building those. ___ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Re: [Pharo-project] Setting system categories ?
You might want to try *-Settings-* to lessen confusion with, say, getters and setters, or things that set system attributes. So: System-Settings-Core System-Settings-Morphic System-Settings-Browser Just my 2 cents us... Chris ___ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Re: [Pharo-project] SortedCollectionmedian
On Sun, Mar 1, 2009 at 4:34 PM, Rob Rothwell r.j.rothw...@gmail.com wrote: I notice that the current median is: median Return the middle element, or as close as we can get. ^ self at: self size + 1 // 2 Any reason not to make that accurate and return the average of the middle two values for collections containing an even number of items? One nice thing about the existing definition is that you can use #median on collections that are numeric based. So, median of: #( 'Ford' 'Audi' 'Nissan' 'Hyundai' ) median would actually return in the current definition, but not in a 'statistical' definition. Similarly, #max and #min and #size would work for this, although #sum wouldn't. Chris ___ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Re: [Pharo-project] Workspace API
I average about once a year (saving contents to a file). However, I regularly open a workspace on strings. ___ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Re: [Pharo-project] Workspace Enhancement
On Tue, Jan 20, 2009 at 12:03 AM, Lukas Renggli reng...@gmail.com wrote: It happened to me more than once, that I accidently had some huge objects hanging in a workspace leading to a memory leak. So remembering the variables can be a dangerous thing. Mainly I was checking to see if there would be issues like this. I often do researchy things in workspaces which grab only large amounts of memory (100's of MB), and forget to nil them out afterwards. Then, weeks (or months) later I need to shrink the image, and eventually find my way back to the workspace where a simple nil clears them out. I was worried that if they were held onto in history, this would be a problem. Keeping the strings around would be useful for me - my current image has about 20 workspaces open (and in 3.10 dev, this results in lots of minimized window title bars). Being able to store them off in history would be nice. -Chris ___ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Re: [Pharo-project] Workspace Enhancement
Neat behaviour - I'll have to try it out (like, what happens when you have 5 open workspaces - do they all have access to the same list of history? Just something to try). What about contents of workspace variables? Are those stored in the history as well? ___ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
[Pharo-project] Fwd: [Newbies] squeak locks up on windows / help me debug it...
-- Forwarded message -- From: Chris Cunningham cunningham...@gmail.com Date: Sat, Jan 10, 2009 at 12:41 AM Subject: Re: [Newbies] squeak locks up on windows / help me debug it... To: A friendly place to get answers to even the most basic questions about Squeak. beginn...@lists.squeakfoundation.org It is worth noting that Pharo is currently under heavy development. The Pharo team is busy ripping out parts of Squeak they don't want in the base image and adding other parts that they do want. From all reports it is very nice to work in, but it is not a stable release at this point. If you want to keep working with it, be prepared to submit bug reports to that list if you encounter issue like this one. Otherwise, pick up the squeak 3.10, 3.9, or 3.8 to try out the tutorials until Pharo is more stable/released if you don't want to be that involved in the development (or early beta/alpha? testing) of it. On Fri, Jan 9, 2009 at 4:39 PM, Cameron Sanders csanders.perso...@functional-analyst.com wrote: I thought the Pharo base image (3.10 with a few fonts Balloon3d added) running on Windows was looking pretty stable (compared to other images). But after an hour of editing code on a Vista machine --an hour since the last save—Squeak has abandoned me. It is unresponsive. Trying both control and alt in combination with '.', 'l' (lower case L), 'c', does nothing apparently useful. The process stack reported by Vista shows it to be incurring page-faults like mad. [OK, that has subsided while I typed this email.] My machine has 4 GB of RAM, I am running two instances of internet-explorer, and I have turned off the Windows search-indexing service. I know Vista has a guess-the-next-program pre-loader that could be a little overzealous in displacing programs from RAM… but still… it seems like this 101MB program shouldn't generate any page faults when the other two leading memory pigs are using less than double that much virtual memory. Vista's Resource Monitor claims I am using only 43% of physical memory. The page-fault count for Squeak.exe doubled while I typed this message. When I click the Squeak icon on the window frame of the running copy (upper left on Windows), I do see the menu for VM Preferences. It shows me the menu and allows me to invoke actions. It will allow me to toggle the Show output console on and off. The output console shows me changes to memory (as I have that option checked). I can use my mouse wheel to scroll this console. Control-'.' and Control-c (and lower case L) in this console do not change anything. After mucking around in the console area, I am now getting WARNING: event buffer overflow just moving my mouse around in squeak. After turning the console off, the pointer is now invisible except when you click. It appears that the overall squeak window is repainting itself properly. -- Help me debug it I have an interest in building a commercial application in Squeak. The FAQs says squeak is stable. Given the active community of developers (including The Great Ones), I imagine that it is stable, and that I am just doing something dumb… repeatedly. However, for Squeak to be adopted more broadly, it can't go zombie on users, even when the user does something dumb. That's an absolute. What is the longest uptime a squeak image has ever endured (while doing something useful)? Which version was that and on what platform? So I am willing to work to help make squeak more robust, but as a complete newbie with it, I need much guidance. So right now, with this hung-up image, what should I do? Should I attach to it with gdb? And if so, then what? [If the internal process control is working, I won't be able to make heads or tales out of it from gdb, right?] Or can I launch another squeak and send it a signal in some way [is it listening?]? What is most useful in this case? [Is there a way in Windows/Vista to signal an app so as to force a core dump?] Thanks in advance, Cam PS: I want to emphasize that I do not care about the code lost in this particular instance (it was tutorial code), instead I am looking for a stable free development environment… and I'm willing to help make one. __ Information from ESET Smart Security, version of virus signature database 3755 (20090109) __ The message was checked by ESET Smart Security. http://www.eset.com ___ Beginners mailing list beginn...@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project