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 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 that Opal can w

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 : > > 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 minimal-image

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 wrote: > > > Le 30/3/15 09:10, Marcus Denker a écrit : > > On 29 Mar 2015, at 10:32, stepharo 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 on

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, et

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 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 instal

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, some

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-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 Marcus Denker
Ok, I noted all the use cases. > On 30 Mar 2015, at 16:25, Thierry Goubier 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 sequ

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

2015-03-30 Thread Werner Kassens
Hi Johan, 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! :-) ...

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 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

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 havin

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 it

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 > wrote: > > > Le 30 mars 2015 à 09:10, Marcus Denker a écrit : > >> >>> On 29 Mar 2015, at 10:32, stepharo wrote: >>> >>> Before that I would like that the compiler outputs classes definition in an >>> environment (that can be the default o

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 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 th

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

2015-03-30 Thread Marcus Denker
> On 29 Mar 2015, at 10:32, stepharo 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

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, a

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 wrote: > > >> On 28 Mar 2015, at 20:05, Johan Fabry wrote: >> >> >>> On Mar 28, 2015, at 08:06, stepharo 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

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 wrote: > > >> On Mar 28, 2015, at 08:06, stepharo 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 >>>

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

2015-03-28 Thread Johan Fabry
Thanks Ben for the pointer! In the end it’s doing +- the same things I had already figured out don’t really work though. So I guess it’ll have to wait until thorough support is implemented. > On Mar 28, 2015, at 14:45, Ben Coman wrote: > > Not sure if it is silent enough for you, but perhaps

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

2015-03-28 Thread Johan Fabry
> On Mar 28, 2015, at 08:06, stepharo 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 wou

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 wrote: > Hi all, > > for LRP I am auto generating classes and methods, and removing them when I > no longer need them. This however produce

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 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 gene

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 solu

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

2015-03-27 Thread Johan Fabry
Hi all, for LRP I am auto generating classes and methods, and removing them when I no longer need them. This however produces a lot of entries in the change file that are not needed at all. So I am looking into generating and removing them silently, however with not much success. Can anybody he