Re: [Pharo-users] How to silently generate and remove code

2015-04-07 Thread Marcus Denker
On 05 Apr 2015, at 10:46, Thierry Goubier thierry.goub...@gmail.com wrote: Le 04/04/2015 18:02, stepharo a écrit : Thierry this means that generating ring objects would help you? Maybe. Or maybe unifying Ring with what RB already does with its models (RBClass, etc...), and ensuring

Re: [Pharo-users] How to silently generate and remove code

2015-04-07 Thread Luc Fabresse
2015-04-05 15:07 GMT+02:00 Ben Coman b...@openinworld.com: What would be exciting is in a host-image being able to generate an empty special-object Root-Object (like is held by the VM) as a guest-image inside the host-image, so you can push core elements into it until the guest is a running

Re: [Pharo-users] How to silently generate and remove code

2015-04-05 Thread Ben Coman
On Sun, Apr 5, 2015 at 12:01 AM, stepharo steph...@free.fr wrote: Le 30/3/15 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

Re: [Pharo-users] How to silently generate and remove code

2015-04-05 Thread Thierry Goubier
Le 04/04/2015 18:02, stepharo a écrit : Thierry this means that generating ring objects would help you? Maybe. Or maybe unifying Ring with what RB already does with its models (RBClass, etc...), and ensuring that Opal can work with those (at least do the bindings part, count the literals,

Re: [Pharo-users] How to silently generate and remove code

2015-04-04 Thread stepharo
Thierry this means that generating ring objects would help you? I guess so. stef Le 30/3/15 16:25, Thierry Goubier a écrit : 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,

Re: [Pharo-users] How to silently generate and remove code

2015-04-04 Thread stepharo
Le 30/3/15 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

Re: [Pharo-users] How to silently generate and remove code

2015-03-30 Thread Johan Fabry
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

Re: [Pharo-users] How to silently generate and remove code

2015-03-30 Thread Werner Kassens
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

Re: [Pharo-users] How to silently generate and remove code

2015-03-30 Thread Thierry Goubier
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

Re: [Pharo-users] How to silently generate and remove code

2015-03-30 Thread Christophe Demarey
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

Re: [Pharo-users] How to silently generate and remove code

2015-03-30 Thread Johan Fabry
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

Re: [Pharo-users] How to silently generate and remove code

2015-03-30 Thread Marcus Denker
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

Re: [Pharo-users] How to silently generate and remove code

2015-03-30 Thread Johan Fabry
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!

Re: [Pharo-users] How to silently generate and remove code

2015-03-30 Thread Werner Kassens
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] How to silently generate and remove code

2015-03-29 Thread stepharo
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. May be this is already the case Stef Le 28/3/15 23:03, Marcus Denker a écrit : On 28 Mar 2015,

Re: [Pharo-users] How to silently generate and remove code

2015-03-28 Thread Johan Fabry
On Mar 28, 2015, at 08:06, stepharo steph...@free.fr wrote: Le 28/3/15 08:53, Marcus Denker a écrit : I think we have not yet any good API for this… one problem is that the .changes is not only a transaction log, but in addition the place where the source of a method is stored. I

Re: [Pharo-users] How to silently generate and remove code

2015-03-28 Thread Johan Fabry
On Mar 28, 2015, at 19:03, Marcus Denker marcus.den...@inria.fr wrote: On 28 Mar 2015, at 20:05, Johan Fabry jfa...@dcc.uchile.cl wrote: On Mar 28, 2015, at 08:06, stepharo steph...@free.fr wrote: Le 28/3/15 08:53, Marcus Denker a écrit : I think we have not yet any good API

Re: [Pharo-users] How to silently generate and remove code

2015-03-28 Thread Marcus Denker
On 28 Mar 2015, at 20:05, Johan Fabry jfa...@dcc.uchile.cl wrote: On Mar 28, 2015, at 08:06, stepharo steph...@free.fr wrote: Le 28/3/15 08:53, Marcus Denker a écrit : I think we have not yet any good API for this… one problem is that the .changes is not only a transaction log,

Re: [Pharo-users] How to silently generate and remove code

2015-03-28 Thread stepharo
Le 28/3/15 08:53, Marcus Denker a écrit : I think we have not yet any good API for this… one problem is that the .changes is not only a transaction log, but in addition the place where the source of a method is stored. I would like to - make transaction log + source storage independent. -

Re: [Pharo-users] How to silently generate and remove code

2015-03-28 Thread Ben Coman
Not sure if it is silent enough for you, but perhaps have a look at use of ClassFactoryForTestCase. cheers -ben On Sat, Mar 28, 2015 at 4:15 AM, Johan Fabry jfa...@dcc.uchile.cl wrote: Hi all, for LRP I am auto generating classes and methods, and removing them when I no longer need them.

Re: [Pharo-users] How to silently generate and remove code

2015-03-28 Thread Marcus Denker
I think we have not yet any good API for this… one problem is that the .changes is not only a transaction log, but in addition the place where the source of a method is stored. I would like to - make transaction log + source storage independent. - add a kind of “virtual” package for these

Re: [Pharo-users] How to silently generate and remove code

2015-03-27 Thread Alejandro Infante
Hi, As far as I know the source code is not stored in the image, but in the changes file. So from that perspective the changes files is more than just logs, it actually store our code, so not recording that entry would be similar as having a method without the actual code. Maybe a possible