Re: [Pharo-users] About patterns, UML and documentation
I think the key to this is intention revealing names and comments. And shipping unit tests that are the best example of "running documentation". Take Sven's NeoCSV package as an example. Great documentation and very good method names. and a complete set of tests. Sounds frightening at first if you come from a static typing background, but in my experience it works quite well. There are UML tools. Some even allow round-trips where the UML diagrams can be generated from code (e.g. IBM/Instantiations have the UML Designer add-on), but to be honest, these only put you in high danger of playing with the tool and layout and stuff rather than concentrate on what is important. UML is fine for communicating the raw structure and basic ideas. Generating UML from code on the fly can help understand code, but I've seen too many projects that made the UML design documents an art of itself, and most of the times the diagrams were out of sync anyways... Just my 2 cents, Joachim -- --- Objektfabrik Joachim Tuchel mailto:jtuc...@objektfabrik.de Fliederweg 1 http://www.objektfabrik.de D-71640 Ludwigsburg http://joachimtuchel.wordpress.com Telefon: +49 7141 56 10 86 0 Fax: +49 7141 56 10 86 1
Re: [Pharo-users] About patterns, UML and documentation
Hi Marc. In Smalltalk, we rely on naming conventions a lot. The great thing is that Smalltalk selectors/symbols/method names read like English. aDictionary at: aKey put: anObject. aString indexOf: aCharacter startingAt: start ifAbsent: aBlock Seems pretty clear, no? We also rely on comments. For instance this is the class comment for IceRepository - an abstraction of a git repo. I represent an interface to a git repository. My main responsibilities are: - Load/update both baselines and individual packages from the repository. - Commit changes to the local repository and publish them to a remote repository. - Browse other versions of the loaded packages. - Handle branches For the Collaborators Part: State my main collaborators and one line about how I interact with them. Public API and Key Messages - loadPackage: packageName - createBranch: newBranchName Sample usage: Git new origin: 'g...@github.com:npasserini/pharo-git-test.git'. git loadPackage: 'Pharo-Git-Test'. Instance Variables - origin: A string representing the url of a remote git repository (used as origin) - repository: An IceGitTreeGitRemoteRepository, which provides underlying git operations. - location: The directory of the local repository. - commitDictionary: Cached dictonary from commitId (hex string) to all commits in the current branch (in the local repo). - subdirectory: The subdirectory of the local repository which is handled by the underlying GitFileTree - versionDescriptors: cached list of all package versions saved in the (currently selected branch) of the (local) repository. - announcer: - branch: currently selected branch. - loadedCode: Contains information about the loaded code for each package in this repository. (TODO: maybe handle special cases about loading different versions loaded for different packages, see: https://github.com/npasserini/iceberg/issues/139). I hope this helps. -Todd Blanchard > On Jun 7, 2017, at 10:17 PM, Marc Hanisch via Pharo-users >wrote: > > > From: Marc Hanisch > Subject: About patterns, UML and documentation > Date: June 7, 2017 at 10:17:11 PM PDT > To: Any question about pharo is welcome > > > Hello, > > I don't know Smalltalk well enough to give myself an answer about the > following topic: > > When using design patterns, one benefit of writing interfaces and passing > objects, that implement this interface, to methods is, that the reader > instantly knows: okay, here the method A expects something that implements > method B. > > Due to the nature of being a dynamically typed language, Smalltalk does not > need interfaces. An exception object is thrown when a message is passed to an > object that does not implement that method. But this message send could be > deep inside the code. > > How do you show to the reader of your code your intention, that you are > expecting, let's say for example, an iterator or an object that implements > method X, Y and Z? > > Just with your method comments? Do you use UML? If so, how (without > interfaces that point to the required methods)? > > Sorry, but I think my understanding of OOP is still to much influenced by C++ > and Java based teachings... > > Thanks and best regards, > Marc > >
[Pharo-users] About patterns, UML and documentation
--- Begin Message --- Hello, I don't know Smalltalk well enough to give myself an answer about the following topic: When using design patterns, one benefit of writing interfaces and passing objects, that implement this interface, to methods is, that the reader instantly knows: okay, here the method A expects something that implements method B. Due to the nature of being a dynamically typed language, Smalltalk does not need interfaces. An exception object is thrown when a message is passed to an object that does not implement that method. But this message send could be deep inside the code. How do you show to the reader of your code your intention, that you are expecting, let's say for example, an iterator or an object that implements method X, Y and Z? Just with your method comments? Do you use UML? If so, how (without interfaces that point to the required methods)? Sorry, but I think my understanding of OOP is still to much influenced by C++ and Java based teachings... Thanks and best regards, Marc --- End Message ---
Re: [Pharo-users] Traits, method flatten
HilaireFernandes wrote > I made another attempt to > persist this time with filetree://. The net result is the same, the > Traits logic is lost in the classes using the Traits: all traits methods > are duplicated !! I just got burned by this in ##50768. Methods inherited from traits were saved as part of the package containing the extended class, as well as the package containing the Trait itself. Ugh. Was this ever fixed by Pharo 6? - Cheers, Sean -- View this message in context: http://forum.world.st/Traits-method-flatten-tp4941799p4950378.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Re: [Pharo-users] Wiring objects, IoC and Service Locator
On Tue, Jun 6, 2017 at 11:48 PM, Attila Magyarwrote: > I don't think using a DI container worth the effort. They add lots of > complexities and solve very little. For some reason DI containers became > very popular in the Java world, but if you take a look at other programming > communities you'll realize that many people are perfectly happy without > using these containers. Using DI and using a DI container is orthogonal. As > you also said you can just pass dependencies to objects to achieve loose > coupling. Yes, you have to do this manually but what's the big deal? We're > talking about code with cyclomatic complexity of 1. Calling a constructor > is > not a problem that need to be solved. Using an external XML configuration > to > describe object wiring is the worst idea ever. > > Here is an article about using plain old object composition to do DI > > http://blog.davidpeterson.co.uk/2011/01/object-oriented-example.html > > Some more thoughts about the problems associated with DI containers: > > http://www.natpryce.com/articles/000783.html I liked this... "the [Dependency Injection] pattern also used to be called "third-party binding" or "third-party connect": some third party is responsible for connecting an object satisfying the service requirements of a component" This makes the subject seem less esoteric. It reminds me of hearing that the first (secret) task when doing a PhD is to invent new terms for common ones, and base your writings on that. Perhaps its the same for consultants and framework developers. ;P Or maybe everything seems esoteric until you have experience with it and I've not done much with Java, certainly not big applications. Thx Peter for your example and how you prior experience compares to Pharo. cheers -ben > http://higherorderlogic.com/2011/07/is-dependency-injection-like-facebook > > > > -- > View this message in context: http://forum.world.st/Wiring-o > bjects-IoC-and-Service-Locator-tp4949280p4949720.html > Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com. > >
Re: [Pharo-users] Porting Transducers to Pharo
2017-06-07 22:04 GMT+02:00 p...@highoctane.be: > I read your note about DoubleAgents for the tests, well, yeah this one we > do not have. I read about it on the blog of its maker and it looked decent > indeed. > I think Mocketry can easily replace DoubleAgents but API is different and most tests will needed rewrites
Re: [Pharo-users] How to migrate an object to a subclass of its class but with new inst vars ?
2017-06-07 22:30 GMT+02:00 Steven Costiou: > But would it not be faster to just change the class (which finally works > with a little tuning) ? In fact your solution with anonymous subclass is doing what I describe underhood.
Re: [Pharo-users] Wiring objects, IoC and Service Locator
> I don't see what is special about this. You can easily arrange instance > creation order with methods on the class-side of your domain classes. I will not use the term "class", but rather a "service" (service can be just a single class, but that is not always the case). The point of inversion of control is provide the class with what is needed instead of the class creating it on it's own. Sure, you can create class-side helper, however that is very limited, such as the examples/samples as you've demonstrated. To give you an example, imagine that you have a class PeopleService that manages database of people, so it needs a connection to the database. Implemented in a naive way the class would have hard-coded credentials to a MySQL database and it would execute raw SQL queries. This works for a single class, but it creates a mess and mingles concerns; so instead you inverse the control and you provide PeopleService with e.g. a Persistence instance, which is already connected to the database; note however that you cannot just create the Persistence on the class-side, because you wouldn't even know what to instantiate (as you could e.g. use DbPersistence, FilePersistence, ...). And this is just a basic example. Imagine that the PeopleService also needs other services for it's use, and those services need more services, and you want to keep everything separated as much as possible... instantiation by hand will simply not cut it So the service locator/DI configuration (whether as annotations or in a XML file) keeps the actual classes separated from concrete instances; the service depends on abstract interfaces, not specific classes; only the conf determines the specific ones, and more often than not there will be several different configurations _at the same time_. To continue with the example you could have one config production using e.g. OraclePersistence, another for development using MySQLPersistance, another for test server using MemoryPersistence, etc. (also with different credentials, and whatnot). Keep in mind however that relates primarily to using application frameworks, where the framework mandates the control, and the framework is the one calling you, and therefore it will also provide you with necessary parts. After all you are not even creating PeopleService class, the framework instantiates it for you and gives it to another services/classes that needed it. Now I don't feel like there are many application frameworks in Pharo, maybe Seaside has something of this sorts? I guess Spec can be a bit framework-y, as the basic spec widgets do not actually know what Morphic counterparts will be created for them, and Spec looks up the actual class in a hard-coded data table (which might as well be a XML file), but that comes closer to ServiceLocator than DI (as Spec widgets should not actually communicate down to morphic). I've used dependency injection for five years at my previous work and frankly I cannot imagine living without it there, but I've never felt the need for it in Pharo. This is probably more related to working in Pharo on completely different things and writing small libraries. However I wouldn't be surprised if the liveness of Smalltalk/Pharo environment eliminated some of the problems that DI is trying to solve. But then again, there are many ways to build systems, and not all need or benefit DI/IoC. Peter > Indeed, the GTTools are set up to work with in-Image sample data. Look at > implementors of #sample and #example. > There was quite some bike-shedding over the naming convention (and I forget > the final result), but hopefully it provide the general idea... > > http://forum.world.st/a-request-to-change-the-meaning-of-lt-example-gt-pragma-td4927360.html > http://forum.world.st/lt-example-gt-lt-examplar-gt-td4911728i20.html > http://forum.world.st/Existing-lt-script-gt-lt-example-gt-pragmas-and-new-GT-needs-td4814903i20.html > > > > > > > I started, however, to question DI as a valid mechanisms because of it's > > complexities and other problems. The article from Fowler provides the > > service locator as an alternative which seems to me much simpler and > > completely fine solution for the problem. > > > > If it seems suitable, then to quote Nike, just do it ;) > > > > > So, to answer you question "Is it any more complicated than that?": In > > the DI approach, yes it can be, but I don't think so in the service locator > > approach. > > > > I am asking here because I wanted to know how people from Smalltalk deal > > with this problem. As it seems there is no standard approach, nor this is > > perceived as a problem... > > > > > DI or Service Locator are both "implementations" of your need. Can we take > step backward to see what is your need? To kick off, I hazard a guess at > some possible needs... > > 1. To switch between configurations to use production data and test data ? > 2. To make this switch during CI testing
Re: [Pharo-users] How to migrate an object to a subclass of its class but with new inst vars ?
Hmm ok, but can i easily make b become a again later ? I guess i would just need to instanciate a new a... But would it not be faster to just change the class (which finally works with a little tuning) ? I can't test right now but i will compare the two things... Le 2017-06-07 21:59, Denis Kudriashov a écrit : > 2017-06-07 16:43 GMT+02:00 Steven Costiou: > >> Yes but when you do that you loose all the states from "a" (at least the >> values). You have to do state migration management... > > You just need extra step to copy all state from old object: > >> b := B new. > >> b copyFrom: a. > >> a becomeForward: b.
Re: [Pharo-users] How to migrate an object to a subclass of its class but with new inst vars ?
2017-06-07 16:43 GMT+02:00 Steven Costiou: > Yes but when you do that you loose all the states from "a" (at least the > values). You have to do state migration management... You just need extra step to copy all state from old object: b := B new. b copyFrom: a. a becomeForward: b.
Re: [Pharo-users] is it related to Freetype or Athens?
On Tue, Jun 06, 2017 at 07:33:04PM +0200, Hilaire wrote: > Hi there, > > A Dr. Geo user on Ubuntu 64bits 16.04 got that buggy rendering of the > canvas, then on some situation the rendering completely stop on a red > screen, with a stack showing may be a zero divide error. I did not get > access to the PharoDebog yet. > > Fonts on the screenshot is not right too. Could it be a mixed problem > between FreeType and Cairo? Any first though on the issue welcome. There were couple GC/memory related issues in the VM's plugin, that were fixed or worked around in the Pharo 6 VM that apparently were present for a long time... so maybe that's also part of what you've experienced...
Re: [Pharo-users] RewriteToolbuilder question
On 06/07/2017 08:11 PM, Mark Rizun wrote: At first, I was not able to reproduce the error, but then I realised that you probably don't save the content of lower left and right parts (`@.Statements).Use cmd+s to save changes. The error is raised because parser tries to parse the old code (same as in upper left part) with a method intended for rewrite rules. That should fix it. If you have any other questions related to RewriteTool don't hesitate to ask. Thank you, Mark. werner
Re: [Pharo-users] RewriteToolbuilder question
At first, I was not able to reproduce the error, but then I realised that you probably don't save the content of lower left and right parts (`@.Statements).Use cmd+s to save changes. The error is raised because parser tries to parse the old code (same as in upper left part) with a method intended for rewrite rules. That should fix it. If you have any other questions related to RewriteTool don't hesitate to ask. 2017-06-07 19:25 GMT+02:00 werner kassens: > Hi Mark, > the code from Number>>raisedTo: > > aNumber isInteger ifTrue: [ > "Do the special case of integer power" > ^ self raisedToInteger: aNumber]. > aNumber isFraction ifTrue: [ > "Special case for fraction power" > ^ (self nthRoot: aNumber denominator) raisedToInteger: aNumber > numerator ]. > self < 0 ifTrue: [ > ^ ArithmeticError signal: 'Negative numbers can''t be raised to > float powers.' ]. > 0 = aNumber ifTrue: [^ self class one]."Special case of exponent=0" > 1 = aNumber ifTrue: [^ self]."Special case of exponent=1" > 0 = self ifTrue: ["Special case of self = 0" > aNumber < 0 > ifTrue: [^ (ZeroDivide dividend: self) signal] > ifFalse: [^ self]]. > ^ (aNumber * self ln) exp"Otherwise use logarithms" > > Werner > > p.s. Hi Ben, yes, i wrote that email a bit too fast, the video from > http://www.screencast.com/t/LCEl0hFl > > On 06/07/2017 07:03 PM, Mark Rizun wrote: > > Hi Werner, > > I believe that I am the one to answer this question, but I need more > information. > Please, could you send the code that you have in upper left panel. > > Cheers, > Mark > > 2017-06-07 18:46 GMT+02:00 Ben Coman : > >> I don't know much about RewriteToolbuilder, so probably won't be the one >> to give a proper answer, >> but to help someone else answer... could you narrow down which video >> with a link? >> >> cheers -ben >> >> On Thu, Jun 8, 2017 at 12:05 AM, werner kassens >> wrote: >> >>> Hi, >>> i followed the video and opened the RewriteToolbuilder on some code in >>> pharo4.0. i then tried to keep things simple and made a >>> transformationrule,which i thought would not change anything, by just >>> copying "‘@.Statements." <‘@.Statements.> into the lower left & right >>> panels (without the " of course).i then press 'generate rule' and get a >>> 'Syntax Error: end of Statement list encountered' with this specification: >>> ^ ArithmeticError signal: 'Negative numbers canEnd of statement list >>> encountered -> ''t be raised to float powers.' . but this part of the code >>> in the upper left panel is just a copy of some unchanged standard pharo4.0 >>> code. where did i go wrong? >>> werner >>> >>> >>> >> > >
Re: [Pharo-users] [Pharo-dev] PharoDays17 Slides and some Videos
On Wed, Jun 7, 2017 at 10:24 PM, Marcus Denkerwrote: > Hi, > > I have uploaded the Slides and Videos of PharoDays2017. Slides are > complete (minus those > talks that were due demos). For the Videos we have right now 8 talks and > the “Show Us Your > Project” session. More might come in the future (I need to check). > > Slides: > - https://www.slideshare.net/pharoproject/presentations > - http://files.pharo.org/conferences/2017PharoDays/ > > PlayList: https://www.youtube.com/playlist?list=PL4actYd6bfnw7ous5We- > XnWq0NZquP3gM > > > I liked the UI metalinks on mouse clicks. Now what would be really cool is a metalink to bring up a debugger for the next click on a button, to help learn how the system implements that feature. cheers -ben
Re: [Pharo-users] Some Metacello issue
On 06/07/2017 03:46 AM, Holger Freyther wrote: On 7. Jun 2017, at 14:09, Stephan Eggermontwrote: Never refer to fixed versions unless you know why (you need to avoid a specific bug fix). When wanting to have repeatable builds (e.g. for bugfixes) and in the absence of other means to lock/define versions externally, I think using a fixed version is the way to go. What is most likely is that there is some overconstrained configuration. Does your ConfigurationOfVoyageMongo or one of the configurations it pulls in refer to different versions of grease or magritte? Another issue can be that there are older configurations already loaded that conflict with the newest ones. Indeed, the ConfigurationOfMongoTalk is broken, refering to a fixed and older version of Grease. ConfigurationOfVoyageMongo should probably be using #'release3' of Magritte, but that doesn't break it. Right. So we have a "OsmocomUniverse" build job that pulls in all the apps into a single image. This helps to make API modifications and not forget any of the client code. The configuration has such dependencies: ConfigurationOfOsmocomUniverse -> ConfigurationOfHLR -> ConfigurationOfVoyageMongo -> Mongotalk -> Grease A -> Magritte3 -> Grease B -> ConfigurationOfSMPPRouter -> ConfigurationOfVoyageMongo -> Mongotalk -> Grease A -> Magritte3 -> Grease B What happens is that somehow "Grease A" gets loaded, then "Grease B" and when it is time for "Grease A" again.. the system kind of explodes and this is for Pharo3 and Pharo6. Now the question to me is.. why is this coming up right now? Did MongoTalk change or Magritte3 or something else? Is there an easy way for Metacello to try a mirror instead of the original, e.g. to inject an older ConfigurationOfMagritte3? I think that the `lock` command[1] is what you are looking for ... Dale [1] https://github.com/dalehenrich/metacello-work/blob/master/docs/MetacelloUserGuide.md#locking
Re: [Pharo-users] RewriteToolbuilder question
Hi Mark, the code from Number>>raisedTo: aNumber isInteger ifTrue: [ "Do the special case of integer power" ^ self raisedToInteger: aNumber]. aNumber isFraction ifTrue: [ "Special case for fraction power" ^ (self nthRoot: aNumber denominator) raisedToInteger: aNumber numerator ]. self < 0 ifTrue: [ ^ ArithmeticError signal: 'Negative numbers can''t be raised to float powers.' ]. 0 = aNumber ifTrue: [^ self class one]."Special case of exponent=0" 1 = aNumber ifTrue: [^ self]."Special case of exponent=1" 0 = self ifTrue: ["Special case of self = 0" aNumber < 0 ifTrue: [^ (ZeroDivide dividend: self) signal] ifFalse: [^ self]]. ^ (aNumber * self ln) exp"Otherwise use logarithms" Werner p.s. Hi Ben, yes, i wrote that email a bit too fast, the video from http://www.screencast.com/t/LCEl0hFl On 06/07/2017 07:03 PM, Mark Rizun wrote: Hi Werner, I believe that I am the one to answer this question, but I need more information. Please, could you send the code that you have in upper left panel. Cheers, Mark 2017-06-07 18:46 GMT+02:00 Ben Coman>: I don't know much about RewriteToolbuilder, so probably won't be the one to give a proper answer, but to help someone else answer... could you narrow down which video with a link? cheers -ben On Thu, Jun 8, 2017 at 12:05 AM, werner kassens > wrote: Hi, i followed the video and opened the RewriteToolbuilder on some code in pharo4.0. i then tried to keep things simple and made a transformationrule,which i thought would not change anything, by just copying "‘@.Statements." into the lower left & right panels (without the " of course).i then press 'generate rule' and get a 'Syntax Error: end of Statement list encountered' with this specification: ^ ArithmeticError signal: 'Negative numbers canEnd of statement list encountered -> ''t be raised to float powers.' . but this part of the code in the upper left panel is just a copy of some unchanged standard pharo4.0 code. where did i go wrong? werner
Re: [Pharo-users] RewriteToolbuilder question
Hi Werner, I believe that I am the one to answer this question, but I need more information. Please, could you send the code that you have in upper left panel. Cheers, Mark 2017-06-07 18:46 GMT+02:00 Ben Coman: > I don't know much about RewriteToolbuilder, so probably won't be the one > to give a proper answer, > but to help someone else answer... could you narrow down which video with > a link? > > cheers -ben > > On Thu, Jun 8, 2017 at 12:05 AM, werner kassens > wrote: > >> Hi, >> i followed the video and opened the RewriteToolbuilder on some code in >> pharo4.0. i then tried to keep things simple and made a >> transformationrule,which i thought would not change anything, by just >> copying "‘@.Statements." into the lower left & right panels (without the " >> of course).i then press 'generate rule' and get a 'Syntax Error: end of >> Statement list encountered' with this specification: ^ ArithmeticError >> signal: 'Negative numbers canEnd of statement list encountered -> ''t be >> raised to float powers.' . but this part of the code in the upper left >> panel is just a copy of some unchanged standard pharo4.0 code. where did i >> go wrong? >> werner >> >> >> >
Re: [Pharo-users] RewriteToolbuilder question
I don't know much about RewriteToolbuilder, so probably won't be the one to give a proper answer, but to help someone else answer... could you narrow down which video with a link? cheers -ben On Thu, Jun 8, 2017 at 12:05 AM, werner kassenswrote: > Hi, > i followed the video and opened the RewriteToolbuilder on some code in > pharo4.0. i then tried to keep things simple and made a > transformationrule,which i thought would not change anything, by just > copying "‘@.Statements." into the lower left & right panels (without the " > of course).i then press 'generate rule' and get a 'Syntax Error: end of > Statement list encountered' with this specification: ^ ArithmeticError > signal: 'Negative numbers canEnd of statement list encountered -> ''t be > raised to float powers.' . but this part of the code in the upper left > panel is just a copy of some unchanged standard pharo4.0 code. where did i > go wrong? > werner > > >
[Pharo-users] RewriteToolbuilder question
Hi, i followed the video and opened the RewriteToolbuilder on some code in pharo4.0. i then tried to keep things simple and made a transformationrule,which i thought would not change anything, by just copying "‘@.Statements." into the lower left & right panels (without the " of course).i then press 'generate rule' and get a 'Syntax Error: end of Statement list encountered' with this specification: ^ ArithmeticError signal: 'Negative numbers canEnd of statement list encountered -> ''t be raised to float powers.' . but this part of the code in the upper left panel is just a copy of some unchanged standard pharo4.0 code. where did i go wrong? werner
[Pharo-users] NaCl loading failing in Pharo5.0 stable
Hi! Loading NaCl from the catalog is failing because the ConfigurationOf attempts in the preLoad to download libsodium.dylib from an url that answers 404 error. The url is from dropbox. Who is responsible of that url? Cheers! Alejandro
[Pharo-users] ZnClient: how to emulate a curl command
Hi, I'm prototyping some integration between Fossil and Pharo for the creation of dynamic distributed web sites [1]. Now I would like to send some messages to store serialized STON domain objects as Fossil wiki pages. The command that makes this, using curl, is: curl -H "Content-Type: application/json" -d '{"authToken": "mytoken", "payload": {"name": "foo", "content": "bar"}}' http://localhost:8081/json/wiki/create and I thought that a similar command would be the one at [2], but there is something about ZnEntity that I'm not understanding. How can I replicate the curl command using ZnClient? [1] http://smalltalkhub.com/#!/~Offray/Brea [2] http://ws.stfx.eu/D61ZOA1LEQNG Thanks, Offray
Re: [Pharo-users] dynamic interaction with Mondriam
--- Begin Message --- Ok, Thanks Vincent :) > On 07 Jun 2017, at 15:52, Blondeau Vincent> wrote: > > Hi, > > You should ask in the Moose list ;) > > Vincent > >> -Message d'origine- >> De : Alidra Abdelghani [mailto:alidran...@yahoo.fr] >> Envoyé : mercredi 7 juin 2017 15:34 >> À : pharo-users@lists.pharo.org >> Objet : dynamic interaction with Mondriam >> >> Hi all, >> >> I would like to do some visualisations with Mondrian where you change the >> visualisation by selecting actions. For instance you have : >> b := RTMondrian new. >> b shape rectangle withTextAbove. >> b nodes:(1 to: 5). >> b layout grid. >> b edges connectFrom: [ :e | e + 1 ]. >> b build. >> b view >> >> then you can click a button to: >> 1 display/hide the labels above the elements. >> 2 display/hide some elements (all odd numbers for instance) >> 3 display/hide connections between elements. >> I saw a visualisation in the Roassal examples where you can add elements in a >> dynamic stack grapher. So I presume it is possible to do the same with other >> types of visus. >> >> Any hints? >> Thanks in advance. >> Abdelghani > > !!!* > "Ce message et les pièces jointes sont confidentiels et réservés à l'usage > exclusif de ses destinataires. Il peut également être protégé par le secret > professionnel. Si vous recevez ce message par erreur, merci d'en avertir > immédiatement l'expéditeur et de le détruire. L'intégrité du message ne > pouvant être assurée sur Internet, la responsabilité de Worldline ne pourra > être recherchée quant au contenu de ce message. Bien que les meilleurs > efforts soient faits pour maintenir cette transmission exempte de tout virus, > l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne > saurait être recherchée pour tout dommage résultant d'un virus transmis. > > This e-mail and the documents attached are confidential and intended solely > for the addressee; it may also be privileged. If you receive this e-mail in > error, please notify the sender immediately and destroy it. As its integrity > cannot be secured on the Internet, the Worldline liability cannot be > triggered for the message content. Although the sender endeavours to maintain > a computer virus-free network, the sender does not warrant that this > transmission is virus-free and will not be liable for any damages resulting > from any virus transmitted.!!!" --- End Message ---
[Pharo-users] Need help for collecting tests usage data
Hi everyone. I need your help. I’m working on how pharo developers use the tests. And you are pharo developers. So I developed a plugin and I would like you to download it. You just have to execute this line in a playground Metacello new smalltalkhubUser: 'Pharo' project: 'MetaRepoForPharo60'; configuration: 'TestsUsageAnalyser'; version: #stable; get; load. You will have to do it only one time in one image. Then, if they are update it’ll be done automatically and if you create a new image it will be automatically installed. The plugin will collect data on which tests you run. when. and the modifications you'll have done. Normally, it should be completely transparent for the users and the data are anonymous. If you want more details about the project or how it works, you can answer to this mail, or send me an email at benoit.verhae...@inria.fr or by using discord. Thanks a lot.
Re: [Pharo-users] How to migrate an object to a subclass of its class but with new inst vars ?
Yes but when you do that you loose all the states from "a" (at least the values). You have to do state migration management... Le 2017-06-07 16:18, Denis Kudriashov a écrit : > 2017-06-07 14:53 GMT+02:00 Steven Costiou: > >> I want to do the following: >> >> B adoptInstance: a >> >> It does'nt work, for what i understand it is because the format of the >> classes are different (B has an inst var and A has not). > > Yes, #adopt checks class format. > Use need to use #become to achieve what you want: > >> a becomeForward: B new
[Pharo-users] PharoDays17 Slides and some Videos
Hi, I have uploaded the Slides and Videos of PharoDays2017. Slides are complete (minus those talks that were due demos). For the Videos we have right now 8 talks and the “Show Us Your Project” session. More might come in the future (I need to check). Slides: - https://www.slideshare.net/pharoproject/presentations - http://files.pharo.org/conferences/2017PharoDays/ PlayList: https://www.youtube.com/playlist?list=PL4actYd6bfnw7ous5We-XnWq0NZquP3gM
Re: [Pharo-users] How to migrate an object to a subclass of its class but with new inst vars ?
2017-06-07 14:53 GMT+02:00 Steven Costiou: > I want to do the following: > > B adoptInstance: a > > It does'nt work, for what i understand it is because the format of the > classes are different (B has an inst var and A has not). > Yes, #adopt checks class format. Use need to use #become to achieve what you want: a becomeForward: B new
Re: [Pharo-users] dynamic interaction with Mondriam
Hi, You should ask in the Moose list ;) Vincent > -Message d'origine- > De : Alidra Abdelghani [mailto:alidran...@yahoo.fr] > Envoyé : mercredi 7 juin 2017 15:34 > À : pharo-users@lists.pharo.org > Objet : dynamic interaction with Mondriam > > Hi all, > > I would like to do some visualisations with Mondrian where you change the > visualisation by selecting actions. For instance you have : > b := RTMondrian new. > b shape rectangle withTextAbove. > b nodes:(1 to: 5). > b layout grid. > b edges connectFrom: [ :e | e + 1 ]. > b build. > b view > > then you can click a button to: > 1 display/hide the labels above the elements. > 2 display/hide some elements (all odd numbers for instance) > 3 display/hide connections between elements. > I saw a visualisation in the Roassal examples where you can add elements in a > dynamic stack grapher. So I presume it is possible to do the same with other > types of visus. > > Any hints? > Thanks in advance. > Abdelghani !!!* "Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité de Worldline ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis. This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Worldline liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.!!!"
Re: [Pharo-users] How to migrate an object to a subclass of its class but with new inst vars ?
I managed to do it :) What i did not say is that the subclasses (with new inst var) i want to use are anonymous subclasses. So i subclassed the SlotClassBuilder and i did: - generate an anonymous subclass from the source class - migrate my object - modify the anonymous subclass with new instance variables - rebuild the class with my own SlotClassBuilder It seems to work. I did not try how to migrate back my object to its original class but i think i might have a problem there. Also it seems very slow. Indeed it is a very certain, specific application :) Steven. Le 2017-06-07 15:32, Blondeau Vincent a écrit : > So, I do not think that is possible... > > Any solution I see is either to change the superclass or to add an external > object with a mapping between your new objects and the values of your new > IVs. > > Or you do the migration and after you add the IV once all instances are > migrated. > > But, I repeat that, as written in comments of primitiveChangeClassTo, "The > facility is really provided for certain, very specific applications (mostly > related to classes changing shape) and not for casual use." > > Vincent > > DE : Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] DE LA PART DE > Steven Costiou > ENVOYÉ : mercredi 7 juin 2017 15:18 > À : Any question about pharo is welcome > OBJET : Re: [Pharo-users] How to migrate an object to a subclass of its class > but with new inst vars ? > > Hi Vincent, thanks for your quick answer. > > This is the default behavior of adoptInstance: which calls > primitiveChangeClassTo: > > But i specifically want to gain new inst vars, which does not work that way. > > I can't add an instvar to the superclass since i don't want to change my > system. > > Steven. > > Le 2017-06-07 15:09, Blondeau Vincent a écrit : > >> Hi, >> >> You should be able to do it using the method primitiveChangeClassTo: but it >> not recommended to do it. Are you sure that it is the only way to resolve >> your problem? >> >> If you really want to, an example: >> >> Object subclass: #Toto >> >> slots: { #tata } >> >> classVariables: { } >> >> category: 'Temp'. >> >> Toto subclass: #Titi >> >> slots: { } >> >> classVariables: { } >> >> category: 'Temp'. >> >> obj := Toto new. >> >> obj primitiveChangeClassTo: Titi new. >> >> obj has a new class. >> >> However, you cannot add a new instance variable this way but you keep the >> values of the instance. >> >> But nothing avoid you to add an empty instance variable in a superclass that >> only the subclass will use. >> >> I hope that it will help you >> >> Vincent >> >> DE : Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] DE LA PART DE >> Steven Costiou >> ENVOYÉ : mercredi 7 juin 2017 14:54 >> À : Pharo users users >> OBJET : [Pharo-users] How to migrate an object to a subclass of its class >> but with new inst vars ? >> >> Hi, >> >> i'm trying to migrate an object from a given class A to a subclass of A with >> new inst vars. Can't get it to work. >> >> I have a class and an instance of it, say: >> >> Object subclass: #A >> instanceVariableNames: '' >> >> |a| >> >> a := A new. >> >> A has no instance variables. Now i create a subclass B of A with a new inst >> var: >> >> A subclass: #B >> instanceVariableNames: 'x' >> >> I want to do the following: >> >> B adoptInstance: a >> >> It does'nt work, for what i understand it is because the format of the >> classes are different (B has an inst var and A has not). >> >> How can i make the a object become an instance of B (subclass of a's class), >> making a acquiring the new inst var x (and in more complex cases keeping its >> own previous inst vars) ? >> >> Steven.
Re: [Pharo-users] How to migrate an object to a subclass of its class but with new inst vars ?
So, I do not think that is possible… Any solution I see is either to change the superclass or to add an external object with a mapping between your new objects and the values of your new IVs. Or you do the migration and after you add the IV once all instances are migrated. But, I repeat that, as written in comments of primitiveChangeClassTo, “The facility is really provided for certain, very specific applications (mostly related to classes changing shape) and not for casual use.” Vincent De : Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] De la part de Steven Costiou Envoyé : mercredi 7 juin 2017 15:18 À : Any question about pharo is welcome Objet : Re: [Pharo-users] How to migrate an object to a subclass of its class but with new inst vars ? Hi Vincent, thanks for your quick answer. This is the default behavior of adoptInstance: which calls primitiveChangeClassTo: But i specifically want to gain new inst vars, which does not work that way. I can't add an instvar to the superclass since i don't want to change my system. Steven. Le 2017-06-07 15:09, Blondeau Vincent a écrit : Hi, You should be able to do it using the method primitiveChangeClassTo: but it not recommended to do it. Are you sure that it is the only way to resolve your problem? If you really want to, an example: Object subclass: #Toto slots: { #tata } classVariables: { } category: 'Temp'. Toto subclass: #Titi slots: { } classVariables: { } category: 'Temp'. obj := Toto new. obj primitiveChangeClassTo: Titi new. obj has a new class. However, you cannot add a new instance variable this way but you keep the values of the instance. But nothing avoid you to add an empty instance variable in a superclass that only the subclass will use. I hope that it will help you Vincent De : Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] De la part de Steven Costiou Envoyé : mercredi 7 juin 2017 14:54 À : Pharo users users Objet : [Pharo-users] How to migrate an object to a subclass of its class but with new inst vars ? Hi, i'm trying to migrate an object from a given class A to a subclass of A with new inst vars. Can't get it to work. I have a class and an instance of it, say: Object subclass: #A instanceVariableNames: '' |a| a := A new. A has no instance variables. Now i create a subclass B of A with a new inst var: A subclass: #B instanceVariableNames: 'x' I want to do the following: B adoptInstance: a It does'nt work, for what i understand it is because the format of the classes are different (B has an inst var and A has not). How can i make the a object become an instance of B (subclass of a's class), making a acquiring the new inst var x (and in more complex cases keeping its own previous inst vars) ? Steven. !!!* "Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité de Worldline ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis. This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Worldline liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.!!!" -- kloum.io !!!* "Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité de Worldline ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.
[Pharo-users] dynamic interaction with Mondriam
--- Begin Message --- Hi all, I would like to do some visualisations with Mondrian where you change the visualisation by selecting actions. For instance you have : b := RTMondrian new. b shape rectangle withTextAbove. b nodes:(1 to: 5). b layout grid. b edges connectFrom: [ :e | e + 1 ]. b build. b view then you can click a button to: 1 display/hide the labels above the elements. 2 display/hide some elements (all odd numbers for instance) 3 display/hide connections between elements. I saw a visualisation in the Roassal examples where you can add elements in a dynamic stack grapher. So I presume it is possible to do the same with other types of visus. Any hints? Thanks in advance. Abdelghani --- End Message ---
Re: [Pharo-users] How to migrate an object to a subclass of its class but with new inst vars ?
Hi Vincent, thanks for your quick answer. This is the default behavior of adoptInstance: which calls primitiveChangeClassTo: But i specifically want to gain new inst vars, which does not work that way. I can't add an instvar to the superclass since i don't want to change my system. Steven. Le 2017-06-07 15:09, Blondeau Vincent a écrit : > Hi, > > You should be able to do it using the method primitiveChangeClassTo: but it > not recommended to do it. Are you sure that it is the only way to resolve > your problem? > > If you really want to, an example: > > Object subclass: #Toto > > slots: { #tata } > > classVariables: { } > > category: 'Temp'. > > Toto subclass: #Titi > > slots: { } > > classVariables: { } > > category: 'Temp'. > > obj := Toto new. > > obj primitiveChangeClassTo: Titi new. > > obj has a new class. > > However, you cannot add a new instance variable this way but you keep the > values of the instance. > > But nothing avoid you to add an empty instance variable in a superclass that > only the subclass will use. > > I hope that it will help you > > Vincent > > DE : Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] DE LA PART DE > Steven Costiou > ENVOYÉ : mercredi 7 juin 2017 14:54 > À : Pharo users users > OBJET : [Pharo-users] How to migrate an object to a subclass of its class but > with new inst vars ? > > Hi, > > i'm trying to migrate an object from a given class A to a subclass of A with > new inst vars. Can't get it to work. > > I have a class and an instance of it, say: > > Object subclass: #A > instanceVariableNames: '' > > |a| > > a := A new. > > A has no instance variables. Now i create a subclass B of A with a new inst > var: > > A subclass: #B > instanceVariableNames: 'x' > > I want to do the following: > > B adoptInstance: a > > It does'nt work, for what i understand it is because the format of the > classes are different (B has an inst var and A has not). > > How can i make the a object become an instance of B (subclass of a's class), > making a acquiring the new inst var x (and in more complex cases keeping its > own previous inst vars) ? > > Steven. > !!!* > "Ce message et les pièces jointes sont confidentiels et réservés à l'usage > exclusif de ses destinataires. Il peut également être protégé par le secret > professionnel. Si vous recevez ce message par erreur, merci d'en avertir > immédiatement l'expéditeur et de le détruire. L'intégrité du message ne > pouvant être assurée sur Internet, la responsabilité de Worldline ne pourra > être recherchée quant au contenu de ce message. Bien que les meilleurs > efforts soient faits pour maintenir cette transmission exempte de tout virus, > l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne > saurait être recherchée pour tout dommage résultant d'un virus transmis. > > This e-mail and the documents attached are confidential and intended solely > for the addressee; it may also be privileged. If you receive this e-mail in > error, please notify the sender immediately and destroy it. As its integrity > cannot be secured on the Internet, the Worldline liability cannot be > triggered for the message content. Although the sender endeavours to maintain > a computer virus-free network, the sender does not warrant that this > transmission is virus-free and will not be liable for any damages resulting > from any virus transmitted.!!!" -- kloum.io
Re: [Pharo-users] How to migrate an object to a subclass of its class but with new inst vars ?
Hi, You should be able to do it using the method primitiveChangeClassTo: but it not recommended to do it. Are you sure that it is the only way to resolve your problem? If you really want to, an example: Object subclass: #Toto slots: { #tata } classVariables: { } category: 'Temp'. Toto subclass: #Titi slots: { } classVariables: { } category: 'Temp'. obj := Toto new. obj primitiveChangeClassTo: Titi new. obj has a new class. However, you cannot add a new instance variable this way but you keep the values of the instance. But nothing avoid you to add an empty instance variable in a superclass that only the subclass will use. I hope that it will help you Vincent De : Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] De la part de Steven Costiou Envoyé : mercredi 7 juin 2017 14:54 À : Pharo users users Objet : [Pharo-users] How to migrate an object to a subclass of its class but with new inst vars ? Hi, i'm trying to migrate an object from a given class A to a subclass of A with new inst vars. Can't get it to work. I have a class and an instance of it, say: Object subclass: #A instanceVariableNames: '' |a| a := A new. A has no instance variables. Now i create a subclass B of A with a new inst var: A subclass: #B instanceVariableNames: 'x' I want to do the following: B adoptInstance: a It does'nt work, for what i understand it is because the format of the classes are different (B has an inst var and A has not). How can i make the a object become an instance of B (subclass of a's class), making a acquiring the new inst var x (and in more complex cases keeping its own previous inst vars) ? Steven. !!!* "Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité de Worldline ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis. This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Worldline liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.!!!"
[Pharo-users] How to migrate an object to a subclass of its class but with new inst vars ?
Hi, i'm trying to migrate an object from a given class A to a subclass of A with new inst vars. Can't get it to work. I have a class and an instance of it, say: Object subclass: #A instanceVariableNames: '' |a| a := A new. A has no instance variables. Now i create a subclass B of A with a new inst var: A subclass: #B instanceVariableNames: 'x' I want to do the following: B adoptInstance: a It does'nt work, for what i understand it is because the format of the classes are different (B has an inst var and A has not). How can i make the a object become an instance of B (subclass of a's class), making a acquiring the new inst var x (and in more complex cases keeping its own previous inst vars) ? Steven.
Re: [Pharo-users] [ANN] Pharo 6.0 released!
On Tue, Jun 06, 2017 at 05:11:17PM +0200, Esteban Lorenzano wrote: > The time has come for Pharo 6.0! Fantastic! Congrats and thanks for all the hard work. Pierce
Re: [Pharo-users] rewrite question
On 06/07/2017 12:46 PM, werner kassens wrote: Hi, where do i find the 'rewrite tool' described in the paper 'Code Transformation by Direct Transformation of ASTs' by Rizun et al? werner oops, found it, i read the paper a bit too fast, sorry. werner
[Pharo-users] rewrite question
Hi, where do i find the 'rewrite tool' described in the paper 'Code Transformation by Direct Transformation of ASTs' by Rizun et al? werner
Re: [Pharo-users] Some Metacello issue
> On 7. Jun 2017, at 14:09, Stephan Eggermontwrote: > > Never refer to fixed versions unless you know why (you need to avoid a > specific bug fix). When wanting to have repeatable builds (e.g. for bugfixes) and in the absence of other means to lock/define versions externally, I think using a fixed version is the way to go. > What is most likely is that there is some overconstrained configuration. > Does your ConfigurationOfVoyageMongo or one of the configurations it > pulls in refer to different versions of grease or magritte? Another > issue can be that there are older configurations already loaded that > conflict with the newest ones. Indeed, the ConfigurationOfMongoTalk > is broken, refering to a fixed and older version of Grease. > ConfigurationOfVoyageMongo should probably be using #'release3' of > Magritte, but that doesn't break it. Right. So we have a "OsmocomUniverse" build job that pulls in all the apps into a single image. This helps to make API modifications and not forget any of the client code. The configuration has such dependencies: ConfigurationOfOsmocomUniverse -> ConfigurationOfHLR -> ConfigurationOfVoyageMongo -> Mongotalk -> Grease A -> Magritte3 -> Grease B -> ConfigurationOfSMPPRouter -> ConfigurationOfVoyageMongo -> Mongotalk -> Grease A -> Magritte3 -> Grease B What happens is that somehow "Grease A" gets loaded, then "Grease B" and when it is time for "Grease A" again.. the system kind of explodes and this is for Pharo3 and Pharo6. Now the question to me is.. why is this coming up right now? Did MongoTalk change or Magritte3 or something else? Is there an easy way for Metacello to try a mirror instead of the original, e.g. to inject an older ConfigurationOfMagritte3? holger
Re: [Pharo-users] Porting Transducers to Pharo
Use Iceberg with Pharo6.0 There are techtalks videos about it. https://www.youtube.com/watch?v=AuZAFfWS34w=29s Phil On Wed, Jun 7, 2017 at 11:29 AM, Steffen Märckerwrote: > Hi Phil, > > that's great. I do have a GitHub account (merkste) but none at > SmalltalkHub. Is there a recommendable doc on how to use Git from Pharo? > > Best, Steffen > > > > Am .06.2017, 14:09 Uhr, schrieb p...@highoctane.be : > > Hi Steffen, >> >> I am willing to help you create the package in SmalltalkHub or Github >> based >> on your files/changeset. >> >> Do you have a github and/or SmalltalkHub account? >> >> Best, >> Phil >> >> >> On Tue, Jun 6, 2017 at 1:08 PM, Steffen Märcker wrote: >> >> Hi! >>> >>> If the need arises, we could of course factor the compact notation out >>> into >>> a separate package. > > Good idea [...] I do not want to help promoting a syntax that alienates me (and others because other people reported the saem to me). >>> I understand. Btw, I'd really, really appreciate if others post their >>> thoughts and feedback here as well. Discussion helps moving things >>> forward. >>> =) >>> >>> >>> (collection transduce map: #squared) take: 1000. >>> > To me this is much more readable. >>> Well, I'll provide that extension once it is finished. >>> >>> I cannot and do not want to use the other forms. >>> >>> >>> collection transduce >>> map: #squared; >take: 1000. > > But as the message chain has to modify the underlying object > (an eduction), very snaky side effects my occur. E.g., consider > > eduction := collection transduce. > squared := eduction map: #squared. > take := squared take: 1000. > > Now, all three variables hold onto the same object, which first squares > all elements and than takes the first 1000. > > This is because the programmer did not understand what he did. No? >>> Sure. ;-) Nevertheless, it would be very hard to debug. All of which are >>> the reasons I wouldn't implement that variant. ;-) >>> >>> >>> PS: I played with infinite stream and iteration back in 1993 in CLOS. >>> Now I do not like to mix things because it breaks my flow of thinking. >>> >>> I am not sure whether I understand what your mean by mixing. Concerning >>> transducers, the ability to handle infinite sources in only a (natural) >>> side-effect of the ability to finish reductions before all elements are >>> processed, e.g., like #detect: and such. >>> >>> Best, Steffen >>> >>> >>> >>> >>> >>> > >
Re: [Pharo-users] Porting Transducers to Pharo
I wouldn't bother with SmalltalkHub at this point. Check Iceberg, it's the future: https://github.com/pharo-vcs/iceberg/ On 7 June 2017 at 11:29, Steffen Märckerwrote: > Hi Phil, > > that's great. I do have a GitHub account (merkste) but none at > SmalltalkHub. Is there a recommendable doc on how to use Git from Pharo? > > Best, Steffen > > > > > Am .06.2017, 14:09 Uhr, schrieb p...@highoctane.be : > > Hi Steffen, >> >> I am willing to help you create the package in SmalltalkHub or Github >> based >> on your files/changeset. >> >> Do you have a github and/or SmalltalkHub account? >> >> Best, >> Phil >> >> >> On Tue, Jun 6, 2017 at 1:08 PM, Steffen Märcker wrote: >> >> Hi! >>> >>> If the need arises, we could of course factor the compact notation out >>> into >>> a separate package. > > Good idea [...] I do not want to help promoting a syntax that alienates me (and others because other people reported the saem to me). >>> I understand. Btw, I'd really, really appreciate if others post their >>> thoughts and feedback here as well. Discussion helps moving things >>> forward. >>> =) >>> >>> >>> (collection transduce map: #squared) take: 1000. >>> > To me this is much more readable. >>> Well, I'll provide that extension once it is finished. >>> >>> I cannot and do not want to use the other forms. >>> >>> >>> collection transduce >>> map: #squared; >take: 1000. > > But as the message chain has to modify the underlying object > (an eduction), very snaky side effects my occur. E.g., consider > > eduction := collection transduce. > squared := eduction map: #squared. > take := squared take: 1000. > > Now, all three variables hold onto the same object, which first squares > all elements and than takes the first 1000. > > This is because the programmer did not understand what he did. No? >>> Sure. ;-) Nevertheless, it would be very hard to debug. All of which are >>> the reasons I wouldn't implement that variant. ;-) >>> >>> >>> PS: I played with infinite stream and iteration back in 1993 in CLOS. >>> Now I do not like to mix things because it breaks my flow of thinking. >>> >>> I am not sure whether I understand what your mean by mixing. Concerning >>> transducers, the ability to handle infinite sources in only a (natural) >>> side-effect of the ability to finish reductions before all elements are >>> processed, e.g., like #detect: and such. >>> >>> Best, Steffen >>> >>> >>> >>> >>> >>> >
Re: [Pharo-users] Porting Transducers to Pharo
Hi Phil, that's great. I do have a GitHub account (merkste) but none at SmalltalkHub. Is there a recommendable doc on how to use Git from Pharo? Best, Steffen Am .06.2017, 14:09 Uhr, schrieb p...@highoctane.be: Hi Steffen, I am willing to help you create the package in SmalltalkHub or Github based on your files/changeset. Do you have a github and/or SmalltalkHub account? Best, Phil On Tue, Jun 6, 2017 at 1:08 PM, Steffen Märcker wrote: Hi! If the need arises, we could of course factor the compact notation out into a separate package. Good idea [...] I do not want to help promoting a syntax that alienates me (and others because other people reported the saem to me). I understand. Btw, I'd really, really appreciate if others post their thoughts and feedback here as well. Discussion helps moving things forward. =) (collection transduce map: #squared) take: 1000. To me this is much more readable. Well, I'll provide that extension once it is finished. I cannot and do not want to use the other forms. collection transduce map: #squared; take: 1000. But as the message chain has to modify the underlying object (an eduction), very snaky side effects my occur. E.g., consider eduction := collection transduce. squared := eduction map: #squared. take := squared take: 1000. Now, all three variables hold onto the same object, which first squares all elements and than takes the first 1000. This is because the programmer did not understand what he did. No? Sure. ;-) Nevertheless, it would be very hard to debug. All of which are the reasons I wouldn't implement that variant. ;-) PS: I played with infinite stream and iteration back in 1993 in CLOS. Now I do not like to mix things because it breaks my flow of thinking. I am not sure whether I understand what your mean by mixing. Concerning transducers, the ability to handle infinite sources in only a (natural) side-effect of the ability to finish reductions before all elements are processed, e.g., like #detect: and such. Best, Steffen
Re: [Pharo-users] How to deploy headless app without changes and source files?
> On 7 Jun 2017, at 09:38, Sven Van Caekenberghewrote: > > I think that could/would work (the code in System-Sources was refactored > quite well). I added an issue and a slice (in the Pharo 6 inbox): https://pharo.fogbugz.com/f/cases/20126/Running-Without-Changes-and-Sources Make it possible to Run without changes and sources Add two new classes: - NoChangesLog as subclass of ChangesLog - NoPharoFilesOpener as subclass of PharoFilesOpener Both are do nothing variants of their superclass. To run without changes or sources, execute NoChangesLog install. NoPharoFilesOpener install. And save your image. You now no longer need the changes file nor the sources file and you can safely move or remove them. To restore the initial situation, execute ChangesLog reset. PharoFilesOpener reset. Note: it might be possible that some code fails due to missing method sources, YMMV. Warning: of course you should no longer develop in such an image. Sven
Re: [Pharo-users] How to deploy headless app without changes and source files?
You could also subclass PharoFilesOpener with NoPharoFilesOpener, override #sourcesFileOrNil and #changesFileOrNil to just return nil, and #install it as Default. And hope that the callers can deal with the nils. > On 7 Jun 2017, at 09:38, Sven Van Caekenberghewrote: > > Andreas, > > What if you subclassed ChangesLog, say with something called NoChangesLog and > installed that as its DefaultInstance (as accessed by #default), with an > #install class side message. > > Then override #logChange: and #logSnapshot:andQuit: to do nothing. > > No need to subscribe to system announcements. > > To install, you do > > NoChangesLog install. > > To get back, you do > > ChangesLog reset. > > I think that could/would work (the code in System-Sources was refactored > quite well). > > HTH, > > Sven > >> On 7 Jun 2017, at 04:19, Andreas Sunardi wrote: >> >> For now, in my 'deployed' image, I have: >> 1. Disabled SourceFilesArray >> forceChangesToDisk >> I did not find any code branch that would avoid this, so for now I just made >> it do nothing. Maybe I should disable ChangesLog >> logChange: instead. >> >> 2. Disabled PharoFilesOpener >> changesFileOrNil >> Same story. But this only causes warning get printed out, not error. >> Disabling it removes the warning message. >> >> 3. Set changesFileStream to nil (SourceFiles changesFileStream: nil). >> Some code does have guard against nil value for this changes stream. >> >> This works for me if I do not have the changes file with the image. If I >> have the changes file and it's read-only, that's a different problem. >> >> It seems that this was possible before, judging from the older links I found >> in my original email and the existence of some guards against non-existence >> changes file. >> >> I'll check those links and perhaps see if I can be helpful there, but I >> right now have delivery to make. And I can't wait to try Pharo 6 too. >> >> -- >> Andreas >> >> >> On Tue, Jun 6, 2017 at 6:37 PM, Ben Coman wrote: >> >> >> On Wed, Jun 7, 2017 at 3:23 AM, Andreas Sunardi wrote: >> Hi Stef, >> >> I can't have changes file bundled with the tool because the tool is >> installed in a centralized location in my network and multiple users will >> run it. So the image is in a central location and read-only and so is the >> changes file (if I must have a changes file). The tool is only a processor. >> It does not need to keep/save its state. >> >> Hence, I cannot have multiple users writing to that one and the same changes >> file. >> >> I'm trying to dissect the call chain to ChangesLog and try to cut it so >> Pharo won't write to the changes file. I'm sure I should not do this. There >> must be a better way. >> >> I guess this use case just hasn't been critical for other people (there are >> lots of competing priorities) and they've found ways of working around it, >> like making your network located tool a script that copies itself itself to >> a use folder and run from there. But of course it would be better for Pharo >> to work cleanly without a changes file. To make it better, someone has to do >> it, so feel free to propose some code changes (with discussion of such on >> pharo-dev list). >> >> Here is one hint (something related I worked on recently)... >> https://pharo.fogbugz.com/f/cases/20074/Red-pane-of-death-when-sources-file-missing >> To view the changes, open image 60494 (easiest using PharoLauncher) >> and load the slice. >> >> Filtering the issue tracker on "changes file" pops up a few other >> possibilities (I haven't reviewed them, and you might find others) >> https://pharo.fogbugz.com/f/cases/11204/Crash-if-changes-file-is-not-writable >> https://pharo.fogbugz.com/f/cases/11426/Extract-the-logic-that-opens-the-sources-and-changes-files >> >> cheers -ben >> >> >> >> On Tue, Jun 6, 2017 at 11:55 AM, Stephane Ducasse >> wrote: >> We started to work on making the system ready to stop using these files. >> There are two things. >> - the changes are a tape that logs what you are doing and right now >> the system is not done to accept not to log >> So I imagine that you can remove the changes file but then do not compile >> code. >> - I do not get the "so I can't have changes file bundled with the tool." >> you do not have a bat or script that launches the application that is >> somewhere in a folder where you have the vm and the image? you could >> have the changes file there. >> >> We are interested in your scenario because last year I got a guy >> working on making pharo silent. I do not know if its changes got >> integrated into pharo. >> This is really something that we want to have. >> - having sources and changes in a specific location >> - having no source and no changes (even if it means lose your code). >> - ... >> >> Stef >> >> On Tue, Jun 6, 2017 at 8:14 PM, Andreas Sunardi
Re: [Pharo-users] How to deploy headless app without changes and source files?
Andreas, What if you subclassed ChangesLog, say with something called NoChangesLog and installed that as its DefaultInstance (as accessed by #default), with an #install class side message. Then override #logChange: and #logSnapshot:andQuit: to do nothing. No need to subscribe to system announcements. To install, you do NoChangesLog install. To get back, you do ChangesLog reset. I think that could/would work (the code in System-Sources was refactored quite well). HTH, Sven > On 7 Jun 2017, at 04:19, Andreas Sunardiwrote: > > For now, in my 'deployed' image, I have: > 1. Disabled SourceFilesArray >> forceChangesToDisk > I did not find any code branch that would avoid this, so for now I just made > it do nothing. Maybe I should disable ChangesLog >> logChange: instead. > > 2. Disabled PharoFilesOpener >> changesFileOrNil > Same story. But this only causes warning get printed out, not error. > Disabling it removes the warning message. > > 3. Set changesFileStream to nil (SourceFiles changesFileStream: nil). > Some code does have guard against nil value for this changes stream. > > This works for me if I do not have the changes file with the image. If I have > the changes file and it's read-only, that's a different problem. > > It seems that this was possible before, judging from the older links I found > in my original email and the existence of some guards against non-existence > changes file. > > I'll check those links and perhaps see if I can be helpful there, but I right > now have delivery to make. And I can't wait to try Pharo 6 too. > > -- > Andreas > > > On Tue, Jun 6, 2017 at 6:37 PM, Ben Coman wrote: > > > On Wed, Jun 7, 2017 at 3:23 AM, Andreas Sunardi wrote: > Hi Stef, > > I can't have changes file bundled with the tool because the tool is installed > in a centralized location in my network and multiple users will run it. So > the image is in a central location and read-only and so is the changes file > (if I must have a changes file). The tool is only a processor. It does not > need to keep/save its state. > > Hence, I cannot have multiple users writing to that one and the same changes > file. > > I'm trying to dissect the call chain to ChangesLog and try to cut it so Pharo > won't write to the changes file. I'm sure I should not do this. There must be > a better way. > > I guess this use case just hasn't been critical for other people (there are > lots of competing priorities) and they've found ways of working around it, > like making your network located tool a script that copies itself itself to a > use folder and run from there. But of course it would be better for Pharo to > work cleanly without a changes file. To make it better, someone has to do it, > so feel free to propose some code changes (with discussion of such on > pharo-dev list). > > Here is one hint (something related I worked on recently)... > https://pharo.fogbugz.com/f/cases/20074/Red-pane-of-death-when-sources-file-missing > To view the changes, open image 60494 (easiest using PharoLauncher) > and load the slice. > > Filtering the issue tracker on "changes file" pops up a few other > possibilities (I haven't reviewed them, and you might find others) > https://pharo.fogbugz.com/f/cases/11204/Crash-if-changes-file-is-not-writable > https://pharo.fogbugz.com/f/cases/11426/Extract-the-logic-that-opens-the-sources-and-changes-files > > cheers -ben > > > > On Tue, Jun 6, 2017 at 11:55 AM, Stephane Ducasse > wrote: > We started to work on making the system ready to stop using these files. > There are two things. > - the changes are a tape that logs what you are doing and right now > the system is not done to accept not to log > So I imagine that you can remove the changes file but then do not compile > code. > - I do not get the "so I can't have changes file bundled with the tool." > you do not have a bat or script that launches the application that is > somewhere in a folder where you have the vm and the image? you could > have the changes file there. > > We are interested in your scenario because last year I got a guy > working on making pharo silent. I do not know if its changes got > integrated into pharo. > This is really something that we want to have. > - having sources and changes in a specific location > - having no source and no changes (even if it means lose your code). > - ... > > Stef > > On Tue, Jun 6, 2017 at 8:14 PM, Andreas Sunardi wrote: > > Sorry to bring this up again. But it turns out that I had the image > > directory writable by myself, so it created a new changes file. That's why > > Pharo didn't complain about missing changes file. When I removed write > > permission in the tool installation, Pharo gives error for not having or not > > able to write to changes file. > > > > I guess I'm back to the problem how to deploy a tool
Re: [Pharo-users] [ANN] Pharo 6.0 released!
Great news! Thanks to Esteban and the 80+ contributors. I have multiple patches waiting for the 7.0 dev cycle to begin. Can't wait... :-) Cheers, Alistair On 6 June 2017 at 17:11, Esteban Lorenzanowrote: > Dear World, > > The time has come for Pharo 6.0! > > Pharo is a pure object-oriented programming language and a powerful > environment, focused on simplicity and immediate feedback. > > This is our most significant release yet. Here are some highlights: > > - Pharo is now provided in 64-bit version in Linux and OSX and brings even > better performance and stability (beware, 64bits version is a new technology > and a small amount of tests is still failing) > - A new code changes management system named Epicea for easier reviewing and > recovering of your code easily > - Integrated support for Git through an easy-to-use tool for repositories > and commits management named Iceberg (as a preview for Pharo 6, it will be > the default in Pharo 7) > - The unified foreign function interface (UnifiedFFI) for interfacing with > the outside world is significantly improved > - The PharoVM is now part of OpenSmalltalk initiative > - Introduction of object immutability, alternative bytecode sets and block > closures independent of outer context > - Pharo can now be bootstrapped from source code managed by Git > - Pharo modularity is improved > - Pharo is faster > - The Dark Theme was improved and set as default color theme of Pharo > > > These are just the more prominent highlights, but the details are just as > important. We have closed 1474 issues in Pharo 6.0 (a more complete > changelog can be found at > https://github.com/pharo-project/pharo-changelogs/blob/master/Pharo60ChangeLogs.md). > > While the technical improvements are significant (starting the transition to > 64bits is a remarkable achievement), still the most impressive fact is that > the new code that got in the main Pharo 6.0 image was contributed by more > than 80 people. > > Pharo is more than code. It is an exciting project involving energetic > people. We thank all the contributors of this release: > > Alberto Bacchelli, Alejandro Infante, Alexandre Bergel, Aliaksei Syrel, > Alistair Grant, Andrei Chis, Ben Coman, Bernardo Contreras, Bernhard Pieber, > Boris Spasojevic, Christophe Demarey, Clement Bera, Cyril Ferlicot, Dale > Henrichs, Damien Cassou, Damien Pollet, Dave Lewis, Denis Kudriashov, Dirk > Roeleveld, Eliot Miranda, Esteban Lorenzano, Esteban Maringolo, Evan > Donahue, Federico Balaguer, Franck Warlouzet, Glenn Cavarle, Guillermo > Polito, Gustavo Santos, Henrik Johansen, Henrik Nergaard, Hilaire Fernandes, > Holger Hans, Jan Kurs, Jan van de Sandt, Johan Fabry, Juraj Kubelka, K. K. > Subramaniam, Ken Causey, Kris Gybels, Lionel Akue, Luc Fabresse, Lucas > Godoy, Marcus Denker, Mariano Martinez Peck, Marion Noirbent, Martin Dias, > Max Leske, Maxime Roelandt, Merwan Ouddane, Matteo Bellotto, Miguel > Campusano, Milton Mamani, Myroslava Romaniuk, Nicolai Hess, Nicolas Cellier, > Nicolas Passerini, Norbert Hartl, Offray Luna, Pablo Tesone, Paul De > Bruicker, Pavel Krivanek, Peter Uhnak, Philippe Back, Roger Stebler, Ronie > Salgado, Sean DeNigris, Serge Stinckwich, Skip Lentz, Sophie Kaleba, Stefan > Reichhart, Stephan Eggermont, Stephane Ducasse, Sven Van Caekenberghe, > Thibault Arloing, Thibault Arloing, Thibault Raffaillac, Thierry Goubier, > Thomas Heniart, Tommaso Dal Sasso, Torsten Bergmann, Tudor Girba, Udo > Schneider, Valentin Ryckewaert, Vincent Blondeau, Werner Kassens, Yuriy > Tymchuk > > (If you contributed with Pharo 6.0 development in any way and we missed your > name, please send us a mail and we will add you). > > Enjoy! > > The Pharo Team > > Try Pharo: http://pharo.org/download > Learn Pharo: http://pharo.org/documentation
Re: [Pharo-users] Some Metacello issue
I would like to repeat here again: don't refer to fixed version numbers of packages out of your control in configurations. Refer to #'release' versions that can be patched by the maintainers of your dependencies. That is only appropriate when having to patch around a problem, and couples your configuration hard to the development schedule of your dependency, making it your responsibility to update your configuration whenever that of your dependency is updated. Stephan
Re: [Pharo-users] Some Metacello issue
On 07/06/17 06:19, Holger Freyther wrote: Hi, after having made some new releases I have an odd Metacello issue and I am not sure how to debug it. This happens on my legacy Pharo3/Pharo4 images that I still need to support in deployment. It seems to be related to a dependency chain of "app"->VoyageMongo->Magritte3 3.5.0 and somehow version '3.1.1.1' of Magritte3 doing something with Grease #stable and not finding a 'Core' group. Any idea how to debug it or if any configuration changed recently? It also only seems to happen if there are two dependency chains that try to load the same VoyageMongo version. Metacello new configuration: 'Magritte3'; repository: 'http://www.smalltalkhub.com/mc/Magritte/Magritte3/main'; version: '3.5.0'; load version: #'release35' (or #'release3' Never refer to fixed versions unless you know why (you need to avoid a specific bug fix). What is most likely is that there is some overconstrained configuration. Does your ConfigurationOfVoyageMongo or one of the configurations it pulls in refer to different versions of grease or magritte? Another issue can be that there are older configurations already loaded that conflict with the newest ones. Indeed, the ConfigurationOfMongoTalk is broken, refering to a fixed and older version of Grease. ConfigurationOfVoyageMongo should probably be using #'release3' of Magritte, but that doesn't break it. Stephan