Re: [Pharo-users] How to silently generate and remove code
On Mar 30, 2015, at 09:23, Christophe Demarey christophe.dema...@inria.fr wrote: Le 30 mars 2015 à 09:10, Marcus Denker a écrit : On 29 Mar 2015, at 10:32, stepharo steph...@free.fr wrote: Before that I would like that the compiler outputs classes definition in an environment (that can be the default one) but that can be the one I want and specified from the outside of the compiler. For installing, it is the ClassInstaller that does that (and yes, it has an environment). What the compiler does not have is to look up references e.g. to symbols regarding to an environment, but that is because we don’t have that concept right now in the system in general. globals/class vars are requested from the class (which defines its environment). So in general, we first need a use case, else it is not clear what to do… A first use case could be to install new code in a sandbox, check if the loading is good, and then move the code to the default environment, else drop the sandbox. It is also a part of the feature asked by Johan: install code in a sandbox for tests purposes and then drop it without perturbing the system. To be clear: I want to be able to generate code (classes and methods in these classes), and remove them when needed without it being logged in the changes file. This is because it may end up to be a lot of code that changes extremely frequently, so it will pollute the change file a lot. And for debugging, I want to be able to see the source for the methods, even though they are not in .changes. (I will never want to version this code nor do anything else ‘serious’ with it, it’s all generated stuff). --- 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] How to silently generate and remove code
On 03/30/2015 09:10 AM, Marcus Denker wrote: What the compiler does not have is to look up references e.g. to symbols regarding to an environment, but that is because we don’t have that concept right now in the system in general. globals/class vars are requested from the class (which defines its environment). So in general, we first need a use case, else it is not clear what to do… Hi Marcus, i dont know whether this really applies to the things you are talking about here, but it sounds a bit like it eventually could, hence i'll mention it: i had a little program, that constructs an array of blocks (no object methods) via opal from scratch (using strings). now this worked of course without problems, but there are situations where it would be nice if those blocks would have - in a _simple_ way - access to common variables constructed by the program, iow if all those blocks would live in the same 'space' as those variables - or however thats called correctly. does this scenario apply as a possible use case (obviously completely different from Johan's use case) ? werner
Re: [Pharo-users] How to silently generate and remove code
A use case: the ability to test and debug the code generation part of SmaCC. SmaCC, when compiling a parser, generates dozens of classes and hundreds of methods, some of those very long, as a sequence of refactorings (and optimise them). Then SmaCC apply them all in one step. I'd dream of having a virtual environment where I could test-compile and check all those methods, via a system browser, before they are compiled. Thierry 2015-03-30 9:10 GMT+02:00 Marcus Denker marcus.den...@inria.fr: On 29 Mar 2015, at 10:32, stepharo steph...@free.fr wrote: Before that I would like that the compiler outputs classes definition in an environment (that can be the default one) but that can be the one I want and specified from the outside of the compiler. For installing, it is the ClassInstaller that does that (and yes, it has an environment). What the compiler does not have is to look up references e.g. to symbols regarding to an environment, but that is because we don't have that concept right now in the system in general. globals/class vars are requested from the class (which defines its environment). So in general, we first need a use case, else it is not clear what to do... Marcus
Re: [Pharo-users] MySQL framework for Pharo to analyze futures and options.
Hi, Thanks for all the input. I've managed to download Glorp and the MySQL Glorp driver. However I'm having serious difficulties in setting it to work. I've search for some documentation in the Glorp page but seems there's a problem with Google Drive. Is there any place to search / look at an example on how to actually connect, map and query a SQL database from Pharo? Thanks in advance Nacho! - Nacho Smalltalker apprentice. Buenos Aires, Argentina. -- View this message in context: http://forum.world.st/MySQL-framework-for-Pharo-to-analyze-futures-and-options-tp4815675p4816109.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Re: [Pharo-users] How to silently generate and remove code
Le 30 mars 2015 à 09:10, Marcus Denker a écrit : On 29 Mar 2015, at 10:32, stepharo steph...@free.fr wrote: Before that I would like that the compiler outputs classes definition in an environment (that can be the default one) but that can be the one I want and specified from the outside of the compiler. For installing, it is the ClassInstaller that does that (and yes, it has an environment). What the compiler does not have is to look up references e.g. to symbols regarding to an environment, but that is because we don’t have that concept right now in the system in general. globals/class vars are requested from the class (which defines its environment). So in general, we first need a use case, else it is not clear what to do… A first use case could be to install new code in a sandbox, check if the loading is good, and then move the code to the default environment, else drop the sandbox. It is also a part of the feature asked by Johan: install code in a sandbox for tests purposes and then drop it without perturbing the system. smime.p7s Description: S/MIME cryptographic signature
Re: [Pharo-users] How to silently generate and remove code
On Mar 30, 2015, at 11:01, Werner Kassens wkass...@libello.com wrote: i had a little program, that constructs an array of blocks (no object methods) via opal from scratch (using strings). now this worked of course without problems, but there are situations where it would be nice if those blocks would have - in a _simple_ way - access to common variables constructed by the program, iow if all those blocks would live in the same 'space' as those variables - or however thats called correctly. does this scenario apply as a possible use case (obviously completely different from Johan's use case) ? Werner, let me surprise you: what I am doing is in the end exactly that! :-) I am compiling blocks, written by the user of the system, that need references to variables that are outside the block, and they are shared between the different blocks. (The blocks have been written in a plain text textfield). So how do I have them access the variables? Here is the setup: - I generate a class (MyGeneratedClass) with as *class variables* all the variables that need to be accessed by the different blocks - For each block I generate a string with method source code (myGeneratedMethod_timestamp), whose body is: return the block - I compile the method and add it to MyGeneratedClass class (add it at class side) - I execute each method (MyGeneratedClass myGeneratedMethod_timestamp) , which gives me a BlockContext that has captured the variables. - sending value to that executes the block, and all blocks share the variables in MyGeneratedClass. Simple :-) And thanks to Marcus for discussing this with me a couple of years ago ... --- 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] MySQL framework for Pharo to analyze futures and options.
---BeginMessage--- Of general educational nature are two Glorp guides that I know of: 1) Glorp / User Guide by Nevin Pratt, and 2) San Diego State University Glorp Tutorial by Roger Whitney. - Otherwise, there are members on this board who can direct your attention to test code to test your configuration. Good luck, Cam On Mon, Mar 30, 2015 at 10:14 AM, nacho 0800na...@gmail.com wrote: Hi, Thanks for all the input. I've managed to download Glorp and the MySQL Glorp driver. However I'm having serious difficulties in setting it to work. I've search for some documentation in the Glorp page but seems there's a problem with Google Drive. Is there any place to search / look at an example on how to actually connect, map and query a SQL database from Pharo? Thanks in advance Nacho! - Nacho Smalltalker apprentice. Buenos Aires, Argentina. -- View this message in context: http://forum.world.st/MySQL-framework-for-Pharo-to-analyze-futures-and-options-tp4815675p4816109.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com. ---End Message---
Re: [Pharo-users] How to silently generate and remove code
Ok, I noted all the use cases. On 30 Mar 2015, at 16:25, Thierry Goubier thierry.goub...@gmail.com wrote: A use case: the ability to test and debug the code generation part of SmaCC. SmaCC, when compiling a parser, generates dozens of classes and hundreds of methods, some of those very long, as a sequence of refactorings (and optimise them). Then SmaCC apply them all in one step. I'd dream of having a virtual environment where I could test-compile and check all those methods, via a system browser, before they are compiled. Thierry 2015-03-30 9:10 GMT+02:00 Marcus Denker marcus.den...@inria.fr mailto:marcus.den...@inria.fr: On 29 Mar 2015, at 10:32, stepharo steph...@free.fr mailto:steph...@free.fr wrote: Before that I would like that the compiler outputs classes definition in an environment (that can be the default one) but that can be the one I want and specified from the outside of the compiler. For installing, it is the ClassInstaller that does that (and yes, it has an environment). What the compiler does not have is to look up references e.g. to symbols regarding to an environment, but that is because we don’t have that concept right now in the system in general. globals/class vars are requested from the class (which defines its environment). So in general, we first need a use case, else it is not clear what to do… Marcus
Re: [Pharo-users] MySQL framework for Pharo to analyze futures and options.
Hi, the most current documentation of (the most current) Glorp ships with VisualWorks. So your best bet is downloading their PUL product. The two tutorials mentioned by Cameron are not too outdated yet to be useless, but The DescriptorSystem has learned quite a few tricks since the time those were written. You need to ask your favorite search engine where to find them. I don't know of an official, still current place. Some other sprinkles of information can be found in several slide decks by Niall from ESUG 2013 and 2014. Very helpful once you've taken the first hurdle. I think, however, you can forget about Glorp.org as a source of information. It is painfully unmaintained at least it was when I last took a look. Sorry if I sound destructive. I use Glorp daily and like it very much. Niall and Instantiations are helpful in bug fixes and stuff it, but they sure cannot help in learning the basics. Joachim -- --- Objektfabrik Joachim Tuchel mailto:jtuc...@objektfabrik.de Fliederweg 1 http://www.objektfabrik.de D-71640 Ludwigsburg http://joachimtuchel.wordpress.com Telefon: +49 7141 56 10 86 0 Fax: +49 7141 56 10 86 1
[Pharo-users] Problem in creating new project on smalltalk hub
hi all, when i am creating new project it is showing *Oops! *Invalid username or password , any suggestion? I am already login to my account and using web interface (http://smalltalkhub.com/#!/register). Regards Rohit
Re: [Pharo-users] MySQL framework for Pharo to analyze futures and options.
There is a mail Niall send me after I asked him for documentation Good luck ;) Merwan Forwarded Message Subject:Re: Glorp Documentation Date: Sun, 8 Feb 2015 18:18:13 + From: Niall Ross (Cincom) nr...@cincom.com Organization: Cincom To: Merwan Ouddane merwanoudd...@gmail.com Dear Merwan, I just wanted to know where can I find the glorp documentation you are talking about here: http://www.cincomsmalltalk.com/publicRepository/Glorp%28Bundle%29.html If you have a version of VisualWorks (or ObjectStudio) installed, then doc/GlorpGuide.pdf and preview/glorp/GlorpUserGuide0.3.pdf are paths from the root of installation. If you do not already have a version, you can download the Personal User Licence version and install it for free for non-commercial use, from http://www.cincomsmalltalk.com/ navigating from the PRODUCTS menu. Be aware the GlorpUserGuide0.3.pdf was never completed and is now very old, using some out-of-date protocol, etc. The GlorpGuide.pdf is much newer. You can also look at http://esug.org/data/ESUG2014/1%20monday/1400-1500-Glorp/GlorpTutorialGuide-ESUG2014-0.1.pdf which are the slides of a tutorial on Glorp that I gave at ESUG last year. HTH Niall Ross http://www.slideshare.net/esug/presentations
[Pharo-users] Pharo 4.0 / Roassal2
Hi, can someone tell me, how to load Roassal2 into a Pharo4.0 Image? Or is it not a good idea with the current state of Pharo4.0? Gofer it smalltalkhubUser: 'ObjectProfile' project: 'Roassal2'; configurationOf: 'Roassal2'; loadDevelopment loaded it, but it the examples do not work with playground. I also tried Gofer new smalltalkhubUser: 'Moose' project: 'Glamour'; package: 'ConfigurationOfGlamour'; load. (Smalltalk at: #ConfigurationOfGlamour) perform: #loadDevelopment to load it in the latest Image #40587, but it failed. I have absolutely no idea, what depends on what ... BW Volkert
Re: [Pharo-users] How to silently generate and remove code
Here is a class that can be of use for you then :-) It’s a bit more complicated than what you need exactly, because I have lexical scoping and subscopes et cetera, but you can ignore that really. The relevant methods for you are generateNamedClass:withSuper: and compileBlock:forScope: Success! LRPCodeGenerator.st Description: Binary data On Mar 30, 2015, at 12:06, Werner Kassens wkass...@libello.com wrote: Hi Johan, g you did surprise me! thanks for that info, i can use that indeed. werner On 03/30/2015 04:47 PM, Johan Fabry wrote: Werner, let me surprise you: what I am doing is in the end exactly that! :-) ... --- 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 4.0 / Roassal2
Thanks Peter. Ok this work. Gofer it smalltalkhubUser: 'ObjectProfile' project: 'Roassal2'; configurationOf: 'Roassal2'; loadDevelopment Gofer new smalltalkhubUser: 'Moose' project: 'GToolkit'; package: 'GT-InspectorExtensions-CoreRoassal'; load. Gofer new smalltalkhubUser: 'Moose' project: 'Glamour'; package: 'Glamour-Tools'; package: 'Glamour-Roassal2-Presentations'; load. BW, Volkert Am 30.03.2015 um 21:00 schrieb Peter Uhnák: Hi, try also adding this ~~ Gofer new smalltalkhubUser: 'Moose' project: 'GToolkit'; package: 'GT-InspectorExtensions-CoreRoassal'; load. Gofer new smalltalkhubUser: 'Moose' project: 'Glamour'; package: 'Glamour-Tools'; package: 'Glamour-Roassal2-Presentations'; load. ~~ Peter On Mon, Mar 30, 2015 at 7:57 PM, Volkert volk...@komponentenwerkstatt.de mailto:volk...@komponentenwerkstatt.de wrote: Hi, can someone tell me, how to load Roassal2 into a Pharo4.0 Image? Or is it not a good idea with the current state of Pharo4.0? Gofer it smalltalkhubUser: 'ObjectProfile' project: 'Roassal2'; configurationOf: 'Roassal2'; loadDevelopment loaded it, but it the examples do not work with playground. I also tried Gofer new smalltalkhubUser: 'Moose' project: 'Glamour'; package: 'ConfigurationOfGlamour'; load. (Smalltalk at: #ConfigurationOfGlamour) perform: #loadDevelopment to load it in the latest Image #40587, but it failed. I have absolutely no idea, what depends on what ... BW Volkert
Re: [Pharo-users] Pharo 4.0 / Roassal2
Hi, try also adding this ~~ Gofer new smalltalkhubUser: 'Moose' project: 'GToolkit'; package: 'GT-InspectorExtensions-CoreRoassal'; load. Gofer new smalltalkhubUser: 'Moose' project: 'Glamour'; package: 'Glamour-Tools'; package: 'Glamour-Roassal2-Presentations'; load. ~~ Peter On Mon, Mar 30, 2015 at 7:57 PM, Volkert volk...@komponentenwerkstatt.de wrote: Hi, can someone tell me, how to load Roassal2 into a Pharo4.0 Image? Or is it not a good idea with the current state of Pharo4.0? Gofer it smalltalkhubUser: 'ObjectProfile' project: 'Roassal2'; configurationOf: 'Roassal2'; loadDevelopment loaded it, but it the examples do not work with playground. I also tried Gofer new smalltalkhubUser: 'Moose' project: 'Glamour'; package: 'ConfigurationOfGlamour'; load. (Smalltalk at: #ConfigurationOfGlamour) perform: #loadDevelopment to load it in the latest Image #40587, but it failed. I have absolutely no idea, what depends on what ... BW Volkert
Re: [Pharo-users] How to silently generate and remove code
Hi Johan, thanks, i see how it works and removes the object later. werner On 03/30/2015 06:42 PM, Johan Fabry wrote: Here is a class that can be of use for you then :-)
Re: [Pharo-users] Uncommon keyboard shortcuts on Windows
Hi, there is currently ongoing discussion about shortcuts since there is a bit Ctrl vs Alt chaos in both Linux and Windows. Note for example that in many cases (undo, copy, paste, ...) you can use both ctrl and alt. Unfortunately there are many different tools (Nautilus, TextEditor, Rubic, Playground) and each specifies shortcuts by itself and slightly differently. In any case the default for Windows is at the moment Alt. Peter On Mon, Mar 30, 2015 at 10:39 PM, Jan B. blizn...@fit.cvut.cz wrote: Hello First of all, I don't use much keyboard shortcuts on linux or mac, so all I write is just from point of Windows-only user. I would like to ask what is the reason of very uncommon keyboard shortcuts on Windows. Best example is redo/do again/invert undo... undo is ctrl+Z (which is right), but redo/do again is alt+J, which is something I have never seen anywhere, because it is mostly ctrl+Y (microsoft products), ctrl+shift+Z (photoshop for windows) or both (google and mozilla products on windows). Also, for select all, I have never seen any other shortcut than ctrl+A, but it is alt+A in Pharo... ctrl+A works only in playground. Is it a workaround because of a bug? Is it the bug itself? Or is it just a feature, like using the same as some other OS does? Jan -- View this message in context: http://forum.world.st/Uncommon-keyboard-shortcuts-on-Windows-tp4816205.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Re: [Pharo-users] Uncommon keyboard shortcuts on Windows
Hi Jan , (Under Windows...) For redoing ctrl+shif+z works fine on Workspace and Class Browser and in any other place i can remember. Copy, cut, paste, find, text selecting, moving to previous/next word (not exactly the same semantics) shortcuts convey Windows ones. Which other keyboard shortcuts, besides select-all, contradict Windows ones? On Mon, Mar 30, 2015 at 5:39 PM, Jan B. blizn...@fit.cvut.cz wrote: Hello First of all, I don't use much keyboard shortcuts on linux or mac, so all I write is just from point of Windows-only user. I would like to ask what is the reason of very uncommon keyboard shortcuts on Windows. Best example is redo/do again/invert undo... undo is ctrl+Z (which is right), but redo/do again is alt+J, which is something I have never seen anywhere, because it is mostly ctrl+Y (microsoft products), ctrl+shift+Z (photoshop for windows) or both (google and mozilla products on windows). Also, for select all, I have never seen any other shortcut than ctrl+A, but it is alt+A in Pharo... ctrl+A works only in playground. Is it a workaround because of a bug? Is it the bug itself? Or is it just a feature, like using the same as some other OS does? Jan -- View this message in context: http://forum.world.st/Uncommon-keyboard-shortcuts-on-Windows-tp4816205.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
[Pharo-users] Uncommon keyboard shortcuts on Windows
Hello First of all, I don't use much keyboard shortcuts on linux or mac, so all I write is just from point of Windows-only user. I would like to ask what is the reason of very uncommon keyboard shortcuts on Windows. Best example is redo/do again/invert undo... undo is ctrl+Z (which is right), but redo/do again is alt+J, which is something I have never seen anywhere, because it is mostly ctrl+Y (microsoft products), ctrl+shift+Z (photoshop for windows) or both (google and mozilla products on windows). Also, for select all, I have never seen any other shortcut than ctrl+A, but it is alt+A in Pharo... ctrl+A works only in playground. Is it a workaround because of a bug? Is it the bug itself? Or is it just a feature, like using the same as some other OS does? Jan -- View this message in context: http://forum.world.st/Uncommon-keyboard-shortcuts-on-Windows-tp4816205.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
[Pharo-users] quick poll - which OS do you use for Pharo?
Hi, I've made a quick poll because I'm interested in the distribution of Pharo users among OSes. It's a single anonymous question, so it shouldn't take more than five seconds to complete :) http://strawpoll.me/4001583 Thanks :) Peter
Re: [Pharo-users] Problem in creating new project on smalltalk hub
Maybe try logging out and then back in? Or logging in with a different browser? - Cheers, Sean -- View this message in context: http://forum.world.st/Problem-in-creating-new-project-on-smalltalk-hub-tp4816163p4816238.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Re: [Pharo-users] Problem in creating new project on smalltalk hub
Thanks Sean. Problem solved. This is the first time i am facing such problem. I have one more doubt, Is there any case in which if we don't do write super initialize and we face problems. Regards rohit_01 On Tue, Mar 31, 2015 at 4:57 AM, Sean P. DeNigris s...@clipperadams.com wrote: Maybe try logging out and then back in? Or logging in with a different browser? Cheers, Sean -- View this message in context: Re: Problem in creating new project on smalltalk hub http://forum.world.st/Problem-in-creating-new-project-on-smalltalk-hub-tp4816163p4816238.html Sent from the Pharo Smalltalk Users mailing list archive http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html at Nabble.com.
Re: [Pharo-users] Problem in creating new project on smalltalk hub
ok, thanks. Greetings, rohit_01 On Tue, Mar 31, 2015 at 6:20 AM, Sean P. DeNigris s...@clipperadams.com wrote: I have one more doubt, Is there any case in which if we don't do write super initialize and we face problems. It's a common practice to always send #initialize to super on the instance side. If you don't, and super does something important (e.g. in a Morph subclass), you will have problems. On the class side, it's the reverse - don't send to super unless you have a specific reason. Cheers, Sean -- View this message in context: Re: Problem in creating new project on smalltalk hub http://forum.world.st/Problem-in-creating-new-project-on-smalltalk-hub-tp4816163p4816247.html Sent from the Pharo Smalltalk Users mailing list archive http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html at Nabble.com.
Re: [Pharo-users] Problem in creating new project on smalltalk hub
I have one more doubt, Is there any case in which if we don't do write super initialize and we face problems. It's a common practice to always send #initialize to super on the instance side. If you don't, and super does something important (e.g. in a Morph subclass), you will have problems. On the class side, it's the reverse - don't send to super unless you have a specific reason. - Cheers, Sean -- View this message in context: http://forum.world.st/Problem-in-creating-new-project-on-smalltalk-hub-tp4816163p4816247.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.