Re: [Pharo-users] [Pharo-dev] [SURVEY] Code Critics Usage
Done ! On Tue, May 5, 2015 at 1:46 AM Sergio Fedi sergio.f...@gmail.com wrote: Done!
Re: [Pharo-users] [ANN] MorphicDoc : A project to document Morphic
my pleasure Στις 11 Απρ 2015 9:19 μ.μ., ο χρήστης Sean P. DeNigris s...@clipperadams.com έγραψε: kilon.alios wrote I decided to start my own project called MorphicDoc Great! Thanks :) - Cheers, Sean -- View this message in context: http://forum.world.st/ANN-MorphicDoc-A-project-to-document-Morphic-tp4819062p4819085.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Re: [Pharo-users] [ANN] MorphicDoc : A project to document Morphic
Thanks will read for now as first feature will be to connect gtspotter to help tool Στις 12 Απρ 2015 4:40 μ.μ., ο χρήστης Sean P. DeNigris s...@clipperadams.com έγραψε: kilon.alios wrote My goal is quite diffirent I want a more dynamic documentation Ys!! It is a shame that the documentation for our Dynabook is written almost exclusively in old media :/ With a not-too-unimaginable enhancement to our tools (which I think is much more plausible once we have Tx), we could write in WYSIWYG to be viewed, manipulated, evaluated, hot linked, etc in-image. Have you read Active Essays on the Web [1]? [1] http://www.vpri.org/pdf/tr2009002_active_essays.pdf ? - Cheers, Sean -- View this message in context: http://forum.world.st/ANN-MorphicDoc-A-project-to-document-Morphic-tp4819062p4819157.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Re: [Pharo-users] [ANN] MorphicDoc : A project to document Morphic
If someone wants to add it to UPBE he is more than welcomed to do so. My goal is quite diffirent I want a more dynamic documentation. That means I will fork and improve the help tool. I want to offer a more interactive experience. Time will tell if my ideas are practical and usefull but I want to focus there. kilon -- That's awesome! How would you feel about also adding some of those docs into the Morphic chapter of PBE? (Or, if you dont have the bandwidth, would you be opposed to someone else doing that?) On Saturday, April 11, 2015, kilon alios kilon.al...@gmail.com wrote: One of the frequent questions we get asked is how to use Morphic. Unfortunately there is very little documentation for Morphic around and barely touches the most interesting concepts. I decided to start my own project called MorphicDoc . MorphicDoc is very easy to install with Configuration Browser and it works in 2 ways. a) open the Help tool (World Menu = Help = Help Browser ) and there you will find a new section called Morphic Doc by Kilon b) open System Browser go to MorphicDoc package and look at the class side of MorphicDocExamples class , each method is an example taken from the tutorial in help tool and you can easily execute by clicking the green arrow next to its name. Right now only 3 pages have been added but slowly and steadily more will be added. To get new pages and even new chapters make sure you reinstall the same very simple way like installing just open Configuration Browser and click Install Stable Version after you selected MorphicDoc. I will try to add 1 page per day and at least 1 page per week depending on my free time. So make sure you update at least once per week to get the latest version of MorphicDoc. You can report issues , advice and requests at the project page in https://github.com/kilon/MorphicDoc. Of course pull requests are more than welcomed.
Re: [Pharo-users] [ANN] MorphicDoc : A project to document Morphic
Thanks I was joking about gitfiletree I am sure I will be fine Στις 12 Απρ 2015 10:18 π.μ., ο χρήστης p...@highoctane.be p...@highoctane.be έγραψε: Le 11 avr. 2015 20:00, kilon alios kilon.al...@gmail.com a écrit : yes I am aware of your merge driver, will give it a try of course. I am certainly curious to see how well it works in practice. Works nicely here but I am doing FileTree with external git tooling. Great initiative on Morphic. Phil If not I will blame you of course and just copy paste the code and commit it myself. Good opportunity to learn more about git too. On Sat, Apr 11, 2015 at 8:49 PM, Thierry Goubier thierry.goub...@gmail.com wrote: Hi Kilon, Le 11/04/2015 19:42, kilon alios a écrit : sure any help is welcomed . Contributing is the usual github workflow, you fork and send me pull requests (I would like to use this opportunity to test to see how well pull request works with gitfiletree). You'll tell me :) Just remember that github may not be able to merge because of conflicts in the filetree metadata. In this case, you need to merge on your system with the merge driver, and push to github. Thierry Creating the documentation is also quite simple, if you open the help tool has a section of how to make documentation. To put simply, just take a look at the MorphDoc class , hellworld method and use that as template to create your own page , then add the page (name of the method) to the array returned by pages method. Then after you add the page you add your example code that you use in that page in the MorphDocExamples class (also found in MorphDoc package) the name of the method should start with example follow with name of the method use for the page in MorphDoc. Each page should contain a simple image and should be no more than one page long. I try to brake documentation to small pages easy to follow and understand instead of lengthy descriptions. I am on easter vacation in my father's village and the internet here is very weak so its hard for me to be online so if you need any help just email me. On Sat, Apr 11, 2015 at 7:50 PM, Jigyasa Grover grover.jigya...@gmail.com mailto:grover.jigya...@gmail.com wrote: Hey Kilon ! I would like to contribute to your new project. Started learning Morphic on Mr. Martin Bahr's suggestion. Looking forward to a positive reply. Thanks Jigyasa Grover -- View this message in context: http://forum.world.st/ANN-MorphicDoc-A-project-to-document-Morphic-tp4819062p4819074.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Re: [Pharo-users] [ANN] MorphicDoc : A project to document Morphic
sure any help is welcomed . Contributing is the usual github workflow, you fork and send me pull requests (I would like to use this opportunity to test to see how well pull request works with gitfiletree). Creating the documentation is also quite simple, if you open the help tool has a section of how to make documentation. To put simply, just take a look at the MorphDoc class , hellworld method and use that as template to create your own page , then add the page (name of the method) to the array returned by pages method. Then after you add the page you add your example code that you use in that page in the MorphDocExamples class (also found in MorphDoc package) the name of the method should start with example follow with name of the method use for the page in MorphDoc. Each page should contain a simple image and should be no more than one page long. I try to brake documentation to small pages easy to follow and understand instead of lengthy descriptions. I am on easter vacation in my father's village and the internet here is very weak so its hard for me to be online so if you need any help just email me. On Sat, Apr 11, 2015 at 7:50 PM, Jigyasa Grover grover.jigya...@gmail.com wrote: Hey Kilon ! I would like to contribute to your new project. Started learning Morphic on Mr. Martin Bahr's suggestion. Looking forward to a positive reply. Thanks Jigyasa Grover -- View this message in context: http://forum.world.st/ANN-MorphicDoc-A-project-to-document-Morphic-tp4819062p4819074.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Re: [Pharo-users] [ANN] MorphicDoc : A project to document Morphic
yes I am aware of your merge driver, will give it a try of course. I am certainly curious to see how well it works in practice. If not I will blame you of course and just copy paste the code and commit it myself. Good opportunity to learn more about git too. On Sat, Apr 11, 2015 at 8:49 PM, Thierry Goubier thierry.goub...@gmail.com wrote: Hi Kilon, Le 11/04/2015 19:42, kilon alios a écrit : sure any help is welcomed . Contributing is the usual github workflow, you fork and send me pull requests (I would like to use this opportunity to test to see how well pull request works with gitfiletree). You'll tell me :) Just remember that github may not be able to merge because of conflicts in the filetree metadata. In this case, you need to merge on your system with the merge driver, and push to github. Thierry Creating the documentation is also quite simple, if you open the help tool has a section of how to make documentation. To put simply, just take a look at the MorphDoc class , hellworld method and use that as template to create your own page , then add the page (name of the method) to the array returned by pages method. Then after you add the page you add your example code that you use in that page in the MorphDocExamples class (also found in MorphDoc package) the name of the method should start with example follow with name of the method use for the page in MorphDoc. Each page should contain a simple image and should be no more than one page long. I try to brake documentation to small pages easy to follow and understand instead of lengthy descriptions. I am on easter vacation in my father's village and the internet here is very weak so its hard for me to be online so if you need any help just email me. On Sat, Apr 11, 2015 at 7:50 PM, Jigyasa Grover grover.jigya...@gmail.com mailto:grover.jigya...@gmail.com wrote: Hey Kilon ! I would like to contribute to your new project. Started learning Morphic on Mr. Martin Bahr's suggestion. Looking forward to a positive reply. Thanks Jigyasa Grover -- View this message in context: http://forum.world.st/ANN-MorphicDoc-A-project-to-document-Morphic- tp4819062p4819074.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
[Pharo-users] [ANN] MorphicDoc : A project to document Morphic
One of the frequent questions we get asked is how to use Morphic. Unfortunately there is very little documentation for Morphic around and barely touches the most interesting concepts. I decided to start my own project called MorphicDoc . MorphicDoc is very easy to install with Configuration Browser and it works in 2 ways. a) open the Help tool (World Menu = Help = Help Browser ) and there you will find a new section called Morphic Doc by Kilon b) open System Browser go to MorphicDoc package and look at the class side of MorphicDocExamples class , each method is an example taken from the tutorial in help tool and you can easily execute by clicking the green arrow next to its name. Right now only 3 pages have been added but slowly and steadily more will be added. To get new pages and even new chapters make sure you reinstall the same very simple way like installing just open Configuration Browser and click Install Stable Version after you selected MorphicDoc. I will try to add 1 page per day and at least 1 page per week depending on my free time. So make sure you update at least once per week to get the latest version of MorphicDoc. You can report issues , advice and requests at the project page in https://github.com/kilon/MorphicDoc. Of course pull requests are more than welcomed.
Re: [Pharo-users] GitHub Mirror Workflow
probably I kinda cheat, I use the smalltalkhub repo as nothing more than a shell for my github repo. I commit to it only my configuration which in turn loads the code from github . I have done this with Ephestos and Nireas , the configuration browsers entries just load the baseline from my github repos this way people who are not familiar with github can load my code from sthub without installing git or learning git but will getting automagically the latest code from my github repos. Its a win win situation and beats having to maintain multiple repos of the same project :) There is also no need to touch the configuration either so all my work is focus just on the github repo. I recently updated to add info to it for the package catalog. On Wed, Apr 8, 2015 at 3:07 PM, Sean P. DeNigris s...@clipperadams.com wrote: Bump :) Sean P. DeNigris wrote for the Mirror on Github use case, I wonder if less granularity wouldn't clearly be more appropriate. I read about using chunk format (not ideal, but perhaps a bit more readable on the mirror) via Gitocello, but loading in Pharo 4.0 broke on the FFI dependency. Any thoughts/suggestions? - Cheers, Sean -- View this message in context: http://forum.world.st/GitHub-Mirror-Workflow-tp4810339p4818339.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Re: [Pharo-users] How do I get the list of projects on SmalltalkHub?
Esteban about how to add projects to catalog page. Could you add examples of those methods ? For example are they suppose to return values ? How should they be defined ? I want to add info for my project Ephestos On Tue, Apr 7, 2015 at 3:03 PM, Esteban Lorenzano esteba...@gmail.com wrote: http://catalog.pharo.org shows you all projects registered (not just on sthub) http://smalltalkhub.com/list shows you a list of all public repositories in sthub (not always equivalent to a project) and yes… this information is not very public right now :( Esteban On 04 Apr 2015, at 18:58, stepharo steph...@free.fr wrote: Where can we find this information as a newbie? Stef
Re: [Pharo-users] How do I get the list of projects on SmalltalkHub?
do the first and second return strings ? for the third one I will need more info. is it an array of literals like ^#( #python #database #pharo4 ) ? On Tue, Apr 7, 2015 at 3:33 PM, Esteban Lorenzano esteba...@gmail.com wrote: yes, they have to return certain values: catalogDescription ^ A small paragraph describing your project.catalogContactInfo ^ Contact information such as email, mailing lists and website.catalogKeywords ^ An array of keys to better index your project :) explanation could be better… but right now I cannot change it… I will put it in my todo. Esteban On 07 Apr 2015, at 14:13, kilon alios kilon.al...@gmail.com wrote: Esteban about how to add projects to catalog page. Could you add examples of those methods ? For example are they suppose to return values ? How should they be defined ? I want to add info for my project Ephestos On Tue, Apr 7, 2015 at 3:03 PM, Esteban Lorenzano esteba...@gmail.com wrote: http://catalog.pharo.org shows you all projects registered (not just on sthub) http://smalltalkhub.com/list shows you a list of all public repositories in sthub (not always equivalent to a project) and yes… this information is not very public right now :( Esteban On 04 Apr 2015, at 18:58, stepharo steph...@free.fr wrote: Where can we find this information as a newbie? Stef
Re: [Pharo-users] How do I get the list of projects on SmalltalkHub?
thank you Cyril :) On Tue, Apr 7, 2015 at 3:51 PM, Cyril Ferlicot cyril.ferli...@gmail.com wrote: Example with Cocoon: catalogContactInfo ^ 'The creator of Cocoon is Stephan Ducasse with the help of Cyril Ferlicot. The website is at *http://smalltalkhub.com/#!/~PharoExtras/Cocoon/*.' catalogDescription ^ 'An application configuration system using JSON. I manage a set of properties. I can contains other sub-configurations. If the configuration don''t find an information it will look up in his parent.' catalogKeywords ^ #(cocoon configuration manager documentation) You can also look on the configuration of other application like Pillar etc... On 7 April 2015 at 14:47, kilon alios kilon.al...@gmail.com wrote: do the first and second return strings ? for the third one I will need more info. is it an array of literals like ^#( #python #database #pharo4 ) ? On Tue, Apr 7, 2015 at 3:33 PM, Esteban Lorenzano esteba...@gmail.com wrote: yes, they have to return certain values: catalogDescription ^ A small paragraph describing your project.catalogContactInfo ^ Contact information such as email, mailing lists and website.catalogKeywords ^ An array of keys to better index your project :) explanation could be better… but right now I cannot change it… I will put it in my todo. Esteban On 07 Apr 2015, at 14:13, kilon alios kilon.al...@gmail.com wrote: Esteban about how to add projects to catalog page. Could you add examples of those methods ? For example are they suppose to return values ? How should they be defined ? I want to add info for my project Ephestos On Tue, Apr 7, 2015 at 3:03 PM, Esteban Lorenzano esteba...@gmail.com wrote: http://catalog.pharo.org shows you all projects registered (not just on sthub) http://smalltalkhub.com/list shows you a list of all public repositories in sthub (not always equivalent to a project) and yes… this information is not very public right now :( Esteban On 04 Apr 2015, at 18:58, stepharo steph...@free.fr wrote: Where can we find this information as a newbie? Stef -- Cheers Cyril Ferlicot
Re: [Pharo-users] IconFactory - utility for creating icons in Pharo
yes exactly On Mon, Apr 6, 2015 at 1:18 AM, Ben Coman b...@openinworld.com wrote: On Mon, Apr 6, 2015 at 2:16 AM, kilon alios kilon.al...@gmail.com wrote: Maybe we are not talking about the same thing ? We do I just brought an alternative. My initial question is why this data is not stored inside a Collection and instead individual methods are preferred. But now that I thought it through I understand in practice would not make much difference. And as you said methods are already browsable, Collections are not. Also methods can be packaged and distributed using Monticello. Live Collections can not. cheers -ben
Re: [Pharo-users] IconFactory - utility for creating icons in Pharo
Maybe we are not talking about the same thing ? We do I just brought an alternative. My initial question is why this data is not stored inside a Collection and instead individual methods are preferred. But now that I thought it through I understand in practice would not make much difference. And as you said methods are already browsable, Collections are not. If so, then the reason to keep them in image has to do with resource management, an image is self contained. I was talking about managing resources as a collection of methods, an example would be ZnByteEncoder, where mappings are defined on the class side. If resources are originally downloaded from somewhere else but cached inside the image, it is worth mentioning that, and shipping the necessary code to redo it, in the case of the example, #generateByteToUnicodeSpec: Yeah I think I understand that now too, it makes the distribution of the image much easier not to have to worry about external resources. Yes I did understood what you were talking about, I just was not clear about the benefits of this approach over using Collections and instance variables instead. But I do think that now I understand . Thank you for trying to help me understand :) It was important for me to understand this because I want to import a lot of SVG data into the image and I was not sure if I should use just SVG files or instead use methods that return SVG strings. I would be using methods since it will make my distribution much simpler and easier to version control too.
Re: [Pharo-users] IconFactory - utility for creating icons in Pharo
SVG is human readable (XML based), no ? yeap , XML format , nothing special. Athens has an importer for them. If they are not too large, it might even be quite useful to store them as strings in the image, although I do agree this is not scalable in the end. (But Seaside uses this mechanism to store real images in the image, and that works very well during development, in the sense that it is convenient). oh yes it suits me to keep them small so they can be more modular so as you said to compose and decompose them easily . And if it works well for you, should work well for me ;)
Re: [Pharo-users] IconFactory - utility for creating icons in Pharo
Tried your install instructions but give me an error[1] about being unable to resolve IconFactory , tries to look inside my package-cache of my image (pharo 4 - 40591 -MACOSX 10). Interesting tool, out of coincidence I am also working with icons but in my cases its SVG icons using Bloc . [1] MetacelloFetchingMCSpecLoader(MetacelloCommonMCSpecLoader)retryingResolvePackageSpecReferences:gofer: linearLoadPackageSpec: packageSpec gofer: gofer MetacelloPlatform current do: [ | references nearestReference cachedReference externalReference mcVersion loadedVersionInfos | check to see if mcz file is already in cacheRepository cachedReference := self resolvePackageSpec: packageSpec cachedGofer: self loaderPolicy cacheGofer. (cachedReference ~~ nil and: [ packageSpec getFile ~~ nil ]) ifTrue: [ cachedReference name = packageSpec file ifTrue: [ exact match between packageSpec file and cache ^ self scheduleFetchFor: packageSpec cachedReference: cachedReference ] ].look up mcz file references := self retryingResolvePackageSpecReferences: packageSpec gofer: gofer. nearestReference := references last asMetacelloCachingResolvedReference.If the mcz is already in the cacheRepository, no need to copy (cachedReference ~~ nil and: [ cachedReference name = nearestReference name ]) ifTrue: [ latest reference in repository matches cachedReference ... ^ self scheduleFetchFor: packageSpec nearestReference: nearestReference ].If the mcz is already loaded into the image, no need to copy (self ignoreImage not and: [ (loadedVersionInfos := self ancestorsFor: packageSpec) ~~ nil ]) ifTrue: [ loadedVersionInfos do: [ :info | info name = nearestReference name ifTrue: [ ^ self ] ] ]. externalReference := (references select: [ :ref | ref name = nearestReference name ]) first asMetacelloCachingResolvedReference. self repositoryMap at: externalReference name put: externalReference repository. (self resolveDependencies: externalReference nearest: nearestReference into: (OrderedCollection with: nearestReference)) do: [ :reference | | pSpec l | mcVersion := reference version. (l := (GoferVersionReference name: reference name) resolveAllWith: self loaderPolicy cacheGofer) isEmpty ifTrue: [ self cacheRepository storeVersion: mcVersion. reference == nearestReference ifTrue: [ pSpec := packageSpec ] ifFalse: [ pSpec := packageSpec project packageSpec. pSpec name: mcVersion package name ]. self loadData addVersion: mcVersion versionInfo: mcVersion info resolvedReference: reference packageSpec: pSpec ] ]. self scheduleFetchFor: packageSpec externalReference: externalReference ] displaying: 'Fetching ' , packageSpec file in MetacelloFetchingMCSpecLoaderlinearLoadPackageSpec:gofer: in Block: linearLoadPackageSpec: packageSpec gofer: gofer... MetacelloPharo30Platform(MetacelloPlatform)do:displaying: MetacelloFetchingMCSpecLoaderlinearLoadPackageSpec:gofer: MetacelloPackageSpecloadUsing:gofer: [ :pkg | pkg loadUsing: self gofer: gofer ] in MetacelloFetchingMCSpecLoader(MetacelloCommonMCSpecLoader)linearLoadPackageSpecs:repositories: in Block: [ :pkg | pkg loadUsing: self gofer: gofer ] OrderedCollectiondo: MetacelloFetchingMCSpecLoader(MetacelloCommonMCSpecLoader)linearLoadPackageSpecs:repositories: [ super linearLoadPackageSpecs: packageSpecs repositories: repositories ] in MetacelloFetchingMCSpecLoaderlinearLoadPackageSpecs:repositories: in Block: [ super linearLoadPackageSpecs: packageSpecs repos...etc... BlockClosureensure: MetacelloLoaderPolicypushLoadDirective:during: MetacelloLoaderPolicypushLinearLoadDirectivesDuring:for: MetacelloFetchingMCSpecLoaderlinearLoadPackageSpecs:repositories: MetacelloFetchingMCSpecLoader(MetacelloCommonMCSpecLoader)load MetacelloMCVersionSpecLoaderload MetacelloMCVersionexecuteLoadFromArray: [ :dict | ^ self executeLoadFromArray: anArray ] in [ self versionSpec loader: newLoader. MetacelloPlatform current useStackCacheDuring: [ :dict | ^ self executeLoadFromArray: anArray ] defaultDictionary: Dictionary new ] in [ [ self versionSpec loader:
Re: [Pharo-users] IconFactory - utility for creating icons in Pharo
yes thats better , install works, first step works too. createIconsFromDirectory seems to see only the first png, maybe because its too large. createIconFromFile gives me a MNU: ByteString base [1]. Why those methods are not on the class side ? [1]ByteString(Object)doesNotUnderstand: #base IconFactorycreateIconFromFile:inClass: UndefinedObjectDoIt OpalCompilerevaluate SmalltalkEditorevaluateSelectionAndDo: SmalltalkEditorevaluateSelection [ textMorph editor evaluateSelection ] in PluggableTextMorphdoIt in Block: [ textMorph editor evaluateSelection ] [ result := editBlock value ] in PluggableTextMorphhandleEdit: in Block: [ result := editBlock value ] TextMorphForEditView(TextMorph)handleEdit: PluggableTextMorphhandleEdit: PluggableTextMorphdoIt Workspace(Object)perform:orSendTo: [ | selArgCount | show cursor in case item opens a new MVC window (selArgCount := selector numArgs) = 0 ifTrue: [ target perform: selector ] ifFalse: [ selArgCount = arguments size ifTrue: [ target perform: selector withArguments: arguments ] ifFalse: [ target perform: selector withArguments: (arguments copyWith: evt) ] ]. self changed ] in ToggleMenuItemMorph(MenuItemMorph)invokeWithEvent: in Block: [ ... BlockClosureensure: CursorWithMask(Cursor)showWhile: ToggleMenuItemMorph(MenuItemMorph)invokeWithEvent: ToggleMenuItemMorph(MenuItemMorph)mouseUp: ToggleMenuItemMorph(MenuItemMorph)handleMouseUp: MouseButtonEventsentTo: ToggleMenuItemMorph(Morph)handleEvent: MorphicEventDispatcherdispatchDefault:with: MorphicEventDispatcherhandleMouseUp: MouseButtonEventsentTo: [ ^ anEvent sentTo: self ] in MorphicEventDispatcherdispatchEvent:with: in Block: [ ^ anEvent sentTo: self ] BlockClosureensure: MorphicEventDispatcherdispatchEvent:with: ToggleMenuItemMorph(Morph)processEvent:using: MorphicEventDispatcherdispatchDefault:with: MorphicEventDispatcherhandleMouseUp: MouseButtonEventsentTo:
Re: [Pharo-users] IconFactory - utility for creating icons in Pharo
I found the problem Norse_largeThe '-' prefix works only for literal numbers (use #negated instead) - -cpcIconContents Private - Method generated with the content of the file File @ /Users/kilon/Downloads/Norse_large-cpc.png looks like it does not like that i use - inside the file name. In the folder the name of the file is not Norse_large-cpc.png but Norse-large-cpc.png - has some special meaning here ? On Sat, Apr 4, 2015 at 4:12 PM, Peter Uhnák i.uh...@gmail.com wrote: create file ? i thought the class only creates methods yeah, I mean method anyway, the method is created , but it does not proceed to next png. Shouldn create a method for each png it finds in the directory ? yes it should, it operates on a collection, so if dir allFiles select: [ :each | each extension = 'png' ] shows more then one file it should also create a method for each one, not just the first Peter
Re: [Pharo-users] IconFactory - utility for creating icons in Pharo
once more I really dont like idea of methods returning single values. This also one of the reasons why Spec annoys me. Why not have Collection / Dictionary that stores all these strings ? Having 100 methods for 100 icons seems really ugly . Instead one collection with 100 entries and a single method would be more than enough. I know its not just you that do this and is how icons work in Pharo .Its basically how many things work like this inside Pharo. But I still dont get it why ? On Sat, Apr 4, 2015 at 5:15 PM, Peter Uhnák i.uh...@gmail.com wrote: Aha, of course. The program makes assumptions about the file name and since it is naming the method like the file it fails, because you can't have - in method name. I could change it so it removes all non-alphanumeric characters from the name. Peter On Sat, Apr 4, 2015 at 3:52 PM, kilon alios kilon.al...@gmail.com wrote: I found the problem Norse_largeThe '-' prefix works only for literal numbers (use #negated instead) - -cpcIconContents Private - Method generated with the content of the file File @ /Users/kilon/Downloads/Norse_large-cpc.png looks like it does not like that i use - inside the file name. In the folder the name of the file is not Norse_large-cpc.png but Norse-large-cpc.png - has some special meaning here ? On Sat, Apr 4, 2015 at 4:12 PM, Peter Uhnák i.uh...@gmail.com wrote: create file ? i thought the class only creates methods yeah, I mean method anyway, the method is created , but it does not proceed to next png. Shouldn create a method for each png it finds in the directory ? yes it should, it operates on a collection, so if dir allFiles select: [ :each | each extension = 'png' ] shows more then one file it should also create a method for each one, not just the first Peter
Re: [Pharo-users] IconFactory - utility for creating icons in Pharo
No really I dont get the idea, composition decomposition is the bread and butter of collection types in any language. Unless pharo has a weakness in this area that I am not aware of, in python I had never such problem. actually its a foremost reason to use them in the first place. Browsing is a limitation of the browser which does not provide a special view for variables but not that hard to amend with inspector. And I find hard to believe you prefer a ton of short methods instead one short one for returning those values. The only reason I can think in this case of icons is that compiling a string as return value of a method to be used statically is easier/ more convenient than defining a huge collection in the initialize method. on the other hand would not make more sense to have all this data that means nothing for the user as separate files and let them load at the startup of the image ? Its not as if anyone would bother editing those huge gibberish strings . Thats the only way I see for avoiding long methods. Or am I missing something here ? On Sat, Apr 4, 2015 at 6:01 PM, Sven Van Caekenberghe s...@stfx.eu wrote: Because composition/decomposition is good (among others for re-use), because with separate entries you can browse them more easily, because we don't like long methods, ... You get the idea ;-) On 04 Apr 2015, at 16:45, kilon alios kilon.al...@gmail.com wrote: once more I really dont like idea of methods returning single values. This also one of the reasons why Spec annoys me. Why not have Collection / Dictionary that stores all these strings ? Having 100 methods for 100 icons seems really ugly . Instead one collection with 100 entries and a single method would be more than enough. I know its not just you that do this and is how icons work in Pharo .Its basically how many things work like this inside Pharo. But I still dont get it why ? On Sat, Apr 4, 2015 at 5:15 PM, Peter Uhnák i.uh...@gmail.com wrote: Aha, of course. The program makes assumptions about the file name and since it is naming the method like the file it fails, because you can't have - in method name. I could change it so it removes all non-alphanumeric characters from the name. Peter On Sat, Apr 4, 2015 at 3:52 PM, kilon alios kilon.al...@gmail.com wrote: I found the problem Norse_largeThe '-' prefix works only for literal numbers (use #negated instead) - -cpcIconContents Private - Method generated with the content of the file File @ /Users/kilon/Downloads/Norse_large-cpc.png looks like it does not like that i use - inside the file name. In the folder the name of the file is not Norse_large-cpc.png but Norse-large-cpc.png - has some special meaning here ? On Sat, Apr 4, 2015 at 4:12 PM, Peter Uhnák i.uh...@gmail.com wrote: create file ? i thought the class only creates methods yeah, I mean method anyway, the method is created , but it does not proceed to next png. Shouldn create a method for each png it finds in the directory ? yes it should, it operates on a collection, so if dir allFiles select: [ :each | each extension = 'png' ] shows more then one file it should also create a method for each one, not just the first Peter
Re: [Pharo-users] what to use for simple parsing
depends on your needs. I never used regex before , pharo regex was my first. I used on a specific case that was quite simple. I love its simplicity and its extremely compact syntax. Perfect fit for my needs, one very happy customer :) I think it depends on complexity of the parsing and how you like to work, if you have a simple problem and want a compact syntax, nothing can beat regex. At least taking account SmaCC and PettitParser. When I need more complex parsing with nested syntax, SmaCC made a lot more sense. On Thu, Apr 2, 2015 at 4:31 AM, Martin Bähr mba...@email.archlab.tuwien.ac.at wrote: Excerpts from stepharo's message of 2015-04-01 23:00:11 +0200: May be this was a mistake to get regexp. Some people, when confronted with a problem, think I know, I'll use regular expressions. Now they have two problems. (jwz)
Re: [Pharo-users] what to use for simple parsing
I used Regex at first to do the job but it turned into an unholy mess (not that it couldn't parse what I needed) and PetitParser was there. it really depends how you approach this. For example in my case I quickly found out that would be insane to put everything in a single string, so I broke the single string to smaller ones and resynthesised it. Each string had a very simple regex quite easy to read if one is familiar syntax. And as Damien said you could extend String to a more flexible object, but then you get in the realm of SmaCC/ PettitParser. I chose SmaCC because it already offered solution to my problem. But for the title of this thread simple parsing I think regex is a very good choice depending on your demands.
Re: [Pharo-users] what to use for simple parsing
yeap you use what makes your life easier ;) On Thu, Apr 2, 2015 at 12:49 PM, p...@highoctane.be p...@highoctane.be wrote: Sure works. Regex '((XXX Logical Channel) ([0-9])) on (((Upstream)|(Downstream)) ([0-9])) on ((chassis) ([0-9])), ((slot) ([0-9])), ((mac) ([0-9]))' asRegex But in PP, things were more comple and there were a lot of them, so: line ^ temperatureStatusDescrEntry token asParser / temperatureStatusValueEntry token asParser / temperatureThresholdEntry token asParser / temperatureLastShutdownEntry token asParser / temperatureStateEntry token asParser and things like temperatureStatusDescrEntry ^ temperatureStatusDescrOidPrefix, oidIndex, space, equals, space, stringType, space, displayStringValue. made my day much easier. Especially when I had all the tokens I needed: gauge32Type ^'Gauge32:' asParser flatten == [:str | #gauge32]. Not sure it would have been as flexible with a SmaCC (I am not familiar with SmaCC but used Lex/Yacc|Bison in another life). Phil
Re: [Pharo-users] [ANN] New service: The Pharo catalog
yes, check “a note to developers” link :) yeap thats an obvious one, should have clicked that in the first place. Question: I see you ask for dedicate methods. In this case catalogDescription . Is it really necessary , metacello spec already offers sped description: which my project already takes advantage of for example - version: '0.1' imports: #('0.2-baseline' ) spec for: #'common' do: [ spec blessing: #'stable'. spec description: 'version 0.1 This is 0.1 the first stable release of Ephestos. This release contains the following -a socket client bridge for sending and receiving messages from Blender which acts as a socket server - a sendMessage: message to send python command as string to Blender to be executed - a python parser that allows the pharo syntax to be used to parse to a python command for simple things like calling instance and class method and assigning class and instance variables - a getValue: message for reading python values from variables - support for triggering the pharo dedugger on python error - support for sending multiple lines of python code in a single message'. spec author: 'kilonAlios'. spec timestamp: '9/20/2014 20:15'. spec package: 'Ephestos' with: 'Ephestos-kilonAlios.16'. ]. I dont mind defining a separate method, I am just curious. they will think I suck at design good Design , is like good code, needs time. Loads of time. Time you dont have and is understandable. Still its a very useful to have a project catalogue and thank you.
Re: [Pharo-users] [ANN] New service: The Pharo catalog
is because that’s the description of the version (or baseline), not the project description (that’s the place of #catalogDescription, and that’s why it is on class side: is more durable). cheers, Esteban ah ok makes sense now. Will do thanks.
Re: [Pharo-users] quick poll - which OS do you use for Pharo?
you are not alone. As a matter of fact my iMac's MacOS runs also windows 8 and ubuntu 14 in the Virtualbox VM. I was tempted to install windows as dual boot on my iMac because of a game I really like (Smite) but the temptation has not been strong enough. In any case supporting most platforms is my goal as (I assume) is the goal of most pharoers. Windoom will remain a necessary evil for a long long time. Yes I completely forgot that linux reigns supreme on servers. Makes sense now with the mandatory web dev. On Tue, Mar 31, 2015 at 10:47 AM, Jan B. blizn...@fit.cvut.cz wrote: Greater surprise for me is that amount of Windows is greater than zero :) Sometimes I feel like I'm the only one stubborn fool who still uses that thing :) Jan kilon.alios wrote more linux than mac ? thats a surprise . -- View this message in context: http://forum.world.st/quick-poll-which-OS-do-you-use-for-Pharo-tp4816222p4816272.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Re: [Pharo-users] Introduction to OOP for UPBE was: Some new book chapters :)
first example is at page 5 . I don't overheat , I rarely get angry. So there is no reason to worry, all opinions are more than welcomed. If the styles of documentation that the community desires is on par with the link you provided then I know and this is not what I want to be working on. But since creating a chapter is quite an effort I rather spent efforts on things that are here to stay than things that get ignored. its ok , chapter cancelled, I hope an expert is found sometime in the near future to fill in our shoes. Have fun :) On Sun, Mar 29, 2015 at 5:59 PM, Hilaire hila...@drgeo.eu wrote: Hello, [..] no need to list the chapters, I know the book. Le 29/03/2015 16:43, kilon alios a écrit : The iink your provided is a reference documentation and I dont like this kind of documentation sinking inside theory with few practical examples. Quite the opposite of PBE and frankly a really bad way to teach coding especially to a newcomer and someone unfamiliar with OOP. We are probably not reading the same article then, the one I pointed to you comes with a lot of examples. Nevertheless, only its first paragraphs were of interest related to the point Sean raised. Anyway I gave my opinion and will stop on this discussion before it overheats. Best -- Dr. Geo - http://drgeo.eu iStoa - http://istoa.drgeo.eu
Re: [Pharo-users] Some new book chapters :)
It does not emphasize the key features of OOP - message sending and late binding - or the tremendous benefits. I am glad it does not , because if it did , it would be not a Introductory chapter to OOP. This is an important topic that should be written about by a master OOP practitioner. Good luck, are you willing to wait another 5 years ? Because newcomers to Pharo with no clue to OOP finding fragmented information around the book about classes and objects, dont think will wait that long. I doubt if they last even a day. On the subject of message passing there is dedicate chapter for it in Chapter 4 and its also explained in Chapter 5. Late binding again its an advanced subject that will need its own chapter. For now my focus is making sure the reader understand the very basics of OOP. Without such basic knowledge is pointless to talk about advanced OOP features in Pharo. One can easily write a book on OOP with Pharo to explain the full potential, but since there are very few people contributing to documentation it comes down to the fact that every single contribution counts and the fact that UPBE must have an Introduction to OOP 5 years ago. Furthermore, if people are so willing to help out, the repo is open to every potential contributor, you can edit the chapter or even erase and replace it with your own if you believe you are up to the task. Until a better alternative comes up , the work will go on. By the way I am supervising the chapter , even though the student writes it, I will be editing and improving it along the way and as it is , is very far from finished. It will be included to the book as a pull request when its finished. My personal opinion , rejecting an effort on documentation, whether its something that satisfy high standards or not, is something that the Pharo community cannot afford with the serious problem in the lack of documentation. Its an area that Pharo can use any help it can get.
Re: [Pharo-users] Some new book chapters :)
great work guys. there is also one incoming for UPBE , an intro to OOP. On Sat, Mar 28, 2015 at 11:39 PM, stepharo steph...@free.fr wrote: Hi guys Here are new book chapters Teapot Rest extension on top of Zinc https://github.com/SquareBracketAssociates/EnterprisePharo/tree/master/ Teapot Mustache: template system https://github.com/SquareBracketAssociates/EnterprisePharo/tree/master/ Mustache TinyChat: a small chat https://github.com/SquareBracketAssociates/PharoInProgress/tree/master/ TinyChat you can find the pdf versions in https://ci.inria.fr/pharo- contribution/view/Books/
Re: [Pharo-users] Notebook/slideshow morph
very cool demo Sean, great job :) This chord keyb shortcuts look very useful. I have though doing something similar in the past. On Fri, Mar 27, 2015 at 11:18 PM, Sean P. DeNigris s...@clipperadams.com wrote: stepharo wrote I can open a slideshow, create page, drop morph on it, mark a page as template and navigate. Cool! I used it very successfully to make a short screencast (https://www.youtube.com/watch?v=ZdTKvFRFoBc) about the little chord keyboard simulator I made. It was much nicer than my standard type-into-workspaces-with-irrelevant-code-completion-menus-popping-up approach :) I fixed a little bug but don't have write access. How should I get it to you? Thanks for sharing this! It was awesome to have e.g. workspaces and editable TextMorphs embedded in the slides to help me demo. The only limitation I felt was not having a UI to sort the slides, but... now that GT presents Morphs, it was pretty easy to do programmatically! http://forum.world.st/file/n4815674/Screenshot_2015-03-27_17.png - Cheers, Sean -- View this message in context: http://forum.world.st/Notebook-slideshow-morph-tp4810062p4815674.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Re: [Pharo-users] New success stories
The gui looks really impressive, I would be interested into more info about it, the technology you used the general design etc On Sat, Mar 28, 2015 at 5:39 PM, Mariano Martinez Peck marianop...@gmail.com wrote: Hi guys, I am part of the development of Quuve. The site is not yet online (it has been updated since a couple of weeks) but we were told it should be online these days... hope soon. If you have more questions, don't hesitate to ask! Best, On Sat, Mar 28, 2015 at 9:53 AM, Ignacio Sniechowski 0800na...@gmail.com wrote: Stef, Love Quuve!! However, the site of Quuve seems to be blank, or perhaps it's just my browser? cheers Nacho *Lic. Ignacio Sniechowski, MBA* *Prosavic SRL* *Tel: (011) 4542-6714* On Sat, Mar 28, 2015 at 4:43 AM, stepharo steph...@free.fr wrote: http://pharo.org/success/Quuve http://pharo.org/success/iBizLog stef -- Mariano http://marianopeck.wordpress.com
Re: [Pharo-users] what to use for simple parsing
PettitParser provides a more Pharo orientated syntax. SmaCC uses syntax very similar to regex. SmaCC comes with a lot of parser for programming languages. I chose SmaCC because a) the syntax is very compact and it allows me a bird's eye view over the overall syntax definition, but also more difficult to read. PettitParse is the opposite , much easier to read but more verbose. b) It comes with a very detailed python parser and many other parsers. For less powerful parsing you can use also regex which is what both parser are based on as a general idea. The advantage of regex is that is already included inside Pharo. However if you plan to extend your syntax and grow it to something complex pettit or smacc will be a far better choice. I use smacc to parse python data types (list, dictionaries and custom python types) to pharo objects and so far has been working like a charm. I could do the same with PettitParser but having a python parser saved me time in the short and long run. I also really like the compact syntax, it took me time to get used to regex syntax but now I find quite easy to read. Hope that helps you.
Re: [Pharo-users] New success stories
yeap looks beautiful, they use a html front end like almost all pharo success stories. But the link to their website does work for me, it gives me a blank page. Anyone else with this problem ? On Sat, Mar 28, 2015 at 10:49 AM, Hilaire hila...@drgeo.eu wrote: Le 28/03/2015 08:43, stepharo a écrit : http://pharo.org/success/Quuve Impressive screenshot ! http://pharo.org/success/iBizLog stef -- Dr. Geo - http://drgeo.eu iStoa - http://istoa.drgeo.eu
Re: [Pharo-users] Boardician (board game framework)
@kilon Mail me back if you do develop a game adding from you graphical capabilities. hmm making a board game sound like a very nice idea indeed. Will keep you posted, definitely I am making something :)
Re: [Pharo-users] Boardician (board game framework)
I am taking a look at your code and I dont understand something you have in BgEatBullet package EMonster1Mover, EMonster2Mover , EMonster3Mover and EMonster4Mover. All four classes are identical apart from the return values in some methods. Why not use 1 class and 4 instances of that class instead ? Also I second the name of the classes is confusing.
Re: [Pharo-users] How to depend on another Github repo from the baseline ?
Thank you both, I changed my code accordingly to load SmaCC as the example of Thierry.
Re: [Pharo-users] Boardician (board game framework)
Well done Laura. I really enjoyed your games and I definitely welcome your documentation. I will give it a try , thank you . On Tue, Mar 24, 2015 at 4:41 PM, Laura Risani laura.ris...@gmail.com wrote: Hi all, A time ago i posted two board games on the list and Stéphane said that he would like to extract from these and other ones he has gathered a framework for doing board games. So i developed a little one called 'Boardician' and implemented four little example games through it. DOCUMENTATION http://boardician.blogspot.com.ar/2015/03/boardician.html DOWNLOAD https://www.blogger.com/null You can install configuration BgBoardician from Configuration Browser on 3.0 and 4.0 . This will download packages of framework (BgBoardician) and example games (BgBoxPush, BgEatBullet, BgDropPiece, BgEatElongating) To run example games send EDirector new play. BPDirector new play. DPDirector new play. GDirector new play. FEEDBACK https://www.blogger.com/null If you like (i would really like you to) to send any feedback comments on design / names / implementation / functionalities to add / questions you can post a comment on the blog / mail me. Next i'll be adding tests and uploading development history to project's repo. Best, Laura
Re: [Pharo-users] USB in Pharo?
If the library is big you can use TalkFFI (you will find it in smalltalkhub) that automates the wrapping with nativeboost. On Tue, Mar 24, 2015 at 4:58 PM, Udo Schneider udo.schnei...@homeaddress.de wrote: I guess not :-) I'll try to wrap libUSB then. I assume the future-proof way to use a FFI framework is to use the NB notation? Do I remember correctly that the NB notation is supposed to remain the same although the backend will change to something more like traditional FFI? So using NB notation w/o relying on the code generation is safe, correct? CU, Udo On 23.03.2015 16:15, Udo Schneider wrote: All, does anybody have some code or plugin to access USB ports with Pharo? Maybe something using libUSB or OpenUSB? Thanks, Udo
Re: [Pharo-users] Pharo-Launcher Windows 8.1
Bottom line is that reporting a problem in the mailing list first makes much more sense because a) Way more likely to get an answer b) Avoid adding to the list on non existent bugs in fogbugz c) Bring the bug if it really exists to the attention of more people, hence increase that chance of the bug getting a fix. d) Far easier to remind people of the bug later on by just bumping on the thread which everyone on the list will get notified compared to fogbugz that if you are not subscribed to a bug you wont be notified. So yes definitely want to discourage people from starting from fogbugz. Also personally I dont like fogbugz because its so isolated. On Sat, Mar 21, 2015 at 2:15 AM, Ben Coman b...@openinworld.com wrote: On Fri, Mar 20, 2015 at 7:04 PM, Sebastian Heidbrink shei...@yahoo.de wrote: Hi, I recently mentioned issues with the installation of the pharo-launcher on Windows 8.1 Turned out I just needed to download the PharoV30.sources file and place into the installation folder. Now everything seems fine. Is this also a topic for the pharo bug list, or is there another place where I can mention this? Sebastian On Sat, Mar 21, 2015 at 1:46 AM, kilon alios kilon.al...@gmail.com wrote: there is also an options in settings that downloads and install sources for you automagically. This is the right place to report issues and if you are 100% sure its a bug you can report it also in the pharo fogbuz 100% is a bit strong and sounds a bit discouraging :).As long as you can list the detailed steps reproduce the problem, then its worth putting in fogbugz. However fogbugz has a lot of old issues and sometimes a new issue is like a lost tree in the forrest. Its generally beneficial if you socialise it on the mail list as well. A good workflow is: 1. Search fogbugz for similar issues. 2. Ask on the mail list if its a known issue, or if you should create a new one. List your steps to reproduce and ideally a solution. 3. Log a new issue on fogbugz, copying the mail list discussion there. Paste the link back to the mail list thread. So in general: * the mail list has a broader audience and gets a better triage * fogbugz tracks history to ensure it doesn't get lost - and nothing happens except what goes through the tracker. (btw, set Project=Launcher) cheers -ben
Re: [Pharo-users] Pharo-Launcher Windows 8.1
there is also an options in settings that downloads and install sources for you automagically. This is the right place to report issues and if you are 100% sure its a bug you can report it also in the pharo fogbuz On Fri, Mar 20, 2015 at 7:04 PM, Sebastian Heidbrink shei...@yahoo.de wrote: Hi, I recently mentioned issues with the installation of the pharo-launcher on Windows 8.1 Turned out I just needed to download the PharoV30.sources file and place into the installation folder. Now everything seems fine. Is this also a topic for the pharo bug list, or is there another place where I can mention this? Sebastian
[Pharo-users] How to depend on another Github repo from the baseline ?
I have this very simple baseline for Ephestos baseline: spec baseline spec for: #pharo do: [ spec package: 'Ephestos' with: [Metacello new baseline: 'SmaCC'; repository: 'github://ThierryGoubier/SmaCC'; load] ]. The above code works fine for me. The user can install Ephestos from configuration browser that has a configuration that loads this baseline which in turn not only loads the latest code for the project but also runs this block to make sure Smacc is installed for Ephestos to use. The question however how else I can do this and what are the advantages and disadvantages for those other approaches ?
Re: [Pharo-users] Error while loading GitFileTree in Pharo 4.0
Oh boy ... If I try to install Smacc from configuraton browser it crashes the latest pharo 4 image on macos. On Mon, Mar 16, 2015 at 8:40 PM, Thierry Goubier thierry.goub...@gmail.com wrote: Hi Kilon, like a monday :) I made a mistake in the configuration, and you are apparently the first one to try the stable version of SmaCC. It's just an error in the url. I have uploaded a new version of the configuration. Note to the SmaCC users at a certain place... I'm not sure I'll maintain SmaCC v1 for Pharo 4, so it could be appropriate to think about pushing your parsers to the new version, no? Thierry Le 16/03/2015 19:18, kilon alios a écrit : Thierry this is not your lucky week , Smacc is also fails to load from Configuration Browser with PrimitiveFailed: primitive #basicNew: in ByteString class failed Snip ...
Re: [Pharo-users] Error while loading GitFileTree in Pharo 4.0
I am also getting a new error with gitFiletree MNU: GitFileTreePcakageEntrybeginsWith: GitFileTreePackageEntry(Object)doesNotUnderstand: #beginsWith: [ :each | each beginsWith: aPackage , '-' ] in MCFileTreeGitRepositoryInspector(MCFileRepositoryInspector)packageIcon: in Block: [ :each | each beginsWith: aPackage , '-' ] [ :each | (aBlock value: each) ifTrue: [ ^ true ] ] in Set(Collection)anySatisfy: in Block: [ :each | ... Setdo: Set(Collection)anySatisfy: MCFileTreeGitRepositoryInspector(MCFileRepositoryInspector)packageIcon: MCFileTreeGitRepositoryInspector(Object)perform:withEnoughArguments: PluggableIconListMorphitemMorphFor:index: [ :item :index | self itemMorphFor: item index: index ] in PluggableIconListMorphgetList in Block: [ :item :index | self itemMorphFor: item index: in...etc... Array(SequenceableCollection)withIndexCollect: Array(SequenceableCollection)collectWithIndex: PluggableIconListMorphgetList PluggableIconListMorph(PluggableListMorph)getListSize LazyMorphListMorph(LazyListMorph)getListSize LazyMorphListMorphlistChanged PluggableIconListMorph(PluggableListMorph)updateList PluggableIconListMorph(PluggableListMorph)update: [ :aDependent | aDependent update: aParameter ] in MCFileTreeGitRepositoryInspector(Object)changed: in Block: [ :aDependent | aDependent update: aParameter ] DependentsArraydo: MCFileTreeGitRepositoryInspector(Object)changed: [ packageList := result. self changed: #packageList ] in [ versions ifNotNil: [ result := Set new: versions size. versions do: [ :each | result add: each first ].sort loaded packages first, then alphabetically loadedPackages := Set new: loaded size. loaded do: [ :each | loadedPackages add: (each copyUpToLast: $-) ]. result := result asArray sort: [ :a :b | | loadedA loadedB | loadedA := loadedPackages includes: a. loadedB := loadedPackages includes: b. loadedA = loadedB ifTrue: [ a b ] ifFalse: [ loadedA ] ]. packagePattern ifNotEmpty: [ result := result select: [ :package | package name asLowercase includesSubstring: packagePattern ] ]. UIManager default defer: [ packageList := result. self changed: #packageList ] ] ] in MCFileTreeGitRepositoryInspector(MCFileRepositoryInspector)packageListUpdate in Block: [ ... WorldStaterunStepMethodsIn: WorldMorphrunStepMethods WorldStatedoOneCycleNowFor: WorldStatedoOneCycleFor: WorldMorphdoOneCycle [ [ World doOneCycle. Processor yield. false ] whileFalse: [ ] ] in MorphicUIManagerspawnNewProcess in Block: [ ... [ self value. Processor terminateActive ] in BlockClosurenewProcess in Block: [ ... On Mon, Mar 16, 2015 at 9:27 PM, kilon alios kilon.al...@gmail.com wrote: Oh boy ... If I try to install Smacc from configuraton browser it crashes the latest pharo 4 image on macos. On Mon, Mar 16, 2015 at 8:40 PM, Thierry Goubier thierry.goub...@gmail.com wrote: Hi Kilon, like a monday :) I made a mistake in the configuration, and you are apparently the first one to try the stable version of SmaCC. It's just an error in the url. I have uploaded a new version of the configuration. Note to the SmaCC users at a certain place... I'm not sure I'll maintain SmaCC v1 for Pharo 4, so it could be appropriate to think about pushing your parsers to the new version, no? Thierry Le 16/03/2015 19:18, kilon alios a écrit : Thierry this is not your lucky week , Smacc is also fails to load from Configuration Browser with PrimitiveFailed: primitive #basicNew: in ByteString class failed Snip ...
Re: [Pharo-users] Error while loading GitFileTree in Pharo 4.0
Smacc looks to load fine using its Github repo instructions. So far it works ok too. On Mon, Mar 16, 2015 at 10:13 PM, Thierry Goubier thierry.goub...@gmail.com wrote: Le 16/03/2015 20:27, kilon alios a écrit : Oh boy ... If I try to install Smacc from configuraton browser it crashes the latest pharo 4 image on macos. Cool! Not ;) I'll recreate a Pharo4 image and check all this. Thierry On Mon, Mar 16, 2015 at 8:40 PM, Thierry Goubier thierry.goub...@gmail.com mailto:thierry.goub...@gmail.com wrote: Hi Kilon, like a monday :) I made a mistake in the configuration, and you are apparently the first one to try the stable version of SmaCC. It's just an error in the url. I have uploaded a new version of the configuration. Note to the SmaCC users at a certain place... I'm not sure I'll maintain SmaCC v1 for Pharo 4, so it could be appropriate to think about pushing your parsers to the new version, no? Thierry Le 16/03/2015 19:18, kilon alios a écrit : Thierry this is not your lucky week , Smacc is also fails to load from Configuration Browser with PrimitiveFailed: primitive #basicNew: in ByteString class failed Snip ...
Re: [Pharo-users] Pillar parser rewrite: PetitParser or not?
It would be nice to have a parser to rule them all. I am currently using SmaCC and gets the job done. I really like its condense syntax and its syntax tool but also love the smalltalky feel of pettit parser. Maybe one must bite the bullet and write perfomance critical parts in C or even use a C parsing engine as a back end of pettit parser ? On Thu, Mar 12, 2015 at 12:39 AM, Norbert Hartl norb...@hartl.name wrote: Am 11.03.2015 um 23:03 schrieb Damien Cassou damien.cas...@gmail.com: Hi, The current pillar parser has several problems: - it is hard to understand and change - it discards input locations I think a refactor or rewrite is necessary. What are the pros and cons of using PetitParser to do that? The cons are that petit parser is a heavier component and we should never underestimate that (just a reaction to a notion on this list). So we should avoid making things more complex, especially dependency wise. The pros is that petit parser will make it easier to extend and maintain the pillar parser. I've read something about a new version of petit parser that has a speedup of aprox. 1.000.000x. If that is the case then it is no downgrade speed wise :) Another pro is IMHO that are some people that would like to move petit parser closer (not too close) to the core. That again would make it a more standard component that makes it easy to write parsers for everyone. A good companion if you have regex and you exceed to possibilities it provides. I really have a bad feeling while saying: It would be good to have pillar based on petit parser. Norbert
Re: [Pharo-users] using spotter to navigate through the file system
Really impressive stuff. Looks like GTSpotter does not understand ~ for home folder. It also does not preview images as gtinspector can and also fails to preview text files that dont have a .txt extension like for example .profile again GTInspector has no problem previewing. Is it possible to modify the contents of a text file from inside GTInspector and save that file ? On Wed, Mar 11, 2015 at 11:55 PM, Tudor Girba tu...@tudorgirba.com wrote: Hi, Here is a little post that describes how you can use GTSpotter to navigate through the file system: http://www.humane-assessment.com/blog/searching-file-system-with-gtspotter/ If you combine this with the GTInspector ability of allowing you interact with the file references, you get a pretty powerful tool: http://www.humane-assessment.com/blog/browsing-files-with-gtinspector/ This is probably the simplest 3-minute demo you can give to a newcomer :). Cheers, Doru -- www.tudorgirba.com Every thing has its own flow
Re: [Pharo-users] using spotter to navigate through the file system
Images should appear fine. What images are you missing? hmm it looks like I am missing the preview panel altogether. Is this committed to Pharo 4 ? I got the latest Pharo 4 image just now. In the meantime, you can add a simple presentation that allows you to change the file in your packages :) ok then I will look into that.
Re: [Pharo-users] Dealing with multiple cases of a string while keeping code short and OOP friendly
I have seen a similar pattern in Kent Beck book Smalltalk Patterns , but I was not sure this was a good way to go in this case . So I thought that would not hurt to ask for a second opinion from a more experienced Pharo coder. On Tue, Mar 10, 2015 at 12:03 AM, Sean P. DeNigris s...@clipperadams.com wrote: kilon.alios wrote oh Sean this so beautiful and elegant class := self subclasses detect: [ :c | c pythonClassName = pythonClassName Yes I like/use this pattern a lot! I think I learned it from A Mentoring Course on Smalltalk - Cheers, Sean -- View this message in context: http://forum.world.st/Dealing-with-multiple-cases-of-a-string-while-keeping-code-short-and-OOP-friendly-tp4810731p4810790.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Re: [Pharo-users] Rép: Re: I need to put smalltalkhub down (max 30m)
yes but they complain about your surprise and you complain about not complaining , so with all do respect, I have to complain about your complaining , makes my complaining difficult. On Mon, Mar 9, 2015 at 4:40 PM, julien jul...@tamere.eu wrote: I m not complaining i m just surprised :p Norbert Hartl norb...@hartl.name a écrit : As it is with live changes in infrastructure. Everyone should take a deep breath and stay calm _unless_ the person in charge tells that he finished his work. Complain afterwards!! Norbert Am 09.03.2015 um 14:56 schrieb Julien Delplanque jul...@tamere.eu: All my projects disappears should I be worried? On 09/03/15 14:45, Esteban Lorenzano wrote: no, not yet… just wait a few minutes more please. On 09 Mar 2015, at 14:43, Esteban Lorenzano esteba...@gmail.com wrote: ok… looks like it is back… but no promises :P Esteban On 09 Mar 2015, at 14:13, Esteban Lorenzano esteba...@gmail.com wrote: Hi, I need to apply an update… nothing that you will actually see, but is needed :) I will put it down at 13:30 UTC (14:30 here in continental Europe, 10:30 in Argentina and I don’t know the rest of the world… but a hint: is in 15min :P ) Esteban
[Pharo-users] Dealing with multiple cases of a string while keeping code short and OOP friendly
So I am parsing strings that represent python types and other custom objects. An example would be 'Vector (1.0 , 0.2 , 0.8) ' or 'Color (0.3 , 0.9 , 0.4 )' etc But I dont want to use too many ifTrue , ifFalse and end up with a long method. So I was thinking creating a OrderedCollection that would be 2D , first dimension is the regex that fits the type the second is the pharo object that corresponds to this type . Then I will have a common method for each of those pharo object to deal with the parsing. But I was wondering how to use a class that I dont know its name until runtime. For example lets say i get a string aPythonString := ' Bone [ side bone , IK = True , ( 1.0 , 0.1 , 0.2) ]' I would want in this case to send the message the EphBoneType parse : aPythonString. The problem is that I dont know the contents of the string until I receive it. So I want the name of the class to be composed according the string received . Is this possible ? Is this a smart way ? How would you do it ?
Re: [Pharo-users] Dealing with multiple cases of a string while keeping code short and OOP friendly
oh Sean this so beautiful and elegant, exactly what I was looking for. Thank you very much. The rest of your code is what I was thinking doing with regex instead. This was the part I was not aware of class := self subclasses detect: [ :c | c pythonClassName = pythonClassName On Mon, Mar 9, 2015 at 11:02 PM, Sean P. DeNigris s...@clipperadams.com wrote: kilon.alios wrote Is this possible ? Is this a smart way ? How would you do it ? IIUC I would parse just enough to separate the class name from the data, and then let each subclass parse the data. Something like: PythonObject fromString: ' Bone [ side bone , IK = True , ( 1.0 , 0.1 , 0.2) ]'. where: PythonObject#fromString: aString | bracketContents pythonClassName data class | bracketContents := aString allButFirst allButLast trimBoth. pythonClassName := bracketContents copyUpTo: Character space. data := bracketContents copyAfter: Character space. class := self subclasses detect: [ :c | c pythonClassName = pythonClassName ]. ^ class data: data. - Cheers, Sean -- View this message in context: http://forum.world.st/Dealing-with-multiple-cases-of-a-string-while-keeping-code-short-and-OOP-friendly-tp4810731p4810778.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Re: [Pharo-users] Pharo / J - Integration
yeap the more the merrier. There is also JNIPort for Java. I really like this approach because he is using a dll. I am using sockets for python which is much slower. But I was thinking porting to this approach too. He basically created a dll (Jinter.dll) that calls the J language and then Pharo using Nativeboost loads that dll. Jinter.c is also nicely commented and well written code. So this will be a good example for using it for Python. Actually I was thinking that is possible to define a common interface/ protocol for communicating with other languages using this way. The only tricky part is converting between types of language X and pharo objects. Its fairly easy though. This way we can make pharo use any kind of language and most importantly any library for any language out there. Sky is the limit :) This is a fun way to sneak pharo inside any kind of project. On Sun, Mar 8, 2015 at 4:12 PM, Ben Coman b...@openinworld.com wrote: This is great to hear, and a nicely structured presentation. So we now have a J bridge, and we have a python bridge from Kilon, so Smalltalk via Pharo can be seen to be less inward focussed, which was sometimes a criticism. These two provide a good example for other languages and services to follow. cheers -ben On Sun, Mar 8, 2015 at 9:40 PM, S Krish krishnamachari.sudha...@gmail.com wrote: Really Cool On Sun, Mar 8, 2015 at 5:43 PM, Herr Martin Saurer martin.sau...@bluewin.ch wrote: Hello All Pharo now has an integration into the J programming language. Please see: http://youtu.be/5JMMgZGRMHw for a Demo as well as for download and installation instructions. Have fun !!! Martin
Re: [Pharo-users] Pillar multiline comment
code examples are made like this [[[ Transcript show: 'hello; show: ' world; cr;]]] There is also additional syntax if your language is not smalltalk and some other stuff. Take a look at pillar docs. you can also have a workaround for multi line comments. Damien has created a pillar mode for emacs, and there is shortcut to comment multiple lines. So you could write your comment in multiple lines , select those lines and use the shortcut. The shortcut is the regular shortcut that emacs uses in all modes to comment things out for multiple lines. I use this technique to disable part of the pillar code when I try to find bugs. On Sun, Mar 8, 2015 at 12:09 PM, Peter Uhnak i.uh...@gmail.com wrote: H If pillar is line based, how I can make code examples? Actually, maybe this could work, I'll try it later. {{{comment: My Multiline Comment }}} -- From: stepharo steph...@free.fr Sent: 3/8/2015 8:21 AM To: Any question about pharo is welcome pharo-users@lists.pharo.org Subject: Re: [Pharo-users] Pillar multiline comment Pillar is line based. You can put a comment to each of the line beginning. Le 7/3/15 19:32, Peter Uhnák a écrit : Is it possible to create multiline comments in Pillar? For example I want to add code that I used to create a visualization, but I want to show the user only the image (but want to keep the code so I can regenerate if needed). Thanks, Peter
Re: [Pharo-users] SmaCC: First steps
Because this two productions define a list of stmt (possibly empty) and the AST generation code notices that, so it adds an s to statement and prepare that instance variable to be an OrderedCollection. yes but I find it a bit misleading because even when there is a single element it still going to create an OrderedCollection and still add s to the name of the variable. By they way I have been successful into implementing , with your help, a parser that parses python lists into pharo ordered collections. Python tuples and dictionaries are next. Have not implemented nesting types but that is very close too. Took me a lot of time to understand the syntax of SmaCC and moreover to be able to understand the grammar used for the PythonParser2. I decided not to change the grammar since it can do what I want as it is and augment any additional parsing with my own classes. Now I understand the meaning of tests, PyAtomNode and more importantly PyPowerNode. My overall experience with Smacc has been quite positive , the documentation is in a good state though I would like more practical examples especially on the matter of visitor. I love the Smacc syntax, its compact , readable and fairly easy to understand. I really like the design of the classes , make sense and are predictable. A final question is how up to date in the configuration loaded with configuration browser. The only thing I really missed from Smacc is a specialised to help me browse the huge python grammar. Scrolling around became very tedious .
Re: [Pharo-users] Statistics package in Pharo?
I use class method for generic actions that are not to be performed per instance of data. But if I have multiple instances of data then instance methods make more sense. Some classes offer both instance and class methods doing the same process. So in the end its up to you there is no golden rule. For example you may have a class method that return the instance of the class which you can then use to trigger additional instance methods. Sky is the limit ;) On Tue, Mar 3, 2015 at 2:22 PM, Julien Delplanque jul...@tamere.eu wrote: On 03/03/15 13:11, Serge Stinckwich wrote: This is not really difficult to implement a khi2 or ks-test. I'm doing that with my 1st year university student in Python. I will try if I found sone time in Pharo. I know it's not complicated, I had to implement KS test in python for another project (but I don't think you are one of my professor :p). I will do it soon but I'm still noob in smalltalk so I don't know where to implement this and how: class messages or object messages for example? Julien
Re: [Pharo-users] SmaCC: First steps
It's because it is on a particular parse you have a single item; on another you may have two; etc... It becomes easier then to have an OrderedCollection containing one or more elements. The same code works. yes I understand the intention. Now it clear and no longer confusing ;) Which classes are you talking about? The node classes (PyAtomNode, PyPowerNode)? Yes I was referring to node classes. I have to confess I have briefly looked at SmaCC classes cause it took quite a lot of time to understand the tutorial mainly because I wanted a deep understanding. In practice, what you see with grammars in source code is often next to horrible... very long files, happily mixing a long grammar to dozens or hundreds of lines implementing actions (the { }) for each rule in the grammar. maybe it would be better to add the grammar of each node as class comment. This way it would be less necessary to look at the complete grammar. Not an ideal solution but it could help, at least it would in my case. I am also happy to report that I have made quite a lot of progress, I have been able to implement parsers for python lists and tuples, nested list and tuples taking numbers , floats and strings as values which are converted to OrderedCollections. Now I have started also parsing custom blender types like blender colors which are converted to pharo colors. Its fun because now I can use the new Pharo inspector to inspect Blender colors and the new inspector gives me a preview of the color too. Pharo is getting closer to Python and vice versa ;)
Re: [Pharo-users] SmaCC: First steps
also forgot to add that now I am using gitfiletree and it has been a very smooth ride. Works great with Ubuntu and Macos and I tested it across computers. Thank you for your hard work. On Tue, Mar 3, 2015 at 9:42 PM, kilon alios kilon.al...@gmail.com wrote: It's because it is on a particular parse you have a single item; on another you may have two; etc... It becomes easier then to have an OrderedCollection containing one or more elements. The same code works. yes I understand the intention. Now it clear and no longer confusing ;) Which classes are you talking about? The node classes (PyAtomNode, PyPowerNode)? Yes I was referring to node classes. I have to confess I have briefly looked at SmaCC classes cause it took quite a lot of time to understand the tutorial mainly because I wanted a deep understanding. In practice, what you see with grammars in source code is often next to horrible... very long files, happily mixing a long grammar to dozens or hundreds of lines implementing actions (the { }) for each rule in the grammar. maybe it would be better to add the grammar of each node as class comment. This way it would be less necessary to look at the complete grammar. Not an ideal solution but it could help, at least it would in my case. I am also happy to report that I have made quite a lot of progress, I have been able to implement parsers for python lists and tuples, nested list and tuples taking numbers , floats and strings as values which are converted to OrderedCollections. Now I have started also parsing custom blender types like blender colors which are converted to pharo colors. Its fun because now I can use the new Pharo inspector to inspect Blender colors and the new inspector gives me a preview of the color too. Pharo is getting closer to Python and vice versa ;)
Re: [Pharo-users] SmaCC: First steps
I have this grammar definition in the python parser file_input: {{}} | file_input NEWLINE {{}} | file_input stmt 'statement' {{}} ; So I would expect a) the class to be name Pyfile_inputNode , instead is named PyFileInputNode, why ? b) I would expect a statement instance variable in that class and instead I get statements instance variable, why ?
Re: [Pharo-users] Pharo 4 - current state?
Can you rephrase that Stef ? I dont understand what you trying to say. On Sat, Feb 21, 2015 at 2:02 PM, stepharo steph...@free.fr wrote: Cool Videos are really important. Kilon just one little feedback, pay attention to get something moving fast on the screen. Stef Le 20/2/15 19:46, kilon alios a écrit : I made a video tutorial about it here https://www.youtube.com/watch?v=mNh6VtPy8m4list=PLqbtQ7OkSta0ULYAd7Qdxof851ybh-_m_index=23 Well Pharo 4 comes with GT tools a new inspector and a new workspace. I am also a huge fan of the new Dark Theme. Using Pharo makes you feel like Neo from The Matrix , you look at the screen , realise the power of live coding and you say WOW https://www.youtube.com/watch?v=qjBRNqwDPrU Sure Pharo is far from perfect , it comes with its own kind of annoyances but I think its so beautifully unique its hard to resist. On Fri, Feb 20, 2015 at 8:10 PM, sergio_101 sergio@gmail.com wrote: okay, you've got me to switch.. anyway.. it's not that big deal to fire up pharo 3 with the same codebase.. i think i saw GTSpotter on a screencast somewhere.. i will go look for it.. when you mention the other nice things, where can i find them? where should i look? my day time development team (ruby and objective-c) is working on a side project during lunch presentations, and then on our own time. it will be a commercial product, and we're doing it in seaside.. .hopefully this will generate 6 new converts into the fold. it is kind of confusing for everyone at first.. but during our meetings, things get cleared up and people are getting a good handle on all of it... to the point that during regular work, i am starting to hear i wish we (ruby ecosystem) had (insert ST goodness) here.. On Fri Feb 20 2015 at 12:07:03 PM kilon alios kilon.al...@gmail.com wrote: I work with Pharo 4 and no longer use Pharo 3, its very stable I have not experienced any kind of problem with it except one with autocompletion when I was hacking Pharo themes for my Nirreas project. Definetly recommend it to you to switch just for GTSpotter alone and many other new nice things. There million ways to help, you can a) bug fix c) document d) make your own tools and share them with the rest of us e) introduce pharo to other people so we can grow as a community and the list goes on and on. I only spend a hour a day with Pharo but is my happiest hour :) On Fri, Feb 20, 2015 at 6:13 PM, sergio_101 sergio@gmail.com wrote: Hey, all. I had an hour last night to start playing with pharo 4. in the hour that played with it, there are already features i miss when going back to pharo 3 for getting work done. my questions is, how close is pharo 4 to be useable in a day to day environment? can i use it as a part of my regular development? what can i do to help move everything along? thanks!
Re: [Pharo-users] Pharo 4 - current state?
I work with Pharo 4 and no longer use Pharo 3, its very stable I have not experienced any kind of problem with it except one with autocompletion when I was hacking Pharo themes for my Nirreas project. Definetly recommend it to you to switch just for GTSpotter alone and many other new nice things. There million ways to help, you can a) bug fix c) document d) make your own tools and share them with the rest of us e) introduce pharo to other people so we can grow as a community and the list goes on and on. I only spend a hour a day with Pharo but is my happiest hour :) On Fri, Feb 20, 2015 at 6:13 PM, sergio_101 sergio@gmail.com wrote: Hey, all. I had an hour last night to start playing with pharo 4. in the hour that played with it, there are already features i miss when going back to pharo 3 for getting work done. my questions is, how close is pharo 4 to be useable in a day to day environment? can i use it as a part of my regular development? what can i do to help move everything along? thanks!
Re: [Pharo-users] Pharo 4 - current state?
I made a video tutorial about it here https://www.youtube.com/watch?v=mNh6VtPy8m4list=PLqbtQ7OkSta0ULYAd7Qdxof851ybh-_m_index=23 Well Pharo 4 comes with GT tools a new inspector and a new workspace. I am also a huge fan of the new Dark Theme. Using Pharo makes you feel like Neo from The Matrix , you look at the screen , realise the power of live coding and you say WOW https://www.youtube.com/watch?v=qjBRNqwDPrU Sure Pharo is far from perfect , it comes with its own kind of annoyances but I think its so beautifully unique its hard to resist. On Fri, Feb 20, 2015 at 8:10 PM, sergio_101 sergio@gmail.com wrote: okay, you've got me to switch.. anyway.. it's not that big deal to fire up pharo 3 with the same codebase.. i think i saw GTSpotter on a screencast somewhere.. i will go look for it.. when you mention the other nice things, where can i find them? where should i look? my day time development team (ruby and objective-c) is working on a side project during lunch presentations, and then on our own time. it will be a commercial product, and we're doing it in seaside.. .hopefully this will generate 6 new converts into the fold. it is kind of confusing for everyone at first.. but during our meetings, things get cleared up and people are getting a good handle on all of it... to the point that during regular work, i am starting to hear i wish we (ruby ecosystem) had (insert ST goodness) here.. On Fri Feb 20 2015 at 12:07:03 PM kilon alios kilon.al...@gmail.com wrote: I work with Pharo 4 and no longer use Pharo 3, its very stable I have not experienced any kind of problem with it except one with autocompletion when I was hacking Pharo themes for my Nirreas project. Definetly recommend it to you to switch just for GTSpotter alone and many other new nice things. There million ways to help, you can a) bug fix c) document d) make your own tools and share them with the rest of us e) introduce pharo to other people so we can grow as a community and the list goes on and on. I only spend a hour a day with Pharo but is my happiest hour :) On Fri, Feb 20, 2015 at 6:13 PM, sergio_101 sergio@gmail.com wrote: Hey, all. I had an hour last night to start playing with pharo 4. in the hour that played with it, there are already features i miss when going back to pharo 3 for getting work done. my questions is, how close is pharo 4 to be useable in a day to day environment? can i use it as a part of my regular development? what can i do to help move everything along? thanks!
Re: [Pharo-users] pharo and ui again
If Spec was what imagine the ideal GUI API to be then I would certainly love it to death. But thats besides the point , I have already explained what I dont like about Spec in another thread as you already mentioned. You cannot debate personal taste, sure you can clear misconceptions but in then end personal taste goes a lot deeper than that. There will be people who love Spec and people who hate it, and the rest will be somewhere in the between. You claimed how harmful is for Pharo to have a fragmentation for GUI APIs , I expressed the opposite opinion , its not as if we will agree in the end. We wont, we are clearly two people with different philosophies. For you reimplementing/reinventing the wheel is a waste of time, for me its the source of the human intelligence. Also I find reinventing the wheel a great way to learn the inner mechanics of the wheel and gain a deeper understanding. You dont need my approval to move Spec forward nor my permission. You will do just fine without me and I sincerely hope you find those 4 developers and move Spec light years ahead. I dont promise to like it but I will definitely keep an open mind and follow your progress. Who knows maybe one day I may be one of those 4 developers or even many more. But in the end I hope people never polarise on specific libraries and keep coming up with new fresh ideas and approaches even on the same problems. GTSpotter is one such example that has been a great addition to my workflow. And its not as if Spec is the only thing I dont like in Pharo. I dont like the design of new Playground and Inspector at least some parts of it I have already mentioned in other threads. I hated the white theme and I am glad I have no need to use it anymore. I dont like monticello GUI design. Auto completion is messy at times etc etc. I am sure other Pharo developers have their own likes and dislikes. PS: I did not complain about Spec, I only said that I don't like it and in the context of explaining why we need alternative solutions for GUI creation, or at least why I need them. On Thu, Feb 12, 2015 at 7:57 PM, Johan Fabry jfa...@dcc.uchile.cl wrote: Kilon, your second paragraph can be understood as a description of Spec. There is a low level code and an extensions API, and ALL widgets are implemented as such extensions and you can assemble a GUI framework. What you propose as your ideal solution is reimplementing this wheel all over again. In the end, you never clearly stated why you don’t like Spec. I mean, beyond the questions that I provided you an answer for some time ago. So please, instead of saying ‘I don’t like X’ clarify exactly what it is that you don’t like and why. Otherwise there will never be advances and it’s annoying to hear the same vague complaints all over again ... On Feb 12, 2015, at 15:28, kilon alios kilon.al...@gmail.com wrote: Frankly big libraries dont make much sense for me when it comes to Pharo. Sure if we were talking about Python I would say yes. I do believe however that Pharo makes it already very easy to combine libraries together. So for me the ideal solution would be a very low level core that comes with very well documented extensions API and then widgets are implemented as third party extensions that will allow you to assemble a GUI framework tailor made to your own needs. Unfortunately making such a complex core will require quite some effort . So my idea is not without its own problems. So I would have to say no , I dont agree, at least I think we imagine very different things. The goal of Spec may not be to replace Morphic but then the goal of the human race was not to go to the moon until one day scientists told us its possible. The same can happen with Spec, keep improving it , extending it and people will keep using it more and more in place of Morphic even if Spec still keeps relying in Morphic. Afterall its not difficult to imagine Spec one day in the distant future coming with its own backend. None can predict the future afterall, even if you invent it (sorry Alan). But then this what makes future so exciting , its unpredictable nature. --- Save our in-boxes! http://emailcharter.org --- Johan Fabry - http://pleiad.cl/~jfabry PLEIAD lab - Computer Science Department (DCC) - University of Chile
Re: [Pharo-users] pharo and ui again
One note on the GUI situation of Pharo. The situation of Pharo is pretty much the same situation for most programming languages. I am coming from python and the situation is pretty much the same but scaled up to the size of the python community which is huge. So instead like pharo of having 6 or 7 GUIs frameworks , Python has hundreds. I will say 4 are the most popular, pyQT which wraps QT (and its alternative pyside) , wxPython (wraps wxWidgets) , pyGTK (wraps GTK) and tkinter (wraps tk gui api) . All of the above frameworks have tons of users so one thing that this shows us is that fragmentation is really beneficial to a community. The reason is simple, GUI is so complex subject but there will never be one ring to rule them all. Many have tried, all of them have failed. Pharo will follow and does follow a similar route. I am actually thinking of making my own GUI API since none seems to fit my needs or the way I like to work. In the end no generic solution will be able to beat a customized one. This is why we need fragmentation. On Thu, Feb 12, 2015 at 10:46 AM, Hilaire hila...@drgeo.eu wrote: Le 11/02/2015 23:28, Sebastian Heidbrink a écrit : I honestly try to bring Pharo/Smalltalk to the crowd, but somhow I feel like the UI development removes all the productivity that one usually has with Smalltalk. You are pretty right. For a small UI project, the UI development can be high. For a bigger project, where the UI part represent a small fraction of the whole project, it is a different story as most of the development will be out of the UI land and will benefit from the Pharo productivity. This is what I experienced with DrGeo. By the way, before Polymorph, the situation was even worst. Did you look at the Polymorph example in the WidgetExamples class ? There are good starter. Hilaire -- Dr. Geo - http://drgeo.eu iStoa - http://istoa.drgeo.eu
Re: [Pharo-users] pharo and ui again
Frankly big libraries dont make much sense for me when it comes to Pharo. Sure if we were talking about Python I would say yes. I do believe however that Pharo makes it already very easy to combine libraries together. So for me the ideal solution would be a very low level core that comes with very well documented extensions API and then widgets are implemented as third party extensions that will allow you to assemble a GUI framework tailor made to your own needs. Unfortunately making such a complex core will require quite some effort . So my idea is not without its own problems. So I would have to say no , I dont agree, at least I think we imagine very different things. The goal of Spec may not be to replace Morphic but then the goal of the human race was not to go to the moon until one day scientists told us its possible. The same can happen with Spec, keep improving it , extending it and people will keep using it more and more in place of Morphic even if Spec still keeps relying in Morphic. Afterall its not difficult to imagine Spec one day in the distant future coming with its own backend. None can predict the future afterall, even if you invent it (sorry Alan). But then this what makes future so exciting , its unpredictable nature. On Thu, Feb 12, 2015 at 4:10 PM, Nicolai Hess nicolaih...@web.de wrote: 2015-02-12 14:35 GMT+01:00 kilon alios kilon.al...@gmail.com: And there lies your problem. You dont agree with me and I dont agree with you and the next guy wont agree with either of us. But you both agree on: Pharo needs a GUI framework , no? But there are many people out there that love Spec and Bloc may be proven an excellent replacement for Morphic who knows , we definitely wont know if everyone start focusing on Spec alone. It is not the goal of Spec to replace Morphic.And Spec or Bloc is not the question. Spec without the UI elements is pretty useless. On Thu, Feb 12, 2015 at 2:51 PM, Johan Fabry jfa...@dcc.uchile.cl wrote: On Feb 12, 2015, at 10:12, kilon alios kilon.al...@gmail.com wrote: All of the above frameworks have tons of users so one thing that this shows us is that fragmentation is really beneficial to a community. The reason is simple, GUI is so complex subject but there will never be one ring to rule them all. Many have tried, all of them have failed. I don’t agree. If we would have more than 10 developers working on GUI frameworks in Pharo this may be the case. But we don’t have this number. If we are very lucky we may have 4. I would rather have 4 persons pulling a large cart in the same direction, instead of 4 of them pulling their own cart (1/4th the size) in more-or-less the same direction (if at all) as the other guys. In the first case a lot more progress will be made. If there is something wrong with the cart, fix it! Do not waste all this time building your own. --- Save our in-boxes! http://emailcharter.org --- Johan Fabry - http://pleiad.cl/~jfabry PLEIAD lab - Computer Science Department (DCC) - University of Chile
Re: [Pharo-users] pharo and ui again
Dont we all have problems we try to find solutions for ? I find nothing wrong with that. You may think I try to insult you, I can assure you I am not that kind of person and I respect your opinion. I am curious are you going to be one of those 4 developers that will make contributions to Spec ? Or are you a Spec contributor already ? On Thu, Feb 12, 2015 at 4:01 PM, Johan Fabry jfa...@dcc.uchile.cl wrote: Kilon, it’s not nice of you to say that I have a problem. I have an opinion, not a problem. And I’m saying that we have 4 developers at most, not 10. On Feb 12, 2015, at 14:35, kilon alios kilon.al...@gmail.com wrote: And there lies your problem. You dont agree with me and I dont agree with you and the next guy wont agree with either of us. So how exactly are you going to convince 10 people to work on the GUI API of your choosing ? Are you going to pull out the argument that all theses APIs are doing more less the same thing ? Good luck convincing them. I will certainly not be one of them when the center of my philosophy is the devil is in the details. All pharo developers may end up focusing on Spec for example will be enough reason for me to consider abandoning Pharo because I don't like Spec. Most likely I wont because I will find a way not to have to use it but you get my point. Coding is not there just to satisfy practical needs (because otherwise I would not even being using Pharo) its even more about personal taste , this is why we have tons of programming languages and even more libraries. Also the bigger the library it is the slower it moves because of backward compatibility and having to make happy a big user base. You want to add a new feature ? Sure can do . You dont like the general design ? Oops sorry you are out of luck. Personally I like Morphic, I heavily dislike Spec and the verdict is open for Bloc. I will have to use Bloc on a project to make up my mind but so far I have been told that Bloc is a work in progress in early stages. So for me the situation is crystal clear Morphic all the way and if I find something I don't like, subclass and improve. But there are many people out there that love Spec and Bloc may be proven an excellent replacement for Morphic who knows , we definitely wont know if everyone start focusing on Spec alone. And I am glad they dont. But in any case I would not want to force my opinion on other people and instead I recognize that people want different things. So I definitely approve of many options and I also approve that pharo core developers try to make Pharo more modular to make it easier to mix different libraries together , I think that will be so awesome. On Thu, Feb 12, 2015 at 2:51 PM, Johan Fabry jfa...@dcc.uchile.cl wrote: On Feb 12, 2015, at 10:12, kilon alios kilon.al...@gmail.com wrote: All of the above frameworks have tons of users so one thing that this shows us is that fragmentation is really beneficial to a community. The reason is simple, GUI is so complex subject but there will never be one ring to rule them all. Many have tried, all of them have failed. I don’t agree. If we would have more than 10 developers working on GUI frameworks in Pharo this may be the case. But we don’t have this number. If we are very lucky we may have 4. I would rather have 4 persons pulling a large cart in the same direction, instead of 4 of them pulling their own cart (1/4th the size) in more-or-less the same direction (if at all) as the other guys. In the first case a lot more progress will be made. If there is something wrong with the cart, fix it! Do not waste all this time building your own. --- Save our in-boxes! http://emailcharter.org --- Johan Fabry - http://pleiad.cl/~jfabry PLEIAD lab - Computer Science Department (DCC) - University of Chile --- Save our in-boxes! http://emailcharter.org --- Johan Fabry - http://pleiad.cl/~jfabry PLEIAD lab - Computer Science Department (DCC) - University of Chile
Re: [Pharo-users] pharo and ui again
And there lies your problem. You dont agree with me and I dont agree with you and the next guy wont agree with either of us. So how exactly are you going to convince 10 people to work on the GUI API of your choosing ? Are you going to pull out the argument that all theses APIs are doing more less the same thing ? Good luck convincing them. I will certainly not be one of them when the center of my philosophy is the devil is in the details. All pharo developers may end up focusing on Spec for example will be enough reason for me to consider abandoning Pharo because I don't like Spec. Most likely I wont because I will find a way not to have to use it but you get my point. Coding is not there just to satisfy practical needs (because otherwise I would not even being using Pharo) its even more about personal taste , this is why we have tons of programming languages and even more libraries. Also the bigger the library it is the slower it moves because of backward compatibility and having to make happy a big user base. You want to add a new feature ? Sure can do . You dont like the general design ? Oops sorry you are out of luck. Personally I like Morphic, I heavily dislike Spec and the verdict is open for Bloc. I will have to use Bloc on a project to make up my mind but so far I have been told that Bloc is a work in progress in early stages. So for me the situation is crystal clear Morphic all the way and if I find something I don't like, subclass and improve. But there are many people out there that love Spec and Bloc may be proven an excellent replacement for Morphic who knows , we definitely wont know if everyone start focusing on Spec alone. And I am glad they dont. But in any case I would not want to force my opinion on other people and instead I recognize that people want different things. So I definitely approve of many options and I also approve that pharo core developers try to make Pharo more modular to make it easier to mix different libraries together , I think that will be so awesome. On Thu, Feb 12, 2015 at 2:51 PM, Johan Fabry jfa...@dcc.uchile.cl wrote: On Feb 12, 2015, at 10:12, kilon alios kilon.al...@gmail.com wrote: All of the above frameworks have tons of users so one thing that this shows us is that fragmentation is really beneficial to a community. The reason is simple, GUI is so complex subject but there will never be one ring to rule them all. Many have tried, all of them have failed. I don’t agree. If we would have more than 10 developers working on GUI frameworks in Pharo this may be the case. But we don’t have this number. If we are very lucky we may have 4. I would rather have 4 persons pulling a large cart in the same direction, instead of 4 of them pulling their own cart (1/4th the size) in more-or-less the same direction (if at all) as the other guys. In the first case a lot more progress will be made. If there is something wrong with the cart, fix it! Do not waste all this time building your own. --- Save our in-boxes! http://emailcharter.org --- Johan Fabry - http://pleiad.cl/~jfabry PLEIAD lab - Computer Science Department (DCC) - University of Chile
Re: [Pharo-users] get them while they are young
I've found most of the changes we've made to be low level enough that PBE is still a great reference. Are we using the same Pharo ? Because my Pharo has massively improved since version 1.4 and has major changes they are definitely not low level . Also PBE lacks fundamental material that I added like how to use smalltalkhub , how to use Nautilus, and I added also a lot more to the 5 chapters I updated , mainly in the first 2. What PBE seriously lack is a good introductory chapter to OOP . I said I will do it but unfortunately I am having to much fun with my project Ephestos and learning SmaCC has been quite a challange for my limited free time. Maybe in the future. I also dont agree with the philosophy of dividing to many books. I would prefer it there was one unified book with 2 parts. 1 part will be the tutorial part and part 2 the reference. Like a super bible. PBE is an ok book and probably the most important pharo book out there, but its heavily outdated. So outdated at times it becomes unusable. But that is changing rapidly with UPBE and the effort me and others have put into it. Still with the rate Pharo is improving will be a challenge to keep things updated. well, they are not beginner coders, at least i hope not. they should have taken some programming classes already. I would 100% recommend pharo to anyone with previous coding experience and I have done so to fellow python coders. At least give it a try and see if they like it. I think its awesome that you promote pharo we need more people like you that can help begineer pharo coders get introduced into pharo . One advice I would give you is to avoid recommending pharo areas that are not well documented and you cant help them with, learning through asking questions in the mailing list even though people are super nice here can be a frustrating experience for people that are outsiders of the community trying to get their barings. There many people , including me, that lack the confidence to do so in a comfortable way. Of course suffice to say I feel way more comfortable now that I was feeling when I was first introduced into Pharo. So people definitely should be encouraged to ask questions here , especially stupid questions. I have learned in my life the more stupid the question the more important it is :) On Wed, Feb 11, 2015 at 5:35 PM, Sean P. DeNigris s...@clipperadams.com wrote: kilon.alios wrote I would not recommend Pharo to beginner coders, but with Updated Pharo By Example near completion I may change my mind ;) I've found most of the changes we've made to be low level enough that PBE is still a great reference. And when Deep Into Pharo covered FileSystem, Metacello, and Settings, I thought we were doing pretty well. Where specifically have you found pain from our existing documentation? I know it's a bit scattered... Spec? There are two papers on that which we should maybe make more obviously accessible. Nautilus? Don't know about that one! - Cheers, Sean -- View this message in context: http://forum.world.st/get-them-while-they-are-young-tp4805068p4805142.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Re: [Pharo-users] SmaCC: First steps
Well I tried in the past to use openqwaq , but what I learned from the experience is that sometimes understanding others code can be even more time consuming than remaking it yourself. I spent like an afternoon trying to understand openqwaq before starting Ephestos from complete scratch. Suffice to say that in another afternoon I had the prototype of Ephestos working with the ability to send simple python strings to the cptyhon interpreter to be execute by the time I was not even able to understand the basic architecture of openqwaq. The module you recommended alone contains like 11.000 lines of code. Thats a lot of work to just read that code and I cant find any class named CModel. In any case I like it that I started from scratch, I want to keep my project small, light, well documented and super easy to hack. Even if that means less features :) Also the code is written for squeak not pharo. In any case I will need someone like Thierry to guide me through the code and help me understand. So its definitely not as simple as hey I am going to use that code. Executing python code with Ephestos is already possible and easy , my problems now are a) converting from python to pharo types which is why I am using SmaCC b) use of callbacks , which should be easy to do , so that python code can call pharo code. In the future if socket are proven too slow I may move my architecture into a shared DLL instead to make things faster. But as far as using python code from pharo I am very close to achieving my goal by the end of this year. On Wed, Feb 11, 2015 at 4:40 PM, Sebastian Heidbrink shei...@yahoo.de wrote: Hi! Maybe you also want to have a look at http://www.squeaksource.com/openqwaq/ There is a part PyBridge included. MAybe you can take some of the Smalltalk Python Cmodel classes from there. Sebastian Am 10.02.2015 um 23:24 schrieb kilon alios: Ok so after rereading the tutorial and testing again and again , I think I have finally managed to understand how SmaCC really works and I was succesful into converting simple python litsts to pharo arrays and ordered collections. The tricky part now is to apply this knowledge to complex python types like multi dimensional lists, tuples and dictionaries. I understand that the visitor allows me to visit a specific object instances each time they are found in the AST . But because I want to walk the AST in order to build multi dimensional ordered collections I need something more, or maybe my understanding of the visitor pattern is flawed. The problem I am having here is that each time I parse a python type that python type is not necessarily represented by different kind of node. For example whether its a list or a tuple or a dictionary the same class is used PyAtomNode. In order to differentiate between those diffirent python types PyAtomNode has instance variables for right and left bracket, parantheses, and curly. So my initial thinking is to check those instance variables to see if they are nil and from that I can conclude which python type I am parsing. So I can preform simple ifs that check that the instance variable is Nil or not but the question is if my strategy is a good one or a bad one. I could define my own syntax to simplify the AST tree including different nodes for different python types , because from the looks of it , it seems it is a bit too verbose for my needs but On the other hand I am not so sure because in the future my needs may become more verbose too. So I am very close and ready to create my full python types converter for pharo but I wanted some good advice before wasting time on something that is not efficient. By the way Thierry I have to agree with you Smacc is a very capable parser, also I like the use of regex syntax, makes it uglier compared Pettit Parser but I prefer the compact regex syntax to having to define and browse tons of classes and send tons of messages. Also the Python support is very good and I am impressed how easily SmaCC can parse whole python applications since some of the test are very complex. Well done great work! On Sat, Jan 31, 2015 at 12:04 AM, kilon alios kilon.al...@gmail.com wrote: thank for your congratulations, because at times I fear I ask too obvious questions. I have to say I find this parsing very complex but very fascinating too :) Time to experiment with the visitor. On Fri, Jan 30, 2015 at 11:49 PM, Thierry Goubier thierry.goub...@gmail.com wrote: 2015-01-30 14:04 GMT+01:00 kilon alios kilon.al...@gmail.com: Ok thanks for the info, I am still however curious about these tests are just tests (which may or may not happen) that determine the AST, for example which node to use ? 'tests' is just there because, in the grammar, there is this at a certain point: testlist: test 'test' , testlist | test 'test' comma_opt ; I have named this use of test 'test', so SmaCC has deduced that testlist
Re: [Pharo-users] SmaCC: First steps
Yes, if you find that appropriate or if they share some implementation bits (I'm not sure of the latter, but it may help to organise stuff). What you do is, in the grammar, you add a %hierarchy directive, like that: %hierarchy Atom (List Dictionary); And, at AST generation, SmaCC will inherit as much as possible from Atom definition in List and Dictionary (at least, I suppose it does: some of the SmaCC code generation tools are rather impressive, and, if you look carefully, it is prepared for more than just generation of Smalltalk code) Nice and I was meaning to ask that how to do this with the grammar. Great answer. For me, the way to deal with that is to have a model of that data and visitors on it, to tackle the future complexity. If you go that way (recursive structure), two good (and not that easy) things to have are: equality and copy. this I dont understand. I want python types to convert to popular pharo data classes . I don't want to create my own custom classes because the way I see it python and pharo are very close together as dynamic languages. So my thinking is that if equality works for an ordered collection and a array , then there is no need for me to add anything new since I will convert to those classes. Unless you mean something else that I am missing here. My goal is to allow people to use python code and libraries without having to worry for how the python side maps to the pharo side. At least not when it comes to types. So they will use those python libraries as if they are pharo libraries. A challenge will be converting types that reference python objects. The good news is that SmaCC already handles this situation but I will have to find a way to sync references between pharo and python. I think I know a way for that one. Good point. It would be nice to have a diff on the grammars of Python2 and Python3; at the moment, there is space in the naming for a Python 3 parser (named PythonParser3, of course), however we would have a collision on the AST nodes (two PyAtomNodes, two ...). Have to consider that and maybe have Py2AtomNode, etc... to leave space for the Python 3 AST if it differs too much. From what I have seen , because I have to confess I am more of python 3 than python 2 coder, there are no big diffirences in python types at least not on the basic ones, but syntax wise there is as it is explained very well in this reference http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/tutorials/key_differences_between_python_2_and_3.ipynb So yes there is a clear diffirence between python 3 and python 2 but its not massive. And yes those 2 grammars should be kept separately. For the time being I have no reason to encourage you to make a python 3 grammar port, because frankly I dont need it. I am happy with SmaCC as it is. There is no need for my project to fully parse python syntax and I dont see in the next years at least any need to go beyond python types. If the need arises and no py3 parser exists I will of course make it myself and send you a pull request. I am so grateful that already SmaCC has saved me from so much work , thanks to all people contributing to SmaCC , one very happy customer :D On Wed, Feb 11, 2015 at 7:36 PM, kilon alios kilon.al...@gmail.com wrote: Well I tried in the past to use openqwaq , but what I learned from the experience is that sometimes understanding others code can be even more time consuming than remaking it yourself. I spent like an afternoon trying to understand openqwaq before starting Ephestos from complete scratch. Suffice to say that in another afternoon I had the prototype of Ephestos working with the ability to send simple python strings to the cptyhon interpreter to be execute by the time I was not even able to understand the basic architecture of openqwaq. The module you recommended alone contains like 11.000 lines of code. Thats a lot of work to just read that code and I cant find any class named CModel. In any case I like it that I started from scratch, I want to keep my project small, light, well documented and super easy to hack. Even if that means less features :) Also the code is written for squeak not pharo. In any case I will need someone like Thierry to guide me through the code and help me understand. So its definitely not as simple as hey I am going to use that code. Executing python code with Ephestos is already possible and easy , my problems now are a) converting from python to pharo types which is why I am using SmaCC b) use of callbacks , which should be easy to do , so that python code can call pharo code. In the future if socket are proven too slow I may move my architecture into a shared DLL instead to make things faster. But as far as using python code from pharo I am very close to achieving my goal by the end of this year. On Wed, Feb 11, 2015 at 4:40 PM, Sebastian Heidbrink shei...@yahoo.de wrote: Hi! Maybe you also want to have a look at http
Re: [Pharo-users] SmaCC: First steps
What you see is that, with the {{}}, I create PyAtomNode instances for all productions, even if it isn't appropriate. Maybe this should be changed like that for lists : | lbrack rbrack {{List}} | lbrack listmaker 'list' rbrack {{List}} Both approaches you described a) adding instance methods to PyAtomNode that provide checks for the type b) Creating separate nodes for diffirent types work for me. Solution (b) seemed more smalltalky to me. Maybe a best compromise would be to have for example PyListNode as a subclass of PyAtomNode ? If I can create something that others find useful too, I certainly would prefer it. My needs are not very specific, I think I want pretty much what anyone would want for importing data from python to pharo . One way or another I will satisfy my needs this is not my worry. And the last one is about the visitor. For complex processing like the transformations you intend, I would see two strategies: a builder inside the visitor with a stack/context strategy, so that you can recurse in your visit of the ast and add elements to the right collection, or a simple recurse and merge the result of the lower visits (when in a List node, collect the visit of all the children as an array or as an OrderedCollection). Yes that was my way of thinking too. A collection of methods that consume the AST , walk the tree and build a more simplified structure. The problem I was having was two side, from one side PyAtomNode is used for several diffirent things. From the other side not only lists, dictionaries, tupples can be multidimensional but also can act as containers for each other. So a list can contain a dictionary which can contain a list which can contain a tupple and as you imagine the rabbit whole can go very deep. Of course nothing of this is surprising for any language. Generally speaking this is not such a big problem right now for me because I prefer dealing with simple types with a bit of multidimensionality. Most of the types Blender uses is like that. But it may become a problem later on for example if the user wants to have access to the node system of blender. Nodes can easily contain other nodes and it can create a nightmare scenario in that case but I will leave that for when the time comes. I believe you are on the right path, if my explanations made sense :) Your explanation not only made sense but you pretty much described what I was considering doing. If you start changing the grammar as suggested above, make a fork and pull requests on github :) Will do, my focus is in latest python 3 because its what Blender uses, but on types should not make any diffirence.
Re: [Pharo-users] get them while they are young
Well done Martin, personally I would not recommend Pharo to beginner coders, but with Updated Pharo By Example near completion I may change my mind ;) On Wed, Feb 11, 2015 at 9:58 AM, Martin Bähr mba...@email.archlab.tuwien.ac.at wrote: here is the reaction of a student preparing for a GSoC project for which the student needs to learn smalltalk: I have installed Pharo v4.0 and started the book Pharo By Example as suggested by you I just wanted to say that I am in the initial stages and loving it already :) greetings, martin. -- eKita - the online platform for your entire academic life -- chief engineer eKita.co pike programmer pike.lysator.liu.secaudium.net societyserver.org secretary beijinglug.org mentor fossasia.org foresight developer foresightlinux.org realss.com unix sysadmin Martin Bähr working in china http://societyserver.org/mbaehr/
Re: [Pharo-users] SmaCC: First steps
Ok so after rereading the tutorial and testing again and again , I think I have finally managed to understand how SmaCC really works and I was succesful into converting simple python litsts to pharo arrays and ordered collections. The tricky part now is to apply this knowledge to complex python types like multi dimensional lists, tuples and dictionaries. I understand that the visitor allows me to visit a specific object instances each time they are found in the AST . But because I want to walk the AST in order to build multi dimensional ordered collections I need something more, or maybe my understanding of the visitor pattern is flawed. The problem I am having here is that each time I parse a python type that python type is not necessarily represented by different kind of node. For example whether its a list or a tuple or a dictionary the same class is used PyAtomNode. In order to differentiate between those diffirent python types PyAtomNode has instance variables for right and left bracket, parantheses, and curly. So my initial thinking is to check those instance variables to see if they are nil and from that I can conclude which python type I am parsing. So I can preform simple ifs that check that the instance variable is Nil or not but the question is if my strategy is a good one or a bad one. I could define my own syntax to simplify the AST tree including different nodes for different python types , because from the looks of it , it seems it is a bit too verbose for my needs but On the other hand I am not so sure because in the future my needs may become more verbose too. So I am very close and ready to create my full python types converter for pharo but I wanted some good advice before wasting time on something that is not efficient. By the way Thierry I have to agree with you Smacc is a very capable parser, also I like the use of regex syntax, makes it uglier compared Pettit Parser but I prefer the compact regex syntax to having to define and browse tons of classes and send tons of messages. Also the Python support is very good and I am impressed how easily SmaCC can parse whole python applications since some of the test are very complex. Well done great work! On Sat, Jan 31, 2015 at 12:04 AM, kilon alios kilon.al...@gmail.com wrote: thank for your congratulations, because at times I fear I ask too obvious questions. I have to say I find this parsing very complex but very fascinating too :) Time to experiment with the visitor. On Fri, Jan 30, 2015 at 11:49 PM, Thierry Goubier thierry.goub...@gmail.com wrote: 2015-01-30 14:04 GMT+01:00 kilon alios kilon.al...@gmail.com: Ok thanks for the info, I am still however curious about these tests are just tests (which may or may not happen) that determine the AST, for example which node to use ? 'tests' is just there because, in the grammar, there is this at a certain point: testlist: test 'test' , testlist | test 'test' comma_opt ; I have named this use of test 'test', so SmaCC has deduced that testlist will be a list of test(s) nodes (or maybe other stuff such as atoms, depending on the productions for test).. so, SmaCC, in each rule where testlist is found, it will add a 'tests' instance variable. So, basically, the grammar rules explain how each node can be decomposed in sub-nodes, and the additional annotations (the 'test' naming and the {{}} or {{}}) drive how the classes for the nodes you want to keep are generated. In that testlist case, no node will be generated, but everywhere testlist appear on the right of the rule, then it will add a 'tests' instance variable. Or are they tests related to unit testing class PythonParserTests ? Not at all :) Also you said I need to use the visitor created by PythonParser I assume you mean PyRootNodeVisitor ? Just as it is explained in the AST chapter of the documentation. In my case this simple python list will need me to subclass it and override method visitListmaker , the aListmaker passed as argument to the method should I assume it is PyListmakerNode ? In my experience, what you need to do is you have a look at the ast generated and see if you can recognize the elements. From what I see in your simple example, the key to your list is that PyAtomNode instance with something in list. Once you have that, you know that you need to visit PyAtomNode (and check that it has the [ ] tokens). Looking into what is listmaker in atom in the grammar (congratulations by the way, you have seen it :) ), you'll see that it creates a listmaker node only in the first case: test followed by a list_for, otherwise it falls back to testlist... Thierry On Fri, Jan 30, 2015 at 10:50 AM, Thierry Goubier thierry.goub...@gmail.com wrote: Hi kilon, The tests instance variable is linked to the python grammar: top level items in an expression are probably tests, and, through the grammar, tests can be just atoms. So the tests instance
Re: [Pharo-users] Published some old games ...
hehe I like your pacman clone , well done :) On Mon, Feb 9, 2015 at 10:11 PM, Laura Risani laura.ris...@gmail.com wrote: Hi , I developed some little games in distribution v3 (seems they work fine in v4 except perhaps some visual difference). If you want to take a look at them (feedback is welcome) they are here MCSmalltalkhubRepository owner: 'squidik' project: 'Games' user: '' password: nil Love, Laura On Mon, Feb 9, 2015 at 5:04 PM, stepharo steph...@free.fr wrote: You have basically logicalfont that describes what you want then a logicial font is checking reality and you get a Strikefont? or a FT Now htere were many patches and globals so this part would really need to cleaning such StandardFonts which is a kind of registry. Especially because FT are not polymorphic with StrikeFont. Le 8/2/15 22:33, kilon alios a écrit : Does pharo come with its own standard TTFs ? I am unfamiliar with how fonts work in Pharo exactly will take a look at mines and see what I can understand. On Sun, Feb 8, 2015 at 11:11 PM, stepharo steph...@free.fr wrote: Thanks I do not get why it does not work with me. O_o Le 8/2/15 20:07, kilon alios a écrit : Well done Stef . The artefact problem is gone and I have committed your configuration to MetaRepo4. On Sun, Feb 8, 2015 at 8:30 PM, stepharo steph...@free.fr wrote: I fixed it. Now this is a good example on how an application should embed its fonts. In fact this is a good example on why an application should embed its fonts and I would like to have a solution for that. Stef Le 8/2/15 19:12, kilon alios a écrit : In case of mines I see now that each opened cell is a red box of doom . Apparently the morph DNU fontOfSize . Looks like StrikeFont class is the culprit used in MinesTiledrawOn:
Re: [Pharo-users] Published some old games ...
No idea what you talking about so I will take your word for it :`D On Mon, Feb 9, 2015 at 10:04 PM, stepharo steph...@free.fr wrote: You have basically logicalfont that describes what you want then a logicial font is checking reality and you get a Strikefont? or a FT Now htere were many patches and globals so this part would really need to cleaning such StandardFonts which is a kind of registry. Especially because FT are not polymorphic with StrikeFont. Le 8/2/15 22:33, kilon alios a écrit : Does pharo come with its own standard TTFs ? I am unfamiliar with how fonts work in Pharo exactly will take a look at mines and see what I can understand. On Sun, Feb 8, 2015 at 11:11 PM, stepharo steph...@free.fr wrote: Thanks I do not get why it does not work with me. O_o Le 8/2/15 20:07, kilon alios a écrit : Well done Stef . The artefact problem is gone and I have committed your configuration to MetaRepo4. On Sun, Feb 8, 2015 at 8:30 PM, stepharo steph...@free.fr wrote: I fixed it. Now this is a good example on how an application should embed its fonts. In fact this is a good example on why an application should embed its fonts and I would like to have a solution for that. Stef Le 8/2/15 19:12, kilon alios a écrit : In case of mines I see now that each opened cell is a red box of doom . Apparently the morph DNU fontOfSize . Looks like StrikeFont class is the culprit used in MinesTiledrawOn:
Re: [Pharo-users] Published some old games ...
wow if you turn it upside down it reads written in C ;D Definetly not ideal example code for beginners , but I am grateful someone actually bothered writing that code so I and other newcomers learn a bit more about Morphic. On Sun, Feb 8, 2015 at 7:56 PM, stepharo steph...@free.fr wrote: why I think that such games should be rewritten: crying for a subclass :) drawOn: aCanvas Draw a rectangle with a solid, inset, or raised border. Note: the raised border color *and* the inset border color are generated from the receiver's own color, instead of having the inset border color generated from the owner's color, as in BorderedMorph. | font rct | borderWidth = 0 ifTrue: [ no border aCanvas fillRectangle: bounds color: color. ^ self.]. borderColor == #raised ifTrue: [ ^ aCanvas frameAndFillRectangle: bounds fillColor: color borderWidth: borderWidth topLeftColor: color lighter lighter bottomRightColor: color darker darker darker]. borderColor == #inset ifTrue: [ aCanvas frameAndFillRectangle: bounds fillColor: color borderWidth: 1 borderWidth topLeftColor: (color darker darker darker) bottomRightColor: color lighter. self isMine ifTrue: [ font := StrikeFont familyName: 'Atlanta' size: 22 emphasized: 1. rct := bounds insetBy: ((bounds width) - (font widthOfString: '*'))/2@0. rct := rct top: rct top + 1. aCanvas drawString: '*' in: (rct translateBy: 1@1) font: font color: Color black. ^ aCanvas drawString: '*' in: rct font: font color: Color red .]. self nearMines 0 ifTrue: [ font := StrikeFont familyName: 'ComicBold' size: 22 emphasized: 1. rct := bounds insetBy: ((bounds width) - (font widthOfString: nearMines asString))/2@0. rct := rct top: rct top + 1. aCanvas drawString: nearMines asString in: (rct translateBy: 1@1) font: font color: Color black. ^ aCanvas drawString: nearMines asString in: rct font: font color: ((palette at: nearMines) ) .]. ^self. ]. solid color border aCanvas frameAndFillRectangle: bounds fillColor: color borderWidth: borderWidth borderColor: borderColor. Le 8/2/15 17:39, kilon alios a écrit : Thank you Stef, its great to have some games for Pharo :) Some issues 1) I cannot find ChineseChekers in conf browser 2) None of the 3 games comes with an easy way to open them. I had to use $GameName$ new openInWindow. 3) Tetris is giving me a MNU apparently it does not find the LedMorph class it needs. 4) Miners was displaying some weird artefacts when I hit a mine. They dont go away when I hit new game. On Sun, Feb 8, 2015 at 2:27 PM, olivier auverlot olivier.auver...@gmail.com wrote: very cool ! 2015-02-08 12:05 GMT+01:00 Ignacio Sniechowski 0800na...@gmail.com: Stef, Thanks so much! I love this because its fun to analyze the code and learn from it. Best Nacho *Lic. Ignacio Sniechowski, MBA* *Prosavic SRL* *Tel: (011) 4542-6714* On Sun, Feb 8, 2015 at 6:28 AM, stepharo steph...@free.fr wrote: Hi guys It was for so long on my todo list that I decided to start addressing it. I publish games that were defined long time ago in Squeak. - Tetris - Miners - SameGame - ChineseCheckers There are now available via the metarepository configuration browser I will continue to publish some others. Stef
Re: [Pharo-users] Published some old games ...
In case of mines I see now that each opened cell is a red box of doom . Apparently the morph DNU fontOfSize . Looks like StrikeFont class is the culprit used in MinesTiledrawOn:
Re: [Pharo-users] Published some old games ...
Well done Stef . The artefact problem is gone and I have committed your configuration to MetaRepo4. On Sun, Feb 8, 2015 at 8:30 PM, stepharo steph...@free.fr wrote: I fixed it. Now this is a good example on how an application should embed its fonts. Stef Le 8/2/15 19:12, kilon alios a écrit : In case of mines I see now that each opened cell is a red box of doom . Apparently the morph DNU fontOfSize . Looks like StrikeFont class is the culprit used in MinesTiledrawOn:
Re: [Pharo-users] Published some old games ...
Thank you Stef, its great to have some games for Pharo :) Some issues 1) I cannot find ChineseChekers in conf browser 2) None of the 3 games comes with an easy way to open them. I had to use $GameName$ new openInWindow. 3) Tetris is giving me a MNU apparently it does not find the LedMorph class it needs. 4) Miners was displaying some weird artefacts when I hit a mine. They dont go away when I hit new game. On Sun, Feb 8, 2015 at 2:27 PM, olivier auverlot olivier.auver...@gmail.com wrote: very cool ! 2015-02-08 12:05 GMT+01:00 Ignacio Sniechowski 0800na...@gmail.com: Stef, Thanks so much! I love this because its fun to analyze the code and learn from it. Best Nacho *Lic. Ignacio Sniechowski, MBA* *Prosavic SRL* *Tel: (011) 4542-6714* On Sun, Feb 8, 2015 at 6:28 AM, stepharo steph...@free.fr wrote: Hi guys It was for so long on my todo list that I decided to start addressing it. I publish games that were defined long time ago in Squeak. - Tetris - Miners - SameGame - ChineseCheckers There are now available via the metarepository configuration browser I will continue to publish some others. Stef
Re: [Pharo-users] Published some old games ...
yes it works and I took the liberty to commit to the meta repo for pharo 4 , well done Stef :) On Sun, Feb 8, 2015 at 7:49 PM, stepharo steph...@free.fr wrote: I fixed the configurationOfTetris but I cannot publish it to MetaRepoForPharo40. Can you copy it from my repo and try? I will verify all the others.
Re: [Pharo-users] Published some old games ...
Does pharo come with its own standard TTFs ? I am unfamiliar with how fonts work in Pharo exactly will take a look at mines and see what I can understand. On Sun, Feb 8, 2015 at 11:11 PM, stepharo steph...@free.fr wrote: Thanks I do not get why it does not work with me. O_o Le 8/2/15 20:07, kilon alios a écrit : Well done Stef . The artefact problem is gone and I have committed your configuration to MetaRepo4. On Sun, Feb 8, 2015 at 8:30 PM, stepharo steph...@free.fr wrote: I fixed it. Now this is a good example on how an application should embed its fonts. In fact this is a good example on why an application should embed its fonts and I would like to have a solution for that. Stef Le 8/2/15 19:12, kilon alios a écrit : In case of mines I see now that each opened cell is a red box of doom . Apparently the morph DNU fontOfSize . Looks like StrikeFont class is the culprit used in MinesTiledrawOn:
Re: [Pharo-users] Spotter: How to see more beyond #/##
because right controls the search input box cursor. Maybe a shortcut to switch focus between input search box and the search results panel could cut down the complexity of the shortcuts considerably. On Thu, Feb 5, 2015 at 12:00 PM, Guillermo Polito guillermopol...@gmail.com wrote: Maybe I'm not getting it but, Why not just using Right? El Thu Feb 05 2015 at 10:43:39 AM, Ben Coman b...@openinworld.com escribió: I've been meaning to ask the same question.In light of your answer, Would you consider being able to place the cursor on the line Classes 5/26 line, and using the standard CMD-Right rather than CMD-Shift-Right. To me that seems to follow the pattern of CMD-Right opening up an item. cheers -ben On Thu, Feb 5, 2015 at 2:27 AM, Aliaksei Syrel alex.sy...@gmail.com wrote: Hi, Select any of that 5 items and use CMD (Alt on windows,linux)+Shift+Right. Of course shortcuts in spotter are not very obvious, so we are planning to add hints and have all actions to present as buttons in UI Cheers, Alex On Wed, Feb 4, 2015 at 7:11 PM, Sean P. DeNigris s...@clipperadams.com wrote: Spotter is showing me Classes 5/26. How do I see the remaining 21? - Cheers, Sean -- View this message in context: http://forum.world.st/Spotter-How-to-see-more-beyond-tp4803696.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Re: [Pharo-users] Question on Morphic drawOn: method.
upload your code to smalltalkhub or github and lets take a look at it. Sharing your image is also a viable option On Thu, Feb 5, 2015 at 12:56 PM, nacho 0800na...@gmail.com wrote: @Trygve I've checked and it doesn't work. I can't even bring the halo on to delete the morph. The debugger keeps popping. Thanks anyway to all Nacho - Nacho Smalltalker apprentice. Buenos Aires, Argentina. -- View this message in context: http://forum.world.st/Question-on-Morphic-drawOn-method-tp4803695p4803895.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Re: [Pharo-users] Question on Morphic drawOn: method.
alt+shift+left click should bring on the halo , the claw like icon has a menu with the debuger as an entry you can trigger to see whats wrong. You can also inspect the morph too and play around with it, very useful even when you got no errors. On Wed, Feb 4, 2015 at 9:33 PM, nacho 0800na...@gmail.com wrote: Thank you both of you! I will continue with my Morphic explorations Nacho - Nacho Smalltalker apprentice. Buenos Aires, Argentina. -- View this message in context: http://forum.world.st/Question-on-Morphic-drawOn-method-tp4803695p4803734.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Re: [Pharo-users] spotter preview
And also as someone pointed out during Pharo Days... to have tooltips above the buttons showing the shortcut. +1 GT tools have greatly enhanced the Pharo experience. I do think that GTInspector and GTPlayground could use a GUI cleanup in their design but GTSpotter is gorgeously well done. The nice thing about this tool is that the way its designed it can replace pretty much every single tool inside Pharo. I could imagine myself coding solely inside it. Who knows maybe in the future :) On Tue, Feb 3, 2015 at 6:35 PM, Peter Uhnák i.uh...@gmail.com wrote: The keybindings are: - trigger Spotter with Shift+Enter. - toggle preview with Cmd+P (or Alt+P on Windows/Linux) It would be great to have all the keybindings (also moving inside the Spotter) written somewhere in one place (for all platforms) so one doesn't need to go scavenge blogs and source code for them. And also as someone pointed out during Pharo Days... to have tooltips above the buttons showing the shortcut. But I love this thing... you always add something cool. :) Peter
Re: [Pharo-users] Slides from the Pharo Status talk at FOSDEM 2015
The weak spot in your argument is that you use the worst example you can choose to prove it. Ruby. Ruby has two big issues for your line of arguments. First its popularity was build by a single man. A nomad. His name is David Heinemeier Hansson http://en.wikipedia.org/wiki/David_Heinemeier_Hansson. He is the guy behind that library you probably know as Ruby on Rails. Not only he created that library alone, not only that library is the single reason why Ruby is so popular, though personally I would not call it a popular language, but he also did not allow people to commit to his code for a single year before opening up the project to external commits. A true nomad if you ask me. The second issue is that you use Ruby as an example language that does not care about design and cool ideas, which is kinda strange if you think about how much Ruby copies from smalltalk. Actually I would even argue that Ruby is more smalltalk than even objective c. But further more its not hard to find evidence of the contributions of nomads to our society, whether you learn about Einstein, Newton , Socrtates etc. Our western civilization is based on the effort of individuals that worked alone, standing on the shoulder of giants , but alone none the less and they did not only succeed but carried modern civilisation to what we take today for granted (and we should not). Codings of course is no exception. So even though I acknowledge the huge importance of teamwork , cooperation and competition, I am also perfectly capable of seeing nomads as something vastly more than people living in mud huts. I also dont share your optimism that an idea / design orientated coder will have any problem materialising his dream software in the abomination language called C++ . As a matter of fact tons of great software with gorgeous design that people highly praise has been built in this language. For me one such thing is the QT framework for which Pharo has no alternative that can approach it even in the distance of 100 light years. And believe me I am N fan of C++. Like you I love Pharo, but unlike you I dont think I will live long enough to see Pharo used by 1 million people. But it is one of those things I will be very glad to be wrong about. It would be great to have something like QT for Pharo , or other great libraries. But even if Pharo remains small , no regrets , I love it and I will keep coding in it. But then I dont see Pharo as neither the Blue , or the Red, or the Pink pill. Is just another tool with advantages and disadvantages. A personal choice that I dont try to impose to others as better. On Tue, Feb 3, 2015 at 5:38 PM, Sean P. DeNigris s...@clipperadams.com wrote: kilon.alios wrote I do agree, that nomads do not build cathedrals but there is the flip side of the coin, why one would want to be a nomad and the great benefits coming with being a nomad Guido the creator of python explains it from the side of the Python Standard library but I think it applies fine for Pharo too Cathedral to me means architecture i.e. the application of forethought and understanding to make the most beautiful, functional structure in the most efficient way VS. nomads slapping together temporary mud huts that can be abandoned and easily rebuilt elsewhere in better conditions. This is orthogonal to the also-important issue that rigidity often accompanies a large user-base. One could have a beautiful cathedral that is frequented only by the faithful, and not turned into a tourist attraction like Notre Dame or Il Duomo di Firenze. Steph often says that if we were looking to be famous, we'd be programming in Ruby ;) Conversely, one could have a mud hut that becomes a historic landmark or revered for it's earthly charm, and can never be improved. And as for popularity = rigidity, that's certainly true for languages taken up by pop culture. That is because of one of Alan Kay's frequent observations - that nearly everyone is driven by utility, with only a tiny minority concerned inherently with ideas. Once people are programming a language because that's the language you're supposed to use - like C++ or Ruby - the utilitarianists flock in, and, because they are concerned only with its usefulness, they will not tolerate much disturbance due to beauty, design, or other intangibles. But, who says we have to go there? I for one am not interested in that game. One estimate says there are 18.5 million software developers in the world [1]. I don't remember the exact percentage of inherent-idea people, but let's be extremely conservative and say 5% (I think it was much higher). That gives us 0.05 x 18.5M = 925,000 potential Pharo users that would revel in the idea of an infinite game pursuing a beautiful, simple liberator of human expression; and therefore willing to tolerate and adapt themselves to the inevitable change, just like we all do now. Now, here's the important thing to remember... As
Re: [Pharo-users] Slides from the Pharo Status talk at FOSDEM 2015
I do agree, that nomads do not build cathedrals but there is the flip side of the coin, why one would want to be a nomad and the great benefits coming with being a nomad Guido the creator of python explains it from the side of the Python Standard library but I think it applies fine for Pharo too http://youtu.be/EBRMq2Ioxsc?t=49m4s he makes the point at 49th minute for a couple of minutes. Especially if the subject of your coding is quite unconventional putting it inside a standard distribution can be a huge wast of time that not only can offer limited benefits but even decrease the quality of the code substantially. Afterall the most beautiful things in life are not big at all ;) But yes I agree that being teamplayer is extremely important too. The balance is somewhere in between and I am a big supporter of what you trying to do with making pharo more modular. Thanks for the slides. I am using Pharo for a couple of years and I am amazed how far it has come , keep up the great work. On Tue, Feb 3, 2015 at 12:10 PM, Marcus Denker marcus.den...@inria.fr wrote: On 02 Feb 2015, at 21:19, Marcus Denker marcus.den...@inria.fr wrote: Hi, Here are the slides from my talk from yesterday: http://www.slideshare.net/MarcusDenker/2015-fosdempharo The part in between Pharo3 and Pharo4 tries a bit to explain the philosophy… I did a longer talk at ESUG last year about that: Nomads do not build Cathedrals http://www.slideshare.net/MarcusDenker/2014-esugcathedral The video of that is online: Video Part 1: https://www.youtube.com/watch?v=Vcoy5gwUvOA Video Part 2: https://www.youtube.com/watch?v=5LrH9r4FNzY In the spirit of the talk, I should do a pass over it and make a version 2… e.g. one book that was very influential to my thinking was Finite and Infinite Games by James P. Carse: http://kk.org/cooltools/archives/000434 To me a software system should always be thought as an “infinite game”… Marcus
Re: [Pharo-users] Slides from the Pharo Status talk at FOSDEM 2015
But thats not the point I am trying to make and what Guido is talking about in the video. The summary of those two minutes is that you dont want to contribute your code to us because as soon as you do you are trapped by our huge scary monster of backward compatibility and we wont tolerate any change to the design So you end up being a nomad because you want to be flexible, you dont even know if at some point you decide to rewrite your code because the code may be very experimental. The cool thing about nomads that they are extremely flexible unlike Cathedrals ;) Pharo right now is in the honeymoon period of expanding and expanding , as new , fresh thing. But the more user it will get the more inflexible will become to change. That's a big price to pay for abandoning the nomad life. On Tue, Feb 3, 2015 at 3:07 PM, Marcus Denker marcus.den...@inria.fr wrote: On 03 Feb 2015, at 13:59, kilon alios kilon.al...@gmail.com wrote: I do agree, that nomads do not build cathedrals but there is the flip side of the coin, why one would want to be a nomad and the great benefits coming with being a nomad Guido the creator of python explains it from the side of the Python Standard library but I think it applies fine for Pharo too http://youtu.be/EBRMq2Ioxsc?t=49m4s he makes the point at 49th minute for a couple of minutes. Especially if the subject of your coding is quite unconventional putting it inside a standard distribution can be a huge wast of time that not only can offer limited benefits but even decrease the quality of the code substantially. The idea is not that everything should be added… the idea is that we do experiments (or commercial projects), and *after* we re-assess if the changes that where needed to make those real make sense to be feed back into the main system. Often it is just parts, and in all “research” cases a real engineering pass is needed: research prototypes are just good enough to publish a paper… every minute spend doing more means publishing less, which is hurting your research career. (Research is a very nomadic activity…) Thanks for the slides. I am using Pharo for a couple of years and I am amazed how far it has come , keep up the great work. Thanks! Marcus
Re: [Pharo-users] Slides from the Pharo Status talk at FOSDEM 2015
well this is why I say its a weak spot. I dont disagree with everything you say. I do agree that a language like C++ goes to a very diffirent direction to Pharo and will attract diffirent kind of people, or even the same people with different set of goals. If you mean something more than that, then I am open to other opinions as always :) My point is that nomads should not be underestimated. But then I am one of them so maybe I am a bit biased :D On Tue, Feb 3, 2015 at 7:08 PM, Sean P. DeNigris s...@clipperadams.com wrote: kilon.alios wrote The weak spot in your argument is that you use the worst example you can choose to prove it. Ha ha ha, did you really just boil my whole post down to two examples of languages which are languages you're supposed to use (which by the way if you read carefully I never suggest are inherently good ideas)?! - Cheers, Sean -- View this message in context: http://forum.world.st/Slides-from-the-Pharo-Status-talk-at-FOSDEM-2015-tp4803290p4803432.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Re: [Pharo-users] Implementing text navigation shortcuts
Ok thanks that means I will wait for TxText too, I am in no big hurry. Well unless TxText takes more than a year to be added to Pharo. On Fri, Jan 30, 2015 at 12:37 PM, Tudor Girba tu...@tudorgirba.com wrote: Rubric is basically a clone of TextMorph that was significantly refactored by Alain. Just keep in mind that Rubric is just a bridge solution. The goal is to adopt TxText as soon as possible. Cheers, Doru On Fri, Jan 30, 2015 at 11:23 AM, kilon alios kilon.al...@gmail.com wrote: Can Rubric be used for displaying paragraphs etc ? I want to improve the documentation situation for pharo by improving the help tool. Nothing major just something that will improve the general look. Shortucts also play a huge role in this, I really like Emacs documentation system that allow you to navigate via shortcuts . On Fri, Jan 30, 2015 at 12:13 PM, Tudor Girba tu...@tudorgirba.com wrote: Rubric is already in the image and has most of these keybindings properly defined. Doru On Fri, Jan 30, 2015 at 11:09 AM, stepharo steph...@free.fr wrote: Yes we should continue to remove the old key-bindings hard-coded. Stef Le 30/1/15 00:48, Nicolai Hess a écrit : 2015-01-29 23:06 GMT+01:00 Laura Risani laura.ris...@gmail.com: Hi all, I like to implement a keyboard shortcut for, while editing any text, move the text pointer to the next position after $: . Seems that the base of all text editing is the class #TextMorphForEditView. I see there there is an instance variable for the text. My problem is i can not find a method that tells/sets the current position in the text of the text pointer. I've tried going through the list of methods of #TextMorphForEditView and its superclasses. Also through the one of senders of #arrowRight trying to find the instantiation of #KMKeyCombination needed to implement the existing shortcut ctrl + right arrow which jumps to the next position after an space, but i found nothing. Best, Laura Hello Laura, not all editing functions are actually in the TextMorph (TextMorphForEditView ...) classes or the Text class, instead they delegated this to an editor class (Editor/SimpleEditor/SmalltalkEditor...). And - yes that is bad - not all keyboard shortcuts go through KMKeyCombination and KMKeymap. The SmalltalkEditor class defines its own shortcut handler. For exampe: cmd+shift+a - #argAdvance: This method searches for the next $: followed by a space and place the caret after the space. nicolai -- www.tudorgirba.com Every thing has its own flow -- www.tudorgirba.com Every thing has its own flow
Re: [Pharo-users] SmaCC: First steps
thank for your congratulations, because at times I fear I ask too obvious questions. I have to say I find this parsing very complex but very fascinating too :) Time to experiment with the visitor. On Fri, Jan 30, 2015 at 11:49 PM, Thierry Goubier thierry.goub...@gmail.com wrote: 2015-01-30 14:04 GMT+01:00 kilon alios kilon.al...@gmail.com: Ok thanks for the info, I am still however curious about these tests are just tests (which may or may not happen) that determine the AST, for example which node to use ? 'tests' is just there because, in the grammar, there is this at a certain point: testlist: test 'test' , testlist | test 'test' comma_opt ; I have named this use of test 'test', so SmaCC has deduced that testlist will be a list of test(s) nodes (or maybe other stuff such as atoms, depending on the productions for test).. so, SmaCC, in each rule where testlist is found, it will add a 'tests' instance variable. So, basically, the grammar rules explain how each node can be decomposed in sub-nodes, and the additional annotations (the 'test' naming and the {{}} or {{}}) drive how the classes for the nodes you want to keep are generated. In that testlist case, no node will be generated, but everywhere testlist appear on the right of the rule, then it will add a 'tests' instance variable. Or are they tests related to unit testing class PythonParserTests ? Not at all :) Also you said I need to use the visitor created by PythonParser I assume you mean PyRootNodeVisitor ? Just as it is explained in the AST chapter of the documentation. In my case this simple python list will need me to subclass it and override method visitListmaker , the aListmaker passed as argument to the method should I assume it is PyListmakerNode ? In my experience, what you need to do is you have a look at the ast generated and see if you can recognize the elements. From what I see in your simple example, the key to your list is that PyAtomNode instance with something in list. Once you have that, you know that you need to visit PyAtomNode (and check that it has the [ ] tokens). Looking into what is listmaker in atom in the grammar (congratulations by the way, you have seen it :) ), you'll see that it creates a listmaker node only in the first case: test followed by a list_for, otherwise it falls back to testlist... Thierry On Fri, Jan 30, 2015 at 10:50 AM, Thierry Goubier thierry.goub...@gmail.com wrote: Hi kilon, The tests instance variable is linked to the python grammar: top level items in an expression are probably tests, and, through the grammar, tests can be just atoms. So the tests instance variable doesn't means it is testing anything :) Thierry Le 30 janv. 2015 09:23, kilon alios kilon.al...@gmail.com a écrit : Ok so I tried to parse a very simple list like [ 67,12342,5 ] using Parse and explore , I can find these number by following this AST (for example 67) PyFileInputNodestatements: - 1: PySimpleStmNodestmts: - 1: PyExprStmtNodetests: -1: PyPowerNodeatom: - PyAtomNodelist: - 1: PyPowerNodeatom: - PyPowerNodenumberToken - numberTokenvalue - 67 quite a structure, but the one thing I dont get is tests , why tests ? Does it tests something and if yes what ?
Re: [Pharo-users] New versions of the Pharo Launcher for Windows and MacOS
Thank you Damien, cant imagine myself without PharoLauncher, love it :) On Tue, Jan 20, 2015 at 3:58 PM, Damien Cassou damien.cas...@gmail.com wrote: Hi everyone, I've just updated the Windows and MacOS packages of the Pharo Launcher. Please update: http://www.smalltalkhub.com/#!/~Pharo/PharoLauncher -- Damien Cassou http://damiencassou.seasidehosting.st Success is the ability to go from one failure to another without losing enthusiasm. --Winston Churchill
Re: [Pharo-users] Implementing text navigation shortcuts
Can Rubric be used for displaying paragraphs etc ? I want to improve the documentation situation for pharo by improving the help tool. Nothing major just something that will improve the general look. Shortucts also play a huge role in this, I really like Emacs documentation system that allow you to navigate via shortcuts . On Fri, Jan 30, 2015 at 12:13 PM, Tudor Girba tu...@tudorgirba.com wrote: Rubric is already in the image and has most of these keybindings properly defined. Doru On Fri, Jan 30, 2015 at 11:09 AM, stepharo steph...@free.fr wrote: Yes we should continue to remove the old key-bindings hard-coded. Stef Le 30/1/15 00:48, Nicolai Hess a écrit : 2015-01-29 23:06 GMT+01:00 Laura Risani laura.ris...@gmail.com: Hi all, I like to implement a keyboard shortcut for, while editing any text, move the text pointer to the next position after $: . Seems that the base of all text editing is the class #TextMorphForEditView. I see there there is an instance variable for the text. My problem is i can not find a method that tells/sets the current position in the text of the text pointer. I've tried going through the list of methods of #TextMorphForEditView and its superclasses. Also through the one of senders of #arrowRight trying to find the instantiation of #KMKeyCombination needed to implement the existing shortcut ctrl + right arrow which jumps to the next position after an space, but i found nothing. Best, Laura Hello Laura, not all editing functions are actually in the TextMorph (TextMorphForEditView ...) classes or the Text class, instead they delegated this to an editor class (Editor/SimpleEditor/SmalltalkEditor...). And - yes that is bad - not all keyboard shortcuts go through KMKeyCombination and KMKeymap. The SmalltalkEditor class defines its own shortcut handler. For exampe: cmd+shift+a - #argAdvance: This method searches for the next $: followed by a space and place the caret after the space. nicolai -- www.tudorgirba.com Every thing has its own flow
Re: [Pharo-users] SmaCC: First steps
Ok so I tried to parse a very simple list like [ 67,12342,5 ] using Parse and explore , I can find these number by following this AST (for example 67) PyFileInputNodestatements: - 1: PySimpleStmNodestmts: - 1: PyExprStmtNodetests: -1: PyPowerNodeatom: - PyAtomNodelist: - 1: PyPowerNodeatom: - PyPowerNodenumberToken - numberTokenvalue - 67 quite a structure, but the one thing I dont get is tests , why tests ? Does it tests something and if yes what ?
Re: [Pharo-users] SmaCC: First steps
Ok thanks for the info, I am still however curious about these tests are just tests (which may or may not happen) that determine the AST, for example which node to use ? Or are they tests related to unit testing class PythonParserTests ? Also you said I need to use the visitor created by PythonParser I assume you mean PyRootNodeVisitor ? Just as it is explained in the AST chapter of the documentation. In my case this simple python list will need me to subclass it and override method visitListmaker , the aListmaker passed as argument to the method should I assume it is PyListmakerNode ? On Fri, Jan 30, 2015 at 10:50 AM, Thierry Goubier thierry.goub...@gmail.com wrote: Hi kilon, The tests instance variable is linked to the python grammar: top level items in an expression are probably tests, and, through the grammar, tests can be just atoms. So the tests instance variable doesn't means it is testing anything :) Thierry Le 30 janv. 2015 09:23, kilon alios kilon.al...@gmail.com a écrit : Ok so I tried to parse a very simple list like [ 67,12342,5 ] using Parse and explore , I can find these number by following this AST (for example 67) PyFileInputNodestatements: - 1: PySimpleStmNodestmts: - 1: PyExprStmtNodetests: -1: PyPowerNodeatom: - PyAtomNodelist: - 1: PyPowerNodeatom: - PyPowerNodenumberToken - numberTokenvalue - 67 quite a structure, but the one thing I dont get is tests , why tests ? Does it tests something and if yes what ?
Re: [Pharo-users] SmaCC: First steps
Yes I am aware of PettitParser but the one thing that made me very interested into SmaCC is that it already supports Python syntax parsing , though I think is for Python 2 but if its 2.7 it wont be much issue for me that use Python 3.4 syntax. From a first look it looks PettitParser easier to use but Thiery told me SmaCC is also fairly easy and personally I dont care so much I only want something that gets the job done as fast as possible. Having an existing python parser certainly makes things faster for me. But yes I have played around with pettitparser and I really liked it. On Wed, Jan 28, 2015 at 4:22 PM, Johan Fabry jfa...@dcc.uchile.cl wrote: Hi Kilon, I think it’s better that you take a look at PetitParser (e.g. http://www.themoosebook.org/book/internals/petit-parser ) I have found PetitParser more user friendly than SmaCC. On Jan 28, 2015, at 14:53, kilon alios kilon.al...@gmail.com wrote: Ok I have read a few times of the tutorial of Smacc in here http://www.refactoryworkers.com/SmaCC/ASTs.html and I am also following the help tool documentation inside pharo for SmaCC and I have to say I am very confused. Please bare with me because I am extremely noob when it comes to parsing, this is my first effort. Now the way I understand it so far, is that SmaCC uses a syntax similar to regex expressions to define parsers and scanners. Scanners evaluate a string to see that it contains a valid form and parser divide to parts named as tokens and help in the creating of ASTs which are basically hierarchy tree containing the syntax elements of a language. Now in order to make SmaCC work I need to use the SmaCC tool that comes with pharo . The smacc tool takes two inputs a scanner and a parser class. Does that mean I need to create that parser and scanner class ? I thought since I define the syntax that those things would be generated by the tool. What I need to define exactly ? Why when I select the PythonScanner2 and PythonParser2 and click then Compile LR it gives a MNU receiver of method is nil ? I am using latest Pharo 4 image. My goal is to parse python types to similar pharo objects. I get those python types as strings and my main focus in lists, dictionaries and tuples . The tricky part is that one can contain the other inside in every imagined way. The way I understand it I will need something called transformations to convert those python types to OrderedCollections, Arrays etc and anything would make more sense for a pharo coder. Additionally what is the meaning of the vertibal bar ? -- | eg. | Number Are there any other tutorials that can help a beginner like me to understand these concepts ? I am not looking for someone to give me the solution to the plate, I would love to learn and understand parsing because I am very interested into making Pharo easy to mix with Python code and allow Pharo to use Python libraries without the user having to learn or code Python :) As you may imagine this is a crucial ingredient for my project Ephestos which tries to use Pharo to script Blender by either replacing or cooperating with blender python. So learning a good way to parse pharo code to python code and vice versa is extremely important for me. --- Save our in-boxes! http://emailcharter.org --- Johan Fabry - http://pleiad.cl/~jfabry PLEIAD lab - Computer Science Department (DCC) - University of Chile
[Pharo-users] SmaCC: First steps
Ok I have read a few times of the tutorial of Smacc in here http://www.refactoryworkers.com/SmaCC/ASTs.html and I am also following the help tool documentation inside pharo for SmaCC and I have to say I am very confused. Please bare with me because I am extremely noob when it comes to parsing, this is my first effort. Now the way I understand it so far, is that SmaCC uses a syntax similar to regex expressions to define parsers and scanners. Scanners evaluate a string to see that it contains a valid form and parser divide to parts named as tokens and help in the creating of ASTs which are basically hierarchy tree containing the syntax elements of a language. Now in order to make SmaCC work I need to use the SmaCC tool that comes with pharo . The smacc tool takes two inputs a scanner and a parser class. Does that mean I need to create that parser and scanner class ? I thought since I define the syntax that those things would be generated by the tool. What I need to define exactly ? Why when I select the PythonScanner2 and PythonParser2 and click then Compile LR it gives a MNU receiver of method is nil ? I am using latest Pharo 4 image. My goal is to parse python types to similar pharo objects. I get those python types as strings and my main focus in lists, dictionaries and tuples . The tricky part is that one can contain the other inside in every imagined way. The way I understand it I will need something called transformations to convert those python types to OrderedCollections, Arrays etc and anything would make more sense for a pharo coder. Additionally what is the meaning of the vertibal bar ? -- | eg. | Number Are there any other tutorials that can help a beginner like me to understand these concepts ? I am not looking for someone to give me the solution to the plate, I would love to learn and understand parsing because I am very interested into making Pharo easy to mix with Python code and allow Pharo to use Python libraries without the user having to learn or code Python :) As you may imagine this is a crucial ingredient for my project Ephestos which tries to use Pharo to script Blender by either replacing or cooperating with blender python. So learning a good way to parse pharo code to python code and vice versa is extremely important for me.
Re: [Pharo-users] New book for Pharo :)
No idea what the problem really is, and what is that mess that concerns Numpy/SciPy but I welcome the new book , more documentation is always a cause of celebration, thank you for your hard work :) I think SciTalk is a nice name :p Way cooler than SciPy if you ask me ;)
Re: [Pharo-users] SmaCC: First steps
Ok. I made sure the help was up to date with the current SmaCC; the online tutorial may differ a bit (GUI, some of the class creation commands). Yes I am not complaining about your effort. I am just new with parsing and everything looks alien to me :D I am mostly following your documentation inside pharo but I dont mind reading anything available. Scanners divide the input stream in tokens with regular expressions. ok so regular expressions are used, good I am familiar with them because already used them to parse pharo messages to python method calls. At least I know something useful :) If you give new classes, it will create them. If you give existing classes, it will reuse them. Ok so creating classes for parser an scanner is only optional. That mean that those classes can do some extra work that is not defined with the SmaCC syntax. This is the issue I told you about in Pharo 4. The fix is waiting for review before integration (https://pharo.fogbugz.com/default.asp?14730). Ah yes now I remember, I could review it I am a member of pharo fogbuz but I am clueless of how it works and what it affects so maybe I am not a good reviewer in this case. With the PythonParser, you get a visitor generated, so you can subclass it and visit the ast produced by the parser and generate the relevant OrderedCollections. Roger so that means I will have to take a deep look into PythonParser class and try to figure things out. It means or. I assumed so , but I wanted to make sure. I don't have any at hand: I teach that at the moment, so I'm not delegating to a tutorial for my students ;) I was not aware that you are a teacher and that you teach SmaCC , cool. So I think I will try to put more effort to reading the tutorial and experimenting with Pharo 3 till Pharo 4 is fixed. The way it is set should support you well for doing what you want, so keep doing it :) Great if you say I can do this , this is already great news for me. The effort is not a problem , no pain no gain. I will be back with more questions.
Re: [Pharo-users] Hijacking a Configuration for loading a Github Baseline
I love your answers they are straight to the point, easy to understand and very useful, this one is no different, thank you :) I have another questions but I will make a separate thread for it so its easier for users to google and search for it, including me . By the way the official docs are only here ? -- https://github.com/dalehenrich/metacello-work/tree/master/docs On Tue, Jan 27, 2015 at 8:37 PM, Dale Henrichs dale.henri...@gemtalksystems.com wrote: Kilon, I don't use tags a lot in my own projects, but if someone is using your project in a production situation, then using tags is a good idea (if you follow semantic versioning) so that the users can tell when and if you have made api-breaking changes... Since the Smacc project looks like it is on github you have two options for doing a project reference: reference the configuration or reference the baseline. To reference a configuration-based project do something like the following (in a baseline): spec configuration: 'SmaCC' with: [ spec versionString: '2.0.4'; repository: 'http://.' ]. spec package: 'PackageThatDependsUponSmacc' with: [ spec requires: #('Smacc') ]. Note that you might want to use a symbolic version (if they are defined in the project) so that you can always get the #stable version which presumably changes over time ... To reference a baseline-based project do something like the following (in a baseline): spec baseline: 'SmaCC' with: [ spec repository: 'github://ThierryGoubier/SmaCC:master' ]. spec package: 'PackageThatDependsUponSmacc' with: [ spec requires: #('Smacc') ] Note that you can use the tag wild cards to achieve a similar effect of using symbolic versions with configurations. Did this answer your question? Dale On 01/27/2015 07:21 AM, kilon alios wrote: No I have not used git tags so far, so I am not familiar with them. But I will keep in mind, I am considering not having versions at all, I find it a curious concept. Dale there is one thing I wanted to ask you , would it possible put in my github repo installation instructions for installing prerequisites ? For example I may use Thierry's SmaCC which I currently study to figure out how it works. I could add that to my ConfigurationOfEphestos that I have saved to Meta Repo of Pharo 4. But I dont want to touch that repo, ideally I would like to do this from the BaselineOfEphestos which is stored in my Ephestos github repo. Is that possible ? Can the baseline handle installation of dependencies and trigger other configurations ? Or is that a job only for Configurations ? I want not to have to maintain also meta repo 4, I just want to only to do all things in my github repo. On Tue, Jan 27, 2015 at 4:57 PM, Dale Henrichs dale.henri...@gemtalksystems.com wrote: Kilon, One more point that you might find useful ... If you use tags (i.e., v1.0.0, v1.0.1, v1.1.0), you can specify tag wildcards in the branch field of the github repository description. Using Thierry's example the following resolves the latest commit on the master branch (bleeding edge): github://ThierryGoubier/SmaCC:master Using a tag name, you can match the tagged commit: github://ThierryGoubier/SmaCC:v1.0.0 github://ThierryGoubier/SmaCC:v1.1.0 Using a tag wildcard you can specify the latest tag 1.0.*: github://ThierryGoubier/SmaCC:v1.0.* which matches v1.0.1, v1.0.2, whichever is latest, but not v1.0.2.1. To match the latest tag in the 1.0 family use 1.0.?: github://ThierryGoubier/SmaCC:v1.0.? which matches v1.0.1, v1.0.2 and v1.0.2.1. There are more examples here[1]. This feature was introduced in Metacello 1.0.0-beta.32.16[2]. Dale [1] https://github.com/dalehenrich/metacello-work/issues/277#issuecomment-58970696 [2] https://github.com/dalehenrich/metacello-work/issues?q=milestone%3A1.0.0-beta.32.16+is%3Aclosed On 1/27/15 1:52 AM, kilon alios wrote: beautiful it worked like a charm following your instructions , I now can brake my project to smaller ones, each one with each own github repo and use Baselines to load each one and still allow the user to load my Project in one single click from Configuration Browser. Love it how Pharo make this all this so easy, with python it was a nightmare. Brilliant just Brilliant ! :) On Tue, Jan 27, 2015 at 11:19 AM, Thierry Goubier thierry.goub...@gmail.com wrote: Hi Kilon, a simple way to do that is to change your configuration so that it uses the baseline in your github. The SmaCC configuration for Pharo 4.0 is written in this way for the stable version. version204: spec version: '2.0.4' imports: #('2.0-baseline') spec for: #'pharo4.x' do: [ spec blessing: #stable; author: 'ThierryGoubier'; description: 'SmaCC Smalltalk Compiler Compiler for Pharo 4.0
Re: [Pharo-users] Hijacking a Configuration for loading a Github Baseline
beautiful it worked like a charm following your instructions , I now can brake my project to smaller ones, each one with each own github repo and use Baselines to load each one and still allow the user to load my Project in one single click from Configuration Browser. Love it how Pharo make this all this so easy, with python it was a nightmare. Brilliant just Brilliant ! :) On Tue, Jan 27, 2015 at 11:19 AM, Thierry Goubier thierry.goub...@gmail.com wrote: Hi Kilon, a simple way to do that is to change your configuration so that it uses the baseline in your github. The SmaCC configuration for Pharo 4.0 is written in this way for the stable version. version204: spec version: '2.0.4' imports: #('2.0-baseline') spec for: #'pharo4.x' do: [ spec blessing: #stable; author: 'ThierryGoubier'; description: 'SmaCC Smalltalk Compiler Compiler for Pharo 4.0'. spec baseline: 'SmaCC' with: [ spec repository: 'github://ThierryGoubier/SmaCC:master' ]; import: 'SmaCC' ] Thierry 2015-01-27 10:08 GMT+01:00 kilon alios kilon.al...@gmail.com: So I have a Configuration in the Meta repo of pharo 4 and 3 that loads the latest version of my project Ephestos. However I have moved my development to github since I am very happy with the workflow and since I discovered loading github repos via a baseline I have little use for smalltalkhub. So my plan is this, keep the configuration in the meta repo so people and me can install my project easily with one click via the wonderful simple configuration browser , but I dont want anymore to load any versions with it. Instead I want to tell the configuration load the github baseline which means it will fetch the code from my github account master branch which is the stable branch anyway (and the only branch so far) . That will allow me to never have to update that configuration again since it will just load the latest code from github repo. The question is how to do this the easiest and cleanest way possible ?